From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 02:47:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1216B906; Sun, 24 Feb 2013 02:47:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E8285F5B; Sun, 24 Feb 2013 02:47:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1O2lLaj054558; Sun, 24 Feb 2013 02:47:21 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1O2lKun054548; Sun, 24 Feb 2013 02:47:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201302240247.r1O2lKun054548@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Feb 2013 02:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247209 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 02:47:22 -0000 Author: pfg Date: Sun Feb 24 02:47:19 2013 New Revision: 247209 URL: http://svnweb.freebsd.org/changeset/base/247209 Log: MFC r246563, r246564, r246634: ext2fs: Miscellaneous cleanups and fixes. make e2fs_maxcontig local and remove tautological check. Replace redundant EXT2_MIN_BLOCK with EXT2_MIN_BLOCK_SIZE. Use prototype declarations for function definitions Submitted by: Christoph Mallon Modified: stable/9/sys/fs/ext2fs/ext2_alloc.c stable/9/sys/fs/ext2fs/ext2_balloc.c stable/9/sys/fs/ext2fs/ext2_bmap.c stable/9/sys/fs/ext2fs/ext2_inode.c stable/9/sys/fs/ext2fs/ext2_inode_cnv.c stable/9/sys/fs/ext2fs/ext2_lookup.c stable/9/sys/fs/ext2fs/ext2_subr.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2_vnops.c stable/9/sys/fs/ext2fs/ext2fs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_alloc.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_alloc.c Sun Feb 24 02:47:19 2013 (r247209) @@ -80,12 +80,8 @@ static daddr_t ext2_mapsearch(struct m_ * available block is located. */ int -ext2_alloc(ip, lbn, bpref, size, cred, bnp) - struct inode *ip; - int32_t lbn, bpref; - int size; - struct ucred *cred; - int32_t *bnp; +ext2_alloc(struct inode *ip, int32_t lbn, int32_t bpref, int size, + struct ucred *cred, int32_t *bnp) { struct m_ext2fs *fs; struct ext2mount *ump; @@ -159,11 +155,7 @@ static int doreallocblks = 0; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); int -ext2_reallocblks(ap) - struct vop_reallocblks_args /* { - struct vnode *a_vp; - struct cluster_save *a_buflist; - } */ *ap; +ext2_reallocblks(struct vop_reallocblks_args *ap) { struct m_ext2fs *fs; struct inode *ip; @@ -350,11 +342,7 @@ fail: * */ int -ext2_valloc(pvp, mode, cred, vpp) - struct vnode *pvp; - int mode; - struct ucred *cred; - struct vnode **vpp; +ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) { struct timespec ts; struct inode *pip; @@ -562,12 +550,8 @@ ext2_dirpref(struct inode *pip) * that will hold the pointer */ int32_t -ext2_blkpref(ip, lbn, indx, bap, blocknr) - struct inode *ip; - int32_t lbn; - int indx; - int32_t *bap; - int32_t blocknr; +ext2_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap, + int32_t blocknr) { int tmp; mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED); @@ -978,10 +962,7 @@ gotit: * */ void -ext2_blkfree(ip, bno, size) - struct inode *ip; - int32_t bno; - long size; +ext2_blkfree(struct inode *ip, int32_t bno, long size) { struct m_ext2fs *fs; struct buf *bp; @@ -1027,10 +1008,7 @@ ext2_blkfree(ip, bno, size) * */ int -ext2_vfree(pvp, ino, mode) - struct vnode *pvp; - ino_t ino; - int mode; +ext2_vfree(struct vnode *pvp, ino_t ino, int mode) { struct m_ext2fs *fs; struct inode *pip; @@ -1124,10 +1102,7 @@ ext2_mapsearch(struct m_ext2fs *fs, char * fs: error message */ static void -ext2_fserr(fs, uid, cp) - struct m_ext2fs *fs; - uid_t uid; - char *cp; +ext2_fserr(struct m_ext2fs *fs, uid_t uid, char *cp) { log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp); Modified: stable/9/sys/fs/ext2fs/ext2_balloc.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_balloc.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_balloc.c Sun Feb 24 02:47:19 2013 (r247209) @@ -55,13 +55,8 @@ * the inode and the logical block number in a file. */ int -ext2_balloc(ip, lbn, size, cred, bpp, flags) - struct inode *ip; - int32_t lbn; - int size; - struct ucred *cred; - struct buf **bpp; - int flags; +ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred, + struct buf **bpp, int flags) { struct m_ext2fs *fs; struct ext2mount *ump; Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_bmap.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_bmap.c Sun Feb 24 02:47:19 2013 (r247209) @@ -56,15 +56,7 @@ * number to index into the array of block pointers described by the dinode. */ int -ext2_bmap(ap) - struct vop_bmap_args /* { - struct vnode *a_vp; - daddr_t a_bn; - struct bufobj **a_bop; - daddr_t *a_bnp; - int *a_runp; - int *a_runb; - } */ *ap; +ext2_bmap(struct vop_bmap_args *ap) { int32_t blkno; int error; @@ -99,12 +91,7 @@ ext2_bmap(ap) */ int -ext2_bmaparray(vp, bn, bnp, runp, runb) - struct vnode *vp; - int32_t bn; - int32_t *bnp; - int *runp; - int *runb; +ext2_bmaparray(struct vnode *vp, int32_t bn, int32_t *bnp, int *runp, int *runb) { struct inode *ip; struct buf *bp; @@ -252,11 +239,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) * once with the offset into the page itself. */ int -ext2_getlbns(vp, bn, ap, nump) - struct vnode *vp; - int32_t bn; - struct indir *ap; - int *nump; +ext2_getlbns(struct vnode *vp, int32_t bn, struct indir *ap, int *nump) { long blockcnt, metalbn, realbn; struct ext2mount *ump; Modified: stable/9/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_inode.c Sun Feb 24 02:47:19 2013 (r247209) @@ -66,9 +66,7 @@ static int ext2_indirtrunc(struct inode * set, then wait for the write to complete. */ int -ext2_update(vp, waitfor) - struct vnode *vp; - int waitfor; +ext2_update(struct vnode *vp, int waitfor) { struct m_ext2fs *fs; struct buf *bp; @@ -108,12 +106,8 @@ ext2_update(vp, waitfor) * disk blocks. */ int -ext2_truncate(vp, length, flags, cred, td) - struct vnode *vp; - off_t length; - int flags; - struct ucred *cred; - struct thread *td; +ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, + struct thread *td) { struct vnode *ovp = vp; int32_t lastblock; @@ -361,12 +355,8 @@ done: */ static int -ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp) - struct inode *ip; - int32_t lbn, lastbn; - int32_t dbn; - int level; - long *countp; +ext2_indirtrunc(struct inode *ip, int32_t lbn, int32_t dbn, int32_t lastbn, + int level, long *countp) { struct buf *bp; struct m_ext2fs *fs = ip->i_e2fs; @@ -470,11 +460,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le * discard preallocated blocks */ int -ext2_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +ext2_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -510,11 +496,7 @@ out: * Reclaim an inode so that it can be used for other purposes. */ int -ext2_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +ext2_reclaim(struct vop_reclaim_args *ap) { struct inode *ip; struct vnode *vp = ap->a_vp; Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sun Feb 24 02:47:19 2013 (r247209) @@ -41,8 +41,7 @@ #define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK) void -ext2_print_inode( in ) - struct inode *in; +ext2_print_inode(struct inode *in) { int i; @@ -68,9 +67,7 @@ ext2_print_inode( in ) * raw ext2 inode to inode */ void -ext2_ei2i(ei, ip) - struct ext2fs_dinode *ei; - struct inode *ip; +ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) { int i; @@ -113,9 +110,7 @@ ext2_ei2i(ei, ip) * inode to raw ext2 inode */ void -ext2_i2ei(ip, ei) - struct inode *ip; - struct ext2fs_dinode *ei; +ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei) { int i; Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_lookup.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_lookup.c Sun Feb 24 02:47:19 2013 (r247209) @@ -129,12 +129,7 @@ static int ext2_lookup_ino(struct vnode * the whole buffer to uiomove */ int -ext2_readdir(ap) - struct vop_readdir_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - } */ *ap; +ext2_readdir(struct vop_readdir_args *ap) { struct uio *uio = ap->a_uio; int count, error; @@ -278,12 +273,7 @@ ext2_readdir(ap) * nor deleting, add name to cache */ int -ext2_lookup(ap) - struct vop_cachedlookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; +ext2_lookup(struct vop_cachedlookup_args *ap) { return (ext2_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); @@ -722,10 +712,7 @@ found: } void -ext2_dirbad(ip, offset, how) - struct inode *ip; - doff_t offset; - char *how; +ext2_dirbad(struct inode *ip, doff_t offset, char *how) { struct mount *mp; @@ -751,10 +738,8 @@ ext2_dirbad(ip, offset, how) * changed so that it confirms to ext2_check_dir_entry */ static int -ext2_dirbadentry(dp, de, entryoffsetinblock) - struct vnode *dp; - struct ext2fs_direct_2 *de; - int entryoffsetinblock; +ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, + int entryoffsetinblock) { int DIRBLKSIZ = VTOI(dp)->i_e2fs->e2fs_bsize; @@ -791,10 +776,7 @@ ext2_dirbadentry(dp, de, entryoffsetinbl * entry is to be obtained. */ int -ext2_direnter(ip, dvp, cnp) - struct inode *ip; - struct vnode *dvp; - struct componentname *cnp; +ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) { struct ext2fs_direct_2 *ep, *nep; struct inode *dp; @@ -944,9 +926,7 @@ ext2_direnter(ip, dvp, cnp) * to the size of the previous entry. */ int -ext2_dirremove(dvp, cnp) - struct vnode *dvp; - struct componentname *cnp; +ext2_dirremove(struct vnode *dvp, struct componentname *cnp) { struct inode *dp; struct ext2fs_direct_2 *ep, *rep; @@ -994,9 +974,7 @@ ext2_dirremove(dvp, cnp) * set up by a call to namei. */ int -ext2_dirrewrite(dp, ip, cnp) - struct inode *dp, *ip; - struct componentname *cnp; +ext2_dirrewrite(struct inode *dp, struct inode *ip, struct componentname *cnp) { struct buf *bp; struct ext2fs_direct_2 *ep; @@ -1027,10 +1005,7 @@ ext2_dirrewrite(dp, ip, cnp) * NB: does not handle corrupted directories. */ int -ext2_dirempty(ip, parentino, cred) - struct inode *ip; - ino_t parentino; - struct ucred *cred; +ext2_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred) { off_t off; struct dirtemplate dbuf; @@ -1081,9 +1056,7 @@ ext2_dirempty(ip, parentino, cred) * The target is always vput before returning. */ int -ext2_checkpath(source, target, cred) - struct inode *source, *target; - struct ucred *cred; +ext2_checkpath(struct inode *source, struct inode *target, struct ucred *cred) { struct vnode *vp; int error, namlen; Modified: stable/9/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_subr.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_subr.c Sun Feb 24 02:47:19 2013 (r247209) @@ -63,11 +63,7 @@ void ext2_checkoverlap(struct buf *, str * remaining space in the directory. */ int -ext2_blkatoff(vp, offset, res, bpp) - struct vnode *vp; - off_t offset; - char **res; - struct buf **bpp; +ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp) { struct inode *ip; struct m_ext2fs *fs; @@ -93,9 +89,7 @@ ext2_blkatoff(vp, offset, res, bpp) #ifdef KDB void -ext2_checkoverlap(bp, ip) - struct buf *bp; - struct inode *ip; +ext2_checkoverlap(struct buf *bp, struct inode *ip) { struct buf *ebp, *ep; int32_t start, last; Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Sun Feb 24 02:47:19 2013 (r247209) @@ -320,8 +320,8 @@ compute_sb_data(struct vnode *devvp, str struct buf *bp; uint32_t e2fs_descpb; - fs->e2fs_bsize = EXT2_MIN_BLOCK_SIZE << es->e2fs_log_bsize; fs->e2fs_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->e2fs_log_bsize; + fs->e2fs_bsize = 1U << fs->e2fs_bshift; fs->e2fs_fsbtodb = es->e2fs_log_bsize + 1; fs->e2fs_qbmask = fs->e2fs_bsize - 1; fs->e2fs_fsize = EXT2_MIN_FRAG_SIZE << es->e2fs_log_fsize; @@ -527,6 +527,7 @@ ext2_mountfs(struct vnode *devvp, struct int ronly; int i, size; int32_t *lp; + int32_t e2fs_maxcontig; ronly = vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0); /* XXX: use VOP_ACESS to check FS perms */ @@ -601,12 +602,8 @@ ext2_mountfs(struct vnode *devvp, struct * in ext2fs doesn't have these variables, so we can calculate * them here. */ - ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize); - if (ump->um_e2fs->e2fs_maxcontig > 0) - ump->um_e2fs->e2fs_contigsumsize = - MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG); - else - ump->um_e2fs->e2fs_contigsumsize = 0; + e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize); + ump->um_e2fs->e2fs_contigsumsize = MIN(e2fs_maxcontig, EXT2_MAXCONTIG); if (ump->um_e2fs->e2fs_contigsumsize > 0) { size = ump->um_e2fs->e2fs_gcount * sizeof(int32_t); ump->um_e2fs->e2fs_maxcluster = malloc(size, M_EXT2MNT, M_WAITOK); Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Sun Feb 24 02:47:19 2013 (r247209) @@ -225,13 +225,7 @@ ext2_itimes(struct vnode *vp) * Create a regular file */ static int -ext2_create(ap) - struct vop_create_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ext2_create(struct vop_create_args *ap) { int error; @@ -244,13 +238,7 @@ ext2_create(ap) } static int -ext2_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ext2_open(struct vop_open_args *ap) { if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR) @@ -274,13 +262,7 @@ ext2_open(ap) * Update the times on the inode. */ static int -ext2_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ext2_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; @@ -292,13 +274,7 @@ ext2_close(ap) } static int -ext2_access(ap) - struct vop_access_args /* { - struct vnode *a_vp; - accmode_t a_accmode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ext2_access(struct vop_access_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -336,12 +312,7 @@ ext2_access(ap) } static int -ext2_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +ext2_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -382,12 +353,7 @@ ext2_getattr(ap) * Set attribute vnode op. called from several syscalls */ static int -ext2_setattr(ap) - struct vop_setattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +ext2_setattr(struct vop_setattr_args *ap) { struct vattr *vap = ap->a_vap; struct vnode *vp = ap->a_vp; @@ -525,11 +491,7 @@ ext2_setattr(ap) * Inode must be locked before calling. */ static int -ext2_chmod(vp, mode, cred, td) - struct vnode *vp; - int mode; - struct ucred *cred; - struct thread *td; +ext2_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td) { struct inode *ip = VTOI(vp); int error; @@ -566,12 +528,8 @@ ext2_chmod(vp, mode, cred, td) * inode must be locked prior to call. */ static int -ext2_chown(vp, uid, gid, cred, td) - struct vnode *vp; - uid_t uid; - gid_t gid; - struct ucred *cred; - struct thread *td; +ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred, + struct thread *td) { struct inode *ip = VTOI(vp); uid_t ouid; @@ -616,13 +574,7 @@ ext2_chown(vp, uid, gid, cred, td) */ /* ARGSUSED */ static int -ext2_fsync(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct thread *a_td; - } */ *ap; +ext2_fsync(struct vop_fsync_args *ap) { /* * Flush all dirty buffers associated with a vnode. @@ -638,13 +590,7 @@ ext2_fsync(ap) */ /* ARGSUSED */ static int -ext2_mknod(ap) - struct vop_mknod_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ext2_mknod(struct vop_mknod_args *ap) { struct vattr *vap = ap->a_vap; struct vnode **vpp = ap->a_vpp; @@ -683,12 +629,7 @@ ext2_mknod(ap) } static int -ext2_remove(ap) - struct vop_remove_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ext2_remove(struct vop_remove_args *ap) { struct inode *ip; struct vnode *vp = ap->a_vp; @@ -714,12 +655,7 @@ out: * link vnode call */ static int -ext2_link(ap) - struct vop_link_args /* { - struct vnode *a_tdvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ext2_link(struct vop_link_args *ap) { struct vnode *vp = ap->a_vp; struct vnode *tdvp = ap->a_tdvp; @@ -782,15 +718,7 @@ out: * directory. */ static int -ext2_rename(ap) - struct vop_rename_args /* { - struct vnode *a_fdvp; - struct vnode *a_fvp; - struct componentname *a_fcnp; - struct vnode *a_tdvp; - struct vnode *a_tvp; - struct componentname *a_tcnp; - } */ *ap; +ext2_rename(struct vop_rename_args *ap) { struct vnode *tvp = ap->a_tvp; struct vnode *tdvp = ap->a_tdvp; @@ -1145,13 +1073,7 @@ out: * Mkdir system call */ static int -ext2_mkdir(ap) - struct vop_mkdir_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ext2_mkdir(struct vop_mkdir_args *ap) { struct vnode *dvp = ap->a_dvp; struct vattr *vap = ap->a_vap; @@ -1282,12 +1204,7 @@ out: * Rmdir system call. */ static int -ext2_rmdir(ap) - struct vop_rmdir_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ext2_rmdir(struct vop_rmdir_args *ap) { struct vnode *vp = ap->a_vp; struct vnode *dvp = ap->a_dvp; @@ -1355,14 +1272,7 @@ out: * symlink -- make a symbolic link */ static int -ext2_symlink(ap) - struct vop_symlink_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - char *a_target; - } */ *ap; +ext2_symlink(struct vop_symlink_args *ap) { struct vnode *vp, **vpp = ap->a_vpp; struct inode *ip; @@ -1392,12 +1302,7 @@ ext2_symlink(ap) * Return target name of a symbolic link */ static int -ext2_readlink(ap) - struct vop_readlink_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - } */ *ap; +ext2_readlink(struct vop_readlink_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -1419,11 +1324,7 @@ ext2_readlink(ap) * deadlock on memory. See ext2_bmap() for details. */ static int -ext2_strategy(ap) - struct vop_strategy_args /* { - struct vnode *a_vp; - struct buf *a_bp; - } */ *ap; +ext2_strategy(struct vop_strategy_args *ap) { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; @@ -1461,10 +1362,7 @@ ext2_strategy(ap) * Print out the contents of an inode. */ static int -ext2_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +ext2_print(struct vop_print_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -1482,13 +1380,7 @@ ext2_print(ap) * Update the times on the inode then do device close. */ static int -ext2fifo_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ext2fifo_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; @@ -1505,8 +1397,7 @@ ext2fifo_close(ap) * Fall through to ext2 kqfilter routines if needed */ static int -ext2fifo_kqfilter(ap) - struct vop_kqfilter_args *ap; +ext2fifo_kqfilter(struct vop_kqfilter_args *ap) { int error; @@ -1520,12 +1411,7 @@ ext2fifo_kqfilter(ap) * Return POSIX pathconf information applicable to ext2 filesystems. */ static int -ext2_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; +ext2_pathconf(struct vop_pathconf_args *ap) { switch (ap->a_name) { @@ -1558,11 +1444,7 @@ ext2_pathconf(ap) */ /* ARGSUSED */ static int -ext2_vptofh(ap) - struct vop_vptofh_args /* { - struct vnode *a_vp; - struct fid *a_fhp; - } */ *ap; +ext2_vptofh(struct vop_vptofh_args *ap) { struct inode *ip; struct ufid *ufhp; @@ -1580,10 +1462,7 @@ ext2_vptofh(ap) * vnodes. */ int -ext2_vinit(mntp, fifoops, vpp) - struct mount *mntp; - struct vop_vector *fifoops; - struct vnode **vpp; +ext2_vinit(struct mount *mntp, struct vop_vector *fifoops, struct vnode **vpp) { struct inode *ip; struct vnode *vp; @@ -1605,11 +1484,8 @@ ext2_vinit(mntp, fifoops, vpp) * Allocate a new inode. */ static int -ext2_makeinode(mode, dvp, vpp, cnp) - int mode; - struct vnode *dvp; - struct vnode **vpp; - struct componentname *cnp; +ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp) { struct inode *ip, *pdir; struct vnode *tvp; @@ -1692,13 +1568,7 @@ bad: * Vnode op for reading. */ static int -ext2_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ext2_read(struct vop_read_args *ap) { struct vnode *vp; struct inode *ip; @@ -1841,13 +1711,7 @@ ext2_read(ap) * Vnode op for writing. */ static int -ext2_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ext2_write(struct vop_write_args *ap) { struct vnode *vp; struct uio *uio; Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Sat Feb 23 23:22:48 2013 (r247208) +++ stable/9/sys/fs/ext2fs/ext2fs.h Sun Feb 24 02:47:19 2013 (r247209) @@ -170,7 +170,6 @@ struct m_ext2fs { char e2fs_wasvalid; /* valid at mount time */ off_t e2fs_maxfilesize; struct ext2_gd *e2fs_gd; /* Group Descriptors */ - int32_t e2fs_maxcontig; /* max number of contiguous blks */ int32_t e2fs_contigsumsize; /* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ @@ -304,7 +303,6 @@ struct csum { /* * Macro-instructions used to manage several block sizes */ -#define EXT2_MIN_BLOCK_SIZE 1024 #define EXT2_MAX_BLOCK_SIZE 4096 #define EXT2_MIN_BLOCK_LOG_SIZE 10 #define EXT2_BLOCK_SIZE(s) ((s)->e2fs_bsize) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 05:49:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5DA79FFC; Sun, 24 Feb 2013 05:49:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3827415FE; Sun, 24 Feb 2013 05:49:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1O5mxqt009553; Sun, 24 Feb 2013 05:48:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1O5mxGH009552; Sun, 24 Feb 2013 05:48:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201302240548.r1O5mxGH009552@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Feb 2013 05:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247211 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 05:49:00 -0000 Author: kib Date: Sun Feb 24 05:48:59 2013 New Revision: 247211 URL: http://svnweb.freebsd.org/changeset/base/247211 Log: MFC r246612: Fix several unsafe pointer dereferences in the buffered_write() function. Modified: stable/9/sys/ufs/ffs/ffs_alloc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_alloc.c Sun Feb 24 03:15:43 2013 (r247210) +++ stable/9/sys/ufs/ffs/ffs_alloc.c Sun Feb 24 05:48:59 2013 (r247211) @@ -2853,10 +2853,11 @@ buffered_write(fp, uio, active_cred, fla int flags; struct thread *td; { - struct vnode *devvp; + struct vnode *devvp, *vp; struct inode *ip; struct buf *bp; struct fs *fs; + struct filedesc *fdp; int error, vfslocked; daddr_t lbn; @@ -2867,12 +2868,34 @@ buffered_write(fp, uio, active_cred, fla * within the filesystem being written. Yes, this is an ugly hack. */ devvp = fp->f_vnode; - ip = VTOI(td->td_proc->p_fd->fd_cdir); - if (ip->i_devvp != devvp) + if (!vn_isdisk(devvp, NULL)) return (EINVAL); + fdp = td->td_proc->p_fd; + FILEDESC_SLOCK(fdp); + vp = fdp->fd_cdir; + vref(vp); + FILEDESC_SUNLOCK(fdp); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + vn_lock(vp, LK_SHARED | LK_RETRY); + /* + * Check that the current directory vnode indeed belongs to + * UFS before trying to dereference UFS-specific v_data fields. + */ + if (vp->v_op != &ffs_vnodeops1 && vp->v_op != &ffs_vnodeops2) { + vput(vp); + VFS_UNLOCK_GIANT(vfslocked); + return (EINVAL); + } + ip = VTOI(vp); + if (ip->i_devvp != devvp) { + vput(vp); + VFS_UNLOCK_GIANT(vfslocked); + return (EINVAL); + } fs = ip->i_fs; + vput(vp); + VFS_UNLOCK_GIANT(vfslocked); foffset_lock_uio(fp, uio, flags); - vfslocked = VFS_LOCK_GIANT(ip->i_vnode->v_mount); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); #ifdef DEBUG if (fsckcmds) { @@ -2900,7 +2923,6 @@ buffered_write(fp, uio, active_cred, fla error = bwrite(bp); out: VOP_UNLOCK(devvp, 0); - VFS_UNLOCK_GIANT(vfslocked); foffset_unlock_uio(fp, uio, flags | FOF_NEXTOFF); return (error); } From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 18:26:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D4483F57; Sun, 24 Feb 2013 18:26:18 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95A10D6A; Sun, 24 Feb 2013 18:26:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1OIQIxw038083; Sun, 24 Feb 2013 18:26:18 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1OIQIpT038081; Sun, 24 Feb 2013 18:26:18 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201302241826.r1OIQIpT038081@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 24 Feb 2013 18:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247230 - in stable/9/sys: dev/netmap net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 18:26:18 -0000 Author: luigi Date: Sun Feb 24 18:26:17 2013 New Revision: 247230 URL: http://svnweb.freebsd.org/changeset/base/247230 Log: MFC some flags and minor things related to "transparent mode" that i forgot in previous commits. Modified: stable/9/sys/dev/netmap/ixgbe_netmap.h stable/9/sys/net/netmap.h Modified: stable/9/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- stable/9/sys/dev/netmap/ixgbe_netmap.h Sun Feb 24 18:13:57 2013 (r247229) +++ stable/9/sys/dev/netmap/ixgbe_netmap.h Sun Feb 24 18:26:17 2013 (r247230) @@ -63,9 +63,6 @@ * This is tricky, much better to use TDH for now. */ SYSCTL_DECL(_dev_netmap); -static int ix_write_len; -SYSCTL_INT(_dev_netmap, OID_AUTO, ix_write_len, - CTLFLAG_RW, &ix_write_len, 0, "write rx len"); static int ix_rx_miss, ix_rx_miss_bufs, ix_use_dd, ix_crcstrip; SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip, CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames"); @@ -236,7 +233,7 @@ ixgbe_netmap_txsync(struct ifnet *ifp, u * seems very expensive, so we interrupt once every half ring, * or when requested with NS_REPORT */ - int report_frequency = kring->nkr_num_slots >> 1; + u_int report_frequency = kring->nkr_num_slots >> 1; if (k > lim) return netmap_ring_reinit(kring); @@ -485,12 +482,9 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u * rxr->next_to_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { - /* XXX apparently the length field in advanced descriptors - * does not include the CRC irrespective of the setting - * of CRCSTRIP. The data sheets say differently. - * Very strange. - */ int crclen = ix_crcstrip ? 0 : 4; + uint16_t slot_flags = kring->nkr_slot_flags; + l = rxr->next_to_check; j = netmap_idx_n2k(kring, l); @@ -501,8 +495,7 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u if ((staterr & IXGBE_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen; - if (ix_write_len) - D("rx[%d] len %d", j, ring->slot[j].len); + ring->slot[j].flags = slot_flags; bus_dmamap_sync(rxr->ptag, rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; Modified: stable/9/sys/net/netmap.h ============================================================================== --- stable/9/sys/net/netmap.h Sun Feb 24 18:13:57 2013 (r247229) +++ stable/9/sys/net/netmap.h Sun Feb 24 18:26:17 2013 (r247230) @@ -144,8 +144,11 @@ struct netmap_slot { * e.g. by generating an interrupt */ #define NS_FORWARD 0x0004 /* pass packet to the other endpoint - * (host stack or device + * (host stack or device) */ +#define NS_NO_LEARN 0x0008 +#define NS_PORT_SHIFT 8 +#define NS_PORT_MASK (0xff << NS_PORT_SHIFT) }; /* From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 21:00:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CEF109D6; Sun, 24 Feb 2013 21:00:38 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B69D4383; Sun, 24 Feb 2013 21:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1OL0cje085177; Sun, 24 Feb 2013 21:00:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1OL0ck8085176; Sun, 24 Feb 2013 21:00:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201302242100.r1OL0ck8085176@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 24 Feb 2013 21:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247237 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 21:00:38 -0000 Author: jilles Date: Sun Feb 24 21:00:37 2013 New Revision: 247237 URL: http://svnweb.freebsd.org/changeset/base/247237 Log: MFC r246617: sigqueue(2): Fix typo (EEPERM -> EPERM). Modified: stable/9/lib/libc/sys/sigqueue.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/9/lib/libc/sys/sigqueue.2 Sun Feb 24 20:53:32 2013 (r247236) +++ stable/9/lib/libc/sys/sigqueue.2 Sun Feb 24 21:00:37 2013 (r247237) @@ -117,7 +117,7 @@ or a system-wide resource limit has been The value of the .Fa signo argument is an invalid or unsupported signal number. -.It Bq Er EEPERM +.It Bq Er EPERM The process does not have the appropriate privilege to send the signal to the receiving process. .It Bq Er ESRCH From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 21:36:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C14F7A04; Sun, 24 Feb 2013 21:36:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9B12E747; Sun, 24 Feb 2013 21:36:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1OLas1S095415; Sun, 24 Feb 2013 21:36:54 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1OLasok095414; Sun, 24 Feb 2013 21:36:54 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201302242136.r1OLasok095414@svn.freebsd.org> From: Devin Teske Date: Sun, 24 Feb 2013 21:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247241 - stable/9/usr.sbin/sysinstall/help X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 21:36:54 -0000 Author: dteske Date: Sun Feb 24 21:36:54 2013 New Revision: 247241 URL: http://svnweb.freebsd.org/changeset/base/247241 Log: Oops, r186202 (over 4 years ago) forgot to remove Tape from the F1 Help file. Direct commit to stable/9 (no sysinstall in head). Modified: stable/9/usr.sbin/sysinstall/help/options.hlp Modified: stable/9/usr.sbin/sysinstall/help/options.hlp ============================================================================== --- stable/9/usr.sbin/sysinstall/help/options.hlp Sun Feb 24 21:23:11 2013 (r247240) +++ stable/9/usr.sbin/sysinstall/help/options.hlp Sun Feb 24 21:36:54 2013 (r247241) @@ -88,14 +88,6 @@ Editor: Specify which screen editor to setting to `/usr/bin/vi'. -Tape Blocksize: Specify block size in 512 byte blocks of tape. - - This defaults to 20 blocks, which should work with most - tape drive + tar combinations. It may not allow your particular - drive to win any records for speed, however, and the more - adventurous among you might try experimenting with larger sizes. - - Extract Detail: How to show filenames on debug screen as they're extracted. While a distribution is being extracted, the default detail level From owner-svn-src-stable@FreeBSD.ORG Sun Feb 24 21:42:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1FF5BBC7; Sun, 24 Feb 2013 21:42:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D00F77D; Sun, 24 Feb 2013 21:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1OLgdIv097748; Sun, 24 Feb 2013 21:42:39 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1OLgdou097747; Sun, 24 Feb 2013 21:42:39 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201302242142.r1OLgdou097747@svn.freebsd.org> From: Devin Teske Date: Sun, 24 Feb 2013 21:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247242 - stable/9/usr.sbin/sysinstall/help X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 21:42:40 -0000 Author: dteske Date: Sun Feb 24 21:42:39 2013 New Revision: 247242 URL: http://svnweb.freebsd.org/changeset/base/247242 Log: Oops, r215291 (over 2 years ago) forgot to remove mention of "medium" from the F1 Help file. Direct commit to stable/9 (no sysinstall in head). Modified: stable/9/usr.sbin/sysinstall/help/options.hlp Modified: stable/9/usr.sbin/sysinstall/help/options.hlp ============================================================================== --- stable/9/usr.sbin/sysinstall/help/options.hlp Sun Feb 24 21:36:54 2013 (r247241) +++ stable/9/usr.sbin/sysinstall/help/options.hlp Sun Feb 24 21:42:39 2013 (r247242) @@ -92,9 +92,8 @@ Extract Detail: How to show filenames o While a distribution is being extracted, the default detail level of "high" will show the full file names as they're extracted. - If you would prefer a more terse form for this, namely dots, select - the "medium" detail level. If you want nothing to be printed - on the debugging screen during extraction, select "low". + If you want nothing to be printed on the debugging screen during + extraction, select "low". Release Name: Which release to attempt to load from installation media. From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 08:14:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6A42BED9; Mon, 25 Feb 2013 08:14:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B84B376; Mon, 25 Feb 2013 08:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1P8E8MK088802; Mon, 25 Feb 2013 08:14:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1P8E87j088801; Mon, 25 Feb 2013 08:14:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302250814.r1P8E87j088801@svn.freebsd.org> From: Xin LI Date: Mon, 25 Feb 2013 08:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247254 - in stable: 8/sbin/recoverdisk 9/sbin/recoverdisk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 08:14:08 -0000 Author: delphij Date: Mon Feb 25 08:14:07 2013 New Revision: 247254 URL: http://svnweb.freebsd.org/changeset/base/247254 Log: MFC r246329: Use stripesize as smallest block size if it's available. Modified: stable/9/sbin/recoverdisk/recoverdisk.c Directory Properties: stable/9/sbin/recoverdisk/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sbin/recoverdisk/recoverdisk.c Directory Properties: stable/8/sbin/recoverdisk/ (props changed) Modified: stable/9/sbin/recoverdisk/recoverdisk.c ============================================================================== --- stable/9/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:08:13 2013 (r247253) +++ stable/9/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:14:07 2013 (r247254) @@ -156,6 +156,7 @@ main(int argc, char * const argv[]) int error, state; u_char *buf; u_int sectorsize; + u_int stripesize; time_t t1, t2; struct stat sb; u_int n, snapshot = 60; @@ -201,6 +202,10 @@ main(int argc, char * const argv[]) if (error < 0) err(1, "DIOCGSECTORSIZE failed"); + error = ioctl(fdr, DIOCGSTRIPESIZE, &stripesize); + if (error == 0 && stripesize > sectorsize) + sectorsize = stripesize; + minsize = sectorsize; bigsize = (bigsize / sectorsize) * sectorsize; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 08:14:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9F7BDEDA; Mon, 25 Feb 2013 08:14:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 90B95377; Mon, 25 Feb 2013 08:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1P8E8jd088812; Mon, 25 Feb 2013 08:14:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1P8E8T1088811; Mon, 25 Feb 2013 08:14:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302250814.r1P8E8T1088811@svn.freebsd.org> From: Xin LI Date: Mon, 25 Feb 2013 08:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247254 - in stable: 8/sbin/recoverdisk 9/sbin/recoverdisk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 08:14:08 -0000 Author: delphij Date: Mon Feb 25 08:14:07 2013 New Revision: 247254 URL: http://svnweb.freebsd.org/changeset/base/247254 Log: MFC r246329: Use stripesize as smallest block size if it's available. Modified: stable/8/sbin/recoverdisk/recoverdisk.c Directory Properties: stable/8/sbin/recoverdisk/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/recoverdisk/recoverdisk.c Directory Properties: stable/9/sbin/recoverdisk/ (props changed) Modified: stable/8/sbin/recoverdisk/recoverdisk.c ============================================================================== --- stable/8/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:08:13 2013 (r247253) +++ stable/8/sbin/recoverdisk/recoverdisk.c Mon Feb 25 08:14:07 2013 (r247254) @@ -156,6 +156,7 @@ main(int argc, char * const argv[]) int error, flags, state; u_char *buf; u_int sectorsize; + u_int stripesize; time_t t1, t2; struct stat sb; u_int n, snapshot = 60; @@ -202,6 +203,10 @@ main(int argc, char * const argv[]) if (error < 0) err(1, "DIOCGSECTORSIZE failed"); + error = ioctl(fdr, DIOCGSTRIPESIZE, &stripesize); + if (error == 0 && stripesize > sectorsize) + sectorsize = stripesize; + minsize = sectorsize; bigsize = (bigsize / sectorsize) * sectorsize; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 16:13:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 81501E09; Mon, 25 Feb 2013 16:13:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 70ABD732; Mon, 25 Feb 2013 16:13:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1PGDMnG033522; Mon, 25 Feb 2013 16:13:22 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1PGDM2q033521; Mon, 25 Feb 2013 16:13:22 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201302251613.r1PGDM2q033521@svn.freebsd.org> From: Devin Teske Date: Mon, 25 Feb 2013 16:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247267 - stable/9/usr.sbin/sysinstall X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 16:13:22 -0000 Author: dteske Date: Mon Feb 25 16:13:21 2013 New Revision: 247267 URL: http://svnweb.freebsd.org/changeset/base/247267 Log: Oops, r55392 (over 13 years ago) forgot to classify the new HTTP Proxy for the options dialog (causing "" to be displayed for the HTTP media type). Direct commit to stable/9 (no sysinstall in head). Modified: stable/9/usr.sbin/sysinstall/options.c Modified: stable/9/usr.sbin/sysinstall/options.c ============================================================================== --- stable/9/usr.sbin/sysinstall/options.c Mon Feb 25 14:06:24 2013 (r247266) +++ stable/9/usr.sbin/sysinstall/options.c Mon Feb 25 16:13:21 2013 (r247267) @@ -75,6 +75,9 @@ mediaCheck(Option *opt) case DEVICE_TYPE_FTP: return "FTP"; + case DEVICE_TYPE_HTTP: + return "HTTP Proxy"; + case DEVICE_TYPE_CDROM: return "CDROM"; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 18:07:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A15DF2B; Mon, 25 Feb 2013 18:07:21 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 001F8C1B; Mon, 25 Feb 2013 18:07:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1PI7KBg067060; Mon, 25 Feb 2013 18:07:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1PI7K4W067058; Mon, 25 Feb 2013 18:07:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201302251807.r1PI7K4W067058@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Feb 2013 18:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247273 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 18:07:21 -0000 Author: jilles Date: Mon Feb 25 18:07:20 2013 New Revision: 247273 URL: http://svnweb.freebsd.org/changeset/base/247273 Log: MFC r241010: libc/fts: Use O_CLOEXEC for internal file descriptors. Because fts keeps internal file descriptors open across calls, making such descriptors close-on-exec helps not only multi-threaded applications but also single-threaded applications. In particular, this prevents passing a temporary file descriptor for saving the current directory to processes created via find -exec. Modified: stable/9/lib/libc/gen/fts-compat.c stable/9/lib/libc/gen/fts.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/fts-compat.c ============================================================================== --- stable/9/lib/libc/gen/fts-compat.c Mon Feb 25 17:32:10 2013 (r247272) +++ stable/9/lib/libc/gen/fts-compat.c Mon Feb 25 18:07:20 2013 (r247273) @@ -218,7 +218,8 @@ __fts_open_44bsd(argv, options, compar) * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0) + if (!ISSET(FTS_NOCHDIR) && + (sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) SET(FTS_NOCHDIR); return (sp); @@ -347,7 +348,8 @@ __fts_read_44bsd(sp) (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) { + if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC, + 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -438,7 +440,7 @@ next: tmp = p; p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = - _open(".", O_RDONLY, 0)) < 0) { + _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -579,7 +581,7 @@ __fts_children_44bsd(sp, instr) ISSET(FTS_NOCHDIR)) return (sp->fts_child = fts_build(sp, instr)); - if ((fd = _open(".", O_RDONLY, 0)) < 0) + if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) return (NULL); sp->fts_child = fts_build(sp, instr); if (fchdir(fd)) @@ -1178,7 +1180,7 @@ fts_safe_changedir(sp, p, fd, path) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) return (-1); if (_fstat(newfd, &sb)) { ret = -1; Modified: stable/9/lib/libc/gen/fts.c ============================================================================== --- stable/9/lib/libc/gen/fts.c Mon Feb 25 17:32:10 2013 (r247272) +++ stable/9/lib/libc/gen/fts.c Mon Feb 25 18:07:20 2013 (r247273) @@ -213,7 +213,8 @@ fts_open(argv, options, compar) * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0) + if (!ISSET(FTS_NOCHDIR) && + (sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) SET(FTS_NOCHDIR); return (sp); @@ -342,7 +343,8 @@ fts_read(sp) (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) { + if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC, + 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -433,7 +435,7 @@ next: tmp = p; p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = - _open(".", O_RDONLY, 0)) < 0) { + _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -574,7 +576,7 @@ fts_children(sp, instr) ISSET(FTS_NOCHDIR)) return (sp->fts_child = fts_build(sp, instr)); - if ((fd = _open(".", O_RDONLY, 0)) < 0) + if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) return (NULL); sp->fts_child = fts_build(sp, instr); if (fchdir(fd)) { @@ -1145,7 +1147,7 @@ fts_safe_changedir(sp, p, fd, path) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) return (-1); if (_fstat(newfd, &sb)) { ret = -1; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 19:08:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DC7DC57E; Mon, 25 Feb 2013 19:08:47 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B164DFBC; Mon, 25 Feb 2013 19:08:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1PJ8lBJ085736; Mon, 25 Feb 2013 19:08:47 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1PJ8lrG085735; Mon, 25 Feb 2013 19:08:47 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201302251908.r1PJ8lrG085735@svn.freebsd.org> From: Giorgos Keramidas Date: Mon, 25 Feb 2013 19:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247275 - stable/9/lib/libc/stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 19:08:47 -0000 Author: keramida (doc committer) Date: Mon Feb 25 19:08:46 2013 New Revision: 247275 URL: http://svnweb.freebsd.org/changeset/base/247275 Log: MFH r247014, r247050 and r247051. Add a sample program that shows how a custom comparison function and qsort(3) can work together to sort an array of integers. PR: docs/176197 Submitted by: Fernando, fapesteguia at opensistemas.com Christoph Mallon, christoph.mallon at gmx.de Approved by: gjb (mentor), remko (mentor) Modified: stable/9/lib/libc/stdlib/qsort.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/qsort.3 ============================================================================== --- stable/9/lib/libc/stdlib/qsort.3 Mon Feb 25 19:05:40 2013 (r247274) +++ stable/9/lib/libc/stdlib/qsort.3 Mon Feb 25 19:08:46 2013 (r247275) @@ -32,7 +32,7 @@ .\" @(#)qsort.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 30, 2003 +.Dd February 20, 2013 .Dt QSORT 3 .Os .Sh NAME @@ -205,6 +205,46 @@ functions return no value. .Pp .Rv -std heapsort mergesort +.Sh EXAMPLES +A sample program that sorts an array of +.Vt int +values in place using +.Fn qsort , +and then prints the sorted array to standard output is: +.Bd -literal +#include +#include + +/* + * Custom comparison function that can compare 'int' values through pointers + * passed by qsort(3). + */ +static int +int_compare(const void *p1, const void *p2) +{ + int left = *(const int *)p1; + int right = *(const int *)p2; + + return ((left > right) - (left < right)); +} + +/* + * Sort an array of 'int' values and print it to standard output. + */ +int +main(void) +{ + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; + const size_t array_size = sizeof(int_array) / sizeof(int_array[0]); + size_t k; + + qsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + for (k = 0; k < array_size; k++) + printf(" %d", int_array[k]); + puts(""); + return (EXIT_SUCCESS); +} +.Ed .Sh COMPATIBILITY Previous versions of .Fn qsort From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 19:09:14 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3455F6F5; Mon, 25 Feb 2013 19:09:14 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B30BFC5; Mon, 25 Feb 2013 19:09:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1PJ9DvI085855; Mon, 25 Feb 2013 19:09:13 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1PJ9D27085854; Mon, 25 Feb 2013 19:09:13 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201302251909.r1PJ9D27085854@svn.freebsd.org> From: Giorgos Keramidas Date: Mon, 25 Feb 2013 19:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247276 - stable/8/lib/libc/stdlib X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 19:09:14 -0000 Author: keramida (doc committer) Date: Mon Feb 25 19:09:13 2013 New Revision: 247276 URL: http://svnweb.freebsd.org/changeset/base/247276 Log: MFH r247014, r247050 and r247051. Add a sample program that shows how a custom comparison function and qsort(3) can work together to sort an array of integers. PR: docs/176197 Submitted by: Fernando, fapesteguia at opensistemas.com Christoph Mallon, christoph.mallon at gmx.de Approved by: gjb (mentor), remko (mentor) Modified: stable/8/lib/libc/stdlib/qsort.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdlib/qsort.3 ============================================================================== --- stable/8/lib/libc/stdlib/qsort.3 Mon Feb 25 19:08:46 2013 (r247275) +++ stable/8/lib/libc/stdlib/qsort.3 Mon Feb 25 19:09:13 2013 (r247276) @@ -32,7 +32,7 @@ .\" @(#)qsort.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 30, 2003 +.Dd February 20, 2013 .Dt QSORT 3 .Os .Sh NAME @@ -205,6 +205,46 @@ functions return no value. .Pp .Rv -std heapsort mergesort +.Sh EXAMPLES +A sample program that sorts an array of +.Vt int +values in place using +.Fn qsort , +and then prints the sorted array to standard output is: +.Bd -literal +#include +#include + +/* + * Custom comparison function that can compare 'int' values through pointers + * passed by qsort(3). + */ +static int +int_compare(const void *p1, const void *p2) +{ + int left = *(const int *)p1; + int right = *(const int *)p2; + + return ((left > right) - (left < right)); +} + +/* + * Sort an array of 'int' values and print it to standard output. + */ +int +main(void) +{ + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; + const size_t array_size = sizeof(int_array) / sizeof(int_array[0]); + size_t k; + + qsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + for (k = 0; k < array_size; k++) + printf(" %d", int_array[k]); + puts(""); + return (EXIT_SUCCESS); +} +.Ed .Sh COMPATIBILITY Previous versions of .Fn qsort From owner-svn-src-stable@FreeBSD.ORG Mon Feb 25 19:09:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1B4DC861; Mon, 25 Feb 2013 19:09:42 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E90E1FCB; Mon, 25 Feb 2013 19:09:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1PJ9fgQ085979; Mon, 25 Feb 2013 19:09:41 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1PJ9fU7085978; Mon, 25 Feb 2013 19:09:41 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201302251909.r1PJ9fU7085978@svn.freebsd.org> From: Giorgos Keramidas Date: Mon, 25 Feb 2013 19:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r247277 - stable/7/lib/libc/stdlib X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 19:09:42 -0000 Author: keramida (doc committer) Date: Mon Feb 25 19:09:41 2013 New Revision: 247277 URL: http://svnweb.freebsd.org/changeset/base/247277 Log: MFH r247014, r247050 and r247051. Add a sample program that shows how a custom comparison function and qsort(3) can work together to sort an array of integers. PR: docs/176197 Submitted by: Fernando, fapesteguia at opensistemas.com Christoph Mallon, christoph.mallon at gmx.de Approved by: gjb (mentor), remko (mentor) Modified: stable/7/lib/libc/stdlib/qsort.3 Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/stdlib/qsort.3 ============================================================================== --- stable/7/lib/libc/stdlib/qsort.3 Mon Feb 25 19:09:13 2013 (r247276) +++ stable/7/lib/libc/stdlib/qsort.3 Mon Feb 25 19:09:41 2013 (r247277) @@ -32,7 +32,7 @@ .\" @(#)qsort.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 30, 2003 +.Dd February 20, 2013 .Dt QSORT 3 .Os .Sh NAME @@ -205,6 +205,46 @@ functions return no value. .Pp .Rv -std heapsort mergesort +.Sh EXAMPLES +A sample program that sorts an array of +.Vt int +values in place using +.Fn qsort , +and then prints the sorted array to standard output is: +.Bd -literal +#include +#include + +/* + * Custom comparison function that can compare 'int' values through pointers + * passed by qsort(3). + */ +static int +int_compare(const void *p1, const void *p2) +{ + int left = *(const int *)p1; + int right = *(const int *)p2; + + return ((left > right) - (left < right)); +} + +/* + * Sort an array of 'int' values and print it to standard output. + */ +int +main(void) +{ + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; + const size_t array_size = sizeof(int_array) / sizeof(int_array[0]); + size_t k; + + qsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + for (k = 0; k < array_size; k++) + printf(" %d", int_array[k]); + puts(""); + return (EXIT_SUCCESS); +} +.Ed .Sh COMPATIBILITY Previous versions of .Fn qsort From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 00:44:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2011E242; Tue, 26 Feb 2013 00:44:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 073801A8; Tue, 26 Feb 2013 00:44:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q0isUD088973; Tue, 26 Feb 2013 00:44:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q0isnC088972; Tue, 26 Feb 2013 00:44:54 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201302260044.r1Q0isnC088972@svn.freebsd.org> From: Mark Johnston Date: Tue, 26 Feb 2013 00:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247294 - stable/9/usr.bin/grep/regex X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 00:44:55 -0000 Author: markj Date: Tue Feb 26 00:44:54 2013 New Revision: 247294 URL: http://svnweb.freebsd.org/changeset/base/247294 Log: MFC r246917: Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a valid index into the input buffer. Approved by: rstone (co-mentor) Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/9/usr.bin/grep/regex/tre-fastmatch.c Tue Feb 26 00:43:01 2013 (r247293) +++ stable/9/usr.bin/grep/regex/tre-fastmatch.c Tue Feb 26 00:44:54 2013 (r247294) @@ -103,7 +103,7 @@ static int fastcmp(const fastmatch_t *fg ((!fg->reversed \ ? ((type == STR_WIDE) ? ((j + fg->wlen) > len) \ : ((j + fg->len) > len)) \ - : (j < 0))) + : (j <= 0))) /* * Checks whether the new position after shifting in the input string From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 03:39:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5DC51AD5; Tue, 26 Feb 2013 03:39:16 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 386D0A25; Tue, 26 Feb 2013 03:39:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q3dGaE043255; Tue, 26 Feb 2013 03:39:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q3dG6c043254; Tue, 26 Feb 2013 03:39:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201302260339.r1Q3dG6c043254@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 26 Feb 2013 03:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247302 - stable/9/sys/ia64/ia64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 03:39:16 -0000 Author: marcel Date: Tue Feb 26 03:39:15 2013 New Revision: 247302 URL: http://svnweb.freebsd.org/changeset/base/247302 Log: MFC r239379: Use pmap_kextract(x) rather than pmap_extract(kernel_pmap, x). Modified: stable/9/sys/ia64/ia64/mem.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ia64/ia64/mem.c ============================================================================== --- stable/9/sys/ia64/ia64/mem.c Tue Feb 26 03:24:45 2013 (r247301) +++ stable/9/sys/ia64/ia64/mem.c Tue Feb 26 03:39:15 2013 (r247302) @@ -129,7 +129,7 @@ kmemphys: addr = trunc_page(v); eaddr = round_page(v + c); for (; addr < eaddr; addr += PAGE_SIZE) { - if (pmap_extract(kernel_pmap, addr) == 0) + if (pmap_kextract(addr) == 0) return (EFAULT); } if (!kernacc((caddr_t)v, c, (uio->uio_rw == UIO_READ) From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 03:46:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EC1EAD52; Tue, 26 Feb 2013 03:46:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DD166A5A; Tue, 26 Feb 2013 03:46:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q3kZB5045970; Tue, 26 Feb 2013 03:46:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q3kZEl045969; Tue, 26 Feb 2013 03:46:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201302260346.r1Q3kZEl045969@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 26 Feb 2013 03:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247303 - stable/9/sys/ia64/ia64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 03:46:36 -0000 Author: marcel Date: Tue Feb 26 03:46:35 2013 New Revision: 247303 URL: http://svnweb.freebsd.org/changeset/base/247303 Log: MFC r246882: Return EFAULT when the address is not a kernel virtual address. Modified: stable/9/sys/ia64/ia64/mem.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ia64/ia64/mem.c ============================================================================== --- stable/9/sys/ia64/ia64/mem.c Tue Feb 26 03:39:15 2013 (r247302) +++ stable/9/sys/ia64/ia64/mem.c Tue Feb 26 03:46:35 2013 (r247303) @@ -128,6 +128,8 @@ kmemphys: */ addr = trunc_page(v); eaddr = round_page(v + c); + if (addr < VM_MAXUSER_ADDRESS) + return (EFAULT); for (; addr < eaddr; addr += PAGE_SIZE) { if (pmap_kextract(addr) == 0) return (EFAULT); From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 05:12:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D9609F9; Tue, 26 Feb 2013 05:12:26 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 77F77D75; Tue, 26 Feb 2013 05:12:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q5CQmQ072750; Tue, 26 Feb 2013 05:12:26 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q5CQ6e072749; Tue, 26 Feb 2013 05:12:26 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201302260512.r1Q5CQ6e072749@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 26 Feb 2013 05:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247305 - in stable/9/sys/modules/virtio: . scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 05:12:26 -0000 Author: bryanv Date: Tue Feb 26 05:12:25 2013 New Revision: 247305 URL: http://svnweb.freebsd.org/changeset/base/247305 Log: MFC part of r241470 missed in r246582 Add the VirtIO SCSI Makefile. I was in one directory too deep when I did the previous commit. Approved by: grehan Added: stable/9/sys/modules/virtio/scsi/ - copied from r241470, head/sys/modules/virtio/scsi/ Modified: stable/9/sys/modules/virtio/Makefile Modified: stable/9/sys/modules/virtio/Makefile ============================================================================== --- stable/9/sys/modules/virtio/Makefile Tue Feb 26 04:59:02 2013 (r247304) +++ stable/9/sys/modules/virtio/Makefile Tue Feb 26 05:12:25 2013 (r247305) @@ -23,6 +23,6 @@ # SUCH DAMAGE. # -SUBDIR= virtio pci network block balloon +SUBDIR= virtio pci network block balloon scsi .include From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 05:27:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13185BF3; Tue, 26 Feb 2013 05:27:03 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DEA41DDA; Tue, 26 Feb 2013 05:27:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q5R2Jc076318; Tue, 26 Feb 2013 05:27:02 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q5R2AR076316; Tue, 26 Feb 2013 05:27:02 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201302260527.r1Q5R2AR076316@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 26 Feb 2013 05:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247306 - in stable/9/sys: amd64/conf i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 05:27:03 -0000 Author: bryanv Date: Tue Feb 26 05:27:02 2013 New Revision: 247306 URL: http://svnweb.freebsd.org/changeset/base/247306 Log: Complete MFC of r245362 Add VirtIO to i386 and amd64 GENERIC This completes the MFC of r245362 not was not done in r246885. 9-STABLE VirtIO should now match HEAD. Approved by: grehan Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/i386/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Tue Feb 26 05:12:25 2013 (r247305) +++ stable/9/sys/amd64/conf/GENERIC Tue Feb 26 05:27:02 2013 (r247306) @@ -341,3 +341,11 @@ device snd_hda # Intel High Definition device snd_ich # Intel, NVidia and other ICH AC'97 Audio device snd_uaudio # USB Audio device snd_via8233 # VIA VT8233x Audio + +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI Interface +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Tue Feb 26 05:12:25 2013 (r247305) +++ stable/9/sys/i386/conf/GENERIC Tue Feb 26 05:27:02 2013 (r247306) @@ -354,3 +354,11 @@ device snd_hda # Intel High Definition device snd_ich # Intel, NVidia and other ICH AC'97 Audio device snd_uaudio # USB Audio device snd_via8233 # VIA VT8233x Audio + +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI Interface +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 05:58:06 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9002224A; Tue, 26 Feb 2013 05:58:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5FAE1E97; Tue, 26 Feb 2013 05:58:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q5w6Zu085288; Tue, 26 Feb 2013 05:58:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q5w5EH085282; Tue, 26 Feb 2013 05:58:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302260558.r1Q5w5EH085282@svn.freebsd.org> From: Xin LI Date: Tue, 26 Feb 2013 05:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247309 - in stable/9: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/common/zfs sys/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 05:58:06 -0000 Author: delphij Date: Tue Feb 26 05:58:05 2013 New Revision: 247309 URL: http://svnweb.freebsd.org/changeset/base/247309 Log: MFC r246586,246587,246619,246624,246768,246808: LZ4 compression support in ZFS. (Note: sys/conf/files change omitted from this changeset). Added: stable/9/sys/cddl/boot/zfs/lz4.c - copied unchanged from r246586, head/sys/cddl/boot/zfs/lz4.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied, changed from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/9/sys/cddl/boot/zfs/README stable/9/sys/cddl/boot/zfs/zfsimpl.h stable/9/sys/cddl/boot/zfs/zfssubr.c stable/9/sys/cddl/compat/opensolaris/sys/byteorder.h stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/9/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 05:44:48 2013 (r247308) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 05:58:05 2013 (r247309) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -19,15 +19,16 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Bryan Drewery .\" Copyright (c) 2012, Glen Barber +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 10, 2013 .Dt ZFS 8 .Os .Sh NAME @@ -39,14 +40,12 @@ .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem .Nm .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Nm @@ -59,13 +58,13 @@ .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem@snapname Ns | Ns Ar volume@snapname .Nm .Cm rollback .Op Fl rRf @@ -73,8 +72,8 @@ .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Nm .Cm promote .Ar clone-filesystem @@ -102,31 +101,29 @@ .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... +.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set .Ar property Ns = Ns Ar value -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm upgrade .Op Fl v @@ -138,29 +135,25 @@ .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm mount .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Nm .Cm unmount @@ -192,63 +185,71 @@ .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm diff .Op Fl FHt @@ -860,7 +861,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .CM lzjb compression algorithm is optimized for performance while providing decent data @@ -888,6 +889,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. @@ -1384,8 +1405,8 @@ Displays a help message. .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem .Xc .Pp Creates a new @@ -1420,8 +1441,7 @@ options. .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Xc @@ -1521,7 +1541,7 @@ behavior for mounted file systems in use .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Xc .Pp @@ -1582,8 +1602,7 @@ behavior for mounted file systems in use .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem@snapname Ns | Ns volume@snapname .Xc .Pp @@ -1630,8 +1649,8 @@ option to force an unmount of any clone .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Xc .Pp Creates a clone of the given snapshot. See the @@ -1734,13 +1753,11 @@ only dataset that can be renamed recursi .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Lists the property information for the given datasets in tabular form. If @@ -1766,7 +1783,7 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n .It @@ -1790,7 +1807,7 @@ shortcut for specifying .Sy filesystem,volume syntax. .El -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1853,11 +1870,11 @@ section. .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Displays properties for the given datasets. If no datasets are specified, then @@ -1907,7 +1924,7 @@ omitted, and fields are explicitly separ arbitrary amount of space. .It Fl p Display numbers in parseable (exact) values. -.It Fl o Cm all | Ar field Ns Op , Ns Ar ... +.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . Default values are @@ -1915,7 +1932,7 @@ Default values are The keyword .Cm all specifies all columns. -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1923,7 +1940,7 @@ is one of For example, specifying .Fl t Cm snapshot displays only snapshots. -.It Fl s Ar source Ns Op , Ns Ar ... +.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: @@ -1935,7 +1952,7 @@ The default value is all sources. .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Clears the specified property, causing it to be inherited from an ancestor. If @@ -2010,12 +2027,10 @@ Upgrade the specified file system. .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2032,7 +2047,7 @@ Print numeric ID instead of user/group n Do not print headers, use tab-delimited output. .It Fl p Use exact (parsable) numeric output. -.It Fl o Ar field Ns Op , Ns Ar ... +.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. @@ -2047,7 +2062,7 @@ another. The default is .It Fl S Ar field Sort by this field in reverse order. See .Fl s . -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp @@ -2063,12 +2078,10 @@ Translate SID to POSIX ID. This flag cur .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2092,7 +2105,7 @@ file systems currently mounted. .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Xc .Pp @@ -2105,7 +2118,7 @@ Report mount progress. .It Fl O Perform an overlay mount. Overlay mounts are not supported on .Fx . -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the .Qq Sx Temporary Mount Point Properties @@ -2424,16 +2437,18 @@ for more information. .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2443,26 +2458,31 @@ administration permission for the file s .Bl -tag -width indent .It Xo .Op Fl ug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ... .Xc Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the .Fl ug options are specified, then the argument is interpreted preferentially as the -keyword "everyone", then as a user name, and lastly as a group name. To specify -a user or group named "everyone", use the +keyword +.Cm everyone , +then as a user name, and lastly as a group name. To specify +a user or group named +.Qq everyone , +use the .Fl u or .Fl g options. To specify a group with the same name as a user, use the .Fl g option. +.It Op Fl e Ns | Ns Cm everyone +Specifies that the permissions be delegated to +.Qq everyone . .It Xo -.Op Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Xc -Specifies that the permissions be delegated to "everyone". -Multiple permissions +The permissions to delegate. Multiple permissions may be specified as a comma-separated list. Permission names are the same as .Tn ZFS subcommand and property names. See the property list below. Property set names, @@ -2569,7 +2589,8 @@ protocol .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2580,7 +2601,8 @@ creator of any newly-created descendent .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2596,16 +2618,18 @@ and can be no more than 64 characters lo .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo @@ -2613,7 +2637,8 @@ and can be no more than 64 characters lo .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2622,10 +2647,12 @@ Removes permissions that were granted wi command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified -.Ar user , group , No or Ar everyone -are removed. Specifying "everyone" (or using the -.Fl e -option) only removes the permissions that were granted to "everyone", +.Ar user , group , No or everyone +are removed. Specifying +.Cm everyone +.Po or using the Fl e +option +.Pc only removes the permissions that were granted to everyone , not all permissions for every user and group. See the .Qq Nm Cm allow command for a description of the @@ -2641,7 +2668,8 @@ Recursively remove the permissions from .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2651,7 +2679,7 @@ then all permissions are removed, thus r .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Adds a single reference, named with the @@ -2672,7 +2700,7 @@ snapshots of all descendent file systems .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Xc .Pp Lists all existing user references for the given snapshot or snapshots. @@ -2685,7 +2713,7 @@ listing the holds on the named snapshot. .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Removes a single reference, named with the Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 05:44:48 2013 (r247308) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 05:58:05 2013 (r247309) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd Aug 28, 2012 +.Dd February 8, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -185,6 +186,49 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy lz4_compress +.Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" +.It GUID Ta org.illumos:lz4_compress +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +.Sy lz4 +is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older +.Sy lzjb +compression. +Typically, +.Sy lz4 +compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +.Sy lzjb . +It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. +.Pp +When the +.Sy lz4_compress +feature is set to +.Sy enabled , +the +administrator can turn on +.Sy lz4 +compression on any dataset on the +pool using the +.Xr zfs 8 +command. Please note that doing so will +immediately activate the +.Sy lz4_compress +feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the +.Sy lz4_compress +feature. At the +moment, this operation cannot be reversed. Booting off of +.Sy lz4 +-compressed root pools is supported. .El .Sh SEE ALSO .Xr zpool 8 Modified: stable/9/sys/cddl/boot/zfs/README ============================================================================== --- stable/9/sys/cddl/boot/zfs/README Tue Feb 26 05:44:48 2013 (r247308) +++ stable/9/sys/cddl/boot/zfs/README Tue Feb 26 05:58:05 2013 (r247309) @@ -5,6 +5,7 @@ are used by the ZFS bootstrap: fletcher.c checksum support sha256.c checksum support + lz4.c compression support lzjb.c compression support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout Copied: stable/9/sys/cddl/boot/zfs/lz4.c (from r246586, head/sys/cddl/boot/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/cddl/boot/zfs/lz4.c Tue Feb 26 05:58:05 2013 (r247309, copy of r246586, head/sys/cddl/boot/zfs/lz4.c) @@ -0,0 +1,308 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + * + * $FreeBSD$ + */ + +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); + +/* ARGSUSED */ +static int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dummy __unused) +{ + const uint8_t *src = s_start; + uint32_t bufsiz = htonl(*(uint32_t *)src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + 4 > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative). + */ + return (LZ4_uncompress_unknownOutputSize(s_start + 4, d_start, bufsiz, + d_len) < 0); +} + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +#else +#define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else + /* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ + | (((x) & 0xffu) << 8))) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 + +#define ML_BITS 4 +#define ML_MASK ((1U<> ML_BITS)) == RUN_MASK) { + int s = 255; + while ((ip < iend) && (s == 255)) { + s = *ip++; + length += s; + } + } + /* copy literals */ + cpy = op + length; + if ((cpy > oend - COPYLENGTH) || + (ip + length > iend - COPYLENGTH)) { + if (cpy > oend) + /* + * Error: request to write beyond destination + * buffer. + */ + goto _output_error; + if (ip + length > iend) + /* + * Error : request to read beyond source + * buffer. + */ + goto _output_error; + memcpy(op, ip, length); + op += length; + ip += length; + if (ip < iend) + /* Error : LZ4 format violation */ + goto _output_error; + /* Necessarily EOF, due to parsing restrictions. */ + break; + } + LZ4_WILDCOPY(ip, op, cpy); + ip -= (op - cpy); + op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); + ip += 2; + if (ref < (BYTE * const) dest) + /* + * Error: offset creates reference outside of + * destination buffer. + */ + goto _output_error; + + /* get matchlength */ + if ((length = (token & ML_MASK)) == ML_MASK) { + while (ip < iend) { + int s = *ip++; + length += s; + if (s == 255) + continue; + break; + } + } + /* copy repeated sequence */ + if unlikely(op - ref < STEPSIZE) { +#if LZ4_ARCH64 + size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; + size_t dec2 = dec2table[op - ref]; +#else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 06:01:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DC0634A0; Tue, 26 Feb 2013 06:01:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB717EBB; Tue, 26 Feb 2013 06:01:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q61xsI087654; Tue, 26 Feb 2013 06:01:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q61xPP087646; Tue, 26 Feb 2013 06:01:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302260601.r1Q61xPP087646@svn.freebsd.org> From: Xin LI Date: Tue, 26 Feb 2013 06:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247310 - in stable/8: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/common/zfs sys/... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 06:01:59 -0000 Author: delphij Date: Tue Feb 26 06:01:58 2013 New Revision: 247310 URL: http://svnweb.freebsd.org/changeset/base/247310 Log: MF9 r247309: MFC r246586,246587,246619,246624,246768,246808: LZ4 compression support in ZFS. (Note: sys/conf/files change omitted from this changeset). Added: stable/8/sys/cddl/boot/zfs/lz4.c - copied unchanged from r247309, stable/9/sys/cddl/boot/zfs/lz4.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/8/sys/cddl/boot/zfs/README stable/8/sys/cddl/boot/zfs/zfsimpl.h stable/8/sys/cddl/boot/zfs/zfssubr.c stable/8/sys/cddl/compat/opensolaris/sys/byteorder.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 06:01:58 2013 (r247310) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -19,14 +19,15 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 10, 2013 .Dt ZFS 8 .Os .Sh NAME @@ -38,14 +39,12 @@ .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem .Nm .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Nm @@ -58,13 +57,13 @@ .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem@snapname Ns | Ns Ar volume@snapname .Nm .Cm rollback .Op Fl rRf @@ -72,8 +71,8 @@ .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Nm .Cm promote .Ar clone-filesystem @@ -101,31 +100,29 @@ .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... +.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set .Ar property Ns = Ns Ar value -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm upgrade .Op Fl v @@ -137,29 +134,25 @@ .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm mount .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Nm .Cm unmount @@ -191,63 +184,71 @@ .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm diff .Op Fl FHt @@ -859,7 +860,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .CM lzjb compression algorithm is optimized for performance while providing decent data @@ -887,6 +888,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. @@ -1383,8 +1404,8 @@ Displays a help message. .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem .Xc .Pp Creates a new @@ -1419,8 +1440,7 @@ options. .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Xc @@ -1520,7 +1540,7 @@ behavior for mounted file systems in use .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Xc .Pp @@ -1581,8 +1601,7 @@ behavior for mounted file systems in use .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem@snapname Ns | Ns volume@snapname .Xc .Pp @@ -1629,8 +1648,8 @@ option to force an unmount of any clone .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Xc .Pp Creates a clone of the given snapshot. See the @@ -1733,13 +1752,11 @@ only dataset that can be renamed recursi .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Lists the property information for the given datasets in tabular form. If @@ -1765,7 +1782,7 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n .It @@ -1789,7 +1806,7 @@ shortcut for specifying .Sy filesystem,volume syntax. .El -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1852,11 +1869,11 @@ section. .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Displays properties for the given datasets. If no datasets are specified, then @@ -1906,7 +1923,7 @@ omitted, and fields are explicitly separ arbitrary amount of space. .It Fl p Display numbers in parseable (exact) values. -.It Fl o Cm all | Ar field Ns Op , Ns Ar ... +.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . Default values are @@ -1914,7 +1931,7 @@ Default values are The keyword .Cm all specifies all columns. -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1922,7 +1939,7 @@ is one of For example, specifying .Fl t Cm snapshot displays only snapshots. -.It Fl s Ar source Ns Op , Ns Ar ... +.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: @@ -1934,7 +1951,7 @@ The default value is all sources. .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Clears the specified property, causing it to be inherited from an ancestor. If @@ -2009,12 +2026,10 @@ Upgrade the specified file system. .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2031,7 +2046,7 @@ Print numeric ID instead of user/group n Do not print headers, use tab-delimited output. .It Fl p Use exact (parsable) numeric output. -.It Fl o Ar field Ns Op , Ns Ar ... +.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. @@ -2046,7 +2061,7 @@ another. The default is .It Fl S Ar field Sort by this field in reverse order. See .Fl s . -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp @@ -2062,12 +2077,10 @@ Translate SID to POSIX ID. This flag cur .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2091,7 +2104,7 @@ file systems currently mounted. .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Xc .Pp @@ -2104,7 +2117,7 @@ Report mount progress. .It Fl O Perform an overlay mount. Overlay mounts are not supported on .Fx . -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the .Qq Sx Temporary Mount Point Properties @@ -2423,16 +2436,18 @@ for more information. .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2442,26 +2457,31 @@ administration permission for the file s .Bl -tag -width indent .It Xo .Op Fl ug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ... .Xc Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the .Fl ug options are specified, then the argument is interpreted preferentially as the -keyword "everyone", then as a user name, and lastly as a group name. To specify -a user or group named "everyone", use the +keyword +.Cm everyone , +then as a user name, and lastly as a group name. To specify +a user or group named +.Qq everyone , +use the .Fl u or .Fl g options. To specify a group with the same name as a user, use the .Fl g option. +.It Op Fl e Ns | Ns Cm everyone +Specifies that the permissions be delegated to +.Qq everyone . .It Xo -.Op Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Xc -Specifies that the permissions be delegated to "everyone". -Multiple permissions +The permissions to delegate. Multiple permissions may be specified as a comma-separated list. Permission names are the same as .Tn ZFS subcommand and property names. See the property list below. Property set names, @@ -2568,7 +2588,8 @@ protocol .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2579,7 +2600,8 @@ creator of any newly-created descendent .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2595,16 +2617,18 @@ and can be no more than 64 characters lo .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo @@ -2612,7 +2636,8 @@ and can be no more than 64 characters lo .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2621,10 +2646,12 @@ Removes permissions that were granted wi command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified -.Ar user , group , No or Ar everyone -are removed. Specifying "everyone" (or using the -.Fl e -option) only removes the permissions that were granted to "everyone", +.Ar user , group , No or everyone +are removed. Specifying +.Cm everyone +.Po or using the Fl e +option +.Pc only removes the permissions that were granted to everyone , not all permissions for every user and group. See the .Qq Nm Cm allow command for a description of the @@ -2640,7 +2667,8 @@ Recursively remove the permissions from .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2650,7 +2678,7 @@ then all permissions are removed, thus r .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Adds a single reference, named with the @@ -2671,7 +2699,7 @@ snapshots of all descendent file systems .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Xc .Pp Lists all existing user references for the given snapshot or snapshots. @@ -2684,7 +2712,7 @@ listing the holds on the named snapshot. .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Removes a single reference, named with the Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 06:01:58 2013 (r247310) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd Aug 28, 2012 +.Dd February 8, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -185,6 +186,49 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy lz4_compress +.Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" +.It GUID Ta org.illumos:lz4_compress +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +.Sy lz4 +is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older +.Sy lzjb +compression. +Typically, +.Sy lz4 +compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +.Sy lzjb . +It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. +.Pp +When the +.Sy lz4_compress +feature is set to +.Sy enabled , +the +administrator can turn on +.Sy lz4 +compression on any dataset on the +pool using the +.Xr zfs 8 +command. Please note that doing so will +immediately activate the +.Sy lz4_compress +feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the +.Sy lz4_compress +feature. At the +moment, this operation cannot be reversed. Booting off of +.Sy lz4 +-compressed root pools is supported. .El .Sh SEE ALSO .Xr zpool 8 Modified: stable/8/sys/cddl/boot/zfs/README ============================================================================== --- stable/8/sys/cddl/boot/zfs/README Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/sys/cddl/boot/zfs/README Tue Feb 26 06:01:58 2013 (r247310) @@ -5,6 +5,7 @@ are used by the ZFS bootstrap: fletcher.c checksum support sha256.c checksum support + lz4.c compression support lzjb.c compression support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout Copied: stable/8/sys/cddl/boot/zfs/lz4.c (from r247309, stable/9/sys/cddl/boot/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/cddl/boot/zfs/lz4.c Tue Feb 26 06:01:58 2013 (r247310, copy of r247309, stable/9/sys/cddl/boot/zfs/lz4.c) @@ -0,0 +1,308 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + * + * $FreeBSD$ + */ + +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); + +/* ARGSUSED */ +static int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dummy __unused) +{ + const uint8_t *src = s_start; + uint32_t bufsiz = htonl(*(uint32_t *)src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + 4 > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative). + */ + return (LZ4_uncompress_unknownOutputSize(s_start + 4, d_start, bufsiz, + d_len) < 0); +} + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +#else +#define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else + /* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ + | (((x) & 0xffu) << 8))) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 + +#define ML_BITS 4 +#define ML_MASK ((1U<> ML_BITS)) == RUN_MASK) { + int s = 255; + while ((ip < iend) && (s == 255)) { + s = *ip++; + length += s; + } + } + /* copy literals */ + cpy = op + length; + if ((cpy > oend - COPYLENGTH) || + (ip + length > iend - COPYLENGTH)) { + if (cpy > oend) + /* + * Error: request to write beyond destination + * buffer. + */ + goto _output_error; + if (ip + length > iend) + /* + * Error : request to read beyond source + * buffer. + */ + goto _output_error; + memcpy(op, ip, length); + op += length; + ip += length; + if (ip < iend) + /* Error : LZ4 format violation */ + goto _output_error; + /* Necessarily EOF, due to parsing restrictions. */ + break; + } + LZ4_WILDCOPY(ip, op, cpy); + ip -= (op - cpy); + op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); + ip += 2; + if (ref < (BYTE * const) dest) + /* + * Error: offset creates reference outside of + * destination buffer. + */ + goto _output_error; + + /* get matchlength */ + if ((length = (token & ML_MASK)) == ML_MASK) { + while (ip < iend) { + int s = *ip++; + length += s; + if (s == 255) + continue; + break; + } + } + /* copy repeated sequence */ + if unlikely(op - ref < STEPSIZE) { +#if LZ4_ARCH64 + size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; + size_t dec2 = dec2table[op - ref]; +#else + const int dec2 = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 15:51:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EE10413A; Tue, 26 Feb 2013 15:51:47 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D1A4BB68; Tue, 26 Feb 2013 15:51:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QFplT6066402; Tue, 26 Feb 2013 15:51:47 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QFplDV066399; Tue, 26 Feb 2013 15:51:47 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201302261551.r1QFplDV066399@svn.freebsd.org> From: Andrew Gallatin Date: Tue, 26 Feb 2013 15:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247320 - in stable/9/sys: dev/mxge modules/mxge/mxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 15:51:48 -0000 Author: gallatin Date: Tue Feb 26 15:51:46 2013 New Revision: 247320 URL: http://svnweb.freebsd.org/changeset/base/247320 Log: MFC r247011: Add support to mxge for IPv6 TX csum offload & IPv6 TSO. Sponsored by: Myricom, Inc. Modified: stable/9/sys/dev/mxge/if_mxge.c stable/9/sys/dev/mxge/if_mxge_var.h stable/9/sys/modules/mxge/mxge/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/9/sys/dev/mxge/if_mxge.c Tue Feb 26 15:25:43 2013 (r247319) +++ stable/9/sys/dev/mxge/if_mxge.c Tue Feb 26 15:51:46 2013 (r247320) @@ -62,7 +62,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -91,6 +93,7 @@ __FBSDID("$FreeBSD$"); #endif #include "opt_inet.h" +#include "opt_inet6.h" /* tunable params */ static int mxge_nvidia_ecrc_enable = 1; @@ -1809,21 +1812,99 @@ mxge_submit_req(mxge_tx_ring_t *tx, mcp_ wmb(); } +static int +mxge_parse_tx(struct mxge_slice_state *ss, struct mbuf *m, + struct mxge_pkt_info *pi) +{ + struct ether_vlan_header *eh; + uint16_t etype; + int tso = m->m_pkthdr.csum_flags & (CSUM_TSO); +#if IFCAP_TSO6 && defined(INET6) + int nxt; +#endif + + eh = mtod(m, struct ether_vlan_header *); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + etype = ntohs(eh->evl_proto); + pi->ip_off = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + } else { + etype = ntohs(eh->evl_encap_proto); + pi->ip_off = ETHER_HDR_LEN; + } + + switch (etype) { + case ETHERTYPE_IP: + /* + * ensure ip header is in first mbuf, copy it to a + * scratch buffer if not + */ + pi->ip = (struct ip *)(m->m_data + pi->ip_off); + pi->ip6 = NULL; + if (__predict_false(m->m_len < pi->ip_off + sizeof(*pi->ip))) { + m_copydata(m, 0, pi->ip_off + sizeof(*pi->ip), + ss->scratch); + pi->ip = (struct ip *)(ss->scratch + pi->ip_off); + } + pi->ip_hlen = pi->ip->ip_hl << 2; + if (!tso) + return 0; + + if (__predict_false(m->m_len < pi->ip_off + pi->ip_hlen + + sizeof(struct tcphdr))) { + m_copydata(m, 0, pi->ip_off + pi->ip_hlen + + sizeof(struct tcphdr), ss->scratch); + pi->ip = (struct ip *)(ss->scratch + pi->ip_off); + } + pi->tcp = (struct tcphdr *)((char *)pi->ip + pi->ip_hlen); + break; +#if IFCAP_TSO6 && defined(INET6) + case ETHERTYPE_IPV6: + pi->ip6 = (struct ip6_hdr *)(m->m_data + pi->ip_off); + if (__predict_false(m->m_len < pi->ip_off + sizeof(*pi->ip6))) { + m_copydata(m, 0, pi->ip_off + sizeof(*pi->ip6), + ss->scratch); + pi->ip6 = (struct ip6_hdr *)(ss->scratch + pi->ip_off); + } + nxt = 0; + pi->ip_hlen = ip6_lasthdr(m, pi->ip_off, IPPROTO_IPV6, &nxt); + pi->ip_hlen -= pi->ip_off; + if (nxt != IPPROTO_TCP && nxt != IPPROTO_UDP) + return EINVAL; + + if (!tso) + return 0; + + if (pi->ip_off + pi->ip_hlen > ss->sc->max_tso6_hlen) + return EINVAL; + + if (__predict_false(m->m_len < pi->ip_off + pi->ip_hlen + + sizeof(struct tcphdr))) { + m_copydata(m, 0, pi->ip_off + pi->ip_hlen + + sizeof(struct tcphdr), ss->scratch); + pi->ip6 = (struct ip6_hdr *)(ss->scratch + pi->ip_off); + } + pi->tcp = (struct tcphdr *)((char *)pi->ip6 + pi->ip_hlen); + break; +#endif + default: + return EINVAL; + } + return 0; +} + #if IFCAP_TSO4 static void mxge_encap_tso(struct mxge_slice_state *ss, struct mbuf *m, - int busdma_seg_cnt, int ip_off) + int busdma_seg_cnt, struct mxge_pkt_info *pi) { mxge_tx_ring_t *tx; mcp_kreq_ether_send_t *req; bus_dma_segment_t *seg; - struct ip *ip; - struct tcphdr *tcp; uint32_t low, high_swapped; int len, seglen, cum_len, cum_len_next; int next_is_first, chop, cnt, rdma_count, small; - uint16_t pseudo_hdr_offset, cksum_offset, mss; + uint16_t pseudo_hdr_offset, cksum_offset, mss, sum; uint8_t flags, flags_next; static int once; @@ -1834,38 +1915,33 @@ mxge_encap_tso(struct mxge_slice_state * * header portion of the TSO packet. */ - /* ensure we have the ethernet, IP and TCP - header together in the first mbuf, copy - it to a scratch buffer if not */ - if (__predict_false(m->m_len < ip_off + sizeof (*ip))) { - m_copydata(m, 0, ip_off + sizeof (*ip), - ss->scratch); - ip = (struct ip *)(ss->scratch + ip_off); - } else { - ip = (struct ip *)(mtod(m, char *) + ip_off); - } - if (__predict_false(m->m_len < ip_off + (ip->ip_hl << 2) - + sizeof (*tcp))) { - m_copydata(m, 0, ip_off + (ip->ip_hl << 2) - + sizeof (*tcp), ss->scratch); - ip = (struct ip *)(mtod(m, char *) + ip_off); - } - - tcp = (struct tcphdr *)((char *)ip + (ip->ip_hl << 2)); - cum_len = -(ip_off + ((ip->ip_hl + tcp->th_off) << 2)); - cksum_offset = ip_off + (ip->ip_hl << 2); + cksum_offset = pi->ip_off + pi->ip_hlen; + cum_len = -(cksum_offset + (pi->tcp->th_off << 2)); /* TSO implies checksum offload on this hardware */ - if (__predict_false((m->m_pkthdr.csum_flags & (CSUM_TCP)) == 0)) { + if (__predict_false((m->m_pkthdr.csum_flags & (CSUM_TCP|CSUM_TCP_IPV6)) == 0)) { /* * If packet has full TCP csum, replace it with pseudo hdr * sum that the NIC expects, otherwise the NIC will emit * packets with bad TCP checksums. */ - m->m_pkthdr.csum_flags = CSUM_TCP; m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); - tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, - htons(IPPROTO_TCP + (m->m_pkthdr.len - cksum_offset))); + if (pi->ip6) { +#if (CSUM_TCP_IPV6 != 0) && defined(INET6) + m->m_pkthdr.csum_flags |= CSUM_TCP_IPV6; + sum = in6_cksum_pseudo(pi->ip6, + m->m_pkthdr.len - cksum_offset, + IPPROTO_TCP, 0); +#endif + } else { + m->m_pkthdr.csum_flags |= CSUM_TCP; + sum = in_pseudo(pi->ip->ip_src.s_addr, + pi->ip->ip_dst.s_addr, + htons(IPPROTO_TCP + (m->m_pkthdr.len - + cksum_offset))); + } + m_copyback(m, offsetof(struct tcphdr, th_sum) + + cksum_offset, sizeof(sum), (caddr_t)&sum); } flags = MXGEFW_FLAGS_TSO_HDR | MXGEFW_FLAGS_FIRST; @@ -1875,6 +1951,14 @@ mxge_encap_tso(struct mxge_slice_state * * the checksum by parsing the header. */ pseudo_hdr_offset = htobe16(mss); + if (pi->ip6) { + /* + * for IPv6 TSO, the "checksum offset" is re-purposed + * to store the TCP header len + */ + cksum_offset = (pi->tcp->th_off << 2); + } + tx = &ss->tx; req = tx->req_list; seg = tx->seg_list; @@ -1946,10 +2030,12 @@ mxge_encap_tso(struct mxge_slice_state * req++; cnt++; rdma_count++; - if (__predict_false(cksum_offset > seglen)) - cksum_offset -= seglen; - else - cksum_offset = 0; + if (cksum_offset != 0 && !pi->ip6) { + if (__predict_false(cksum_offset > seglen)) + cksum_offset -= seglen; + else + cksum_offset = 0; + } if (__predict_false(cnt > tx->max_desc)) goto drop; } @@ -2029,14 +2115,14 @@ mxge_vlan_tag_insert(struct mbuf *m) static void mxge_encap(struct mxge_slice_state *ss, struct mbuf *m) { + struct mxge_pkt_info pi = {0,0,0,0}; mxge_softc_t *sc; mcp_kreq_ether_send_t *req; bus_dma_segment_t *seg; struct mbuf *m_tmp; struct ifnet *ifp; mxge_tx_ring_t *tx; - struct ip *ip; - int cnt, cum_len, err, i, idx, odd_flag, ip_off; + int cnt, cum_len, err, i, idx, odd_flag; uint16_t pseudo_hdr_offset; uint8_t flags, cksum_offset; @@ -2045,15 +2131,19 @@ mxge_encap(struct mxge_slice_state *ss, ifp = sc->ifp; tx = &ss->tx; - ip_off = sizeof (struct ether_header); #ifdef MXGE_NEW_VLAN_API if (m->m_flags & M_VLANTAG) { m = mxge_vlan_tag_insert(m); if (__predict_false(m == NULL)) - goto drop; - ip_off += ETHER_VLAN_ENCAP_LEN; + goto drop_without_m; } #endif + if (m->m_pkthdr.csum_flags & + (CSUM_TSO | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) { + if (mxge_parse_tx(ss, m, &pi)) + goto drop; + } + /* (try to) map the frame for DMA */ idx = tx->req & tx->mask; err = bus_dmamap_load_mbuf_sg(tx->dmat, tx->info[idx].map, @@ -2085,7 +2175,7 @@ mxge_encap(struct mxge_slice_state *ss, #if IFCAP_TSO4 /* TSO is different enough, we handle it in another routine */ if (m->m_pkthdr.csum_flags & (CSUM_TSO)) { - mxge_encap_tso(ss, m, cnt, ip_off); + mxge_encap_tso(ss, m, cnt, &pi); return; } #endif @@ -2096,17 +2186,11 @@ mxge_encap(struct mxge_slice_state *ss, flags = MXGEFW_FLAGS_NO_TSO; /* checksum offloading? */ - if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA)) { + if (m->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) { /* ensure ip header is in first mbuf, copy it to a scratch buffer if not */ - if (__predict_false(m->m_len < ip_off + sizeof (*ip))) { - m_copydata(m, 0, ip_off + sizeof (*ip), - ss->scratch); - ip = (struct ip *)(ss->scratch + ip_off); - } else { - ip = (struct ip *)(mtod(m, char *) + ip_off); - } - cksum_offset = ip_off + (ip->ip_hl << 2); + cksum_offset = pi.ip_off + pi.ip_hlen; pseudo_hdr_offset = cksum_offset + m->m_pkthdr.csum_data; pseudo_hdr_offset = htobe16(pseudo_hdr_offset); req->cksum_offset = cksum_offset; @@ -2189,6 +2273,7 @@ mxge_encap(struct mxge_slice_state *ss, drop: m_freem(m); +drop_without_m: ss->oerrors++; return; } @@ -4125,8 +4210,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { ifp->if_capenable &= ~(IFCAP_TXCSUM|IFCAP_TSO4); - ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP - | CSUM_TSO); + ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP); } else { ifp->if_capenable |= IFCAP_TXCSUM; ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); @@ -4143,7 +4227,6 @@ mxge_ioctl(struct ifnet *ifp, u_long com if (mask & IFCAP_TSO4) { if (IFCAP_TSO4 & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_TSO4; - ifp->if_hwassist &= ~CSUM_TSO; } else if (IFCAP_TXCSUM & ifp->if_capenable) { ifp->if_capenable |= IFCAP_TSO4; ifp->if_hwassist |= CSUM_TSO; @@ -4153,6 +4236,43 @@ mxge_ioctl(struct ifnet *ifp, u_long com err = EINVAL; } } +#if IFCAP_TSO6 + if (mask & IFCAP_TXCSUM_IPV6) { + if (IFCAP_TXCSUM_IPV6 & ifp->if_capenable) { + ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 + | IFCAP_TSO6); + ifp->if_hwassist &= ~(CSUM_TCP_IPV6 + | CSUM_UDP); + } else { + ifp->if_capenable |= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist |= (CSUM_TCP_IPV6 + | CSUM_UDP_IPV6); + } +#ifdef NOTYET + } else if (mask & IFCAP_RXCSUM6) { + if (IFCAP_RXCSUM6 & ifp->if_capenable) { + ifp->if_capenable &= ~IFCAP_RXCSUM6; + sc->csum_flag = 0; + } else { + ifp->if_capenable |= IFCAP_RXCSUM6; + sc->csum_flag = 1; + } +#endif + } + if (mask & IFCAP_TSO6) { + if (IFCAP_TSO6 & ifp->if_capenable) { + ifp->if_capenable &= ~IFCAP_TSO6; + } else if (IFCAP_TXCSUM_IPV6 & ifp->if_capenable) { + ifp->if_capenable |= IFCAP_TSO6; + ifp->if_hwassist |= CSUM_TSO; + } else { + printf("mxge requires tx checksum offload" + " be enabled to use TSO\n"); + err = EINVAL; + } + } +#endif /*IFCAP_TSO6 */ + if (mask & IFCAP_LRO) { if (IFCAP_LRO & ifp->if_capenable) err = mxge_change_lro_locked(sc, 0); @@ -4645,6 +4765,7 @@ mxge_add_irq(mxge_softc_t *sc) static int mxge_attach(device_t dev) { + mxge_cmd_t cmd; mxge_softc_t *sc = device_get_softc(dev); struct ifnet *ifp; int err, rid; @@ -4775,7 +4896,7 @@ mxge_attach(device_t dev) ifp->if_baudrate = IF_Gbps(10UL); ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4 | - IFCAP_VLAN_MTU | IFCAP_LINKSTATE; + IFCAP_VLAN_MTU | IFCAP_LINKSTATE | IFCAP_TXCSUM_IPV6; #ifdef INET ifp->if_capabilities |= IFCAP_LRO; #endif @@ -4788,7 +4909,6 @@ mxge_attach(device_t dev) sc->fw_ver_tiny >= 32) ifp->if_capabilities |= IFCAP_VLAN_HWTSO; #endif - sc->max_mtu = mxge_max_mtu(sc); if (sc->max_mtu >= 9000) ifp->if_capabilities |= IFCAP_JUMBO_MTU; @@ -4797,6 +4917,14 @@ mxge_attach(device_t dev) "latest firmware for 9000 byte jumbo support\n", sc->max_mtu - ETHER_HDR_LEN); ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_TSO; + ifp->if_hwassist |= CSUM_TCP_IPV6 | CSUM_UDP_IPV6; + /* check to see if f/w supports TSO for IPv6 */ + if (!mxge_send_cmd(sc, MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE, &cmd)) { + if (CSUM_TCP_IPV6) + ifp->if_capabilities |= IFCAP_TSO6; + sc->max_tso6_hlen = min(cmd.data0, + sizeof (sc->ss[0].scratch)); + } ifp->if_capenable = ifp->if_capabilities; if (sc->lro_cnt == 0) ifp->if_capenable &= ~IFCAP_LRO; Modified: stable/9/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/9/sys/dev/mxge/if_mxge_var.h Tue Feb 26 15:25:43 2013 (r247319) +++ stable/9/sys/dev/mxge/if_mxge_var.h Tue Feb 26 15:51:46 2013 (r247320) @@ -50,6 +50,19 @@ $FreeBSD$ #define IFNET_BUF_RING 1 #endif +#if (__FreeBSD_version < 1000020) +#undef IF_Kbps +#undef IF_Mbps +#undef IF_Gbps +#define IF_Kbps(x) ((uintmax_t)(x) * 1000) /* kilobits/sec. */ +#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */ +#define IF_Gbps(x) (IF_Mbps((x) * 1000)) /* gigabits/sec. */ +static __inline void +if_initbaudrate(struct ifnet *ifp, uintmax_t baud) +{ + ifp->if_baudrate = baud; +} +#endif #ifndef VLAN_CAPABILITIES #define VLAN_CAPABILITIES(ifp) #define mxge_vlans_active(sc) (sc)->ifp->if_nvlans @@ -73,10 +86,33 @@ $FreeBSD$ #define IFCAP_TSO4 0 #endif +#ifndef IFCAP_TSO6 +#define IFCAP_TSO6 0 +#endif + +#ifndef IFCAP_TXCSUM_IPV6 +#define IFCAP_TXCSUM_IPV6 0 +#endif + +#ifndef IFCAP_RXCSUM_IPV6 +#define IFCAP_RXCSUM_IPV6 0 +#endif + #ifndef CSUM_TSO #define CSUM_TSO 0 #endif +#ifndef CSUM_TCP_IPV6 +#define CSUM_TCP_IPV6 0 +#endif + +#ifndef CSUM_UDP_IPV6 +#define CSUM_UDP_IPV6 0 +#endif + +#ifndef CSUM_DELAY_DATA_IPV6 +#define CSUM_DELAY_DATA_IPV6 0 +#endif typedef struct { void *addr; @@ -270,6 +306,7 @@ struct mxge_softc { int dying; int connector; int current_media; + int max_tso6_hlen; mxge_dma_t dmabench_dma; struct callout co_hdl; struct taskqueue *tq; @@ -312,6 +349,15 @@ struct mxge_media_type char *name; }; +struct mxge_pkt_info { + int ip_off; + int ip_hlen; + struct ip *ip; + struct ip6_hdr *ip6; + struct tcphdr *tcp; +}; + + /* implement our own memory barriers, since bus_space_barrier cannot handle write-combining regions */ Modified: stable/9/sys/modules/mxge/mxge/Makefile ============================================================================== --- stable/9/sys/modules/mxge/mxge/Makefile Tue Feb 26 15:25:43 2013 (r247319) +++ stable/9/sys/modules/mxge/mxge/Makefile Tue Feb 26 15:51:46 2013 (r247320) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../../dev/mxge KMOD= if_mxge -SRCS= if_mxge.c mxge_lro.c device_if.h bus_if.h pci_if.h opt_inet.h +SRCS= if_mxge.c mxge_lro.c device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h .include From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 16:55:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 841D9BB7; Tue, 26 Feb 2013 16:55:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 75EA3FA7; Tue, 26 Feb 2013 16:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QGtjMN085987; Tue, 26 Feb 2013 16:55:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QGtjc5085985; Tue, 26 Feb 2013 16:55:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302261655.r1QGtjc5085985@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 16:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247321 - in stable/9: etc/rc.d sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 16:55:45 -0000 Author: jhb Date: Tue Feb 26 16:55:44 2013 New Revision: 247321 URL: http://svnweb.freebsd.org/changeset/base/247321 Log: MFC 234927: - Don't log messages saying that accounting is being disabled and enabled if the accounting log file is atomically replaced with a new file (such as during log rotation). - Simplify accounting log rotation a bit. There is no need to re-run accton(8) after renaming the new log file to it's real name. PR: kern/167321 Modified: stable/9/etc/rc.d/accounting stable/9/sys/kern/kern_acct.c Directory Properties: stable/9/etc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/etc/rc.d/accounting ============================================================================== --- stable/9/etc/rc.d/accounting Tue Feb 26 15:51:46 2013 (r247320) +++ stable/9/etc/rc.d/accounting Tue Feb 26 16:55:44 2013 (r247321) @@ -65,9 +65,7 @@ accounting_rotate_log() mv ${accounting_file} ${accounting_file}.0 if checkyesno accounting_enable; then - ln $_file ${accounting_file##*/} - ${accounting_command} ${accounting_file} - unlink $_file + mv $_file ${accounting_file} fi } Modified: stable/9/sys/kern/kern_acct.c ============================================================================== --- stable/9/sys/kern/kern_acct.c Tue Feb 26 15:51:46 2013 (r247320) +++ stable/9/sys/kern/kern_acct.c Tue Feb 26 16:55:44 2013 (r247321) @@ -122,7 +122,7 @@ static uint32_t encode_timeval(struct ti static uint32_t encode_long(long); static void acctwatch(void); static void acct_thread(void *); -static int acct_disable(struct thread *); +static int acct_disable(struct thread *, int); /* * Accounting vnode pointer, saved vnode pointer, and flags for each. @@ -196,7 +196,7 @@ int sys_acct(struct thread *td, struct acct_args *uap) { struct nameidata nd; - int error, flags, vfslocked; + int error, flags, vfslocked, replacing; error = priv_check(td, PRIV_ACCT); if (error) @@ -246,6 +246,13 @@ sys_acct(struct thread *td, struct acct_ sx_xlock(&acct_sx); /* + * Don't log spurious disable/enable messages if we are + * switching from one accounting file to another due to log + * rotation. + */ + replacing = (acct_vp != NULL && uap->path != NULL); + + /* * If accounting was previously enabled, kill the old space-watcher, * close the file, and (if no new file was specified, leave). Reset * the suspended state regardless of whether accounting remains @@ -254,7 +261,7 @@ sys_acct(struct thread *td, struct acct_ acct_suspended = 0; if (acct_vp != NULL) { vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); - error = acct_disable(td); + error = acct_disable(td, !replacing); VFS_UNLOCK_GIANT(vfslocked); } if (uap->path == NULL) { @@ -299,7 +306,8 @@ sys_acct(struct thread *td, struct acct_ } acct_configured = 1; sx_xunlock(&acct_sx); - log(LOG_NOTICE, "Accounting enabled\n"); + if (!replacing) + log(LOG_NOTICE, "Accounting enabled\n"); return (error); } @@ -308,7 +316,7 @@ sys_acct(struct thread *td, struct acct_ * our reference to the credential, and clearing the vnode's flags. */ static int -acct_disable(struct thread *td) +acct_disable(struct thread *td, int logging) { int error; @@ -319,7 +327,8 @@ acct_disable(struct thread *td) acct_vp = NULL; acct_cred = NULL; acct_flags = 0; - log(LOG_NOTICE, "Accounting disabled\n"); + if (logging) + log(LOG_NOTICE, "Accounting disabled\n"); return (error); } @@ -574,7 +583,7 @@ acctwatch(void) */ vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); if (acct_vp->v_type == VBAD) { - (void) acct_disable(NULL); + (void) acct_disable(NULL, 1); VFS_UNLOCK_GIANT(vfslocked); acct_state |= ACCT_EXITREQ; return; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 16:56:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A0D8CD9; Tue, 26 Feb 2013 16:56:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C17EFAA; Tue, 26 Feb 2013 16:56:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QGu0n3086068; Tue, 26 Feb 2013 16:56:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QGtxdv086058; Tue, 26 Feb 2013 16:55:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302261655.r1QGtxdv086058@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 16:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247322 - in stable/8: etc/rc.d sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 16:56:00 -0000 Author: jhb Date: Tue Feb 26 16:55:59 2013 New Revision: 247322 URL: http://svnweb.freebsd.org/changeset/base/247322 Log: MFC 234927: - Don't log messages saying that accounting is being disabled and enabled if the accounting log file is atomically replaced with a new file (such as during log rotation). - Simplify accounting log rotation a bit. There is no need to re-run accton(8) after renaming the new log file to it's real name. PR: kern/167321 Modified: stable/8/etc/rc.d/accounting stable/8/sys/kern/kern_acct.c Directory Properties: stable/8/etc/ (props changed) stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/etc/rc.d/accounting ============================================================================== --- stable/8/etc/rc.d/accounting Tue Feb 26 16:55:44 2013 (r247321) +++ stable/8/etc/rc.d/accounting Tue Feb 26 16:55:59 2013 (r247322) @@ -65,9 +65,7 @@ accounting_rotate_log() mv ${accounting_file} ${accounting_file}.0 if checkyesno accounting_enable; then - ln $_file ${accounting_file##*/} - ${accounting_command} ${accounting_file} - unlink $_file + mv $_file ${accounting_file} fi } Modified: stable/8/sys/kern/kern_acct.c ============================================================================== --- stable/8/sys/kern/kern_acct.c Tue Feb 26 16:55:44 2013 (r247321) +++ stable/8/sys/kern/kern_acct.c Tue Feb 26 16:55:59 2013 (r247322) @@ -122,7 +122,7 @@ static uint32_t encode_timeval(struct ti static uint32_t encode_long(long); static void acctwatch(void); static void acct_thread(void *); -static int acct_disable(struct thread *); +static int acct_disable(struct thread *, int); /* * Accounting vnode pointer, saved vnode pointer, and flags for each. @@ -196,7 +196,7 @@ int acct(struct thread *td, struct acct_args *uap) { struct nameidata nd; - int error, flags, vfslocked; + int error, flags, vfslocked, replacing; error = priv_check(td, PRIV_ACCT); if (error) @@ -246,6 +246,13 @@ acct(struct thread *td, struct acct_args sx_xlock(&acct_sx); /* + * Don't log spurious disable/enable messages if we are + * switching from one accounting file to another due to log + * rotation. + */ + replacing = (acct_vp != NULL && uap->path != NULL); + + /* * If accounting was previously enabled, kill the old space-watcher, * close the file, and (if no new file was specified, leave). Reset * the suspended state regardless of whether accounting remains @@ -254,7 +261,7 @@ acct(struct thread *td, struct acct_args acct_suspended = 0; if (acct_vp != NULL) { vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); - error = acct_disable(td); + error = acct_disable(td, !replacing); VFS_UNLOCK_GIANT(vfslocked); } if (uap->path == NULL) { @@ -299,7 +306,8 @@ acct(struct thread *td, struct acct_args } acct_configured = 1; sx_xunlock(&acct_sx); - log(LOG_NOTICE, "Accounting enabled\n"); + if (!replacing) + log(LOG_NOTICE, "Accounting enabled\n"); return (error); } @@ -308,7 +316,7 @@ acct(struct thread *td, struct acct_args * our reference to the credential, and clearing the vnode's flags. */ static int -acct_disable(struct thread *td) +acct_disable(struct thread *td, int logging) { int error; @@ -319,7 +327,8 @@ acct_disable(struct thread *td) acct_vp = NULL; acct_cred = NULL; acct_flags = 0; - log(LOG_NOTICE, "Accounting disabled\n"); + if (logging) + log(LOG_NOTICE, "Accounting disabled\n"); return (error); } @@ -574,7 +583,7 @@ acctwatch(void) */ vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); if (acct_vp->v_type == VBAD) { - (void) acct_disable(NULL); + (void) acct_disable(NULL, 1); VFS_UNLOCK_GIANT(vfslocked); acct_state |= ACCT_EXITREQ; return; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 18:19:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CAB222B9; Tue, 26 Feb 2013 18:19:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AD7E515D3; Tue, 26 Feb 2013 18:19:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QIJqto011738; Tue, 26 Feb 2013 18:19:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QIJq1W011734; Tue, 26 Feb 2013 18:19:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302261819.r1QIJq1W011734@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 18:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247331 - stable/9/sys/dev/twe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 18:19:52 -0000 Author: jhb Date: Tue Feb 26 18:19:51 2013 New Revision: 247331 URL: http://svnweb.freebsd.org/changeset/base/247331 Log: MFC 239244,240137,240209: Add locking to the twe(4) driver and make it MPSAFE. Modified: stable/9/sys/dev/twe/twe.c stable/9/sys/dev/twe/twe_compat.h stable/9/sys/dev/twe/twe_freebsd.c stable/9/sys/dev/twe/twevar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/twe/twe.c ============================================================================== --- stable/9/sys/dev/twe/twe.c Tue Feb 26 18:18:39 2013 (r247330) +++ stable/9/sys/dev/twe/twe.c Tue Feb 26 18:19:51 2013 (r247331) @@ -68,7 +68,7 @@ static int twe_del_unit(struct twe_softc /* * Command I/O to controller. */ -static void twe_done(struct twe_softc *sc); +static void twe_done(struct twe_softc *sc, int startio); static void twe_complete(struct twe_softc *sc); static int twe_wait_status(struct twe_softc *sc, u_int32_t status, int timeout); static int twe_drain_response_queue(struct twe_softc *sc); @@ -151,8 +151,11 @@ twe_setup(struct twe_softc *sc) /* * Put command onto the freelist. */ + TWE_IO_LOCK(sc); twe_release_request(tr); + TWE_IO_UNLOCK(sc); } + TWE_IO_LOCK(sc); /* * Check status register for errors, clear them. @@ -164,6 +167,7 @@ twe_setup(struct twe_softc *sc) * Wait for the controller to come ready. */ if (twe_wait_status(sc, TWE_STATUS_MICROCONTROLLER_READY, 60)) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "microcontroller not ready\n"); return(ENXIO); } @@ -185,6 +189,7 @@ twe_setup(struct twe_softc *sc) if (!twe_soft_reset(sc)) break; /* reset process complete */ } + TWE_IO_UNLOCK(sc); /* did we give up? */ if (i >= TWE_MAX_RESET_TRIES) { twe_printf(sc, "can't initialise controller, giving up\n"); @@ -203,14 +208,17 @@ twe_add_unit(struct twe_softc *sc, int u TWE_Param *drives = NULL, *param = NULL; TWE_Array_Descriptor *ud; + TWE_CONFIG_ASSERT_LOCKED(sc); if (unit < 0 || unit > TWE_MAX_UNITS) return (EINVAL); /* * The controller is in a safe state, so try to find drives attached to it. */ + TWE_IO_LOCK(sc); if ((drives = twe_get_param(sc, TWE_PARAM_UNITSUMMARY, TWE_PARAM_UNITSUMMARY_Status, TWE_MAX_UNITS, NULL)) == NULL) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "can't detect attached units\n"); return (EIO); } @@ -218,6 +226,7 @@ twe_add_unit(struct twe_softc *sc, int u dr = &sc->twe_drive[unit]; /* check that the drive is online */ if (!(drives->data[unit] & TWE_PARAM_UNITSTATUS_Online)) { + TWE_IO_UNLOCK(sc); error = ENXIO; goto out; } @@ -225,21 +234,25 @@ twe_add_unit(struct twe_softc *sc, int u table = TWE_PARAM_UNITINFO + unit; if (twe_get_param_4(sc, table, TWE_PARAM_UNITINFO_Capacity, &dr->td_size)) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "error fetching capacity for unit %d\n", unit); error = EIO; goto out; } if (twe_get_param_1(sc, table, TWE_PARAM_UNITINFO_Status, &dr->td_state)) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "error fetching state for unit %d\n", unit); error = EIO; goto out; } if (twe_get_param_2(sc, table, TWE_PARAM_UNITINFO_DescriptorSize, &dsize)) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "error fetching descriptor size for unit %d\n", unit); error = EIO; goto out; } if ((param = twe_get_param(sc, table, TWE_PARAM_UNITINFO_Descriptor, dsize - 3, NULL)) == NULL) { + TWE_IO_UNLOCK(sc); twe_printf(sc, "error fetching descriptor for unit %d\n", unit); error = EIO; goto out; @@ -258,6 +271,7 @@ twe_add_unit(struct twe_softc *sc, int u } dr->td_cylinders = dr->td_size / (dr->td_heads * dr->td_sectors); dr->td_twe_unit = unit; + TWE_IO_UNLOCK(sc); error = twe_attach_drive(sc, dr); @@ -274,6 +288,7 @@ twe_del_unit(struct twe_softc *sc, int u { int error; + TWE_CONFIG_ASSERT_LOCKED(sc); if (unit < 0 || unit >= TWE_MAX_UNITS) return (ENXIO); @@ -295,12 +310,15 @@ twe_init(struct twe_softc *sc) /* * Scan for drives */ + TWE_CONFIG_LOCK(sc); for (i = 0; i < TWE_MAX_UNITS; i++) twe_add_unit(sc, i); + TWE_CONFIG_UNLOCK(sc); /* * Initialise connection with controller. */ + TWE_IO_LOCK(sc); twe_init_connection(sc, TWE_INIT_MESSAGE_CREDITS); #ifdef TWE_SHUTDOWN_NOTIFICATION @@ -319,6 +337,7 @@ twe_init(struct twe_softc *sc) * Finally enable interrupts. */ twe_enable_interrupts(sc); + TWE_IO_UNLOCK(sc); } /******************************************************************************** @@ -330,6 +349,7 @@ twe_deinit(struct twe_softc *sc) /* * Mark the controller as shutting down, and disable any further interrupts. */ + TWE_IO_ASSERT_LOCKED(sc); sc->twe_state |= TWE_STATE_SHUTDOWN; twe_disable_interrupts(sc); @@ -368,7 +388,7 @@ twe_intr(struct twe_softc *sc) if (status_reg & TWE_STATUS_COMMAND_INTERRUPT) twe_command_intr(sc); if (status_reg & TWE_STATUS_RESPONSE_INTERRUPT) - twe_done(sc); + twe_done(sc, 1); }; /******************************************************************************** @@ -380,11 +400,12 @@ twe_startio(struct twe_softc *sc) { struct twe_request *tr; TWE_Command *cmd; - twe_bio *bp; + struct bio *bp; int error; debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); if (sc->twe_state & (TWE_STATE_CTLR_BUSY | TWE_STATE_FRZN)) return; @@ -410,10 +431,10 @@ twe_startio(struct twe_softc *sc) /* connect the bio to the command */ tr->tr_complete = twe_completeio; tr->tr_private = bp; - tr->tr_data = TWE_BIO_DATA(bp); - tr->tr_length = TWE_BIO_LENGTH(bp); + tr->tr_data = bp->bio_data; + tr->tr_length = bp->bio_bcount; cmd = TWE_FIND_COMMAND(tr); - if (TWE_BIO_IS_READ(bp)) { + if (bp->bio_cmd == BIO_READ) { tr->tr_flags |= TWE_CMD_DATAIN; cmd->io.opcode = TWE_OP_READ; } else { @@ -423,9 +444,9 @@ twe_startio(struct twe_softc *sc) /* build a suitable I/O command (assumes 512-byte rounded transfers) */ cmd->io.size = 3; - cmd->io.unit = TWE_BIO_UNIT(bp); + cmd->io.unit = *(int *)(bp->bio_driver1); cmd->io.block_count = (tr->tr_length + TWE_BLOCK_SIZE - 1) / TWE_BLOCK_SIZE; - cmd->io.lba = TWE_BIO_LBA(bp); + cmd->io.lba = bp->bio_pblkno; } /* did we find something to do? */ @@ -440,8 +461,9 @@ twe_startio(struct twe_softc *sc) break; tr->tr_status = TWE_CMD_ERROR; if (tr->tr_private != NULL) { - bp = (twe_bio *)(tr->tr_private); - TWE_BIO_SET_ERROR(bp, error); + bp = (struct bio *)(tr->tr_private); + bp->bio_error = error; + bp->bio_flags |= BIO_ERROR; tr->tr_private = NULL; twed_intr(bp); twe_release_request(tr); @@ -500,15 +522,32 @@ twe_ioctl(struct twe_softc *sc, u_long i u_int16_t *aen_code = (u_int16_t *)addr; struct twe_request *tr; u_int8_t srid; - int s, error; + int error; + size_t tr_length; error = 0; switch(ioctlcmd) { /* handle a command from userspace */ case TWEIO_COMMAND: + /* + * if there's a data buffer, allocate and copy it in. + * Must be in multipled of 512 bytes. + */ + tr_length = roundup2(tu->tu_size, 512); + if (tr_length > 0) { + data = malloc(tr_length, M_DEVBUF, M_WAITOK); + error = copyin(tu->tu_data, data, tu->tu_size); + if (error) { + free(data, M_DEVBUF); + break; + } + } else + data = NULL; + /* get a request */ + TWE_IO_LOCK(sc); while (twe_get_request(sc, &tr)) - tsleep(sc, PPAUSE, "twioctl", hz); + mtx_sleep(sc, &sc->twe_io_lock, PPAUSE, "twioctl", hz); /* * Save the command's request ID, copy the user-supplied command in, @@ -519,23 +558,15 @@ twe_ioctl(struct twe_softc *sc, u_long i bcopy(&tu->tu_command, cmd, sizeof(TWE_Command)); cmd->generic.request_id = srid; - /* - * if there's a data buffer, allocate and copy it in. - * Must be in multipled of 512 bytes. - */ - tr->tr_length = (tu->tu_size + 511) & ~511; + tr->tr_length = tr_length; + tr->tr_data = data; if (tr->tr_length > 0) { - if ((tr->tr_data = malloc(tr->tr_length, M_DEVBUF, M_WAITOK)) == NULL) { - error = ENOMEM; - goto cmd_done; - } - if ((error = copyin(tu->tu_data, tr->tr_data, tu->tu_size)) != 0) - goto cmd_done; tr->tr_flags |= TWE_CMD_DATAIN | TWE_CMD_DATAOUT; } /* run the command */ error = twe_wait_request(tr); + TWE_IO_UNLOCK(sc); if (error) goto cmd_done; @@ -550,8 +581,9 @@ twe_ioctl(struct twe_softc *sc, u_long i /* free resources */ if (tr->tr_data != NULL) free(tr->tr_data, M_DEVBUF); - if (tr != NULL) - twe_release_request(tr); + TWE_IO_LOCK(sc); + twe_release_request(tr); + TWE_IO_UNLOCK(sc); break; @@ -564,7 +596,9 @@ twe_ioctl(struct twe_softc *sc, u_long i case TWEQ_READY: case TWEQ_BUSY: case TWEQ_COMPLETE: + TWE_IO_LOCK(sc); bcopy(&sc->twe_qstat[ts->ts_item], &ts->ts_qstat, sizeof(struct twe_qstat)); + TWE_IO_UNLOCK(sc); break; #endif default: @@ -575,22 +609,28 @@ twe_ioctl(struct twe_softc *sc, u_long i /* poll for an AEN */ case TWEIO_AEN_POLL: + TWE_IO_LOCK(sc); *aen_code = twe_dequeue_aen(sc); + TWE_IO_UNLOCK(sc); break; /* wait for another AEN to show up */ case TWEIO_AEN_WAIT: - s = splbio(); + TWE_IO_LOCK(sc); while ((*aen_code = twe_dequeue_aen(sc)) == TWE_AEN_QUEUE_EMPTY) { - error = tsleep(&sc->twe_aen_queue, PRIBIO | PCATCH, "tweaen", 0); + error = mtx_sleep(&sc->twe_aen_queue, &sc->twe_io_lock, PRIBIO | PCATCH, + "tweaen", 0); if (error == EINTR) break; } - splx(s); + TWE_IO_UNLOCK(sc); break; case TWEIO_GET_PARAM: - if ((param = twe_get_param(sc, tp->tp_table_id, tp->tp_param_id, tp->tp_size, NULL)) == NULL) { + TWE_IO_LOCK(sc); + param = twe_get_param(sc, tp->tp_table_id, tp->tp_param_id, tp->tp_size, NULL); + TWE_IO_UNLOCK(sc); + if (param == NULL) { twe_printf(sc, "TWEIO_GET_PARAM failed for 0x%x/0x%x/%d\n", tp->tp_table_id, tp->tp_param_id, tp->tp_size); error = EINVAL; @@ -607,26 +647,32 @@ twe_ioctl(struct twe_softc *sc, u_long i break; case TWEIO_SET_PARAM: - if ((data = malloc(tp->tp_size, M_DEVBUF, M_WAITOK)) == NULL) { - error = ENOMEM; - } else { - error = copyin(tp->tp_data, data, tp->tp_size); - if (error == 0) - error = twe_set_param(sc, tp->tp_table_id, tp->tp_param_id, tp->tp_size, data); - free(data, M_DEVBUF); + data = malloc(tp->tp_size, M_DEVBUF, M_WAITOK); + error = copyin(tp->tp_data, data, tp->tp_size); + if (error == 0) { + TWE_IO_LOCK(sc); + error = twe_set_param(sc, tp->tp_table_id, tp->tp_param_id, tp->tp_size, data); + TWE_IO_UNLOCK(sc); } + free(data, M_DEVBUF); break; case TWEIO_RESET: + TWE_IO_LOCK(sc); twe_reset(sc); + TWE_IO_UNLOCK(sc); break; case TWEIO_ADD_UNIT: + TWE_CONFIG_LOCK(sc); error = twe_add_unit(sc, td->td_unit); + TWE_CONFIG_UNLOCK(sc); break; case TWEIO_DEL_UNIT: + TWE_CONFIG_LOCK(sc); error = twe_del_unit(sc, td->td_unit); + TWE_CONFIG_UNLOCK(sc); break; /* XXX implement ATA PASSTHROUGH */ @@ -724,6 +770,7 @@ twe_get_param(struct twe_softc *sc, int debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); tr = NULL; param = NULL; @@ -817,6 +864,7 @@ twe_set_param(struct twe_softc *sc, int debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); tr = NULL; param = NULL; error = ENOMEM; @@ -874,6 +922,8 @@ twe_init_connection(struct twe_softc *sc debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); + /* get a command */ if (twe_get_request(sc, &tr)) return(0); @@ -903,18 +953,16 @@ twe_init_connection(struct twe_softc *sc static int twe_wait_request(struct twe_request *tr) { - int s; debug_called(4); + TWE_IO_ASSERT_LOCKED(tr->tr_sc); tr->tr_flags |= TWE_CMD_SLEEPER; tr->tr_status = TWE_CMD_BUSY; twe_enqueue_ready(tr); twe_startio(tr->tr_sc); - s = splbio(); while (tr->tr_status == TWE_CMD_BUSY) - tsleep(tr, PRIBIO, "twewait", 0); - splx(s); + mtx_sleep(tr, &tr->tr_sc->twe_io_lock, PRIBIO, "twewait", 0); return(tr->tr_status != TWE_CMD_COMPLETE); } @@ -949,7 +997,7 @@ twe_immediate_request(struct twe_request /* Wait up to 5 seconds for the command to complete */ while ((count++ < 5000) && (tr->tr_status == TWE_CMD_BUSY)){ DELAY(1000); - twe_done(sc); + twe_done(sc, 1); } if (usetmp && (tr->tr_data != NULL)) bcopy(sc->twe_immediate, tr->tr_data, tr->tr_length); @@ -965,15 +1013,17 @@ twe_completeio(struct twe_request *tr) { TWE_Command *cmd = TWE_FIND_COMMAND(tr); struct twe_softc *sc = tr->tr_sc; - twe_bio *bp = (twe_bio *)tr->tr_private; + struct bio *bp = tr->tr_private; debug_called(4); if (tr->tr_status == TWE_CMD_COMPLETE) { if (cmd->generic.status) - if (twe_report_request(tr)) - TWE_BIO_SET_ERROR(bp, EIO); + if (twe_report_request(tr)) { + bp->bio_error = EIO; + bp->bio_flags |= BIO_ERROR; + } } else { twe_panic(sc, "twe_completeio on incomplete command"); @@ -991,12 +1041,12 @@ static void twe_reset(struct twe_softc *sc) { struct twe_request *tr; - int i, s; + int i; /* * Sleep for a short period to allow AENs to be signalled. */ - tsleep(sc, PRIBIO, "twereset", hz); + mtx_sleep(sc, &sc->twe_io_lock, PRIBIO, "twereset", hz); /* * Disable interrupts from the controller, and mask any accidental entry @@ -1004,7 +1054,6 @@ twe_reset(struct twe_softc *sc) */ twe_printf(sc, "controller reset in progress...\n"); twe_disable_interrupts(sc); - s = splbio(); /* * Try to soft-reset the controller. @@ -1036,11 +1085,9 @@ twe_reset(struct twe_softc *sc) * Kick the controller to start things going again, then re-enable interrupts. */ twe_startio(sc); - twe_enable_interrupts(sc); twe_printf(sc, "controller reset done, %d commands restarted\n", i); out: - splx(s); twe_enable_interrupts(sc); } @@ -1060,11 +1107,14 @@ twe_start(struct twe_request *tr) { struct twe_softc *sc = tr->tr_sc; TWE_Command *cmd; - int i, s, done; + int i; u_int32_t status_reg; debug_called(4); + if (!dumping) + TWE_IO_ASSERT_LOCKED(sc); + /* mark the command as currently being processed */ tr->tr_status = TWE_CMD_BUSY; cmd = TWE_FIND_COMMAND(tr); @@ -1075,8 +1125,7 @@ twe_start(struct twe_request *tr) * XXX it might be more efficient to return EBUSY immediately * and let the command be rescheduled. */ - for (i = 100000, done = 0; (i > 0) && !done; i--) { - s = splbio(); + for (i = 100000; (i > 0); i--) { /* check to see if we can post a command */ status_reg = TWE_STATUS(sc); @@ -1086,7 +1135,7 @@ twe_start(struct twe_request *tr) twe_enqueue_busy(tr); TWE_COMMAND_QUEUE(sc, TWE_FIND_COMMANDPHYS(tr)); - done = 1; + /* move command to work queue */ #ifdef TWE_DEBUG if (tr->tr_complete != NULL) { @@ -1097,14 +1146,11 @@ twe_start(struct twe_request *tr) debug(3, "queued request %d for polling caller", cmd->generic.request_id); } #endif - } - splx(s); /* drop spl to allow completion interrupts */ + return(0); + } else if (!(status_reg & TWE_STATUS_RESPONSE_QUEUE_EMPTY) && i > 1) + twe_done(sc, 0); } - /* command is enqueued */ - if (done) - return(0); - /* * We couldn't get the controller to take the command; try submitting it again later. * This should only happen if something is wrong with the controller, or if we have @@ -1120,19 +1166,18 @@ twe_start(struct twe_request *tr) * Can be called at any interrupt level, with or without interrupts enabled. */ static void -twe_done(struct twe_softc *sc) +twe_done(struct twe_softc *sc, int startio) { TWE_Response_Queue rq; TWE_Command *cmd; struct twe_request *tr; - int s, found; + int found; u_int32_t status_reg; debug_called(5); /* loop collecting completed commands */ found = 0; - s = splbio(); for (;;) { status_reg = TWE_STATUS(sc); twe_check_bits(sc, status_reg); /* XXX should this fail? */ @@ -1155,10 +1200,9 @@ twe_done(struct twe_softc *sc) break; /* no response ready */ } } - splx(s); /* if we've completed any commands, try posting some more */ - if (found) + if (found && startio) twe_startio(sc); /* handle completion and timeouts */ @@ -1259,6 +1303,7 @@ twe_soft_reset(struct twe_softc *sc) debug_called(2); + TWE_IO_ASSERT_LOCKED(sc); TWE_SOFT_RESET(sc); if (twe_wait_status(sc, TWE_STATUS_ATTENTION_INTERRUPT, 30)) { @@ -1396,6 +1441,7 @@ twe_drain_aen_queue(struct twe_softc *sc { u_int16_t aen; + TWE_IO_ASSERT_LOCKED(sc); for (;;) { if (twe_get_param_2(sc, TWE_PARAM_AEN, TWE_PARAM_AEN_UnitCode, &aen)) return(1); @@ -1417,14 +1463,14 @@ static void twe_enqueue_aen(struct twe_softc *sc, u_int16_t aen) { char *msg; - int s, next, nextnext; + int next, nextnext; debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); if ((msg = twe_format_aen(sc, aen)) != NULL) twe_printf(sc, "AEN: <%s>\n", msg); - s = splbio(); /* enqueue the AEN */ next = ((sc->twe_aen_head + 1) % TWE_Q_LENGTH); nextnext = ((sc->twe_aen_head + 2) % TWE_Q_LENGTH); @@ -1447,7 +1493,6 @@ twe_enqueue_aen(struct twe_softc *sc, u_ sc->twe_wait_aen = -1; wakeup(&sc->twe_wait_aen); } - splx(s); } /******************************************************************************** @@ -1462,6 +1507,7 @@ twe_dequeue_aen(struct twe_softc *sc) debug_called(4); + TWE_IO_ASSERT_LOCKED(sc); if (sc->twe_aen_tail == sc->twe_aen_head) { result = TWE_AEN_QUEUE_EMPTY; } else { @@ -1479,15 +1525,13 @@ twe_dequeue_aen(struct twe_softc *sc) static int twe_find_aen(struct twe_softc *sc, u_int16_t aen) { - int i, s, missing; + int i, missing; missing = 1; - s = splbio(); for (i = sc->twe_aen_tail; (i != sc->twe_aen_head) && missing; i = (i + 1) % TWE_Q_LENGTH) { if (sc->twe_aen_queue[i] == aen) missing = 0; } - splx(s); return(missing); } @@ -1504,22 +1548,20 @@ static int twe_wait_aen(struct twe_softc *sc, int aen, int timeout) { time_t expiry; - int found, s; + int found; debug_called(4); expiry = time_second + timeout; found = 0; - s = splbio(); sc->twe_wait_aen = aen; do { twe_fetch_aen(sc); - tsleep(&sc->twe_wait_aen, PZERO, "twewaen", hz); + mtx_sleep(&sc->twe_wait_aen, &sc->twe_io_lock, PZERO, "twewaen", hz); if (sc->twe_wait_aen == -1) found = 1; } while ((time_second <= expiry) && !found); - splx(s); return(!found); } #endif @@ -1541,6 +1583,9 @@ twe_get_request(struct twe_softc *sc, st TWE_Command *cmd; debug_called(4); + if (!dumping) + TWE_IO_ASSERT_LOCKED(sc); + /* try to reuse an old buffer */ *tr = twe_dequeue_free(sc); @@ -1567,6 +1612,8 @@ twe_release_request(struct twe_request * { debug_called(4); + if (!dumping) + TWE_IO_ASSERT_LOCKED(tr->tr_sc); if (tr->tr_private != NULL) twe_panic(tr->tr_sc, "tr_private != NULL"); twe_enqueue_free(tr); @@ -1591,6 +1638,8 @@ twe_describe_controller(struct twe_softc debug_called(2); + TWE_IO_LOCK(sc); + /* get the port count */ twe_get_param_1(sc, TWE_PARAM_CONTROLLER, TWE_PARAM_CONTROLLER_PortCount, &ports); @@ -1641,6 +1690,7 @@ twe_describe_controller(struct twe_softc if (p[0]) free(p[0], M_DEVBUF); } + TWE_IO_UNLOCK(sc); } /******************************************************************************** @@ -1722,7 +1772,6 @@ twe_check_bits(struct twe_softc *sc, u_i static char * twe_format_aen(struct twe_softc *sc, u_int16_t aen) { - static char buf[80]; device_t child; char *code, *msg; @@ -1739,25 +1788,28 @@ twe_format_aen(struct twe_softc *sc, u_i case 'c': if ((child = sc->twe_drive[TWE_AEN_UNIT(aen)].td_disk) != NULL) { - sprintf(buf, "twed%d: %s", device_get_unit(child), msg); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), "twed%d: %s", + device_get_unit(child), msg); } else { - sprintf(buf, "twe%d: %s for unknown unit %d", device_get_unit(sc->twe_dev), - msg, TWE_AEN_UNIT(aen)); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), + "twe%d: %s for unknown unit %d", device_get_unit(sc->twe_dev), + msg, TWE_AEN_UNIT(aen)); } - return(buf); + return(sc->twe_aen_buf); case 'p': - sprintf(buf, "twe%d: port %d: %s", device_get_unit(sc->twe_dev), TWE_AEN_UNIT(aen), - msg); - return(buf); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), + "twe%d: port %d: %s", device_get_unit(sc->twe_dev), + TWE_AEN_UNIT(aen), msg); + return(sc->twe_aen_buf); case 'x': default: break; } - sprintf(buf, "unknown AEN 0x%x", aen); - return(buf); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), "unknown AEN 0x%x", aen); + return(sc->twe_aen_buf); } /******************************************************************************** Modified: stable/9/sys/dev/twe/twe_compat.h ============================================================================== --- stable/9/sys/dev/twe/twe_compat.h Tue Feb 26 18:18:39 2013 (r247330) +++ stable/9/sys/dev/twe/twe_compat.h Tue Feb 26 18:19:51 2013 (r247331) @@ -43,9 +43,13 @@ #include #include #include +#include #include +#include #include +#include +#include #include #include #include @@ -58,6 +62,8 @@ #include #include +#include + #define TWE_DRIVER_NAME twe #define TWED_DRIVER_NAME twed #define TWE_MALLOC_CLASS M_TWE @@ -65,10 +71,10 @@ /* * Wrappers for bus-space actions */ -#define TWE_CONTROL(sc, val) bus_space_write_4((sc)->twe_btag, (sc)->twe_bhandle, 0x0, (u_int32_t)val) -#define TWE_STATUS(sc) (u_int32_t)bus_space_read_4((sc)->twe_btag, (sc)->twe_bhandle, 0x4) -#define TWE_COMMAND_QUEUE(sc, val) bus_space_write_4((sc)->twe_btag, (sc)->twe_bhandle, 0x8, (u_int32_t)val) -#define TWE_RESPONSE_QUEUE(sc) (TWE_Response_Queue)bus_space_read_4((sc)->twe_btag, (sc)->twe_bhandle, 0xc) +#define TWE_CONTROL(sc, val) bus_write_4((sc)->twe_io, 0x0, (u_int32_t)val) +#define TWE_STATUS(sc) (u_int32_t)bus_read_4((sc)->twe_io, 0x4) +#define TWE_COMMAND_QUEUE(sc, val) bus_write_4((sc)->twe_io, 0x8, (u_int32_t)val) +#define TWE_RESPONSE_QUEUE(sc) (TWE_Response_Queue)bus_read_4((sc)->twe_io, 0xc) /* * FreeBSD-specific softc elements @@ -79,8 +85,6 @@ device_t twe_dev; /* bus device */ \ struct cdev *twe_dev_t; /* control device */ \ struct resource *twe_io; /* register interface window */ \ - bus_space_handle_t twe_bhandle; /* bus space handle */ \ - bus_space_tag_t twe_btag; /* bus space tag */ \ bus_dma_tag_t twe_parent_dmat; /* parent DMA tag */ \ bus_dma_tag_t twe_buffer_dmat; /* data buffer DMA tag */ \ bus_dma_tag_t twe_cmd_dmat; /* command buffer DMA tag */ \ @@ -91,8 +95,8 @@ void *twe_cmd; /* command structures */ \ void *twe_immediate; /* immediate commands */ \ bus_dmamap_t twe_immediate_map; \ - struct sysctl_ctx_list sysctl_ctx; \ - struct sysctl_oid *sysctl_tree; + struct mtx twe_io_lock; \ + struct sx twe_config_lock; /* * FreeBSD-specific request elements @@ -107,52 +111,12 @@ #define twe_printf(sc, fmt, args...) device_printf(sc->twe_dev, fmt , ##args) #define twed_printf(twed, fmt, args...) device_printf(twed->twed_dev, fmt , ##args) -#if __FreeBSD_version < 500003 -# include -# define INTR_ENTROPY 0 -# define FREEBSD_4 - -# include /* old buf style */ -typedef struct buf twe_bio; -typedef struct buf_queue_head twe_bioq; -# define TWE_BIO_QINIT(bq) bufq_init(&bq); -# define TWE_BIO_QINSERT(bq, bp) bufq_insert_tail(&bq, bp) -# define TWE_BIO_QFIRST(bq) bufq_first(&bq) -# define TWE_BIO_QREMOVE(bq, bp) bufq_remove(&bq, bp) -# define TWE_BIO_IS_READ(bp) ((bp)->b_flags & B_READ) -# define TWE_BIO_DATA(bp) (bp)->b_data -# define TWE_BIO_LENGTH(bp) (bp)->b_bcount -# define TWE_BIO_LBA(bp) (bp)->b_pblkno -# define TWE_BIO_SOFTC(bp) (bp)->b_dev->si_drv1 -# define TWE_BIO_UNIT(bp) *(int *)((bp)->b_dev->si_drv2) -# define TWE_BIO_SET_ERROR(bp, err) do { (bp)->b_error = err; (bp)->b_flags |= B_ERROR;} while(0) -# define TWE_BIO_HAS_ERROR(bp) ((bp)->b_flags & B_ERROR) -# define TWE_BIO_RESID(bp) (bp)->b_resid -# define TWE_BIO_DONE(bp) biodone(bp) -# define TWE_BIO_STATS_START(bp) devstat_start_transaction(&((struct twed_softc *)TWE_BIO_SOFTC(bp))->twed_stats) -# define TWE_BIO_STATS_END(bp) devstat_end_transaction_buf(&((struct twed_softc *)TWE_BIO_SOFTC(bp))->twed_stats, bp) -#else -# include -# include -typedef struct bio twe_bio; -typedef struct bio_queue_head twe_bioq; -# define TWE_BIO_QINIT(bq) bioq_init(&bq); -# define TWE_BIO_QINSERT(bq, bp) bioq_insert_tail(&bq, bp) -# define TWE_BIO_QFIRST(bq) bioq_first(&bq) -# define TWE_BIO_QREMOVE(bq, bp) bioq_remove(&bq, bp) -# define TWE_BIO_IS_READ(bp) ((bp)->bio_cmd == BIO_READ) -# define TWE_BIO_DATA(bp) (bp)->bio_data -# define TWE_BIO_LENGTH(bp) (bp)->bio_bcount -# define TWE_BIO_LBA(bp) (bp)->bio_pblkno -# define TWE_BIO_SOFTC(bp) (bp)->bio_disk->d_drv1 -# define TWE_BIO_UNIT(bp) *(int *)(bp->bio_driver1) -# define TWE_BIO_SET_ERROR(bp, err) do { (bp)->bio_error = err; (bp)->bio_flags |= BIO_ERROR;} while(0) -# define TWE_BIO_HAS_ERROR(bp) ((bp)->bio_flags & BIO_ERROR) -# define TWE_BIO_RESID(bp) (bp)->bio_resid -# define TWE_BIO_DONE(bp) biodone(bp) -# define TWE_BIO_STATS_START(bp) -# define TWE_BIO_STATS_END(bp) -#endif +#define TWE_IO_LOCK(sc) mtx_lock(&(sc)->twe_io_lock) +#define TWE_IO_UNLOCK(sc) mtx_unlock(&(sc)->twe_io_lock) +#define TWE_IO_ASSERT_LOCKED(sc) mtx_assert(&(sc)->twe_io_lock, MA_OWNED) +#define TWE_CONFIG_LOCK(sc) sx_xlock(&(sc)->twe_config_lock) +#define TWE_CONFIG_UNLOCK(sc) sx_xunlock(&(sc)->twe_config_lock) +#define TWE_CONFIG_ASSERT_LOCKED(sc) sx_assert(&(sc)->twe_config_lock, SA_XLOCKED) #endif /* FreeBSD */ Modified: stable/9/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/9/sys/dev/twe/twe_freebsd.c Tue Feb 26 18:18:39 2013 (r247330) +++ stable/9/sys/dev/twe/twe_freebsd.c Tue Feb 26 18:19:51 2013 (r247331) @@ -69,7 +69,6 @@ static d_ioctl_t twe_ioctl_wrapper; static struct cdevsw twe_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = twe_open, .d_close = twe_close, .d_ioctl = twe_ioctl_wrapper, @@ -84,7 +83,13 @@ twe_open(struct cdev *dev, int flags, in { struct twe_softc *sc = (struct twe_softc *)dev->si_drv1; + TWE_IO_LOCK(sc); + if (sc->twe_state & TWE_STATE_DETACHING) { + TWE_IO_UNLOCK(sc); + return (ENXIO); + } sc->twe_state |= TWE_STATE_OPEN; + TWE_IO_UNLOCK(sc); return(0); } @@ -96,7 +101,9 @@ twe_close(struct cdev *dev, int flags, i { struct twe_softc *sc = (struct twe_softc *)dev->si_drv1; + TWE_IO_LOCK(sc); sc->twe_state &= ~TWE_STATE_OPEN; + TWE_IO_UNLOCK(sc); return (0); } @@ -172,8 +179,8 @@ static int twe_attach(device_t dev) { struct twe_softc *sc; + struct sysctl_oid *sysctl_tree; int rid, error; - u_int32_t command; debug_called(4); @@ -182,32 +189,30 @@ twe_attach(device_t dev) */ sc = device_get_softc(dev); sc->twe_dev = dev; + mtx_init(&sc->twe_io_lock, "twe I/O", NULL, MTX_DEF); + sx_init(&sc->twe_config_lock, "twe config"); - sysctl_ctx_init(&sc->sysctl_ctx); - sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, + /* + * XXX: This sysctl tree must stay at hw.tweX rather than using + * the device_get_sysctl_tree() created by new-bus because + * existing 3rd party binary tools such as tw_cli and 3dm2 use the + * existence of this sysctl node to discover controllers. + */ + sysctl_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_nameunit(dev), CTLFLAG_RD, 0, ""); - if (sc->sysctl_tree == NULL) { + if (sysctl_tree == NULL) { twe_printf(sc, "cannot add sysctl tree node\n"); return (ENXIO); } - SYSCTL_ADD_STRING(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "driver_version", CTLFLAG_RD, TWE_DRIVER_VERSION_STRING, 0, "TWE driver version"); /* - * Make sure we are going to be able to talk to this board. - */ - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_PORTEN) == 0) { - twe_printf(sc, "register window not available\n"); - return(ENXIO); - } - /* * Force the busmaster enable bit on, in case the BIOS forgot. */ - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); + pci_enable_busmaster(dev); /* * Allocate the PCI register window. @@ -219,8 +224,6 @@ twe_attach(device_t dev) twe_free(sc); return(ENXIO); } - sc->twe_btag = rman_get_bustag(sc->twe_io); - sc->twe_bhandle = rman_get_bushandle(sc->twe_io); /* * Allocate the parent bus DMA tag appropriate for PCI. @@ -251,7 +254,7 @@ twe_attach(device_t dev) twe_free(sc); return(ENXIO); } - if (bus_setup_intr(sc->twe_dev, sc->twe_irq, INTR_TYPE_BIO | INTR_ENTROPY, + if (bus_setup_intr(sc->twe_dev, sc->twe_irq, INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE, NULL, twe_pci_intr, sc, &sc->twe_intr)) { twe_printf(sc, "can't set up interrupt\n"); twe_free(sc); @@ -302,7 +305,7 @@ twe_attach(device_t dev) BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ - &Giant, /* lockarg */ + &sc->twe_io_lock, /* lockarg */ &sc->twe_buffer_dmat)) { twe_printf(sc, "can't allocate data buffer DMA tag\n"); twe_free(sc); @@ -424,7 +427,8 @@ twe_free(struct twe_softc *sc) if (sc->twe_dev_t != (struct cdev *)NULL) destroy_dev(sc->twe_dev_t); - sysctl_ctx_free(&sc->sysctl_ctx); + sx_destroy(&sc->twe_config_lock); + mtx_destroy(&sc->twe_io_lock); } /******************************************************************************** @@ -434,27 +438,30 @@ static int twe_detach(device_t dev) { struct twe_softc *sc = device_get_softc(dev); - int s, error; debug_called(4); - error = EBUSY; - s = splbio(); - if (sc->twe_state & TWE_STATE_OPEN) - goto out; + TWE_IO_LOCK(sc); + if (sc->twe_state & TWE_STATE_OPEN) { + TWE_IO_UNLOCK(sc); + return (EBUSY); + } + sc->twe_state |= TWE_STATE_DETACHING; + TWE_IO_UNLOCK(sc); /* * Shut the controller down. */ - if (twe_shutdown(dev)) - goto out; + if (twe_shutdown(dev)) { + TWE_IO_LOCK(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 18:31:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B00247D7; Tue, 26 Feb 2013 18:31:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 515DB1674; Tue, 26 Feb 2013 18:31:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QIV4Zh016503; Tue, 26 Feb 2013 18:31:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QIV3J2016496; Tue, 26 Feb 2013 18:31:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201302261831.r1QIV3J2016496@svn.freebsd.org> From: Dimitry Andric Date: Tue, 26 Feb 2013 18:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247333 - in stable/9: lib/libsm libexec/mail.local libexec/smrsh share/mk usr.bin/vacation usr.sbin/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 18:31:05 -0000 Author: dim Date: Tue Feb 26 18:31:03 2013 New Revision: 247333 URL: http://svnweb.freebsd.org/changeset/base/247333 Log: MFC r246880: Since clang 3.2 now has an option to suppress warnings about implicitly promoted K&R parameters, remove the workarounds added for sendmail components in r228558. Modified: stable/9/lib/libsm/Makefile stable/9/libexec/mail.local/Makefile stable/9/libexec/smrsh/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/usr.bin/vacation/Makefile stable/9/usr.sbin/sendmail/Makefile Directory Properties: stable/9/lib/libsm/ (props changed) stable/9/libexec/mail.local/ (props changed) stable/9/libexec/smrsh/ (props changed) stable/9/share/mk/ (props changed) stable/9/usr.bin/vacation/ (props changed) stable/9/usr.sbin/sendmail/ (props changed) Modified: stable/9/lib/libsm/Makefile ============================================================================== --- stable/9/lib/libsm/Makefile Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/lib/libsm/Makefile Tue Feb 26 18:31:03 2013 (r247333) @@ -18,11 +18,6 @@ CFLAGS+=${SENDMAIL_CFLAGS} WARNS?= 2 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - LIB= sm SRCS+= sm_os.h Modified: stable/9/libexec/mail.local/Makefile ============================================================================== --- stable/9/libexec/mail.local/Makefile Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/libexec/mail.local/Makefile Tue Feb 26 18:31:03 2013 (r247333) @@ -12,11 +12,6 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/libexec/smrsh/Makefile ============================================================================== --- stable/9/libexec/smrsh/Makefile Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/libexec/smrsh/Makefile Tue Feb 26 18:31:03 2013 (r247333) @@ -17,11 +17,6 @@ LDADD= ${LIBSM} WARNS?= 2 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/share/mk/bsd.sys.mk Tue Feb 26 18:31:03 2013 (r247333) @@ -72,7 +72,7 @@ CWARNFLAGS+= -Wno-tautological-compare - -Wno-parentheses-equality -Wno-unused-function -Wno-conversion .endif # WARNS <= 3 .if ${WARNS} <= 2 -CWARNFLAGS+= -Wno-switch -Wno-switch-enum +CWARNFLAGS+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter .endif # WARNS <= 2 .if ${WARNS} <= 1 CWARNFLAGS+= -Wno-parentheses Modified: stable/9/usr.bin/vacation/Makefile ============================================================================== --- stable/9/usr.bin/vacation/Makefile Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/usr.bin/vacation/Makefile Tue Feb 26 18:31:03 2013 (r247333) @@ -11,11 +11,6 @@ CFLAGS+=-D_FFR_LISTDB -D_FFR_DEBUG WARNS?= 2 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Tue Feb 26 18:30:47 2013 (r247332) +++ stable/9/usr.sbin/sendmail/Makefile Tue Feb 26 18:31:03 2013 (r247333) @@ -45,11 +45,6 @@ CFLAGS+= -DNETINET6 WARNS?= 1 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 19:14:06 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C107A121; Tue, 26 Feb 2013 19:14:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 909E719EC; Tue, 26 Feb 2013 19:14:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QJE6LD029161; Tue, 26 Feb 2013 19:14:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QJE6qP029159; Tue, 26 Feb 2013 19:14:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302261914.r1QJE6qP029159@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 19:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247335 - stable/9/sbin/dhclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 19:14:06 -0000 Author: jhb Date: Tue Feb 26 19:14:05 2013 New Revision: 247335 URL: http://svnweb.freebsd.org/changeset/base/247335 Log: MFC 239356,239564: Teach dhclient to track changes in link state and to enter the reboot state when the link on an interface goes up causing dhclient to attempt to renew its existing lease. PR: bin/166656 Modified: stable/9/sbin/dhclient/dhclient.c stable/9/sbin/dhclient/dhcpd.h Directory Properties: stable/9/sbin/dhclient/ (props changed) Modified: stable/9/sbin/dhclient/dhclient.c ============================================================================== --- stable/9/sbin/dhclient/dhclient.c Tue Feb 26 18:33:23 2013 (r247334) +++ stable/9/sbin/dhclient/dhclient.c Tue Feb 26 19:14:05 2013 (r247335) @@ -218,6 +218,7 @@ routehandler(struct protocol *p) struct sockaddr *sa; struct iaddr a; ssize_t n; + int linkstat; n = read(routefd, &msg, sizeof(msg)); rtm = (struct rt_msghdr *)msg; @@ -278,6 +279,15 @@ routehandler(struct protocol *p) ifi->name); goto die; } + linkstat = interface_link_status(ifi->name); + if (linkstat != ifi->linkstat) { + debug("%s link state %s -> %s", ifi->name, + ifi->linkstat ? "up" : "down", + linkstat ? "up" : "down"); + ifi->linkstat = linkstat; + if (linkstat) + state_reboot(ifi); + } break; case RTM_IFANNOUNCE: ifan = (struct if_announcemsghdr *)rtm; @@ -430,6 +440,7 @@ main(int argc, char *argv[]) } fprintf(stderr, " got link\n"); } + ifi->linkstat = 1; if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) error("cannot open %s: %m", _PATH_DEVNULL); Modified: stable/9/sbin/dhclient/dhcpd.h ============================================================================== --- stable/9/sbin/dhclient/dhcpd.h Tue Feb 26 18:33:23 2013 (r247334) +++ stable/9/sbin/dhclient/dhcpd.h Tue Feb 26 19:14:05 2013 (r247335) @@ -208,6 +208,7 @@ struct interface_info { int errors; int dead; u_int16_t index; + int linkstat; }; struct timeout { From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 19:14:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E21BC28B; Tue, 26 Feb 2013 19:14:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC42119F0; Tue, 26 Feb 2013 19:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QJEUNI029260; Tue, 26 Feb 2013 19:14:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QJEUmp029257; Tue, 26 Feb 2013 19:14:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302261914.r1QJEUmp029257@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 19:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247336 - stable/8/sbin/dhclient X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 19:14:31 -0000 Author: jhb Date: Tue Feb 26 19:14:29 2013 New Revision: 247336 URL: http://svnweb.freebsd.org/changeset/base/247336 Log: MFC 239356,239564: Teach dhclient to track changes in link state and to enter the reboot state when the link on an interface goes up causing dhclient to attempt to renew its existing lease. PR: bin/166656 Modified: stable/8/sbin/dhclient/dhclient.c stable/8/sbin/dhclient/dhcpd.h Directory Properties: stable/8/sbin/dhclient/ (props changed) Modified: stable/8/sbin/dhclient/dhclient.c ============================================================================== --- stable/8/sbin/dhclient/dhclient.c Tue Feb 26 19:14:05 2013 (r247335) +++ stable/8/sbin/dhclient/dhclient.c Tue Feb 26 19:14:29 2013 (r247336) @@ -218,6 +218,7 @@ routehandler(struct protocol *p) struct sockaddr *sa; struct iaddr a; ssize_t n; + int linkstat; n = read(routefd, &msg, sizeof(msg)); rtm = (struct rt_msghdr *)msg; @@ -278,6 +279,15 @@ routehandler(struct protocol *p) ifi->name); goto die; } + linkstat = interface_link_status(ifi->name); + if (linkstat != ifi->linkstat) { + debug("%s link state %s -> %s", ifi->name, + ifi->linkstat ? "up" : "down", + linkstat ? "up" : "down"); + ifi->linkstat = linkstat; + if (linkstat) + state_reboot(ifi); + } break; case RTM_IFANNOUNCE: ifan = (struct if_announcemsghdr *)rtm; @@ -430,6 +440,7 @@ main(int argc, char *argv[]) } fprintf(stderr, " got link\n"); } + ifi->linkstat = 1; if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) error("cannot open %s: %m", _PATH_DEVNULL); Modified: stable/8/sbin/dhclient/dhcpd.h ============================================================================== --- stable/8/sbin/dhclient/dhcpd.h Tue Feb 26 19:14:05 2013 (r247335) +++ stable/8/sbin/dhclient/dhcpd.h Tue Feb 26 19:14:29 2013 (r247336) @@ -208,6 +208,7 @@ struct interface_info { int errors; int dead; u_int16_t index; + int linkstat; }; struct timeout { From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 20:19:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D5F6BF5; Tue, 26 Feb 2013 20:19:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 115411D0A; Tue, 26 Feb 2013 20:19:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QKJKsR048273; Tue, 26 Feb 2013 20:19:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QKJKJ3048263; Tue, 26 Feb 2013 20:19:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302262019.r1QKJKJ3048263@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 20:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247344 - in stable/9: share/man/man9 sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 20:19:21 -0000 Author: jhb Date: Tue Feb 26 20:19:19 2013 New Revision: 247344 URL: http://svnweb.freebsd.org/changeset/base/247344 Log: MFC 239512: Add a BUS_CHILD_DELETED() method that a bus can hook to allow it to cleanup any bus-specific state (such as ivars) when a child device is deleted. Added: stable/9/share/man/man9/BUS_CHILD_DELETED.9 - copied unchanged from r239512, head/share/man/man9/BUS_CHILD_DELETED.9 Modified: stable/9/share/man/man9/Makefile stable/9/sys/kern/bus_if.m stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) Copied: stable/9/share/man/man9/BUS_CHILD_DELETED.9 (from r239512, head/share/man/man9/BUS_CHILD_DELETED.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man9/BUS_CHILD_DELETED.9 Tue Feb 26 20:19:19 2013 (r247344, copy of r239512, head/share/man/man9/BUS_CHILD_DELETED.9) @@ -0,0 +1,55 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" 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 August 21, 2012 +.Dt BUS_CHILD_DELETED 9 +.Os +.Sh NAME +.Nm BUS_CHILD_DELETED +.Nd "notify a bus device that a child is being deleted" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft void +.Fn BUS_CHILD_DELETED "device_t dev" "device_t child" +.Sh DESCRIPTION +The +.Fn BUS_CHILD_DELETED +method is invoked by the new-bus framework when a device is deleted. +A bus driver can provide an implementation of this method to +release bus-specific resources associated with a device such as +instance variables. +.Sh SEE ALSO +.Xr BUS_ADD_CHILD 9 , +.Xr device 9 +.Sh HISTORY +The +.Fn BUS_CHILD_DELETED +method first appeared in +.Fx 10.0 . Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Tue Feb 26 20:18:25 2013 (r247343) +++ stable/9/share/man/man9/Makefile Tue Feb 26 20:19:19 2013 (r247344) @@ -26,6 +26,7 @@ MAN= accept_filter.9 \ bus_alloc_resource.9 \ BUS_BIND_INTR.9 \ bus_child_present.9 \ + BUS_CHILD_DELETED.9 \ BUS_CONFIG_INTR.9 \ BUS_DESCRIBE_INTR.9 \ bus_dma.9 \ Modified: stable/9/sys/kern/bus_if.m ============================================================================== --- stable/9/sys/kern/bus_if.m Tue Feb 26 20:18:25 2013 (r247343) +++ stable/9/sys/kern/bus_if.m Tue Feb 26 20:19:19 2013 (r247344) @@ -160,6 +160,20 @@ METHOD int write_ivar { }; /** + * @brief Notify a bus that a child was deleted + * + * Called at the beginning of device_delete_child() to allow the parent + * to teardown any bus-specific state for the child. + * + * @param _dev the device whose child is being deleted + * @param _child the child device which is being deleted + */ +METHOD void child_deleted { + device_t _dev; + device_t _child; +}; + +/** * @brief Notify a bus that a child was detached * * Called after the child's DEVICE_DETACH() method to allow the parent Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Tue Feb 26 20:18:25 2013 (r247343) +++ stable/9/sys/kern/subr_bus.c Tue Feb 26 20:19:19 2013 (r247344) @@ -1871,6 +1871,8 @@ device_delete_child(device_t dev, device return (error); if (child->devclass) devclass_delete_device(child->devclass, child); + if (child->parent) + BUS_CHILD_DELETED(dev, child); TAILQ_REMOVE(&dev->children, child, link); TAILQ_REMOVE(&bus_data_devices, child, devlink); kobj_delete((kobj_t) child, M_BUS); From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 21:04:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 037561C8; Tue, 26 Feb 2013 21:04:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D1EBFC; Tue, 26 Feb 2013 21:04:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QL4wHw062769; Tue, 26 Feb 2013 21:04:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QL4wFr062766; Tue, 26 Feb 2013 21:04:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302262104.r1QL4wFr062766@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 21:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247349 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 21:04:59 -0000 Author: jhb Date: Tue Feb 26 21:04:58 2013 New Revision: 247349 URL: http://svnweb.freebsd.org/changeset/base/247349 Log: MFC 240467: Ignore stop and continue signals sent to an exiting process. Stop signals set p_xstat to the signal that triggered the stop, but p_xstat is also used to hold the exit status of an exiting process. Without this change, a stop signal that arrived after a process was marked P_WEXIT but before it was marked a zombie would overwrite the exit status with the stop signal number. Modified: stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_sig.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Tue Feb 26 20:41:27 2013 (r247348) +++ stable/9/sys/kern/kern_exit.c Tue Feb 26 21:04:58 2013 (r247349) @@ -200,6 +200,14 @@ exit1(struct thread *td, int rv) _STOPEVENT(p, S_EXIT, rv); /* + * Ignore any pending request to stop due to a stop signal. + * Once P_WEXIT is set, future requests will be ignored as + * well. + */ + p->p_flag &= ~P_STOPPED_SIG; + KASSERT(!P_SHOULDSTOP(p), ("exiting process is stopped")); + + /* * Note that we are exiting and do another wakeup of anyone in * PIOCWAIT in case they aren't listening for S_EXIT stops or * decided to wait again after we told them we are exiting. Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Tue Feb 26 20:41:27 2013 (r247348) +++ stable/9/sys/kern/kern_sig.c Tue Feb 26 21:04:58 2013 (r247349) @@ -2142,6 +2142,8 @@ tdsendsignal(struct proc *p, struct thre * We try do the per-process part here. */ if (P_SHOULDSTOP(p)) { + KASSERT(!(p->p_flag & P_WEXIT), + ("signal to stopped but exiting process")); if (sig == SIGKILL) { /* * If traced process is already stopped, @@ -2256,7 +2258,7 @@ tdsendsignal(struct proc *p, struct thre MPASS(action == SIG_DFL); if (prop & SA_STOP) { - if (p->p_flag & P_PPWAIT) + if (p->p_flag & (P_PPWAIT|P_WEXIT)) goto out; p->p_flag |= P_STOPPED_SIG; p->p_xstat = sig; @@ -2418,6 +2420,7 @@ ptracestop(struct thread *td, int sig) struct proc *p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process")); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Stopping for traced signal"); @@ -2655,7 +2658,7 @@ issignal(struct thread *td, int stop_all * process group, ignore tty stop signals. */ if (prop & SA_STOP) { - if (p->p_flag & P_TRACED || + if (p->p_flag & (P_TRACED|P_WEXIT) || (p->p_pgrp->pg_jobc == 0 && prop & SA_TTYSTOP)) break; /* == ignore */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 21:05:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DD24A2DE; Tue, 26 Feb 2013 21:05:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B718567; Tue, 26 Feb 2013 21:05:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QL57vI062863; Tue, 26 Feb 2013 21:05:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QL57aS062861; Tue, 26 Feb 2013 21:05:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302262105.r1QL57aS062861@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 21:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247350 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 21:05:07 -0000 Author: jhb Date: Tue Feb 26 21:05:06 2013 New Revision: 247350 URL: http://svnweb.freebsd.org/changeset/base/247350 Log: MFC 240467: Ignore stop and continue signals sent to an exiting process. Stop signals set p_xstat to the signal that triggered the stop, but p_xstat is also used to hold the exit status of an exiting process. Without this change, a stop signal that arrived after a process was marked P_WEXIT but before it was marked a zombie would overwrite the exit status with the stop signal number. Modified: stable/8/sys/kern/kern_exit.c stable/8/sys/kern/kern_sig.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_exit.c ============================================================================== --- stable/8/sys/kern/kern_exit.c Tue Feb 26 21:04:58 2013 (r247349) +++ stable/8/sys/kern/kern_exit.c Tue Feb 26 21:05:06 2013 (r247350) @@ -183,6 +183,14 @@ exit1(struct thread *td, int rv) _STOPEVENT(p, S_EXIT, rv); /* + * Ignore any pending request to stop due to a stop signal. + * Once P_WEXIT is set, future requests will be ignored as + * well. + */ + p->p_flag &= ~P_STOPPED_SIG; + KASSERT(!P_SHOULDSTOP(p), ("exiting process is stopped")); + + /* * Note that we are exiting and do another wakeup of anyone in * PIOCWAIT in case they aren't listening for S_EXIT stops or * decided to wait again after we told them we are exiting. Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Tue Feb 26 21:04:58 2013 (r247349) +++ stable/8/sys/kern/kern_sig.c Tue Feb 26 21:05:06 2013 (r247350) @@ -2142,6 +2142,8 @@ tdsignal(struct proc *p, struct thread * * We try do the per-process part here. */ if (P_SHOULDSTOP(p)) { + KASSERT(!(p->p_flag & P_WEXIT), + ("signal to stopped but exiting process")); if (sig == SIGKILL) { /* * If traced process is already stopped, @@ -2256,7 +2258,7 @@ tdsignal(struct proc *p, struct thread * MPASS(action == SIG_DFL); if (prop & SA_STOP) { - if (p->p_flag & P_PPWAIT) + if (p->p_flag & (P_PPWAIT|P_WEXIT)) goto out; p->p_flag |= P_STOPPED_SIG; p->p_xstat = sig; @@ -2418,6 +2420,7 @@ ptracestop(struct thread *td, int sig) struct proc *p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); + KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process")); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Stopping for traced signal"); @@ -2658,7 +2661,7 @@ issignal(struct thread *td, int stop_all * process group, ignore tty stop signals. */ if (prop & SA_STOP) { - if (p->p_flag & P_TRACED || + if (p->p_flag & (P_TRACED|P_WEXIT) || (p->p_pgrp->pg_jobc == 0 && prop & SA_TTYSTOP)) break; /* == ignore */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 22:08:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 673B1CD5; Tue, 26 Feb 2013 22:08:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4200932F; Tue, 26 Feb 2013 22:08:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QM80Zx082100; Tue, 26 Feb 2013 22:08:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QM80Eb082098; Tue, 26 Feb 2013 22:08:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302262208.r1QM80Eb082098@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 22:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247357 - stable/9/sys/dev/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 22:08:00 -0000 Author: jhb Date: Tue Feb 26 22:07:59 2013 New Revision: 247357 URL: http://svnweb.freebsd.org/changeset/base/247357 Log: MFC 240473: Add some registers defined in PCI 3.0 including new AER bits. Modified: stable/9/sys/dev/pci/pcireg.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/pci/pcireg.h ============================================================================== --- stable/9/sys/dev/pci/pcireg.h Tue Feb 26 21:37:12 2013 (r247356) +++ stable/9/sys/dev/pci/pcireg.h Tue Feb 26 22:07:59 2013 (r247357) @@ -64,6 +64,7 @@ #define PCIM_CMD_BACKTOBACK 0x0200 #define PCIM_CMD_INTxDIS 0x0400 #define PCIR_STATUS 0x06 +#define PCIM_STATUS_INTxSTATE 0x0008 #define PCIM_STATUS_CAPPRESENT 0x0010 #define PCIM_STATUS_66CAPABLE 0x0020 #define PCIM_STATUS_BACKTOBACK 0x0080 @@ -134,11 +135,22 @@ #define PCIZ_VC 0x0002 /* Virtual Channel */ #define PCIZ_SERNUM 0x0003 /* Device Serial Number */ #define PCIZ_PWRBDGT 0x0004 /* Power Budgeting */ +#define PCIZ_RCLINK_DCL 0x0005 /* Root Complex Link Declaration */ +#define PCIZ_RCLINK_CTL 0x0006 /* Root Complex Internal Link Control */ +#define PCIZ_RCEC_ASSOC 0x0007 /* Root Complex Event Collector Association */ +#define PCIZ_MFVC 0x0008 /* Multi-Function Virtual Channel */ +#define PCIZ_RCRB 0x000a /* RCRB Header */ #define PCIZ_VENDOR 0x000b /* Vendor Unique */ #define PCIZ_ACS 0x000d /* Access Control Services */ #define PCIZ_ARI 0x000e /* Alternative Routing-ID Interpretation */ #define PCIZ_ATS 0x000f /* Address Translation Services */ #define PCIZ_SRIOV 0x0010 /* Single Root IO Virtualization */ +#define PCIZ_MULTICAST 0x0012 /* Multicast */ +#define PCIZ_RESIZE_BAR 0x0015 /* Resizable BAR */ +#define PCIZ_DPA 0x0016 /* Dynamic Power Allocation */ +#define PCIZ_TPH_REQ 0x0017 /* TPH Requester */ +#define PCIZ_LTR 0x0018 /* Latency Tolerance Reporting */ +#define PCIZ_SEC_PCIE 0x0019 /* Secondary PCI Express */ /* config registers for header type 0 devices */ @@ -913,6 +925,10 @@ #define PCIM_AER_UC_ECRC_ERROR 0x00080000 #define PCIM_AER_UC_UNSUPPORTED_REQUEST 0x00100000 #define PCIM_AER_UC_ACS_VIOLATION 0x00200000 +#define PCIM_AER_UC_INTERNAL_ERROR 0x00400000 +#define PCIM_AER_UC_MC_BLOCKED_TLP 0x00800000 +#define PCIM_AER_UC_ATOMIC_EGRESS_BLK 0x01000000 +#define PCIM_AER_UC_TLP_PREFIX_BLOCKED 0x02000000 #define PCIR_AER_UC_MASK 0x08 /* Shares bits with UC_STATUS */ #define PCIR_AER_UC_SEVERITY 0x0c /* Shares bits with UC_STATUS */ #define PCIR_AER_COR_STATUS 0x10 @@ -922,6 +938,8 @@ #define PCIM_AER_COR_REPLAY_ROLLOVER 0x00000100 #define PCIM_AER_COR_REPLAY_TIMEOUT 0x00001000 #define PCIM_AER_COR_ADVISORY_NF_ERROR 0x00002000 +#define PCIM_AER_COR_INTERNAL_ERROR 0x00004000 +#define PCIM_AER_COR_HEADER_LOG_OVFLOW 0x00008000 #define PCIR_AER_COR_MASK 0x14 /* Shares bits with COR_STATUS */ #define PCIR_AER_CAP_CONTROL 0x18 #define PCIM_AER_FIRST_ERROR_PTR 0x0000001f @@ -929,6 +947,9 @@ #define PCIM_AER_ECRC_GEN_ENABLE 0x00000040 #define PCIM_AER_ECRC_CHECK_CAPABLE 0x00000080 #define PCIM_AER_ECRC_CHECK_ENABLE 0x00000100 +#define PCIM_AER_MULT_HDR_CAPABLE 0x00000200 +#define PCIM_AER_MULT_HDR_ENABLE 0x00000400 +#define PCIM_AER_TLP_PREFIX_LOG_PRESENT 0x00000800 #define PCIR_AER_HEADER_LOG 0x1c #define PCIR_AER_ROOTERR_CMD 0x2c /* Only for root complex ports */ #define PCIM_AER_ROOTERR_COR_ENABLE 0x00000001 @@ -945,6 +966,7 @@ #define PCIM_AER_ROOTERR_INT_MESSAGE 0xf8000000 #define PCIR_AER_COR_SOURCE_ID 0x34 /* Only for root complex ports */ #define PCIR_AER_ERR_SOURCE_ID 0x36 /* Only for root complex ports */ +#define PCIR_AER_TLP_PREFIX_LOG 0x38 /* Only for TLP prefix functions */ /* Virtual Channel definitions */ #define PCIR_VC_CAP1 0x04 From owner-svn-src-stable@FreeBSD.ORG Tue Feb 26 22:08:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5ED38E26; Tue, 26 Feb 2013 22:08:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5207D331; Tue, 26 Feb 2013 22:08:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QM8BRZ082180; Tue, 26 Feb 2013 22:08:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QM8BDi082179; Tue, 26 Feb 2013 22:08:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302262208.r1QM8BDi082179@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Feb 2013 22:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247358 - stable/8/sys/dev/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 22:08:11 -0000 Author: jhb Date: Tue Feb 26 22:08:10 2013 New Revision: 247358 URL: http://svnweb.freebsd.org/changeset/base/247358 Log: MFC 240473: Add some registers defined in PCI 3.0 including new AER bits. Modified: stable/8/sys/dev/pci/pcireg.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Tue Feb 26 22:07:59 2013 (r247357) +++ stable/8/sys/dev/pci/pcireg.h Tue Feb 26 22:08:10 2013 (r247358) @@ -64,6 +64,7 @@ #define PCIM_CMD_BACKTOBACK 0x0200 #define PCIM_CMD_INTxDIS 0x0400 #define PCIR_STATUS 0x06 +#define PCIM_STATUS_INTxSTATE 0x0008 #define PCIM_STATUS_CAPPRESENT 0x0010 #define PCIM_STATUS_66CAPABLE 0x0020 #define PCIM_STATUS_BACKTOBACK 0x0080 @@ -135,11 +136,22 @@ #define PCIZ_VC 0x0002 /* Virtual Channel */ #define PCIZ_SERNUM 0x0003 /* Device Serial Number */ #define PCIZ_PWRBDGT 0x0004 /* Power Budgeting */ +#define PCIZ_RCLINK_DCL 0x0005 /* Root Complex Link Declaration */ +#define PCIZ_RCLINK_CTL 0x0006 /* Root Complex Internal Link Control */ +#define PCIZ_RCEC_ASSOC 0x0007 /* Root Complex Event Collector Association */ +#define PCIZ_MFVC 0x0008 /* Multi-Function Virtual Channel */ +#define PCIZ_RCRB 0x000a /* RCRB Header */ #define PCIZ_VENDOR 0x000b /* Vendor Unique */ #define PCIZ_ACS 0x000d /* Access Control Services */ #define PCIZ_ARI 0x000e /* Alternative Routing-ID Interpretation */ #define PCIZ_ATS 0x000f /* Address Translation Services */ #define PCIZ_SRIOV 0x0010 /* Single Root IO Virtualization */ +#define PCIZ_MULTICAST 0x0012 /* Multicast */ +#define PCIZ_RESIZE_BAR 0x0015 /* Resizable BAR */ +#define PCIZ_DPA 0x0016 /* Dynamic Power Allocation */ +#define PCIZ_TPH_REQ 0x0017 /* TPH Requester */ +#define PCIZ_LTR 0x0018 /* Latency Tolerance Reporting */ +#define PCIZ_SEC_PCIE 0x0019 /* Secondary PCI Express */ /* config registers for header type 0 devices */ @@ -910,6 +922,10 @@ #define PCIM_AER_UC_ECRC_ERROR 0x00080000 #define PCIM_AER_UC_UNSUPPORTED_REQUEST 0x00100000 #define PCIM_AER_UC_ACS_VIOLATION 0x00200000 +#define PCIM_AER_UC_INTERNAL_ERROR 0x00400000 +#define PCIM_AER_UC_MC_BLOCKED_TLP 0x00800000 +#define PCIM_AER_UC_ATOMIC_EGRESS_BLK 0x01000000 +#define PCIM_AER_UC_TLP_PREFIX_BLOCKED 0x02000000 #define PCIR_AER_UC_MASK 0x08 /* Shares bits with UC_STATUS */ #define PCIR_AER_UC_SEVERITY 0x0c /* Shares bits with UC_STATUS */ #define PCIR_AER_COR_STATUS 0x10 @@ -919,6 +935,8 @@ #define PCIM_AER_COR_REPLAY_ROLLOVER 0x00000100 #define PCIM_AER_COR_REPLAY_TIMEOUT 0x00001000 #define PCIM_AER_COR_ADVISORY_NF_ERROR 0x00002000 +#define PCIM_AER_COR_INTERNAL_ERROR 0x00004000 +#define PCIM_AER_COR_HEADER_LOG_OVFLOW 0x00008000 #define PCIR_AER_COR_MASK 0x14 /* Shares bits with COR_STATUS */ #define PCIR_AER_CAP_CONTROL 0x18 #define PCIM_AER_FIRST_ERROR_PTR 0x0000001f @@ -926,6 +944,9 @@ #define PCIM_AER_ECRC_GEN_ENABLE 0x00000040 #define PCIM_AER_ECRC_CHECK_CAPABLE 0x00000080 #define PCIM_AER_ECRC_CHECK_ENABLE 0x00000100 +#define PCIM_AER_MULT_HDR_CAPABLE 0x00000200 +#define PCIM_AER_MULT_HDR_ENABLE 0x00000400 +#define PCIM_AER_TLP_PREFIX_LOG_PRESENT 0x00000800 #define PCIR_AER_HEADER_LOG 0x1c #define PCIR_AER_ROOTERR_CMD 0x2c /* Only for root complex ports */ #define PCIM_AER_ROOTERR_COR_ENABLE 0x00000001 @@ -942,6 +963,7 @@ #define PCIM_AER_ROOTERR_INT_MESSAGE 0xf8000000 #define PCIR_AER_COR_SOURCE_ID 0x34 /* Only for root complex ports */ #define PCIR_AER_ERR_SOURCE_ID 0x36 /* Only for root complex ports */ +#define PCIR_AER_TLP_PREFIX_LOG 0x38 /* Only for TLP prefix functions */ /* Virtual Channel definitions */ #define PCIR_VC_CAP1 0x04 From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 00:14:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3A798BB7; Wed, 27 Feb 2013 00:14:13 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF90B17; Wed, 27 Feb 2013 00:14:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1R0ECNS021674; Wed, 27 Feb 2013 00:14:12 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1R0EC9M021673; Wed, 27 Feb 2013 00:14:12 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201302270014.r1R0EC9M021673@svn.freebsd.org> From: Andrew Gallatin Date: Wed, 27 Feb 2013 00:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247365 - stable/9/sys/dev/mxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 00:14:13 -0000 Author: gallatin Date: Wed Feb 27 00:14:12 2013 New Revision: 247365 URL: http://svnweb.freebsd.org/changeset/base/247365 Log: Fix the build. Back out mis-guided compat shim that should not have been MFC'ed Modified: stable/9/sys/dev/mxge/if_mxge_var.h Modified: stable/9/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/9/sys/dev/mxge/if_mxge_var.h Tue Feb 26 23:54:17 2013 (r247364) +++ stable/9/sys/dev/mxge/if_mxge_var.h Wed Feb 27 00:14:12 2013 (r247365) @@ -50,19 +50,6 @@ $FreeBSD$ #define IFNET_BUF_RING 1 #endif -#if (__FreeBSD_version < 1000020) -#undef IF_Kbps -#undef IF_Mbps -#undef IF_Gbps -#define IF_Kbps(x) ((uintmax_t)(x) * 1000) /* kilobits/sec. */ -#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */ -#define IF_Gbps(x) (IF_Mbps((x) * 1000)) /* gigabits/sec. */ -static __inline void -if_initbaudrate(struct ifnet *ifp, uintmax_t baud) -{ - ifp->if_baudrate = baud; -} -#endif #ifndef VLAN_CAPABILITIES #define VLAN_CAPABILITIES(ifp) #define mxge_vlans_active(sc) (sc)->ifp->if_nvlans From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 08:55:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 01F0AB1A; Wed, 27 Feb 2013 08:55:27 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E7CC31E6; Wed, 27 Feb 2013 08:55:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1R8tQ3M081522; Wed, 27 Feb 2013 08:55:26 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1R8tQVw081521; Wed, 27 Feb 2013 08:55:26 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201302270855.r1R8tQVw081521@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 27 Feb 2013 08:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247394 - stable/9/usr.sbin/mountd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 08:55:27 -0000 Author: pluknet Date: Wed Feb 27 08:55:26 2013 New Revision: 247394 URL: http://svnweb.freebsd.org/changeset/base/247394 Log: MFC r247034: Check if the -sec option is given without an argument. PR: bin/170413 Submitted by: Andrey Simonenko Modified: stable/9/usr.sbin/mountd/mountd.c Directory Properties: stable/9/usr.sbin/mountd/ (props changed) Modified: stable/9/usr.sbin/mountd/mountd.c ============================================================================== --- stable/9/usr.sbin/mountd/mountd.c Wed Feb 27 08:44:03 2013 (r247393) +++ stable/9/usr.sbin/mountd/mountd.c Wed Feb 27 08:55:26 2013 (r247394) @@ -2238,7 +2238,7 @@ do_opt(char **cpp, char **endcpp, struct ep->ex_indexfile = strdup(cpoptarg); } else if (!strcmp(cpopt, "quiet")) { opt_flags |= OP_QUIET; - } else if (!strcmp(cpopt, "sec")) { + } else if (cpoptarg && !strcmp(cpopt, "sec")) { if (parsesec(cpoptarg, ep)) return (1); opt_flags |= OP_SEC; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 08:56:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E01EDDA6; Wed, 27 Feb 2013 08:56:57 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD6311FD; Wed, 27 Feb 2013 08:56:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1R8uvJW081756; Wed, 27 Feb 2013 08:56:57 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1R8uvrQ081755; Wed, 27 Feb 2013 08:56:57 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201302270856.r1R8uvrQ081755@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 27 Feb 2013 08:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247395 - stable/8/usr.sbin/mountd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 08:56:58 -0000 Author: pluknet Date: Wed Feb 27 08:56:57 2013 New Revision: 247395 URL: http://svnweb.freebsd.org/changeset/base/247395 Log: MFC r247034: Check if the -sec option is given without an argument. PR: bin/170413 Submitted by: Andrey Simonenko Modified: stable/8/usr.sbin/mountd/mountd.c Directory Properties: stable/8/usr.sbin/mountd/ (props changed) Modified: stable/8/usr.sbin/mountd/mountd.c ============================================================================== --- stable/8/usr.sbin/mountd/mountd.c Wed Feb 27 08:55:26 2013 (r247394) +++ stable/8/usr.sbin/mountd/mountd.c Wed Feb 27 08:56:57 2013 (r247395) @@ -2229,7 +2229,7 @@ do_opt(char **cpp, char **endcpp, struct ep->ex_indexfile = strdup(cpoptarg); } else if (!strcmp(cpopt, "quiet")) { opt_flags |= OP_QUIET; - } else if (!strcmp(cpopt, "sec")) { + } else if (cpoptarg && !strcmp(cpopt, "sec")) { if (parsesec(cpoptarg, ep)) return (1); opt_flags |= OP_SEC; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 19:20:56 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F233D9D4; Wed, 27 Feb 2013 19:20:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E0FD092D; Wed, 27 Feb 2013 19:20:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RJKtfm071324; Wed, 27 Feb 2013 19:20:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RJKpuD071292; Wed, 27 Feb 2013 19:20:51 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201302271920.r1RJKpuD071292@svn.freebsd.org> From: Martin Matuska Date: Wed, 27 Feb 2013 19:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247406 - in stable/9: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 19:20:56 -0000 Author: mm Date: Wed Feb 27 19:20:50 2013 New Revision: 247406 URL: http://svnweb.freebsd.org/changeset/base/247406 Log: MFC r246631,246651,246666,246675,246678,246688: Merge various ZFS bugfixes MFC r246631: Import vendor bugfixes Illumos ZFS issues: 3422 zpool create/syseventd race yield non-importable pool 3425 first write to a new zvol can fail with EFBIG MFC r246651: Import minor type change in refcount.h header from vendor (illumos). MFC r246666: Import vendor ZFS bugfix fixing a problem in arc_read(). Illumos ZFS issues: 3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt) MFC r246675: Add tunable to allow block allocation on degraded vdevs. Illumos ZFS issues: 3507 Tunable to allow block allocation even on degraded vdevs MFC r246678: Import vendor bugfixes regarding SA rounding, header size and layout. This was already partially fixed by avg. Illumos ZFS issues: 3512 rounding discrepancy in sa_find_sizes() 3513 mismatch between SA header size and layout MFC r246688 [1]: Merge zfs_ioctl.c code that should have been merged together with ZFS v28. Fixes several problems if working with read-only pools. Changed code originaly introduced in onnv-gate 13061:bda0decf867b Contains changes up to illumos-gate 13700:4bc0783f6064 PR: kern/175897 [1] Suggested by: avg [1] Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 19:20:50 2013 (r247406) @@ -983,7 +983,7 @@ visit_indirect(spa_t *spa, const dnode_p arc_buf_t *buf; uint64_t fill = 0; - err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf, + err = arc_read(NULL, spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -2001,9 +2001,8 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } -/* ARGSUSED */ static int -zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; @@ -2410,7 +2409,7 @@ typedef struct zdb_ddt_entry { /* ARGSUSED */ static int zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { avl_tree_t *t = arg; avl_index_t where; Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 27 19:20:50 2013 (r247406) @@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_l * version * pool guid * name - * pool txg (if available) * comment (if available) * pool state * hostid (if available) * hostname (if available) */ - uint64_t state, version, pool_txg; + uint64_t state, version; char *comment = NULL; version = fnvlist_lookup_uint64(tmp, @@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_l fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, name); - if (nvlist_lookup_uint64(tmp, - ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0) - fnvlist_add_uint64(config, - ZPOOL_CONFIG_POOL_TXG, pool_txg); - if (nvlist_lookup_string(tmp, ZPOOL_CONFIG_COMMENT, &comment) == 0) fnvlist_add_string(config, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Feb 27 19:20:50 2013 (r247406) @@ -940,7 +940,6 @@ buf_cons(void *vbuf, void *unused, int k bzero(buf, sizeof (arc_buf_t)); mutex_init(&buf->b_evict_lock, NULL, MUTEX_DEFAULT, NULL); - rw_init(&buf->b_data_lock, NULL, RW_DEFAULT, NULL); arc_space_consume(sizeof (arc_buf_t), ARC_SPACE_HDRS); return (0); @@ -970,7 +969,6 @@ buf_dest(void *vbuf, void *unused) arc_buf_t *buf = vbuf; mutex_destroy(&buf->b_evict_lock); - rw_destroy(&buf->b_data_lock); arc_space_return(sizeof (arc_buf_t), ARC_SPACE_HDRS); } @@ -2968,42 +2966,11 @@ arc_read_done(zio_t *zio) * * arc_read_done() will invoke all the requested "done" functions * for readers of this block. - * - * Normal callers should use arc_read and pass the arc buffer and offset - * for the bp. But if you know you don't need locking, you can use - * arc_read_nolock. */ int -arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - int err; - - if (pbuf == NULL) { - /* - * XXX This happens from traverse callback funcs, for - * the objset_phys_t block. - */ - return (arc_read_nolock(pio, spa, bp, done, private, priority, - zio_flags, arc_flags, zb)); - } - - ASSERT(!refcount_is_zero(&pbuf->b_hdr->b_refcnt)); - ASSERT3U((char *)bp - (char *)pbuf->b_data, <, pbuf->b_hdr->b_size); - rw_enter(&pbuf->b_data_lock, RW_READER); - - err = arc_read_nolock(pio, spa, bp, done, private, priority, - zio_flags, arc_flags, zb); - rw_exit(&pbuf->b_data_lock); - - return (err); -} - -int -arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) +arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, + void *private, int priority, int zio_flags, uint32_t *arc_flags, + const zbookmark_t *zb) { arc_buf_hdr_t *hdr; arc_buf_t *buf; @@ -3482,19 +3449,6 @@ arc_release(arc_buf_t *buf, void *tag) } } -/* - * Release this buffer. If it does not match the provided BP, fill it - * with that block's contents. - */ -/* ARGSUSED */ -int -arc_release_bp(arc_buf_t *buf, void *tag, blkptr_t *bp, spa_t *spa, - zbookmark_t *zb) -{ - arc_release(buf, tag); - return (0); -} - int arc_released(arc_buf_t *buf) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Feb 27 19:20:50 2013 (r247406) @@ -135,7 +135,7 @@ bptree_add(objset_t *os, uint64_t obj, b /* ARGSUSED */ static int -bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { int err; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Feb 27 19:20:50 2013 (r247406) @@ -513,7 +513,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t spa_t *spa; zbookmark_t zb; uint32_t aflags = ARC_NOWAIT; - arc_buf_t *pbuf; DB_DNODE_ENTER(db); dn = DB_DNODE(db); @@ -575,14 +574,8 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t db->db.db_object, db->db_level, db->db_blkid); dbuf_add_ref(db, NULL); - /* ZIO_FLAG_CANFAIL callers have to check the parent zio's error */ - if (db->db_parent) - pbuf = db->db_parent->db_buf; - else - pbuf = db->db_objset->os_phys_buf; - - (void) dsl_read(zio, spa, db->db_blkptr, pbuf, + (void) arc_read(zio, spa, db->db_blkptr, dbuf_read_done, db, ZIO_PRIORITY_SYNC_READ, (*flags & DB_RF_CANFAIL) ? ZIO_FLAG_CANFAIL : ZIO_FLAG_MUSTSUCCEED, &aflags, &zb); @@ -982,7 +975,6 @@ void dbuf_release_bp(dmu_buf_impl_t *db) { objset_t *os; - zbookmark_t zb; DB_GET_OBJSET(&os, db); ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); @@ -990,13 +982,7 @@ dbuf_release_bp(dmu_buf_impl_t *db) list_link_active(&os->os_dsl_dataset->ds_synced_link)); ASSERT(db->db_parent == NULL || arc_released(db->db_parent->db_buf)); - zb.zb_objset = os->os_dsl_dataset ? - os->os_dsl_dataset->ds_object : 0; - zb.zb_object = db->db.db_object; - zb.zb_level = db->db_level; - zb.zb_blkid = db->db_blkid; - (void) arc_release_bp(db->db_buf, db, - db->db_blkptr, os->os_spa, &zb); + (void) arc_release(db->db_buf, db); } dbuf_dirty_record_t * @@ -1831,7 +1817,6 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki if (bp && !BP_IS_HOLE(bp)) { int priority = dn->dn_type == DMU_OT_DDT_ZAP ? ZIO_PRIORITY_DDT_PREFETCH : ZIO_PRIORITY_ASYNC_READ; - arc_buf_t *pbuf; dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; zbookmark_t zb; @@ -1839,13 +1824,8 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, 0, blkid); - if (db) - pbuf = db->db_buf; - else - pbuf = dn->dn_objset->os_phys_buf; - - (void) dsl_read(NULL, dn->dn_objset->os_spa, - bp, pbuf, NULL, NULL, priority, + (void) arc_read(NULL, dn->dn_objset->os_spa, + bp, NULL, NULL, priority, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &aflags, &zb); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Wed Feb 27 19:20:50 2013 (r247406) @@ -128,7 +128,7 @@ report_dnode(struct diffarg *da, uint64_ /* ARGSUSED */ static int -diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { struct diffarg *da = arg; @@ -155,9 +155,9 @@ diff_cb(spa_t *spa, zilog_t *zilog, cons int blksz = BP_GET_LSIZE(bp); int i; - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); blk = abuf->b_data; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Feb 27 19:20:50 2013 (r247406) @@ -276,12 +276,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat aflags |= ARC_L2CACHE; dprintf_bp(os->os_rootbp, "reading %s", ""); - /* - * XXX when bprewrite scrub can change the bp, - * and this is called from dmu_objset_open_ds_os, the bp - * could change, and we'll need a lock. - */ - err = dsl_read_nolock(NULL, spa, os->os_rootbp, + err = arc_read(NULL, spa, os->os_rootbp, arc_getbuf_func, &os->os_phys_buf, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &aflags, &zb); if (err) { @@ -1124,8 +1119,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio SET_BOOKMARK(&zb, os->os_dsl_dataset ? os->os_dsl_dataset->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - VERIFY3U(0, ==, arc_release_bp(os->os_phys_buf, &os->os_phys_buf, - os->os_rootbp, os->os_spa, &zb)); + arc_release(os->os_phys_buf, &os->os_phys_buf); dmu_write_policy(os, NULL, 0, 0, &zp); @@ -1764,7 +1758,7 @@ dmu_objset_prefetch(const char *name, vo SET_BOOKMARK(&zb, ds->ds_object, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - (void) dsl_read_nolock(NULL, dsl_dataset_get_spa(ds), + (void) arc_read(NULL, dsl_dataset_get_spa(ds), &ds->ds_phys->ds_bp, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Feb 27 19:20:50 2013 (r247406) @@ -317,7 +317,7 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t /* ARGSUSED */ static int -backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { dmu_sendarg_t *dsp = arg; @@ -346,9 +346,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co uint32_t aflags = ARC_WAIT; arc_buf_t *abuf; - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); blk = abuf->b_data; @@ -365,9 +365,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co arc_buf_t *abuf; int blksz = BP_GET_LSIZE(bp); - if (arc_read_nolock(NULL, spa, bp, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); err = dump_spill(dsp, zb->zb_object, blksz, abuf->b_data); @@ -377,9 +377,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co arc_buf_t *abuf; int blksz = BP_GET_LSIZE(bp); - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) { + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) { if (zfs_send_corrupt_data) { /* Send a block filled with 0x"zfs badd bloc" */ abuf = arc_buf_alloc(spa, blksz, &abuf, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Feb 27 19:20:50 2013 (r247406) @@ -62,9 +62,9 @@ typedef struct traverse_data { } traverse_data_t; static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object); + uint64_t objset, uint64_t object); static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *, - arc_buf_t *buf, uint64_t objset, uint64_t object); + uint64_t objset, uint64_t object); static int traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) @@ -81,7 +81,7 @@ traverse_zil_block(zilog_t *zilog, blkpt SET_BOOKMARK(&zb, td->td_objset, ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, bp->blk_cksum.zc_word[ZIL_ZC_SEQ]); - (void) td->td_func(td->td_spa, zilog, bp, NULL, &zb, NULL, td->td_arg); + (void) td->td_func(td->td_spa, zilog, bp, &zb, NULL, td->td_arg); return (0); } @@ -105,7 +105,7 @@ traverse_zil_record(zilog_t *zilog, lr_t SET_BOOKMARK(&zb, td->td_objset, lr->lr_foid, ZB_ZIL_LEVEL, lr->lr_offset / BP_GET_LSIZE(bp)); - (void) td->td_func(td->td_spa, zilog, bp, NULL, &zb, NULL, + (void) td->td_func(td->td_spa, zilog, bp, &zb, NULL, td->td_arg); } return (0); @@ -182,7 +182,7 @@ traverse_pause(traverse_data_t *td, cons static void traverse_prefetch_metadata(traverse_data_t *td, - arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_t *zb) { uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; @@ -200,14 +200,13 @@ traverse_prefetch_metadata(traverse_data if (BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE) return; - (void) arc_read(NULL, td->td_spa, bp, - pbuf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &flags, zb); + (void) arc_read(NULL, td->td_spa, bp, NULL, NULL, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); } static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_t *zb) { zbookmark_t czb; int err = 0, lasterr = 0; @@ -228,8 +227,7 @@ traverse_visitbp(traverse_data_t *td, co } if (BP_IS_HOLE(bp)) { - err = td->td_func(td->td_spa, NULL, NULL, pbuf, zb, dnp, - td->td_arg); + err = td->td_func(td->td_spa, NULL, NULL, zb, dnp, td->td_arg); return (err); } @@ -249,7 +247,7 @@ traverse_visitbp(traverse_data_t *td, co } if (td->td_flags & TRAVERSE_PRE) { - err = td->td_func(td->td_spa, NULL, bp, pbuf, zb, dnp, + err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); if (err == TRAVERSE_VISIT_NO_CHILDREN) return (0); @@ -265,8 +263,7 @@ traverse_visitbp(traverse_data_t *td, co blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; - err = dsl_read(NULL, td->td_spa, bp, pbuf, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -276,7 +273,7 @@ traverse_visitbp(traverse_data_t *td, co SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - traverse_prefetch_metadata(td, buf, &cbp[i], &czb); + traverse_prefetch_metadata(td, &cbp[i], &czb); } /* recursively visitbp() blocks below this */ @@ -284,7 +281,7 @@ traverse_visitbp(traverse_data_t *td, co SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - err = traverse_visitbp(td, dnp, buf, &cbp[i], &czb); + err = traverse_visitbp(td, dnp, &cbp[i], &czb); if (err) { if (!hard) break; @@ -296,21 +293,20 @@ traverse_visitbp(traverse_data_t *td, co int i; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; - err = dsl_read(NULL, td->td_spa, bp, pbuf, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); dnp = buf->b_data; for (i = 0; i < epb; i++) { - prefetch_dnode_metadata(td, &dnp[i], buf, zb->zb_objset, + prefetch_dnode_metadata(td, &dnp[i], zb->zb_objset, zb->zb_blkid * epb + i); } /* recursively visitbp() blocks below this */ for (i = 0; i < epb; i++) { - err = traverse_dnode(td, &dnp[i], buf, zb->zb_objset, + err = traverse_dnode(td, &dnp[i], zb->zb_objset, zb->zb_blkid * epb + i); if (err) { if (!hard) @@ -323,24 +319,23 @@ traverse_visitbp(traverse_data_t *td, co objset_phys_t *osp; dnode_phys_t *dnp; - err = dsl_read_nolock(NULL, td->td_spa, bp, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); osp = buf->b_data; dnp = &osp->os_meta_dnode; - prefetch_dnode_metadata(td, dnp, buf, zb->zb_objset, + prefetch_dnode_metadata(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { prefetch_dnode_metadata(td, &osp->os_userused_dnode, - buf, zb->zb_objset, DMU_USERUSED_OBJECT); + zb->zb_objset, DMU_USERUSED_OBJECT); prefetch_dnode_metadata(td, &osp->os_groupused_dnode, - buf, zb->zb_objset, DMU_USERUSED_OBJECT); + zb->zb_objset, DMU_USERUSED_OBJECT); } - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err && hard) { lasterr = err; @@ -348,7 +343,7 @@ traverse_visitbp(traverse_data_t *td, co } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_userused_dnode; - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_USERUSED_OBJECT); } if (err && hard) { @@ -357,7 +352,7 @@ traverse_visitbp(traverse_data_t *td, co } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_groupused_dnode; - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } } @@ -367,8 +362,7 @@ traverse_visitbp(traverse_data_t *td, co post: if (err == 0 && lasterr == 0 && (td->td_flags & TRAVERSE_POST)) { - err = td->td_func(td->td_spa, NULL, bp, pbuf, zb, dnp, - td->td_arg); + err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); if (err == ERESTART) pause = B_TRUE; } @@ -384,25 +378,25 @@ post: static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object) + uint64_t objset, uint64_t object) { int j; zbookmark_t czb; for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - traverse_prefetch_metadata(td, buf, &dnp->dn_blkptr[j], &czb); + traverse_prefetch_metadata(td, &dnp->dn_blkptr[j], &czb); } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); - traverse_prefetch_metadata(td, buf, &dnp->dn_spill, &czb); + traverse_prefetch_metadata(td, &dnp->dn_spill, &czb); } } static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object) + uint64_t objset, uint64_t object) { int j, err = 0, lasterr = 0; zbookmark_t czb; @@ -410,7 +404,7 @@ traverse_dnode(traverse_data_t *td, cons for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - err = traverse_visitbp(td, dnp, buf, &dnp->dn_blkptr[j], &czb); + err = traverse_visitbp(td, dnp, &dnp->dn_blkptr[j], &czb); if (err) { if (!hard) break; @@ -420,7 +414,7 @@ traverse_dnode(traverse_data_t *td, cons if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); - err = traverse_visitbp(td, dnp, buf, &dnp->dn_spill, &czb); + err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); if (err) { if (!hard) return (err); @@ -433,8 +427,7 @@ traverse_dnode(traverse_data_t *td, cons /* ARGSUSED */ static int traverse_prefetcher(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, - void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { prefetch_data_t *pfd = arg; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; @@ -455,10 +448,8 @@ traverse_prefetcher(spa_t *spa, zilog_t cv_broadcast(&pfd->pd_cv); mutex_exit(&pfd->pd_mtx); - (void) dsl_read(NULL, spa, bp, pbuf, NULL, NULL, - ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, - &aflags, zb); + (void) arc_read(NULL, spa, bp, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &aflags, zb); return (0); } @@ -476,7 +467,7 @@ traverse_prefetch_thread(void *arg) SET_BOOKMARK(&czb, td.td_objset, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - (void) traverse_visitbp(&td, NULL, NULL, td.td_rootbp, &czb); + (void) traverse_visitbp(&td, NULL, td.td_rootbp, &czb); mutex_enter(&td_main->td_pfd->pd_mtx); td_main->td_pfd->pd_exited = B_TRUE; @@ -540,7 +531,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t SET_BOOKMARK(&czb, td.td_objset, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - err = traverse_visitbp(&td, NULL, NULL, rootbp, &czb); + err = traverse_visitbp(&td, NULL, rootbp, &czb); mutex_enter(&pd.pd_mtx); pd.pd_cancel = B_TRUE; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Feb 27 19:20:50 2013 (r247406) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u delta = P2NPHASE(off, dn->dn_datablksz); } + min_ibs = max_ibs = dn->dn_indblkshift; if (dn->dn_maxblkid > 0) { /* * The blocksize can't change, @@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ ASSERT(dn->dn_datablkshift != 0); min_bs = max_bs = dn->dn_datablkshift; - min_ibs = max_ibs = dn->dn_indblkshift; - } else if (dn->dn_indblkshift > max_ibs) { - /* - * This ensures that if we reduce DN_MAX_INDBLKSHIFT, - * the code will still work correctly on older pools. - */ - min_ibs = max_ibs = dn->dn_indblkshift; } /* Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Feb 27 19:20:50 2013 (r247406) @@ -1308,7 +1308,7 @@ struct killarg { /* ARGSUSED */ static int -kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { struct killarg *ka = arg; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 27 19:20:50 2013 (r247406) @@ -396,24 +396,6 @@ dsl_free_sync(zio_t *pio, dsl_pool_t *dp zio_nowait(zio_free_sync(pio, dp->dp_spa, txg, bpp, pio->io_flags)); } -int -dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - return (arc_read(pio, spa, bpp, pbuf, done, private, - priority, zio_flags, arc_flags, zb)); -} - -int -dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - return (arc_read_nolock(pio, spa, bpp, done, private, - priority, zio_flags, arc_flags, zb)); -} - static uint64_t dsl_scan_ds_maxtxg(dsl_dataset_t *ds) { @@ -584,12 +566,8 @@ dsl_scan_prefetch(dsl_scan_t *scn, arc_b SET_BOOKMARK(&czb, objset, object, BP_GET_LEVEL(bp), blkid); - /* - * XXX need to make sure all of these arc_read() prefetches are - * done before setting xlateall (similar to dsl_read()) - */ (void) arc_read(scn->scn_zio_root, scn->scn_dp->dp_spa, bp, - buf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + NULL, NULL, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD, &flags, &czb); } @@ -647,8 +625,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -670,8 +647,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da } else if (BP_GET_TYPE(bp) == DMU_OT_USERGROUP_USED) { uint32_t flags = ARC_WAIT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -683,8 +659,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da int i, j; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -706,8 +681,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da uint32_t flags = ARC_WAIT; objset_phys_t *osp; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 19:20:50 2013 (r247406) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #include @@ -97,6 +98,15 @@ int metaslab_prefetch_limit = SPA_DVAS_P int metaslab_smo_bonus_pct = 150; /* + * Should we be willing to write data to degraded vdevs? + */ +boolean_t zfs_write_to_degraded = B_FALSE; +SYSCTL_INT(_vfs_zfs, OID_AUTO, write_to_degraded, CTLFLAG_RW, + &zfs_write_to_degraded, 0, + "Allow writing data to degraded vdevs"); +TUNABLE_INT("vfs.zfs.write_to_degraded", &zfs_write_to_degraded); + +/* * ========================================================================== * Metaslab classes * ========================================================================== @@ -1383,10 +1393,13 @@ top: /* * Avoid writing single-copy data to a failing vdev + * unless the user instructs us that it is okay. */ if ((vd->vdev_stat.vs_write_errors > 0 || vd->vdev_state < VDEV_STATE_HEALTHY) && - d == 0 && dshift == 3) { + d == 0 && dshift == 3 && + !(zfs_write_to_degraded && vd->vdev_state == + VDEV_STATE_DEGRADED)) { all_zero = B_FALSE; goto next; } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Wed Feb 27 19:20:50 2013 (r247406) @@ -553,6 +553,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ { int var_size = 0; int i; + int j = -1; int full_space; int hdrsize; boolean_t done = B_FALSE; @@ -574,11 +575,13 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ sizeof (sa_hdr_phys_t); full_space = (buftype == SA_BONUS) ? DN_MAX_BONUSLEN : db->db_size; + ASSERT(IS_P2ALIGNED(full_space, 8)); for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += P2ROUNDUP(attr_desc[i].sa_length, 8); + *total = P2ROUNDUP(*total, 8); + *total += attr_desc[i].sa_length; if (done) goto next; @@ -590,7 +593,14 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ if (is_var_sz && var_size > 1) { if (P2ROUNDUP(hdrsize + sizeof (uint16_t), 8) + *total < full_space) { + /* + * Account for header space used by array of + * optional sizes of variable-length attributes. + * Record the index in case this increase needs + * to be reversed due to spill-over. + */ hdrsize += sizeof (uint16_t); + j = i; } else { done = B_TRUE; *index = i; @@ -619,6 +629,14 @@ next: *will_spill = B_TRUE; } + /* + * j holds the index of the last variable-sized attribute for + * which hdrsize was increased. Reverse the increase if that + * attribute will be relocated to the spill block. + */ + if (*will_spill && j == *index) + hdrsize -= sizeof (uint16_t); + hdrsize = P2ROUNDUP(hdrsize, 8); return (hdrsize); } @@ -709,6 +727,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu for (i = 0, len_idx = 0, hash = -1ULL; i != attr_count; i++) { uint16_t length; + ASSERT(IS_P2ALIGNED(data_start, 8)); + ASSERT(IS_P2ALIGNED(buf_space, 8)); attrs[i] = attr_desc[i].sa_attr; length = SA_REGISTERED_LEN(sa, attrs[i]); if (length == 0) @@ -717,6 +737,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu VERIFY(length == attr_desc[i].sa_length); if (buf_space < length) { /* switch to spill buffer */ + VERIFY(spilling); VERIFY(bonustype == DMU_OT_SA); if (buftype == SA_BONUS && !sa->sa_force_spill) { sa_find_layout(hdl->sa_os, hash, attrs_start, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Feb 27 19:20:50 2013 (r247406) @@ -1764,7 +1764,7 @@ spa_load_verify_done(zio_t *zio) /*ARGSUSED*/ static int spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { if (bp != NULL) { zio_t *rio = arg; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Feb 27 19:20:50 2013 (r247406) @@ -49,7 +49,6 @@ struct arc_buf { arc_buf_hdr_t *b_hdr; arc_buf_t *b_next; kmutex_t b_evict_lock; - krwlock_t b_data_lock; void *b_data; arc_evict_func_t *b_efunc; void *b_private; @@ -93,8 +92,6 @@ void arc_buf_add_ref(arc_buf_t *buf, voi int arc_buf_remove_ref(arc_buf_t *buf, void *tag); int arc_buf_size(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); -int arc_release_bp(arc_buf_t *buf, void *tag, blkptr_t *bp, spa_t *spa, - zbookmark_t *zb); int arc_released(arc_buf_t *buf); int arc_has_callback(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); @@ -103,10 +100,7 @@ void arc_buf_thaw(arc_buf_t *buf); int arc_referenced(arc_buf_t *buf); #endif -int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); -int arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp, +int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, void *priv, int priority, int flags, uint32_t *arc_flags, const zbookmark_t *zb); zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Wed Feb 27 19:20:50 2013 (r247406) @@ -40,8 +40,7 @@ struct zilog; struct arc_buf; typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - struct arc_buf *pbuf, const zbookmark_t *zb, const struct dnode_phys *dnp, - void *arg); + const zbookmark_t *zb, const struct dnode_phys *dnp, void *arg); #define TRAVERSE_PRE (1<<0) #define TRAVERSE_POST (1<<1) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Feb 27 19:20:50 2013 (r247406) @@ -134,12 +134,6 @@ void dsl_pool_willuse_space(dsl_pool_t * void dsl_free(dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp); void dsl_free_sync(zio_t *pio, dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp); -int dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); -int dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); void dsl_pool_create_origin(dsl_pool_t *dp, dmu_tx_t *tx); void dsl_pool_upgrade_clones(dsl_pool_t *dp, dmu_tx_t *tx); void dsl_pool_upgrade_dir_clones(dsl_pool_t *dp, dmu_tx_t *tx); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Feb 27 19:20:50 2013 (r247406) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_REFCOUNT_H @@ -54,8 +55,8 @@ typedef struct refcount { kmutex_t rc_mtx; list_t rc_list; list_t rc_removed; - int64_t rc_count; - int64_t rc_removed_count; + uint64_t rc_count; + uint64_t rc_removed_count; } refcount_t; /* Note: refcount_t must be initialized with refcount_create() */ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Feb 27 19:20:50 2013 (r247406) @@ -1328,7 +1328,8 @@ vdev_validate(vdev_t *vd, boolean_t stri if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) { uint64_t aux_guid = 0; nvlist_t *nvl; - uint64_t txg = strict ? spa->spa_config_txg : -1ULL; + uint64_t txg = spa_last_synced_txg(spa) != 0 ? + spa_last_synced_txg(spa) : -1ULL; if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, @@ -1512,7 +1513,7 @@ vdev_reopen(vdev_t *vd) !l2arc_vdev_present(vd)) l2arc_add_vdev(spa, vd); } else { - (void) vdev_validate(vd, spa_last_synced_txg(spa)); + (void) vdev_validate(vd, B_TRUE); } /* Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 27 19:03:31 2013 (r247405) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 27 19:20:50 2013 (r247406) @@ -106,12 +106,18 @@ typedef enum { DATASET_NAME } zfs_ioc_namecheck_t; +typedef enum { + POOL_CHECK_NONE = 1 << 0, + POOL_CHECK_SUSPENDED = 1 << 1, + POOL_CHECK_READONLY = 1 << 2 +} zfs_ioc_poolcheck_t; + typedef struct zfs_ioc_vec { zfs_ioc_func_t *zvec_func; zfs_secpolicy_func_t *zvec_secpolicy; zfs_ioc_namecheck_t zvec_namecheck; boolean_t zvec_his_log; - boolean_t zvec_pool_check; + zfs_ioc_poolcheck_t zvec_pool_check; } zfs_ioc_vec_t; /* This array is indexed by zfs_userquota_prop_t */ @@ -5033,138 +5039,155 @@ zfs_ioc_unjail(zfs_cmd_t *zc) static zfs_ioc_vec_t zfs_ioc_vec[] = { { zfs_ioc_pool_create, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_destroy, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_import, zfs_secpolicy_config, POOL_NAME, B_TRUE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_export, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 19:22:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EACE0B4F; Wed, 27 Feb 2013 19:22:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C283B93D; Wed, 27 Feb 2013 19:22:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RJMVTc073041; Wed, 27 Feb 2013 19:22:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RJMRap073016; Wed, 27 Feb 2013 19:22:27 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201302271922.r1RJMRap073016@svn.freebsd.org> From: Martin Matuska Date: Wed, 27 Feb 2013 19:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247407 - in stable/8: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 19:22:32 -0000 Author: mm Date: Wed Feb 27 19:22:27 2013 New Revision: 247407 URL: http://svnweb.freebsd.org/changeset/base/247407 Log: MFC r246631,246651,246666,246675,246678,246688: Merge various ZFS bugfixes MFC r246631: Import vendor bugfixes Illumos ZFS issues: 3422 zpool create/syseventd race yield non-importable pool 3425 first write to a new zvol can fail with EFBIG MFC r246651: Import minor type change in refcount.h header from vendor (illumos). MFC r246666: Import vendor ZFS bugfix fixing a problem in arc_read(). Illumos ZFS issues: 3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt) MFC r246675: Add tunable to allow block allocation on degraded vdevs. Illumos ZFS issues: 3507 Tunable to allow block allocation even on degraded vdevs MFC r246678: Import vendor bugfixes regarding SA rounding, header size and layout. This was already partially fixed by avg. Illumos ZFS issues: 3512 rounding discrepancy in sa_find_sizes() 3513 mismatch between SA header size and layout MFC r246688 [1]: Merge zfs_ioctl.c code that should have been merged together with ZFS v28. Fixes several problems if working with read-only pools. Changed code originaly introduced in onnv-gate 13061:bda0decf867b Contains changes up to illumos-gate 13700:4bc0783f6064 PR: kern/175897 [1] Suggested by: avg [1] Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 19:22:27 2013 (r247407) @@ -983,7 +983,7 @@ visit_indirect(spa_t *spa, const dnode_p arc_buf_t *buf; uint64_t fill = 0; - err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf, + err = arc_read(NULL, spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -2001,9 +2001,8 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } -/* ARGSUSED */ static int -zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; @@ -2410,7 +2409,7 @@ typedef struct zdb_ddt_entry { /* ARGSUSED */ static int zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { avl_tree_t *t = arg; avl_index_t where; Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Wed Feb 27 19:22:27 2013 (r247407) @@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_l * version * pool guid * name - * pool txg (if available) * comment (if available) * pool state * hostid (if available) * hostname (if available) */ - uint64_t state, version, pool_txg; + uint64_t state, version; char *comment = NULL; version = fnvlist_lookup_uint64(tmp, @@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_l fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, name); - if (nvlist_lookup_uint64(tmp, - ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0) - fnvlist_add_uint64(config, - ZPOOL_CONFIG_POOL_TXG, pool_txg); - if (nvlist_lookup_string(tmp, ZPOOL_CONFIG_COMMENT, &comment) == 0) fnvlist_add_string(config, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Feb 27 19:22:27 2013 (r247407) @@ -940,7 +940,6 @@ buf_cons(void *vbuf, void *unused, int k bzero(buf, sizeof (arc_buf_t)); mutex_init(&buf->b_evict_lock, NULL, MUTEX_DEFAULT, NULL); - rw_init(&buf->b_data_lock, NULL, RW_DEFAULT, NULL); arc_space_consume(sizeof (arc_buf_t), ARC_SPACE_HDRS); return (0); @@ -970,7 +969,6 @@ buf_dest(void *vbuf, void *unused) arc_buf_t *buf = vbuf; mutex_destroy(&buf->b_evict_lock); - rw_destroy(&buf->b_data_lock); arc_space_return(sizeof (arc_buf_t), ARC_SPACE_HDRS); } @@ -2968,42 +2966,11 @@ arc_read_done(zio_t *zio) * * arc_read_done() will invoke all the requested "done" functions * for readers of this block. - * - * Normal callers should use arc_read and pass the arc buffer and offset - * for the bp. But if you know you don't need locking, you can use - * arc_read_nolock. */ int -arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - int err; - - if (pbuf == NULL) { - /* - * XXX This happens from traverse callback funcs, for - * the objset_phys_t block. - */ - return (arc_read_nolock(pio, spa, bp, done, private, priority, - zio_flags, arc_flags, zb)); - } - - ASSERT(!refcount_is_zero(&pbuf->b_hdr->b_refcnt)); - ASSERT3U((char *)bp - (char *)pbuf->b_data, <, pbuf->b_hdr->b_size); - rw_enter(&pbuf->b_data_lock, RW_READER); - - err = arc_read_nolock(pio, spa, bp, done, private, priority, - zio_flags, arc_flags, zb); - rw_exit(&pbuf->b_data_lock); - - return (err); -} - -int -arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) +arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, + void *private, int priority, int zio_flags, uint32_t *arc_flags, + const zbookmark_t *zb) { arc_buf_hdr_t *hdr; arc_buf_t *buf; @@ -3482,19 +3449,6 @@ arc_release(arc_buf_t *buf, void *tag) } } -/* - * Release this buffer. If it does not match the provided BP, fill it - * with that block's contents. - */ -/* ARGSUSED */ -int -arc_release_bp(arc_buf_t *buf, void *tag, blkptr_t *bp, spa_t *spa, - zbookmark_t *zb) -{ - arc_release(buf, tag); - return (0); -} - int arc_released(arc_buf_t *buf) { Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Feb 27 19:22:27 2013 (r247407) @@ -135,7 +135,7 @@ bptree_add(objset_t *os, uint64_t obj, b /* ARGSUSED */ static int -bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { int err; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Feb 27 19:22:27 2013 (r247407) @@ -513,7 +513,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t spa_t *spa; zbookmark_t zb; uint32_t aflags = ARC_NOWAIT; - arc_buf_t *pbuf; DB_DNODE_ENTER(db); dn = DB_DNODE(db); @@ -575,14 +574,8 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t db->db.db_object, db->db_level, db->db_blkid); dbuf_add_ref(db, NULL); - /* ZIO_FLAG_CANFAIL callers have to check the parent zio's error */ - if (db->db_parent) - pbuf = db->db_parent->db_buf; - else - pbuf = db->db_objset->os_phys_buf; - - (void) dsl_read(zio, spa, db->db_blkptr, pbuf, + (void) arc_read(zio, spa, db->db_blkptr, dbuf_read_done, db, ZIO_PRIORITY_SYNC_READ, (*flags & DB_RF_CANFAIL) ? ZIO_FLAG_CANFAIL : ZIO_FLAG_MUSTSUCCEED, &aflags, &zb); @@ -982,7 +975,6 @@ void dbuf_release_bp(dmu_buf_impl_t *db) { objset_t *os; - zbookmark_t zb; DB_GET_OBJSET(&os, db); ASSERT(dsl_pool_sync_context(dmu_objset_pool(os))); @@ -990,13 +982,7 @@ dbuf_release_bp(dmu_buf_impl_t *db) list_link_active(&os->os_dsl_dataset->ds_synced_link)); ASSERT(db->db_parent == NULL || arc_released(db->db_parent->db_buf)); - zb.zb_objset = os->os_dsl_dataset ? - os->os_dsl_dataset->ds_object : 0; - zb.zb_object = db->db.db_object; - zb.zb_level = db->db_level; - zb.zb_blkid = db->db_blkid; - (void) arc_release_bp(db->db_buf, db, - db->db_blkptr, os->os_spa, &zb); + (void) arc_release(db->db_buf, db); } dbuf_dirty_record_t * @@ -1831,7 +1817,6 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki if (bp && !BP_IS_HOLE(bp)) { int priority = dn->dn_type == DMU_OT_DDT_ZAP ? ZIO_PRIORITY_DDT_PREFETCH : ZIO_PRIORITY_ASYNC_READ; - arc_buf_t *pbuf; dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; zbookmark_t zb; @@ -1839,13 +1824,8 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, 0, blkid); - if (db) - pbuf = db->db_buf; - else - pbuf = dn->dn_objset->os_phys_buf; - - (void) dsl_read(NULL, dn->dn_objset->os_spa, - bp, pbuf, NULL, NULL, priority, + (void) arc_read(NULL, dn->dn_objset->os_spa, + bp, NULL, NULL, priority, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &aflags, &zb); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Wed Feb 27 19:22:27 2013 (r247407) @@ -128,7 +128,7 @@ report_dnode(struct diffarg *da, uint64_ /* ARGSUSED */ static int -diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { struct diffarg *da = arg; @@ -155,9 +155,9 @@ diff_cb(spa_t *spa, zilog_t *zilog, cons int blksz = BP_GET_LSIZE(bp); int i; - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); blk = abuf->b_data; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Feb 27 19:22:27 2013 (r247407) @@ -276,12 +276,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat aflags |= ARC_L2CACHE; dprintf_bp(os->os_rootbp, "reading %s", ""); - /* - * XXX when bprewrite scrub can change the bp, - * and this is called from dmu_objset_open_ds_os, the bp - * could change, and we'll need a lock. - */ - err = dsl_read_nolock(NULL, spa, os->os_rootbp, + err = arc_read(NULL, spa, os->os_rootbp, arc_getbuf_func, &os->os_phys_buf, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &aflags, &zb); if (err) { @@ -1124,8 +1119,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio SET_BOOKMARK(&zb, os->os_dsl_dataset ? os->os_dsl_dataset->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - VERIFY3U(0, ==, arc_release_bp(os->os_phys_buf, &os->os_phys_buf, - os->os_rootbp, os->os_spa, &zb)); + arc_release(os->os_phys_buf, &os->os_phys_buf); dmu_write_policy(os, NULL, 0, 0, &zp); @@ -1764,7 +1758,7 @@ dmu_objset_prefetch(const char *name, vo SET_BOOKMARK(&zb, ds->ds_object, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - (void) dsl_read_nolock(NULL, dsl_dataset_get_spa(ds), + (void) arc_read(NULL, dsl_dataset_get_spa(ds), &ds->ds_phys->ds_bp, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Feb 27 19:22:27 2013 (r247407) @@ -317,7 +317,7 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t /* ARGSUSED */ static int -backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { dmu_sendarg_t *dsp = arg; @@ -346,9 +346,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co uint32_t aflags = ARC_WAIT; arc_buf_t *abuf; - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); blk = abuf->b_data; @@ -365,9 +365,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co arc_buf_t *abuf; int blksz = BP_GET_LSIZE(bp); - if (arc_read_nolock(NULL, spa, bp, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) return (EIO); err = dump_spill(dsp, zb->zb_object, blksz, abuf->b_data); @@ -377,9 +377,9 @@ backup_cb(spa_t *spa, zilog_t *zilog, co arc_buf_t *abuf; int blksz = BP_GET_LSIZE(bp); - if (dsl_read(NULL, spa, bp, pbuf, - arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &aflags, zb) != 0) { + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, + &aflags, zb) != 0) { if (zfs_send_corrupt_data) { /* Send a block filled with 0x"zfs badd bloc" */ abuf = arc_buf_alloc(spa, blksz, &abuf, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Feb 27 19:22:27 2013 (r247407) @@ -62,9 +62,9 @@ typedef struct traverse_data { } traverse_data_t; static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object); + uint64_t objset, uint64_t object); static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *, - arc_buf_t *buf, uint64_t objset, uint64_t object); + uint64_t objset, uint64_t object); static int traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) @@ -81,7 +81,7 @@ traverse_zil_block(zilog_t *zilog, blkpt SET_BOOKMARK(&zb, td->td_objset, ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, bp->blk_cksum.zc_word[ZIL_ZC_SEQ]); - (void) td->td_func(td->td_spa, zilog, bp, NULL, &zb, NULL, td->td_arg); + (void) td->td_func(td->td_spa, zilog, bp, &zb, NULL, td->td_arg); return (0); } @@ -105,7 +105,7 @@ traverse_zil_record(zilog_t *zilog, lr_t SET_BOOKMARK(&zb, td->td_objset, lr->lr_foid, ZB_ZIL_LEVEL, lr->lr_offset / BP_GET_LSIZE(bp)); - (void) td->td_func(td->td_spa, zilog, bp, NULL, &zb, NULL, + (void) td->td_func(td->td_spa, zilog, bp, &zb, NULL, td->td_arg); } return (0); @@ -182,7 +182,7 @@ traverse_pause(traverse_data_t *td, cons static void traverse_prefetch_metadata(traverse_data_t *td, - arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_t *zb) { uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; @@ -200,14 +200,13 @@ traverse_prefetch_metadata(traverse_data if (BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE) return; - (void) arc_read(NULL, td->td_spa, bp, - pbuf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL, &flags, zb); + (void) arc_read(NULL, td->td_spa, bp, NULL, NULL, + ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); } static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) + const blkptr_t *bp, const zbookmark_t *zb) { zbookmark_t czb; int err = 0, lasterr = 0; @@ -228,8 +227,7 @@ traverse_visitbp(traverse_data_t *td, co } if (BP_IS_HOLE(bp)) { - err = td->td_func(td->td_spa, NULL, NULL, pbuf, zb, dnp, - td->td_arg); + err = td->td_func(td->td_spa, NULL, NULL, zb, dnp, td->td_arg); return (err); } @@ -249,7 +247,7 @@ traverse_visitbp(traverse_data_t *td, co } if (td->td_flags & TRAVERSE_PRE) { - err = td->td_func(td->td_spa, NULL, bp, pbuf, zb, dnp, + err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); if (err == TRAVERSE_VISIT_NO_CHILDREN) return (0); @@ -265,8 +263,7 @@ traverse_visitbp(traverse_data_t *td, co blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; - err = dsl_read(NULL, td->td_spa, bp, pbuf, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); @@ -276,7 +273,7 @@ traverse_visitbp(traverse_data_t *td, co SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - traverse_prefetch_metadata(td, buf, &cbp[i], &czb); + traverse_prefetch_metadata(td, &cbp[i], &czb); } /* recursively visitbp() blocks below this */ @@ -284,7 +281,7 @@ traverse_visitbp(traverse_data_t *td, co SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - err = traverse_visitbp(td, dnp, buf, &cbp[i], &czb); + err = traverse_visitbp(td, dnp, &cbp[i], &czb); if (err) { if (!hard) break; @@ -296,21 +293,20 @@ traverse_visitbp(traverse_data_t *td, co int i; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; - err = dsl_read(NULL, td->td_spa, bp, pbuf, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); dnp = buf->b_data; for (i = 0; i < epb; i++) { - prefetch_dnode_metadata(td, &dnp[i], buf, zb->zb_objset, + prefetch_dnode_metadata(td, &dnp[i], zb->zb_objset, zb->zb_blkid * epb + i); } /* recursively visitbp() blocks below this */ for (i = 0; i < epb; i++) { - err = traverse_dnode(td, &dnp[i], buf, zb->zb_objset, + err = traverse_dnode(td, &dnp[i], zb->zb_objset, zb->zb_blkid * epb + i); if (err) { if (!hard) @@ -323,24 +319,23 @@ traverse_visitbp(traverse_data_t *td, co objset_phys_t *osp; dnode_phys_t *dnp; - err = dsl_read_nolock(NULL, td->td_spa, bp, - arc_getbuf_func, &buf, + err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); osp = buf->b_data; dnp = &osp->os_meta_dnode; - prefetch_dnode_metadata(td, dnp, buf, zb->zb_objset, + prefetch_dnode_metadata(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { prefetch_dnode_metadata(td, &osp->os_userused_dnode, - buf, zb->zb_objset, DMU_USERUSED_OBJECT); + zb->zb_objset, DMU_USERUSED_OBJECT); prefetch_dnode_metadata(td, &osp->os_groupused_dnode, - buf, zb->zb_objset, DMU_USERUSED_OBJECT); + zb->zb_objset, DMU_USERUSED_OBJECT); } - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err && hard) { lasterr = err; @@ -348,7 +343,7 @@ traverse_visitbp(traverse_data_t *td, co } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_userused_dnode; - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_USERUSED_OBJECT); } if (err && hard) { @@ -357,7 +352,7 @@ traverse_visitbp(traverse_data_t *td, co } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { dnp = &osp->os_groupused_dnode; - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + err = traverse_dnode(td, dnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } } @@ -367,8 +362,7 @@ traverse_visitbp(traverse_data_t *td, co post: if (err == 0 && lasterr == 0 && (td->td_flags & TRAVERSE_POST)) { - err = td->td_func(td->td_spa, NULL, bp, pbuf, zb, dnp, - td->td_arg); + err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); if (err == ERESTART) pause = B_TRUE; } @@ -384,25 +378,25 @@ post: static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object) + uint64_t objset, uint64_t object) { int j; zbookmark_t czb; for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - traverse_prefetch_metadata(td, buf, &dnp->dn_blkptr[j], &czb); + traverse_prefetch_metadata(td, &dnp->dn_blkptr[j], &czb); } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); - traverse_prefetch_metadata(td, buf, &dnp->dn_spill, &czb); + traverse_prefetch_metadata(td, &dnp->dn_spill, &czb); } } static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *buf, uint64_t objset, uint64_t object) + uint64_t objset, uint64_t object) { int j, err = 0, lasterr = 0; zbookmark_t czb; @@ -410,7 +404,7 @@ traverse_dnode(traverse_data_t *td, cons for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - err = traverse_visitbp(td, dnp, buf, &dnp->dn_blkptr[j], &czb); + err = traverse_visitbp(td, dnp, &dnp->dn_blkptr[j], &czb); if (err) { if (!hard) break; @@ -420,7 +414,7 @@ traverse_dnode(traverse_data_t *td, cons if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); - err = traverse_visitbp(td, dnp, buf, &dnp->dn_spill, &czb); + err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); if (err) { if (!hard) return (err); @@ -433,8 +427,7 @@ traverse_dnode(traverse_data_t *td, cons /* ARGSUSED */ static int traverse_prefetcher(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, - void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { prefetch_data_t *pfd = arg; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; @@ -455,10 +448,8 @@ traverse_prefetcher(spa_t *spa, zilog_t cv_broadcast(&pfd->pd_cv); mutex_exit(&pfd->pd_mtx); - (void) dsl_read(NULL, spa, bp, pbuf, NULL, NULL, - ZIO_PRIORITY_ASYNC_READ, - ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, - &aflags, zb); + (void) arc_read(NULL, spa, bp, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &aflags, zb); return (0); } @@ -476,7 +467,7 @@ traverse_prefetch_thread(void *arg) SET_BOOKMARK(&czb, td.td_objset, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - (void) traverse_visitbp(&td, NULL, NULL, td.td_rootbp, &czb); + (void) traverse_visitbp(&td, NULL, td.td_rootbp, &czb); mutex_enter(&td_main->td_pfd->pd_mtx); td_main->td_pfd->pd_exited = B_TRUE; @@ -540,7 +531,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t SET_BOOKMARK(&czb, td.td_objset, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); - err = traverse_visitbp(&td, NULL, NULL, rootbp, &czb); + err = traverse_visitbp(&td, NULL, rootbp, &czb); mutex_enter(&pd.pd_mtx); pd.pd_cancel = B_TRUE; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Feb 27 19:22:27 2013 (r247407) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u delta = P2NPHASE(off, dn->dn_datablksz); } + min_ibs = max_ibs = dn->dn_indblkshift; if (dn->dn_maxblkid > 0) { /* * The blocksize can't change, @@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ ASSERT(dn->dn_datablkshift != 0); min_bs = max_bs = dn->dn_datablkshift; - min_ibs = max_ibs = dn->dn_indblkshift; - } else if (dn->dn_indblkshift > max_ibs) { - /* - * This ensures that if we reduce DN_MAX_INDBLKSHIFT, - * the code will still work correctly on older pools. - */ - min_ibs = max_ibs = dn->dn_indblkshift; } /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Feb 27 19:22:27 2013 (r247407) @@ -1308,7 +1308,7 @@ struct killarg { /* ARGSUSED */ static int -kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, +kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { struct killarg *ka = arg; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Feb 27 19:22:27 2013 (r247407) @@ -396,24 +396,6 @@ dsl_free_sync(zio_t *pio, dsl_pool_t *dp zio_nowait(zio_free_sync(pio, dp->dp_spa, txg, bpp, pio->io_flags)); } -int -dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - return (arc_read(pio, spa, bpp, pbuf, done, private, - priority, zio_flags, arc_flags, zb)); -} - -int -dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp, - arc_done_func_t *done, void *private, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb) -{ - return (arc_read_nolock(pio, spa, bpp, done, private, - priority, zio_flags, arc_flags, zb)); -} - static uint64_t dsl_scan_ds_maxtxg(dsl_dataset_t *ds) { @@ -584,12 +566,8 @@ dsl_scan_prefetch(dsl_scan_t *scn, arc_b SET_BOOKMARK(&czb, objset, object, BP_GET_LEVEL(bp), blkid); - /* - * XXX need to make sure all of these arc_read() prefetches are - * done before setting xlateall (similar to dsl_read()) - */ (void) arc_read(scn->scn_zio_root, scn->scn_dp->dp_spa, bp, - buf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + NULL, NULL, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD, &flags, &czb); } @@ -647,8 +625,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -670,8 +647,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da } else if (BP_GET_TYPE(bp) == DMU_OT_USERGROUP_USED) { uint32_t flags = ARC_WAIT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -683,8 +659,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da int i, j; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; @@ -706,8 +681,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_da uint32_t flags = ARC_WAIT; objset_phys_t *osp; - err = arc_read_nolock(NULL, dp->dp_spa, bp, - arc_getbuf_func, bufp, + err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp, ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb); if (err) { scn->scn_phys.scn_errors++; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 19:22:27 2013 (r247407) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #include @@ -97,6 +98,15 @@ int metaslab_prefetch_limit = SPA_DVAS_P int metaslab_smo_bonus_pct = 150; /* + * Should we be willing to write data to degraded vdevs? + */ +boolean_t zfs_write_to_degraded = B_FALSE; +SYSCTL_INT(_vfs_zfs, OID_AUTO, write_to_degraded, CTLFLAG_RW, + &zfs_write_to_degraded, 0, + "Allow writing data to degraded vdevs"); +TUNABLE_INT("vfs.zfs.write_to_degraded", &zfs_write_to_degraded); + +/* * ========================================================================== * Metaslab classes * ========================================================================== @@ -1383,10 +1393,13 @@ top: /* * Avoid writing single-copy data to a failing vdev + * unless the user instructs us that it is okay. */ if ((vd->vdev_stat.vs_write_errors > 0 || vd->vdev_state < VDEV_STATE_HEALTHY) && - d == 0 && dshift == 3) { + d == 0 && dshift == 3 && + !(zfs_write_to_degraded && vd->vdev_state == + VDEV_STATE_DEGRADED)) { all_zero = B_FALSE; goto next; } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Wed Feb 27 19:22:27 2013 (r247407) @@ -553,6 +553,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ { int var_size = 0; int i; + int j = -1; int full_space; int hdrsize; boolean_t done = B_FALSE; @@ -574,11 +575,13 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ sizeof (sa_hdr_phys_t); full_space = (buftype == SA_BONUS) ? DN_MAX_BONUSLEN : db->db_size; + ASSERT(IS_P2ALIGNED(full_space, 8)); for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += P2ROUNDUP(attr_desc[i].sa_length, 8); + *total = P2ROUNDUP(*total, 8); + *total += attr_desc[i].sa_length; if (done) goto next; @@ -590,7 +593,14 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ if (is_var_sz && var_size > 1) { if (P2ROUNDUP(hdrsize + sizeof (uint16_t), 8) + *total < full_space) { + /* + * Account for header space used by array of + * optional sizes of variable-length attributes. + * Record the index in case this increase needs + * to be reversed due to spill-over. + */ hdrsize += sizeof (uint16_t); + j = i; } else { done = B_TRUE; *index = i; @@ -619,6 +629,14 @@ next: *will_spill = B_TRUE; } + /* + * j holds the index of the last variable-sized attribute for + * which hdrsize was increased. Reverse the increase if that + * attribute will be relocated to the spill block. + */ + if (*will_spill && j == *index) + hdrsize -= sizeof (uint16_t); + hdrsize = P2ROUNDUP(hdrsize, 8); return (hdrsize); } @@ -709,6 +727,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu for (i = 0, len_idx = 0, hash = -1ULL; i != attr_count; i++) { uint16_t length; + ASSERT(IS_P2ALIGNED(data_start, 8)); + ASSERT(IS_P2ALIGNED(buf_space, 8)); attrs[i] = attr_desc[i].sa_attr; length = SA_REGISTERED_LEN(sa, attrs[i]); if (length == 0) @@ -717,6 +737,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu VERIFY(length == attr_desc[i].sa_length); if (buf_space < length) { /* switch to spill buffer */ + VERIFY(spilling); VERIFY(bonustype == DMU_OT_SA); if (buftype == SA_BONUS && !sa->sa_force_spill) { sa_find_layout(hdl->sa_os, hash, attrs_start, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Feb 27 19:22:27 2013 (r247407) @@ -1764,7 +1764,7 @@ spa_load_verify_done(zio_t *zio) /*ARGSUSED*/ static int spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) + const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { if (bp != NULL) { zio_t *rio = arg; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Feb 27 19:22:27 2013 (r247407) @@ -49,7 +49,6 @@ struct arc_buf { arc_buf_hdr_t *b_hdr; arc_buf_t *b_next; kmutex_t b_evict_lock; - krwlock_t b_data_lock; void *b_data; arc_evict_func_t *b_efunc; void *b_private; @@ -93,8 +92,6 @@ void arc_buf_add_ref(arc_buf_t *buf, voi int arc_buf_remove_ref(arc_buf_t *buf, void *tag); int arc_buf_size(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); -int arc_release_bp(arc_buf_t *buf, void *tag, blkptr_t *bp, spa_t *spa, - zbookmark_t *zb); int arc_released(arc_buf_t *buf); int arc_has_callback(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); @@ -103,10 +100,7 @@ void arc_buf_thaw(arc_buf_t *buf); int arc_referenced(arc_buf_t *buf); #endif -int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); -int arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp, +int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, void *priv, int priority, int flags, uint32_t *arc_flags, const zbookmark_t *zb); zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h Wed Feb 27 19:22:27 2013 (r247407) @@ -40,8 +40,7 @@ struct zilog; struct arc_buf; typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, - struct arc_buf *pbuf, const zbookmark_t *zb, const struct dnode_phys *dnp, - void *arg); + const zbookmark_t *zb, const struct dnode_phys *dnp, void *arg); #define TRAVERSE_PRE (1<<0) #define TRAVERSE_POST (1<<1) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Wed Feb 27 19:22:27 2013 (r247407) @@ -134,12 +134,6 @@ void dsl_pool_willuse_space(dsl_pool_t * void dsl_free(dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp); void dsl_free_sync(zio_t *pio, dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp); -int dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); -int dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp, - arc_done_func_t *done, void *priv, int priority, int zio_flags, - uint32_t *arc_flags, const zbookmark_t *zb); void dsl_pool_create_origin(dsl_pool_t *dp, dmu_tx_t *tx); void dsl_pool_upgrade_clones(dsl_pool_t *dp, dmu_tx_t *tx); void dsl_pool_upgrade_dir_clones(dsl_pool_t *dp, dmu_tx_t *tx); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Feb 27 19:22:27 2013 (r247407) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_REFCOUNT_H @@ -54,8 +55,8 @@ typedef struct refcount { kmutex_t rc_mtx; list_t rc_list; list_t rc_removed; - int64_t rc_count; - int64_t rc_removed_count; + uint64_t rc_count; + uint64_t rc_removed_count; } refcount_t; /* Note: refcount_t must be initialized with refcount_create() */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Feb 27 19:22:27 2013 (r247407) @@ -1328,7 +1328,8 @@ vdev_validate(vdev_t *vd, boolean_t stri if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) { uint64_t aux_guid = 0; nvlist_t *nvl; - uint64_t txg = strict ? spa->spa_config_txg : -1ULL; + uint64_t txg = spa_last_synced_txg(spa) != 0 ? + spa_last_synced_txg(spa) : -1ULL; if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, @@ -1512,7 +1513,7 @@ vdev_reopen(vdev_t *vd) !l2arc_vdev_present(vd)) l2arc_add_vdev(spa, vd); } else { - (void) vdev_validate(vd, spa_last_synced_txg(spa)); + (void) vdev_validate(vd, B_TRUE); } /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 27 19:20:50 2013 (r247406) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Feb 27 19:22:27 2013 (r247407) @@ -106,12 +106,18 @@ typedef enum { DATASET_NAME } zfs_ioc_namecheck_t; +typedef enum { + POOL_CHECK_NONE = 1 << 0, + POOL_CHECK_SUSPENDED = 1 << 1, + POOL_CHECK_READONLY = 1 << 2 +} zfs_ioc_poolcheck_t; + typedef struct zfs_ioc_vec { zfs_ioc_func_t *zvec_func; zfs_secpolicy_func_t *zvec_secpolicy; zfs_ioc_namecheck_t zvec_namecheck; boolean_t zvec_his_log; - boolean_t zvec_pool_check; + zfs_ioc_poolcheck_t zvec_pool_check; } zfs_ioc_vec_t; /* This array is indexed by zfs_userquota_prop_t */ @@ -5033,138 +5039,155 @@ zfs_ioc_unjail(zfs_cmd_t *zc) static zfs_ioc_vec_t zfs_ioc_vec[] = { { zfs_ioc_pool_create, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_destroy, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_import, zfs_secpolicy_config, POOL_NAME, B_TRUE, - B_FALSE }, + POOL_CHECK_NONE }, { zfs_ioc_pool_export, zfs_secpolicy_config, POOL_NAME, B_FALSE, - B_FALSE }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 19:38:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 37B05140; Wed, 27 Feb 2013 19:38:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 19E489FA; Wed, 27 Feb 2013 19:38:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RJcPtG076767; Wed, 27 Feb 2013 19:38:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RJcPCh076765; Wed, 27 Feb 2013 19:38:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302271938.r1RJcPCh076765@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 19:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247408 - stable/9/usr.sbin/pciconf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 19:38:26 -0000 Author: jhb Date: Wed Feb 27 19:38:25 2013 New Revision: 247408 URL: http://svnweb.freebsd.org/changeset/base/247408 Log: MFC 240474: - Denote PCI-e endpoints that support FLR. - Make parsing of PCI-e extended capabilities assume that future version numbers are backwards compatible. - Add new AER error descriptions. - Add descriptions for more PCI-e extended capabilities. Modified: stable/9/usr.sbin/pciconf/cap.c stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/9/usr.sbin/pciconf/cap.c ============================================================================== --- stable/9/usr.sbin/pciconf/cap.c Wed Feb 27 19:22:27 2013 (r247407) +++ stable/9/usr.sbin/pciconf/cap.c Wed Feb 27 19:38:25 2013 (r247408) @@ -428,6 +428,8 @@ cap_express(int fd, struct pci_conf *p, printf(" max data %d(%d)", MAX_PAYLOAD((flags & PCIEM_CTL_MAX_PAYLOAD) >> 5), MAX_PAYLOAD(val & PCIEM_CAP_MAX_PAYLOAD)); + if (val & PCIEM_CAP_FLR) + printf(" FLR"); val = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, @@ -587,7 +589,7 @@ ecap_aer(int fd, struct pci_conf *p, uin uint32_t sta, mask; printf("AER %d", ver); - if (ver != 1) + if (ver < 1) return; sta = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_STATUS, 4); mask = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_SEVERITY, 4); @@ -603,7 +605,7 @@ ecap_vc(int fd, struct pci_conf *p, uint uint32_t cap1; printf("VC %d", ver); - if (ver != 1) + if (ver < 1) return; cap1 = read_config(fd, &p->pc_sel, ptr + PCIR_VC_CAP1, 4); printf(" max VC%d", cap1 & PCIM_VC_CAP1_EXT_COUNT); @@ -618,7 +620,7 @@ ecap_sernum(int fd, struct pci_conf *p, uint32_t high, low; printf("Serial %d", ver); - if (ver != 1) + if (ver < 1) return; low = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_LOW, 4); high = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_HIGH, 4); @@ -626,10 +628,58 @@ ecap_sernum(int fd, struct pci_conf *p, } static void +ecap_vendor(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) +{ + uint32_t val; + + printf("Vendor %d", ver); + if (ver < 1) + return; + val = read_config(fd, &p->pc_sel, ptr + 4, 4); + printf(" ID %d", val & 0xffff); +} + +static void +ecap_sec_pcie(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) +{ + uint32_t val; + + printf("PCIe Sec %d", ver); + if (ver < 1) + return; + val = read_config(fd, &p->pc_sel, ptr + 8, 4); + printf(" lane errors %#x", val); +} + +struct { + uint16_t id; + const char *name; +} ecap_names[] = { + { PCIZ_PWRBDGT, "Power Budgeting" }, + { PCIZ_RCLINK_DCL, "Root Complex Link Declaration" }, + { PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" }, + { PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" }, + { PCIZ_MFVC, "MFVC" }, + { PCIZ_RCRB, "RCRB" }, + { PCIZ_ACS, "ACS" }, + { PCIZ_ARI, "ARI" }, + { PCIZ_ATS, "ATS" }, + { PCIZ_SRIOV, "SRIOV" }, + { PCIZ_MULTICAST, "Multicast" }, + { PCIZ_RESIZE_BAR, "Resizable BAR" }, + { PCIZ_DPA, "DPA" }, + { PCIZ_TPH_REQ, "TPH Requester" }, + { PCIZ_LTR, "LTR" }, + { 0, NULL } +}; + +static void list_ecaps(int fd, struct pci_conf *p) { + const char *name; uint32_t ecap; uint16_t ptr; + int i; ptr = PCIR_EXTCAP; ecap = read_config(fd, &p->pc_sel, ptr, 4); @@ -647,8 +697,20 @@ list_ecaps(int fd, struct pci_conf *p) case PCIZ_SERNUM: ecap_sernum(fd, p, ptr, PCI_EXTCAP_VER(ecap)); break; + case PCIZ_VENDOR: + ecap_vendor(fd, p, ptr, PCI_EXTCAP_VER(ecap)); + break; + case PCIZ_SEC_PCIE: + ecap_sec_pcie(fd, p, ptr, PCI_EXTCAP_VER(ecap)); + break; default: - printf("unknown %d", PCI_EXTCAP_VER(ecap)); + name = "unknown"; + for (i = 0; ecap_names[i].name != NULL; i++) + if (ecap_names[i].id == PCI_EXTCAP_ID(ecap)) { + name = ecap_names[i].name; + break; + } + printf("%s %d", name, PCI_EXTCAP_VER(ecap)); break; } printf("\n"); Modified: stable/9/usr.sbin/pciconf/err.c ============================================================================== --- stable/9/usr.sbin/pciconf/err.c Wed Feb 27 19:22:27 2013 (r247407) +++ stable/9/usr.sbin/pciconf/err.c Wed Feb 27 19:38:25 2013 (r247408) @@ -91,6 +91,10 @@ static struct bit_table aer_uc[] = { { PCIM_AER_UC_ECRC_ERROR, "ECRC Error" }, { PCIM_AER_UC_UNSUPPORTED_REQUEST, "Unsupported Request" }, { PCIM_AER_UC_ACS_VIOLATION, "ACS Violation" }, + { PCIM_AER_UC_INTERNAL_ERROR, "Uncorrectable Internal Error" }, + { PCIM_AER_UC_MC_BLOCKED_TLP, "MC Blocked TLP" }, + { PCIM_AER_UC_ATOMIC_EGRESS_BLK, "AtomicOp Egress Blocked" }, + { PCIM_AER_UC_TLP_PREFIX_BLOCKED, "TLP Prefix Blocked Error" }, { 0, NULL }, }; @@ -102,6 +106,8 @@ static struct bit_table aer_cor[] = { { PCIM_AER_COR_REPLAY_ROLLOVER, "REPLAY_NUM Rollover" }, { PCIM_AER_COR_REPLAY_TIMEOUT, "Replay Timer Timeout" }, { PCIM_AER_COR_ADVISORY_NF_ERROR, "Advisory Non-Fatal Error" }, + { PCIM_AER_COR_INTERNAL_ERROR, "Corrected Internal Error" }, + { PCIM_AER_COR_HEADER_LOG_OVFLOW, "Header Log Overflow" }, { 0, NULL }, }; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 19:38:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8A308293; Wed, 27 Feb 2013 19:38:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1449FC; Wed, 27 Feb 2013 19:38:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RJcYS0076823; Wed, 27 Feb 2013 19:38:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RJcYCC076821; Wed, 27 Feb 2013 19:38:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302271938.r1RJcYCC076821@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 19:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247409 - stable/8/usr.sbin/pciconf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 19:38:34 -0000 Author: jhb Date: Wed Feb 27 19:38:33 2013 New Revision: 247409 URL: http://svnweb.freebsd.org/changeset/base/247409 Log: MFC 240474: - Denote PCI-e endpoints that support FLR. - Make parsing of PCI-e extended capabilities assume that future version numbers are backwards compatible. - Add new AER error descriptions. - Add descriptions for more PCI-e extended capabilities. Modified: stable/8/usr.sbin/pciconf/cap.c stable/8/usr.sbin/pciconf/err.c Directory Properties: stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/usr.sbin/pciconf/cap.c ============================================================================== --- stable/8/usr.sbin/pciconf/cap.c Wed Feb 27 19:38:25 2013 (r247408) +++ stable/8/usr.sbin/pciconf/cap.c Wed Feb 27 19:38:33 2013 (r247409) @@ -428,6 +428,8 @@ cap_express(int fd, struct pci_conf *p, printf(" max data %d(%d)", MAX_PAYLOAD((flags & PCIEM_CTL_MAX_PAYLOAD) >> 5), MAX_PAYLOAD(val & PCIEM_CAP_MAX_PAYLOAD)); + if (val & PCIEM_CAP_FLR) + printf(" FLR"); val = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, @@ -587,7 +589,7 @@ ecap_aer(int fd, struct pci_conf *p, uin uint32_t sta, mask; printf("AER %d", ver); - if (ver != 1) + if (ver < 1) return; sta = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_STATUS, 4); mask = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_SEVERITY, 4); @@ -603,7 +605,7 @@ ecap_vc(int fd, struct pci_conf *p, uint uint32_t cap1; printf("VC %d", ver); - if (ver != 1) + if (ver < 1) return; cap1 = read_config(fd, &p->pc_sel, ptr + PCIR_VC_CAP1, 4); printf(" max VC%d", cap1 & PCIM_VC_CAP1_EXT_COUNT); @@ -618,7 +620,7 @@ ecap_sernum(int fd, struct pci_conf *p, uint32_t high, low; printf("Serial %d", ver); - if (ver != 1) + if (ver < 1) return; low = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_LOW, 4); high = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_HIGH, 4); @@ -626,10 +628,58 @@ ecap_sernum(int fd, struct pci_conf *p, } static void +ecap_vendor(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) +{ + uint32_t val; + + printf("Vendor %d", ver); + if (ver < 1) + return; + val = read_config(fd, &p->pc_sel, ptr + 4, 4); + printf(" ID %d", val & 0xffff); +} + +static void +ecap_sec_pcie(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) +{ + uint32_t val; + + printf("PCIe Sec %d", ver); + if (ver < 1) + return; + val = read_config(fd, &p->pc_sel, ptr + 8, 4); + printf(" lane errors %#x", val); +} + +struct { + uint16_t id; + const char *name; +} ecap_names[] = { + { PCIZ_PWRBDGT, "Power Budgeting" }, + { PCIZ_RCLINK_DCL, "Root Complex Link Declaration" }, + { PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" }, + { PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" }, + { PCIZ_MFVC, "MFVC" }, + { PCIZ_RCRB, "RCRB" }, + { PCIZ_ACS, "ACS" }, + { PCIZ_ARI, "ARI" }, + { PCIZ_ATS, "ATS" }, + { PCIZ_SRIOV, "SRIOV" }, + { PCIZ_MULTICAST, "Multicast" }, + { PCIZ_RESIZE_BAR, "Resizable BAR" }, + { PCIZ_DPA, "DPA" }, + { PCIZ_TPH_REQ, "TPH Requester" }, + { PCIZ_LTR, "LTR" }, + { 0, NULL } +}; + +static void list_ecaps(int fd, struct pci_conf *p) { + const char *name; uint32_t ecap; uint16_t ptr; + int i; ptr = PCIR_EXTCAP; ecap = read_config(fd, &p->pc_sel, ptr, 4); @@ -647,8 +697,20 @@ list_ecaps(int fd, struct pci_conf *p) case PCIZ_SERNUM: ecap_sernum(fd, p, ptr, PCI_EXTCAP_VER(ecap)); break; + case PCIZ_VENDOR: + ecap_vendor(fd, p, ptr, PCI_EXTCAP_VER(ecap)); + break; + case PCIZ_SEC_PCIE: + ecap_sec_pcie(fd, p, ptr, PCI_EXTCAP_VER(ecap)); + break; default: - printf("unknown %d", PCI_EXTCAP_VER(ecap)); + name = "unknown"; + for (i = 0; ecap_names[i].name != NULL; i++) + if (ecap_names[i].id == PCI_EXTCAP_ID(ecap)) { + name = ecap_names[i].name; + break; + } + printf("%s %d", name, PCI_EXTCAP_VER(ecap)); break; } printf("\n"); Modified: stable/8/usr.sbin/pciconf/err.c ============================================================================== --- stable/8/usr.sbin/pciconf/err.c Wed Feb 27 19:38:25 2013 (r247408) +++ stable/8/usr.sbin/pciconf/err.c Wed Feb 27 19:38:33 2013 (r247409) @@ -91,6 +91,10 @@ static struct bit_table aer_uc[] = { { PCIM_AER_UC_ECRC_ERROR, "ECRC Error" }, { PCIM_AER_UC_UNSUPPORTED_REQUEST, "Unsupported Request" }, { PCIM_AER_UC_ACS_VIOLATION, "ACS Violation" }, + { PCIM_AER_UC_INTERNAL_ERROR, "Uncorrectable Internal Error" }, + { PCIM_AER_UC_MC_BLOCKED_TLP, "MC Blocked TLP" }, + { PCIM_AER_UC_ATOMIC_EGRESS_BLK, "AtomicOp Egress Blocked" }, + { PCIM_AER_UC_TLP_PREFIX_BLOCKED, "TLP Prefix Blocked Error" }, { 0, NULL }, }; @@ -102,6 +106,8 @@ static struct bit_table aer_cor[] = { { PCIM_AER_COR_REPLAY_ROLLOVER, "REPLAY_NUM Rollover" }, { PCIM_AER_COR_REPLAY_TIMEOUT, "Replay Timer Timeout" }, { PCIM_AER_COR_ADVISORY_NF_ERROR, "Advisory Non-Fatal Error" }, + { PCIM_AER_COR_INTERNAL_ERROR, "Corrected Internal Error" }, + { PCIM_AER_COR_HEADER_LOG_OVFLOW, "Header Log Overflow" }, { 0, NULL }, }; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 21:03:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A5025469; Wed, 27 Feb 2013 21:03:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7DE92F2A; Wed, 27 Feb 2013 21:03:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RL3AY2003814; Wed, 27 Feb 2013 21:03:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RL3Atr003813; Wed, 27 Feb 2013 21:03:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302272103.r1RL3Atr003813@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 21:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247420 - stable/9/sys/dev/amr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 21:03:10 -0000 Author: jhb Date: Wed Feb 27 21:03:09 2013 New Revision: 247420 URL: http://svnweb.freebsd.org/changeset/base/247420 Log: MFC 240692,241228: Adjust the ioctl workaround from r234501: - Ensure the native ioctl path always allocates a 4kb buffer if a request uses a buffer size of 0. - Rounding all small requests up to 32k swamped the controller causing firmware hangs. Instead, round requests smaller than 64k up to the next power of 2 as a general rule. To handle the one known special case of a command that accepts a 12k buffer returning a 24k-ish reply, round requests between 8k and 16k up to 32k rather than 16k. The result is that commands less than 8k should now be rounded up to a smaller size (either 4k or 8k) rather than 32k. Modified: stable/9/sys/dev/amr/amr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/amr/amr.c ============================================================================== --- stable/9/sys/dev/amr/amr.c Wed Feb 27 20:54:45 2013 (r247419) +++ stable/9/sys/dev/amr/amr.c Wed Feb 27 21:03:09 2013 (r247420) @@ -546,13 +546,19 @@ shutdown_out: * The amr(4) firmware relies on this feature. In fact, it assumes * the buffer is always a power of 2 up to a max of 64k. There is * also at least one case where it assumes a buffer less than 16k is - * greater than 16k. Force a minimum buffer size of 32k and round - * sizes between 32k and 64k up to 64k as a workaround. + * greater than 16k. However, forcing all buffers to a size of 32k + * causes stalls in the firmware. Force each command smaller than + * 64k up to the next power of two except that commands between 8k + * and 16k are rounded up to 32k instead of 16k. */ static unsigned long amr_ioctl_buffer_length(unsigned long len) { + if (len <= 4 * 1024) + return (4 * 1024); + if (len <= 8 * 1024) + return (8 * 1024); if (len <= 32 * 1024) return (32 * 1024); if (len <= 64 * 1024) @@ -859,11 +865,8 @@ amr_ioctl(struct cdev *dev, u_long cmd, /* handle inbound data buffer */ real_length = amr_ioctl_buffer_length(au_length); + dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO); if (au_length != 0 && au_cmd[0] != 0x06) { - if ((dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO)) == NULL) { - error = ENOMEM; - goto out; - } if ((error = copyin(au_buffer, dp, au_length)) != 0) { free(dp, M_AMR); return (error); @@ -933,8 +936,7 @@ amr_ioctl(struct cdev *dev, u_long cmd, error = copyout(dp, au_buffer, au_length); } debug(2, "copyout %ld bytes from %p -> %p", au_length, dp, au_buffer); - if (dp != NULL) - debug(2, "%p status 0x%x", dp, ac->ac_status); + debug(2, "%p status 0x%x", dp, ac->ac_status); *au_statusp = ac->ac_status; out: From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 21:03:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E95DD57A; Wed, 27 Feb 2013 21:03:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C25DEF2C; Wed, 27 Feb 2013 21:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RL3JoU003879; Wed, 27 Feb 2013 21:03:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RL3JwK003878; Wed, 27 Feb 2013 21:03:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302272103.r1RL3JwK003878@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 21:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247421 - stable/8/sys/dev/amr X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 21:03:20 -0000 Author: jhb Date: Wed Feb 27 21:03:19 2013 New Revision: 247421 URL: http://svnweb.freebsd.org/changeset/base/247421 Log: MFC 240692,241228: Adjust the ioctl workaround from r234501: - Ensure the native ioctl path always allocates a 4kb buffer if a request uses a buffer size of 0. - Rounding all small requests up to 32k swamped the controller causing firmware hangs. Instead, round requests smaller than 64k up to the next power of 2 as a general rule. To handle the one known special case of a command that accepts a 12k buffer returning a 24k-ish reply, round requests between 8k and 16k up to 32k rather than 16k. The result is that commands less than 8k should now be rounded up to a smaller size (either 4k or 8k) rather than 32k. Modified: stable/8/sys/dev/amr/amr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/amr/ (props changed) Modified: stable/8/sys/dev/amr/amr.c ============================================================================== --- stable/8/sys/dev/amr/amr.c Wed Feb 27 21:03:09 2013 (r247420) +++ stable/8/sys/dev/amr/amr.c Wed Feb 27 21:03:19 2013 (r247421) @@ -546,13 +546,19 @@ shutdown_out: * The amr(4) firmware relies on this feature. In fact, it assumes * the buffer is always a power of 2 up to a max of 64k. There is * also at least one case where it assumes a buffer less than 16k is - * greater than 16k. Force a minimum buffer size of 32k and round - * sizes between 32k and 64k up to 64k as a workaround. + * greater than 16k. However, forcing all buffers to a size of 32k + * causes stalls in the firmware. Force each command smaller than + * 64k up to the next power of two except that commands between 8k + * and 16k are rounded up to 32k instead of 16k. */ static unsigned long amr_ioctl_buffer_length(unsigned long len) { + if (len <= 4 * 1024) + return (4 * 1024); + if (len <= 8 * 1024) + return (8 * 1024); if (len <= 32 * 1024) return (32 * 1024); if (len <= 64 * 1024) @@ -859,11 +865,8 @@ amr_ioctl(struct cdev *dev, u_long cmd, /* handle inbound data buffer */ real_length = amr_ioctl_buffer_length(au_length); + dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO); if (au_length != 0 && au_cmd[0] != 0x06) { - if ((dp = malloc(real_length, M_AMR, M_WAITOK|M_ZERO)) == NULL) { - error = ENOMEM; - goto out; - } if ((error = copyin(au_buffer, dp, au_length)) != 0) { free(dp, M_AMR); return (error); @@ -933,8 +936,7 @@ amr_ioctl(struct cdev *dev, u_long cmd, error = copyout(dp, au_buffer, au_length); } debug(2, "copyout %ld bytes from %p -> %p", au_length, dp, au_buffer); - if (dp != NULL) - debug(2, "%p status 0x%x", dp, ac->ac_status); + debug(2, "%p status 0x%x", dp, ac->ac_status); *au_statusp = ac->ac_status; out: From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 22:02:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9386395C; Wed, 27 Feb 2013 22:02:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5DB35C; Wed, 27 Feb 2013 22:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RM2fAg021969; Wed, 27 Feb 2013 22:02:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RM2f6P021968; Wed, 27 Feb 2013 22:02:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302272202.r1RM2f6P021968@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 22:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247423 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 22:02:41 -0000 Author: jhb Date: Wed Feb 27 22:02:40 2013 New Revision: 247423 URL: http://svnweb.freebsd.org/changeset/base/247423 Log: MFC 240921: Add optional entropy harvesting for software interrupts in swi_sched() as controlled by kern.random.sys.harvest.swi. SWI harvesting feeds into the interrupt FIFO and each event is estimated as providing a single bit of entropy. Modified: stable/9/sys/kern/kern_intr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_intr.c ============================================================================== --- stable/9/sys/kern/kern_intr.c Wed Feb 27 21:58:06 2013 (r247422) +++ stable/9/sys/kern/kern_intr.c Wed Feb 27 22:02:40 2013 (r247423) @@ -1144,11 +1144,21 @@ swi_sched(void *cookie, int flags) { struct intr_handler *ih = (struct intr_handler *)cookie; struct intr_event *ie = ih->ih_event; + struct intr_entropy entropy; int error; CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name, ih->ih_need); + if (harvest.swi) { + CTR2(KTR_INTR, "swi_sched: pid %d (%s) gathering entropy", + curproc->p_pid, curthread->td_name); + entropy.event = (uintptr_t)ih; + entropy.td = curthread; + random_harvest(&entropy, sizeof(entropy), 1, 0, + RANDOM_INTERRUPT); + } + /* * Set ih_need for this handler so that if the ithread is already * running it will execute this handler on the next pass. Otherwise, From owner-svn-src-stable@FreeBSD.ORG Wed Feb 27 22:08:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A23B9C00; Wed, 27 Feb 2013 22:08:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9444B3A7; Wed, 27 Feb 2013 22:08:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1RM8I3o023023; Wed, 27 Feb 2013 22:08:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1RM8I1M023022; Wed, 27 Feb 2013 22:08:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302272208.r1RM8I1M023022@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Feb 2013 22:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247424 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 22:08:18 -0000 Author: jhb Date: Wed Feb 27 22:08:18 2013 New Revision: 247424 URL: http://svnweb.freebsd.org/changeset/base/247424 Log: MFC 241130: Rename the module for 'device enc' to "if_enc" to avoid conflicting with the CAM "enc" peripheral (part of ses(4)). Previously the two modules used the same name, so only one was included in a linked kernel causing enc0 to not be created if you added IPSEC to GENERIC. The new module name follows the pattern of other network interfaces (e.g. "if_loop"). Modified: stable/9/sys/net/if_enc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net/if_enc.c ============================================================================== --- stable/9/sys/net/if_enc.c Wed Feb 27 22:02:40 2013 (r247423) +++ stable/9/sys/net/if_enc.c Wed Feb 27 22:08:18 2013 (r247424) @@ -179,12 +179,12 @@ enc_modevent(module_t mod, int type, voi } static moduledata_t enc_mod = { - "enc", + "if_enc", enc_modevent, 0 }; -DECLARE_MODULE(enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); static int enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 00:22:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9AE9E7EC; Thu, 28 Feb 2013 00:22:05 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8C770CB8; Thu, 28 Feb 2013 00:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S0M56C064519; Thu, 28 Feb 2013 00:22:05 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S0M4vm064514; Thu, 28 Feb 2013 00:22:04 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201302280022.r1S0M4vm064514@svn.freebsd.org> From: Jack F Vogel Date: Thu, 28 Feb 2013 00:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 00:22:05 -0000 Author: jfv Date: Thu Feb 28 00:22:04 2013 New Revision: 247430 URL: http://svnweb.freebsd.org/changeset/base/247430 Log: MFC of the E1000 drivers to STABLE/8, this includes the follow revisions plus a few tweaks: 196969,196970,211516,214646,215781,215789,215808,215910,223350, 223482,223831,228281,228393,229939,231796,232238,234665,235256, 236406,238148,238151,238214,238765,238770,238953,238981,239105, 239109,239304,240518,240693,240968,241037,241856,241885,243570, 243857,245334,246128,246482,247064 Added: stable/8/sys/dev/e1000/e1000_i210.c - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c stable/8/sys/dev/e1000/e1000_i210.h - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h Modified: stable/8/sys/conf/files stable/8/sys/dev/e1000/e1000_82541.c stable/8/sys/dev/e1000/e1000_82543.c stable/8/sys/dev/e1000/e1000_82571.c stable/8/sys/dev/e1000/e1000_82575.c stable/8/sys/dev/e1000/e1000_82575.h stable/8/sys/dev/e1000/e1000_api.c stable/8/sys/dev/e1000/e1000_api.h stable/8/sys/dev/e1000/e1000_defines.h stable/8/sys/dev/e1000/e1000_hw.h stable/8/sys/dev/e1000/e1000_ich8lan.c stable/8/sys/dev/e1000/e1000_ich8lan.h stable/8/sys/dev/e1000/e1000_mac.c stable/8/sys/dev/e1000/e1000_mac.h stable/8/sys/dev/e1000/e1000_manage.c stable/8/sys/dev/e1000/e1000_manage.h stable/8/sys/dev/e1000/e1000_nvm.c stable/8/sys/dev/e1000/e1000_nvm.h stable/8/sys/dev/e1000/e1000_osdep.h stable/8/sys/dev/e1000/e1000_phy.c stable/8/sys/dev/e1000/e1000_phy.h stable/8/sys/dev/e1000/e1000_regs.h stable/8/sys/dev/e1000/if_em.c (contents, props changed) stable/8/sys/dev/e1000/if_igb.c (contents, props changed) stable/8/sys/dev/e1000/if_igb.h stable/8/sys/dev/e1000/if_lem.c stable/8/sys/modules/em/Makefile stable/8/sys/modules/igb/Makefile Directory Properties: stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013 (r247430) @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/e1000_i210.c optional em | igb \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em | igb \ Modified: stable/8/sys/dev/e1000/e1000_82541.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:22:04 2013 (r247430) @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st * of MAC speed/duplex configuration. So we only need to * configure Collision Distance in the MAC. */ - e1000_config_collision_dist_generic(hw); + mac->ops.config_collision_dist(hw); /* * Configure Flow Control now that Auto-Neg has completed. Modified: stable/8/sys/dev/e1000/e1000_82543.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:22:04 2013 (r247430) @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 DEBUGOUT("Valid link established!!!\n"); /* Config the MAC and PHY after link is up */ if (hw->mac.type == e1000_82544) { - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); } else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( /* Take the link out of reset */ ctrl &= ~E1000_CTRL_LRST; - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); ret_val = e1000_commit_fc_settings_generic(hw); if (ret_val) @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 * settings. */ if (mac->type == e1000_82544) - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) { @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 if (phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); /* * Set up speed in the Device Control register depending on Modified: stable/8/sys/dev/e1000/e1000_82571.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:22:04 2013 (r247430) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,8 +32,7 @@ ******************************************************************************/ /*$FreeBSD$*/ -/* - * 82571EB Gigabit Ethernet Controller +/* 82571EB Gigabit Ethernet Controller * 82571EB Gigabit Ethernet Controller (Copper) * 82571EB Gigabit Ethernet Controller (Fiber) * 82571EB Dual Port Gigabit Mezzanine Adapter @@ -51,9 +50,6 @@ #include "e1000_api.h" -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); static void e1000_release_nvm_82571(struct e1000_hw *hw); static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_82571"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } phy->addr = 1; @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574; break; default: - ret_val = -E1000_ERR_PHY; - goto out; + return -E1000_ERR_PHY; break; } @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s ret_val = e1000_get_phy_id_82571(hw); if (ret_val) { DEBUGOUT("Error getting PHY ID\n"); - goto out; + return ret_val; } /* Verify phy id */ @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s if (ret_val) DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); -out: return ret_val; } @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s if (((eecd >> 15) & 0x3) == 0x3) { nvm->type = e1000_nvm_flash_hw; nvm->word_size = 2048; - /* - * Autonomous Flash update bit must be cleared due + /* Autonomous Flash update bit must be cleared due * to Flash update issue. */ eecd &= ~E1000_EECD_AUPDEN; @@ -254,8 +246,7 @@ static s32 e1000_init_nvm_params_82571(s nvm->type = e1000_nvm_eeprom_spi; size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); - /* - * Added to a constant, "size" becomes the left-shift value + /* Added to a constant, "size" becomes the left-shift value * for setting word_size. */ size += NVM_WORD_SIZE_BASE_SHIFT; @@ -382,12 +373,11 @@ static s32 e1000_init_mac_params_82571(s /* FWSM register */ mac->has_fwsm = TRUE; - /* - * ARC supported; valid only if manageability features are + /* ARC supported; valid only if manageability features are * enabled. */ - mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & - E1000_FWSM_MODE_MASK) ? TRUE : FALSE; + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, E1000_FWSM) & + E1000_FWSM_MODE_MASK); break; case e1000_82574: case e1000_82583: @@ -405,8 +395,7 @@ static s32 e1000_init_mac_params_82571(s break; } - /* - * Ensure that the inter-port SWSM.SMBI lock bit is clear before + /* Ensure that the inter-port SWSM.SMBI lock bit is clear before * first NVM or PHY acess. This should be done for single-port * devices, and for one port only on dual-port devices so that * for those devices we can still use the SMBI lock to synchronize @@ -422,8 +411,9 @@ static s32 e1000_init_mac_params_82571(s E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 | E1000_SWSM2_LOCK); force_clear_smbi = TRUE; - } else + } else { force_clear_smbi = FALSE; + } break; default: force_clear_smbi = TRUE; @@ -443,10 +433,7 @@ static s32 e1000_init_mac_params_82571(s E1000_WRITE_REG(hw, E1000_SWSM, swsm & ~E1000_SWSM_SMBI); } - /* - * Initialze device specific counter of SMBI acquisition - * timeouts. - */ + /* Initialze device specific counter of SMBI acquisition timeouts. */ hw->dev_spec._82571.smb_counter = 0; return E1000_SUCCESS; @@ -477,7 +464,7 @@ void e1000_init_function_pointers_82571( static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 phy_id = 0; DEBUGFUNC("e1000_get_phy_id_82571"); @@ -485,8 +472,7 @@ static s32 e1000_get_phy_id_82571(struct switch (hw->mac.type) { case e1000_82571: case e1000_82572: - /* - * The 82571 firmware may still be configuring the PHY. + /* The 82571 firmware may still be configuring the PHY. * In this case, we cannot access the PHY until the * configuration is done. So we explicitly set the * PHY ID. @@ -494,29 +480,29 @@ static s32 e1000_get_phy_id_82571(struct phy->id = IGP01E1000_I_PHY_ID; break; case e1000_82573: - ret_val = e1000_get_phy_id(hw); + return e1000_get_phy_id(hw); break; case e1000_82574: case e1000_82583: ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); if (ret_val) - goto out; + return ret_val; phy->id = (u32)(phy_id << 16); usec_delay(20); ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); if (ret_val) - goto out; + return ret_val; phy->id |= (u32)(phy_id); phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); break; default: - ret_val = -E1000_ERR_PHY; + return -E1000_ERR_PHY; break; } -out: - return ret_val; + + return E1000_SUCCESS; } /** @@ -528,15 +514,13 @@ out: static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) { u32 swsm; - s32 ret_val = E1000_SUCCESS; s32 sw_timeout = hw->nvm.word_size + 1; s32 fw_timeout = hw->nvm.word_size + 1; s32 i = 0; DEBUGFUNC("e1000_get_hw_semaphore_82571"); - /* - * If we have timedout 3 times on trying to acquire + /* If we have timedout 3 times on trying to acquire * the inter-port SMBI semaphore, there is old code * operating on the other port, and it is not * releasing SMBI. Modify the number of times that @@ -576,12 +560,10 @@ static s32 e1000_get_hw_semaphore_82571( /* Release semaphores */ e1000_put_hw_semaphore_82571(hw); DEBUGOUT("Driver can't access the NVM\n"); - ret_val = -E1000_ERR_NVM; - goto out; + return -E1000_ERR_NVM; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -613,22 +595,19 @@ static void e1000_put_hw_semaphore_82571 static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) { u32 extcnf_ctrl; - s32 ret_val = E1000_SUCCESS; s32 i = 0; DEBUGFUNC("e1000_get_hw_semaphore_82573"); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; do { + extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl); extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP) break; - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; - msec_delay(2); i++; } while (i < MDIO_OWNERSHIP_TIMEOUT); @@ -637,12 +616,10 @@ static s32 e1000_get_hw_semaphore_82573( /* Release semaphores */ e1000_put_hw_semaphore_82573(hw); DEBUGOUT("Driver can't access the PHY\n"); - ret_val = -E1000_ERR_PHY; - goto out; + return -E1000_ERR_PHY; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -712,7 +689,7 @@ static void e1000_put_hw_semaphore_82574 **/ static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool active) { - u16 data = E1000_READ_REG(hw, E1000_POEMB); + u32 data = E1000_READ_REG(hw, E1000_POEMB); DEBUGFUNC("e1000_set_d0_lplu_state_82574"); @@ -738,7 +715,7 @@ static s32 e1000_set_d0_lplu_state_82574 **/ static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool active) { - u16 data = E1000_READ_REG(hw, E1000_POEMB); + u32 data = E1000_READ_REG(hw, E1000_POEMB); DEBUGFUNC("e1000_set_d3_lplu_state_82574"); @@ -771,7 +748,7 @@ static s32 e1000_acquire_nvm_82571(struc ret_val = e1000_get_hw_semaphore_82571(hw); if (ret_val) - goto out; + return ret_val; switch (hw->mac.type) { case e1000_82573: @@ -784,7 +761,6 @@ static s32 e1000_acquire_nvm_82571(struc if (ret_val) e1000_put_hw_semaphore_82571(hw); -out: return ret_val; } @@ -817,7 +793,7 @@ static void e1000_release_nvm_82571(stru static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_write_nvm_82571"); @@ -857,31 +833,27 @@ static s32 e1000_update_nvm_checksum_825 ret_val = e1000_update_nvm_checksum_generic(hw); if (ret_val) - goto out; + return ret_val; - /* - * If our nvm is an EEPROM, then we're done + /* If our nvm is an EEPROM, then we're done * otherwise, commit the checksum to the flash NVM. */ if (hw->nvm.type != e1000_nvm_flash_hw) - goto out; + return E1000_SUCCESS; /* Check for pending operations. */ for (i = 0; i < E1000_FLASH_UPDATES; i++) { msec_delay(1); - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) == 0) + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) break; } - if (i == E1000_FLASH_UPDATES) { - ret_val = -E1000_ERR_NVM; - goto out; - } + if (i == E1000_FLASH_UPDATES) + return -E1000_ERR_NVM; /* Reset the firmware if using STM opcode. */ if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) == E1000_STM_OPCODE) { - /* - * The enabling of and the actual reset must be done + /* The enabling of and the actual reset must be done * in two write cycles. */ E1000_WRITE_REG(hw, E1000_HICR, E1000_HICR_FW_RESET_ENABLE); @@ -895,17 +867,14 @@ static s32 e1000_update_nvm_checksum_825 for (i = 0; i < E1000_FLASH_UPDATES; i++) { msec_delay(1); - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) == 0) + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) break; } - if (i == E1000_FLASH_UPDATES) { - ret_val = -E1000_ERR_NVM; - goto out; - } + if (i == E1000_FLASH_UPDATES) + return -E1000_ERR_NVM; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -944,19 +913,17 @@ static s32 e1000_write_nvm_eewr_82571(st { struct e1000_nvm_info *nvm = &hw->nvm; u32 i, eewr = 0; - s32 ret_val = 0; + s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_write_nvm_eewr_82571"); - /* - * A check for invalid values: offset too large, too many words, + /* A check for invalid values: offset too large, too many words, * and not enough words. */ if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) || (words == 0)) { DEBUGOUT("nvm parameter(s) out of bounds\n"); - ret_val = -E1000_ERR_NVM; - goto out; + return -E1000_ERR_NVM; } for (i = 0; i < words; i++) { @@ -975,7 +942,6 @@ static s32 e1000_write_nvm_eewr_82571(st break; } -out: return ret_val; } @@ -988,7 +954,6 @@ out: static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) { s32 timeout = PHY_CFG_TIMEOUT; - s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_get_cfg_done_82571"); @@ -1001,12 +966,10 @@ static s32 e1000_get_cfg_done_82571(stru } if (!timeout) { DEBUGOUT("MNG configuration cycle has not completed.\n"); - ret_val = -E1000_ERR_RESET; - goto out; + return -E1000_ERR_RESET; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1023,39 +986,40 @@ out: static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 data; DEBUGFUNC("e1000_set_d0_lplu_state_82571"); if (!(phy->ops.read_reg)) - goto out; + return E1000_SUCCESS; ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); if (ret_val) - goto out; + return ret_val; if (active) { data |= IGP02E1000_PM_D0_LPLU; ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, data); if (ret_val) - goto out; + return ret_val; /* When LPLU is enabled, we should disable SmartSpeed */ ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &data); + if (ret_val) + return ret_val; data &= ~IGP01E1000_PSCFR_SMART_SPEED; ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, data); if (ret_val) - goto out; + return ret_val; } else { data &= ~IGP02E1000_PM_D0_LPLU; ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, data); - /* - * LPLU and SmartSpeed are mutually exclusive. LPLU is used + /* LPLU and SmartSpeed are mutually exclusive. LPLU is used * during Dx states where the power conservation is most * important. During driver activity we should enable * SmartSpeed, so performance is maintained. @@ -1065,32 +1029,31 @@ static s32 e1000_set_d0_lplu_state_82571 IGP01E1000_PHY_PORT_CONFIG, &data); if (ret_val) - goto out; + return ret_val; data |= IGP01E1000_PSCFR_SMART_SPEED; ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, data); if (ret_val) - goto out; + return ret_val; } else if (phy->smart_speed == e1000_smart_speed_off) { ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &data); if (ret_val) - goto out; + return ret_val; data &= ~IGP01E1000_PSCFR_SMART_SPEED; ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, data); if (ret_val) - goto out; + return ret_val; } } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1101,13 +1064,12 @@ out: **/ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) { - u32 ctrl, ctrl_ext; + u32 ctrl, ctrl_ext, eecd, tctl; s32 ret_val; DEBUGFUNC("e1000_reset_hw_82571"); - /* - * Prevent the PCI-E bus from sticking if there is no TLP connection + /* Prevent the PCI-E bus from sticking if there is no TLP connection * on the last TLP read/write transaction when MAC is reset. */ ret_val = e1000_disable_pcie_master_generic(hw); @@ -1118,13 +1080,14 @@ static s32 e1000_reset_hw_82571(struct e E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); E1000_WRITE_REG(hw, E1000_RCTL, 0); - E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); + tctl = E1000_READ_REG(hw, E1000_TCTL); + tctl &= ~E1000_TCTL_EN; + E1000_WRITE_REG(hw, E1000_TCTL, tctl); E1000_WRITE_FLUSH(hw); msec_delay(10); - /* - * Must acquire the MDIO ownership before MAC reset. + /* Must acquire the MDIO ownership before MAC reset. * Ownership defaults to firmware after a reset. */ switch (hw->mac.type) { @@ -1167,15 +1130,23 @@ static s32 e1000_reset_hw_82571(struct e ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) /* We don't want to continue accessing MAC registers. */ - goto out; + return ret_val; - /* - * Phy configuration from NVM just starts after EECD_AUTO_RD is set. + /* Phy configuration from NVM just starts after EECD_AUTO_RD is set. * Need to wait for Phy configuration completion before accessing * NVM and Phy. */ switch (hw->mac.type) { + case e1000_82571: + case e1000_82572: + /* REQ and GNT bits need to be cleared when using AUTO_RD + * to access the EEPROM. + */ + eecd = E1000_READ_REG(hw, E1000_EECD); + eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT); + E1000_WRITE_REG(hw, E1000_EECD, eecd); + break; case e1000_82573: case e1000_82574: case e1000_82583: @@ -1193,7 +1164,7 @@ static s32 e1000_reset_hw_82571(struct e /* Install any alternate MAC address into RAR0 */ ret_val = e1000_check_alt_mac_addr_generic(hw); if (ret_val) - goto out; + return ret_val; e1000_set_laa_state_82571(hw, TRUE); } @@ -1202,8 +1173,7 @@ static s32 e1000_reset_hw_82571(struct e if (hw->phy.media_type == e1000_media_type_internal_serdes) hw->mac.serdes_link_state = e1000_serdes_link_down; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1225,16 +1195,15 @@ static s32 e1000_init_hw_82571(struct e1 /* Initialize identification LED */ ret_val = mac->ops.id_led_init(hw); + /* An error is not fatal and we should not stop init due to this */ if (ret_val) DEBUGOUT("Error initializing identification LED\n"); - /* This is not fatal and we should not stop init due to this */ /* Disabling VLAN filtering */ DEBUGOUT("Initializing the IEEE VLAN\n"); mac->ops.clear_vfta(hw); - /* Setup the receive address. */ - /* + /* Setup the receive address. * If, however, a locally administered address was assigned to the * 82571, we must reserve a RAR for it to work around an issue where * resetting one port will reload the MAC on the other port. @@ -1277,8 +1246,7 @@ static s32 e1000_init_hw_82571(struct e1 break; } - /* - * Clear all of the statistics registers (clear on read). It is + /* Clear all of the statistics registers (clear on read). It is * important that we do this after we have tried to establish link * because the symbol error count will increment wildly if there * is no link. @@ -1377,8 +1345,7 @@ static void e1000_initialize_hw_bits_825 E1000_WRITE_REG(hw, E1000_PBA_ECC, reg); } - /* - * Workaround for hardware errata. + /* Workaround for hardware errata. * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572 */ if ((hw->mac.type == e1000_82571) || @@ -1388,6 +1355,15 @@ static void e1000_initialize_hw_bits_825 E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); } + /* Disable IPv6 extension header parsing because some malformed + * IPv6 headers can hang the Rx. + */ + if (hw->mac.type <= e1000_82573) { + reg = E1000_READ_REG(hw, E1000_RFCTL); + reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS); + E1000_WRITE_REG(hw, E1000_RFCTL, reg); + } + /* PCI-Ex Control Registers */ switch (hw->mac.type) { case e1000_82574: @@ -1396,8 +1372,7 @@ static void e1000_initialize_hw_bits_825 reg |= (1 << 22); E1000_WRITE_REG(hw, E1000_GCR, reg); - /* - * Workaround for hardware errata. + /* Workaround for hardware errata. * apply workaround for hardware errata documented in errata * docs Fixes issue where some error prone or unreliable PCIe * completions are occurring, particularly with ASPM enabled. @@ -1435,25 +1410,25 @@ static void e1000_clear_vfta_82571(struc case e1000_82574: case e1000_82583: if (hw->mng_cookie.vlan_id != 0) { - /* - * The VFTA is a 4096b bit-field, each identifying + /* The VFTA is a 4096b bit-field, each identifying * a single VLAN ID. The following operations * determine which 32b entry (i.e. offset) into the * array we want to set the VLAN ID (i.e. bit) of * the manageability unit. */ vfta_offset = (hw->mng_cookie.vlan_id >> - E1000_VFTA_ENTRY_SHIFT) & E1000_VFTA_ENTRY_MASK; - vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id & - E1000_VFTA_ENTRY_BIT_SHIFT_MASK); + E1000_VFTA_ENTRY_SHIFT) & + E1000_VFTA_ENTRY_MASK; + vfta_bit_in_reg = + 1 << (hw->mng_cookie.vlan_id & + E1000_VFTA_ENTRY_BIT_SHIFT_MASK); } break; default: break; } for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) { - /* - * If the offset we want to clear is the same offset of the + /* If the offset we want to clear is the same offset of the * manageability VLAN ID, then clear all bits except that of * the manageability unit. */ @@ -1495,8 +1470,7 @@ static s32 e1000_led_on_82574(struct e10 ctrl = hw->mac.ledctl_mode2; if (!(E1000_STATUS_LU & E1000_READ_REG(hw, E1000_STATUS))) { - /* - * If no link, then turn LED on by setting the invert bit + /* If no link, then turn LED on by setting the invert bit * for each LED that's "on" (0x0E) in ledctl_mode2. */ for (i = 0; i < 4; i++) @@ -1519,30 +1493,28 @@ bool e1000_check_phy_82574(struct e1000_ { u16 status_1kbt = 0; u16 receive_errors = 0; - bool phy_hung = FALSE; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_check_phy_82574"); - /* - * Read PHY Receive Error counter first, if its is max - all F's then + /* Read PHY Receive Error counter first, if its is max - all F's then * read the Base1000T status register If both are max then PHY is hung. */ ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER, &receive_errors); if (ret_val) - goto out; + return FALSE; if (receive_errors == E1000_RECEIVE_ERROR_MAX) { ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS, &status_1kbt); if (ret_val) - goto out; + return FALSE; if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) == E1000_IDLE_ERROR_COUNT_MASK) - phy_hung = TRUE; + return TRUE; } -out: - return phy_hung; + + return FALSE; } @@ -1560,8 +1532,7 @@ static s32 e1000_setup_link_82571(struct { DEBUGFUNC("e1000_setup_link_82571"); - /* - * 82573 does not have a word in the NVM to determine + /* 82573 does not have a word in the NVM to determine * the default flow control setting, so we explicitly * set it to full. */ @@ -1608,17 +1579,14 @@ static s32 e1000_setup_copper_link_82571 ret_val = e1000_copper_link_setup_igp(hw); break; default: - ret_val = -E1000_ERR_PHY; + return -E1000_ERR_PHY; break; } if (ret_val) - goto out; - - ret_val = e1000_setup_copper_link_generic(hw); + return ret_val; -out: - return ret_val; + return e1000_setup_copper_link_generic(hw); } /** @@ -1635,8 +1603,7 @@ static s32 e1000_setup_fiber_serdes_link switch (hw->mac.type) { case e1000_82571: case e1000_82572: - /* - * If SerDes loopback mode is entered, there is no form + /* If SerDes loopback mode is entered, there is no form * of reset to take the adapter out of that mode. So we * have to explicitly take the adapter out of loopback * mode. This prevents drivers from twiddling their thumbs @@ -1685,16 +1652,17 @@ static s32 e1000_check_for_serdes_link_8 ctrl = E1000_READ_REG(hw, E1000_CTRL); status = E1000_READ_REG(hw, E1000_STATUS); + E1000_READ_REG(hw, E1000_RXCW); + /* SYNCH bit and IV bit are sticky */ + usec_delay(10); rxcw = E1000_READ_REG(hw, E1000_RXCW); if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { - /* Receiver is synchronized with no invalid bits. */ switch (mac->serdes_link_state) { case e1000_serdes_link_autoneg_complete: if (!(status & E1000_STATUS_LU)) { - /* - * We have lost link, retry autoneg before + /* We have lost link, retry autoneg before * reporting link failure */ mac->serdes_link_state = @@ -1707,15 +1675,12 @@ static s32 e1000_check_for_serdes_link_8 break; case e1000_serdes_link_forced_up: - /* - * If we are receiving /C/ ordered sets, re-enable + /* If we are receiving /C/ ordered sets, re-enable * auto-negotiation in the TXCW register and disable * forced link in the Device Control register in an * attempt to auto-negotiate with our link partner. - * If the partner code word is null, stop forcing - * and restart auto negotiation. */ - if ((rxcw & E1000_RXCW_C) || !(rxcw & E1000_RXCW_CW)) { + if (rxcw & E1000_RXCW_C) { /* Enable autoneg, and unforce link up */ E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); E1000_WRITE_REG(hw, E1000_CTRL, @@ -1731,8 +1696,7 @@ static s32 e1000_check_for_serdes_link_8 case e1000_serdes_link_autoneg_progress: if (rxcw & E1000_RXCW_C) { - /* - * We received /C/ ordered sets, meaning the + /* We received /C/ ordered sets, meaning the * link partner has autonegotiated, and we can * trust the Link Up (LU) status bit. */ @@ -1748,8 +1712,7 @@ static s32 e1000_check_for_serdes_link_8 DEBUGOUT("AN_PROG -> DOWN\n"); } } else { - /* - * The link partner did not autoneg. + /* The link partner did not autoneg. * Force link up and full duplex, and change * state to forced. */ @@ -1774,8 +1737,7 @@ static s32 e1000_check_for_serdes_link_8 case e1000_serdes_link_down: default: - /* - * The link was down but the receiver has now gained + /* The link was down but the receiver has now gained * valid sync, so lets see if we can bring the link * up. */ @@ -1794,17 +1756,18 @@ static s32 e1000_check_for_serdes_link_8 mac->serdes_link_state = e1000_serdes_link_down; DEBUGOUT("ANYSTATE -> DOWN\n"); } else { - /* - * Check several times, if Sync and Config - * both are consistently 1 then simply ignore - * the Invalid bit and restart Autoneg + /* Check several times, if SYNCH bit and CONFIG + * bit both are consistently 1 then simply ignore + * the IV bit and restart Autoneg */ for (i = 0; i < AN_RETRY_COUNT; i++) { usec_delay(10); rxcw = E1000_READ_REG(hw, E1000_RXCW); - if ((rxcw & E1000_RXCW_IV) && - !((rxcw & E1000_RXCW_SYNCH) && - (rxcw & E1000_RXCW_C))) { + if ((rxcw & E1000_RXCW_SYNCH) && + (rxcw & E1000_RXCW_C)) + continue; + + if (rxcw & E1000_RXCW_IV) { mac->serdes_has_link = FALSE; mac->serdes_link_state = e1000_serdes_link_down; @@ -1845,7 +1808,7 @@ static s32 e1000_valid_led_default_82571 ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); if (ret_val) { DEBUGOUT("NVM Read Error\n"); - goto out; + return ret_val; } switch (hw->mac.type) { @@ -1862,8 +1825,7 @@ static s32 e1000_valid_led_default_82571 break; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1900,15 +1862,14 @@ void e1000_set_laa_state_82571(struct e1 /* If workaround is activated... */ if (state) - /* - * Hold a copy of the LAA in RAR[14] This is done so that + /* Hold a copy of the LAA in RAR[14] This is done so that * between the time RAR[0] gets clobbered and the time it * gets fixed, the actual LAA is in one of the RARs and no * incoming packets directed to this port are dropped. * Eventually the LAA will be in RAR[0] and RAR[14]. */ - e1000_rar_set_generic(hw, hw->mac.addr, - hw->mac.rar_entry_count - 1); + hw->mac.ops.rar_set(hw, hw->mac.addr, + hw->mac.rar_entry_count - 1); return; } @@ -1925,25 +1886,23 @@ void e1000_set_laa_state_82571(struct e1 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) { struct e1000_nvm_info *nvm = &hw->nvm; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 data; DEBUGFUNC("e1000_fix_nvm_checksum_82571"); if (nvm->type != e1000_nvm_flash_hw) - goto out; + return E1000_SUCCESS; - /* - * Check bit 4 of word 10h. If it is 0, firmware is done updating + /* Check bit 4 of word 10h. If it is 0, firmware is done updating * 10h-12h. Checksum may need to be fixed. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 00:44:56 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7CC9F2A1; Thu, 28 Feb 2013 00:44:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6B9E0DBC; Thu, 28 Feb 2013 00:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S0iuQZ071137; Thu, 28 Feb 2013 00:44:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S0isq2071124; Thu, 28 Feb 2013 00:44:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201302280044.r1S0isq2071124@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 28 Feb 2013 00:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247434 - in stable/9: share/man/man4 sys/conf sys/dev/cxgb/ulp/tom sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware sys/dev/cxgbe/tom sys/modules/cxgbe/firmware sys/modules/cx... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 00:44:56 -0000 Author: np Date: Thu Feb 28 00:44:54 2013 New Revision: 247434 URL: http://svnweb.freebsd.org/changeset/base/247434 Log: MFC r245243, r245274, r245276, r245434, r245441, r245448, r245467, r245468, r245517, r245518, r245520, r245567, r245933, r245935, r245936, r245937, r246093, r246385, r246575, r247062, r247122, r247289, r247291, r247347, r247355, and r241733. Note that TCP_OFFLOAD is not enabled in 9 yet and so some of these MFCs don't really affect functionality. But they do help future MFCs (related to TCP_OFFLOAD or not) by minimizing diffs with the driver in head. r245243: cxgbe(4): updates to the configuration file that controls how hardware resources are partitioned. - Reduce the number of virtual interfaces reserved for PF4. This leaves spare room in the source MAC table and allows the driver to setup filters that rewrite the source MAC address. - Reduce the number of filters and use the freed up space for the CLIP (Compressed Local IPv6 addresses) table. This is a prerequisite for IPv6 TOE support which will follow separately in a series of commits. r245274: cxgbe(4): Add functions to help synchronize "slow" operations (those not on the fast data path) and use them instead of frobbing the adapter lock and busy flag directly. Other changes made while reworking all slow operations: - Wait for the reply to a filter request (add/delete). This guarantees that the operation is complete by the time the ioctl returns. - Tidy up the tid_info structure. - Do not allow the tx queue size to be set to something that's not a power of 2. r245276: Overhaul the stid allocator so that it can be used for IPv6 servers too. The entry for an IPv6 server in the TCAM takes up the equivalent of two ordinary stids and must be properly aligned too. r245434: cxgbe(4): Updates to the hardware L2 table management code. - Add full support for IPv6 addresses. - Read the size of the L2 table during attach. Do not assume that PCIe physical function 4 of the card has all of the table to itself. - Use FNV instead of Jenkins to hash L3 addresses and drop the private copy of jhash.h from the driver. r245441: cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow). - Teach find_best_mtu_idx() to deal with IPv6 endpoints. - Install correct protosw in offloaded TCP/IPv6 sockets when DDP is enabled. - Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included without having to drag in t4_msg.h too. This was bothering the iWARP driver for some reason. r245448: cxgbe/tom: Basic CLIP table management. This is the Compressed Local IPv6 table on the chip. To save space, the chip uses an index into this table instead of a full IPv6 address in some of its hardware data structures. For now the driver fills this table with all the local IPv6 addresses that it sees at the time the table is initialized. I'll improve this later so that the table is updated whenever new IPv6 addresses are configured or existing ones deleted. r245467: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open). r245468: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open). r245517: cxgbe: Fix the for_each_foo macros -- the last argument should not share its name with any member of struct sge. r245518: cxgbe: Do a more thorough job in the CLEAR_STATS ioctl. r245520: Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when specifying match criteria. "vlan" continues to be valid here, and it continues to be valid when deleting, rewriting, inserting, or stacking an 802.1q tag to a matching packet. r245567: cxgbe: Make the for_each macros safer to use by turning them into a single statement each. r245933: cxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces are in place. You still have to enable it explicitly, after loading the t4_tom KLD. r245935: Add a couple of missing error codes. Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice and not a fatal error. r245936: Force the 404-BT card (4 x 1G) to use the "uwire" configuration file. r245937: Install an extra hold on the newly allocated synq entry so that it cannot be freed while do_pass_accept_req is running. This closes a race where do_pass_establish on another CPU (the driver chose a different queue for the new tid) expands the synq entry into a full PCB and then releases the only hold on it, all while do_pass_accept_req is still running. r246093: Provide a statistic to track the number of drops in each of the port's txq's buf_ring. The aggregate for all the queues of a port is already provided in ifnet->if_snd.ifq_drops. r246385: Busy-wait when cold. r246575: Do not hold locks around hardware context reads. r247062: cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and CSUM_TCP too. They are all set explicitly by the kernel usually. r247122: cxgbe(4): Add sysctls to extract debug information from the chip: dev.t4nex.X.misc.cim_la logic analyzer dump dev.t4nex.X.misc.cim_qcfg queue configuration dev.t4nex.X.misc.cim_ibq_xxx inbound queues dev.t4nex.X.misc.cim_obq_xxx outbound queues r247289: cxgbe(4): Update firmware to 1.8.4.0. r247291: cxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating them in a firmware message if it is able to do so. This works out better for one of the FIFOs in the chip. r247347: cxgbe(4): Consider all the API versions of the interfaces exported by the firmware (instead of just the main firmware version) when evaluating firmware compatibility. Document the new "hw.cxgbe.fw_install" knob being introduced here. This should fix kern/173584 too. Setting hw.cxgbe.fw_install=2 will mostly do what was requested in the PR but it's a bit more intelligent in that it won't reinstall the same firmware repeatedly if the knob is left set. r247355: cxgbe(4): Report unusual out of band errors from the firmware. r241733 (by ed@): Prefer __containerof() over __member2struct(). The former works better with qualifiers, but also properly type checks the input pointer. Added: stable/9/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu - copied unchanged from r247289, head/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu Deleted: stable/9/sys/dev/cxgbe/common/jhash.h stable/9/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu Modified: stable/9/share/man/man4/cxgbe.4 stable/9/sys/conf/files stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/common/t4_hw.h stable/9/sys/dev/cxgbe/common/t4_msg.h stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/dev/cxgbe/offload.h stable/9/sys/dev/cxgbe/t4_l2t.c stable/9/sys/dev/cxgbe/t4_l2t.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_connect.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/dev/cxgbe/tom/t4_listen.c stable/9/sys/dev/cxgbe/tom/t4_tom.c stable/9/sys/dev/cxgbe/tom/t4_tom.h stable/9/sys/dev/cxgbe/tom/t4_tom_l2t.c stable/9/sys/modules/cxgbe/firmware/Makefile stable/9/sys/modules/cxgbe/tom/Makefile stable/9/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) stable/9/tools/tools/cxgbetool/ (props changed) Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/share/man/man4/cxgbe.4 Thu Feb 28 00:44:54 2013 (r247434) @@ -178,6 +178,15 @@ Bit 0 represents INTx (line interrupts), The default is 7 (all allowed). The driver will select the best possible type out of the allowed types by itself. +.It Va hw.cxgbe.fw_install +0 prohibits the driver from installing a firmware on the card. +1 allows the driver to install a new firmware if internal driver +heuristics indicate that the new firmware is preferable to the one +already on the card. +2 instructs the driver to always install the new firmware on the card as +long as it is compatible with the driver and is a different version than +the one already on the card. +The default is 1. .It Va hw.cxgbe.config_file Select a pre-packaged device configuration file. A configuration file contains a recipe for partitioning and configuring the Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/conf/files Thu Feb 28 00:44:54 2013 (r247434) @@ -959,7 +959,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h ============================================================================== --- stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h Thu Feb 28 00:44:54 2013 (r247434) @@ -142,7 +142,8 @@ void t3_process_tid_release_list(void *d static inline struct tom_data * t3_tomdata(struct toedev *tod) { - return (member2struct(tom_data, tod, tod)); + + return (__containerof(tod, struct tom_data, tod)); } union listen_entry { Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgbe/adapter.h Thu Feb 28 00:44:54 2013 (r247434) @@ -158,6 +158,16 @@ enum { }; enum { + /* flags understood by begin_synchronized_op */ + HOLD_LOCK = (1 << 0), + SLEEP_OK = (1 << 1), + INTR_OK = (1 << 2), + + /* flags understood by end_synchronized_op */ + LOCK_HELD = HOLD_LOCK, +}; + +enum { /* adapter flags */ FULL_INIT_DONE = (1 << 0), FW_OK = (1 << 1), @@ -174,11 +184,11 @@ enum { PORT_SYSCTL_CTX = (1 << 2), }; -#define IS_DOOMED(pi) (pi->flags & DOOMED) -#define SET_DOOMED(pi) do {pi->flags |= DOOMED;} while (0) -#define IS_BUSY(sc) (sc->flags & CXGBE_BUSY) -#define SET_BUSY(sc) do {sc->flags |= CXGBE_BUSY;} while (0) -#define CLR_BUSY(sc) do {sc->flags &= ~CXGBE_BUSY;} while (0) +#define IS_DOOMED(pi) ((pi)->flags & DOOMED) +#define SET_DOOMED(pi) do {(pi)->flags |= DOOMED;} while (0) +#define IS_BUSY(sc) ((sc)->flags & CXGBE_BUSY) +#define SET_BUSY(sc) do {(sc)->flags |= CXGBE_BUSY;} while (0) +#define CLR_BUSY(sc) do {(sc)->flags &= ~CXGBE_BUSY;} while (0) struct port_info { device_t dev; @@ -435,7 +445,7 @@ static inline struct sge_rxq * iq_to_rxq(struct sge_iq *iq) { - return (member2struct(sge_rxq, iq, iq)); + return (__containerof(iq, struct sge_rxq, iq)); } @@ -450,7 +460,7 @@ static inline struct sge_ofld_rxq * iq_to_ofld_rxq(struct sge_iq *iq) { - return (member2struct(sge_ofld_rxq, iq, iq)); + return (__containerof(iq, struct sge_ofld_rxq, iq)); } #endif @@ -567,7 +577,8 @@ struct adapter { int flags; char fw_version[32]; - unsigned int cfcsum; + char cfg_file[32]; + u_int cfcsum; struct adapter_params params; struct t4_virt_res vres; @@ -589,8 +600,13 @@ struct adapter { struct callout sfl_callout; an_handler_t an_handler __aligned(CACHE_LINE_SIZE); - fw_msg_handler_t fw_msg_handler[4]; /* NUM_FW6_TYPES */ + fw_msg_handler_t fw_msg_handler[5]; /* NUM_FW6_TYPES */ cpl_handler_t cpl_handler[0xef]; /* NUM_CPL_CMDS */ + +#ifdef INVARIANTS + const char *last_op; + const void *last_op_thr; +#endif }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) @@ -598,6 +614,12 @@ struct adapter { #define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) +/* XXX: not bulletproof, but much better than nothing */ +#define ASSERT_SYNCHRONIZED_OP(sc) \ + KASSERT(IS_BUSY(sc) && \ + (mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \ + ("%s: operation not synchronized.", __func__)) + #define PORT_LOCK(pi) mtx_lock(&(pi)->pi_lock) #define PORT_UNLOCK(pi) mtx_unlock(&(pi)->pi_lock) #define PORT_LOCK_ASSERT_OWNED(pi) mtx_assert(&(pi)->pi_lock, MA_OWNED) @@ -626,18 +648,18 @@ struct adapter { #define TXQ_LOCK_ASSERT_OWNED(txq) EQ_LOCK_ASSERT_OWNED(&(txq)->eq) #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) -#define for_each_txq(pi, iter, txq) \ - txq = &pi->adapter->sge.txq[pi->first_txq]; \ - for (iter = 0; iter < pi->ntxq; ++iter, ++txq) -#define for_each_rxq(pi, iter, rxq) \ - rxq = &pi->adapter->sge.rxq[pi->first_rxq]; \ - for (iter = 0; iter < pi->nrxq; ++iter, ++rxq) -#define for_each_ofld_txq(pi, iter, ofld_txq) \ - ofld_txq = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ - for (iter = 0; iter < pi->nofldtxq; ++iter, ++ofld_txq) -#define for_each_ofld_rxq(pi, iter, ofld_rxq) \ - ofld_rxq = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ - for (iter = 0; iter < pi->nofldrxq; ++iter, ++ofld_rxq) +#define for_each_txq(pi, iter, q) \ + for (q = &pi->adapter->sge.txq[pi->first_txq], iter = 0; \ + iter < pi->ntxq; ++iter, ++q) +#define for_each_rxq(pi, iter, q) \ + for (q = &pi->adapter->sge.rxq[pi->first_rxq], iter = 0; \ + iter < pi->nrxq; ++iter, ++q) +#define for_each_ofld_txq(pi, iter, q) \ + for (q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq], iter = 0; \ + iter < pi->nofldtxq; ++iter, ++q) +#define for_each_ofld_rxq(pi, iter, q) \ + for (q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq], iter = 0; \ + iter < pi->nofldrxq; ++iter, ++q) /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 @@ -751,6 +773,8 @@ int t4_register_cpl_handler(struct adapt int t4_register_an_handler(struct adapter *, an_handler_t); int t4_register_fw_msg_handler(struct adapter *, int, fw_msg_handler_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); +int begin_synchronized_op(struct adapter *, struct port_info *, int, char *); +void end_synchronized_op(struct adapter *, int); /* t4_sge.c */ void t4_sge_modload(void); Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgbe/common/common.h Thu Feb 28 00:44:54 2013 (r247434) @@ -64,8 +64,14 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 6 -#define FW_VERSION_MICRO 2 +#define FW_VERSION_MINOR 8 +#define FW_VERSION_MICRO 4 +#define FW_VERSION_BUILD 0 + +#define FW_VERSION (V_FW_HDR_FW_VER_MAJOR(FW_VERSION_MAJOR) | \ + V_FW_HDR_FW_VER_MINOR(FW_VERSION_MINOR) | \ + V_FW_HDR_FW_VER_MICRO(FW_VERSION_MICRO) | \ + V_FW_HDR_FW_VER_BUILD(FW_VERSION_BUILD)) struct port_stats { u64 tx_octets; /* total # of octets in good frames */ @@ -546,7 +552,4 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); -int t4_config_scheduler(struct adapter *adapter, int mode, int level, int pktsize, - int sched_class, int port, int rate, int unit, - int weight, int minrate, int maxrate); #endif /* __CHELSIO_COMMON_H */ Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Thu Feb 28 00:44:54 2013 (r247434) @@ -35,7 +35,12 @@ __FBSDID("$FreeBSD$"); #include "firmware/t4fw_interface.h" #undef msleep -#define msleep(x) pause("t4hw", (x) * hz / 1000) +#define msleep(x) do { \ + if (cold) \ + DELAY((x) * 1000); \ + else \ + pause("t4hw", (x) * hz / 1000); \ +} while (0) /** * t4_wait_op_done_val - wait until an operation is completed @@ -149,6 +154,36 @@ u32 t4_hw_pci_read_cfg4(adapter_t *adap, } /* + * t4_report_fw_error - report firmware error + * @adap: the adapter + * + * The adapter firmware can indicate error conditions to the host. + * This routine prints out the reason for the firmware error (as + * reported by the firmware). + */ +static void t4_report_fw_error(struct adapter *adap) +{ + static const char *reason[] = { + "Crash", /* PCIE_FW_EVAL_CRASH */ + "During Device Preparation", /* PCIE_FW_EVAL_PREP */ + "During Device Configuration", /* PCIE_FW_EVAL_CONF */ + "During Device Initialization", /* PCIE_FW_EVAL_INIT */ + "Unexpected Event", /* PCIE_FW_EVAL_UNEXPECTEDEVENT */ + "Insufficient Airflow", /* PCIE_FW_EVAL_OVERHEAT */ + "Device Shutdown", /* PCIE_FW_EVAL_DEVICESHUTDOWN */ + "Reserved", /* reserved */ + }; + u32 pcie_fw; + + pcie_fw = t4_read_reg(adap, A_PCIE_FW); + if (!(pcie_fw & F_PCIE_FW_ERR)) + CH_ERR(adap, "Firmware error report called with no error\n"); + else + CH_ERR(adap, "Firmware reports adapter error: %s\n", + reason[G_PCIE_FW_EVAL(pcie_fw)]); +} + +/* * Get the reply to a mailbox command and store it in @rpl in big-endian order. */ static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit, @@ -262,8 +297,15 @@ int t4_wr_mbox_meat(struct adapter *adap } } + /* + * We timed out waiting for a reply to our mailbox command. Report + * the error and also check to see if the firmware reported any + * errors ... + */ CH_ERR(adap, "command %#x in mailbox %d timed out\n", *(const u8 *)cmd, mbox); + if (t4_read_reg(adap, A_PCIE_FW) & F_PCIE_FW_ERR) + t4_report_fw_error(adap); return -ETIMEDOUT; } @@ -2028,9 +2070,11 @@ static void cim_intr_handler(struct adap { F_TIMEOUTMAINT , "CIM PIF MA timeout", -1, 1 }, { 0 } }; - int fat; + if (t4_read_reg(adapter, A_PCIE_FW) & F_PCIE_FW_ERR) + t4_report_fw_error(adapter); + fat = t4_handle_intr_status(adapter, A_CIM_HOST_INT_CAUSE, cim_intr_info) + t4_handle_intr_status(adapter, A_CIM_HOST_UPACC_INT_CAUSE, @@ -3904,13 +3948,13 @@ int t4_i2c_rd(struct adapter *adap, unsi F_FW_CMD_READ | V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_I2C)); c.cycles_to_len16 = htonl(FW_LEN16(c)); - c.u.i2c.pid_pkd = V_FW_LDST_CMD_PID(port_id); - c.u.i2c.base = dev_addr; - c.u.i2c.boffset = offset; + c.u.i2c_deprecated.pid_pkd = V_FW_LDST_CMD_PID(port_id); + c.u.i2c_deprecated.base = dev_addr; + c.u.i2c_deprecated.boffset = offset; ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); if (ret == 0) - *valp = c.u.i2c.data; + *valp = c.u.i2c_deprecated.data; return ret; } @@ -4098,12 +4142,16 @@ retry: /* * Issue the HELLO command to the firmware. If it's not successful * but indicates that we got a "busy" or "timeout" condition, retry - * the HELLO until we exhaust our retry limit. + * the HELLO until we exhaust our retry limit. If we do exceed our + * retry limit, check to see if the firmware left us any error + * information and report that if so ... */ ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); if (ret != FW_SUCCESS) { if ((ret == -EBUSY || ret == -ETIMEDOUT) && retries-- > 0) goto retry; + if (t4_read_reg(adap, A_PCIE_FW) & F_PCIE_FW_ERR) + t4_report_fw_error(adap); return ret; } @@ -4588,7 +4636,7 @@ int t4_alloc_vi_func(struct adapter *ada } } if (rss_size) - *rss_size = G_FW_VI_CMD_RSSSIZE(ntohs(c.rsssize_pkd)); + *rss_size = G_FW_VI_CMD_RSSSIZE(ntohs(c.norss_rsssize)); return G_FW_VI_CMD_VIID(htons(c.type_to_viid)); } @@ -5299,43 +5347,3 @@ int __devinit t4_port_init(struct port_i return 0; } - -int t4_config_scheduler(struct adapter *adapter, int mode, int level, - int pktsize, int sched_class, int port, int unit, - int rate, int weight, int minrate, int maxrate) -{ - struct fw_sched_cmd cmd, rpl; - - if (rate < 0 || unit < 0) - return -EINVAL; - - memset(&cmd, 0, sizeof(cmd)); - cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | - F_FW_CMD_REQUEST | F_FW_CMD_WRITE); - cmd.retval_len16 = cpu_to_be32(V_FW_CMD_LEN16(sizeof(cmd)/16)); - - cmd.u.params.sc = 1; - cmd.u.params.level = level; - cmd.u.params.mode = mode; - cmd.u.params.ch = port; - cmd.u.params.cl = sched_class; - cmd.u.params.rate = rate; - cmd.u.params.unit = unit; - - switch (level) { - case FW_SCHED_PARAMS_LEVEL_CH_WRR: - case FW_SCHED_PARAMS_LEVEL_CL_WRR: - cmd.u.params.weight = cpu_to_be16(weight); - break; - case FW_SCHED_PARAMS_LEVEL_CH_RL: - case FW_SCHED_PARAMS_LEVEL_CL_RL: - cmd.u.params.max = cpu_to_be32(maxrate); - cmd.u.params.min = cpu_to_be32(minrate); - cmd.u.params.pktsize = cpu_to_be16(pktsize); - break; - default: - return -EINVAL; - } - - return t4_wr_mbox_meat(adapter, adapter->mbox, &cmd, sizeof(cmd), &rpl, 1); -} Modified: stable/9/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.h Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgbe/common/t4_hw.h Thu Feb 28 00:44:54 2013 (r247434) @@ -58,6 +58,7 @@ enum { CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ + CIM_OBQ_SIZE = 128, /* # of 128-bit words in a CIM OBQ */ TPLA_SIZE = 128, /* # of 64-bit words in TP LA */ ULPRX_LA_SIZE = 512, /* # of 256-bit words in ULP_RX LA */ }; Modified: stable/9/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_msg.h Thu Feb 28 00:30:35 2013 (r247433) +++ stable/9/sys/dev/cxgbe/common/t4_msg.h Thu Feb 28 00:44:54 2013 (r247434) @@ -159,6 +159,8 @@ enum CPL_error { CPL_ERR_KEEPALIVE_TIMEDOUT = 34, CPL_ERR_RTX_NEG_ADVICE = 35, CPL_ERR_PERSIST_NEG_ADVICE = 36, + CPL_ERR_KEEPALV_NEG_ADVICE = 37, + CPL_ERR_WAIT_ARP_RPL = 41, CPL_ERR_ABORT_FAILED = 42, CPL_ERR_IWARP_FLM = 50, }; @@ -2222,6 +2224,15 @@ struct cpl_sge_egr_update { #define V_EGR_QID(x) ((x) << S_EGR_QID) #define G_EGR_QID(x) (((x) >> S_EGR_QID) & M_EGR_QID) +/* cpl_fw*.type values */ +enum { + FW_TYPE_CMD_RPL = 0, + FW_TYPE_WR_RPL = 1, + FW_TYPE_CQE = 2, + FW_TYPE_OFLD_CONNECTION_WR_RPL = 3, + FW_TYPE_RSSCPL = 4, +}; + struct cpl_fw2_pld { RSS_HDR u8 opcode; @@ -2290,10 +2301,11 @@ struct cpl_fw6_msg { /* cpl_fw6_msg.type values */ enum { - FW6_TYPE_CMD_RPL = 0, - FW6_TYPE_WR_RPL = 1, - FW6_TYPE_CQE = 2, - FW6_TYPE_OFLD_CONNECTION_WR_RPL = 3, + FW6_TYPE_CMD_RPL = FW_TYPE_CMD_RPL, + FW6_TYPE_WR_RPL = FW_TYPE_WR_RPL, + FW6_TYPE_CQE = FW_TYPE_CQE, + FW6_TYPE_OFLD_CONNECTION_WR_RPL = FW_TYPE_OFLD_CONNECTION_WR_RPL, + FW6_TYPE_RSSCPL = FW_TYPE_RSSCPL, NUM_FW6_TYPES }; Copied: stable/9/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu (from r247289, head/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu Thu Feb 28 00:44:54 2013 (r247434, copy of r247289, head/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu) @@ -0,0 +1,8237 @@ +/*- + * Copyright (c) 2013 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + */ +begin-base64 644 t4fw +AAADkgEIBAAAAQkBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAA3cDhgONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFRodSBGZWIgIDcgMTU6 +Mzg6MjYgUFNUIDIwMTMgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2Zpcm13 +YXJlL2N2cy9mdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjA4LjA0LjAwAAAAAAAAAJ/jNKZg +AMQA4QAwuHj///8f/OFAgAAAAeEAe3AAABAAH//7gOEAYBDhAZRwIAAAAOEBnAThAHkAAAIAQOEA +eYAABgBAAAIACgAGAArhAHkEAAoAAIAAAQDhAHs84QB7ROEAe+TiAAAAAAEAAOEAe5AgAAAAAACA +AOEAewAAAEAB4QB7nAAAQABERERC4AAAAOMABHNERERA4wAIACAAAlwAAAAAH/+NIAAAAAAf/40k +AAAAAB//jSgAAAAAH/+NLB//wAAAAAAAAAAAAMAAEv/OE//OhCAEMwGTIBH/zRL/zZIQEf/NEv/N +khAR/80B9DER/8yQEBH/zCIK/5IQAOQxAAUxAQIAEv/JAucxAhYAEf/IgRABAV/AIQIRAckUEf/F +Ev/FkhAR/8US/8WSEGAAEgAAABH/vxL/w5IQEf+/Ev/CkhCBEBH/wcAgkhES/8CSEsAgkhMS/7+S +EIIQAvJQZS/3Ef+9xy+SEBH/vJIQEv+8E/+8kyDAMpMhE/+7kyKCIhL/uhP/upMgIyIhFP+5BDMB +yTgT/7iDMAODFAgzERT/tqQzkyET/6qTImAACMIwkyET/6eTIhL/sZAgkCGQIpAjkCSQJZAmkCeQ +KJApkCqQK5AskC2QLpAvICYQICYRgiIS/6TAMC03MC03NC03OC03PCM9AXIz7QACABL/oSMKAC83 +AC83EC83IC83MCM9AXIz7QACABL/lsAwKDcwKDc0KDc4KDc8Iz0BcjPtAwIAEv+UwDAnNwAnNxAn +NyAnNzAjPQFyM+0DAgAS/44V/48W/4/AMNcgBWYBYAAWAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4IV/4AjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/3zJLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9wwDIDLgUDAgAS/2fAMCg3QCg3RCg3SCg3TCM9 +AXIz7QMCAAACABL/ai0nAMARAUkxAEgxAQIAwAAU/2YE0jEV/2WUUBT/ZQTTMRX/ZZRQFP9kBNQx +Ff9klFAU/2QE1TEV/2OUUBD/YwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+GAOMACfgf/4YAH/+GAOMAD/gf +/4YAH/+GAOMAD/gf/4YAH/+HdOMAD/gf/4d0H/+NIOMAEWwf/40gH/+nhOMAFxgf/6eEH/+nhOMA +MXwf/8AAH//8ZeMAMXwgAAAAIAABauMAbeQgAAF4IAABfOMAb1AgAAF8IAABheMAb1QgAAGYIAAB +nOMAb2AgAAGcIAABpeMAb2QgAAG4IAABvOMAb3AgAAG8IAABxeMAb3QgAAHYIAAB2OMAb4AgAAHc +IAAB4uMAb4AgAAH4IAAB+OMAb4ggAAH8IAAB/OMAb4ggAAIYIAACGOMAb4ggAAIcIAACHOMAb4gg +AAI4IAACOOMAb4ggAAI8IAACPOMAb4ggAAJYIAACWOMAb4ggAAJcIAACYuMAb4ggAAJ4IAACeOMA +b5AgAAJ8IAACguMAb5AgAAKYIAGaouMAb5ggAoAAIAKTYOMCB6QgApNgIAKTYOMCGwQgApNgIAYP +KOMCGwQgBg8wIAYT8OMFltQgBoAAIAaNUOMFm5QgBo1QIAdgsuMFqOQgB2DAIAdhjOMGfFQgCMAA +IAjAAOMGfSAgCMAAIAjAAOMGfSAgCMAAIAkvL+MGfSAAAAAAAAAAAAAAAAAgAAYvIAAGICAACjkg +AAYgIAAJpSAABiAgAAbZIAAJPSAACMIgAAYgIAAIcSAACCQgAAe5IAAGDSAAB2QgAAYgIAAGICAA +BiAgAAb6AAAAAP///////w/8///w////APwgAItrIACMqyAAjNsgAIyhIACMYSAAjFcgAIwcIACM +EiAAjAggAIu4IACM2SAAi64gAIuUAAAAAAAAAAAAAAAAAAAACgAAAAoAAAAUAAAACgAAAAoAAAAK +AAAACgAAAAoAAAAKAAAAAAAAAAAAAAAAAAAIAAAAEAAAAEAAAAEAAAAACAAAABAAAABAAAABAAAA +BAAAABAAAABAAAABAAAAIAbKiyAGycIgBsshIAbLCCAGyu8gBsrWIAbKvSAGyqQgQIAAAAAAAP8Y +MGBgAAAA/wABAgIAAAAQIEAAAAAAAAQAAgABAACAAEAAIAAQAAggBwDOIAcAziAHAIEgBwBIIAb/ +nSAG/2ggBv9oIAcAziAHAM4gBv9oIAb/gyAG/4MgBwDOIAcAziAHAM4gBwDOIAcAziAHAM4gBwDO +IAcAziAHAM4gBwDOIAcAziAHAM4gBwDOIAcAziAHAM4gBwDOIAcAziAHAM4gBwDOIAcAISACiqgA +AAABIAKKrAAAAAIgAo3wAAAA/yACidwAAAD/IAKJ3AAAAAAgAo3wAAAAACACieAAAAABIAKJ6AAA +AAQgAonwAAAACCACifwAAAAQIAKKBAAAACAgAooMAAAAQCACihQAAACAIAKKKAAAAQAgAoo8AAAC +ACACilQAAAQAIAKKaAAACAAgAop4AAAQACACioQAACAAIAKKmAAAQAAgAonIAAAAECACidAAAAAR +IAKJSAAAAQAgAolUAAAAgCACiWQAAABAIAKJdAAAACAgAomEAAAAECACiZQAAAAIIAKJoAAAAAQg +AomsAAAAAiACibgAAAABAAAAAAAAAAAgAojoAAAAASACjfwAAAACIAKI8AAAAAQgAoj4AAAACCAC +iQAAAAAQIAKOBAAAACAgAokEAAAAQCACiRAAAACAIAKJHAAAAQAgAokoAAACAAAAAAEAAAABAAAA +AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAH +AAAABwAAAAYAAAAGAAw1AAAQRqoAFFhVABhqAAAAK2gAACODAAAYagAADQYAAAsqAAAAAAAAAAAA +AAAAAABoKwAAaCsAAGyCAABvnAAASmgAAEpoAABNKQAASmgAAE7qAABMmAAAUj0AAE+4AAGGoAAB +hqAAAgjWAAII1gACCNUAAgjVAAKLCwACiwsAAgjVAAK2cgACtnIAAw1AAAQGBwAAAAAAAAAAAAAA +AAACAgUFCAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAACAEkYAgAWn4 +IAA1yCABQhggAWWAIAFe0CABJAggA6KkH//rIB//5uAgAI1sH//azCAAXFQgAE7gAAAAAAAAAAAg +AUOQIAB7CAAAAAAAAAAAH//U4B//xggf/8PoH//BmCAASnAgAEKsIAA/4CAAg/gf/99YAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgARGgIAFRqCAAlcggAJT8H//w +KB//z/wf/8tAIAB4VCAE6eggAQXwIADkxCAAzJggAMb8IAC5QCAArCwgAJiAIASVLCADu5QgAPcw +IAPbiCABliwgAFwUAAAAACAAliQgBVKUIACK4CABScQgADI4AAAAAAAAAAAAAAAAH//zUCAAlegg +A75EAAAAAAAAAAAgAw1UIAAq2CAAMUQgACdoAAAAACAAIRggACPYIAAdjAAAAAAgAC+cIAD66AAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAALKwgBJEgAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAgAC6IIAMYMCAALWAAAAAAAAAAAAAAAAAf/8AAAAQAICAGE/AgBhiw +BEEACAQBAAgf/6SggQAAADAAAAAf/5iApQAAAMAAAADABAAAH/zeACAGFEAf/5iQA4AAAAD/+AAB +AAAAABAAAIEEAQCBBAAAAQQAAAEEAQCAAAAAAAX//x//hBAGAAAAKgAAAB//zyggA/V0AgAAAIAQ +AABBQAAAQUABAIMAAAH//7//gYAAAAQAAAgf/5cAIAjhcB//jXD//wAA//8A/yAI4aAgCOIAIAjh +4B//jhAAAA0gH/+XcB//lkAf/5scH/ziAB//mpAf/5sUH/zg4B//klAP////H/+S1B//l6gf/5a0 +H/+XIAAAC5AAAP+AIAkE8B//lxQAAAo44QAuAOEAXgDhAZIAH/+X5B//lqTgAACg4QAwuAAAgADh +AGAQAABAAOECEADhAjAA4QJQAOECcADhABAIH/zhQB//p0Qf/6c8H/zgCB//p0Af/6dcH/+nVB// +p1gf/6d0H/+nbB//p3Af/5iA//7//wAgAAAgBhPwH/zeAAQAAAgFAAAAg/8AAIEAAAAAEAAAIAYU +QCoAAAAgAAOAIAKJkB//gAAgCMRgAAA/KCAIw7AgCMRQIAjEgCACkLzP////EAAAACAIw9A///// +AgAAACACisQgAorIIAKQuCACisxAAAAAIAjEEB/84HQf/5sgH/ziDAAAgAAgABEoH/+NcAAADDz/ +/3//H/+VmCAIx7AgCQyQH/+XcCAIx+AgAoiQAAAIAB//keSCAAAAgYAAAAwAAAAABgAAAABAAB/8 +4gAf/5scAAALOCAIyGAgCMjQIAjJQCAIyXAEAQAI4AAAAB//ljggCMmgIAjJAFMAAABRAAAAIAjJ +4FIAAAAwAAAA//v//w/+//8AA///AAAn/yAJDNAgABfUH4AAPx//liwgCMowAAQAAAABAAAgCMrw +H/+UzAAA//8gCMtQIAjLsCAIy4AgBg8wIAjMMB//lkgNAAAAIAAv2CAIzLAIAAAAIAjNAPf///8f +/6SgAQAAAB//lSgf/5SAIAjfIBQAAACAAAAAgAAAAngAAACAAAAGgACwAAAACgAA4zCS///wAIAA +sQDhAZoAAAIAACAI3uAAAH5AH/+OIAYAAAAFgAAAH/+YkB//lFQrAAAAIABFsDUAAAADgAAAAwAA +AB//lFgH////AD///4BAAAAID///H////wD///8gAAAAH/+WHD0AAAAf/5KMBwAAAIEEAQCBBAAA +AAA6mMMAAAAYAAAAH/+OYAAAD/8AQwAAH/+V5AQAAAAf/4QQH/+muB//pMDhAHoAH/+STB//lQQf +/5aAH/+UnCAJEzAAAweAIAkToABAAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugDgAwAAg/+2AA// +//8P//gA/wAAACAJE+AgCOEAIAjhMCAJFHAACgAAAA8AAP//AA8f/5UQA//AAIP/wAAgCRTwIAkV +YB//lpgf/6Uw/2DwAB//pRAf/40wBIAACB//gFAARAAAAMAAAP8f//8AAIEADwAAAP//AAAf/5Y8 +H/+bGB/84ggf/5yoIAjmkB//kogf/4BgIAYSAAAAMAAAACcQH//Z4B//lPjerb7vNAAAAD8AAAAA +AIkGAJkAAB//pHgQAAcC7gAAAAHAgAAf/6NImQAAAB//pTQAiAAIgoAAAR//pMgf/6PUAxUAAAMR +AAAADwP/IAjqYCAAwCQgCOqQIAjq0CAJHUAAAI4CIAkeECAI6vAgCR2AIAkdwCAI6yAgCOtgIAjr +kCkAAAAgAMicIAYYMCAGEkAgANs48PDw8P8A/wCqqqqqzMzMzAAPQkAgA+F4H/+WoAAJAAAAgAAA +IAjtACAA++wAAEgAIAD/cB//lhQACQAIH/+kPB//pIQf/5SYAAAIBgAAiMwAAIkUfwAAAPAAAAAg +CR9AIAkgQCAJIHAgCR6gIAkgECAJH6AABAP/CgAAAB//o2Qf/6QkH/+UcIP/twCD/7YgIAjx8DMA +AADhAAAAH/+kRB//lVQf/6SMA//gAAA/9pAAABkUA//wAAAQAAEAABkcH/+kiAAP//8AAN6tH/+k +QB//lhAf/5UsIAYPQB//lIwf/5aIIABgWB//lSAgADWIH/+UhB//lFAf/5n0IAkhsCACjSAgAGD4 +H/+TiACBAADgAQAAAOABAAAA4AEgCSKAIAj0sAAADEQgAIgkIACFuCAJIgAgCSJQH/+WNCAJApAg +CQLASAAAAB//jgTv////IAkDAH////+/////3////yABddgf/5XwIAF3yB//klAf/5Ws4QAuAB// +lbThAF4A4QIOAP//v/8f/48s4QAOAOEBjgDhAHIA//++/x//lrQAAAo4H/+X+B//l/QAAAxwAAD/ +gB//l+wf/5hYIAF9dCABhcwD/wAA/7///x//l1Q8AAAAAAX//4MAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACB +gAAAAAAAAB//+Wgf//loH//5LB//+Swf//ksH//5LB//9Ggf//b0H//1mB//9Zgf//WYIAXlwAAA +AAAAAAAAAAAAAAAAAAAgBelAIAXpQAAAAAAAAAAAAAAAAAAAAAAgAX9AIAXlwB//9/Qf//f0H//3 +9B//9/Qf//f0H//39AAAAAAf//RwAAAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAAAAAEAAAA +AAAAAIGAAAAAAAAQBQAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAgQAAAAAAABgFAAAAgAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAACgQAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAgCgAR8X8T8X/TDwPmMQECABbxfRfxfndrBpBgtGZ3Y/hUDoBVk5kPFABj +//kAAABsEAQY8Xsd8XYrIAcc8XYqIQj6AgAHcbsBAO7cOQ3cAoAAC6oCnDDj8XAZsASAAAiqAhzx +biMwgPpACBXgDQUAnWXsZgIhuN0AAPrAhhWkdx0A6Xz/Ld4CgADrewIMzwKAAOtmASTL4QAAmWMC +BImTZyhmBgYgixjxXyUhCfTBZhWkMx0A5WYKK5AEgADoAAUDKMEAAG05AgUCYdEPAAAAbBAEHPFP +JiAHG/FOH/FU/kEEFaDWEQANyzmbMIcg++KWBaAJJQD6YEYVoBgFAOg2Ayu+AoAA+OYADHFmAQD4 +YCYVoAwFAOUgVys0AoAA98YADrArBQD/pgAO8Ao1AOjxPhKCAYAAnDWcN5szGfE9CnUClTGZNiUh +CZ00LyAHnDmUO/imAAkx/wEA4jYKL/wCgAAP7gII7gLuNggtEASAANEPJyEIKiEJnDWUNwZ3Agiq +Apo2CHcC5zYELJAEgADRDwAAAAAAAABsEAgoIAUnIAcpMQX4IIYV4BlFAPkADMVhdwEAiiIW8R8Y +8R/xVQwN4A2VAAx7Eaa7LLKe/YAMQ+AKpQArsp3rFgUljDmAAIyI94AMcJIAnQAtYq5k0TgrYq3k +sTRmc/0AAO6GCCWJuYAAKCAUpIgICEcoJBT1AAu90A8FABnxCS4iFiwhKYgVGvEIrsyagOoiHi5n +woAA/QBmFaANJQD9AEYV4AtlAO3w9x1WAoAAC6oCixSagekAFQRAQQAAiRUIAIooPBD9IMYV4EwF +AP0g5hWgDEUA7Ls2BMiBAABtuQUIAIYJAmHu8OkVoIeAAIgV7gAFDc8CgACpiOiMICWkNQAAC8kM +bZkCCAJhKCEp6iEoJEAFAAAICE8oJSn5QAhEIgCdAP/hwgXgDBUA+iCoFeAe5QDqIh4sbUKAAPwg +JhXgCQUA+CAGFeANBQDpFgIl2YEAAFhx1Ax+EffAAEcwDZUA/dOmFefFAQD5gAYpUgCdAMAg0Q8A +6iQACdgEgADsRAAK6ASAAFhzsdKg0Q8AwLAKzzTvhggt9o4AANog/EBoHaAbxQBYdABj/8oAAADq +JAAK2ASAAFh1PtKg0Q8A//nsDaALBQAAACt8GOokAAlgBIAAWHP0Y/+cwKBZjncY8LCMiPmf80CQ +CqUAY/+sKiEJ/EKwFa/9BQANjQENjgwuJBTttAMuYQKAAO+0AC1WAoAA/UYADTAJFQAJqgKasfjV +phXv+WIALyUp//vUDaAIBQCKJ+tEAApoBIAA+0QAFaAMBQBYbjDSoNEPAAAAbBAGKCAFKyIQ5CAH +KlAEgAD4AwId4B7FAPveAAzwGUUA+QAMXWFEAQCMIh/wiOoWAC4LHgAADEkRD5kILZKeDwIA96AL +41IAnQAnkp0MBj5kcW6LKSoiCguqDPdACQuiAJ0AKiBOLCBMsa37gAskIAsVAC0kTiowASkiGPNA +C0aSAJ0AKyAHLCEk/GAkFeAIVQD5QAQEMKsRAOCIEQ1SgoAACogCGvBuCN0CKCEHKyEJCswC+6YA +DrqIAQDq8GocQwKAAAi7AighIp1wjSCbc5x0+wYADDAKZQDodgIu7gKAAArdAp1xLCIQnHUrIDgY +8F78ACId4EwVAPzhJhXguxkAC805HPBZnnj7DQAOcAgFAJh3DcwCnHbt8E4U2AUAACsmGBvwRJh7 +mXrtABUDyMEAAAkAiut2DiHIQQAA7nYPI/EBAAAJIIYOAmMJAIYOAmEMTBGvzOrGnSMAqYAAjikt +IDim7p4p86AFV5IAnQAFD0f54ARRUgCdAMAg0Q8A6iQAC1gEgABYTV/B7O/wLxV2kYAA6iQACdgE +gADsEgAq6ASAAFhzFtKg0Q8AAAAA6iQACtgEgABYdKrSoNEPAAAAK0wY6iQACWAEgABYc2Jj/8GI +IsCUCYgC+EBGFa/+3gAAAAAAAAD8Q6gVpIkBAACBBAC9Gg3MAvxDphWv+h4AiieNEMDA6qwgLtgE +gABYbarSoNEP2iBYcsBj/1EAAGwQDC0gBSYiEC8gByshNeUWAynABIAA+wCIFac1AQDyf8AV4AwV +AAPDOftBAA1wFYUA64ICLGAEgAD3XgAKsf8BAPcAMBWgFUUA9aAf1WO7AQCJIigWAPM9XA3gDoUA +mBDywB4HEgCdAJ8SnxqbFhbv75MV6hYEL68CgADmVQgCMA0AAOYWCSJwBQAAiBouFggrEgn1AAZi +EgCdACpSnvtACaviAJ0AL1KdZPO7GO/giIj3AAlYkgCdABnv3CmSrgwDPurv2hSJ+YAAKqKtFu/Y +6hYLJGv9AADrEgslCWmAAO1mCCWbmYAAiCmHKgh3DPLgCWPiAJ0AKRoA8yIyDeD69QArIBacEftg +Ca0iAJ0AGO/QhhSNwyogOP3g5hXgCQUA+eEmFeBHBQD34QYVoKoZAAp5ORfvxysiF5v6KyIbm/uN +xAp4OfzADxLiAJ0AmBeeHYYVnBGZHOcSDCsIHgAAYAF+GO+ziIhqgSaKGSlSnnqTQytSnZsbjRvp +760UM/0AAO/UAAaB2YAAlphl/xxgAtWeHfwgJhWgCgUAWY1rGO+kiIiMEe4SDSQPBwAA//9oDaAP +BQAAwJD4IWYV7/7uABvvm8CqCoo0+2EGFa/+/gAAAAAAAAD/+zgNoA8FAACeHZ8e/CAmFaAKBQBZ +jVcY75CMEYiIjx6OHfkf9diSAJ0AYAJRwJCZG4obHe+JwLoLizTr1ggtdo4AAGACOACeHZ8enBHq +JAAJ2ASAAFhMrowRjx7uEg0ldfmAAGAB7wCeHZ8e+kDwFaAMBQBYTaWMEY8e7hINLXXGAABgAsYA +iBGOF/YgyBWvjAUALCQ7jBQGdgIG7gKsuQzaDJqE6SYbLFgEgADtIhApUASAAFhz744djBH6s6YV +oQcFAHN7CCsgFigK/3i5XoopKSA4o6rqJgkk+aaAAC8iEC0hNfuAiBXgCBUA+CCmFaAGNQCWEw27 +NvoghhXgHYUA/34ADv/2tgCKJ58eixDqrCAqYASAAFhwkI8emhErIhv9QIgV7/2GAAAAAAAA6iAH +KeAEgABYTV+MEf4hqBWv/kIA2iBYcfeMEf4hqBWv/kIAAC0iEIoWKyA7Fu9ICpkCCYkC5pgCDYn2 +AAAa70X4RIQV42kBAIfA6yAHKzICgAAGmQImIQf64AQDsLsRAOrvNR3agoAAC3cCKyEiCncCKiEJ +l/CHIJ31+eDGFapmAQDp9gQrMwKAAAaqAhbvK+r2Ayu+AoAA5+cCB8jBAADn9gEmQIEAAOa7AgJT ++QAA6/YCIhQ1AABtqQUIAIYJAmEoIBSkiAgIRygkFPUABq3SAJ0Aihj6s6YVoQkFAPMh8g3g/PUA +KyAW/WAJFSIAnQAtIhex3e0mFyGAqYAAjykuIDij/58p88AHv5IAnQCGFWVg0sAg0Q8AAAAAKCBO +ZIw9DpsCmyLrEgApUASAAO0SAypgBIAAWHHn0qDRDwDrEgMpUASAAFhzfNKg0Q8A2iD8QGgdoBvF +AFhyNWP/xwCLEtog67wYKWAEgABYcjBj/7QAAAAAAOokAA5YBIAA/CCIFa+OBQDuJDsscASAAFhz +bPohBhWgDwUALyYb/kdmHe/8ggCLGyohCfxCsBWv/QUADY0BDY4MLiQU5MwQDVYCgAAMqgL9YGYd +4A4FAP9gBh2gBhUABqoCmrEZ7tL3NaYVr/vKAACKJ+tEAApoBIAA+0QAFaAMBQBYbGXSoNEPAADa +IFhxe2P/BAAAAAAA6iAHKeAEgABYTNtj/tOLEtog67wSKWAEgABYcgFj/vdsEAgoIAXt7rwZ0ASA +APPdcgXgHkUA/wAKdSAMpQArIE4p0gjTD+oWAyXb/QAAKyRO9yAIWJAHFQAvMq5k8igqMq3mpAAF +EVGAALCY6NYIJQhBgAApIBSzmQkJRykkFPUgEO3SAJ0AKSBzKyId+yAEAN//9QDgehoEwAUAAP9X +AA/0iAEAKCRz+0AEBXAIFQAKijkPuwHrJh0tBv4AAIoifKcEKyBOyrR9pwgtIEwsIE59wxnMbC4g +FO8iAi9YHAAAZPH0wCDRDwAAAAAAAIgnx5MJqQHpJgIkUMEAAFhkOOPukhUBEYAAKKAAA4gKiIzs +oActWASAAPpAaB2gDUUAC4AAZa/hiSdkn6iKmsqnKpIJZK+eKKAAA4gKiIzsoActWASAAPpAaB2g +DTUAC4AAZa/hY/99AAD//1gNoAoFAMCgWYw0He5sidgsCgr5P/dAkB5FACYKACkgFLOZ+EKGHe/8 +GgAAAADqJAAK2ASAAFhy5tKg0Q8AACogBSsgBw8CAP9ADxUhuwEABQVH+KAPKVIAnQCOE+7iBi94 +BIAAnhQLvgL1YApyEgCdAAy6EQOqCCiinvcADnzSAJ0AKqKd7hYBJQrxgAD6QAgV4AwVAFgf9hvu +Si8hCR7uQCghIi0gBxzuUikhJP8GAAww3REA7hIELuqCgAANmQIMmQKZoIwgKKYC/0BmFeANJQDu +pgUuZgKAAA3MAv1AJhWgCQUA6wAVBVBhAACxmeqDHgyP6AAAjxEM/xHz4ABH8A6lAC72nfS/8sES +AJ0AKiIH60QACmgEgAD7RAAVoAwFAFhrwGP+OgAAAAAA//dYDaAKBQAMmzTr1ggtbu4AAGP+2QAA +LyEJ+EKwFaALBQD6wAYd7/oFAAqaASpkA+qaDAxBAoAA6iQUL/4CgAAI/wIH/wKfYfZ1phXv9soA +iifAsPtEABWgDBUAWG47He4anaCMIBvuGeumAi5mAoAAB8wC/UAmFaAbxQDsJAAJUASAAFhxRMAg +0Q8AAInY9yAEqJIAnQAM6hGjqiiinvcABXzSAJ0AKqKdZKCmsJiY2O4WAS11VgAAiSLrFgAkhRmA +AJ8S+L/rYVIAnQCKJ8Cw+0QAFaAMFQBYby4e7fqeoI0gG+377BICLu4CgAAH3QKdoYzGnKP7QEYV +7/TqAOtUAAlQBIAAWHJmY/0njxOP8/4ghhXv+I4AAAAAAAAA//jQDaAKBQAAnxKbEfogBhXgCgUA +WYudHe3WixCJ2I8SjhH5P/qIkAylAP/9jA2gCgUAwKAMmDT5oQYVr/1aAAAAAIsQ7xYCKVAEgADr +vBgpYASAAFhxCP4gSBXv/SIAbBAEKCAU74seahgEgACKJ/pgaB3gDAUA6qwgKegEgABYa1XSoNEP +AIsic75+FO24iUhqkXob7bXTDyyyrmTAWCqyrWSgVLCd7UYIJQLhgAApIBTpJBQs2twAAC8hCfhC +sBWgDQUA/UAGHe/8BQAMnAEspAPsnAwMQQKAAOwkFC/+AoAA+eYAD7AOFQAO/wKfof91phWv/eYA +wKDA6g6eNO5GCC19ZgAAjyLJ9cAg0Q/AoFmLXolI+T/70JIAnQBj/+UA2iD8QGgdoBvFAFhw0sAg +0Q9sEAgpIg/vITQpsASAAPZg6BXnhQEA7iAHKlgEgAD7H8AVoAQVAPqNAA0wHUUA/uEAC/HuAQDp +fR8MFHQAACggT+8gTSRABQAACAhHKCRP+eATC6IAnQAvIAWbEZoQ/eARLWIAnQCJIsej+UAN0OIA +nQAsIhmLMv1gE00iAJ0AjTgY7W3vEgEmkaGAAAzkEahEGO1r6BYCJ/gNAAD1wA0CEgCdAClCnv8g +GYviAJ0AKUKd7ZQABJHBgACLKSoiCgwFPg8CAAuqDPVACeviAJ0ALBoA9YIyDeD49QArIBbTD/lg +GAUiAJ0AGu1mKSEkKyEHCpkCKiEJCwtKDLsQC6oCKyAHHO1SCytA6O1eHdqCgAAMuwIsISKb0Isg +mdSa0wjMApzS/WAAFbAMVQAMuwKb0RvtVSoiDyrWBSkgOPvapgWgDAUA/aDmFaBIJQD3oQYV4JkZ +APlNAA3wCiUACYo5KWIEKdYJKGIFKNYK/MDIFaAJBQDs1gsjh+GAAOntRRzCgoAACYgCmNyMaJff +nN6MEolpKdYQiGoo1hHsABUGySEAAAkAioxn/OAKq6IAnQAZ7S0KuAIJiAKY1sD1/pOmFeEOBQD1 +wfIN4Pr1ACsgFvtgEgUiAJ0ALiIZjCktIE8rIDjlzAgHcAUAAO4mGSbr/QAALSRPnCnzYA4HkgCd +AI0QZdG+wCDRD58TnhSeFZ0W6iQACtgEgABYSjaNFo4U7xIDJXVhgACOEGXv14on2zDsEgElUMEA +AFhuHMAg0Q8a7P+KqPdADsiSAJ0AK0Ke/2APs+IAnQApQp0d7PjkkeplY/0AAJzY7ZQADPJ2AABg +AHoAKCA58R/4DhIAnQD/++QNoAkVAMGjevkSKSA6/iCmFaAL9QD7IBAlYgCdAOokAArYBIAAWHFq +0qDRDwAAAAAAAPAAGA2gGtUAwKGMNyshCY04jjLrrxEN3QKAAA+7AuS7AglQBIAAWHFMwCDRDwAA +AP//WA2gGoUAAAAr7BjqJAAJYASAAFhwEmP/KAAACrkCmdbAhfiTphWhDAUAdcsNKyAWKgr/+2AN +PSIAnQCLEGSxNYtqjGeKaat7B8wMnGf3YNIN4A0FALGqjGWbaotmmmms2qt7d7sBsaqbZppliCkt +IDiliJgp86AJN5IAnQCJJ4qayqWLmcqxnxMZ7L8osACeFJ4VCYgKiIwssAf6QGgdoA01AAuAAI4U +jxOLIsej+1/zaOIAnQAoITSHZ/xB6BXgCRUAmRD44QALsBxFAPz+AA5/85YAANogWG9SY/47iifq +rDArWASAAFhcw9Kg0Q8AAAAAAAAA//NIDaAJBQCfE54UnhWdFvpA8BWgDAUAWEq+jRaOFO8SAy1n +TgAAK+wS6iQACWAEgABYb81j/hPqIAcq4ASAAFhKn2P9tZ8TnhT+IKYVoAoFAFmKShrsgoqojhSP +E/lf8HiSAJ0A//iIDaAJBQDAkBzsfMC6C6s0+4EGFe/4QgCfE4onnhTuFgUp2ASAAOwSASVQwQAA +WG2O7hIELTAEgAD+IGgV7/qWAJ8TnhTuFgUpUASAAFhvHY4U/iBoFe/7JgAAwVP6QGgdoAsFAPwA +Ah2gDTUAWGjGKyAFjhX1f91NYgCdAGP9Y58TnhSeFeogByrgBIAAWEpyjhT+IGgV7/kaAAAAAAAA +bBAMlRMmIAUvIAeHL+oyBCnABIAA/EaEFec1AQDyf8AV4A4VAAPjOf1BAA1wG0UA56sfDGAEgAD6 +wB6lYf8BAIkiKBYA8zr8DeAOhQAmgAEoFgDywBy3EgCdAJ8SnxoZ7D6TFxbsPOoWBiJYDQAA6xYJ +L68CgADmVQgCcAUAAIganhiNGfUABVoSAJ0AK1Ke/WAII+IAnQAvUp1k85KImPcAB+iSAJ0AFuwr +JmKuDAM+6uwoEwiJgAAqoq3qFgska/0AAOsSCyUIEYAA7ZYIJZqBgACHKYYqB2YM8sAH6+IAnQAo +GgDzAjIN4Pr1ACsgFpwR+2AILSIAnQAW7CsqIDj72FAF4A0FAJ3394CIFeCqGQAKazmGFsSACo05 +9sAPguIAnQCdFI0X6xYFLoduAABgAZCImGqBIY0ZK1KefbM+L1KdnxuGG7CK72QAAwHhgACamGX/ +RmAC1gCeHPwgJhWgCgUAWYnDGev8iJiMEe4SDCQPGwAA//9kDaAPBQAAwLD6IWYV7/8CAMDaDY00 +/SEGFe//BgAA//v8DaAPBQAAnhyfHfwgJhWgCgUAWYmxGevqjBGImI8djhz5H/dIkgCdAGACWcBg +lhuKG8C6C4s065YILXf+AABgAkOeHJ8dnBHqJAAJ2ASAAFhJCYwRjx3uEgwld3GAAGAB+54cnx36 +QPAVoAwFAFhKAIwRjx3uEgwtd0YAAGAC05wR/iGGFa+IBQDoJDsmOEEAAOcDHgewgQAABgJhhhaW ++I3Hh8SIxq1tBncMl8R22wouFgzsFgEkQAUAAIwWixGGFI4VmLadtwbuAu0iDylQBIAAWHBBGeu6 +jhyMEfqzphWhBwUAc3sIKyAWKAr/eLlciykqIDiju+smCSV5qoAAhi8vITT9gIgV4AoVAPog5hWg +CDUAmBMP3Tb8IMYV4B9FAPe+AA+/9v4AAJ4ciiefHYsQ6qwgKmAEgABYbOHvEg0tYASAAP4hiBWv +/NoA6iAHKeAEgABYSbGMEY4c+dcwBe/+QgAA2iBYbkiMEY4c+dcmBe/+NgAmIDsX65vtuwIHyIEA +APmCABWjqwEA57cCCwjGAACTH43AE+uUA90BIyAHAyNACjMQA90CE+uIJiEkA90CIyEH6yEJLVIC +gAD6xgALOjMBAOohIimbAoAAA7sCgy+d8I0glvSX9pP1m/ODH+vrfB7uAoAADe0CnfELqgLq9gIi +DD0AALBKbakFCACGCQJhKCAUpIgICEcoJBT1AAZd0gCdACoSCPqzphWhCQUA8yHyDeD89QArIBb9 +YAilIgCdAMg/jiktIDij7p4p86AHr5IAnQCPF2Xw0sAg0Q8AJiBOZGxnDpsCmyLrEgApUASAAO0S +AypgBIAAWG4/0qDRDwDqJAAK2ASAAFhv1NKg0Q8A2iD8QGgdoBvFAFhujWP/xwCLEtog67wYKWAE +gABYbohj/7TbwPwgyBWvjgUALiQ7CCCGCQJj7PYIKVAEgADtIg8r8ASAAFhvw/ohBhWgDwUA/kdm +He/8qgCLGyohCfxCsBWv/QUADY0BDY4MLiQU5MwQDVYCgAAMqgL9YGYd4A4FAP9gBh2gBhUABqoC +mrEZ6yn3NaYVr/vyAACKJ+tEAApoBIAA+0QAFaAMBQBYaLzSoNEP2iBYbdNj/wYAAAAA6iAHKeAE +gABYSTNj/uGLEtog67wSKWAEgABYbllj/vdsEAYoIAUlIAckCgP3AAVkUVUBACggImSAoQIqAlhm +5vlABMDQBhUAKSAh4+sKGAQKgADzIAQv0gCdAOxZEQKlaQAAo5kqkp5uo3Qrkp1ksGopICH6QAgV +oPzlAAyZAfcmAAywDQUA+EQmHeAIBQD4IAYVoA6VAPggJhWgDwUA+CBGFaAMBQBYa/YMXRGj3fWz +phWgAgUA0Q8X6u+KeGqhJgxZEaOZLpKebuMtK5Kd5LApZWP9AACceGW/lMAg0Q///igNoAsFAMCg +WYiqinhroc7//4wNoAsFAMCwwNoNrTT84QYV7/9SAAAAAGwQCiwgBfhA8BXgCxUA+GBoHaelAQDo +FgElU/kAAOq6OQoYBIAA6hYFLCAEgAD9gcAEUZkBAMGz+4AZhWIAnQCMIhvqybQ+5cKxbMcCgACr +iJ4U7RIEKAQKgAD1IAQCEgCdACyCnv2ABxPiAJ0AL4Kd7xYGJ5SJgAAlIRuKQocpmBAFpTb1TwAL +cQ8FAHbzAdWghioHZgz0wAXT4gCdACoaAPVCMg3g/PUAKyAWmBD9YAX1IgCdAI0ppd2dKYpC+qAK +cqIAnQCZGIwVG+q+h0OZGZgQ63cBBgfpgABgAK0a6qOKqOgWACUMn4AAjBQrgp58sz8vgp0e6p3k +8Dhla/0AAJ3o7xYGL/uOAABgAfaZGPghJhXgCgUAWYhbGuqUiqiIEOkSCCUPFwAA//9UDaAPBQAA +wPAc6o3AugurNPuBBhXv/woAAAAAAAAA//yEDaAPBQAAmRiZGeokAArYBIAAWEewiBDpEggleamA +AGABipkYmRn6QPAVoAwFAFhIqIgQ6RIILXmOAABgAmDudAAKWASAAOWsDAroBIAA7xIGKVAEgADs +RgIp4ASAAFhr5okZiRiIEPsTphWhDQUAddsIKyAWLgr/frkxwPH+IKYV7/oOAACKJ4sR6qwgKeAE +gABYa6PAsuukAi0gBIAA+0BIFa/+bgAAAAAAAADqIAcq4ASAAFhIcYgQ+CEIFe/+9gCJQIwVh0P4 +IAYVp9kBAO0WAi4HpgAAKiAH+uBoHeGqAQBYJ3mJFteg6jz/IkBBAADpnCAhjDUAAG2pBQgAhgkC +YcCgmhMvIQcW6lyIEvvUtAWq/wEA6eo6H/8CgADm/wIEaD0AAPYgyBWk3R0A7iEaJugFAAANPQyf +YOsiACvgBIAA7ak5AbgFAADpZgIkQEEAAOhmAy3+AoAAD38C72YBKugEgADvQgMjUEEAAFhrmZcX +6iQACdgEgABYYfaPQOMSByep7oAAhxDy86YV4QYFAPTB8g3g+PUAKyAW+WAE3SIAnQCIE9KA0Q8A +iRVkkJvAINEPACucGOokAAlgBIAAWG1YY//kiif4IAYVp7lBAA8CAOqsICgECoAA9WAEUdIAnQCM +FisKAezMICnoBIAAWGek+iBmFa/8OgAAAACLFuw9EQlQBIAA/WAARfAMFQBYZazyYGAV7/3CAGWs +0Pmf5mjSAJ0ALyAg8f/mF5IAnQBj/3sAAAAAAAAA6iAHKuAEgABYSA2IE9KA0Q+KJ9ww6xIBJVCB +AABYazHAsvtARh3gAgUA0Q8AANsw/GBoHeAMBQBYZ4PbQOw0AAroBIAA6hYDK/AEgADvEgYpUASA +AFhrWfdAaB3v+2YAAAArnBLqJAAJYASAAFhtHmP+/ABsEAQU6fMkQIAIRBH6gGgdoAsVAFmEixjp +32SgQvhGAAwwCSUAmaHopgAhAcmAAGghHG8kGe4iFmVIIQAAA0CICQiKAyCICQSKAwCICQCK2kD6 +AEId4AwVAFmJWMAg0Q/HJNEPD+gwn6IO7jCeow3AMJ2kDLEw/UCmFaALBQCbpvtA5hXv/y4AAAAA +AGwQFOIWGynwBIAA/iNGFaAMFQD6I2gVp2UBAOjiACNb+QAAC8s5KaAHiqf6IaYV54gBAPgihhWh +mQEA6RYKJVCBAADqFh4qGASAAPTAL2ESAJ0ALRIbjdJl1B8f6aGP+BLpn/fgL8iQDqUAJiKuZGYc +KSKtZJYYGumasPiYqOiUAASvwYAALxIeKRIa++BoFa/FBQAF/wEvFhzvrwgEyIEAAO/8QCyoBIAA +/yAvkuIAnQAmEhotEhQlFhX2wGgVr/wFAOYWESboPQAADNkBpZbmFhArKASAAP7ALmLiAJ0AmBeZ +FZMWJBIb7xIKItgRAACbG/4iZhXkrR0A6hYWIbBBAADmFhIi0CEAAJocFul1lhgqEhomEhzkQQcv +/wKAAKL/7xYYIzEBAACWGRbphftBhBWqRAEA6hYZKicCgAAGRAKUH/XTAgWgB6IAJyAA6v8MBMgF +AADqEh4nQAUAAP8AaB2gaAEA6BIdJJWJgAArEhwsMACKowXMC6ur67xALmgEgAD7gBUC4gCdAAkM +QPoAIh3gCgUADLo4DasL7aoKBeghAAD6ACId4AwFAAa8OBbpZwh3C6bGJmCQ58sLDUAEgADnzAoF +2GEAAORkCAZgQQAAioANAIkPqjaawAsAi4yA4zwBIRAFAAD/n/rz4gCdAIMUD8sMCsIMkoD/oAgV +4AcVAPOgKBWgBgUAC3Y4qWmiopLReisBsf+f0PKAGefSAJ0AHOlNLRIbIhIaFulJGulI7hIPJ0AF +AAAGNgHqOgEMzgKAAAlmAikSHQqIAiMSGZiUllCPJygSFyYSFgP/DP5A5hXhNB0Ao2MvEhQS6TOT +Hp6AjdAuEh7ihgIhmAUAAO+GAy7OAoAA+GYADPALBQD5ACYV4ApVAOYWASmgBIAA6BIVJBBBAADo +FgApeASAAFmGcy8SHioSFiYSHI/zKBIVKxIQ5v8ICUgEgADmEhEn+QEAAPvgFVviAJ0AbakFCACG +CQJhAzQCKBIa6IIHKw0eAABkgaj10igFoPL1ABzpFy4SGi8SGC0SGy7hDfPzphXgClUA/aAIFeAL +BQBZhlgmEhsmYBbywAoFIgCdAC0SGy4SGigSGf2gCBXgClUA/8DoFeALBQDoFgAqYASAAFmGSy4S +Gy7gFiIK/3LhCioSG4sdWCgsZKKMLxITJhIYJxIS9eAFwhIAnQAmYp4pEhj2wBNT4gCdACmSnekW +FySHeYAAKhIaLxIZiVCKpy4SF/gghhXgBCUA++EAD7eZQQDvFhkkkRmAACoSHhPo1CsSHIqjo5Mj +MAAX6NGrqwUzC+00AAXZAQAA+mAQUuDJAQD6ACId4AoFAAy6OA2rC+2qCgXoIQAAjBXYoOeTCAuQ +BIAA/4AARjAOBQDsFh0mWGEAAP2CgBWv9u4AjRz6IWgVr/YOAAAA+48ADr/1ggAf6KyP+PfgDpiS +AJ0AJhIYJxISJmKeKRIY9sAOy+IAnQApkp0b6KPkkc1n0/0AAJq46RYXLPmGAABgABMrEhoqEhsr +sQ1YJ9Jj/rTAINEPAIsaLBIb67wYLlAEgABYa9bAINEPLGEAscz8wAQdr/liACUSGiYSGSVRDAZV +DGVSACYSGyZgBPTAENkSAJ0AIhIa4xIXKbcCgACIIaYzIiIC5oI2adgEgADzABKgUAcFACkSG4oW +KJAUhB6qiPaAAEJ3iAEA6JQUIiAFAAD1ABIeUgCdABzoly4SGi8SGC0SGy7hDST2nf2gCBXgClUA +9c8AD3ALBQBZhdYvEhsv8BYmCv928Q4rEhorsQ0qEhsFuwxYJ58qEhuNFoqnwMDqrCAu2ASAAFhl +/NKg0Q8nEh2LGPaAAgPwDwUA6wAVA7hBAACx/+eDHg+P6AAA9IAgFa/ylgAAAC0SFdMP7foMCUAE +gAD4IsgV5OodAPHBIA3gDwUADQCG6AwAB/gFAAB++fEoEheNGQ6eDPlAAEQwDwUA5O0mZEBBAAAN +IIboLAAH+AUAAH758WP9EBfoTY0c+iFoFa/4WgAAAPpvAA6/99oA//ZkDaAJBQCLGiwSG+u8Ei5Q +BIAAWGt4wCDRD8CgWYX7H+gzj/j5//EYkgCdAP/4/A2gCQUAwJAY6C7Aagb2NPcBBhWv+LYAAAAA +2+DtjA8qYASAAPojyBWk3R0AWQWy+iNGFaAOFQD+IaYVr+feAMCgWYXmH+gej/j5/8/okA6lAP/o +IA2gCQUALBIb+4BoHaAbxQBYa1jAINEPAADAkBjoFA72NPcBBhWv55IAAAD7LwAKv+g6APrPAAq/ +6NIAACwSGi7AFS3AFCvAEezBCSlQBIAA7t0IC3AEgABZBYdj/dwAACoSG4sWWF/PLxIaj/Dx//Dy +kgCdACsSF+oSGynvAoAA/WAARfAMBQBYY6L0YGAVr/gCAAAAKhIb6zQACWAEgABb9pgoEhqIgQyr +Ees7CA04BIAA8R/toFIAnQDqEhspYASAAFv2Z/dAAEP/9oYAjBf2I2gV7/8FAA+PAQ+GDCZ0FC1x +Cf7isBWgCwUAK8QAL8QD5O4QDu4CgAD/pgAOsAkVAAndAp3BGufY+VWmFe/2BgAAbBAIiCIvIAeV +FPQgZhWg+/UA8RgsDeH/AQAoIBZ7gSwrEgTTD9MP/iDGFee7AQD7f8AV4AkVAOubOQlQBIAAWCcU +LxIG808QDeD79QAsMA8V57od58EW57/lUIAuC4YAAIcTsHclXDf+IKYV5FUdAOV1CA/PAoAA5pkI +AqgNAAD14AbiEAylACiSnvUAFQviAJ0AJZKd5FQAAooBgACK2PdACjiSAJ0ALmKuZOEBKWKt5JD9 +ZXv9AADv1ggkiAGAACggFtMPe4EOmRDrMQYpUASAAFgm2YkQKiAEixP1QAk5EgCdACogFKuqCgpH +KiQU9UAM5lIAnQAsMA+JFPGRnA3nmQEA+SAOKVIAnQDpVAABwEEAAG15BQgAhgkCYcCgmhIMdBGk +VCggBPUACjkSAJ0AiTHkFgEqWASAAOUyAiyNYgAA8yAOQFAEBQCkeYoV4hICLVcCgACmqimmndEP +AIrY90APUJIAnQCJFQyZEaaZLpKe9cAQA+IAnQAukp2eEIgQ5YQABA/ZgACwqfmhBhXv/BYAAAAA +7BIDKVAEgADtEgQp2ASAAFhqV9Kg0Q8AwJAMrjTu1ggs+EYAANog/EBoHaAbxQBYaqZj/8onMA72 +4ACD//pGAAAAK/wY6iQACWAEgABYap5j/6zAoFmFIR3nWorYKwr/+V/1YJAMpQBj/7kAAAAAAOsS +AylQBIAAWF8fY/7hAAAAACwhBx3nZvvO0gXqzAEA7jAOLmcCgAANzAIstiiKIBjnaf1AABUwDDUA +DKoCKrYp6AQFAfhBAAD5IAnBUgCdAG3pDgQCYw9AhgQCZQ8AhgQCYcDQ/CBGFe/62gCOMPPACuqS +AJ0AjxXiEgIv/wKAAKb/J/ad0Q8rIQn8QrAVr/0FAA2tAQ2vDP5Chh3gDgUA7ZQDLmECgADulAAt +3gKAAP1mAA2wCBUACLsCm5H41aYVr/i6AIon/KBoHaALFQDtEgMlUIEAAFhkt/ogRhWv+O4AANog +60QACuAEgABb9b6LEYkxDKwR7LsIDSAEgADxP/IAUgCdAOokAArgBIAAW/WNpKSkeYoV4hICLVcC +gACmqimmndEP//WIDaAFBQAAACv8EuokAAlgBIAAWGpGY/5MAAAAAAD+IMYV4AoFAFmExh3m/4rY +/iDIFeD79QD5X+/wkAylAP/0iA2gBQUAwOD+IAYVr/gOAAyoNPmhBhWv9DYAiieFq/tEABWvyQUA +CakBqVkpnEBt6RMEAmMPgIYEAmkPYIYEAmd5+xnTD40TDwIA+6BoHeAMBQBYZH76IEYVr/VuAPXv +AA///4oA2iD6gGgd4AwFAFhih7N7jBXiEgIuZwKAAKbMK8ad0Q9sEAQjIAAkCu10MQYiIQO8ItEP +hiCFI4Qh9nAABDs2IQD4YABBs2YBAKYzDjMR8q8ACX1EAQDjPBohE8kAAAQkLAQzKKMi0Q9sEAiK +IicgB4kwlRT4QtAVoXcBAPFbDA3omQEA+CAmFeD79QB7gSArEgQLC0f7f8AV4AkVAOubOQlQBIAA +WCYE80/gDeD79QAa5rSIqBbmsfcADGCSAJ0ALWKuZNGsJWKtZFGosIiYqOlUAAKMeYAAFeaiJVCA +JVw3+CAGFeRVHQDlRQgLzwKAAOaZCAKoDQAA9OAIWhIAnQAokp71ABMD4gCdACWSnWRRbyogFvtD +Jg3g7NUAKzAQ/WASZCIAnQArMQu8u9ogWCXMLCAE9YAK+RIAnQAoIBSkiAgIRygkFPUADIZSAJ0A +ihQe5qKNESghBxzmghnmoP+h4BXqiAEA/wAAFDT/HQDpiAIH+AUAAA9PDJhQiyAP7Dn8oGYV56oB +AOxWAi3eAoAA60sCAshBAADrVgEhwEEAAPlACAFSAJ0A6EENYlP9AABtqQUIAIYJAmHAgJgT6SAE +Ilv9AAAMuxGrW/UgB5kSAJ0AiDHlMgIl2EEAAOsWAiwJ8gAA8wAK8FADBQCjTIgTDH0Rpt3s1p0s +EASAANEPAAAAAAAAAPcADXiSAJ0ADHkRppkukp71wA3T4gCdACWSnWRRsbCMnKhlXuRgAFHqJAAJ +2ASAAO0SBCpgBIAAWGk70qDRDwDAoFmEFBrmTIio+R/zUJD79QD/+cgNoAUFAADaIPxAaB2gG8UA +WGmGY/+8wFDA2g2INPlBBhWv+UoAK3wY6iQACWAEgABYaX5j/5wAAAAAAOokAApYBIAAWF4FY/6p +iif9IGgdoAsVAOqsICpoBIAAWGPL+iBmFa/8AgCLMPNgCOKSAJ0A4hIDK+cCgACmzCTGndEPjxAu +IQn4QrAV7/oFAAqKAQqMDCwkFOSZEA92AoAACe4C++BmHaALBQD74AYd4A0VAA3uAp7x/NWmFe/4 +6gAAAAAAAADqJAAK4ASAAFv0u4sSKDIB6hYFLWcCgADsuwgNGASAAPEf9VBSAJ0A6iQACuAEgABb +9ImIE6Ojo0wMfRGm3ezWnSwQBIAA0Q//9owNoAUFAI40izeNNf5wAAe7ziEA/4AARnPuAQCuzA7M +Ef1vAA293QEA7MwaJdvJAAANvSwNzCj9YABFv/YiAAArfBLqJAAJYASAAFhpNGP+dMCgWYO3GuXw +iKj5H/I4kPv1AP/5ZA2gBQUAAMBQwPoPjzT/QQYV7/kmALBLDLsR61sICVAEgAD7YgAV4AwFAFhh +i7NM4hIDK+8CgACm3SzWndEPAABsEATaIFgluIQ3JTAW+cvmBaKmBQAGpigX5fioaAVVCghVC6dV +iFC4RPUEBg3gBxUAiDLqUgEpAQqAAAB5GgmIApSgmkGVQJRRmDLRD9ogWCWmG+XqHeXqK7Iy6tKB +LWAEgACsu+8wFi3eQoAAq6oe5eYZ5eTo5doeZwKAAK7MqWkrkn3u5cUfgQqAAO/CASvoCoAADbsC +LZJ/CP8BK5Z9D90CDe04DbsCm8Ipkn9kn39YAraIMupSASkBCoAAAHkaCYgClKCaQZVAlFGYMtEP +bBAI2iBYJYTUoBvlzvnLmAXipgUABkQoFeW96UkICVcCgACrqoqgKZJ/GOXEpUX7IAQEsGMFAPgg +BhXgBxUA4QAFATO5AAD4gABCMADiAAAAAAM8CvWAAgZ8OEUA6MgICVAEgADogn8qWASAAP50ABWu +LQUA7cwIC2gEgAALgAABAYcDN2DhAQcJ9yAAANEPbBAEKCAFJSAH+mCoFa/01QD6QEgV4AMlAP0B +IBHRVQEAwCDRDwCIKRnlpJor+wAHfCIAnQAJWQkpnQIqkQgpkQT7IARbogCdAMGv+0AECOIAnQDa +IFhhN4siA7oBZK/AiicEuwHrJgIlUMEAAFhbGuPldBUBEYAAKKAAA4gKiIzsoActWASAAPpAaB2g +DUUAC4AAZa/hiSdkn4WKmsqnKpIJZK97KKAAA4gKiIzsoActWASAAPpAaB2gDTUAC4AAZa/hY/9a +AAD//1gNoAoFANogWGEnKyAi6rsMCVAEgABYYnfaUPoAIh3gDAUAWGMmiyIDugHzf/smYgCdACwg +B+S9AQlQBIAA/EBGFeG8AQDrvB8pYASAAFhof8Ag0Q8A6yAiKVAEgABYYmUqIAXB436hDGioKYsi +82AEBX/8hgAvIDrAj3j56vpAaB2gCwUA/AACHaANJQBYYZFj/9cAAPpAaB2gCwUA/AACHaANJQBY +YQ9j/78AAGwQCogrHeVPLiAhizf8YMgVoP/lAA/uAS4kIQ3MAQy7DOuJCHjIBIAAwCDRDwMAhgkC +YZsVKCAFJSAH+CEGFe/01QD8QEgV4AMlAP0bQEHRVQEAiimbK/tAB+xiAJ0AG+U4C1sJK70CLLEI +K7EE/WAEs6IAnQDBz/2ABGDiAJ0AAioCWGDOiyIDugFkr5qKJwS7AesmAiVQwQAAWFqx26Dj5QoV +ASGAACiwANMPA4gKiIwssAf6QGgdoA1FAAuAAOukAA1/JgAAiScPAgBkn1iKmiuSCcqnZL9OKLAA +A4gKiIwssAf6QGgdoA01AAuAAOukAA1/NgAAY/8tAAAAAAD//0wNoAsFANogWGC7KyAi6rsMCVAE +gABYYgvaUPoAIh3gDAUAWGK6iyIDugHzf/rWYgCdACwgB+S9AQlQBIAA/EBGFeG8AQDrvB8pYASA +AFhoE8Ag0Q8A6yAiKVAEgABYYfkqIAXB436hDGioKYsi82AEBX/8XgAvIDrAj3j56vpAaB2gCwUA +/AACHaANJQBYYSVj/9cAAPpAaB2gCwUA/AACHaANJQBYYKNj/78AAGwQBCkwFglZFPUgBliSAJ0A +8S2wDe/65QDj5L8UpfkAAGiVBMAg0Q8AKyAGsLsLC0frJAYt/34AAI0ijCcK3QHtJgImUMEAAFha +WcmsKKAAA4gKiIzsoActWASAAPpAaB2gDUUAC4AAZa/hiSdkn7OKmmSgmoqZZK+pKKAAA4gKiIzs +oActWASAAPpAaB2gDTUAC4AAZa/hY/+IKSAGsJkJCUfpJAYs++4AAIwiiScKzAGcIouaZLBOi5ko +sAADiAqIjNog/WDwFaANNQALgADAINEPAAAAAOokAAnYBIAA7EQACugEgABYaX3AINEPAOokAAnY +BIAA7EQACugEgABb/1PAINEPAP/+vA2gCwUA//2MDaAKBQBsEATRDwAAAGwQCBXknRTkfBfknZIS ++CBIFaAKBQD6IGYVoAlFAJkUGuSXCIIJ4IEECReCgAD2QABD8AgVAOoiCAxACoAA+CAmFa/59QD5 +FwAMcAYFAPggBhWgAIoAmxOMFLFm4iwMI7gxAADlXAImY/0AAOwWBCYE8YAALVHC+sAEANALFQDg +uxoOo0wAAC5xfmTvygIqAlhiyY8R+sAEANAIFQDgiBoNGASAAOgWAyeAaYAAiaKKEAqZAZkyijcq +rDBYWfXJrCigAASICoiM7KAHLVgEgAD6YGgdoA1FAAuAAGWv4Yk3ZJ90iprLpyqSCWSvaiigAASI +CoiM7KAHLVgEgAD6YGgdoA01AAuAAGWv4WP/SYsT+iBIFaAJFQALmzlYY5vRD///GA2gCgUAbBAG +HeRWCysRrbMqMn8Z5FQV5D6IoPigAETwBAUA6bkIBAGRgAAsMngvMnv5gAWEYgCdAGXw7Cw2fCsy +eSs2e91ADeQWlKAN5BbAyfxABhQiAJ0ALzJ7wcDt5EIXg5mAACIyfCohBI4g8+H+Daa6AQAkNnz0 +b2YVoAAeAC42fO2vAQXD/QAACP8C7yUEJYxZAAAiMnywzO8yeyEA8YAAycZj/7/aIFhiNmWgnSoh +BP9BAAwWmgEAyJjRD9ogWGNh0Q8A2iBYY5TRDwAAAAAAAPpAaB2gCwUAWGNh0Q8AAADq0mAhY+EA +APuABADQCxUA/WABBd/89QAMuwMLqgEq1mBZhiEkNnwkNnv6b+gVr/zKAFl781hh6C1So2TfNVl7 +xGP/LxzkEf5viBWgClUA+G9IFaALRQDoFgAha+UAAFmBQPpv6BWv+9IAKTJ74jZ8LPtGAAAiNnvR +DwAAbBAEFOQDGeP/6OPpGV7CgACktCNCf6mI6LgIAYJBgACKMHipAipCexzj+CsxBCpGfwy6Aeo1 +BCnQBIAAWGH5zq4pMQT/IQAMFtkBAMjX0Q/aMFhjJdEP2jBYY1jRDwAAAAAAAPpAaB2gCwUAWGMl +0Q8jRn/RDwAAbBAE8GDwDe/59QCIIgk5AwmIASgmAoonDwIADwIAKqwwWFlc4+O2FQERgAAooAAD +iAqIjOygBy1YBIAA+kBoHaANRQALgABlr+GJJ8uUiprKqIqZyawooAADiAqIjOygBy1YBIAA+kBo +HaANNQALgABlr+HRDwAAAAAAAP//UA2gCgUA0Q8AAGwQBPJdABXgGMUA+EAHXCczAQAU44v0YAXS +EgCdAAw5EaSZKJKe0w/3AAcG0gCdACmSnWSQzxzjnhvjtgIqCQyqCquqWGH7+kAEANAJFQD9IAEE +3/v1AOKkAASAcYAAiqILmwMLqgGaIoonDwIAKqwwWFkm4+OAFQERgAAooAADiAqIjOygBy1YBIAA ++kBoHaANRQALgABlr+GJJ2SQZCqSCsqmKpIJyawooAADiAqIjOygBy1YBIAA+kBoHaANNQALgABl +r+HRDwAAAP//XA2gCgUAFeNcilhqoTcMORGkmSuSnm69PimSneSQOmVb/QAAm1hlnz5gAAvaMFl7 +amWvM9EP0Q/RDwAAAAD//IwNoAkFAMCgWYESilhrob3//0gNoAkFAMCQwMoMrDT8oQYVr/8OAAAA +AGwQBBjjQQIDRwwzEagzKzKEGeNKKLAAKrIBCYgKCiGMAgo+KIIMAwI+/EBoHaANJQALgAAiNoQM +AgDRD2wQBBTjMgIDRwwzEaQzJDKEikEmQAAoQAj6mGgdoKklAAIFPgMCPnmBJRjjNQhoCoiM6lQA +ClgEgAD8QGgdoA0lAAuAACI2hAwCANEPAAAA6yQAClAEgABYYbvzQGgdr/8uAAAAAAAAbBAEGuM0 +KqJGK3rQC6ooFONL/0AAFTALFQALqgL6luYVoAkFAAnkMRXjRhjjKyhWhCVShCNCt2YwDW0IBStC +t2awBGP/8wAAHOM/IsaKY//8AAAAbBAEWX/sEuMCE+MdKSKC0w8JGo4DqAqIgAuAAGP/7ABsEAQq +IgcqrBBYYpjRDwAAbBAEiCcijBDaIFhid2ihAdEP2iBYYnES4ysLqBHoIggFAdmAAAzqMCsihSuy +ACKs/+y7CAlQBIAAWYTvHOMjKsJ/+kAEANALFQAAuxoLqgIqxn9ZhR7RDwAAAAD6AOIdoAsVAFhi +Tywifywmg9EPAGwQBCYiBw8CAOZsECnQBIAAWGKy7DQACmgEgADuVAANWASAAO8iACtQBIAAWGH1 +0Q8AAAAS4woD6DAE7jAFsTCTIJQhlSIS4wYT4tSEIAQzApMgEuMEwDAoN0AoN0QoN0goN0wjPQFy +M+0DAgAS4v4T4t2TIMcvE+L9AyMDEuL8hCAENAGUIBLi+4QgBDQBlCAS4vmEIAQ0AZQgEuL4hCAE +NAGUIMcvwDEDIwMS4vWEIAQ0AZQgY//8AAAAEuLygyADExQPMxGTIFf/2hDi75EAkgGTApQDEeLt +ghAB6jCiEQHwMcBABOQWAAIAEeLpghAjGgADIgKSEBHi5sAhkhAE5DGEA4MCggGBAADSMAEjAAAA +ABDi4ZEAkgGTApQDEeLfghAB6jCiEQHxMcBABOQWAAIAEeLXghAjKgADIgKSEBHi18AhkhAE5DGE +A4MCggGBAADTMAEzAAAAABDi0pEAkgGTApQDEeLQghAB6jCiEQHyMcBABOQWAAIAEeLFghAjSgAD +IgKSEBHiyMAhkhAE5DGEA4MCggGBAADUMAFDAAAAAABclAFdlAJelANflABDAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXJABXZACXpADX5AAUwAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyUAB2QAZ2UAp6U +A5+UBAiUBQmUBgqUBwuUAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACckAGd +kAKekAcdkAOfkAR4kAV5kAZ6kAd7kABTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAA3JQAHZAB3ZQC3pQD35QEBJQFBZQGBpQHB5QICJQJCZQKCpQLC5QAQwAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAANyQAd2QAt6QCx2QA9+QBLSQBbWQBraQB7eQCLiQCbmQCrqQC7uQAFMAAAAf//uQ +ANIxEP/+CgAAAAAAH//72ADTMRD//goAAAAAAB///CAA1DEQ//4KAAAAAAAA9DAKAAAAAAD0MAoA +AAAAAPQwCgAAAABsEAQqIhAooAUpCpL5AATlYgCdACsiGPrgAAZwjbUA/YAETWIAnQDzYAQr0gCd +AP9uwAwfyQUAi62Ot4jqjOiN6y/sIOn/AQZQwQAA790IBEDBAADo5gom6QEAAOrTYH5IBIAAfaFp +muga4RwKAIcJAmEJAmEJAmHAgejGBSlQBIAA+YDmFaAOBQD/gIYVoA0lAP+AxhWv//UA78YDL2AE +gABYA3vAINEPWMcSwCDRDxnhDAm5AfhDBhXgAgUA0Q8M2gwK+gwqrHD7wQYVr/5yAC38QP3BBhXv +/kYAbBAEE+EBAyIC0Q8AbBAEFuD/JCAHiWDAc/EyQA3hRAEAKSIYCehR9QAJiJIAnQDzwfAF4anh +APVACYiSAJ0A9IAGchIAnQAMSRGjmSuSnvdgCsnSAJ0AKpKdZKEzG+Do6wAFDUgEgAAJAmEJAmEJ +AmEpIQcb4Oj/wdAF6pkBAOzg5xzPAoAAC5kCmaAZ4OX+QAgVoD0FAJ2n/UCmFaAbhQCbo5mi7+4C +D0YCgACepPcGAAxwDgUAnqaYoSgiGAiIQe6mCCxHAoAAmKnt4NYafwKAAKP/J/adLCIYnmAqIhAN +zALsJhgpWASAAFi35QUKR2iiGIon+gAiHeAMBQD7RAAVoA0VAFheCdKg0Q/AINEPHODFi8j3YATQ +kgCdAAxJEaOZLZKe96AFIdIAnQAqkp3koJtl6/0AAJ3IZa8eYABPjiKxn+9mACcBqYAABQhH9QAE +SRIAnQDAINEPKhoACpkC+EMGFe/7JgAAACsqAAubAvpDBhXv+yYAAAAAACtMGOokAAlgBIAAWGOQ +Y/+9AACMImXPtitMGOokAAlgBIAAWGOKY/+lAAAAAAD/+qgNoAoFAMCgWX4KHOCbi8j5f/rgkgCd +AP/9xA2gCgUAwKDA2g29NP2BBhXv/YoAjCePyorJ/4QAFa/IBQDo7gEH+EEAAO/GCiVTwQAA6sYJ +J3EBAAB+qymJyx3giaqamsmdoIwg+8EOBeANFQDrpgIuZgKAAA3MAv1AJhWgAgUA0Q8d4H+doIwg ++8D8BeANFQDrpgIuZgKAAA3MAv1AJhWgAgUA0Q9sEAjkIhAqYASAAOdCByvQBIAA6+BzGXAEgADy +gsgVoBg1AOdyDiL76QAAePspGOBtCPgKiICaFJwS7hYBLAAigAAAAACSECqykexUAAnYBIAAWXzN +ZKYv8oLGFaACBQDRDwAAAAAAK+IYC5tS7hYBJf85gAAa4FriFgAp2ASAAOqisyrgBIAAWXy/ZKRZ +IiqAonKSFSIg3hrgUtsw6qK1KuAEgABZfLj7QEEAEgCdABrgTNsw6qK3KuAEgABZfLL7QEFoEgCd +ABrgRtsw6qK5KuAEgABZfKxkppQa4EHbMOqiuyrgBIAAWXyn+0BC4BIAnQDBOPJAHrhiAJ0AaScj +ixUjtN2LEPqCxhXgAgUA0Q+SECqyiexUAAnYBIAAWXyaZKbbixD6gsYV4AIFANEPAACSECqyl+xU +AAnYBIAAWXySZa8S+iBoHaALtQBYtNT6ACId4AMFAOqzOAUBiYAA6hICK1gEgABZedLDsOzgHh0o +BIAA/KBoHeAKVQBZfSTIWRzgGo0RDFw2LNYXZTTgjRD8gsYV4AIFANEPLkByZO61khAqsq3sVAAJ +2ASAAFl8dmWuovogaB2gG2UAWLS4+gAiHeACBQDqsjgFAKmAAOoSAitYBIAAWXm2LH0DKsUoZSSM +jRD8gsYV4AIFANEPAJIQKrKf7FQACdgEgABZfGJkovsa3/fbMOqiiyrgBIAAWXxdZa5A+iBoHaAL +VQBYtKD6ACId4AIFAOqyOAUpmYAA6hICK1gEgABZeZ4sQHPxgCju0gCdAGSlFYoU+gCiHeAM1QBY +tHzSoNEPkhAqsqXsVAAJ2ASAAFl8R2WutPogaB2gGyUAWLSKZKPzK0By+2BEIBIAnQDqEgIrWASA +AFl5iCxCF4sQK0YWCsw2/ILmFaACBQDRDwCSECqyo+xUAAnYBIAAWXw0ZKJzGt/J2zDqop0q4ASA +AFl8L2WuVPogaB2gC+UAWLRyZKOT6hICK1gEgABZeXMrfQIqtRSLEPqCxhXgAgUA0Q+SECqylexU +AAnYBIAAWXwgZKJ6Gt+02zDqoqEq4ASAAFl8G2SjtxrfsNsw0w/qoo8q4ASAAFl8FmWt7vogaB2g +C3UAWLRYZKMtK0ByZLfyGt+lixLqotsrYASAAFl8DGWm5ytAc8DIDLsCK0RzixD6gsYV4AIFANEP +AACSECqyq+xUAAnYBIAAWXwBZKI/Gt+W2zDTD+qijSrgBIAAWXv8Za2G+iBoHaALZQBYtD5kosUr +QHJkt3ka34uLEuqi2ytgBIAAWXvyZKeIK0BzLAr9DLsBK0RzixD6gsYV4AIFANEPAJIQKrKT7FQA +CdgEgABZe+dkogca33zbMNMP6qKHKuAEgABZe+Jkowoa33bbMOqipyrgBIAAWXvdZKw/Gt9y2zDq +oq8q4ASAAFl72GWsLMCl/b7gBaA7BQBZfHYa32qLEuqiyStgBIAAWXvQZaQYixErshgLmVLImWiS +B/kgBPnSAJ0AjRGMECvWGPyCxhWgAgUA0Q+SECqyg+xUAAnYBIAAWXvCZKG7Gt9X2zDqooUq4ASA +AFl7vWWsjPogaB2gCyUAWLQAZKHLGt9OixLqotsrYASAAFl7tWWsa4oU+gBCHeAM1QBYs+HSoNEP +AAAAAAAAAOoSASpYBIAAWLP7zayCFSIg3mP8FwAAAOoSAitYBIAAWXjw9UAq8pIAnQDHL9EPAPog +aB2gC/UAWLPlZKFi6hICK1gEgABZeOfoEgAjyAsAACqVFfiCxhWgAgUA0Q8AAPogaB2gGxUAWLPZ +ZKEyKkByZKXUKUBz8T/ez5IAnQDxP96P0gCdAOoSAitYBIAAWXjVLUIYHN8j+6EADrA7BQD8gwYV +4ApVAFl8JYsQ+oLGFeACBQDRDwD6IGgdoAulAFizw2Sg2i5ActMPZOTl6hICK1gEgABZeMMvQTb7 +4A8CogCdAIoU+gFCHeAM1QBYs6LSoNEPAAAA+iBoHaAbVQBYs7NkoJrqEgEqWASAAOwSAitoBIAA +WLM6ixD6gsYV4AIFANEPAAAA+iBoHaALlQBYs6dkoGooQHJkhIga3vWLEuqi2ytgBIAAWXtbZaHN +K0BzjRD8gsYV4AwVAAy7AvqOZh3gAgUA0Q8AAAAAAAAA+iBoHaALFQBYs5XKohre5IsS6qLbK2AE +gABZe0tlqsOKFPoAIh3gDNUAWLN30qDRD8Cl/b3CBaA7BQBZe+XAINEPAAAAAAAA+iBoHaALhQBY +s4P6ACId4AIFAOqyOAUBSYAALEByDwIAZMP5Gt7U6xICK2AEgABZezRlof0tQHPA6A7dAi1Ec2Uv +pY8Q/oLGFeACBQDRDwD6IGgdoBsFAFizb2SviihActMPZIOE6hICK1gEgABZeG8pQhmLECtGFgqZ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 02:23:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EBD267EB; Thu, 28 Feb 2013 02:23:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 7F81D245; Thu, 28 Feb 2013 02:23:44 +0000 (UTC) Received: from glenbarber.us (kaos.glenbarber.us [71.224.221.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 1117B23F645; Wed, 27 Feb 2013 21:23:35 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.8.0 onyx.glenbarber.us 1117B23F645 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Wed, 27 Feb 2013 21:23:33 -0500 From: Glen Barber To: Jack F Vogel Subject: Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb Message-ID: <20130228022333.GC70215@glenbarber.us> References: <201302280022.r1S0M4vm064514@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <201302280022.r1S0M4vm064514@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 02:23:45 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jack, This commit seems to break the build for at least powerpc and sparc64. Glen On Thu, Feb 28, 2013 at 12:22:04AM +0000, Jack F Vogel wrote: > Author: jfv > Date: Thu Feb 28 00:22:04 2013 > New Revision: 247430 > URL: http://svnweb.freebsd.org/changeset/base/247430 >=20 > Log: > MFC of the E1000 drivers to STABLE/8, this includes the follow revisions > plus a few tweaks: > 196969,196970,211516,214646,215781,215789,215808,215910,223350, > 223482,223831,228281,228393,229939,231796,232238,234665,235256, > 236406,238148,238151,238214,238765,238770,238953,238981,239105, > 239109,239304,240518,240693,240968,241037,241856,241885,243570, > 243857,245334,246128,246482,247064 >=20 > Added: > stable/8/sys/dev/e1000/e1000_i210.c > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c > stable/8/sys/dev/e1000/e1000_i210.h > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h > Modified: > stable/8/sys/conf/files > stable/8/sys/dev/e1000/e1000_82541.c > stable/8/sys/dev/e1000/e1000_82543.c > stable/8/sys/dev/e1000/e1000_82571.c > stable/8/sys/dev/e1000/e1000_82575.c > stable/8/sys/dev/e1000/e1000_82575.h > stable/8/sys/dev/e1000/e1000_api.c > stable/8/sys/dev/e1000/e1000_api.h > stable/8/sys/dev/e1000/e1000_defines.h > stable/8/sys/dev/e1000/e1000_hw.h > stable/8/sys/dev/e1000/e1000_ich8lan.c > stable/8/sys/dev/e1000/e1000_ich8lan.h > stable/8/sys/dev/e1000/e1000_mac.c > stable/8/sys/dev/e1000/e1000_mac.h > stable/8/sys/dev/e1000/e1000_manage.c > stable/8/sys/dev/e1000/e1000_manage.h > stable/8/sys/dev/e1000/e1000_nvm.c > stable/8/sys/dev/e1000/e1000_nvm.h > stable/8/sys/dev/e1000/e1000_osdep.h > stable/8/sys/dev/e1000/e1000_phy.c > stable/8/sys/dev/e1000/e1000_phy.h > stable/8/sys/dev/e1000/e1000_regs.h > stable/8/sys/dev/e1000/if_em.c (contents, props changed) > stable/8/sys/dev/e1000/if_igb.c (contents, props changed) > stable/8/sys/dev/e1000/if_igb.h > stable/8/sys/dev/e1000/if_lem.c > stable/8/sys/modules/em/Makefile > stable/8/sys/modules/igb/Makefile > Directory Properties: > stable/8/sys/dev/e1000/ (props changed) >=20 > Modified: stable/8/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013 (r247429) > +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013 (r247430) > @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i > compile-with "${NORMAL_C} -I$S/dev/e1000" > dev/e1000/e1000_ich8lan.c optional em | igb \ > compile-with "${NORMAL_C} -I$S/dev/e1000" > +dev/e1000/e1000_i210.c optional em | igb \ > + compile-with "${NORMAL_C} -I$S/dev/e1000" > dev/e1000/e1000_api.c optional em | igb \ > compile-with "${NORMAL_C} -I$S/dev/e1000" > dev/e1000/e1000_mac.c optional em | igb \ >=20 > Modified: stable/8/sys/dev/e1000/e1000_82541.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:18:56 2013 (r24742= 9) > +++ stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:22:04 2013 (r24743= 0) > @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st > * of MAC speed/duplex configuration. So we only need to > * configure Collision Distance in the MAC. > */ > - e1000_config_collision_dist_generic(hw); > + mac->ops.config_collision_dist(hw); > =20 > /* > * Configure Flow Control now that Auto-Neg has completed. >=20 > Modified: stable/8/sys/dev/e1000/e1000_82543.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:18:56 2013 (r24742= 9) > +++ stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:22:04 2013 (r24743= 0) > @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 > DEBUGOUT("Valid link established!!!\n"); > /* Config the MAC and PHY after link is up */ > if (hw->mac.type =3D=3D e1000_82544) { > - e1000_config_collision_dist_generic(hw); > + hw->mac.ops.config_collision_dist(hw); > } else { > ret_val =3D e1000_config_mac_to_phy_82543(hw); > if (ret_val) > @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( > /* Take the link out of reset */ > ctrl &=3D ~E1000_CTRL_LRST; > =20 > - e1000_config_collision_dist_generic(hw); > + hw->mac.ops.config_collision_dist(hw); > =20 > ret_val =3D e1000_commit_fc_settings_generic(hw); > if (ret_val) > @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 > * settings. > */ > if (mac->type =3D=3D e1000_82544) > - e1000_config_collision_dist_generic(hw); > + hw->mac.ops.config_collision_dist(hw); > else { > ret_val =3D e1000_config_mac_to_phy_82543(hw); > if (ret_val) { > @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 > if (phy_data & M88E1000_PSSR_DPLX) > ctrl |=3D E1000_CTRL_FD; > =20 > - e1000_config_collision_dist_generic(hw); > + hw->mac.ops.config_collision_dist(hw); > =20 > /* > * Set up speed in the Device Control register depending on >=20 > Modified: stable/8/sys/dev/e1000/e1000_82571.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:18:56 2013 (r24742= 9) > +++ stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:22:04 2013 (r24743= 0) > @@ -1,6 +1,6 @@ > /***********************************************************************= ******* > =20 > - Copyright (c) 2001-2011, Intel Corporation=20 > + Copyright (c) 2001-2013, Intel Corporation=20 > All rights reserved. > =20 > Redistribution and use in source and binary forms, with or without=20 > @@ -32,8 +32,7 @@ > ************************************************************************= ******/ > /*$FreeBSD$*/ > =20 > -/* > - * 82571EB Gigabit Ethernet Controller > +/* 82571EB Gigabit Ethernet Controller > * 82571EB Gigabit Ethernet Controller (Copper) > * 82571EB Gigabit Ethernet Controller (Fiber) > * 82571EB Dual Port Gigabit Mezzanine Adapter > @@ -51,9 +50,6 @@ > =20 > #include "e1000_api.h" > =20 > -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); > -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); > -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); > static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); > static void e1000_release_nvm_82571(struct e1000_hw *hw); > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, > @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); > static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); > -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); > static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); > static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); > static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); > @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ > static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) > { > struct e1000_phy_info *phy =3D &hw->phy; > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > =20 > DEBUGFUNC("e1000_init_phy_params_82571"); > =20 > if (hw->phy.media_type !=3D e1000_media_type_copper) { > phy->type =3D e1000_phy_none; > - goto out; > + return E1000_SUCCESS; > } > =20 > phy->addr =3D 1; > @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s > phy->ops.set_d3_lplu_state =3D e1000_set_d3_lplu_state_82574; > break; > default: > - ret_val =3D -E1000_ERR_PHY; > - goto out; > + return -E1000_ERR_PHY; > break; > } > =20 > @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s > ret_val =3D e1000_get_phy_id_82571(hw); > if (ret_val) { > DEBUGOUT("Error getting PHY ID\n"); > - goto out; > + return ret_val; > } > =20 > /* Verify phy id */ > @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s > if (ret_val) > DEBUGOUT1("PHY ID unknown: type =3D 0x%08x\n", phy->id); > =20 > -out: > return ret_val; > } > =20 > @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s > if (((eecd >> 15) & 0x3) =3D=3D 0x3) { > nvm->type =3D e1000_nvm_flash_hw; > nvm->word_size =3D 2048; > - /* > - * Autonomous Flash update bit must be cleared due > + /* Autonomous Flash update bit must be cleared due > * to Flash update issue. > */ > eecd &=3D ~E1000_EECD_AUPDEN; > @@ -254,8 +246,7 @@ static s32 e1000_init_nvm_params_82571(s > nvm->type =3D e1000_nvm_eeprom_spi; > size =3D (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> > E1000_EECD_SIZE_EX_SHIFT); > - /* > - * Added to a constant, "size" becomes the left-shift value > + /* Added to a constant, "size" becomes the left-shift value > * for setting word_size. > */ > size +=3D NVM_WORD_SIZE_BASE_SHIFT; > @@ -382,12 +373,11 @@ static s32 e1000_init_mac_params_82571(s > =20 > /* FWSM register */ > mac->has_fwsm =3D TRUE; > - /* > - * ARC supported; valid only if manageability features are > + /* ARC supported; valid only if manageability features are > * enabled. > */ > - mac->arc_subsystem_valid =3D (E1000_READ_REG(hw, E1000_FWSM) & > - E1000_FWSM_MODE_MASK) ? TRUE : FALSE; > + mac->arc_subsystem_valid =3D !!(E1000_READ_REG(hw, E1000_FWSM) & > + E1000_FWSM_MODE_MASK); > break; > case e1000_82574: > case e1000_82583: > @@ -405,8 +395,7 @@ static s32 e1000_init_mac_params_82571(s > break; > } > =20 > - /* > - * Ensure that the inter-port SWSM.SMBI lock bit is clear before > + /* Ensure that the inter-port SWSM.SMBI lock bit is clear before > * first NVM or PHY acess. This should be done for single-port > * devices, and for one port only on dual-port devices so that > * for those devices we can still use the SMBI lock to synchronize > @@ -422,8 +411,9 @@ static s32 e1000_init_mac_params_82571(s > E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 | > E1000_SWSM2_LOCK); > force_clear_smbi =3D TRUE; > - } else > + } else { > force_clear_smbi =3D FALSE; > + } > break; > default: > force_clear_smbi =3D TRUE; > @@ -443,10 +433,7 @@ static s32 e1000_init_mac_params_82571(s > E1000_WRITE_REG(hw, E1000_SWSM, swsm & ~E1000_SWSM_SMBI); > } > =20 > - /* > - * Initialze device specific counter of SMBI acquisition > - * timeouts. > - */ > + /* Initialze device specific counter of SMBI acquisition timeouts. */ > hw->dev_spec._82571.smb_counter =3D 0; > =20 > return E1000_SUCCESS; > @@ -477,7 +464,7 @@ void e1000_init_function_pointers_82571( > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) > { > struct e1000_phy_info *phy =3D &hw->phy; > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > u16 phy_id =3D 0; > =20 > DEBUGFUNC("e1000_get_phy_id_82571"); > @@ -485,8 +472,7 @@ static s32 e1000_get_phy_id_82571(struct > switch (hw->mac.type) { > case e1000_82571: > case e1000_82572: > - /* > - * The 82571 firmware may still be configuring the PHY. > + /* The 82571 firmware may still be configuring the PHY. > * In this case, we cannot access the PHY until the > * configuration is done. So we explicitly set the > * PHY ID. > @@ -494,29 +480,29 @@ static s32 e1000_get_phy_id_82571(struct > phy->id =3D IGP01E1000_I_PHY_ID; > break; > case e1000_82573: > - ret_val =3D e1000_get_phy_id(hw); > + return e1000_get_phy_id(hw); > break; > case e1000_82574: > case e1000_82583: > ret_val =3D phy->ops.read_reg(hw, PHY_ID1, &phy_id); > if (ret_val) > - goto out; > + return ret_val; > =20 > phy->id =3D (u32)(phy_id << 16); > usec_delay(20); > ret_val =3D phy->ops.read_reg(hw, PHY_ID2, &phy_id); > if (ret_val) > - goto out; > + return ret_val; > =20 > phy->id |=3D (u32)(phy_id); > phy->revision =3D (u32)(phy_id & ~PHY_REVISION_MASK); > break; > default: > - ret_val =3D -E1000_ERR_PHY; > + return -E1000_ERR_PHY; > break; > } > -out: > - return ret_val; > + > + return E1000_SUCCESS; > } > =20 > /** > @@ -528,15 +514,13 @@ out: > static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) > { > u32 swsm; > - s32 ret_val =3D E1000_SUCCESS; > s32 sw_timeout =3D hw->nvm.word_size + 1; > s32 fw_timeout =3D hw->nvm.word_size + 1; > s32 i =3D 0; > =20 > DEBUGFUNC("e1000_get_hw_semaphore_82571"); > =20 > - /* > - * If we have timedout 3 times on trying to acquire > + /* If we have timedout 3 times on trying to acquire > * the inter-port SMBI semaphore, there is old code > * operating on the other port, and it is not > * releasing SMBI. Modify the number of times that > @@ -576,12 +560,10 @@ static s32 e1000_get_hw_semaphore_82571( > /* Release semaphores */ > e1000_put_hw_semaphore_82571(hw); > DEBUGOUT("Driver can't access the NVM\n"); > - ret_val =3D -E1000_ERR_NVM; > - goto out; > + return -E1000_ERR_NVM; > } > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -613,22 +595,19 @@ static void e1000_put_hw_semaphore_82571 > static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) > { > u32 extcnf_ctrl; > - s32 ret_val =3D E1000_SUCCESS; > s32 i =3D 0; > =20 > DEBUGFUNC("e1000_get_hw_semaphore_82573"); > =20 > extcnf_ctrl =3D E1000_READ_REG(hw, E1000_EXTCNF_CTRL); > - extcnf_ctrl |=3D E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > do { > + extcnf_ctrl |=3D E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl); > extcnf_ctrl =3D E1000_READ_REG(hw, E1000_EXTCNF_CTRL); > =20 > if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP) > break; > =20 > - extcnf_ctrl |=3D E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > - > msec_delay(2); > i++; > } while (i < MDIO_OWNERSHIP_TIMEOUT); > @@ -637,12 +616,10 @@ static s32 e1000_get_hw_semaphore_82573( > /* Release semaphores */ > e1000_put_hw_semaphore_82573(hw); > DEBUGOUT("Driver can't access the PHY\n"); > - ret_val =3D -E1000_ERR_PHY; > - goto out; > + return -E1000_ERR_PHY; > } > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -712,7 +689,7 @@ static void e1000_put_hw_semaphore_82574 > **/ > static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool activ= e) > { > - u16 data =3D E1000_READ_REG(hw, E1000_POEMB); > + u32 data =3D E1000_READ_REG(hw, E1000_POEMB); > =20 > DEBUGFUNC("e1000_set_d0_lplu_state_82574"); > =20 > @@ -738,7 +715,7 @@ static s32 e1000_set_d0_lplu_state_82574 > **/ > static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool activ= e) > { > - u16 data =3D E1000_READ_REG(hw, E1000_POEMB); > + u32 data =3D E1000_READ_REG(hw, E1000_POEMB); > =20 > DEBUGFUNC("e1000_set_d3_lplu_state_82574"); > =20 > @@ -771,7 +748,7 @@ static s32 e1000_acquire_nvm_82571(struc > =20 > ret_val =3D e1000_get_hw_semaphore_82571(hw); > if (ret_val) > - goto out; > + return ret_val; > =20 > switch (hw->mac.type) { > case e1000_82573: > @@ -784,7 +761,6 @@ static s32 e1000_acquire_nvm_82571(struc > if (ret_val) > e1000_put_hw_semaphore_82571(hw); > =20 > -out: > return ret_val; > } > =20 > @@ -817,7 +793,7 @@ static void e1000_release_nvm_82571(stru > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 wo= rds, > u16 *data) > { > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > =20 > DEBUGFUNC("e1000_write_nvm_82571"); > =20 > @@ -857,31 +833,27 @@ static s32 e1000_update_nvm_checksum_825 > =20 > ret_val =3D e1000_update_nvm_checksum_generic(hw); > if (ret_val) > - goto out; > + return ret_val; > =20 > - /* > - * If our nvm is an EEPROM, then we're done > + /* If our nvm is an EEPROM, then we're done > * otherwise, commit the checksum to the flash NVM. > */ > if (hw->nvm.type !=3D e1000_nvm_flash_hw) > - goto out; > + return E1000_SUCCESS; > =20 > /* Check for pending operations. */ > for (i =3D 0; i < E1000_FLASH_UPDATES; i++) { > msec_delay(1); > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) =3D=3D 0) > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) > break; > } > =20 > - if (i =3D=3D E1000_FLASH_UPDATES) { > - ret_val =3D -E1000_ERR_NVM; > - goto out; > - } > + if (i =3D=3D E1000_FLASH_UPDATES) > + return -E1000_ERR_NVM; > =20 > /* Reset the firmware if using STM opcode. */ > if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) =3D=3D E1000_STM_OPCODE) { > - /* > - * The enabling of and the actual reset must be done > + /* The enabling of and the actual reset must be done > * in two write cycles. > */ > E1000_WRITE_REG(hw, E1000_HICR, E1000_HICR_FW_RESET_ENABLE); > @@ -895,17 +867,14 @@ static s32 e1000_update_nvm_checksum_825 > =20 > for (i =3D 0; i < E1000_FLASH_UPDATES; i++) { > msec_delay(1); > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) =3D=3D 0) > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) > break; > } > =20 > - if (i =3D=3D E1000_FLASH_UPDATES) { > - ret_val =3D -E1000_ERR_NVM; > - goto out; > - } > + if (i =3D=3D E1000_FLASH_UPDATES) > + return -E1000_ERR_NVM; > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -944,19 +913,17 @@ static s32 e1000_write_nvm_eewr_82571(st > { > struct e1000_nvm_info *nvm =3D &hw->nvm; > u32 i, eewr =3D 0; > - s32 ret_val =3D 0; > + s32 ret_val =3D E1000_SUCCESS; > =20 > DEBUGFUNC("e1000_write_nvm_eewr_82571"); > =20 > - /* > - * A check for invalid values: offset too large, too many words, > + /* A check for invalid values: offset too large, too many words, > * and not enough words. > */ > if ((offset >=3D nvm->word_size) || (words > (nvm->word_size - offset))= || > (words =3D=3D 0)) { > DEBUGOUT("nvm parameter(s) out of bounds\n"); > - ret_val =3D -E1000_ERR_NVM; > - goto out; > + return -E1000_ERR_NVM; > } > =20 > for (i =3D 0; i < words; i++) { > @@ -975,7 +942,6 @@ static s32 e1000_write_nvm_eewr_82571(st > break; > } > =20 > -out: > return ret_val; > } > =20 > @@ -988,7 +954,6 @@ out: > static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) > { > s32 timeout =3D PHY_CFG_TIMEOUT; > - s32 ret_val =3D E1000_SUCCESS; > =20 > DEBUGFUNC("e1000_get_cfg_done_82571"); > =20 > @@ -1001,12 +966,10 @@ static s32 e1000_get_cfg_done_82571(stru > } > if (!timeout) { > DEBUGOUT("MNG configuration cycle has not completed.\n"); > - ret_val =3D -E1000_ERR_RESET; > - goto out; > + return -E1000_ERR_RESET; > } > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -1023,39 +986,40 @@ out: > static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool activ= e) > { > struct e1000_phy_info *phy =3D &hw->phy; > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > u16 data; > =20 > DEBUGFUNC("e1000_set_d0_lplu_state_82571"); > =20 > if (!(phy->ops.read_reg)) > - goto out; > + return E1000_SUCCESS; > =20 > ret_val =3D phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); > if (ret_val) > - goto out; > + return ret_val; > =20 > if (active) { > data |=3D IGP02E1000_PM_D0_LPLU; > ret_val =3D phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, > data); > if (ret_val) > - goto out; > + return ret_val; > =20 > /* When LPLU is enabled, we should disable SmartSpeed */ > ret_val =3D phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, > &data); > + if (ret_val) > + return ret_val; > data &=3D ~IGP01E1000_PSCFR_SMART_SPEED; > ret_val =3D phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, > data); > if (ret_val) > - goto out; > + return ret_val; > } else { > data &=3D ~IGP02E1000_PM_D0_LPLU; > ret_val =3D phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, > data); > - /* > - * LPLU and SmartSpeed are mutually exclusive. LPLU is used > + /* LPLU and SmartSpeed are mutually exclusive. LPLU is used > * during Dx states where the power conservation is most > * important. During driver activity we should enable > * SmartSpeed, so performance is maintained. > @@ -1065,32 +1029,31 @@ static s32 e1000_set_d0_lplu_state_82571 > IGP01E1000_PHY_PORT_CONFIG, > &data); > if (ret_val) > - goto out; > + return ret_val; > =20 > data |=3D IGP01E1000_PSCFR_SMART_SPEED; > ret_val =3D phy->ops.write_reg(hw, > IGP01E1000_PHY_PORT_CONFIG, > data); > if (ret_val) > - goto out; > + return ret_val; > } else if (phy->smart_speed =3D=3D e1000_smart_speed_off) { > ret_val =3D phy->ops.read_reg(hw, > IGP01E1000_PHY_PORT_CONFIG, > &data); > if (ret_val) > - goto out; > + return ret_val; > =20 > data &=3D ~IGP01E1000_PSCFR_SMART_SPEED; > ret_val =3D phy->ops.write_reg(hw, > IGP01E1000_PHY_PORT_CONFIG, > data); > if (ret_val) > - goto out; > + return ret_val; > } > } > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -1101,13 +1064,12 @@ out: > **/ > static s32 e1000_reset_hw_82571(struct e1000_hw *hw) > { > - u32 ctrl, ctrl_ext; > + u32 ctrl, ctrl_ext, eecd, tctl; > s32 ret_val; > =20 > DEBUGFUNC("e1000_reset_hw_82571"); > =20 > - /* > - * Prevent the PCI-E bus from sticking if there is no TLP connection > + /* Prevent the PCI-E bus from sticking if there is no TLP connection > * on the last TLP read/write transaction when MAC is reset. > */ > ret_val =3D e1000_disable_pcie_master_generic(hw); > @@ -1118,13 +1080,14 @@ static s32 e1000_reset_hw_82571(struct e > E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); > =20 > E1000_WRITE_REG(hw, E1000_RCTL, 0); > - E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); > + tctl =3D E1000_READ_REG(hw, E1000_TCTL); > + tctl &=3D ~E1000_TCTL_EN; > + E1000_WRITE_REG(hw, E1000_TCTL, tctl); > E1000_WRITE_FLUSH(hw); > =20 > msec_delay(10); > =20 > - /* > - * Must acquire the MDIO ownership before MAC reset. > + /* Must acquire the MDIO ownership before MAC reset. > * Ownership defaults to firmware after a reset. > */ > switch (hw->mac.type) { > @@ -1167,15 +1130,23 @@ static s32 e1000_reset_hw_82571(struct e > ret_val =3D e1000_get_auto_rd_done_generic(hw); > if (ret_val) > /* We don't want to continue accessing MAC registers. */ > - goto out; > + return ret_val; > =20 > - /* > - * Phy configuration from NVM just starts after EECD_AUTO_RD is set. > + /* Phy configuration from NVM just starts after EECD_AUTO_RD is set. > * Need to wait for Phy configuration completion before accessing > * NVM and Phy. > */ > =20 > switch (hw->mac.type) { > + case e1000_82571: > + case e1000_82572: > + /* REQ and GNT bits need to be cleared when using AUTO_RD > + * to access the EEPROM. > + */ > + eecd =3D E1000_READ_REG(hw, E1000_EECD); > + eecd &=3D ~(E1000_EECD_REQ | E1000_EECD_GNT); > + E1000_WRITE_REG(hw, E1000_EECD, eecd); > + break; > case e1000_82573: > case e1000_82574: > case e1000_82583: > @@ -1193,7 +1164,7 @@ static s32 e1000_reset_hw_82571(struct e > /* Install any alternate MAC address into RAR0 */ > ret_val =3D e1000_check_alt_mac_addr_generic(hw); > if (ret_val) > - goto out; > + return ret_val; > =20 > e1000_set_laa_state_82571(hw, TRUE); > } > @@ -1202,8 +1173,7 @@ static s32 e1000_reset_hw_82571(struct e > if (hw->phy.media_type =3D=3D e1000_media_type_internal_serdes) > hw->mac.serdes_link_state =3D e1000_serdes_link_down; > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -1225,16 +1195,15 @@ static s32 e1000_init_hw_82571(struct e1 > =20 > /* Initialize identification LED */ > ret_val =3D mac->ops.id_led_init(hw); > + /* An error is not fatal and we should not stop init due to this */ > if (ret_val) > DEBUGOUT("Error initializing identification LED\n"); > - /* This is not fatal and we should not stop init due to this */ > =20 > /* Disabling VLAN filtering */ > DEBUGOUT("Initializing the IEEE VLAN\n"); > mac->ops.clear_vfta(hw); > =20 > - /* Setup the receive address. */ > - /* > + /* Setup the receive address. > * If, however, a locally administered address was assigned to the > * 82571, we must reserve a RAR for it to work around an issue where > * resetting one port will reload the MAC on the other port. > @@ -1277,8 +1246,7 @@ static s32 e1000_init_hw_82571(struct e1 > break; > } > =20 > - /* > - * Clear all of the statistics registers (clear on read). It is > + /* Clear all of the statistics registers (clear on read). It is > * important that we do this after we have tried to establish link > * because the symbol error count will increment wildly if there > * is no link. > @@ -1377,8 +1345,7 @@ static void e1000_initialize_hw_bits_825 > E1000_WRITE_REG(hw, E1000_PBA_ECC, reg); > } > =20 > - /* > - * Workaround for hardware errata. > + /* Workaround for hardware errata. > * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572 > */ > if ((hw->mac.type =3D=3D e1000_82571) || > @@ -1388,6 +1355,15 @@ static void e1000_initialize_hw_bits_825 > E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); > } > =20 > + /* Disable IPv6 extension header parsing because some malformed > + * IPv6 headers can hang the Rx. > + */ > + if (hw->mac.type <=3D e1000_82573) { > + reg =3D E1000_READ_REG(hw, E1000_RFCTL); > + reg |=3D (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS); > + E1000_WRITE_REG(hw, E1000_RFCTL, reg); > + } > + > /* PCI-Ex Control Registers */ > switch (hw->mac.type) { > case e1000_82574: > @@ -1396,8 +1372,7 @@ static void e1000_initialize_hw_bits_825 > reg |=3D (1 << 22); > E1000_WRITE_REG(hw, E1000_GCR, reg); > =20 > - /* > - * Workaround for hardware errata. > + /* Workaround for hardware errata. > * apply workaround for hardware errata documented in errata > * docs Fixes issue where some error prone or unreliable PCIe > * completions are occurring, particularly with ASPM enabled. > @@ -1435,25 +1410,25 @@ static void e1000_clear_vfta_82571(struc > case e1000_82574: > case e1000_82583: > if (hw->mng_cookie.vlan_id !=3D 0) { > - /* > - * The VFTA is a 4096b bit-field, each identifying > + /* The VFTA is a 4096b bit-field, each identifying > * a single VLAN ID. The following operations > * determine which 32b entry (i.e. offset) into the > * array we want to set the VLAN ID (i.e. bit) of > * the manageability unit. > */ > vfta_offset =3D (hw->mng_cookie.vlan_id >> > - E1000_VFTA_ENTRY_SHIFT) & E1000_VFTA_ENTRY_MASK; > - vfta_bit_in_reg =3D 1 << (hw->mng_cookie.vlan_id & > - E1000_VFTA_ENTRY_BIT_SHIFT_MASK); > + E1000_VFTA_ENTRY_SHIFT) & > + E1000_VFTA_ENTRY_MASK; > + vfta_bit_in_reg =3D > + 1 << (hw->mng_cookie.vlan_id & > + E1000_VFTA_ENTRY_BIT_SHIFT_MASK); > } > break; > default: > break; > } > for (offset =3D 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) { > - /* > - * If the offset we want to clear is the same offset of the > + /* If the offset we want to clear is the same offset of the > * manageability VLAN ID, then clear all bits except that of > * the manageability unit. > */ > @@ -1495,8 +1470,7 @@ static s32 e1000_led_on_82574(struct e10 > =20 > ctrl =3D hw->mac.ledctl_mode2; > if (!(E1000_STATUS_LU & E1000_READ_REG(hw, E1000_STATUS))) { > - /* > - * If no link, then turn LED on by setting the invert bit > + /* If no link, then turn LED on by setting the invert bit > * for each LED that's "on" (0x0E) in ledctl_mode2. > */ > for (i =3D 0; i < 4; i++) > @@ -1519,30 +1493,28 @@ bool e1000_check_phy_82574(struct e1000_ > { > u16 status_1kbt =3D 0; > u16 receive_errors =3D 0; > - bool phy_hung =3D FALSE; > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > =20 > DEBUGFUNC("e1000_check_phy_82574"); > =20 > - /* > - * Read PHY Receive Error counter first, if its is max - all F's then > + /* Read PHY Receive Error counter first, if its is max - all F's then > * read the Base1000T status register If both are max then PHY is hung. > */ > ret_val =3D hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER, > &receive_errors); > if (ret_val) > - goto out; > + return FALSE; > if (receive_errors =3D=3D E1000_RECEIVE_ERROR_MAX) { > ret_val =3D hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS, > &status_1kbt); > if (ret_val) > - goto out; > + return FALSE; > if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) =3D=3D > E1000_IDLE_ERROR_COUNT_MASK) > - phy_hung =3D TRUE; > + return TRUE; > } > -out: > - return phy_hung; > + > + return FALSE; > } > =20 > =20 > @@ -1560,8 +1532,7 @@ static s32 e1000_setup_link_82571(struct > { > DEBUGFUNC("e1000_setup_link_82571"); > =20 > - /* > - * 82573 does not have a word in the NVM to determine > + /* 82573 does not have a word in the NVM to determine > * the default flow control setting, so we explicitly > * set it to full. > */ > @@ -1608,17 +1579,14 @@ static s32 e1000_setup_copper_link_82571 > ret_val =3D e1000_copper_link_setup_igp(hw); > break; > default: > - ret_val =3D -E1000_ERR_PHY; > + return -E1000_ERR_PHY; > break; > } > =20 > if (ret_val) > - goto out; > - > - ret_val =3D e1000_setup_copper_link_generic(hw); > + return ret_val; > =20 > -out: > - return ret_val; > + return e1000_setup_copper_link_generic(hw); > } > =20 > /** > @@ -1635,8 +1603,7 @@ static s32 e1000_setup_fiber_serdes_link > switch (hw->mac.type) { > case e1000_82571: > case e1000_82572: > - /* > - * If SerDes loopback mode is entered, there is no form > + /* If SerDes loopback mode is entered, there is no form > * of reset to take the adapter out of that mode. So we > * have to explicitly take the adapter out of loopback > * mode. This prevents drivers from twiddling their thumbs > @@ -1685,16 +1652,17 @@ static s32 e1000_check_for_serdes_link_8 > =20 > ctrl =3D E1000_READ_REG(hw, E1000_CTRL); > status =3D E1000_READ_REG(hw, E1000_STATUS); > + E1000_READ_REG(hw, E1000_RXCW); > + /* SYNCH bit and IV bit are sticky */ > + usec_delay(10); > rxcw =3D E1000_READ_REG(hw, E1000_RXCW); > =20 > if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { > - > /* Receiver is synchronized with no invalid bits. */ > switch (mac->serdes_link_state) { > case e1000_serdes_link_autoneg_complete: > if (!(status & E1000_STATUS_LU)) { > - /* > - * We have lost link, retry autoneg before > + /* We have lost link, retry autoneg before > * reporting link failure > */ > mac->serdes_link_state =3D > @@ -1707,15 +1675,12 @@ static s32 e1000_check_for_serdes_link_8 > break; > =20 > case e1000_serdes_link_forced_up: > - /* > - * If we are receiving /C/ ordered sets, re-enable > + /* If we are receiving /C/ ordered sets, re-enable > * auto-negotiation in the TXCW register and disable > * forced link in the Device Control register in an > * attempt to auto-negotiate with our link partner. > - * If the partner code word is null, stop forcing > - * and restart auto negotiation. > */ > - if ((rxcw & E1000_RXCW_C) || !(rxcw & E1000_RXCW_CW)) { > + if (rxcw & E1000_RXCW_C) { > /* Enable autoneg, and unforce link up */ > E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); > E1000_WRITE_REG(hw, E1000_CTRL, > @@ -1731,8 +1696,7 @@ static s32 e1000_check_for_serdes_link_8 > =20 > case e1000_serdes_link_autoneg_progress: > if (rxcw & E1000_RXCW_C) { > - /* > - * We received /C/ ordered sets, meaning the > + /* We received /C/ ordered sets, meaning the > * link partner has autonegotiated, and we can > * trust the Link Up (LU) status bit. > */ > @@ -1748,8 +1712,7 @@ static s32 e1000_check_for_serdes_link_8 > DEBUGOUT("AN_PROG -> DOWN\n"); > } > } else { > - /* > - * The link partner did not autoneg. > + /* The link partner did not autoneg. > * Force link up and full duplex, and change > * state to forced. > */ > @@ -1774,8 +1737,7 @@ static s32 e1000_check_for_serdes_link_8 > =20 > case e1000_serdes_link_down: > default: > - /* > - * The link was down but the receiver has now gained > + /* The link was down but the receiver has now gained > * valid sync, so lets see if we can bring the link > * up. > */ > @@ -1794,17 +1756,18 @@ static s32 e1000_check_for_serdes_link_8 > mac->serdes_link_state =3D e1000_serdes_link_down; > DEBUGOUT("ANYSTATE -> DOWN\n"); > } else { > - /* > - * Check several times, if Sync and Config > - * both are consistently 1 then simply ignore > - * the Invalid bit and restart Autoneg > + /* Check several times, if SYNCH bit and CONFIG > + * bit both are consistently 1 then simply ignore > + * the IV bit and restart Autoneg > */ > for (i =3D 0; i < AN_RETRY_COUNT; i++) { > usec_delay(10); > rxcw =3D E1000_READ_REG(hw, E1000_RXCW); > - if ((rxcw & E1000_RXCW_IV) && > - !((rxcw & E1000_RXCW_SYNCH) && > - (rxcw & E1000_RXCW_C))) { > + if ((rxcw & E1000_RXCW_SYNCH) && > + (rxcw & E1000_RXCW_C)) > + continue; > + > + if (rxcw & E1000_RXCW_IV) { > mac->serdes_has_link =3D FALSE; > mac->serdes_link_state =3D > e1000_serdes_link_down; > @@ -1845,7 +1808,7 @@ static s32 e1000_valid_led_default_82571 > ret_val =3D hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); > if (ret_val) { > DEBUGOUT("NVM Read Error\n"); > - goto out; > + return ret_val; > } > =20 > switch (hw->mac.type) { > @@ -1862,8 +1825,7 @@ static s32 e1000_valid_led_default_82571 > break; > } > =20 > -out: > - return ret_val; > + return E1000_SUCCESS; > } > =20 > /** > @@ -1900,15 +1862,14 @@ void e1000_set_laa_state_82571(struct e1 > =20 > /* If workaround is activated... */ > if (state) > - /* > - * Hold a copy of the LAA in RAR[14] This is done so that > + /* Hold a copy of the LAA in RAR[14] This is done so that > * between the time RAR[0] gets clobbered and the time it > * gets fixed, the actual LAA is in one of the RARs and no > * incoming packets directed to this port are dropped. > * Eventually the LAA will be in RAR[0] and RAR[14]. > */ > - e1000_rar_set_generic(hw, hw->mac.addr, > - hw->mac.rar_entry_count - 1); > + hw->mac.ops.rar_set(hw, hw->mac.addr, > + hw->mac.rar_entry_count - 1); > return; > } > =20 > @@ -1925,25 +1886,23 @@ void e1000_set_laa_state_82571(struct e1 > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) > { > struct e1000_nvm_info *nvm =3D &hw->nvm; > - s32 ret_val =3D E1000_SUCCESS; > + s32 ret_val; > u16 data; > =20 > DEBUGFUNC("e1000_fix_nvm_checksum_82571"); > =20 > if (nvm->type !=3D e1000_nvm_flash_hw) > - goto out; > + return E1000_SUCCESS; > =20 > - /* > - * Check bit 4 of word 10h. If it is 0, firmware is done updating > + /* Check bit 4 of word 10h. If it is 0, firmware is done updating > * 10h-12h. Checksum may need to be fixed. > */ >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-stable-8@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8 > To unsubscribe, send any mail to "svn-src-stable-8-unsubscribe@freebsd.or= g" --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJRLr+lAAoJEFJPDDeguUaj+8MH/1NbMjgLJcaSRJqnlVrqbtlC uRAtZB12ImzxshbSxaj3ZuWsAQ/5Sg+J6nJwB5iKyFO7jkoCuDVGi5XJraGHdXWM RSNsJPrt5w9Hk0JDHMZkbvJaMrvOYUGT9Iz1aID399Zn5GdoWsrGeDPSXwunBobz mRR4RuBBZLawDnMSxp7LwkUp2zlVIY578hfw9GskTAWDU4ADrbzr7eHgmbBZ48fJ Jd+QNrwfRKPhLiFjrcSaa5YbVXCp5kDumL5Y34FF99H4Rq91yS+UkPu4Ait6Nooq xA0X24FFfi8+tnpbK04MNdWfH+SxznQV79eCJ9JDZcMl1kV0EcT/uCtCg7bMGD8= =oUZH -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu-- From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 05:40:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AAAB4B23; Thu, 28 Feb 2013 05:40:07 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx1.freebsd.org (Postfix) with ESMTP id E27CEC03; Thu, 28 Feb 2013 05:40:06 +0000 (UTC) Received: by mail-ve0-f181.google.com with SMTP id d10so1414816vea.12 for ; Wed, 27 Feb 2013 21:39:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=XHBXTGjg8jNk5KQeC1TWNWYLVGpEVGO1iWaH3cA2Hok=; b=wpSTZ4Vyq/a4bsIS0KGU4z91uxJFbXEQWzdK9tw7hMpdaD54kmmkBEx+jSNx/5slbJ Eu64a6lo5Mrh0nzJlHs+ctoDv+oXgA1+sEO25is9sNq0wzJuToq4SMASalnjBk0cdgEV E23ByO1hGoh20kOSkAec/WupSbQEEB+NlZUgjZrqQRYLHF8w5JbX9puK32RCFF2ET9qW edHsOArHrRXQjlY2svz2+25OPh9EpzzEPJJKZpHcb/aD0jtLAIXLSut4GuTwM57rW1VK 7QcPAAoe8vjoSmKb5LYmcI8r58czEvJKPQmRar7+iwJNTe/sbnQ9b6DFHgR18Qjjdm76 PuOg== MIME-Version: 1.0 X-Received: by 10.221.2.71 with SMTP id nt7mr1951324vcb.71.1362029999756; Wed, 27 Feb 2013 21:39:59 -0800 (PST) Received: by 10.220.191.132 with HTTP; Wed, 27 Feb 2013 21:39:59 -0800 (PST) In-Reply-To: <20130228022333.GC70215@glenbarber.us> References: <201302280022.r1S0M4vm064514@svn.freebsd.org> <20130228022333.GC70215@glenbarber.us> Date: Wed, 27 Feb 2013 21:39:59 -0800 Message-ID: Subject: Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb From: Jack Vogel To: Glen Barber Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Jack F Vogel , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 05:40:07 -0000 Oh, that's odd, then HEAD should be broken too, do you have more detail? Jack On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber wrote: > Jack, > > This commit seems to break the build for at least powerpc and sparc64. > > Glen > > On Thu, Feb 28, 2013 at 12:22:04AM +0000, Jack F Vogel wrote: > > Author: jfv > > Date: Thu Feb 28 00:22:04 2013 > > New Revision: 247430 > > URL: http://svnweb.freebsd.org/changeset/base/247430 > > > > Log: > > MFC of the E1000 drivers to STABLE/8, this includes the follow > revisions > > plus a few tweaks: > > 196969,196970,211516,214646,215781,215789,215808,215910,223350, > > 223482,223831,228281,228393,229939,231796,232238,234665,235256, > > 236406,238148,238151,238214,238765,238770,238953,238981,239105, > > 239109,239304,240518,240693,240968,241037,241856,241885,243570, > > 243857,245334,246128,246482,247064 > > > > Added: > > stable/8/sys/dev/e1000/e1000_i210.c > > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c > > stable/8/sys/dev/e1000/e1000_i210.h > > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h > > Modified: > > stable/8/sys/conf/files > > stable/8/sys/dev/e1000/e1000_82541.c > > stable/8/sys/dev/e1000/e1000_82543.c > > stable/8/sys/dev/e1000/e1000_82571.c > > stable/8/sys/dev/e1000/e1000_82575.c > > stable/8/sys/dev/e1000/e1000_82575.h > > stable/8/sys/dev/e1000/e1000_api.c > > stable/8/sys/dev/e1000/e1000_api.h > > stable/8/sys/dev/e1000/e1000_defines.h > > stable/8/sys/dev/e1000/e1000_hw.h > > stable/8/sys/dev/e1000/e1000_ich8lan.c > > stable/8/sys/dev/e1000/e1000_ich8lan.h > > stable/8/sys/dev/e1000/e1000_mac.c > > stable/8/sys/dev/e1000/e1000_mac.h > > stable/8/sys/dev/e1000/e1000_manage.c > > stable/8/sys/dev/e1000/e1000_manage.h > > stable/8/sys/dev/e1000/e1000_nvm.c > > stable/8/sys/dev/e1000/e1000_nvm.h > > stable/8/sys/dev/e1000/e1000_osdep.h > > stable/8/sys/dev/e1000/e1000_phy.c > > stable/8/sys/dev/e1000/e1000_phy.h > > stable/8/sys/dev/e1000/e1000_regs.h > > stable/8/sys/dev/e1000/if_em.c (contents, props changed) > > stable/8/sys/dev/e1000/if_igb.c (contents, props changed) > > stable/8/sys/dev/e1000/if_igb.h > > stable/8/sys/dev/e1000/if_lem.c > > stable/8/sys/modules/em/Makefile > > stable/8/sys/modules/igb/Makefile > > Directory Properties: > > stable/8/sys/dev/e1000/ (props changed) > > > > Modified: stable/8/sys/conf/files > > > ============================================================================== > > --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013 (r247429) > > +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013 (r247430) > > @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > dev/e1000/e1000_ich8lan.c optional em | igb \ > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > +dev/e1000/e1000_i210.c optional em | igb \ > > + compile-with "${NORMAL_C} -I$S/dev/e1000" > > dev/e1000/e1000_api.c optional em | igb \ > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > dev/e1000/e1000_mac.c optional em | igb \ > > > > Modified: stable/8/sys/dev/e1000/e1000_82541.c > > > ============================================================================== > > --- stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:18:56 2013 > (r247429) > > +++ stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:22:04 2013 > (r247430) > > @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st > > * of MAC speed/duplex configuration. So we only need to > > * configure Collision Distance in the MAC. > > */ > > - e1000_config_collision_dist_generic(hw); > > + mac->ops.config_collision_dist(hw); > > > > /* > > * Configure Flow Control now that Auto-Neg has completed. > > > > Modified: stable/8/sys/dev/e1000/e1000_82543.c > > > ============================================================================== > > --- stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:18:56 2013 > (r247429) > > +++ stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:22:04 2013 > (r247430) > > @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 > > DEBUGOUT("Valid link established!!!\n"); > > /* Config the MAC and PHY after link is up */ > > if (hw->mac.type == e1000_82544) { > > - e1000_config_collision_dist_generic(hw); > > + hw->mac.ops.config_collision_dist(hw); > > } else { > > ret_val = e1000_config_mac_to_phy_82543(hw); > > if (ret_val) > > @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( > > /* Take the link out of reset */ > > ctrl &= ~E1000_CTRL_LRST; > > > > - e1000_config_collision_dist_generic(hw); > > + hw->mac.ops.config_collision_dist(hw); > > > > ret_val = e1000_commit_fc_settings_generic(hw); > > if (ret_val) > > @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 > > * settings. > > */ > > if (mac->type == e1000_82544) > > - e1000_config_collision_dist_generic(hw); > > + hw->mac.ops.config_collision_dist(hw); > > else { > > ret_val = e1000_config_mac_to_phy_82543(hw); > > if (ret_val) { > > @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 > > if (phy_data & M88E1000_PSSR_DPLX) > > ctrl |= E1000_CTRL_FD; > > > > - e1000_config_collision_dist_generic(hw); > > + hw->mac.ops.config_collision_dist(hw); > > > > /* > > * Set up speed in the Device Control register depending on > > > > Modified: stable/8/sys/dev/e1000/e1000_82571.c > > > ============================================================================== > > --- stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:18:56 2013 > (r247429) > > +++ stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:22:04 2013 > (r247430) > > @@ -1,6 +1,6 @@ > > > /****************************************************************************** > > > > - Copyright (c) 2001-2011, Intel Corporation > > + Copyright (c) 2001-2013, Intel Corporation > > All rights reserved. > > > > Redistribution and use in source and binary forms, with or without > > @@ -32,8 +32,7 @@ > > > ******************************************************************************/ > > /*$FreeBSD$*/ > > > > -/* > > - * 82571EB Gigabit Ethernet Controller > > +/* 82571EB Gigabit Ethernet Controller > > * 82571EB Gigabit Ethernet Controller (Copper) > > * 82571EB Gigabit Ethernet Controller (Fiber) > > * 82571EB Dual Port Gigabit Mezzanine Adapter > > @@ -51,9 +50,6 @@ > > > > #include "e1000_api.h" > > > > -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); > > -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); > > -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); > > static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); > > static void e1000_release_nvm_82571(struct e1000_hw *hw); > > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, > > @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 > > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); > > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); > > static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); > > -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); > > static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); > > static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); > > static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); > > @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ > > static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) > > { > > struct e1000_phy_info *phy = &hw->phy; > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > > > DEBUGFUNC("e1000_init_phy_params_82571"); > > > > if (hw->phy.media_type != e1000_media_type_copper) { > > phy->type = e1000_phy_none; > > - goto out; > > + return E1000_SUCCESS; > > } > > > > phy->addr = 1; > > @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s > > phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574; > > break; > > default: > > - ret_val = -E1000_ERR_PHY; > > - goto out; > > + return -E1000_ERR_PHY; > > break; > > } > > > > @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s > > ret_val = e1000_get_phy_id_82571(hw); > > if (ret_val) { > > DEBUGOUT("Error getting PHY ID\n"); > > - goto out; > > + return ret_val; > > } > > > > /* Verify phy id */ > > @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s > > if (ret_val) > > DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); > > > > -out: > > return ret_val; > > } > > > > @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s > > if (((eecd >> 15) & 0x3) == 0x3) { > > nvm->type = e1000_nvm_flash_hw; > > nvm->word_size = 2048; > > - /* > > - * Autonomous Flash update bit must be cleared due > > + /* Autonomous Flash update bit must be cleared due > > * to Flash update issue. > > */ > > eecd &= ~E1000_EECD_AUPDEN; > > @@ -254,8 +246,7 @@ static s32 e1000_init_nvm_params_82571(s > > nvm->type = e1000_nvm_eeprom_spi; > > size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> > > E1000_EECD_SIZE_EX_SHIFT); > > - /* > > - * Added to a constant, "size" becomes the left-shift value > > + /* Added to a constant, "size" becomes the left-shift value > > * for setting word_size. > > */ > > size += NVM_WORD_SIZE_BASE_SHIFT; > > @@ -382,12 +373,11 @@ static s32 e1000_init_mac_params_82571(s > > > > /* FWSM register */ > > mac->has_fwsm = TRUE; > > - /* > > - * ARC supported; valid only if manageability features are > > + /* ARC supported; valid only if manageability features are > > * enabled. > > */ > > - mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) > & > > - E1000_FWSM_MODE_MASK) ? TRUE : > FALSE; > > + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, > E1000_FWSM) & > > + E1000_FWSM_MODE_MASK); > > break; > > case e1000_82574: > > case e1000_82583: > > @@ -405,8 +395,7 @@ static s32 e1000_init_mac_params_82571(s > > break; > > } > > > > - /* > > - * Ensure that the inter-port SWSM.SMBI lock bit is clear before > > + /* Ensure that the inter-port SWSM.SMBI lock bit is clear before > > * first NVM or PHY acess. This should be done for single-port > > * devices, and for one port only on dual-port devices so that > > * for those devices we can still use the SMBI lock to synchronize > > @@ -422,8 +411,9 @@ static s32 e1000_init_mac_params_82571(s > > E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 | > > E1000_SWSM2_LOCK); > > force_clear_smbi = TRUE; > > - } else > > + } else { > > force_clear_smbi = FALSE; > > + } > > break; > > default: > > force_clear_smbi = TRUE; > > @@ -443,10 +433,7 @@ static s32 e1000_init_mac_params_82571(s > > E1000_WRITE_REG(hw, E1000_SWSM, swsm & ~E1000_SWSM_SMBI); > > } > > > > - /* > > - * Initialze device specific counter of SMBI acquisition > > - * timeouts. > > - */ > > + /* Initialze device specific counter of SMBI acquisition timeouts. > */ > > hw->dev_spec._82571.smb_counter = 0; > > > > return E1000_SUCCESS; > > @@ -477,7 +464,7 @@ void e1000_init_function_pointers_82571( > > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) > > { > > struct e1000_phy_info *phy = &hw->phy; > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > u16 phy_id = 0; > > > > DEBUGFUNC("e1000_get_phy_id_82571"); > > @@ -485,8 +472,7 @@ static s32 e1000_get_phy_id_82571(struct > > switch (hw->mac.type) { > > case e1000_82571: > > case e1000_82572: > > - /* > > - * The 82571 firmware may still be configuring the PHY. > > + /* The 82571 firmware may still be configuring the PHY. > > * In this case, we cannot access the PHY until the > > * configuration is done. So we explicitly set the > > * PHY ID. > > @@ -494,29 +480,29 @@ static s32 e1000_get_phy_id_82571(struct > > phy->id = IGP01E1000_I_PHY_ID; > > break; > > case e1000_82573: > > - ret_val = e1000_get_phy_id(hw); > > + return e1000_get_phy_id(hw); > > break; > > case e1000_82574: > > case e1000_82583: > > ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > phy->id = (u32)(phy_id << 16); > > usec_delay(20); > > ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > phy->id |= (u32)(phy_id); > > phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); > > break; > > default: > > - ret_val = -E1000_ERR_PHY; > > + return -E1000_ERR_PHY; > > break; > > } > > -out: > > - return ret_val; > > + > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -528,15 +514,13 @@ out: > > static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) > > { > > u32 swsm; > > - s32 ret_val = E1000_SUCCESS; > > s32 sw_timeout = hw->nvm.word_size + 1; > > s32 fw_timeout = hw->nvm.word_size + 1; > > s32 i = 0; > > > > DEBUGFUNC("e1000_get_hw_semaphore_82571"); > > > > - /* > > - * If we have timedout 3 times on trying to acquire > > + /* If we have timedout 3 times on trying to acquire > > * the inter-port SMBI semaphore, there is old code > > * operating on the other port, and it is not > > * releasing SMBI. Modify the number of times that > > @@ -576,12 +560,10 @@ static s32 e1000_get_hw_semaphore_82571( > > /* Release semaphores */ > > e1000_put_hw_semaphore_82571(hw); > > DEBUGOUT("Driver can't access the NVM\n"); > > - ret_val = -E1000_ERR_NVM; > > - goto out; > > + return -E1000_ERR_NVM; > > } > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -613,22 +595,19 @@ static void e1000_put_hw_semaphore_82571 > > static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) > > { > > u32 extcnf_ctrl; > > - s32 ret_val = E1000_SUCCESS; > > s32 i = 0; > > > > DEBUGFUNC("e1000_get_hw_semaphore_82573"); > > > > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); > > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > > do { > > + extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > > E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl); > > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); > > > > if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP) > > break; > > > > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; > > - > > msec_delay(2); > > i++; > > } while (i < MDIO_OWNERSHIP_TIMEOUT); > > @@ -637,12 +616,10 @@ static s32 e1000_get_hw_semaphore_82573( > > /* Release semaphores */ > > e1000_put_hw_semaphore_82573(hw); > > DEBUGOUT("Driver can't access the PHY\n"); > > - ret_val = -E1000_ERR_PHY; > > - goto out; > > + return -E1000_ERR_PHY; > > } > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -712,7 +689,7 @@ static void e1000_put_hw_semaphore_82574 > > **/ > > static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool > active) > > { > > - u16 data = E1000_READ_REG(hw, E1000_POEMB); > > + u32 data = E1000_READ_REG(hw, E1000_POEMB); > > > > DEBUGFUNC("e1000_set_d0_lplu_state_82574"); > > > > @@ -738,7 +715,7 @@ static s32 e1000_set_d0_lplu_state_82574 > > **/ > > static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool > active) > > { > > - u16 data = E1000_READ_REG(hw, E1000_POEMB); > > + u32 data = E1000_READ_REG(hw, E1000_POEMB); > > > > DEBUGFUNC("e1000_set_d3_lplu_state_82574"); > > > > @@ -771,7 +748,7 @@ static s32 e1000_acquire_nvm_82571(struc > > > > ret_val = e1000_get_hw_semaphore_82571(hw); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > switch (hw->mac.type) { > > case e1000_82573: > > @@ -784,7 +761,6 @@ static s32 e1000_acquire_nvm_82571(struc > > if (ret_val) > > e1000_put_hw_semaphore_82571(hw); > > > > -out: > > return ret_val; > > } > > > > @@ -817,7 +793,7 @@ static void e1000_release_nvm_82571(stru > > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 > words, > > u16 *data) > > { > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > > > DEBUGFUNC("e1000_write_nvm_82571"); > > > > @@ -857,31 +833,27 @@ static s32 e1000_update_nvm_checksum_825 > > > > ret_val = e1000_update_nvm_checksum_generic(hw); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > - /* > > - * If our nvm is an EEPROM, then we're done > > + /* If our nvm is an EEPROM, then we're done > > * otherwise, commit the checksum to the flash NVM. > > */ > > if (hw->nvm.type != e1000_nvm_flash_hw) > > - goto out; > > + return E1000_SUCCESS; > > > > /* Check for pending operations. */ > > for (i = 0; i < E1000_FLASH_UPDATES; i++) { > > msec_delay(1); > > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) == > 0) > > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) > > break; > > } > > > > - if (i == E1000_FLASH_UPDATES) { > > - ret_val = -E1000_ERR_NVM; > > - goto out; > > - } > > + if (i == E1000_FLASH_UPDATES) > > + return -E1000_ERR_NVM; > > > > /* Reset the firmware if using STM opcode. */ > > if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) == E1000_STM_OPCODE) > { > > - /* > > - * The enabling of and the actual reset must be done > > + /* The enabling of and the actual reset must be done > > * in two write cycles. > > */ > > E1000_WRITE_REG(hw, E1000_HICR, > E1000_HICR_FW_RESET_ENABLE); > > @@ -895,17 +867,14 @@ static s32 e1000_update_nvm_checksum_825 > > > > for (i = 0; i < E1000_FLASH_UPDATES; i++) { > > msec_delay(1); > > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) == > 0) > > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) > > break; > > } > > > > - if (i == E1000_FLASH_UPDATES) { > > - ret_val = -E1000_ERR_NVM; > > - goto out; > > - } > > + if (i == E1000_FLASH_UPDATES) > > + return -E1000_ERR_NVM; > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -944,19 +913,17 @@ static s32 e1000_write_nvm_eewr_82571(st > > { > > struct e1000_nvm_info *nvm = &hw->nvm; > > u32 i, eewr = 0; > > - s32 ret_val = 0; > > + s32 ret_val = E1000_SUCCESS; > > > > DEBUGFUNC("e1000_write_nvm_eewr_82571"); > > > > - /* > > - * A check for invalid values: offset too large, too many words, > > + /* A check for invalid values: offset too large, too many words, > > * and not enough words. > > */ > > if ((offset >= nvm->word_size) || (words > (nvm->word_size - > offset)) || > > (words == 0)) { > > DEBUGOUT("nvm parameter(s) out of bounds\n"); > > - ret_val = -E1000_ERR_NVM; > > - goto out; > > + return -E1000_ERR_NVM; > > } > > > > for (i = 0; i < words; i++) { > > @@ -975,7 +942,6 @@ static s32 e1000_write_nvm_eewr_82571(st > > break; > > } > > > > -out: > > return ret_val; > > } > > > > @@ -988,7 +954,6 @@ out: > > static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) > > { > > s32 timeout = PHY_CFG_TIMEOUT; > > - s32 ret_val = E1000_SUCCESS; > > > > DEBUGFUNC("e1000_get_cfg_done_82571"); > > > > @@ -1001,12 +966,10 @@ static s32 e1000_get_cfg_done_82571(stru > > } > > if (!timeout) { > > DEBUGOUT("MNG configuration cycle has not completed.\n"); > > - ret_val = -E1000_ERR_RESET; > > - goto out; > > + return -E1000_ERR_RESET; > > } > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -1023,39 +986,40 @@ out: > > static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool > active) > > { > > struct e1000_phy_info *phy = &hw->phy; > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > u16 data; > > > > DEBUGFUNC("e1000_set_d0_lplu_state_82571"); > > > > if (!(phy->ops.read_reg)) > > - goto out; > > + return E1000_SUCCESS; > > > > ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > if (active) { > > data |= IGP02E1000_PM_D0_LPLU; > > ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, > > data); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > /* When LPLU is enabled, we should disable SmartSpeed */ > > ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, > > &data); > > + if (ret_val) > > + return ret_val; > > data &= ~IGP01E1000_PSCFR_SMART_SPEED; > > ret_val = phy->ops.write_reg(hw, > IGP01E1000_PHY_PORT_CONFIG, > > data); > > if (ret_val) > > - goto out; > > + return ret_val; > > } else { > > data &= ~IGP02E1000_PM_D0_LPLU; > > ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, > > data); > > - /* > > - * LPLU and SmartSpeed are mutually exclusive. LPLU is > used > > + /* LPLU and SmartSpeed are mutually exclusive. LPLU is > used > > * during Dx states where the power conservation is most > > * important. During driver activity we should enable > > * SmartSpeed, so performance is maintained. > > @@ -1065,32 +1029,31 @@ static s32 e1000_set_d0_lplu_state_82571 > > > IGP01E1000_PHY_PORT_CONFIG, > > &data); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > data |= IGP01E1000_PSCFR_SMART_SPEED; > > ret_val = phy->ops.write_reg(hw, > > > IGP01E1000_PHY_PORT_CONFIG, > > data); > > if (ret_val) > > - goto out; > > + return ret_val; > > } else if (phy->smart_speed == e1000_smart_speed_off) { > > ret_val = phy->ops.read_reg(hw, > > > IGP01E1000_PHY_PORT_CONFIG, > > &data); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > data &= ~IGP01E1000_PSCFR_SMART_SPEED; > > ret_val = phy->ops.write_reg(hw, > > > IGP01E1000_PHY_PORT_CONFIG, > > data); > > if (ret_val) > > - goto out; > > + return ret_val; > > } > > } > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -1101,13 +1064,12 @@ out: > > **/ > > static s32 e1000_reset_hw_82571(struct e1000_hw *hw) > > { > > - u32 ctrl, ctrl_ext; > > + u32 ctrl, ctrl_ext, eecd, tctl; > > s32 ret_val; > > > > DEBUGFUNC("e1000_reset_hw_82571"); > > > > - /* > > - * Prevent the PCI-E bus from sticking if there is no TLP > connection > > + /* Prevent the PCI-E bus from sticking if there is no TLP > connection > > * on the last TLP read/write transaction when MAC is reset. > > */ > > ret_val = e1000_disable_pcie_master_generic(hw); > > @@ -1118,13 +1080,14 @@ static s32 e1000_reset_hw_82571(struct e > > E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); > > > > E1000_WRITE_REG(hw, E1000_RCTL, 0); > > - E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); > > + tctl = E1000_READ_REG(hw, E1000_TCTL); > > + tctl &= ~E1000_TCTL_EN; > > + E1000_WRITE_REG(hw, E1000_TCTL, tctl); > > E1000_WRITE_FLUSH(hw); > > > > msec_delay(10); > > > > - /* > > - * Must acquire the MDIO ownership before MAC reset. > > + /* Must acquire the MDIO ownership before MAC reset. > > * Ownership defaults to firmware after a reset. > > */ > > switch (hw->mac.type) { > > @@ -1167,15 +1130,23 @@ static s32 e1000_reset_hw_82571(struct e > > ret_val = e1000_get_auto_rd_done_generic(hw); > > if (ret_val) > > /* We don't want to continue accessing MAC registers. */ > > - goto out; > > + return ret_val; > > > > - /* > > - * Phy configuration from NVM just starts after EECD_AUTO_RD is > set. > > + /* Phy configuration from NVM just starts after EECD_AUTO_RD is > set. > > * Need to wait for Phy configuration completion before accessing > > * NVM and Phy. > > */ > > > > switch (hw->mac.type) { > > + case e1000_82571: > > + case e1000_82572: > > + /* REQ and GNT bits need to be cleared when using AUTO_RD > > + * to access the EEPROM. > > + */ > > + eecd = E1000_READ_REG(hw, E1000_EECD); > > + eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT); > > + E1000_WRITE_REG(hw, E1000_EECD, eecd); > > + break; > > case e1000_82573: > > case e1000_82574: > > case e1000_82583: > > @@ -1193,7 +1164,7 @@ static s32 e1000_reset_hw_82571(struct e > > /* Install any alternate MAC address into RAR0 */ > > ret_val = e1000_check_alt_mac_addr_generic(hw); > > if (ret_val) > > - goto out; > > + return ret_val; > > > > e1000_set_laa_state_82571(hw, TRUE); > > } > > @@ -1202,8 +1173,7 @@ static s32 e1000_reset_hw_82571(struct e > > if (hw->phy.media_type == e1000_media_type_internal_serdes) > > hw->mac.serdes_link_state = e1000_serdes_link_down; > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -1225,16 +1195,15 @@ static s32 e1000_init_hw_82571(struct e1 > > > > /* Initialize identification LED */ > > ret_val = mac->ops.id_led_init(hw); > > + /* An error is not fatal and we should not stop init due to this */ > > if (ret_val) > > DEBUGOUT("Error initializing identification LED\n"); > > - /* This is not fatal and we should not stop init due to > this */ > > > > /* Disabling VLAN filtering */ > > DEBUGOUT("Initializing the IEEE VLAN\n"); > > mac->ops.clear_vfta(hw); > > > > - /* Setup the receive address. */ > > - /* > > + /* Setup the receive address. > > * If, however, a locally administered address was assigned to the > > * 82571, we must reserve a RAR for it to work around an issue > where > > * resetting one port will reload the MAC on the other port. > > @@ -1277,8 +1246,7 @@ static s32 e1000_init_hw_82571(struct e1 > > break; > > } > > > > - /* > > - * Clear all of the statistics registers (clear on read). It is > > + /* Clear all of the statistics registers (clear on read). It is > > * important that we do this after we have tried to establish link > > * because the symbol error count will increment wildly if there > > * is no link. > > @@ -1377,8 +1345,7 @@ static void e1000_initialize_hw_bits_825 > > E1000_WRITE_REG(hw, E1000_PBA_ECC, reg); > > } > > > > - /* > > - * Workaround for hardware errata. > > + /* Workaround for hardware errata. > > * Ensure that DMA Dynamic Clock gating is disabled on 82571 and > 82572 > > */ > > if ((hw->mac.type == e1000_82571) || > > @@ -1388,6 +1355,15 @@ static void e1000_initialize_hw_bits_825 > > E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); > > } > > > > + /* Disable IPv6 extension header parsing because some malformed > > + * IPv6 headers can hang the Rx. > > + */ > > + if (hw->mac.type <= e1000_82573) { > > + reg = E1000_READ_REG(hw, E1000_RFCTL); > > + reg |= (E1000_RFCTL_IPV6_EX_DIS | > E1000_RFCTL_NEW_IPV6_EXT_DIS); > > + E1000_WRITE_REG(hw, E1000_RFCTL, reg); > > + } > > + > > /* PCI-Ex Control Registers */ > > switch (hw->mac.type) { > > case e1000_82574: > > @@ -1396,8 +1372,7 @@ static void e1000_initialize_hw_bits_825 > > reg |= (1 << 22); > > E1000_WRITE_REG(hw, E1000_GCR, reg); > > > > - /* > > - * Workaround for hardware errata. > > + /* Workaround for hardware errata. > > * apply workaround for hardware errata documented in > errata > > * docs Fixes issue where some error prone or unreliable > PCIe > > * completions are occurring, particularly with ASPM > enabled. > > @@ -1435,25 +1410,25 @@ static void e1000_clear_vfta_82571(struc > > case e1000_82574: > > case e1000_82583: > > if (hw->mng_cookie.vlan_id != 0) { > > - /* > > - * The VFTA is a 4096b bit-field, each identifying > > + /* The VFTA is a 4096b bit-field, each identifying > > * a single VLAN ID. The following operations > > * determine which 32b entry (i.e. offset) into the > > * array we want to set the VLAN ID (i.e. bit) of > > * the manageability unit. > > */ > > vfta_offset = (hw->mng_cookie.vlan_id >> > > - E1000_VFTA_ENTRY_SHIFT) & > E1000_VFTA_ENTRY_MASK; > > - vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id & > > - E1000_VFTA_ENTRY_BIT_SHIFT_MASK); > > + E1000_VFTA_ENTRY_SHIFT) & > > + E1000_VFTA_ENTRY_MASK; > > + vfta_bit_in_reg = > > + 1 << (hw->mng_cookie.vlan_id & > > + E1000_VFTA_ENTRY_BIT_SHIFT_MASK); > > } > > break; > > default: > > break; > > } > > for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) { > > - /* > > - * If the offset we want to clear is the same offset of the > > + /* If the offset we want to clear is the same offset of the > > * manageability VLAN ID, then clear all bits except that > of > > * the manageability unit. > > */ > > @@ -1495,8 +1470,7 @@ static s32 e1000_led_on_82574(struct e10 > > > > ctrl = hw->mac.ledctl_mode2; > > if (!(E1000_STATUS_LU & E1000_READ_REG(hw, E1000_STATUS))) { > > - /* > > - * If no link, then turn LED on by setting the invert bit > > + /* If no link, then turn LED on by setting the invert bit > > * for each LED that's "on" (0x0E) in ledctl_mode2. > > */ > > for (i = 0; i < 4; i++) > > @@ -1519,30 +1493,28 @@ bool e1000_check_phy_82574(struct e1000_ > > { > > u16 status_1kbt = 0; > > u16 receive_errors = 0; > > - bool phy_hung = FALSE; > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > > > DEBUGFUNC("e1000_check_phy_82574"); > > > > - /* > > - * Read PHY Receive Error counter first, if its is max - all F's > then > > + /* Read PHY Receive Error counter first, if its is max - all F's > then > > * read the Base1000T status register If both are max then PHY is > hung. > > */ > > ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER, > > &receive_errors); > > if (ret_val) > > - goto out; > > + return FALSE; > > if (receive_errors == E1000_RECEIVE_ERROR_MAX) { > > ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS, > > &status_1kbt); > > if (ret_val) > > - goto out; > > + return FALSE; > > if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) == > > E1000_IDLE_ERROR_COUNT_MASK) > > - phy_hung = TRUE; > > + return TRUE; > > } > > -out: > > - return phy_hung; > > + > > + return FALSE; > > } > > > > > > @@ -1560,8 +1532,7 @@ static s32 e1000_setup_link_82571(struct > > { > > DEBUGFUNC("e1000_setup_link_82571"); > > > > - /* > > - * 82573 does not have a word in the NVM to determine > > + /* 82573 does not have a word in the NVM to determine > > * the default flow control setting, so we explicitly > > * set it to full. > > */ > > @@ -1608,17 +1579,14 @@ static s32 e1000_setup_copper_link_82571 > > ret_val = e1000_copper_link_setup_igp(hw); > > break; > > default: > > - ret_val = -E1000_ERR_PHY; > > + return -E1000_ERR_PHY; > > break; > > } > > > > if (ret_val) > > - goto out; > > - > > - ret_val = e1000_setup_copper_link_generic(hw); > > + return ret_val; > > > > -out: > > - return ret_val; > > + return e1000_setup_copper_link_generic(hw); > > } > > > > /** > > @@ -1635,8 +1603,7 @@ static s32 e1000_setup_fiber_serdes_link > > switch (hw->mac.type) { > > case e1000_82571: > > case e1000_82572: > > - /* > > - * If SerDes loopback mode is entered, there is no form > > + /* If SerDes loopback mode is entered, there is no form > > * of reset to take the adapter out of that mode. So we > > * have to explicitly take the adapter out of loopback > > * mode. This prevents drivers from twiddling their thumbs > > @@ -1685,16 +1652,17 @@ static s32 e1000_check_for_serdes_link_8 > > > > ctrl = E1000_READ_REG(hw, E1000_CTRL); > > status = E1000_READ_REG(hw, E1000_STATUS); > > + E1000_READ_REG(hw, E1000_RXCW); > > + /* SYNCH bit and IV bit are sticky */ > > + usec_delay(10); > > rxcw = E1000_READ_REG(hw, E1000_RXCW); > > > > if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { > > - > > /* Receiver is synchronized with no invalid bits. */ > > switch (mac->serdes_link_state) { > > case e1000_serdes_link_autoneg_complete: > > if (!(status & E1000_STATUS_LU)) { > > - /* > > - * We have lost link, retry autoneg before > > + /* We have lost link, retry autoneg before > > * reporting link failure > > */ > > mac->serdes_link_state = > > @@ -1707,15 +1675,12 @@ static s32 e1000_check_for_serdes_link_8 > > break; > > > > case e1000_serdes_link_forced_up: > > - /* > > - * If we are receiving /C/ ordered sets, re-enable > > + /* If we are receiving /C/ ordered sets, re-enable > > * auto-negotiation in the TXCW register and > disable > > * forced link in the Device Control register in an > > * attempt to auto-negotiate with our link partner. > > - * If the partner code word is null, stop forcing > > - * and restart auto negotiation. > > */ > > - if ((rxcw & E1000_RXCW_C) || !(rxcw & > E1000_RXCW_CW)) { > > + if (rxcw & E1000_RXCW_C) { > > /* Enable autoneg, and unforce link up */ > > E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); > > E1000_WRITE_REG(hw, E1000_CTRL, > > @@ -1731,8 +1696,7 @@ static s32 e1000_check_for_serdes_link_8 > > > > case e1000_serdes_link_autoneg_progress: > > if (rxcw & E1000_RXCW_C) { > > - /* > > - * We received /C/ ordered sets, meaning > the > > + /* We received /C/ ordered sets, meaning > the > > * link partner has autonegotiated, and we > can > > * trust the Link Up (LU) status bit. > > */ > > @@ -1748,8 +1712,7 @@ static s32 e1000_check_for_serdes_link_8 > > DEBUGOUT("AN_PROG -> DOWN\n"); > > } > > } else { > > - /* > > - * The link partner did not autoneg. > > + /* The link partner did not autoneg. > > * Force link up and full duplex, and > change > > * state to forced. > > */ > > @@ -1774,8 +1737,7 @@ static s32 e1000_check_for_serdes_link_8 > > > > case e1000_serdes_link_down: > > default: > > - /* > > - * The link was down but the receiver has now > gained > > + /* The link was down but the receiver has now > gained > > * valid sync, so lets see if we can bring the link > > * up. > > */ > > @@ -1794,17 +1756,18 @@ static s32 e1000_check_for_serdes_link_8 > > mac->serdes_link_state = e1000_serdes_link_down; > > DEBUGOUT("ANYSTATE -> DOWN\n"); > > } else { > > - /* > > - * Check several times, if Sync and Config > > - * both are consistently 1 then simply ignore > > - * the Invalid bit and restart Autoneg > > + /* Check several times, if SYNCH bit and CONFIG > > + * bit both are consistently 1 then simply ignore > > + * the IV bit and restart Autoneg > > */ > > for (i = 0; i < AN_RETRY_COUNT; i++) { > > usec_delay(10); > > rxcw = E1000_READ_REG(hw, E1000_RXCW); > > - if ((rxcw & E1000_RXCW_IV) && > > - !((rxcw & E1000_RXCW_SYNCH) && > > - (rxcw & E1000_RXCW_C))) { > > + if ((rxcw & E1000_RXCW_SYNCH) && > > + (rxcw & E1000_RXCW_C)) > > + continue; > > + > > + if (rxcw & E1000_RXCW_IV) { > > mac->serdes_has_link = FALSE; > > mac->serdes_link_state = > > > e1000_serdes_link_down; > > @@ -1845,7 +1808,7 @@ static s32 e1000_valid_led_default_82571 > > ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); > > if (ret_val) { > > DEBUGOUT("NVM Read Error\n"); > > - goto out; > > + return ret_val; > > } > > > > switch (hw->mac.type) { > > @@ -1862,8 +1825,7 @@ static s32 e1000_valid_led_default_82571 > > break; > > } > > > > -out: > > - return ret_val; > > + return E1000_SUCCESS; > > } > > > > /** > > @@ -1900,15 +1862,14 @@ void e1000_set_laa_state_82571(struct e1 > > > > /* If workaround is activated... */ > > if (state) > > - /* > > - * Hold a copy of the LAA in RAR[14] This is done so that > > + /* Hold a copy of the LAA in RAR[14] This is done so that > > * between the time RAR[0] gets clobbered and the time it > > * gets fixed, the actual LAA is in one of the RARs and no > > * incoming packets directed to this port are dropped. > > * Eventually the LAA will be in RAR[0] and RAR[14]. > > */ > > - e1000_rar_set_generic(hw, hw->mac.addr, > > - hw->mac.rar_entry_count - 1); > > + hw->mac.ops.rar_set(hw, hw->mac.addr, > > + hw->mac.rar_entry_count - 1); > > return; > > } > > > > @@ -1925,25 +1886,23 @@ void e1000_set_laa_state_82571(struct e1 > > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) > > { > > struct e1000_nvm_info *nvm = &hw->nvm; > > - s32 ret_val = E1000_SUCCESS; > > + s32 ret_val; > > u16 data; > > > > DEBUGFUNC("e1000_fix_nvm_checksum_82571"); > > > > if (nvm->type != e1000_nvm_flash_hw) > > - goto out; > > + return E1000_SUCCESS; > > > > - /* > > - * Check bit 4 of word 10h. If it is 0, firmware is done updating > > + /* Check bit 4 of word 10h. If it is 0, firmware is done updating > > * 10h-12h. Checksum may need to be fixed. > > */ > > > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > _______________________________________________ > > svn-src-stable-8@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8 > > To unsubscribe, send any mail to " > svn-src-stable-8-unsubscribe@freebsd.org" > From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 05:41:14 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 88BE0C94; Thu, 28 Feb 2013 05:41:14 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx1.freebsd.org (Postfix) with ESMTP id AC645C12; Thu, 28 Feb 2013 05:41:13 +0000 (UTC) Received: by mail-vc0-f179.google.com with SMTP id k1so932094vck.38 for ; Wed, 27 Feb 2013 21:41:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=6MvJGkOilA1JGT1vPQkdYeWy6wImDTQV0mxEdEjmLbQ=; b=c9lZ7DRRo6tVjveS8JWQW2GwYQqyynQ1nPzX7VjWY0ygTDHw+jLiUGgeL7SLS9oN6t /tUpGvWW9T3F2r3PUhB6AweErMXiO10bSkdFnehL3Vub0BzBYtyk8rWnpQ/4mirCBrHH Qm9mCEmDIWkKOUm9dncdoOW27jEMIDubfzR9rL265YvpYk4kHtf1iGrevKG2NvuEvjae Mrs4KBMAJKTiGwPHfv/M/WDbG3O0ith4nsXwpTyH54yDZuR5Xc/4qHiEUmUavRg2uavX HUmrtUobbNsEe1y8t3wlt4x1KXitoTQYzCsdYidKNkWisdfa/XLPUuJXftOlB/oYMwbu tKPQ== MIME-Version: 1.0 X-Received: by 10.52.30.48 with SMTP id p16mr1779773vdh.118.1362030066832; Wed, 27 Feb 2013 21:41:06 -0800 (PST) Received: by 10.220.191.132 with HTTP; Wed, 27 Feb 2013 21:41:06 -0800 (PST) In-Reply-To: References: <201302280022.r1S0M4vm064514@svn.freebsd.org> <20130228022333.GC70215@glenbarber.us> Date: Wed, 27 Feb 2013 21:41:06 -0800 Message-ID: Subject: Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb From: Jack Vogel To: Glen Barber Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Jack F Vogel , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 05:41:14 -0000 LOL, I would see the messages just as I sent this, never mind. Jack On Wed, Feb 27, 2013 at 9:39 PM, Jack Vogel wrote: > Oh, that's odd, then HEAD should be broken too, do you have more detail? > > Jack > > > On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber wrote: > >> Jack, >> >> This commit seems to break the build for at least powerpc and sparc64. >> >> Glen >> >> On Thu, Feb 28, 2013 at 12:22:04AM +0000, Jack F Vogel wrote: >> > Author: jfv >> > Date: Thu Feb 28 00:22:04 2013 >> > New Revision: 247430 >> > URL: http://svnweb.freebsd.org/changeset/base/247430 >> > >> > Log: >> > MFC of the E1000 drivers to STABLE/8, this includes the follow >> revisions >> > plus a few tweaks: >> > 196969,196970,211516,214646,215781,215789,215808,215910,223350, >> > 223482,223831,228281,228393,229939,231796,232238,234665,235256, >> > 236406,238148,238151,238214,238765,238770,238953,238981,239105, >> > 239109,239304,240518,240693,240968,241037,241856,241885,243570, >> > 243857,245334,246128,246482,247064 >> > >> > Added: >> > stable/8/sys/dev/e1000/e1000_i210.c >> > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c >> > stable/8/sys/dev/e1000/e1000_i210.h >> > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h >> > Modified: >> > stable/8/sys/conf/files >> > stable/8/sys/dev/e1000/e1000_82541.c >> > stable/8/sys/dev/e1000/e1000_82543.c >> > stable/8/sys/dev/e1000/e1000_82571.c >> > stable/8/sys/dev/e1000/e1000_82575.c >> > stable/8/sys/dev/e1000/e1000_82575.h >> > stable/8/sys/dev/e1000/e1000_api.c >> > stable/8/sys/dev/e1000/e1000_api.h >> > stable/8/sys/dev/e1000/e1000_defines.h >> > stable/8/sys/dev/e1000/e1000_hw.h >> > stable/8/sys/dev/e1000/e1000_ich8lan.c >> > stable/8/sys/dev/e1000/e1000_ich8lan.h >> > stable/8/sys/dev/e1000/e1000_mac.c >> > stable/8/sys/dev/e1000/e1000_mac.h >> > stable/8/sys/dev/e1000/e1000_manage.c >> > stable/8/sys/dev/e1000/e1000_manage.h >> > stable/8/sys/dev/e1000/e1000_nvm.c >> > stable/8/sys/dev/e1000/e1000_nvm.h >> > stable/8/sys/dev/e1000/e1000_osdep.h >> > stable/8/sys/dev/e1000/e1000_phy.c >> > stable/8/sys/dev/e1000/e1000_phy.h >> > stable/8/sys/dev/e1000/e1000_regs.h >> > stable/8/sys/dev/e1000/if_em.c (contents, props changed) >> > stable/8/sys/dev/e1000/if_igb.c (contents, props changed) >> > stable/8/sys/dev/e1000/if_igb.h >> > stable/8/sys/dev/e1000/if_lem.c >> > stable/8/sys/modules/em/Makefile >> > stable/8/sys/modules/igb/Makefile >> > Directory Properties: >> > stable/8/sys/dev/e1000/ (props changed) >> > >> > Modified: stable/8/sys/conf/files >> > >> ============================================================================== >> > --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013 (r247429) >> > +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013 (r247430) >> > @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i >> > compile-with "${NORMAL_C} -I$S/dev/e1000" >> > dev/e1000/e1000_ich8lan.c optional em | igb \ >> > compile-with "${NORMAL_C} -I$S/dev/e1000" >> > +dev/e1000/e1000_i210.c optional em | igb \ >> > + compile-with "${NORMAL_C} -I$S/dev/e1000" >> > dev/e1000/e1000_api.c optional em | igb \ >> > compile-with "${NORMAL_C} -I$S/dev/e1000" >> > dev/e1000/e1000_mac.c optional em | igb \ >> > >> > Modified: stable/8/sys/dev/e1000/e1000_82541.c >> > >> ============================================================================== >> > --- stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:18:56 2013 >> (r247429) >> > +++ stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:22:04 2013 >> (r247430) >> > @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st >> > * of MAC speed/duplex configuration. So we only need to >> > * configure Collision Distance in the MAC. >> > */ >> > - e1000_config_collision_dist_generic(hw); >> > + mac->ops.config_collision_dist(hw); >> > >> > /* >> > * Configure Flow Control now that Auto-Neg has completed. >> > >> > Modified: stable/8/sys/dev/e1000/e1000_82543.c >> > >> ============================================================================== >> > --- stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:18:56 2013 >> (r247429) >> > +++ stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:22:04 2013 >> (r247430) >> > @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 >> > DEBUGOUT("Valid link established!!!\n"); >> > /* Config the MAC and PHY after link is up */ >> > if (hw->mac.type == e1000_82544) { >> > - e1000_config_collision_dist_generic(hw); >> > + hw->mac.ops.config_collision_dist(hw); >> > } else { >> > ret_val = e1000_config_mac_to_phy_82543(hw); >> > if (ret_val) >> > @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( >> > /* Take the link out of reset */ >> > ctrl &= ~E1000_CTRL_LRST; >> > >> > - e1000_config_collision_dist_generic(hw); >> > + hw->mac.ops.config_collision_dist(hw); >> > >> > ret_val = e1000_commit_fc_settings_generic(hw); >> > if (ret_val) >> > @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 >> > * settings. >> > */ >> > if (mac->type == e1000_82544) >> > - e1000_config_collision_dist_generic(hw); >> > + hw->mac.ops.config_collision_dist(hw); >> > else { >> > ret_val = e1000_config_mac_to_phy_82543(hw); >> > if (ret_val) { >> > @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 >> > if (phy_data & M88E1000_PSSR_DPLX) >> > ctrl |= E1000_CTRL_FD; >> > >> > - e1000_config_collision_dist_generic(hw); >> > + hw->mac.ops.config_collision_dist(hw); >> > >> > /* >> > * Set up speed in the Device Control register depending on >> > >> > Modified: stable/8/sys/dev/e1000/e1000_82571.c >> > >> ============================================================================== >> > --- stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:18:56 2013 >> (r247429) >> > +++ stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:22:04 2013 >> (r247430) >> > @@ -1,6 +1,6 @@ >> > >> /****************************************************************************** >> > >> > - Copyright (c) 2001-2011, Intel Corporation >> > + Copyright (c) 2001-2013, Intel Corporation >> > All rights reserved. >> > >> > Redistribution and use in source and binary forms, with or without >> > @@ -32,8 +32,7 @@ >> > >> ******************************************************************************/ >> > /*$FreeBSD$*/ >> > >> > -/* >> > - * 82571EB Gigabit Ethernet Controller >> > +/* 82571EB Gigabit Ethernet Controller >> > * 82571EB Gigabit Ethernet Controller (Copper) >> > * 82571EB Gigabit Ethernet Controller (Fiber) >> > * 82571EB Dual Port Gigabit Mezzanine Adapter >> > @@ -51,9 +50,6 @@ >> > >> > #include "e1000_api.h" >> > >> > -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); >> > -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); >> > -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); >> > static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); >> > static void e1000_release_nvm_82571(struct e1000_hw *hw); >> > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, >> > @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 >> > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); >> > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); >> > static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); >> > -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); >> > static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); >> > static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); >> > static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); >> > @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ >> > static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) >> > { >> > struct e1000_phy_info *phy = &hw->phy; >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > >> > DEBUGFUNC("e1000_init_phy_params_82571"); >> > >> > if (hw->phy.media_type != e1000_media_type_copper) { >> > phy->type = e1000_phy_none; >> > - goto out; >> > + return E1000_SUCCESS; >> > } >> > >> > phy->addr = 1; >> > @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s >> > phy->ops.set_d3_lplu_state = >> e1000_set_d3_lplu_state_82574; >> > break; >> > default: >> > - ret_val = -E1000_ERR_PHY; >> > - goto out; >> > + return -E1000_ERR_PHY; >> > break; >> > } >> > >> > @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s >> > ret_val = e1000_get_phy_id_82571(hw); >> > if (ret_val) { >> > DEBUGOUT("Error getting PHY ID\n"); >> > - goto out; >> > + return ret_val; >> > } >> > >> > /* Verify phy id */ >> > @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s >> > if (ret_val) >> > DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); >> > >> > -out: >> > return ret_val; >> > } >> > >> > @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s >> > if (((eecd >> 15) & 0x3) == 0x3) { >> > nvm->type = e1000_nvm_flash_hw; >> > nvm->word_size = 2048; >> > - /* >> > - * Autonomous Flash update bit must be cleared due >> > + /* Autonomous Flash update bit must be cleared due >> > * to Flash update issue. >> > */ >> > eecd &= ~E1000_EECD_AUPDEN; >> > @@ -254,8 +246,7 @@ static s32 e1000_init_nvm_params_82571(s >> > nvm->type = e1000_nvm_eeprom_spi; >> > size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> >> > E1000_EECD_SIZE_EX_SHIFT); >> > - /* >> > - * Added to a constant, "size" becomes the left-shift >> value >> > + /* Added to a constant, "size" becomes the left-shift >> value >> > * for setting word_size. >> > */ >> > size += NVM_WORD_SIZE_BASE_SHIFT; >> > @@ -382,12 +373,11 @@ static s32 e1000_init_mac_params_82571(s >> > >> > /* FWSM register */ >> > mac->has_fwsm = TRUE; >> > - /* >> > - * ARC supported; valid only if manageability features are >> > + /* ARC supported; valid only if manageability features are >> > * enabled. >> > */ >> > - mac->arc_subsystem_valid = (E1000_READ_REG(hw, >> E1000_FWSM) & >> > - E1000_FWSM_MODE_MASK) ? TRUE : >> FALSE; >> > + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, >> E1000_FWSM) & >> > + E1000_FWSM_MODE_MASK); >> > break; >> > case e1000_82574: >> > case e1000_82583: >> > @@ -405,8 +395,7 @@ static s32 e1000_init_mac_params_82571(s >> > break; >> > } >> > >> > - /* >> > - * Ensure that the inter-port SWSM.SMBI lock bit is clear before >> > + /* Ensure that the inter-port SWSM.SMBI lock bit is clear before >> > * first NVM or PHY acess. This should be done for single-port >> > * devices, and for one port only on dual-port devices so that >> > * for those devices we can still use the SMBI lock to synchronize >> > @@ -422,8 +411,9 @@ static s32 e1000_init_mac_params_82571(s >> > E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 | >> > E1000_SWSM2_LOCK); >> > force_clear_smbi = TRUE; >> > - } else >> > + } else { >> > force_clear_smbi = FALSE; >> > + } >> > break; >> > default: >> > force_clear_smbi = TRUE; >> > @@ -443,10 +433,7 @@ static s32 e1000_init_mac_params_82571(s >> > E1000_WRITE_REG(hw, E1000_SWSM, swsm & ~E1000_SWSM_SMBI); >> > } >> > >> > - /* >> > - * Initialze device specific counter of SMBI acquisition >> > - * timeouts. >> > - */ >> > + /* Initialze device specific counter of SMBI acquisition >> timeouts. */ >> > hw->dev_spec._82571.smb_counter = 0; >> > >> > return E1000_SUCCESS; >> > @@ -477,7 +464,7 @@ void e1000_init_function_pointers_82571( >> > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) >> > { >> > struct e1000_phy_info *phy = &hw->phy; >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > u16 phy_id = 0; >> > >> > DEBUGFUNC("e1000_get_phy_id_82571"); >> > @@ -485,8 +472,7 @@ static s32 e1000_get_phy_id_82571(struct >> > switch (hw->mac.type) { >> > case e1000_82571: >> > case e1000_82572: >> > - /* >> > - * The 82571 firmware may still be configuring the PHY. >> > + /* The 82571 firmware may still be configuring the PHY. >> > * In this case, we cannot access the PHY until the >> > * configuration is done. So we explicitly set the >> > * PHY ID. >> > @@ -494,29 +480,29 @@ static s32 e1000_get_phy_id_82571(struct >> > phy->id = IGP01E1000_I_PHY_ID; >> > break; >> > case e1000_82573: >> > - ret_val = e1000_get_phy_id(hw); >> > + return e1000_get_phy_id(hw); >> > break; >> > case e1000_82574: >> > case e1000_82583: >> > ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > phy->id = (u32)(phy_id << 16); >> > usec_delay(20); >> > ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > phy->id |= (u32)(phy_id); >> > phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); >> > break; >> > default: >> > - ret_val = -E1000_ERR_PHY; >> > + return -E1000_ERR_PHY; >> > break; >> > } >> > -out: >> > - return ret_val; >> > + >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -528,15 +514,13 @@ out: >> > static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) >> > { >> > u32 swsm; >> > - s32 ret_val = E1000_SUCCESS; >> > s32 sw_timeout = hw->nvm.word_size + 1; >> > s32 fw_timeout = hw->nvm.word_size + 1; >> > s32 i = 0; >> > >> > DEBUGFUNC("e1000_get_hw_semaphore_82571"); >> > >> > - /* >> > - * If we have timedout 3 times on trying to acquire >> > + /* If we have timedout 3 times on trying to acquire >> > * the inter-port SMBI semaphore, there is old code >> > * operating on the other port, and it is not >> > * releasing SMBI. Modify the number of times that >> > @@ -576,12 +560,10 @@ static s32 e1000_get_hw_semaphore_82571( >> > /* Release semaphores */ >> > e1000_put_hw_semaphore_82571(hw); >> > DEBUGOUT("Driver can't access the NVM\n"); >> > - ret_val = -E1000_ERR_NVM; >> > - goto out; >> > + return -E1000_ERR_NVM; >> > } >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -613,22 +595,19 @@ static void e1000_put_hw_semaphore_82571 >> > static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) >> > { >> > u32 extcnf_ctrl; >> > - s32 ret_val = E1000_SUCCESS; >> > s32 i = 0; >> > >> > DEBUGFUNC("e1000_get_hw_semaphore_82573"); >> > >> > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); >> > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >> > do { >> > + extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >> > E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl); >> > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); >> > >> > if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP) >> > break; >> > >> > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >> > - >> > msec_delay(2); >> > i++; >> > } while (i < MDIO_OWNERSHIP_TIMEOUT); >> > @@ -637,12 +616,10 @@ static s32 e1000_get_hw_semaphore_82573( >> > /* Release semaphores */ >> > e1000_put_hw_semaphore_82573(hw); >> > DEBUGOUT("Driver can't access the PHY\n"); >> > - ret_val = -E1000_ERR_PHY; >> > - goto out; >> > + return -E1000_ERR_PHY; >> > } >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -712,7 +689,7 @@ static void e1000_put_hw_semaphore_82574 >> > **/ >> > static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool >> active) >> > { >> > - u16 data = E1000_READ_REG(hw, E1000_POEMB); >> > + u32 data = E1000_READ_REG(hw, E1000_POEMB); >> > >> > DEBUGFUNC("e1000_set_d0_lplu_state_82574"); >> > >> > @@ -738,7 +715,7 @@ static s32 e1000_set_d0_lplu_state_82574 >> > **/ >> > static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool >> active) >> > { >> > - u16 data = E1000_READ_REG(hw, E1000_POEMB); >> > + u32 data = E1000_READ_REG(hw, E1000_POEMB); >> > >> > DEBUGFUNC("e1000_set_d3_lplu_state_82574"); >> > >> > @@ -771,7 +748,7 @@ static s32 e1000_acquire_nvm_82571(struc >> > >> > ret_val = e1000_get_hw_semaphore_82571(hw); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > switch (hw->mac.type) { >> > case e1000_82573: >> > @@ -784,7 +761,6 @@ static s32 e1000_acquire_nvm_82571(struc >> > if (ret_val) >> > e1000_put_hw_semaphore_82571(hw); >> > >> > -out: >> > return ret_val; >> > } >> > >> > @@ -817,7 +793,7 @@ static void e1000_release_nvm_82571(stru >> > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 >> words, >> > u16 *data) >> > { >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > >> > DEBUGFUNC("e1000_write_nvm_82571"); >> > >> > @@ -857,31 +833,27 @@ static s32 e1000_update_nvm_checksum_825 >> > >> > ret_val = e1000_update_nvm_checksum_generic(hw); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > - /* >> > - * If our nvm is an EEPROM, then we're done >> > + /* If our nvm is an EEPROM, then we're done >> > * otherwise, commit the checksum to the flash NVM. >> > */ >> > if (hw->nvm.type != e1000_nvm_flash_hw) >> > - goto out; >> > + return E1000_SUCCESS; >> > >> > /* Check for pending operations. */ >> > for (i = 0; i < E1000_FLASH_UPDATES; i++) { >> > msec_delay(1); >> > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) >> == 0) >> > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) >> > break; >> > } >> > >> > - if (i == E1000_FLASH_UPDATES) { >> > - ret_val = -E1000_ERR_NVM; >> > - goto out; >> > - } >> > + if (i == E1000_FLASH_UPDATES) >> > + return -E1000_ERR_NVM; >> > >> > /* Reset the firmware if using STM opcode. */ >> > if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) == >> E1000_STM_OPCODE) { >> > - /* >> > - * The enabling of and the actual reset must be done >> > + /* The enabling of and the actual reset must be done >> > * in two write cycles. >> > */ >> > E1000_WRITE_REG(hw, E1000_HICR, >> E1000_HICR_FW_RESET_ENABLE); >> > @@ -895,17 +867,14 @@ static s32 e1000_update_nvm_checksum_825 >> > >> > for (i = 0; i < E1000_FLASH_UPDATES; i++) { >> > msec_delay(1); >> > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) >> == 0) >> > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) >> > break; >> > } >> > >> > - if (i == E1000_FLASH_UPDATES) { >> > - ret_val = -E1000_ERR_NVM; >> > - goto out; >> > - } >> > + if (i == E1000_FLASH_UPDATES) >> > + return -E1000_ERR_NVM; >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -944,19 +913,17 @@ static s32 e1000_write_nvm_eewr_82571(st >> > { >> > struct e1000_nvm_info *nvm = &hw->nvm; >> > u32 i, eewr = 0; >> > - s32 ret_val = 0; >> > + s32 ret_val = E1000_SUCCESS; >> > >> > DEBUGFUNC("e1000_write_nvm_eewr_82571"); >> > >> > - /* >> > - * A check for invalid values: offset too large, too many words, >> > + /* A check for invalid values: offset too large, too many words, >> > * and not enough words. >> > */ >> > if ((offset >= nvm->word_size) || (words > (nvm->word_size - >> offset)) || >> > (words == 0)) { >> > DEBUGOUT("nvm parameter(s) out of bounds\n"); >> > - ret_val = -E1000_ERR_NVM; >> > - goto out; >> > + return -E1000_ERR_NVM; >> > } >> > >> > for (i = 0; i < words; i++) { >> > @@ -975,7 +942,6 @@ static s32 e1000_write_nvm_eewr_82571(st >> > break; >> > } >> > >> > -out: >> > return ret_val; >> > } >> > >> > @@ -988,7 +954,6 @@ out: >> > static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) >> > { >> > s32 timeout = PHY_CFG_TIMEOUT; >> > - s32 ret_val = E1000_SUCCESS; >> > >> > DEBUGFUNC("e1000_get_cfg_done_82571"); >> > >> > @@ -1001,12 +966,10 @@ static s32 e1000_get_cfg_done_82571(stru >> > } >> > if (!timeout) { >> > DEBUGOUT("MNG configuration cycle has not completed.\n"); >> > - ret_val = -E1000_ERR_RESET; >> > - goto out; >> > + return -E1000_ERR_RESET; >> > } >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -1023,39 +986,40 @@ out: >> > static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool >> active) >> > { >> > struct e1000_phy_info *phy = &hw->phy; >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > u16 data; >> > >> > DEBUGFUNC("e1000_set_d0_lplu_state_82571"); >> > >> > if (!(phy->ops.read_reg)) >> > - goto out; >> > + return E1000_SUCCESS; >> > >> > ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > if (active) { >> > data |= IGP02E1000_PM_D0_LPLU; >> > ret_val = phy->ops.write_reg(hw, >> IGP02E1000_PHY_POWER_MGMT, >> > data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > /* When LPLU is enabled, we should disable SmartSpeed */ >> > ret_val = phy->ops.read_reg(hw, >> IGP01E1000_PHY_PORT_CONFIG, >> > &data); >> > + if (ret_val) >> > + return ret_val; >> > data &= ~IGP01E1000_PSCFR_SMART_SPEED; >> > ret_val = phy->ops.write_reg(hw, >> IGP01E1000_PHY_PORT_CONFIG, >> > data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > } else { >> > data &= ~IGP02E1000_PM_D0_LPLU; >> > ret_val = phy->ops.write_reg(hw, >> IGP02E1000_PHY_POWER_MGMT, >> > data); >> > - /* >> > - * LPLU and SmartSpeed are mutually exclusive. LPLU is >> used >> > + /* LPLU and SmartSpeed are mutually exclusive. LPLU is >> used >> > * during Dx states where the power conservation is most >> > * important. During driver activity we should enable >> > * SmartSpeed, so performance is maintained. >> > @@ -1065,32 +1029,31 @@ static s32 e1000_set_d0_lplu_state_82571 >> > >> IGP01E1000_PHY_PORT_CONFIG, >> > &data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > data |= IGP01E1000_PSCFR_SMART_SPEED; >> > ret_val = phy->ops.write_reg(hw, >> > >> IGP01E1000_PHY_PORT_CONFIG, >> > data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > } else if (phy->smart_speed == e1000_smart_speed_off) { >> > ret_val = phy->ops.read_reg(hw, >> > >> IGP01E1000_PHY_PORT_CONFIG, >> > &data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > data &= ~IGP01E1000_PSCFR_SMART_SPEED; >> > ret_val = phy->ops.write_reg(hw, >> > >> IGP01E1000_PHY_PORT_CONFIG, >> > data); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > } >> > } >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -1101,13 +1064,12 @@ out: >> > **/ >> > static s32 e1000_reset_hw_82571(struct e1000_hw *hw) >> > { >> > - u32 ctrl, ctrl_ext; >> > + u32 ctrl, ctrl_ext, eecd, tctl; >> > s32 ret_val; >> > >> > DEBUGFUNC("e1000_reset_hw_82571"); >> > >> > - /* >> > - * Prevent the PCI-E bus from sticking if there is no TLP >> connection >> > + /* Prevent the PCI-E bus from sticking if there is no TLP >> connection >> > * on the last TLP read/write transaction when MAC is reset. >> > */ >> > ret_val = e1000_disable_pcie_master_generic(hw); >> > @@ -1118,13 +1080,14 @@ static s32 e1000_reset_hw_82571(struct e >> > E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); >> > >> > E1000_WRITE_REG(hw, E1000_RCTL, 0); >> > - E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); >> > + tctl = E1000_READ_REG(hw, E1000_TCTL); >> > + tctl &= ~E1000_TCTL_EN; >> > + E1000_WRITE_REG(hw, E1000_TCTL, tctl); >> > E1000_WRITE_FLUSH(hw); >> > >> > msec_delay(10); >> > >> > - /* >> > - * Must acquire the MDIO ownership before MAC reset. >> > + /* Must acquire the MDIO ownership before MAC reset. >> > * Ownership defaults to firmware after a reset. >> > */ >> > switch (hw->mac.type) { >> > @@ -1167,15 +1130,23 @@ static s32 e1000_reset_hw_82571(struct e >> > ret_val = e1000_get_auto_rd_done_generic(hw); >> > if (ret_val) >> > /* We don't want to continue accessing MAC registers. */ >> > - goto out; >> > + return ret_val; >> > >> > - /* >> > - * Phy configuration from NVM just starts after EECD_AUTO_RD is >> set. >> > + /* Phy configuration from NVM just starts after EECD_AUTO_RD is >> set. >> > * Need to wait for Phy configuration completion before accessing >> > * NVM and Phy. >> > */ >> > >> > switch (hw->mac.type) { >> > + case e1000_82571: >> > + case e1000_82572: >> > + /* REQ and GNT bits need to be cleared when using AUTO_RD >> > + * to access the EEPROM. >> > + */ >> > + eecd = E1000_READ_REG(hw, E1000_EECD); >> > + eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT); >> > + E1000_WRITE_REG(hw, E1000_EECD, eecd); >> > + break; >> > case e1000_82573: >> > case e1000_82574: >> > case e1000_82583: >> > @@ -1193,7 +1164,7 @@ static s32 e1000_reset_hw_82571(struct e >> > /* Install any alternate MAC address into RAR0 */ >> > ret_val = e1000_check_alt_mac_addr_generic(hw); >> > if (ret_val) >> > - goto out; >> > + return ret_val; >> > >> > e1000_set_laa_state_82571(hw, TRUE); >> > } >> > @@ -1202,8 +1173,7 @@ static s32 e1000_reset_hw_82571(struct e >> > if (hw->phy.media_type == e1000_media_type_internal_serdes) >> > hw->mac.serdes_link_state = e1000_serdes_link_down; >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -1225,16 +1195,15 @@ static s32 e1000_init_hw_82571(struct e1 >> > >> > /* Initialize identification LED */ >> > ret_val = mac->ops.id_led_init(hw); >> > + /* An error is not fatal and we should not stop init due to this >> */ >> > if (ret_val) >> > DEBUGOUT("Error initializing identification LED\n"); >> > - /* This is not fatal and we should not stop init due to >> this */ >> > >> > /* Disabling VLAN filtering */ >> > DEBUGOUT("Initializing the IEEE VLAN\n"); >> > mac->ops.clear_vfta(hw); >> > >> > - /* Setup the receive address. */ >> > - /* >> > + /* Setup the receive address. >> > * If, however, a locally administered address was assigned to the >> > * 82571, we must reserve a RAR for it to work around an issue >> where >> > * resetting one port will reload the MAC on the other port. >> > @@ -1277,8 +1246,7 @@ static s32 e1000_init_hw_82571(struct e1 >> > break; >> > } >> > >> > - /* >> > - * Clear all of the statistics registers (clear on read). It is >> > + /* Clear all of the statistics registers (clear on read). It is >> > * important that we do this after we have tried to establish link >> > * because the symbol error count will increment wildly if there >> > * is no link. >> > @@ -1377,8 +1345,7 @@ static void e1000_initialize_hw_bits_825 >> > E1000_WRITE_REG(hw, E1000_PBA_ECC, reg); >> > } >> > >> > - /* >> > - * Workaround for hardware errata. >> > + /* Workaround for hardware errata. >> > * Ensure that DMA Dynamic Clock gating is disabled on 82571 and >> 82572 >> > */ >> > if ((hw->mac.type == e1000_82571) || >> > @@ -1388,6 +1355,15 @@ static void e1000_initialize_hw_bits_825 >> > E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); >> > } >> > >> > + /* Disable IPv6 extension header parsing because some malformed >> > + * IPv6 headers can hang the Rx. >> > + */ >> > + if (hw->mac.type <= e1000_82573) { >> > + reg = E1000_READ_REG(hw, E1000_RFCTL); >> > + reg |= (E1000_RFCTL_IPV6_EX_DIS | >> E1000_RFCTL_NEW_IPV6_EXT_DIS); >> > + E1000_WRITE_REG(hw, E1000_RFCTL, reg); >> > + } >> > + >> > /* PCI-Ex Control Registers */ >> > switch (hw->mac.type) { >> > case e1000_82574: >> > @@ -1396,8 +1372,7 @@ static void e1000_initialize_hw_bits_825 >> > reg |= (1 << 22); >> > E1000_WRITE_REG(hw, E1000_GCR, reg); >> > >> > - /* >> > - * Workaround for hardware errata. >> > + /* Workaround for hardware errata. >> > * apply workaround for hardware errata documented in >> errata >> > * docs Fixes issue where some error prone or unreliable >> PCIe >> > * completions are occurring, particularly with ASPM >> enabled. >> > @@ -1435,25 +1410,25 @@ static void e1000_clear_vfta_82571(struc >> > case e1000_82574: >> > case e1000_82583: >> > if (hw->mng_cookie.vlan_id != 0) { >> > - /* >> > - * The VFTA is a 4096b bit-field, each identifying >> > + /* The VFTA is a 4096b bit-field, each identifying >> > * a single VLAN ID. The following operations >> > * determine which 32b entry (i.e. offset) into >> the >> > * array we want to set the VLAN ID (i.e. bit) of >> > * the manageability unit. >> > */ >> > vfta_offset = (hw->mng_cookie.vlan_id >> >> > - E1000_VFTA_ENTRY_SHIFT) & >> E1000_VFTA_ENTRY_MASK; >> > - vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id & >> > - E1000_VFTA_ENTRY_BIT_SHIFT_MASK); >> > + E1000_VFTA_ENTRY_SHIFT) & >> > + E1000_VFTA_ENTRY_MASK; >> > + vfta_bit_in_reg = >> > + 1 << (hw->mng_cookie.vlan_id & >> > + E1000_VFTA_ENTRY_BIT_SHIFT_MASK); >> > } >> > break; >> > default: >> > break; >> > } >> > for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) { >> > - /* >> > - * If the offset we want to clear is the same offset of >> the >> > + /* If the offset we want to clear is the same offset of >> the >> > * manageability VLAN ID, then clear all bits except that >> of >> > * the manageability unit. >> > */ >> > @@ -1495,8 +1470,7 @@ static s32 e1000_led_on_82574(struct e10 >> > >> > ctrl = hw->mac.ledctl_mode2; >> > if (!(E1000_STATUS_LU & E1000_READ_REG(hw, E1000_STATUS))) { >> > - /* >> > - * If no link, then turn LED on by setting the invert bit >> > + /* If no link, then turn LED on by setting the invert bit >> > * for each LED that's "on" (0x0E) in ledctl_mode2. >> > */ >> > for (i = 0; i < 4; i++) >> > @@ -1519,30 +1493,28 @@ bool e1000_check_phy_82574(struct e1000_ >> > { >> > u16 status_1kbt = 0; >> > u16 receive_errors = 0; >> > - bool phy_hung = FALSE; >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > >> > DEBUGFUNC("e1000_check_phy_82574"); >> > >> > - /* >> > - * Read PHY Receive Error counter first, if its is max - all F's >> then >> > + /* Read PHY Receive Error counter first, if its is max - all F's >> then >> > * read the Base1000T status register If both are max then PHY is >> hung. >> > */ >> > ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER, >> > &receive_errors); >> > if (ret_val) >> > - goto out; >> > + return FALSE; >> > if (receive_errors == E1000_RECEIVE_ERROR_MAX) { >> > ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS, >> > &status_1kbt); >> > if (ret_val) >> > - goto out; >> > + return FALSE; >> > if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) == >> > E1000_IDLE_ERROR_COUNT_MASK) >> > - phy_hung = TRUE; >> > + return TRUE; >> > } >> > -out: >> > - return phy_hung; >> > + >> > + return FALSE; >> > } >> > >> > >> > @@ -1560,8 +1532,7 @@ static s32 e1000_setup_link_82571(struct >> > { >> > DEBUGFUNC("e1000_setup_link_82571"); >> > >> > - /* >> > - * 82573 does not have a word in the NVM to determine >> > + /* 82573 does not have a word in the NVM to determine >> > * the default flow control setting, so we explicitly >> > * set it to full. >> > */ >> > @@ -1608,17 +1579,14 @@ static s32 e1000_setup_copper_link_82571 >> > ret_val = e1000_copper_link_setup_igp(hw); >> > break; >> > default: >> > - ret_val = -E1000_ERR_PHY; >> > + return -E1000_ERR_PHY; >> > break; >> > } >> > >> > if (ret_val) >> > - goto out; >> > - >> > - ret_val = e1000_setup_copper_link_generic(hw); >> > + return ret_val; >> > >> > -out: >> > - return ret_val; >> > + return e1000_setup_copper_link_generic(hw); >> > } >> > >> > /** >> > @@ -1635,8 +1603,7 @@ static s32 e1000_setup_fiber_serdes_link >> > switch (hw->mac.type) { >> > case e1000_82571: >> > case e1000_82572: >> > - /* >> > - * If SerDes loopback mode is entered, there is no form >> > + /* If SerDes loopback mode is entered, there is no form >> > * of reset to take the adapter out of that mode. So we >> > * have to explicitly take the adapter out of loopback >> > * mode. This prevents drivers from twiddling their >> thumbs >> > @@ -1685,16 +1652,17 @@ static s32 e1000_check_for_serdes_link_8 >> > >> > ctrl = E1000_READ_REG(hw, E1000_CTRL); >> > status = E1000_READ_REG(hw, E1000_STATUS); >> > + E1000_READ_REG(hw, E1000_RXCW); >> > + /* SYNCH bit and IV bit are sticky */ >> > + usec_delay(10); >> > rxcw = E1000_READ_REG(hw, E1000_RXCW); >> > >> > if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { >> > - >> > /* Receiver is synchronized with no invalid bits. */ >> > switch (mac->serdes_link_state) { >> > case e1000_serdes_link_autoneg_complete: >> > if (!(status & E1000_STATUS_LU)) { >> > - /* >> > - * We have lost link, retry autoneg before >> > + /* We have lost link, retry autoneg before >> > * reporting link failure >> > */ >> > mac->serdes_link_state = >> > @@ -1707,15 +1675,12 @@ static s32 e1000_check_for_serdes_link_8 >> > break; >> > >> > case e1000_serdes_link_forced_up: >> > - /* >> > - * If we are receiving /C/ ordered sets, re-enable >> > + /* If we are receiving /C/ ordered sets, re-enable >> > * auto-negotiation in the TXCW register and >> disable >> > * forced link in the Device Control register in >> an >> > * attempt to auto-negotiate with our link >> partner. >> > - * If the partner code word is null, stop forcing >> > - * and restart auto negotiation. >> > */ >> > - if ((rxcw & E1000_RXCW_C) || !(rxcw & >> E1000_RXCW_CW)) { >> > + if (rxcw & E1000_RXCW_C) { >> > /* Enable autoneg, and unforce link up */ >> > E1000_WRITE_REG(hw, E1000_TXCW, >> mac->txcw); >> > E1000_WRITE_REG(hw, E1000_CTRL, >> > @@ -1731,8 +1696,7 @@ static s32 e1000_check_for_serdes_link_8 >> > >> > case e1000_serdes_link_autoneg_progress: >> > if (rxcw & E1000_RXCW_C) { >> > - /* >> > - * We received /C/ ordered sets, meaning >> the >> > + /* We received /C/ ordered sets, meaning >> the >> > * link partner has autonegotiated, and >> we can >> > * trust the Link Up (LU) status bit. >> > */ >> > @@ -1748,8 +1712,7 @@ static s32 e1000_check_for_serdes_link_8 >> > DEBUGOUT("AN_PROG -> DOWN\n"); >> > } >> > } else { >> > - /* >> > - * The link partner did not autoneg. >> > + /* The link partner did not autoneg. >> > * Force link up and full duplex, and >> change >> > * state to forced. >> > */ >> > @@ -1774,8 +1737,7 @@ static s32 e1000_check_for_serdes_link_8 >> > >> > case e1000_serdes_link_down: >> > default: >> > - /* >> > - * The link was down but the receiver has now >> gained >> > + /* The link was down but the receiver has now >> gained >> > * valid sync, so lets see if we can bring the >> link >> > * up. >> > */ >> > @@ -1794,17 +1756,18 @@ static s32 e1000_check_for_serdes_link_8 >> > mac->serdes_link_state = e1000_serdes_link_down; >> > DEBUGOUT("ANYSTATE -> DOWN\n"); >> > } else { >> > - /* >> > - * Check several times, if Sync and Config >> > - * both are consistently 1 then simply ignore >> > - * the Invalid bit and restart Autoneg >> > + /* Check several times, if SYNCH bit and CONFIG >> > + * bit both are consistently 1 then simply ignore >> > + * the IV bit and restart Autoneg >> > */ >> > for (i = 0; i < AN_RETRY_COUNT; i++) { >> > usec_delay(10); >> > rxcw = E1000_READ_REG(hw, E1000_RXCW); >> > - if ((rxcw & E1000_RXCW_IV) && >> > - !((rxcw & E1000_RXCW_SYNCH) && >> > - (rxcw & E1000_RXCW_C))) { >> > + if ((rxcw & E1000_RXCW_SYNCH) && >> > + (rxcw & E1000_RXCW_C)) >> > + continue; >> > + >> > + if (rxcw & E1000_RXCW_IV) { >> > mac->serdes_has_link = FALSE; >> > mac->serdes_link_state = >> > >> e1000_serdes_link_down; >> > @@ -1845,7 +1808,7 @@ static s32 e1000_valid_led_default_82571 >> > ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); >> > if (ret_val) { >> > DEBUGOUT("NVM Read Error\n"); >> > - goto out; >> > + return ret_val; >> > } >> > >> > switch (hw->mac.type) { >> > @@ -1862,8 +1825,7 @@ static s32 e1000_valid_led_default_82571 >> > break; >> > } >> > >> > -out: >> > - return ret_val; >> > + return E1000_SUCCESS; >> > } >> > >> > /** >> > @@ -1900,15 +1862,14 @@ void e1000_set_laa_state_82571(struct e1 >> > >> > /* If workaround is activated... */ >> > if (state) >> > - /* >> > - * Hold a copy of the LAA in RAR[14] This is done so that >> > + /* Hold a copy of the LAA in RAR[14] This is done so that >> > * between the time RAR[0] gets clobbered and the time it >> > * gets fixed, the actual LAA is in one of the RARs and no >> > * incoming packets directed to this port are dropped. >> > * Eventually the LAA will be in RAR[0] and RAR[14]. >> > */ >> > - e1000_rar_set_generic(hw, hw->mac.addr, >> > - hw->mac.rar_entry_count - 1); >> > + hw->mac.ops.rar_set(hw, hw->mac.addr, >> > + hw->mac.rar_entry_count - 1); >> > return; >> > } >> > >> > @@ -1925,25 +1886,23 @@ void e1000_set_laa_state_82571(struct e1 >> > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) >> > { >> > struct e1000_nvm_info *nvm = &hw->nvm; >> > - s32 ret_val = E1000_SUCCESS; >> > + s32 ret_val; >> > u16 data; >> > >> > DEBUGFUNC("e1000_fix_nvm_checksum_82571"); >> > >> > if (nvm->type != e1000_nvm_flash_hw) >> > - goto out; >> > + return E1000_SUCCESS; >> > >> > - /* >> > - * Check bit 4 of word 10h. If it is 0, firmware is done updating >> > + /* Check bit 4 of word 10h. If it is 0, firmware is done updating >> > * 10h-12h. Checksum may need to be fixed. >> > */ >> > >> > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> > _______________________________________________ >> > svn-src-stable-8@freebsd.org mailing list >> > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8 >> > To unsubscribe, send any mail to " >> svn-src-stable-8-unsubscribe@freebsd.org" >> > > From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 05:47:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B9075E4A; Thu, 28 Feb 2013 05:47:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95EBAC47; Thu, 28 Feb 2013 05:47:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S5ls9T064455; Thu, 28 Feb 2013 05:47:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S5loBf064426; Thu, 28 Feb 2013 05:47:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302280547.r1S5loBf064426@svn.freebsd.org> From: Xin LI Date: Thu, 28 Feb 2013 05:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247448 - stable/8/contrib/bzip2 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 05:47:54 -0000 Author: delphij Date: Thu Feb 28 05:47:50 2013 New Revision: 247448 URL: http://svnweb.freebsd.org/changeset/base/247448 Log: MFC r215041 (obrien): Upgrade to bzip2 version 1.0.6. Modified: stable/8/contrib/bzip2/CHANGES stable/8/contrib/bzip2/LICENSE stable/8/contrib/bzip2/Makefile stable/8/contrib/bzip2/Makefile-libbz2_so stable/8/contrib/bzip2/README stable/8/contrib/bzip2/README.COMPILATION.PROBLEMS stable/8/contrib/bzip2/blocksort.c stable/8/contrib/bzip2/bzip2.1 stable/8/contrib/bzip2/bzip2.c stable/8/contrib/bzip2/bzip2recover.c stable/8/contrib/bzip2/bzlib.c stable/8/contrib/bzip2/bzlib.h stable/8/contrib/bzip2/bzlib_private.h stable/8/contrib/bzip2/compress.c stable/8/contrib/bzip2/crctable.c stable/8/contrib/bzip2/decompress.c stable/8/contrib/bzip2/huffman.c stable/8/contrib/bzip2/randtable.c stable/8/contrib/bzip2/spewG.c stable/8/contrib/bzip2/unzcrash.c Directory Properties: stable/8/contrib/bzip2/ (props changed) Modified: stable/8/contrib/bzip2/CHANGES ============================================================================== --- stable/8/contrib/bzip2/CHANGES Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/CHANGES Thu Feb 28 05:47:50 2013 (r247448) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -317,3 +317,11 @@ Fixes some minor bugs since the last ver ~~~~~~~~~~~~~~~~~ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 Modified: stable/8/contrib/bzip2/LICENSE ============================================================================== --- stable/8/contrib/bzip2/LICENSE Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/LICENSE Thu Feb 28 05:47:50 2013 (r247448) @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2007 Julian R Seward. All +documentation, are copyright (C) 1996-2010 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37,6 +37,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.5 of 10 December 2007 +bzip2/libbzip2 version 1.0.6 of 6 September 2010 -------------------------------------------------------------------------- Modified: stable/8/contrib/bzip2/Makefile ============================================================================== --- stable/8/contrib/bzip2/Makefile Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/Makefile Thu Feb 28 05:47:50 2013 (r247448) @@ -2,8 +2,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c distclean: clean rm -f manual.ps manual.html manual.pdf -DISTNAME=bzip2-1.0.5 +DISTNAME=bzip2-1.0.6 dist: check manual rm -f $(DISTNAME) ln -s -f . $(DISTNAME) Modified: stable/8/contrib/bzip2/Makefile-libbz2_so ============================================================================== --- stable/8/contrib/bzip2/Makefile-libbz2_so Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/Makefile-libbz2_so Thu Feb 28 05:47:50 2013 (r247448) @@ -1,6 +1,6 @@ # This Makefile builds a shared version of the library, -# libbz2.so.1.0.4, with soname libbz2.so.1.0, +# libbz2.so.1.0.6, with soname libbz2.so.1.0, # at least on x86-Linux (RedHat 7.2), # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). # Please see the README file for some important info @@ -10,8 +10,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -35,13 +35,13 @@ OBJS= blocksort.o \ bzlib.o all: $(OBJS) - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS) - $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4 + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 rm -f libbz2.so.1.0 - ln -s libbz2.so.1.0.4 libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 clean: - rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared blocksort.o: blocksort.c $(CC) $(CFLAGS) -c blocksort.c Modified: stable/8/contrib/bzip2/README ============================================================================== --- stable/8/contrib/bzip2/README Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/README Thu Feb 28 05:47:50 2013 (r247448) @@ -6,8 +6,8 @@ This version is fully compatible with th This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -181,6 +181,10 @@ WHAT'S NEW IN 1.0.5 ? See the CHANGES file. +WHAT'S NEW IN 1.0.6 ? + + See the CHANGES file. + I hope you find bzip2 useful. Feel free to contact me at jseward@bzip.org @@ -208,3 +212,4 @@ Cambridge, UK. 15 February 2005 (bzip2, version 1.0.3) 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) Modified: stable/8/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- stable/8/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Feb 28 05:47:50 2013 (r247448) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.5 should compile without problems on the vast majority of +bzip2-1.0.6 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file Modified: stable/8/contrib/bzip2/blocksort.c ============================================================================== --- stable/8/contrib/bzip2/blocksort.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/blocksort.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/bzip2.1 ============================================================================== --- stable/8/contrib/bzip2/bzip2.1 Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzip2.1 Thu Feb 28 05:47:50 2013 (r247448) @@ -1,7 +1,7 @@ .PU .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 .br bzcat \- decompresses files to stdout .br @@ -405,11 +405,11 @@ I/O error messages are not as helpful as tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.4 of +This manual page pertains to version 1.0.6 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions -0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, but with the following +0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. Modified: stable/8/contrib/bzip2/bzip2.c ============================================================================== --- stable/8/contrib/bzip2/bzip2.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzip2.c Thu Feb 28 05:47:50 2013 (r247448) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -1605,11 +1605,11 @@ void license ( void ) "bzip2, a block-sorting file compressor. " "Version %s.\n" " \n" - " Copyright (C) 1996-2007 by Julian Seward.\n" + " Copyright (C) 1996-2010 by Julian Seward.\n" " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.5 source distribution.\n" + " in the bzip2-1.0.6 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" Modified: stable/8/contrib/bzip2/bzip2recover.c ============================================================================== --- stable/8/contrib/bzip2/bzip2recover.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzip2recover.c Thu Feb 28 05:47:50 2013 (r247448) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -313,7 +313,7 @@ Int32 main ( Int32 argc, Char** argv ) inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", Modified: stable/8/contrib/bzip2/bzlib.c ============================================================================== --- stable/8/contrib/bzip2/bzlib.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzlib.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/bzlib.h ============================================================================== --- stable/8/contrib/bzip2/bzlib.h Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzlib.h Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/bzlib_private.h ============================================================================== --- stable/8/contrib/bzip2/bzlib_private.h Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/bzlib_private.h Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.5, 10-Dec-2007" +#define BZ_VERSION "1.0.6, 6-Sept-2010" typedef char Char; typedef unsigned char Bool; Modified: stable/8/contrib/bzip2/compress.c ============================================================================== --- stable/8/contrib/bzip2/compress.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/compress.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/crctable.c ============================================================================== --- stable/8/contrib/bzip2/crctable.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/crctable.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/decompress.c ============================================================================== --- stable/8/contrib/bzip2/decompress.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/decompress.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -492,15 +492,28 @@ Int32 BZ2_decompress ( DState* s ) RETURN(BZ_DATA_ERROR); /*-- Set up cftab to facilitate generation of T^(-1) --*/ + /* Check: unzftab entries in range. */ + for (i = 0; i <= 255; i++) { + if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) + RETURN(BZ_DATA_ERROR); + } + /* Actually generate cftab. */ s->cftab[0] = 0; for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; + /* Check: cftab entries in range. */ for (i = 0; i <= 256; i++) { if (s->cftab[i] < 0 || s->cftab[i] > nblock) { /* s->cftab[i] can legitimately be == nblock */ RETURN(BZ_DATA_ERROR); } } + /* Check: cftab entries non-descending. */ + for (i = 1; i <= 256; i++) { + if (s->cftab[i-1] > s->cftab[i]) { + RETURN(BZ_DATA_ERROR); + } + } s->state_out_len = 0; s->state_out_ch = 0; Modified: stable/8/contrib/bzip2/huffman.c ============================================================================== --- stable/8/contrib/bzip2/huffman.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/huffman.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/randtable.c ============================================================================== --- stable/8/contrib/bzip2/randtable.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/randtable.c Thu Feb 28 05:47:50 2013 (r247448) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/spewG.c ============================================================================== --- stable/8/contrib/bzip2/spewG.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/spewG.c Thu Feb 28 05:47:50 2013 (r247448) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/8/contrib/bzip2/unzcrash.c ============================================================================== --- stable/8/contrib/bzip2/unzcrash.c Thu Feb 28 05:18:15 2013 (r247447) +++ stable/8/contrib/bzip2/unzcrash.c Thu Feb 28 05:47:50 2013 (r247448) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 06:00:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6082EDC; Thu, 28 Feb 2013 06:00:27 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx1.freebsd.org (Postfix) with ESMTP id 98FB0D02; Thu, 28 Feb 2013 06:00:26 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id jx10so1401167veb.39 for ; Wed, 27 Feb 2013 22:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=kWFqQg1D2iSTSqxPV7HXvwQTD5lXWM9o/cj91sIckwI=; b=dpMI2Vf4yiK6E//ZGcM4nTVQON0vsPqrA5cGCEcBj/rpl/CbTupJfvaYsHavlWn/d3 ethCcc04Yg0XmKoqDOdxd6uRvPO7SK30xm/bvn1/H6n8u1HTFTSkE69VX/3RvNsetLTb 6faCcQiTqDZpH691Yhrx2fH9n3LCAAt+JGpvEqwA1Cwlq5TyzDRpd2JNDjKoOpa7byAY rhD4xzcY5yrWwadSlsqVNhCbK/Bll8HUn1zbSCpXaL5gcg1FIJ7mqGnNZ6n+daRAmlsP MBZ0IoK6r8/MFM4cfQdDLd70T2FLC41vm1DcUieKNMM4sFJvrytwoEUEUjpPNg8QjA72 fHMg== MIME-Version: 1.0 X-Received: by 10.58.56.161 with SMTP id b1mr2095922veq.42.1362031220028; Wed, 27 Feb 2013 22:00:20 -0800 (PST) Received: by 10.220.191.132 with HTTP; Wed, 27 Feb 2013 22:00:19 -0800 (PST) In-Reply-To: References: <201302280022.r1S0M4vm064514@svn.freebsd.org> <20130228022333.GC70215@glenbarber.us> Date: Wed, 27 Feb 2013 22:00:19 -0800 Message-ID: Subject: Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb From: Jack Vogel To: Glen Barber Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Jack F Vogel , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 06:00:27 -0000 I am checking with Luigi to see if an MFC of his code is a viable solution, if not I will change my core code. Stay tuned... Jack On Wed, Feb 27, 2013 at 9:41 PM, Jack Vogel wrote: > LOL, I would see the messages just as I sent this, never mind. > > Jack > > > On Wed, Feb 27, 2013 at 9:39 PM, Jack Vogel wrote: > >> Oh, that's odd, then HEAD should be broken too, do you have more detail? >> >> Jack >> >> >> On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber wrote: >> >>> Jack, >>> >>> This commit seems to break the build for at least powerpc and sparc64. >>> >>> Glen >>> >>> On Thu, Feb 28, 2013 at 12:22:04AM +0000, Jack F Vogel wrote: >>> > Author: jfv >>> > Date: Thu Feb 28 00:22:04 2013 >>> > New Revision: 247430 >>> > URL: http://svnweb.freebsd.org/changeset/base/247430 >>> > >>> > Log: >>> > MFC of the E1000 drivers to STABLE/8, this includes the follow >>> revisions >>> > plus a few tweaks: >>> > 196969,196970,211516,214646,215781,215789,215808,215910,223350, >>> > 223482,223831,228281,228393,229939,231796,232238,234665,235256, >>> > 236406,238148,238151,238214,238765,238770,238953,238981,239105, >>> > 239109,239304,240518,240693,240968,241037,241856,241885,243570, >>> > 243857,245334,246128,246482,247064 >>> > >>> > Added: >>> > stable/8/sys/dev/e1000/e1000_i210.c >>> > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c >>> > stable/8/sys/dev/e1000/e1000_i210.h >>> > - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h >>> > Modified: >>> > stable/8/sys/conf/files >>> > stable/8/sys/dev/e1000/e1000_82541.c >>> > stable/8/sys/dev/e1000/e1000_82543.c >>> > stable/8/sys/dev/e1000/e1000_82571.c >>> > stable/8/sys/dev/e1000/e1000_82575.c >>> > stable/8/sys/dev/e1000/e1000_82575.h >>> > stable/8/sys/dev/e1000/e1000_api.c >>> > stable/8/sys/dev/e1000/e1000_api.h >>> > stable/8/sys/dev/e1000/e1000_defines.h >>> > stable/8/sys/dev/e1000/e1000_hw.h >>> > stable/8/sys/dev/e1000/e1000_ich8lan.c >>> > stable/8/sys/dev/e1000/e1000_ich8lan.h >>> > stable/8/sys/dev/e1000/e1000_mac.c >>> > stable/8/sys/dev/e1000/e1000_mac.h >>> > stable/8/sys/dev/e1000/e1000_manage.c >>> > stable/8/sys/dev/e1000/e1000_manage.h >>> > stable/8/sys/dev/e1000/e1000_nvm.c >>> > stable/8/sys/dev/e1000/e1000_nvm.h >>> > stable/8/sys/dev/e1000/e1000_osdep.h >>> > stable/8/sys/dev/e1000/e1000_phy.c >>> > stable/8/sys/dev/e1000/e1000_phy.h >>> > stable/8/sys/dev/e1000/e1000_regs.h >>> > stable/8/sys/dev/e1000/if_em.c (contents, props changed) >>> > stable/8/sys/dev/e1000/if_igb.c (contents, props changed) >>> > stable/8/sys/dev/e1000/if_igb.h >>> > stable/8/sys/dev/e1000/if_lem.c >>> > stable/8/sys/modules/em/Makefile >>> > stable/8/sys/modules/igb/Makefile >>> > Directory Properties: >>> > stable/8/sys/dev/e1000/ (props changed) >>> > >>> > Modified: stable/8/sys/conf/files >>> > >>> ============================================================================== >>> > --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013 (r247429) >>> > +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013 (r247430) >>> > @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i >>> > compile-with "${NORMAL_C} -I$S/dev/e1000" >>> > dev/e1000/e1000_ich8lan.c optional em | igb \ >>> > compile-with "${NORMAL_C} -I$S/dev/e1000" >>> > +dev/e1000/e1000_i210.c optional em | igb \ >>> > + compile-with "${NORMAL_C} -I$S/dev/e1000" >>> > dev/e1000/e1000_api.c optional em | igb \ >>> > compile-with "${NORMAL_C} -I$S/dev/e1000" >>> > dev/e1000/e1000_mac.c optional em | igb \ >>> > >>> > Modified: stable/8/sys/dev/e1000/e1000_82541.c >>> > >>> ============================================================================== >>> > --- stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:18:56 2013 >>> (r247429) >>> > +++ stable/8/sys/dev/e1000/e1000_82541.c Thu Feb 28 00:22:04 2013 >>> (r247430) >>> > @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st >>> > * of MAC speed/duplex configuration. So we only need to >>> > * configure Collision Distance in the MAC. >>> > */ >>> > - e1000_config_collision_dist_generic(hw); >>> > + mac->ops.config_collision_dist(hw); >>> > >>> > /* >>> > * Configure Flow Control now that Auto-Neg has completed. >>> > >>> > Modified: stable/8/sys/dev/e1000/e1000_82543.c >>> > >>> ============================================================================== >>> > --- stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:18:56 2013 >>> (r247429) >>> > +++ stable/8/sys/dev/e1000/e1000_82543.c Thu Feb 28 00:22:04 2013 >>> (r247430) >>> > @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 >>> > DEBUGOUT("Valid link established!!!\n"); >>> > /* Config the MAC and PHY after link is up */ >>> > if (hw->mac.type == e1000_82544) { >>> > - e1000_config_collision_dist_generic(hw); >>> > + hw->mac.ops.config_collision_dist(hw); >>> > } else { >>> > ret_val = e1000_config_mac_to_phy_82543(hw); >>> > if (ret_val) >>> > @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( >>> > /* Take the link out of reset */ >>> > ctrl &= ~E1000_CTRL_LRST; >>> > >>> > - e1000_config_collision_dist_generic(hw); >>> > + hw->mac.ops.config_collision_dist(hw); >>> > >>> > ret_val = e1000_commit_fc_settings_generic(hw); >>> > if (ret_val) >>> > @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 >>> > * settings. >>> > */ >>> > if (mac->type == e1000_82544) >>> > - e1000_config_collision_dist_generic(hw); >>> > + hw->mac.ops.config_collision_dist(hw); >>> > else { >>> > ret_val = e1000_config_mac_to_phy_82543(hw); >>> > if (ret_val) { >>> > @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 >>> > if (phy_data & M88E1000_PSSR_DPLX) >>> > ctrl |= E1000_CTRL_FD; >>> > >>> > - e1000_config_collision_dist_generic(hw); >>> > + hw->mac.ops.config_collision_dist(hw); >>> > >>> > /* >>> > * Set up speed in the Device Control register depending on >>> > >>> > Modified: stable/8/sys/dev/e1000/e1000_82571.c >>> > >>> ============================================================================== >>> > --- stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:18:56 2013 >>> (r247429) >>> > +++ stable/8/sys/dev/e1000/e1000_82571.c Thu Feb 28 00:22:04 2013 >>> (r247430) >>> > @@ -1,6 +1,6 @@ >>> > >>> /****************************************************************************** >>> > >>> > - Copyright (c) 2001-2011, Intel Corporation >>> > + Copyright (c) 2001-2013, Intel Corporation >>> > All rights reserved. >>> > >>> > Redistribution and use in source and binary forms, with or without >>> > @@ -32,8 +32,7 @@ >>> > >>> ******************************************************************************/ >>> > /*$FreeBSD$*/ >>> > >>> > -/* >>> > - * 82571EB Gigabit Ethernet Controller >>> > +/* 82571EB Gigabit Ethernet Controller >>> > * 82571EB Gigabit Ethernet Controller (Copper) >>> > * 82571EB Gigabit Ethernet Controller (Fiber) >>> > * 82571EB Dual Port Gigabit Mezzanine Adapter >>> > @@ -51,9 +50,6 @@ >>> > >>> > #include "e1000_api.h" >>> > >>> > -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); >>> > -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); >>> > -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); >>> > static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); >>> > static void e1000_release_nvm_82571(struct e1000_hw *hw); >>> > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, >>> > @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 >>> > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); >>> > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); >>> > static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); >>> > -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); >>> > static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); >>> > static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); >>> > static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); >>> > @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ >>> > static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) >>> > { >>> > struct e1000_phy_info *phy = &hw->phy; >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > >>> > DEBUGFUNC("e1000_init_phy_params_82571"); >>> > >>> > if (hw->phy.media_type != e1000_media_type_copper) { >>> > phy->type = e1000_phy_none; >>> > - goto out; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > phy->addr = 1; >>> > @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s >>> > phy->ops.set_d3_lplu_state = >>> e1000_set_d3_lplu_state_82574; >>> > break; >>> > default: >>> > - ret_val = -E1000_ERR_PHY; >>> > - goto out; >>> > + return -E1000_ERR_PHY; >>> > break; >>> > } >>> > >>> > @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s >>> > ret_val = e1000_get_phy_id_82571(hw); >>> > if (ret_val) { >>> > DEBUGOUT("Error getting PHY ID\n"); >>> > - goto out; >>> > + return ret_val; >>> > } >>> > >>> > /* Verify phy id */ >>> > @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s >>> > if (ret_val) >>> > DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); >>> > >>> > -out: >>> > return ret_val; >>> > } >>> > >>> > @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s >>> > if (((eecd >> 15) & 0x3) == 0x3) { >>> > nvm->type = e1000_nvm_flash_hw; >>> > nvm->word_size = 2048; >>> > - /* >>> > - * Autonomous Flash update bit must be cleared >>> due >>> > + /* Autonomous Flash update bit must be cleared >>> due >>> > * to Flash update issue. >>> > */ >>> > eecd &= ~E1000_EECD_AUPDEN; >>> > @@ -254,8 +246,7 @@ static s32 e1000_init_nvm_params_82571(s >>> > nvm->type = e1000_nvm_eeprom_spi; >>> > size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> >>> > E1000_EECD_SIZE_EX_SHIFT); >>> > - /* >>> > - * Added to a constant, "size" becomes the left-shift >>> value >>> > + /* Added to a constant, "size" becomes the left-shift >>> value >>> > * for setting word_size. >>> > */ >>> > size += NVM_WORD_SIZE_BASE_SHIFT; >>> > @@ -382,12 +373,11 @@ static s32 e1000_init_mac_params_82571(s >>> > >>> > /* FWSM register */ >>> > mac->has_fwsm = TRUE; >>> > - /* >>> > - * ARC supported; valid only if manageability features >>> are >>> > + /* ARC supported; valid only if manageability features >>> are >>> > * enabled. >>> > */ >>> > - mac->arc_subsystem_valid = (E1000_READ_REG(hw, >>> E1000_FWSM) & >>> > - E1000_FWSM_MODE_MASK) ? TRUE >>> : FALSE; >>> > + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, >>> E1000_FWSM) & >>> > + E1000_FWSM_MODE_MASK); >>> > break; >>> > case e1000_82574: >>> > case e1000_82583: >>> > @@ -405,8 +395,7 @@ static s32 e1000_init_mac_params_82571(s >>> > break; >>> > } >>> > >>> > - /* >>> > - * Ensure that the inter-port SWSM.SMBI lock bit is clear before >>> > + /* Ensure that the inter-port SWSM.SMBI lock bit is clear before >>> > * first NVM or PHY acess. This should be done for single-port >>> > * devices, and for one port only on dual-port devices so that >>> > * for those devices we can still use the SMBI lock to >>> synchronize >>> > @@ -422,8 +411,9 @@ static s32 e1000_init_mac_params_82571(s >>> > E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 | >>> > E1000_SWSM2_LOCK); >>> > force_clear_smbi = TRUE; >>> > - } else >>> > + } else { >>> > force_clear_smbi = FALSE; >>> > + } >>> > break; >>> > default: >>> > force_clear_smbi = TRUE; >>> > @@ -443,10 +433,7 @@ static s32 e1000_init_mac_params_82571(s >>> > E1000_WRITE_REG(hw, E1000_SWSM, swsm & ~E1000_SWSM_SMBI); >>> > } >>> > >>> > - /* >>> > - * Initialze device specific counter of SMBI acquisition >>> > - * timeouts. >>> > - */ >>> > + /* Initialze device specific counter of SMBI acquisition >>> timeouts. */ >>> > hw->dev_spec._82571.smb_counter = 0; >>> > >>> > return E1000_SUCCESS; >>> > @@ -477,7 +464,7 @@ void e1000_init_function_pointers_82571( >>> > static s32 e1000_get_phy_id_82571(struct e1000_hw *hw) >>> > { >>> > struct e1000_phy_info *phy = &hw->phy; >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > u16 phy_id = 0; >>> > >>> > DEBUGFUNC("e1000_get_phy_id_82571"); >>> > @@ -485,8 +472,7 @@ static s32 e1000_get_phy_id_82571(struct >>> > switch (hw->mac.type) { >>> > case e1000_82571: >>> > case e1000_82572: >>> > - /* >>> > - * The 82571 firmware may still be configuring the PHY. >>> > + /* The 82571 firmware may still be configuring the PHY. >>> > * In this case, we cannot access the PHY until the >>> > * configuration is done. So we explicitly set the >>> > * PHY ID. >>> > @@ -494,29 +480,29 @@ static s32 e1000_get_phy_id_82571(struct >>> > phy->id = IGP01E1000_I_PHY_ID; >>> > break; >>> > case e1000_82573: >>> > - ret_val = e1000_get_phy_id(hw); >>> > + return e1000_get_phy_id(hw); >>> > break; >>> > case e1000_82574: >>> > case e1000_82583: >>> > ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > phy->id = (u32)(phy_id << 16); >>> > usec_delay(20); >>> > ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > phy->id |= (u32)(phy_id); >>> > phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); >>> > break; >>> > default: >>> > - ret_val = -E1000_ERR_PHY; >>> > + return -E1000_ERR_PHY; >>> > break; >>> > } >>> > -out: >>> > - return ret_val; >>> > + >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -528,15 +514,13 @@ out: >>> > static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) >>> > { >>> > u32 swsm; >>> > - s32 ret_val = E1000_SUCCESS; >>> > s32 sw_timeout = hw->nvm.word_size + 1; >>> > s32 fw_timeout = hw->nvm.word_size + 1; >>> > s32 i = 0; >>> > >>> > DEBUGFUNC("e1000_get_hw_semaphore_82571"); >>> > >>> > - /* >>> > - * If we have timedout 3 times on trying to acquire >>> > + /* If we have timedout 3 times on trying to acquire >>> > * the inter-port SMBI semaphore, there is old code >>> > * operating on the other port, and it is not >>> > * releasing SMBI. Modify the number of times that >>> > @@ -576,12 +560,10 @@ static s32 e1000_get_hw_semaphore_82571( >>> > /* Release semaphores */ >>> > e1000_put_hw_semaphore_82571(hw); >>> > DEBUGOUT("Driver can't access the NVM\n"); >>> > - ret_val = -E1000_ERR_NVM; >>> > - goto out; >>> > + return -E1000_ERR_NVM; >>> > } >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -613,22 +595,19 @@ static void e1000_put_hw_semaphore_82571 >>> > static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw) >>> > { >>> > u32 extcnf_ctrl; >>> > - s32 ret_val = E1000_SUCCESS; >>> > s32 i = 0; >>> > >>> > DEBUGFUNC("e1000_get_hw_semaphore_82573"); >>> > >>> > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); >>> > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >>> > do { >>> > + extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >>> > E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl); >>> > extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL); >>> > >>> > if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP) >>> > break; >>> > >>> > - extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP; >>> > - >>> > msec_delay(2); >>> > i++; >>> > } while (i < MDIO_OWNERSHIP_TIMEOUT); >>> > @@ -637,12 +616,10 @@ static s32 e1000_get_hw_semaphore_82573( >>> > /* Release semaphores */ >>> > e1000_put_hw_semaphore_82573(hw); >>> > DEBUGOUT("Driver can't access the PHY\n"); >>> > - ret_val = -E1000_ERR_PHY; >>> > - goto out; >>> > + return -E1000_ERR_PHY; >>> > } >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -712,7 +689,7 @@ static void e1000_put_hw_semaphore_82574 >>> > **/ >>> > static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool >>> active) >>> > { >>> > - u16 data = E1000_READ_REG(hw, E1000_POEMB); >>> > + u32 data = E1000_READ_REG(hw, E1000_POEMB); >>> > >>> > DEBUGFUNC("e1000_set_d0_lplu_state_82574"); >>> > >>> > @@ -738,7 +715,7 @@ static s32 e1000_set_d0_lplu_state_82574 >>> > **/ >>> > static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool >>> active) >>> > { >>> > - u16 data = E1000_READ_REG(hw, E1000_POEMB); >>> > + u32 data = E1000_READ_REG(hw, E1000_POEMB); >>> > >>> > DEBUGFUNC("e1000_set_d3_lplu_state_82574"); >>> > >>> > @@ -771,7 +748,7 @@ static s32 e1000_acquire_nvm_82571(struc >>> > >>> > ret_val = e1000_get_hw_semaphore_82571(hw); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > switch (hw->mac.type) { >>> > case e1000_82573: >>> > @@ -784,7 +761,6 @@ static s32 e1000_acquire_nvm_82571(struc >>> > if (ret_val) >>> > e1000_put_hw_semaphore_82571(hw); >>> > >>> > -out: >>> > return ret_val; >>> > } >>> > >>> > @@ -817,7 +793,7 @@ static void e1000_release_nvm_82571(stru >>> > static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 >>> words, >>> > u16 *data) >>> > { >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > >>> > DEBUGFUNC("e1000_write_nvm_82571"); >>> > >>> > @@ -857,31 +833,27 @@ static s32 e1000_update_nvm_checksum_825 >>> > >>> > ret_val = e1000_update_nvm_checksum_generic(hw); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > - /* >>> > - * If our nvm is an EEPROM, then we're done >>> > + /* If our nvm is an EEPROM, then we're done >>> > * otherwise, commit the checksum to the flash NVM. >>> > */ >>> > if (hw->nvm.type != e1000_nvm_flash_hw) >>> > - goto out; >>> > + return E1000_SUCCESS; >>> > >>> > /* Check for pending operations. */ >>> > for (i = 0; i < E1000_FLASH_UPDATES; i++) { >>> > msec_delay(1); >>> > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) >>> == 0) >>> > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) >>> > break; >>> > } >>> > >>> > - if (i == E1000_FLASH_UPDATES) { >>> > - ret_val = -E1000_ERR_NVM; >>> > - goto out; >>> > - } >>> > + if (i == E1000_FLASH_UPDATES) >>> > + return -E1000_ERR_NVM; >>> > >>> > /* Reset the firmware if using STM opcode. */ >>> > if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) == >>> E1000_STM_OPCODE) { >>> > - /* >>> > - * The enabling of and the actual reset must be done >>> > + /* The enabling of and the actual reset must be done >>> > * in two write cycles. >>> > */ >>> > E1000_WRITE_REG(hw, E1000_HICR, >>> E1000_HICR_FW_RESET_ENABLE); >>> > @@ -895,17 +867,14 @@ static s32 e1000_update_nvm_checksum_825 >>> > >>> > for (i = 0; i < E1000_FLASH_UPDATES; i++) { >>> > msec_delay(1); >>> > - if ((E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD) >>> == 0) >>> > + if (!(E1000_READ_REG(hw, E1000_EECD) & E1000_EECD_FLUPD)) >>> > break; >>> > } >>> > >>> > - if (i == E1000_FLASH_UPDATES) { >>> > - ret_val = -E1000_ERR_NVM; >>> > - goto out; >>> > - } >>> > + if (i == E1000_FLASH_UPDATES) >>> > + return -E1000_ERR_NVM; >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -944,19 +913,17 @@ static s32 e1000_write_nvm_eewr_82571(st >>> > { >>> > struct e1000_nvm_info *nvm = &hw->nvm; >>> > u32 i, eewr = 0; >>> > - s32 ret_val = 0; >>> > + s32 ret_val = E1000_SUCCESS; >>> > >>> > DEBUGFUNC("e1000_write_nvm_eewr_82571"); >>> > >>> > - /* >>> > - * A check for invalid values: offset too large, too many words, >>> > + /* A check for invalid values: offset too large, too many words, >>> > * and not enough words. >>> > */ >>> > if ((offset >= nvm->word_size) || (words > (nvm->word_size - >>> offset)) || >>> > (words == 0)) { >>> > DEBUGOUT("nvm parameter(s) out of bounds\n"); >>> > - ret_val = -E1000_ERR_NVM; >>> > - goto out; >>> > + return -E1000_ERR_NVM; >>> > } >>> > >>> > for (i = 0; i < words; i++) { >>> > @@ -975,7 +942,6 @@ static s32 e1000_write_nvm_eewr_82571(st >>> > break; >>> > } >>> > >>> > -out: >>> > return ret_val; >>> > } >>> > >>> > @@ -988,7 +954,6 @@ out: >>> > static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw) >>> > { >>> > s32 timeout = PHY_CFG_TIMEOUT; >>> > - s32 ret_val = E1000_SUCCESS; >>> > >>> > DEBUGFUNC("e1000_get_cfg_done_82571"); >>> > >>> > @@ -1001,12 +966,10 @@ static s32 e1000_get_cfg_done_82571(stru >>> > } >>> > if (!timeout) { >>> > DEBUGOUT("MNG configuration cycle has not completed.\n"); >>> > - ret_val = -E1000_ERR_RESET; >>> > - goto out; >>> > + return -E1000_ERR_RESET; >>> > } >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -1023,39 +986,40 @@ out: >>> > static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool >>> active) >>> > { >>> > struct e1000_phy_info *phy = &hw->phy; >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > u16 data; >>> > >>> > DEBUGFUNC("e1000_set_d0_lplu_state_82571"); >>> > >>> > if (!(phy->ops.read_reg)) >>> > - goto out; >>> > + return E1000_SUCCESS; >>> > >>> > ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, >>> &data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > if (active) { >>> > data |= IGP02E1000_PM_D0_LPLU; >>> > ret_val = phy->ops.write_reg(hw, >>> IGP02E1000_PHY_POWER_MGMT, >>> > data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > /* When LPLU is enabled, we should disable SmartSpeed */ >>> > ret_val = phy->ops.read_reg(hw, >>> IGP01E1000_PHY_PORT_CONFIG, >>> > &data); >>> > + if (ret_val) >>> > + return ret_val; >>> > data &= ~IGP01E1000_PSCFR_SMART_SPEED; >>> > ret_val = phy->ops.write_reg(hw, >>> IGP01E1000_PHY_PORT_CONFIG, >>> > data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > } else { >>> > data &= ~IGP02E1000_PM_D0_LPLU; >>> > ret_val = phy->ops.write_reg(hw, >>> IGP02E1000_PHY_POWER_MGMT, >>> > data); >>> > - /* >>> > - * LPLU and SmartSpeed are mutually exclusive. LPLU is >>> used >>> > + /* LPLU and SmartSpeed are mutually exclusive. LPLU is >>> used >>> > * during Dx states where the power conservation is most >>> > * important. During driver activity we should enable >>> > * SmartSpeed, so performance is maintained. >>> > @@ -1065,32 +1029,31 @@ static s32 e1000_set_d0_lplu_state_82571 >>> > >>> IGP01E1000_PHY_PORT_CONFIG, >>> > &data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > data |= IGP01E1000_PSCFR_SMART_SPEED; >>> > ret_val = phy->ops.write_reg(hw, >>> > >>> IGP01E1000_PHY_PORT_CONFIG, >>> > data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > } else if (phy->smart_speed == e1000_smart_speed_off) { >>> > ret_val = phy->ops.read_reg(hw, >>> > >>> IGP01E1000_PHY_PORT_CONFIG, >>> > &data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > data &= ~IGP01E1000_PSCFR_SMART_SPEED; >>> > ret_val = phy->ops.write_reg(hw, >>> > >>> IGP01E1000_PHY_PORT_CONFIG, >>> > data); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > } >>> > } >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -1101,13 +1064,12 @@ out: >>> > **/ >>> > static s32 e1000_reset_hw_82571(struct e1000_hw *hw) >>> > { >>> > - u32 ctrl, ctrl_ext; >>> > + u32 ctrl, ctrl_ext, eecd, tctl; >>> > s32 ret_val; >>> > >>> > DEBUGFUNC("e1000_reset_hw_82571"); >>> > >>> > - /* >>> > - * Prevent the PCI-E bus from sticking if there is no TLP >>> connection >>> > + /* Prevent the PCI-E bus from sticking if there is no TLP >>> connection >>> > * on the last TLP read/write transaction when MAC is reset. >>> > */ >>> > ret_val = e1000_disable_pcie_master_generic(hw); >>> > @@ -1118,13 +1080,14 @@ static s32 e1000_reset_hw_82571(struct e >>> > E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); >>> > >>> > E1000_WRITE_REG(hw, E1000_RCTL, 0); >>> > - E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); >>> > + tctl = E1000_READ_REG(hw, E1000_TCTL); >>> > + tctl &= ~E1000_TCTL_EN; >>> > + E1000_WRITE_REG(hw, E1000_TCTL, tctl); >>> > E1000_WRITE_FLUSH(hw); >>> > >>> > msec_delay(10); >>> > >>> > - /* >>> > - * Must acquire the MDIO ownership before MAC reset. >>> > + /* Must acquire the MDIO ownership before MAC reset. >>> > * Ownership defaults to firmware after a reset. >>> > */ >>> > switch (hw->mac.type) { >>> > @@ -1167,15 +1130,23 @@ static s32 e1000_reset_hw_82571(struct e >>> > ret_val = e1000_get_auto_rd_done_generic(hw); >>> > if (ret_val) >>> > /* We don't want to continue accessing MAC registers. */ >>> > - goto out; >>> > + return ret_val; >>> > >>> > - /* >>> > - * Phy configuration from NVM just starts after EECD_AUTO_RD is >>> set. >>> > + /* Phy configuration from NVM just starts after EECD_AUTO_RD is >>> set. >>> > * Need to wait for Phy configuration completion before accessing >>> > * NVM and Phy. >>> > */ >>> > >>> > switch (hw->mac.type) { >>> > + case e1000_82571: >>> > + case e1000_82572: >>> > + /* REQ and GNT bits need to be cleared when using AUTO_RD >>> > + * to access the EEPROM. >>> > + */ >>> > + eecd = E1000_READ_REG(hw, E1000_EECD); >>> > + eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT); >>> > + E1000_WRITE_REG(hw, E1000_EECD, eecd); >>> > + break; >>> > case e1000_82573: >>> > case e1000_82574: >>> > case e1000_82583: >>> > @@ -1193,7 +1164,7 @@ static s32 e1000_reset_hw_82571(struct e >>> > /* Install any alternate MAC address into RAR0 */ >>> > ret_val = e1000_check_alt_mac_addr_generic(hw); >>> > if (ret_val) >>> > - goto out; >>> > + return ret_val; >>> > >>> > e1000_set_laa_state_82571(hw, TRUE); >>> > } >>> > @@ -1202,8 +1173,7 @@ static s32 e1000_reset_hw_82571(struct e >>> > if (hw->phy.media_type == e1000_media_type_internal_serdes) >>> > hw->mac.serdes_link_state = e1000_serdes_link_down; >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -1225,16 +1195,15 @@ static s32 e1000_init_hw_82571(struct e1 >>> > >>> > /* Initialize identification LED */ >>> > ret_val = mac->ops.id_led_init(hw); >>> > + /* An error is not fatal and we should not stop init due to this >>> */ >>> > if (ret_val) >>> > DEBUGOUT("Error initializing identification LED\n"); >>> > - /* This is not fatal and we should not stop init due to >>> this */ >>> > >>> > /* Disabling VLAN filtering */ >>> > DEBUGOUT("Initializing the IEEE VLAN\n"); >>> > mac->ops.clear_vfta(hw); >>> > >>> > - /* Setup the receive address. */ >>> > - /* >>> > + /* Setup the receive address. >>> > * If, however, a locally administered address was assigned to >>> the >>> > * 82571, we must reserve a RAR for it to work around an issue >>> where >>> > * resetting one port will reload the MAC on the other port. >>> > @@ -1277,8 +1246,7 @@ static s32 e1000_init_hw_82571(struct e1 >>> > break; >>> > } >>> > >>> > - /* >>> > - * Clear all of the statistics registers (clear on read). It is >>> > + /* Clear all of the statistics registers (clear on read). It is >>> > * important that we do this after we have tried to establish >>> link >>> > * because the symbol error count will increment wildly if there >>> > * is no link. >>> > @@ -1377,8 +1345,7 @@ static void e1000_initialize_hw_bits_825 >>> > E1000_WRITE_REG(hw, E1000_PBA_ECC, reg); >>> > } >>> > >>> > - /* >>> > - * Workaround for hardware errata. >>> > + /* Workaround for hardware errata. >>> > * Ensure that DMA Dynamic Clock gating is disabled on 82571 and >>> 82572 >>> > */ >>> > if ((hw->mac.type == e1000_82571) || >>> > @@ -1388,6 +1355,15 @@ static void e1000_initialize_hw_bits_825 >>> > E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); >>> > } >>> > >>> > + /* Disable IPv6 extension header parsing because some malformed >>> > + * IPv6 headers can hang the Rx. >>> > + */ >>> > + if (hw->mac.type <= e1000_82573) { >>> > + reg = E1000_READ_REG(hw, E1000_RFCTL); >>> > + reg |= (E1000_RFCTL_IPV6_EX_DIS | >>> E1000_RFCTL_NEW_IPV6_EXT_DIS); >>> > + E1000_WRITE_REG(hw, E1000_RFCTL, reg); >>> > + } >>> > + >>> > /* PCI-Ex Control Registers */ >>> > switch (hw->mac.type) { >>> > case e1000_82574: >>> > @@ -1396,8 +1372,7 @@ static void e1000_initialize_hw_bits_825 >>> > reg |= (1 << 22); >>> > E1000_WRITE_REG(hw, E1000_GCR, reg); >>> > >>> > - /* >>> > - * Workaround for hardware errata. >>> > + /* Workaround for hardware errata. >>> > * apply workaround for hardware errata documented in >>> errata >>> > * docs Fixes issue where some error prone or unreliable >>> PCIe >>> > * completions are occurring, particularly with ASPM >>> enabled. >>> > @@ -1435,25 +1410,25 @@ static void e1000_clear_vfta_82571(struc >>> > case e1000_82574: >>> > case e1000_82583: >>> > if (hw->mng_cookie.vlan_id != 0) { >>> > - /* >>> > - * The VFTA is a 4096b bit-field, each >>> identifying >>> > + /* The VFTA is a 4096b bit-field, each >>> identifying >>> > * a single VLAN ID. The following operations >>> > * determine which 32b entry (i.e. offset) into >>> the >>> > * array we want to set the VLAN ID (i.e. bit) of >>> > * the manageability unit. >>> > */ >>> > vfta_offset = (hw->mng_cookie.vlan_id >> >>> > - E1000_VFTA_ENTRY_SHIFT) & >>> E1000_VFTA_ENTRY_MASK; >>> > - vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id & >>> > - E1000_VFTA_ENTRY_BIT_SHIFT_MASK); >>> > + E1000_VFTA_ENTRY_SHIFT) & >>> > + E1000_VFTA_ENTRY_MASK; >>> > + vfta_bit_in_reg = >>> > + 1 << (hw->mng_cookie.vlan_id & >>> > + E1000_VFTA_ENTRY_BIT_SHIFT_MASK); >>> > } >>> > break; >>> > default: >>> > break; >>> > } >>> > for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) { >>> > - /* >>> > - * If the offset we want to clear is the same offset of >>> the >>> > + /* If the offset we want to clear is the same offset of >>> the >>> > * manageability VLAN ID, then clear all bits except >>> that of >>> > * the manageability unit. >>> > */ >>> > @@ -1495,8 +1470,7 @@ static s32 e1000_led_on_82574(struct e10 >>> > >>> > ctrl = hw->mac.ledctl_mode2; >>> > if (!(E1000_STATUS_LU & E1000_READ_REG(hw, E1000_STATUS))) { >>> > - /* >>> > - * If no link, then turn LED on by setting the invert bit >>> > + /* If no link, then turn LED on by setting the invert bit >>> > * for each LED that's "on" (0x0E) in ledctl_mode2. >>> > */ >>> > for (i = 0; i < 4; i++) >>> > @@ -1519,30 +1493,28 @@ bool e1000_check_phy_82574(struct e1000_ >>> > { >>> > u16 status_1kbt = 0; >>> > u16 receive_errors = 0; >>> > - bool phy_hung = FALSE; >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > >>> > DEBUGFUNC("e1000_check_phy_82574"); >>> > >>> > - /* >>> > - * Read PHY Receive Error counter first, if its is max - all F's >>> then >>> > + /* Read PHY Receive Error counter first, if its is max - all F's >>> then >>> > * read the Base1000T status register If both are max then PHY >>> is hung. >>> > */ >>> > ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER, >>> > &receive_errors); >>> > if (ret_val) >>> > - goto out; >>> > + return FALSE; >>> > if (receive_errors == E1000_RECEIVE_ERROR_MAX) { >>> > ret_val = hw->phy.ops.read_reg(hw, >>> E1000_BASE1000T_STATUS, >>> > &status_1kbt); >>> > if (ret_val) >>> > - goto out; >>> > + return FALSE; >>> > if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) == >>> > E1000_IDLE_ERROR_COUNT_MASK) >>> > - phy_hung = TRUE; >>> > + return TRUE; >>> > } >>> > -out: >>> > - return phy_hung; >>> > + >>> > + return FALSE; >>> > } >>> > >>> > >>> > @@ -1560,8 +1532,7 @@ static s32 e1000_setup_link_82571(struct >>> > { >>> > DEBUGFUNC("e1000_setup_link_82571"); >>> > >>> > - /* >>> > - * 82573 does not have a word in the NVM to determine >>> > + /* 82573 does not have a word in the NVM to determine >>> > * the default flow control setting, so we explicitly >>> > * set it to full. >>> > */ >>> > @@ -1608,17 +1579,14 @@ static s32 e1000_setup_copper_link_82571 >>> > ret_val = e1000_copper_link_setup_igp(hw); >>> > break; >>> > default: >>> > - ret_val = -E1000_ERR_PHY; >>> > + return -E1000_ERR_PHY; >>> > break; >>> > } >>> > >>> > if (ret_val) >>> > - goto out; >>> > - >>> > - ret_val = e1000_setup_copper_link_generic(hw); >>> > + return ret_val; >>> > >>> > -out: >>> > - return ret_val; >>> > + return e1000_setup_copper_link_generic(hw); >>> > } >>> > >>> > /** >>> > @@ -1635,8 +1603,7 @@ static s32 e1000_setup_fiber_serdes_link >>> > switch (hw->mac.type) { >>> > case e1000_82571: >>> > case e1000_82572: >>> > - /* >>> > - * If SerDes loopback mode is entered, there is no form >>> > + /* If SerDes loopback mode is entered, there is no form >>> > * of reset to take the adapter out of that mode. So we >>> > * have to explicitly take the adapter out of loopback >>> > * mode. This prevents drivers from twiddling their >>> thumbs >>> > @@ -1685,16 +1652,17 @@ static s32 e1000_check_for_serdes_link_8 >>> > >>> > ctrl = E1000_READ_REG(hw, E1000_CTRL); >>> > status = E1000_READ_REG(hw, E1000_STATUS); >>> > + E1000_READ_REG(hw, E1000_RXCW); >>> > + /* SYNCH bit and IV bit are sticky */ >>> > + usec_delay(10); >>> > rxcw = E1000_READ_REG(hw, E1000_RXCW); >>> > >>> > if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) { >>> > - >>> > /* Receiver is synchronized with no invalid bits. */ >>> > switch (mac->serdes_link_state) { >>> > case e1000_serdes_link_autoneg_complete: >>> > if (!(status & E1000_STATUS_LU)) { >>> > - /* >>> > - * We have lost link, retry autoneg >>> before >>> > + /* We have lost link, retry autoneg >>> before >>> > * reporting link failure >>> > */ >>> > mac->serdes_link_state = >>> > @@ -1707,15 +1675,12 @@ static s32 e1000_check_for_serdes_link_8 >>> > break; >>> > >>> > case e1000_serdes_link_forced_up: >>> > - /* >>> > - * If we are receiving /C/ ordered sets, >>> re-enable >>> > + /* If we are receiving /C/ ordered sets, >>> re-enable >>> > * auto-negotiation in the TXCW register and >>> disable >>> > * forced link in the Device Control register in >>> an >>> > * attempt to auto-negotiate with our link >>> partner. >>> > - * If the partner code word is null, stop forcing >>> > - * and restart auto negotiation. >>> > */ >>> > - if ((rxcw & E1000_RXCW_C) || !(rxcw & >>> E1000_RXCW_CW)) { >>> > + if (rxcw & E1000_RXCW_C) { >>> > /* Enable autoneg, and unforce link up */ >>> > E1000_WRITE_REG(hw, E1000_TXCW, >>> mac->txcw); >>> > E1000_WRITE_REG(hw, E1000_CTRL, >>> > @@ -1731,8 +1696,7 @@ static s32 e1000_check_for_serdes_link_8 >>> > >>> > case e1000_serdes_link_autoneg_progress: >>> > if (rxcw & E1000_RXCW_C) { >>> > - /* >>> > - * We received /C/ ordered sets, meaning >>> the >>> > + /* We received /C/ ordered sets, meaning >>> the >>> > * link partner has autonegotiated, and >>> we can >>> > * trust the Link Up (LU) status bit. >>> > */ >>> > @@ -1748,8 +1712,7 @@ static s32 e1000_check_for_serdes_link_8 >>> > DEBUGOUT("AN_PROG -> DOWN\n"); >>> > } >>> > } else { >>> > - /* >>> > - * The link partner did not autoneg. >>> > + /* The link partner did not autoneg. >>> > * Force link up and full duplex, and >>> change >>> > * state to forced. >>> > */ >>> > @@ -1774,8 +1737,7 @@ static s32 e1000_check_for_serdes_link_8 >>> > >>> > case e1000_serdes_link_down: >>> > default: >>> > - /* >>> > - * The link was down but the receiver has now >>> gained >>> > + /* The link was down but the receiver has now >>> gained >>> > * valid sync, so lets see if we can bring the >>> link >>> > * up. >>> > */ >>> > @@ -1794,17 +1756,18 @@ static s32 e1000_check_for_serdes_link_8 >>> > mac->serdes_link_state = e1000_serdes_link_down; >>> > DEBUGOUT("ANYSTATE -> DOWN\n"); >>> > } else { >>> > - /* >>> > - * Check several times, if Sync and Config >>> > - * both are consistently 1 then simply ignore >>> > - * the Invalid bit and restart Autoneg >>> > + /* Check several times, if SYNCH bit and CONFIG >>> > + * bit both are consistently 1 then simply ignore >>> > + * the IV bit and restart Autoneg >>> > */ >>> > for (i = 0; i < AN_RETRY_COUNT; i++) { >>> > usec_delay(10); >>> > rxcw = E1000_READ_REG(hw, E1000_RXCW); >>> > - if ((rxcw & E1000_RXCW_IV) && >>> > - !((rxcw & E1000_RXCW_SYNCH) && >>> > - (rxcw & E1000_RXCW_C))) { >>> > + if ((rxcw & E1000_RXCW_SYNCH) && >>> > + (rxcw & E1000_RXCW_C)) >>> > + continue; >>> > + >>> > + if (rxcw & E1000_RXCW_IV) { >>> > mac->serdes_has_link = FALSE; >>> > mac->serdes_link_state = >>> > >>> e1000_serdes_link_down; >>> > @@ -1845,7 +1808,7 @@ static s32 e1000_valid_led_default_82571 >>> > ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data); >>> > if (ret_val) { >>> > DEBUGOUT("NVM Read Error\n"); >>> > - goto out; >>> > + return ret_val; >>> > } >>> > >>> > switch (hw->mac.type) { >>> > @@ -1862,8 +1825,7 @@ static s32 e1000_valid_led_default_82571 >>> > break; >>> > } >>> > >>> > -out: >>> > - return ret_val; >>> > + return E1000_SUCCESS; >>> > } >>> > >>> > /** >>> > @@ -1900,15 +1862,14 @@ void e1000_set_laa_state_82571(struct e1 >>> > >>> > /* If workaround is activated... */ >>> > if (state) >>> > - /* >>> > - * Hold a copy of the LAA in RAR[14] This is done so that >>> > + /* Hold a copy of the LAA in RAR[14] This is done so that >>> > * between the time RAR[0] gets clobbered and the time it >>> > * gets fixed, the actual LAA is in one of the RARs and >>> no >>> > * incoming packets directed to this port are dropped. >>> > * Eventually the LAA will be in RAR[0] and RAR[14]. >>> > */ >>> > - e1000_rar_set_generic(hw, hw->mac.addr, >>> > - hw->mac.rar_entry_count - 1); >>> > + hw->mac.ops.rar_set(hw, hw->mac.addr, >>> > + hw->mac.rar_entry_count - 1); >>> > return; >>> > } >>> > >>> > @@ -1925,25 +1886,23 @@ void e1000_set_laa_state_82571(struct e1 >>> > static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) >>> > { >>> > struct e1000_nvm_info *nvm = &hw->nvm; >>> > - s32 ret_val = E1000_SUCCESS; >>> > + s32 ret_val; >>> > u16 data; >>> > >>> > DEBUGFUNC("e1000_fix_nvm_checksum_82571"); >>> > >>> > if (nvm->type != e1000_nvm_flash_hw) >>> > - goto out; >>> > + return E1000_SUCCESS; >>> > >>> > - /* >>> > - * Check bit 4 of word 10h. If it is 0, firmware is done >>> updating >>> > + /* Check bit 4 of word 10h. If it is 0, firmware is done >>> updating >>> > * 10h-12h. Checksum may need to be fixed. >>> > */ >>> > >>> > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>> > _______________________________________________ >>> > svn-src-stable-8@freebsd.org mailing list >>> > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8 >>> > To unsubscribe, send any mail to " >>> svn-src-stable-8-unsubscribe@freebsd.org" >>> >> >> > From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 08:06:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 01A11637; Thu, 28 Feb 2013 08:06:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E87171110; Thu, 28 Feb 2013 08:06:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S86iTM006389; Thu, 28 Feb 2013 08:06:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S86iG8006388; Thu, 28 Feb 2013 08:06:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302280806.r1S86iG8006388@svn.freebsd.org> From: Xin LI Date: Thu, 28 Feb 2013 08:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247449 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 08:06:45 -0000 Author: delphij Date: Thu Feb 28 08:06:43 2013 New Revision: 247449 URL: http://svnweb.freebsd.org/changeset/base/247449 Log: When getting the MIB, remove largest suffix instead of smallest suffix of =. This makes the following syntax work: dev.hdaa.4.nid25_config=as=1,seq=15 This is a direct commit to RELENG_9 as this file have been replaced in -HEAD. Submitted by: Andreas Nilsson Modified: stable/9/etc/rc.d/sysctl Modified: stable/9/etc/rc.d/sysctl ============================================================================== --- stable/9/etc/rc.d/sysctl Thu Feb 28 05:47:50 2013 (r247448) +++ stable/9/etc/rc.d/sysctl Thu Feb 28 08:06:43 2013 (r247449) @@ -26,7 +26,7 @@ parse_file() \#*|'') ;; *) - mib=${var%=*} + mib=${var%%=*} val=${var#*=} if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 08:11:37 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9FCE5B4D; Thu, 28 Feb 2013 08:11:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78B3D1177; Thu, 28 Feb 2013 08:11:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S8BbHE008898; Thu, 28 Feb 2013 08:11:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S8BbnI008897; Thu, 28 Feb 2013 08:11:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302280811.r1S8BbnI008897@svn.freebsd.org> From: Xin LI Date: Thu, 28 Feb 2013 08:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247450 - stable/8/etc/rc.d X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 08:11:37 -0000 Author: delphij Date: Thu Feb 28 08:11:36 2013 New Revision: 247450 URL: http://svnweb.freebsd.org/changeset/base/247450 Log: When getting the MIB, remove largest suffix instead of smallest suffix of =. This makes the following syntax work: dev.hdaa.4.nid25_config=as=1,seq=15 This is a direct commit to RELENG_8 as this file have been replaced in -HEAD. Submitted by: Andreas Nilsson Modified: stable/8/etc/rc.d/sysctl Modified: stable/8/etc/rc.d/sysctl ============================================================================== --- stable/8/etc/rc.d/sysctl Thu Feb 28 08:06:43 2013 (r247449) +++ stable/8/etc/rc.d/sysctl Thu Feb 28 08:11:36 2013 (r247450) @@ -26,7 +26,7 @@ parse_file() \#*|'') ;; *) - mib=${var%=*} + mib=${var%%=*} val=${var#*=} if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 08:19:56 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6A3A9F6E; Thu, 28 Feb 2013 08:19:56 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C94711D7; Thu, 28 Feb 2013 08:19:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1S8Jutv010041; Thu, 28 Feb 2013 08:19:56 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1S8JuOf010040; Thu, 28 Feb 2013 08:19:56 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201302280819.r1S8JuOf010040@svn.freebsd.org> From: Jack F Vogel Date: Thu, 28 Feb 2013 08:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247451 - stable/8/sys/conf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 08:19:56 -0000 Author: jfv Date: Thu Feb 28 08:19:55 2013 New Revision: 247451 URL: http://svnweb.freebsd.org/changeset/base/247451 Log: Remove DEV_NETMAP from stable/8 options, this was suggested and approved by the owner, although there is code in some drivers in support of it, the feature itself is not fully supported in this release. Modified: stable/8/sys/conf/options Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Thu Feb 28 08:11:36 2013 (r247450) +++ stable/8/sys/conf/options Thu Feb 28 08:19:55 2013 (r247451) @@ -682,7 +682,6 @@ ISAPNP opt_isa.h # various 'device presence' options. DEV_BPF opt_bpf.h -DEV_NETMAP opt_global.h DEV_MCA opt_mca.h DEV_CARP opt_carp.h DEV_PTY opt_tty.h From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 12:03:17 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CEB45770; Thu, 28 Feb 2013 12:03:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C0F7E1E67; Thu, 28 Feb 2013 12:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SC3Hcm079588; Thu, 28 Feb 2013 12:03:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SC3HYt079587; Thu, 28 Feb 2013 12:03:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201302281203.r1SC3HYt079587@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 28 Feb 2013 12:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247461 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 12:03:17 -0000 Author: des Date: Thu Feb 28 12:03:17 2013 New Revision: 247461 URL: http://svnweb.freebsd.org/changeset/base/247461 Log: MFH (r240109): add a configtest command Modified: stable/9/etc/rc.d/sshd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/sshd ============================================================================== --- stable/9/etc/rc.d/sshd Thu Feb 28 11:27:01 2013 (r247460) +++ stable/9/etc/rc.d/sshd Thu Feb 28 12:03:17 2013 (r247461) @@ -14,8 +14,9 @@ rcvar="sshd_enable" command="/usr/sbin/${name}" keygen_cmd="sshd_keygen" start_precmd="sshd_precmd" +configtest_cmd="sshd_configtest" pidfile="/var/run/${name}.pid" -extra_commands="keygen reload" +extra_commands="configtest keygen reload" timeout=300 @@ -87,6 +88,12 @@ sshd_keygen() ) } +sshd_configtest() +{ + echo "Performing sanity check on ${name} configuration." + eval ${command} ${sshd_flags} -t +} + sshd_precmd() { if [ ! -f /etc/ssh/ssh_host_key -o \ @@ -96,6 +103,7 @@ sshd_precmd() user_reseed run_rc_command keygen fi + sshd_configtest } load_rc_config $name From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 15:17:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DEC2E303; Thu, 28 Feb 2013 15:17:25 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9FD7FAE0; Thu, 28 Feb 2013 15:17:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SFHPX2037945; Thu, 28 Feb 2013 15:17:25 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SFHPMG037942; Thu, 28 Feb 2013 15:17:25 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201302281517.r1SFHPMG037942@svn.freebsd.org> From: Niclas Zeising Date: Thu, 28 Feb 2013 15:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247465 - stable/9/lib/libc/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 15:17:26 -0000 Author: zeising (doc,ports committer) Date: Thu Feb 28 15:17:24 2013 New Revision: 247465 URL: http://svnweb.freebsd.org/changeset/base/247465 Log: MFC r246809: Change examples to be consistent with what style(9) says. Approved by: joel (mentor) Modified: stable/9/lib/libc/net/getaddrinfo.3 stable/9/lib/libc/net/getnameinfo.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/9/lib/libc/net/getaddrinfo.3 Thu Feb 28 13:55:05 2013 (r247464) +++ stable/9/lib/libc/net/getaddrinfo.3 Thu Feb 28 15:17:24 2013 (r247465) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2009 +.Dd February 14, 2013 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -339,7 +339,7 @@ hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } s = -1; for (res = res0; res; res = res->ai_next) { @@ -361,7 +361,7 @@ for (res = res0; res; res = res->ai_next } if (s < 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed @@ -383,7 +383,7 @@ hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } nsock = 0; for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { @@ -405,7 +405,7 @@ for (res = res0; res && nsock < MAXSOCK; } if (nsock == 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed Modified: stable/9/lib/libc/net/getnameinfo.3 ============================================================================== --- stable/9/lib/libc/net/getnameinfo.3 Thu Feb 28 13:55:05 2013 (r247464) +++ stable/9/lib/libc/net/getnameinfo.3 Thu Feb 28 15:17:24 2013 (r247465) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2007 +.Dd February 14, 2013 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -157,7 +157,7 @@ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { errx(1, "could not get numeric hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s, serv=%s\en", hbuf, sbuf); .Ed @@ -170,7 +170,7 @@ char hbuf[NI_MAXHOST]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) { errx(1, "could not resolve hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s\en", hbuf); .Ed From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 15:21:14 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 055095E9; Thu, 28 Feb 2013 15:21:14 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA618B15; Thu, 28 Feb 2013 15:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SFLDGj040122; Thu, 28 Feb 2013 15:21:13 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SFLDrh040120; Thu, 28 Feb 2013 15:21:13 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201302281521.r1SFLDrh040120@svn.freebsd.org> From: Niclas Zeising Date: Thu, 28 Feb 2013 15:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247466 - stable/8/lib/libc/net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 15:21:14 -0000 Author: zeising (doc,ports committer) Date: Thu Feb 28 15:21:12 2013 New Revision: 247466 URL: http://svnweb.freebsd.org/changeset/base/247466 Log: MFC r246809 Change examples to be consistent with what style(9) says. Approved by: joel (mentor) Modified: stable/8/lib/libc/net/getaddrinfo.3 stable/8/lib/libc/net/getnameinfo.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/8/lib/libc/net/getaddrinfo.3 Thu Feb 28 15:17:24 2013 (r247465) +++ stable/8/lib/libc/net/getaddrinfo.3 Thu Feb 28 15:21:12 2013 (r247466) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2009 +.Dd February 14, 2013 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -339,7 +339,7 @@ hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } s = -1; for (res = res0; res; res = res->ai_next) { @@ -361,7 +361,7 @@ for (res = res0; res; res = res->ai_next } if (s < 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed @@ -383,7 +383,7 @@ hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); - /*NOTREACHED*/ + /* NOTREACHED */ } nsock = 0; for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { @@ -405,7 +405,7 @@ for (res = res0; res && nsock < MAXSOCK; } if (nsock == 0) { err(1, "%s", cause); - /*NOTREACHED*/ + /* NOTREACHED */ } freeaddrinfo(res0); .Ed Modified: stable/8/lib/libc/net/getnameinfo.3 ============================================================================== --- stable/8/lib/libc/net/getnameinfo.3 Thu Feb 28 15:17:24 2013 (r247465) +++ stable/8/lib/libc/net/getnameinfo.3 Thu Feb 28 15:21:12 2013 (r247466) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2007 +.Dd February 14, 2013 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -157,7 +157,7 @@ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { errx(1, "could not get numeric hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s, serv=%s\en", hbuf, sbuf); .Ed @@ -170,7 +170,7 @@ char hbuf[NI_MAXHOST]; if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) { errx(1, "could not resolve hostname"); - /*NOTREACHED*/ + /* NOTREACHED */ } printf("host=%s\en", hbuf); .Ed From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:25:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CB9DA738; Thu, 28 Feb 2013 16:25:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC45FF5F; Thu, 28 Feb 2013 16:25:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGPYG7059510; Thu, 28 Feb 2013 16:25:34 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGPYB9059509; Thu, 28 Feb 2013 16:25:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281625.r1SGPYB9059509@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247468 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:25:34 -0000 Author: hselasky Date: Thu Feb 28 16:25:34 2013 New Revision: 247468 URL: http://svnweb.freebsd.org/changeset/base/247468 Log: MFC r235451: Move reset of USB mouse parameters from the USB mouse attach to the USB mouse device open. Protect against multi character device open. Some other nits. Modified: stable/8/sys/dev/usb/input/ums.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Thu Feb 28 16:22:49 2013 (r247467) +++ stable/8/sys/dev/usb/input/ums.c Thu Feb 28 16:25:34 2013 (r247468) @@ -134,6 +134,7 @@ struct ums_softc { struct usb_xfer *sc_xfer[UMS_N_TRANSFER]; int sc_pollrate; + int sc_fflags; uint8_t sc_buttons; uint8_t sc_iid; @@ -648,32 +649,13 @@ ums_attach(device_t dev) DPRINTF("size=%d, id=%d\n", isize, sc->sc_iid); #endif - if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) - sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; - else - sc->sc_hw.buttons = sc->sc_buttons; - - sc->sc_hw.iftype = MOUSE_IF_USB; - sc->sc_hw.type = MOUSE_MOUSE; - sc->sc_hw.model = MOUSE_MODEL_GENERIC; - sc->sc_hw.hwid = 0; - - sc->sc_mode.protocol = MOUSE_PROTO_MSC; - sc->sc_mode.rate = -1; - sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; - sc->sc_mode.accelfactor = 0; - sc->sc_mode.level = 0; - sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; - sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; - sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; - err = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, &ums_fifo_methods, &sc->sc_fifo, device_get_unit(dev), -1, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); - if (err) { + if (err) goto detach; - } + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, @@ -796,7 +778,7 @@ ums_put_queue(struct ums_softc *sc, int3 static void ums_reset_buf(struct ums_softc *sc) { - /* reset read queue */ + /* reset read queue, must be called locked */ usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]); } @@ -807,7 +789,33 @@ ums_open(struct usb_fifo *fifo, int ffla DPRINTFN(2, "\n"); - if (fflags & FREAD) { + /* check for duplicate open, should not happen */ + if (sc->sc_fflags & fflags) + return (EBUSY); + + /* check for first open */ + if (sc->sc_fflags == 0) { + + /* reset all USB mouse parameters */ + + if (sc->sc_buttons > MOUSE_MSC_MAXBUTTON) + sc->sc_hw.buttons = MOUSE_MSC_MAXBUTTON; + else + sc->sc_hw.buttons = sc->sc_buttons; + + sc->sc_hw.iftype = MOUSE_IF_USB; + sc->sc_hw.type = MOUSE_MOUSE; + sc->sc_hw.model = MOUSE_MODEL_GENERIC; + sc->sc_hw.hwid = 0; + + sc->sc_mode.protocol = MOUSE_PROTO_MSC; + sc->sc_mode.rate = -1; + sc->sc_mode.resolution = MOUSE_RES_UNKNOWN; + sc->sc_mode.accelfactor = 0; + sc->sc_mode.level = 0; + sc->sc_mode.packetsize = MOUSE_MSC_PACKETSIZE; + sc->sc_mode.syncmask[0] = MOUSE_MSC_SYNCMASK; + sc->sc_mode.syncmask[1] = MOUSE_MSC_SYNC; /* reset status */ @@ -818,21 +826,31 @@ ums_open(struct usb_fifo *fifo, int ffla sc->sc_status.dy = 0; sc->sc_status.dz = 0; /* sc->sc_status.dt = 0; */ + } + if (fflags & FREAD) { + /* allocate RX buffer */ if (usb_fifo_alloc_buffer(fifo, UMS_BUF_SIZE, UMS_IFQ_MAXLEN)) { return (ENOMEM); } } + + sc->sc_fflags |= fflags & (FREAD | FWRITE); return (0); } static void ums_close(struct usb_fifo *fifo, int fflags) { - if (fflags & FREAD) { + struct ums_softc *sc = usb_fifo_softc(fifo); + + DPRINTFN(2, "\n"); + + if (fflags & FREAD) usb_fifo_free_buffer(fifo); - } + + sc->sc_fflags &= ~(fflags & (FREAD | FWRITE)); } static int @@ -862,7 +880,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long /* don't change the current setting */ } else if ((mode.level < 0) || (mode.level > 1)) { error = EINVAL; - goto done; + break; } else { sc->sc_mode.level = mode.level; } @@ -899,7 +917,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long case MOUSE_SETLEVEL: if (*(int *)addr < 0 || *(int *)addr > 1) { error = EINVAL; - goto done; + break; } sc->sc_mode.level = *(int *)addr; @@ -946,9 +964,9 @@ ums_ioctl(struct usb_fifo *fifo, u_long } default: error = ENOTTY; + break; } -done: mtx_unlock(&sc->sc_mtx); return (error); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:32:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B2F90D1B; Thu, 28 Feb 2013 16:32:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A48D6FBC; Thu, 28 Feb 2013 16:32:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGWQNW062349; Thu, 28 Feb 2013 16:32:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGWQ85062342; Thu, 28 Feb 2013 16:32:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281632.r1SGWQ85062342@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247469 - in stable/8/sys/dev/usb: . net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:32:26 -0000 Author: hselasky Date: Thu Feb 28 16:32:25 2013 New Revision: 247469 URL: http://svnweb.freebsd.org/changeset/base/247469 Log: MFC r246021 and r228637: Add new USB IDs. PR: usb/175639 Modified: stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Thu Feb 28 16:25:34 2013 (r247468) +++ stable/8/sys/dev/usb/net/if_axe.c Thu Feb 28 16:32:25 2013 (r247469) @@ -151,6 +151,7 @@ static const STRUCT_USB_HOST_ID axe_devs AXE_DEV(ASIX, AX88772, AXE_FLAG_772), AXE_DEV(ASIX, AX88772A, AXE_FLAG_772A), AXE_DEV(ASIX, AX88772B, AXE_FLAG_772B), + AXE_DEV(ASIX, AX88772B_1, AXE_FLAG_772B), AXE_DEV(ATEN, UC210T, 0), AXE_DEV(BELKIN, F5D5055, AXE_FLAG_178), AXE_DEV(BILLIONTON, USB2AR, 0), @@ -158,6 +159,7 @@ static const STRUCT_USB_HOST_ID axe_devs AXE_DEV(COREGA, FETHER_USB2_TX, 0), AXE_DEV(DLINK, DUBE100, 0), AXE_DEV(DLINK, DUBE100B1, AXE_FLAG_772), + AXE_DEV(DLINK, DUBE100C1, AXE_FLAG_772B), AXE_DEV(GOODWAY, GWUSB2E, 0), AXE_DEV(IODATA, ETGUS2, AXE_FLAG_178), AXE_DEV(JVC, MP_PRX1, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Thu Feb 28 16:25:34 2013 (r247468) +++ stable/8/sys/dev/usb/usbdevs Thu Feb 28 16:32:25 2013 (r247469) @@ -1486,6 +1486,7 @@ product DIGIANSWER ZIGBEE802154 0x000a Z /* D-Link products */ /*product DLINK DSBS25 0x0100 DSB-S25 serial*/ product DLINK DUBE100 0x1a00 10/100 Ethernet +product DLINK DUBE100C1 0x1a02 DUB-E100 rev C1 product DLINK DSB650TX4 0x200c 10/100 Ethernet product DLINK DWL120E 0x3200 DWL-120 rev E product DLINK DWL122 0x3700 DWL-122 From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:32:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 11EEBED4; Thu, 28 Feb 2013 16:32:37 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 517A2FBF; Thu, 28 Feb 2013 16:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGWbsG062463; Thu, 28 Feb 2013 16:32:37 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGWbTn062462; Thu, 28 Feb 2013 16:32:37 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201302281632.r1SGWbTn062462@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 28 Feb 2013 16:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247470 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:32:38 -0000 Author: gallatin Date: Thu Feb 28 16:32:36 2013 New Revision: 247470 URL: http://svnweb.freebsd.org/changeset/base/247470 Log: MFC r247104: Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED. Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4 checksum is correct. Without this fix, the tcp_lro code will reject good IPv4 traffic from drivers that do not implement IPv4 header harder csum offload. Modified: stable/9/sys/netinet/tcp_lro.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_lro.c ============================================================================== --- stable/9/sys/netinet/tcp_lro.c Thu Feb 28 16:32:25 2013 (r247469) +++ stable/9/sys/netinet/tcp_lro.c Thu Feb 28 16:32:36 2013 (r247470) @@ -333,7 +333,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, str } } else { csum = in_cksum_hdr(ip4); - if (__predict_false((csum ^ 0xffff) != 0)) { + if (__predict_false((csum) != 0)) { lc->lro_bad_csum++; return (TCP_LRO_CANNOT); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:36:12 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E92682C7; Thu, 28 Feb 2013 16:36:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DB445FF1; Thu, 28 Feb 2013 16:36:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGaCqF063145; Thu, 28 Feb 2013 16:36:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGaCDF063143; Thu, 28 Feb 2013 16:36:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281636.r1SGaCDF063143@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247471 - stable/8/sys/dev/usb/wlan X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:36:13 -0000 Author: hselasky Date: Thu Feb 28 16:36:12 2013 New Revision: 247471 URL: http://svnweb.freebsd.org/changeset/base/247471 Log: MFC r246944: Fix bad EEPROM parsing code. Modified: stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_upgtvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Thu Feb 28 16:32:36 2013 (r247470) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Thu Feb 28 16:36:12 2013 (r247471) @@ -1122,12 +1122,23 @@ upgt_eeprom_parse(struct upgt_softc *sc) (sizeof(struct upgt_eeprom_header) + preamble_len)); while (!option_end) { + + /* sanity check */ + if (eeprom_option >= (struct upgt_eeprom_option *) + (sc->sc_eeprom + UPGT_EEPROM_SIZE)) { + return (EINVAL); + } + /* the eeprom option length is stored in words */ option_len = (le16toh(eeprom_option->len) - 1) * sizeof(uint16_t); option_type = le16toh(eeprom_option->type); + /* sanity check */ + if (option_len == 0 || option_len >= UPGT_EEPROM_SIZE) + return (EINVAL); + switch (option_type) { case UPGT_EEPROM_TYPE_NAME: DPRINTF(sc, UPGT_DEBUG_FW, @@ -1198,7 +1209,6 @@ upgt_eeprom_parse(struct upgt_softc *sc) eeprom_option = (struct upgt_eeprom_option *) (eeprom_option->data + option_len); } - return (0); } @@ -1207,7 +1217,9 @@ upgt_eeprom_parse_freq3(struct upgt_soft { struct upgt_eeprom_freq3_header *freq3_header; struct upgt_lmac_freq3 *freq3; - int i, elements, flags; + int i; + int elements; + int flags; unsigned channel; freq3_header = (struct upgt_eeprom_freq3_header *)data; @@ -1219,6 +1231,9 @@ upgt_eeprom_parse_freq3(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "flags=0x%02x elements=%d\n", flags, elements); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq3[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq3[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) @@ -1237,7 +1252,11 @@ upgt_eeprom_parse_freq4(struct upgt_soft struct upgt_eeprom_freq4_header *freq4_header; struct upgt_eeprom_freq4_1 *freq4_1; struct upgt_eeprom_freq4_2 *freq4_2; - int i, j, elements, settings, flags; + int i; + int j; + int elements; + int settings; + int flags; unsigned channel; freq4_header = (struct upgt_eeprom_freq4_header *)data; @@ -1252,6 +1271,9 @@ upgt_eeprom_parse_freq4(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "flags=0x%02x elements=%d settings=%d\n", flags, elements, settings); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq4_1[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq4_1[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) @@ -1272,7 +1294,8 @@ void upgt_eeprom_parse_freq6(struct upgt_softc *sc, uint8_t *data, int len) { struct upgt_lmac_freq6 *freq6; - int i, elements; + int i; + int elements; unsigned channel; freq6 = (struct upgt_lmac_freq6 *)data; @@ -1280,6 +1303,9 @@ upgt_eeprom_parse_freq6(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "elements=%d\n", elements); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq6[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq6[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) Modified: stable/8/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgtvar.h Thu Feb 28 16:32:36 2013 (r247470) +++ stable/8/sys/dev/usb/wlan/if_upgtvar.h Thu Feb 28 16:36:12 2013 (r247471) @@ -451,7 +451,7 @@ struct upgt_softc { struct upgt_memory sc_memory; /* data which we found in the EEPROM */ - uint8_t sc_eeprom[UPGT_EEPROM_SIZE]; + uint8_t sc_eeprom[2 * UPGT_EEPROM_SIZE] __aligned(4); uint16_t sc_eeprom_hwrx; struct upgt_lmac_freq3 sc_eeprom_freq3[IEEE80211_CHAN_MAX]; struct upgt_lmac_freq4 sc_eeprom_freq4[IEEE80211_CHAN_MAX][8]; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:38:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0835A540; Thu, 28 Feb 2013 16:38:30 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EDACC6A; Thu, 28 Feb 2013 16:38:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGcTpX063663; Thu, 28 Feb 2013 16:38:29 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGcTlk063656; Thu, 28 Feb 2013 16:38:29 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201302281638.r1SGcTlk063656@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 28 Feb 2013 16:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247472 - in stable/9/sys: conf dev/mxge modules/mxge/mxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:38:30 -0000 Author: gallatin Date: Thu Feb 28 16:38:28 2013 New Revision: 247472 URL: http://svnweb.freebsd.org/changeset/base/247472 Log: MFC r247133 and associated fixes (r247151, r247152): r247133: Improve mxge's receive performance for IPv6: - Add support for IPv6 rx csum offload - Finally switch mxge from using its own driver lro, to using tcp_lro r247151: Fix build. r247152: Try harder to make mxge safe for all combinations of INET and INET6 - Re-fix build by restoring local removed in r247151, but protected by #if defined(INET) || defined(INET6) so that the compile succeeds in the !(INET||INET6) case. - Protect call to in_pseudo() with an #ifdef INET, to allow a kernel to link with mxge when INET is not compiled in. - Also remove an errant (improperly commented) obsolete debugging printf Deleted: stable/9/sys/dev/mxge/mxge_lro.c Modified: stable/9/sys/conf/files stable/9/sys/dev/mxge/if_mxge.c stable/9/sys/dev/mxge/if_mxge_var.h stable/9/sys/modules/mxge/mxge/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Thu Feb 28 16:36:12 2013 (r247471) +++ stable/9/sys/conf/files Thu Feb 28 16:38:28 2013 (r247472) @@ -1557,7 +1557,6 @@ mwlboot.fw optional mwlfw \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci -dev/mxge/mxge_lro.c optional mxge pci dev/mxge/mxge_eth_z8e.c optional mxge pci dev/mxge/mxge_ethp_z8e.c optional mxge pci dev/mxge/mxge_rss_eth_z8e.c optional mxge pci Modified: stable/9/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/9/sys/dev/mxge/if_mxge.c Thu Feb 28 16:36:12 2013 (r247471) +++ stable/9/sys/dev/mxge/if_mxge.c Thu Feb 28 16:38:28 2013 (r247472) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -102,7 +103,6 @@ static int mxge_intr_coal_delay = 30; static int mxge_deassert_wait = 1; static int mxge_flow_control = 1; static int mxge_verbose = 0; -static int mxge_lro_cnt = 8; static int mxge_ticks; static int mxge_max_slices = 1; static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; @@ -1310,9 +1310,9 @@ mxge_reset(mxge_softc_t *sc, int interru ss->tx.stall = 0; ss->rx_big.cnt = 0; ss->rx_small.cnt = 0; - ss->lro_bad_csum = 0; - ss->lro_queued = 0; - ss->lro_flushed = 0; + ss->lc.lro_bad_csum = 0; + ss->lc.lro_queued = 0; + ss->lc.lro_flushed = 0; if (ss->fw_stats != NULL) { bzero(ss->fw_stats, sizeof *ss->fw_stats); } @@ -1413,50 +1413,6 @@ mxge_change_flow_control(SYSCTL_HANDLER_ } static int -mxge_change_lro_locked(mxge_softc_t *sc, int lro_cnt) -{ - struct ifnet *ifp; - int err = 0; - - ifp = sc->ifp; - if (lro_cnt == 0) - ifp->if_capenable &= ~IFCAP_LRO; - else - ifp->if_capenable |= IFCAP_LRO; - sc->lro_cnt = lro_cnt; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc, 0); - err = mxge_open(sc); - } - return err; -} - -static int -mxge_change_lro(SYSCTL_HANDLER_ARGS) -{ - mxge_softc_t *sc; - unsigned int lro_cnt; - int err; - - sc = arg1; - lro_cnt = sc->lro_cnt; - err = sysctl_handle_int(oidp, &lro_cnt, arg2, req); - if (err != 0) - return err; - - if (lro_cnt == sc->lro_cnt) - return 0; - - if (lro_cnt > 128) - return EINVAL; - - mtx_lock(&sc->driver_mtx); - err = mxge_change_lro_locked(sc, lro_cnt); - mtx_unlock(&sc->driver_mtx); - return err; -} - -static int mxge_handle_be32(SYSCTL_HANDLER_ARGS) { int err; @@ -1652,14 +1608,6 @@ mxge_add_sysctls(mxge_softc_t *sc) CTLFLAG_RW, &mxge_verbose, 0, "verbose printing"); - /* lro */ - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, - "lro_cnt", - CTLTYPE_INT|CTLFLAG_RW, sc, - 0, mxge_change_lro, - "I", "number of lro merge queues"); - - /* add counters exported for debugging from all slices */ sysctl_ctx_init(&sc->slice_sysctl_ctx); sc->slice_sysctl_tree = @@ -1685,11 +1633,15 @@ mxge_add_sysctls(mxge_softc_t *sc) CTLFLAG_RD, &ss->rx_big.cnt, 0, "rx_small_cnt"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, - "lro_flushed", CTLFLAG_RD, &ss->lro_flushed, + "lro_flushed", CTLFLAG_RD, &ss->lc.lro_flushed, 0, "number of lro merge queues flushed"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, - "lro_queued", CTLFLAG_RD, &ss->lro_queued, + "lro_bad_csum", CTLFLAG_RD, &ss->lc.lro_bad_csum, + 0, "number of bad csums preventing LRO"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "lro_queued", CTLFLAG_RD, &ss->lc.lro_queued, 0, "number of frames appended to lro merge" "queues"); @@ -1934,11 +1886,13 @@ mxge_encap_tso(struct mxge_slice_state * IPPROTO_TCP, 0); #endif } else { +#ifdef INET m->m_pkthdr.csum_flags |= CSUM_TCP; sum = in_pseudo(pi->ip->ip_src.s_addr, pi->ip->ip_dst.s_addr, htons(IPPROTO_TCP + (m->m_pkthdr.len - cksum_offset))); +#endif } m_copyback(m, offsetof(struct tcphdr, th_sum) + cksum_offset, sizeof(sum), (caddr_t)&sum); @@ -2533,6 +2487,62 @@ done: return err; } +#ifdef INET6 + +static uint16_t +mxge_csum_generic(uint16_t *raw, int len) +{ + uint32_t csum; + + + csum = 0; + while (len > 0) { + csum += *raw; + raw++; + len -= 2; + } + csum = (csum >> 16) + (csum & 0xffff); + csum = (csum >> 16) + (csum & 0xffff); + return (uint16_t)csum; +} + +static inline uint16_t +mxge_rx_csum6(void *p, struct mbuf *m, uint32_t csum) +{ + uint32_t partial; + int nxt, cksum_offset; + struct ip6_hdr *ip6 = p; + uint16_t c; + + nxt = ip6->ip6_nxt; + cksum_offset = sizeof (*ip6) + ETHER_HDR_LEN; + if (nxt != IPPROTO_TCP && nxt != IPPROTO_UDP) { + cksum_offset = ip6_lasthdr(m, ETHER_HDR_LEN, + IPPROTO_IPV6, &nxt); + if (nxt != IPPROTO_TCP && nxt != IPPROTO_UDP) + return (1); + } + + /* + * IPv6 headers do not contain a checksum, and hence + * do not checksum to zero, so they don't "fall out" + * of the partial checksum calculation like IPv4 + * headers do. We need to fix the partial checksum by + * subtracting the checksum of the IPv6 header. + */ + + partial = mxge_csum_generic((uint16_t *)ip6, cksum_offset - + ETHER_HDR_LEN); + csum += ~partial; + csum += (csum < ~partial); + csum = (csum >> 16) + (csum & 0xFFFF); + csum = (csum >> 16) + (csum & 0xFFFF); + c = in6_cksum_pseudo(ip6, m->m_pkthdr.len - cksum_offset, nxt, + csum); + c ^= 0xffff; + return (c); +} +#endif /* INET6 */ /* * Myri10GE hardware checksums are not valid if the sender * padded the frame with non-zero padding. This is because @@ -2546,26 +2556,41 @@ static inline uint16_t mxge_rx_csum(struct mbuf *m, int csum) { struct ether_header *eh; +#ifdef INET struct ip *ip; - uint16_t c; +#endif +#if defined(INET) || defined(INET6) + int cap = m->m_pkthdr.rcvif->if_capenable; +#endif + uint16_t c, etype; - eh = mtod(m, struct ether_header *); - /* only deal with IPv4 TCP & UDP for now */ - if (__predict_false(eh->ether_type != htons(ETHERTYPE_IP))) - return 1; - ip = (struct ip *)(eh + 1); - if (__predict_false(ip->ip_p != IPPROTO_TCP && - ip->ip_p != IPPROTO_UDP)) - return 1; + eh = mtod(m, struct ether_header *); + etype = ntohs(eh->ether_type); + switch (etype) { #ifdef INET - c = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, - htonl(ntohs(csum) + ntohs(ip->ip_len) + - - (ip->ip_hl << 2) + ip->ip_p)); -#else - c = 1; + case ETHERTYPE_IP: + if ((cap & IFCAP_RXCSUM) == 0) + return (1); + ip = (struct ip *)(eh + 1); + if (ip->ip_p != IPPROTO_TCP && ip->ip_p != IPPROTO_UDP) + return (1); + c = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, + htonl(ntohs(csum) + ntohs(ip->ip_len) - + (ip->ip_hl << 2) + ip->ip_p)); + c ^= 0xffff; + break; #endif - c ^= 0xffff; +#ifdef INET6 + case ETHERTYPE_IPV6: + if ((cap & IFCAP_RXCSUM_IPV6) == 0) + return (1); + c = mxge_rx_csum6((eh + 1), m, csum); + break; +#endif + default: + c = 1; + } return (c); } @@ -2627,7 +2652,8 @@ mxge_vlan_tag_remove(struct mbuf *m, uin static inline void -mxge_rx_done_big(struct mxge_slice_state *ss, uint32_t len, uint32_t csum) +mxge_rx_done_big(struct mxge_slice_state *ss, uint32_t len, + uint32_t csum, int lro) { mxge_softc_t *sc; struct ifnet *ifp; @@ -2636,7 +2662,6 @@ mxge_rx_done_big(struct mxge_slice_state mxge_rx_ring_t *rx; bus_dmamap_t old_map; int idx; - uint16_t tcpudp_csum; sc = ss->sc; ifp = sc->ifp; @@ -2673,14 +2698,18 @@ mxge_rx_done_big(struct mxge_slice_state mxge_vlan_tag_remove(m, &csum); } /* if the checksum is valid, mark it in the mbuf header */ - if (sc->csum_flag && (0 == (tcpudp_csum = mxge_rx_csum(m, csum)))) { - if (sc->lro_cnt && (0 == mxge_lro_rx(ss, m, csum))) - return; - /* otherwise, it was a UDP frame, or a TCP frame which - we could not do LRO on. Tell the stack that the - checksum is good */ + + if ((ifp->if_capenable & (IFCAP_RXCSUM_IPV6 | IFCAP_RXCSUM)) && + (0 == mxge_rx_csum(m, csum))) { + /* Tell the stack that the checksum is good */ m->m_pkthdr.csum_data = 0xffff; - m->m_pkthdr.csum_flags = CSUM_PSEUDO_HDR | CSUM_DATA_VALID; + m->m_pkthdr.csum_flags = CSUM_PSEUDO_HDR | + CSUM_DATA_VALID; + +#if defined(INET) || defined (INET6) + if (lro && (0 == tcp_lro_rx(&ss->lc, m, 0))) + return; +#endif } /* flowid only valid if RSS hashing is enabled */ if (sc->num_slices > 1) { @@ -2692,7 +2721,8 @@ mxge_rx_done_big(struct mxge_slice_state } static inline void -mxge_rx_done_small(struct mxge_slice_state *ss, uint32_t len, uint32_t csum) +mxge_rx_done_small(struct mxge_slice_state *ss, uint32_t len, + uint32_t csum, int lro) { mxge_softc_t *sc; struct ifnet *ifp; @@ -2701,7 +2731,6 @@ mxge_rx_done_small(struct mxge_slice_sta mxge_rx_ring_t *rx; bus_dmamap_t old_map; int idx; - uint16_t tcpudp_csum; sc = ss->sc; ifp = sc->ifp; @@ -2738,14 +2767,17 @@ mxge_rx_done_small(struct mxge_slice_sta mxge_vlan_tag_remove(m, &csum); } /* if the checksum is valid, mark it in the mbuf header */ - if (sc->csum_flag && (0 == (tcpudp_csum = mxge_rx_csum(m, csum)))) { - if (sc->lro_cnt && (0 == mxge_lro_rx(ss, m, csum))) - return; - /* otherwise, it was a UDP frame, or a TCP frame which - we could not do LRO on. Tell the stack that the - checksum is good */ + if ((ifp->if_capenable & (IFCAP_RXCSUM_IPV6 | IFCAP_RXCSUM)) && + (0 == mxge_rx_csum(m, csum))) { + /* Tell the stack that the checksum is good */ m->m_pkthdr.csum_data = 0xffff; - m->m_pkthdr.csum_flags = CSUM_PSEUDO_HDR | CSUM_DATA_VALID; + m->m_pkthdr.csum_flags = CSUM_PSEUDO_HDR | + CSUM_DATA_VALID; + +#if defined(INET) || defined (INET6) + if (lro && (0 == tcp_lro_rx(&ss->lc, m, csum))) + return; +#endif } /* flowid only valid if RSS hashing is enabled */ if (sc->num_slices > 1) { @@ -2763,16 +2795,17 @@ mxge_clean_rx_done(struct mxge_slice_sta int limit = 0; uint16_t length; uint16_t checksum; + int lro; - + lro = ss->sc->ifp->if_capenable & IFCAP_LRO; while (rx_done->entry[rx_done->idx].length != 0) { length = ntohs(rx_done->entry[rx_done->idx].length); rx_done->entry[rx_done->idx].length = 0; checksum = rx_done->entry[rx_done->idx].checksum; if (length <= (MHLEN - MXGEFW_PAD)) - mxge_rx_done_small(ss, length, checksum); + mxge_rx_done_small(ss, length, checksum, lro); else - mxge_rx_done_big(ss, length, checksum); + mxge_rx_done_big(ss, length, checksum, lro); rx_done->cnt++; rx_done->idx = rx_done->cnt & rx_done->mask; @@ -2780,11 +2813,11 @@ mxge_clean_rx_done(struct mxge_slice_sta if (__predict_false(++limit > rx_done->mask / 2)) break; } -#ifdef INET - while (!SLIST_EMPTY(&ss->lro_active)) { - struct lro_entry *lro = SLIST_FIRST(&ss->lro_active); - SLIST_REMOVE_HEAD(&ss->lro_active, next); - mxge_lro_flush(ss, lro); +#if defined(INET) || defined (INET6) + while (!SLIST_EMPTY(&ss->lc.lro_active)) { + struct lro_entry *lro = SLIST_FIRST(&ss->lc.lro_active); + SLIST_REMOVE_HEAD(&ss->lc.lro_active, next); + tcp_lro_flush(&ss->lc, lro); } #endif } @@ -3152,15 +3185,11 @@ mxge_init(void *arg) static void mxge_free_slice_mbufs(struct mxge_slice_state *ss) { - struct lro_entry *lro_entry; int i; - while (!SLIST_EMPTY(&ss->lro_free)) { - lro_entry = SLIST_FIRST(&ss->lro_free); - SLIST_REMOVE_HEAD(&ss->lro_free, next); - free(lro_entry, M_DEVBUF); - } - +#if defined(INET) || defined(INET6) + tcp_lro_free(&ss->lc); +#endif for (i = 0; i <= ss->rx_big.mask; i++) { if (ss->rx_big.info[i].m == NULL) continue; @@ -3544,26 +3573,17 @@ mxge_slice_open(struct mxge_slice_state mxge_softc_t *sc; mxge_cmd_t cmd; bus_dmamap_t map; - struct lro_entry *lro_entry; int err, i, slice; sc = ss->sc; slice = ss - sc->ss; - SLIST_INIT(&ss->lro_free); - SLIST_INIT(&ss->lro_active); - - for (i = 0; i < sc->lro_cnt; i++) { - lro_entry = (struct lro_entry *) - malloc(sizeof (*lro_entry), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (lro_entry == NULL) { - sc->lro_cnt = i; - break; - } - SLIST_INSERT_HEAD(&ss->lro_free, lro_entry, next); - } +#if defined(INET) || defined(INET6) + (void)tcp_lro_init(&ss->lc); +#endif + ss->lc.ifp = sc->ifp; + /* get the lanai pointers to the send and receive rings */ err = 0; @@ -4218,10 +4238,8 @@ mxge_ioctl(struct ifnet *ifp, u_long com } else if (mask & IFCAP_RXCSUM) { if (IFCAP_RXCSUM & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_RXCSUM; - sc->csum_flag = 0; } else { ifp->if_capenable |= IFCAP_RXCSUM; - sc->csum_flag = 1; } } if (mask & IFCAP_TSO4) { @@ -4248,16 +4266,12 @@ mxge_ioctl(struct ifnet *ifp, u_long com ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); } -#ifdef NOTYET - } else if (mask & IFCAP_RXCSUM6) { - if (IFCAP_RXCSUM6 & ifp->if_capenable) { - ifp->if_capenable &= ~IFCAP_RXCSUM6; - sc->csum_flag = 0; + } else if (mask & IFCAP_RXCSUM_IPV6) { + if (IFCAP_RXCSUM_IPV6 & ifp->if_capenable) { + ifp->if_capenable &= ~IFCAP_RXCSUM_IPV6; } else { - ifp->if_capenable |= IFCAP_RXCSUM6; - sc->csum_flag = 1; + ifp->if_capenable |= IFCAP_RXCSUM_IPV6; } -#endif } if (mask & IFCAP_TSO6) { if (IFCAP_TSO6 & ifp->if_capenable) { @@ -4273,12 +4287,8 @@ mxge_ioctl(struct ifnet *ifp, u_long com } #endif /*IFCAP_TSO6 */ - if (mask & IFCAP_LRO) { - if (IFCAP_LRO & ifp->if_capenable) - err = mxge_change_lro_locked(sc, 0); - else - err = mxge_change_lro_locked(sc, mxge_lro_cnt); - } + if (mask & IFCAP_LRO) + ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (mask & IFCAP_VLAN_HWTSO) @@ -4325,14 +4335,11 @@ mxge_fetch_tunables(mxge_softc_t *sc) TUNABLE_INT_FETCH("hw.mxge.verbose", &mxge_verbose); TUNABLE_INT_FETCH("hw.mxge.ticks", &mxge_ticks); - TUNABLE_INT_FETCH("hw.mxge.lro_cnt", &sc->lro_cnt); TUNABLE_INT_FETCH("hw.mxge.always_promisc", &mxge_always_promisc); TUNABLE_INT_FETCH("hw.mxge.rss_hash_type", &mxge_rss_hash_type); TUNABLE_INT_FETCH("hw.mxge.rss_hashtype", &mxge_rss_hash_type); TUNABLE_INT_FETCH("hw.mxge.initial_mtu", &mxge_initial_mtu); TUNABLE_INT_FETCH("hw.mxge.throttle", &mxge_throttle); - if (sc->lro_cnt != 0) - mxge_lro_cnt = sc->lro_cnt; if (bootverbose) mxge_verbose = 1; @@ -4896,8 +4903,9 @@ mxge_attach(device_t dev) ifp->if_baudrate = IF_Gbps(10UL); ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4 | - IFCAP_VLAN_MTU | IFCAP_LINKSTATE | IFCAP_TXCSUM_IPV6; -#ifdef INET + IFCAP_VLAN_MTU | IFCAP_LINKSTATE | IFCAP_TXCSUM_IPV6 | + IFCAP_RXCSUM_IPV6; +#if defined(INET) || defined(INET6) ifp->if_capabilities |= IFCAP_LRO; #endif @@ -4928,7 +4936,6 @@ mxge_attach(device_t dev) ifp->if_capenable = ifp->if_capabilities; if (sc->lro_cnt == 0) ifp->if_capenable &= ~IFCAP_LRO; - sc->csum_flag = 1; ifp->if_init = mxge_init; ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; Modified: stable/9/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/9/sys/dev/mxge/if_mxge_var.h Thu Feb 28 16:36:12 2013 (r247471) +++ stable/9/sys/dev/mxge/if_mxge_var.h Thu Feb 28 16:38:28 2013 (r247472) @@ -181,31 +181,6 @@ typedef struct char mtx_name[16]; } mxge_tx_ring_t; -struct lro_entry; -struct lro_entry -{ - SLIST_ENTRY(lro_entry) next; - struct mbuf *m_head; - struct mbuf *m_tail; - int timestamp; - struct ip *ip; - uint32_t tsval; - uint32_t tsecr; - uint32_t source_ip; - uint32_t dest_ip; - uint32_t next_seq; - uint32_t ack_seq; - uint32_t len; - uint32_t data_csum; - uint16_t window; - uint16_t source_port; - uint16_t dest_port; - uint16_t append_cnt; - uint16_t mss; - -}; -SLIST_HEAD(lro_head, lro_entry); - struct mxge_softc; typedef struct mxge_softc mxge_softc_t; @@ -223,11 +198,7 @@ struct mxge_slice_state { u_long omcasts; u_long oerrors; int if_drv_flags; - struct lro_head lro_active; - struct lro_head lro_free; - int lro_queued; - int lro_flushed; - int lro_bad_csum; + struct lro_ctrl lc; mxge_dma_t fw_stats_dma; struct sysctl_oid *sysctl_tree; struct sysctl_ctx_list sysctl_ctx; @@ -237,7 +208,6 @@ struct mxge_slice_state { struct mxge_softc { struct ifnet* ifp; struct mxge_slice_state *ss; - int csum_flag; /* rx_csums? */ int tx_boundary; /* boundary transmits cannot cross*/ int lro_cnt; bus_dma_tag_t parent_dmat; Modified: stable/9/sys/modules/mxge/mxge/Makefile ============================================================================== --- stable/9/sys/modules/mxge/mxge/Makefile Thu Feb 28 16:36:12 2013 (r247471) +++ stable/9/sys/modules/mxge/mxge/Makefile Thu Feb 28 16:38:28 2013 (r247472) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../../dev/mxge KMOD= if_mxge -SRCS= if_mxge.c mxge_lro.c device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +SRCS= if_mxge.c device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h .include From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:39:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1B1F9796; Thu, 28 Feb 2013 16:39:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01EDC86; Thu, 28 Feb 2013 16:39:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGdihe063878; Thu, 28 Feb 2013 16:39:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGdiDc063874; Thu, 28 Feb 2013 16:39:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281639.r1SGdiDc063874@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247473 - stable/9/sys/dev/usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:39:45 -0000 Author: hselasky Date: Thu Feb 28 16:39:44 2013 New Revision: 247473 URL: http://svnweb.freebsd.org/changeset/base/247473 Log: MFC r246944: Fix bad EEPROM parsing code. Modified: stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_upgtvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgt.c Thu Feb 28 16:38:28 2013 (r247472) +++ stable/9/sys/dev/usb/wlan/if_upgt.c Thu Feb 28 16:39:44 2013 (r247473) @@ -1122,12 +1122,23 @@ upgt_eeprom_parse(struct upgt_softc *sc) (sizeof(struct upgt_eeprom_header) + preamble_len)); while (!option_end) { + + /* sanity check */ + if (eeprom_option >= (struct upgt_eeprom_option *) + (sc->sc_eeprom + UPGT_EEPROM_SIZE)) { + return (EINVAL); + } + /* the eeprom option length is stored in words */ option_len = (le16toh(eeprom_option->len) - 1) * sizeof(uint16_t); option_type = le16toh(eeprom_option->type); + /* sanity check */ + if (option_len == 0 || option_len >= UPGT_EEPROM_SIZE) + return (EINVAL); + switch (option_type) { case UPGT_EEPROM_TYPE_NAME: DPRINTF(sc, UPGT_DEBUG_FW, @@ -1198,7 +1209,6 @@ upgt_eeprom_parse(struct upgt_softc *sc) eeprom_option = (struct upgt_eeprom_option *) (eeprom_option->data + option_len); } - return (0); } @@ -1207,7 +1217,9 @@ upgt_eeprom_parse_freq3(struct upgt_soft { struct upgt_eeprom_freq3_header *freq3_header; struct upgt_lmac_freq3 *freq3; - int i, elements, flags; + int i; + int elements; + int flags; unsigned channel; freq3_header = (struct upgt_eeprom_freq3_header *)data; @@ -1219,6 +1231,9 @@ upgt_eeprom_parse_freq3(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "flags=0x%02x elements=%d\n", flags, elements); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq3[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq3[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) @@ -1237,7 +1252,11 @@ upgt_eeprom_parse_freq4(struct upgt_soft struct upgt_eeprom_freq4_header *freq4_header; struct upgt_eeprom_freq4_1 *freq4_1; struct upgt_eeprom_freq4_2 *freq4_2; - int i, j, elements, settings, flags; + int i; + int j; + int elements; + int settings; + int flags; unsigned channel; freq4_header = (struct upgt_eeprom_freq4_header *)data; @@ -1252,6 +1271,9 @@ upgt_eeprom_parse_freq4(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "flags=0x%02x elements=%d settings=%d\n", flags, elements, settings); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq4_1[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq4_1[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) @@ -1272,7 +1294,8 @@ void upgt_eeprom_parse_freq6(struct upgt_softc *sc, uint8_t *data, int len) { struct upgt_lmac_freq6 *freq6; - int i, elements; + int i; + int elements; unsigned channel; freq6 = (struct upgt_lmac_freq6 *)data; @@ -1280,6 +1303,9 @@ upgt_eeprom_parse_freq6(struct upgt_soft DPRINTF(sc, UPGT_DEBUG_FW, "elements=%d\n", elements); + if (elements >= (int)(UPGT_EEPROM_SIZE / sizeof(freq6[0]))) + return; + for (i = 0; i < elements; i++) { channel = ieee80211_mhz2ieee(le16toh(freq6[i].freq), 0); if (channel >= IEEE80211_CHAN_MAX) Modified: stable/9/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgtvar.h Thu Feb 28 16:38:28 2013 (r247472) +++ stable/9/sys/dev/usb/wlan/if_upgtvar.h Thu Feb 28 16:39:44 2013 (r247473) @@ -451,7 +451,7 @@ struct upgt_softc { struct upgt_memory sc_memory; /* data which we found in the EEPROM */ - uint8_t sc_eeprom[UPGT_EEPROM_SIZE]; + uint8_t sc_eeprom[2 * UPGT_EEPROM_SIZE] __aligned(4); uint16_t sc_eeprom_hwrx; struct upgt_lmac_freq3 sc_eeprom_freq3[IEEE80211_CHAN_MAX]; struct upgt_lmac_freq4 sc_eeprom_freq4[IEEE80211_CHAN_MAX][8]; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:43:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1B498A3F; Thu, 28 Feb 2013 16:43:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF4FE1; Thu, 28 Feb 2013 16:43:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGhftD066132; Thu, 28 Feb 2013 16:43:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGhfhp066130; Thu, 28 Feb 2013 16:43:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281643.r1SGhfhp066130@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247474 - in stable/9/sys/dev/usb: . serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:43:42 -0000 Author: hselasky Date: Thu Feb 28 16:43:41 2013 New Revision: 247474 URL: http://svnweb.freebsd.org/changeset/base/247474 Log: MFC r246753: Add new USB ID to FTDI driver. PR: kern/175893 Modified: stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Thu Feb 28 16:39:44 2013 (r247473) +++ stable/9/sys/dev/usb/serial/uftdi.c Thu Feb 28 16:43:41 2013 (r247474) @@ -378,6 +378,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, IPLUS2, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, IRTRANS, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, KBS, UFTDI_TYPE_8U232AM), + UFTDI_DEV(FTDI, KTLINK, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, LENZ_LIUSB, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, LK202, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, LK204, UFTDI_TYPE_8U232AM), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Feb 28 16:39:44 2013 (r247473) +++ stable/9/sys/dev/usb/usbdevs Thu Feb 28 16:43:41 2013 (r247474) @@ -1713,6 +1713,7 @@ product FTDI 232H 0x6014 FTDI compatibl product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial product FTDI SERIAL_4232H 0x6011 FT4232H Quad port Serial product FTDI BEAGLEBONE 0xa6d0 BeagleBone +product FTDI KTLINK 0xbbe2 KT-LINK Embedded Hackers Multitool product FTDI TURTELIZER2 0xbdc8 egnite Turtelizer 2 JTAG/RS232 Adapter /* Gude Analog- und Digitalsysteme products also uses FTDI's id: */ product FTDI TACTRIX_OPENPORT_13M 0xcc48 OpenPort 1.3 Mitsubishi From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 16:56:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EC011276; Thu, 28 Feb 2013 16:56:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D0D3118C; Thu, 28 Feb 2013 16:56:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SGuALR069607; Thu, 28 Feb 2013 16:56:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SGu9Rr069596; Thu, 28 Feb 2013 16:56:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201302281656.r1SGu9Rr069596@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 28 Feb 2013 16:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247475 - in stable/9: lib/libusb sys/dev/usb usr.sbin/usbconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 16:56:11 -0000 Author: hselasky Date: Thu Feb 28 16:56:08 2013 New Revision: 247475 URL: http://svnweb.freebsd.org/changeset/base/247475 Log: MFC r246789: Add USB API to read power draw on USB devices. Update usbconfig to print power draw on USB devices. Modified: stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb20.3 stable/9/lib/libusb/libusb20.c stable/9/lib/libusb/libusb20.h stable/9/lib/libusb/libusb20_int.h stable/9/lib/libusb/libusb20_ugen20.c stable/9/sys/dev/usb/usb_generic.c stable/9/sys/dev/usb/usb_ioctl.h stable/9/usr.sbin/usbconfig/dump.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/lib/libusb/Makefile ============================================================================== --- stable/9/lib/libusb/Makefile Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/Makefile Thu Feb 28 16:56:08 2013 (r247475) @@ -189,6 +189,7 @@ MLINKS += libusb20.3 libusb20_dev_reset. MLINKS += libusb20.3 libusb20_dev_check_connected.3 MLINKS += libusb20.3 libusb20_dev_set_power_mode.3 MLINKS += libusb20.3 libusb20_dev_get_power_mode.3 +MLINKS += libusb20.3 libusb20_dev_get_power_usage.3 MLINKS += libusb20.3 libusb20_dev_set_alt_index.3 MLINKS += libusb20.3 libusb20_dev_get_device_desc.3 MLINKS += libusb20.3 libusb20_dev_alloc_config.3 Modified: stable/9/lib/libusb/libusb20.3 ============================================================================== --- stable/9/lib/libusb/libusb20.3 Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/libusb20.3 Thu Feb 28 16:56:08 2013 (r247475) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd February 14, 2013 .Dt LIBUSB20 3 .Os .Sh NAME @@ -148,6 +148,8 @@ USB access library (libusb -lusb) .Fn libusb20_dev_set_power_mode "struct libusb20_device *pdev" "uint8_t power_mode" .Ft uint8_t .Fn libusb20_dev_get_power_mode "struct libusb20_device *pdev" +.Ft uint16_t +.Fn libusb20_dev_get_power_usage "struct libusb20_device *pdev" .Ft int .Fn libusb20_dev_set_alt_index "struct libusb20_device *pdev" "uint8_t iface_index" "uint8_t alt_index" .Ft struct LIBUSB20_DEVICE_DESC_DECODED * @@ -728,6 +730,12 @@ USB device. . .Pp . +.Fn libusb20_dev_get_power_usage +returns the reported power usage in milliamps for the given USB device. +A power usage of zero typically means that the device is self powered. +. +.Pp +. .Fn libusb20_dev_set_alt_index will try to set the given alternate index for the given USB interface index. Modified: stable/9/lib/libusb/libusb20.c ============================================================================== --- stable/9/lib/libusb/libusb20.c Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/libusb20.c Thu Feb 28 16:56:08 2013 (r247475) @@ -71,6 +71,7 @@ dummy_callback(struct libusb20_transfer #define dummy_check_connected (void *)dummy_int #define dummy_set_power_mode (void *)dummy_int #define dummy_get_power_mode (void *)dummy_int +#define dummy_get_power_usage (void *)dummy_int #define dummy_kernel_driver_active (void *)dummy_int #define dummy_detach_kernel_driver (void *)dummy_int #define dummy_do_request_sync (void *)dummy_int @@ -710,6 +711,18 @@ libusb20_dev_get_power_mode(struct libus return (power_mode); } +uint16_t +libusb20_dev_get_power_usage(struct libusb20_device *pdev) +{ + int error; + uint16_t power_usage; + + error = pdev->methods->get_power_usage(pdev, &power_usage); + if (error) + power_usage = 0; + return (power_usage); +} + int libusb20_dev_set_alt_index(struct libusb20_device *pdev, uint8_t ifaceIndex, uint8_t altIndex) { Modified: stable/9/lib/libusb/libusb20.h ============================================================================== --- stable/9/lib/libusb/libusb20.h Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/libusb20.h Thu Feb 28 16:56:08 2013 (r247475) @@ -254,6 +254,7 @@ int libusb20_dev_reset(struct libusb20_d int libusb20_dev_check_connected(struct libusb20_device *pdev); int libusb20_dev_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode); uint8_t libusb20_dev_get_power_mode(struct libusb20_device *pdev); +uint16_t libusb20_dev_get_power_usage(struct libusb20_device *pdev); int libusb20_dev_set_alt_index(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index); int libusb20_dev_get_info(struct libusb20_device *pdev, struct usb_device_info *pinfo); int libusb20_dev_get_iface_desc(struct libusb20_device *pdev, uint8_t iface_index, char *buf, uint8_t len); Modified: stable/9/lib/libusb/libusb20_int.h ============================================================================== --- stable/9/lib/libusb/libusb20_int.h Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/libusb20_int.h Thu Feb 28 16:56:08 2013 (r247475) @@ -105,6 +105,7 @@ typedef int (libusb20_process_t)(struct typedef int (libusb20_reset_device_t)(struct libusb20_device *pdev); typedef int (libusb20_set_power_mode_t)(struct libusb20_device *pdev, uint8_t power_mode); typedef int (libusb20_get_power_mode_t)(struct libusb20_device *pdev, uint8_t *power_mode); +typedef int (libusb20_get_power_usage_t)(struct libusb20_device *pdev, uint16_t *power_usage); typedef int (libusb20_set_alt_index_t)(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index); typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t index); typedef int (libusb20_check_connected_t)(struct libusb20_device *pdev); @@ -127,6 +128,7 @@ typedef void (libusb20_tr_cancel_async_t m(n, check_connected) \ m(n, set_power_mode) \ m(n, get_power_mode) \ + m(n, get_power_usage) \ m(n, set_alt_index) \ m(n, set_config_index) \ m(n, tr_cancel_async) \ Modified: stable/9/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/9/lib/libusb/libusb20_ugen20.c Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/lib/libusb/libusb20_ugen20.c Thu Feb 28 16:56:08 2013 (r247475) @@ -69,6 +69,7 @@ static libusb20_reset_device_t ugen20_re static libusb20_check_connected_t ugen20_check_connected; static libusb20_set_power_mode_t ugen20_set_power_mode; static libusb20_get_power_mode_t ugen20_get_power_mode; +static libusb20_get_power_usage_t ugen20_get_power_usage; static libusb20_kernel_driver_active_t ugen20_kernel_driver_active; static libusb20_detach_kernel_driver_t ugen20_detach_kernel_driver; static libusb20_do_request_sync_t ugen20_do_request_sync; @@ -639,6 +640,18 @@ ugen20_get_power_mode(struct libusb20_de } static int +ugen20_get_power_usage(struct libusb20_device *pdev, uint16_t *power_usage) +{ + int temp; + + if (ioctl(pdev->file_ctrl, USB_GET_POWER_USAGE, &temp)) { + return (LIBUSB20_ERROR_OTHER); + } + *power_usage = temp; + return (0); /* success */ +} + +static int ugen20_kernel_driver_active(struct libusb20_device *pdev, uint8_t iface_index) { Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/sys/dev/usb/usb_generic.c Thu Feb 28 16:56:08 2013 (r247475) @@ -1831,6 +1831,17 @@ ugen_get_power_mode(struct usb_fifo *f) } static int +ugen_get_power_usage(struct usb_fifo *f) +{ + struct usb_device *udev = f->udev; + + if (udev == NULL) + return (0); + + return (udev->power); +} + +static int ugen_do_port_feature(struct usb_fifo *f, uint8_t port_no, uint8_t set, uint16_t feature) { @@ -2192,6 +2203,10 @@ ugen_ioctl_post(struct usb_fifo *f, u_lo *u.pint = ugen_get_power_mode(f); break; + case USB_GET_POWER_USAGE: + *u.pint = ugen_get_power_usage(f); + break; + case USB_SET_PORT_ENABLE: error = ugen_do_port_feature(f, *u.pint, 1, UHF_PORT_ENABLE); Modified: stable/9/sys/dev/usb/usb_ioctl.h ============================================================================== --- stable/9/sys/dev/usb/usb_ioctl.h Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/sys/dev/usb/usb_ioctl.h Thu Feb 28 16:56:08 2013 (r247475) @@ -270,7 +270,8 @@ struct usb_gen_quirk { #define USB_IFACE_DRIVER_DETACH _IOW ('U', 125, int) #define USB_GET_PLUGTIME _IOR ('U', 126, uint32_t) #define USB_READ_DIR _IOW ('U', 127, struct usb_read_dir) -/* 128 - 135 unused */ +/* 128 - 134 unused */ +#define USB_GET_POWER_USAGE _IOR ('U', 135, int) #define USB_SET_TX_FORCE_SHORT _IOW ('U', 136, int) #define USB_SET_TX_TIMEOUT _IOW ('U', 137, int) #define USB_GET_TX_FRAME_SIZE _IOR ('U', 138, int) Modified: stable/9/usr.sbin/usbconfig/dump.c ============================================================================== --- stable/9/usr.sbin/usbconfig/dump.c Thu Feb 28 16:43:41 2013 (r247474) +++ stable/9/usr.sbin/usbconfig/dump.c Thu Feb 28 16:56:08 2013 (r247475) @@ -225,13 +225,17 @@ dump_device_info(struct libusb20_device { char buf[128]; uint8_t n; + unsigned int usage; - printf("%s, cfg=%u md=%s spd=%s pwr=%s\n", + usage = libusb20_dev_get_power_usage(pdev); + + printf("%s, cfg=%u md=%s spd=%s pwr=%s (%umA)\n", libusb20_dev_get_desc(pdev), libusb20_dev_get_config_index(pdev), dump_mode(libusb20_dev_get_mode(pdev)), dump_speed(libusb20_dev_get_speed(pdev)), - dump_power_mode(libusb20_dev_get_power_mode(pdev))); + dump_power_mode(libusb20_dev_get_power_mode(pdev)), + usage); if (!show_ifdrv) return; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:10:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 70E8BDED; Thu, 28 Feb 2013 18:10:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 626CA89D; Thu, 28 Feb 2013 18:10:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIALMd093025; Thu, 28 Feb 2013 18:10:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIAKZf093019; Thu, 28 Feb 2013 18:10:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281810.r1SIAKZf093019@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247478 - in stable/9/sys/dev: e1000 ixgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:10:21 -0000 Author: jhb Date: Thu Feb 28 18:10:20 2013 New Revision: 247478 URL: http://svnweb.freebsd.org/changeset/base/247478 Log: MFC 240968: Merge similar fixes from 223198 from igb to ixgbe: - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing and lock contention. - Don't define ixgbe_start() at all when if_transmit is used. Modified: stable/9/sys/dev/e1000/if_igb.h stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.h ============================================================================== --- stable/9/sys/dev/e1000/if_igb.h Thu Feb 28 17:30:19 2013 (r247477) +++ stable/9/sys/dev/e1000/if_igb.h Thu Feb 28 18:10:20 2013 (r247478) @@ -299,9 +299,9 @@ struct tx_ring { struct igb_tx_buffer *tx_buffers; #if __FreeBSD_version >= 800000 struct buf_ring *br; + struct task txq_task; #endif bus_dma_tag_t txtag; - struct task txq_task; u32 bytes; u32 packets; Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Feb 28 17:30:19 2013 (r247477) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Feb 28 18:10:20 2013 (r247478) @@ -104,13 +104,15 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #if __FreeBSD_version >= 800000 static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static void ixgbe_qflush(struct ifnet *); +static void ixgbe_deferred_mq_start(void *, int); +#else +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static void ixgbe_init(void *); @@ -626,6 +628,7 @@ ixgbe_detach(device_t dev) { struct adapter *adapter = device_get_softc(dev); struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; u32 ctrl_ext; INIT_DEBUGOUT("ixgbe_detach: begin"); @@ -640,8 +643,11 @@ ixgbe_detach(device_t dev) ixgbe_stop(adapter); IXGBE_CORE_UNLOCK(adapter); - for (int i = 0; i < adapter->num_queues; i++, que++) { + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { +#if __FreeBSD_version >= 800000 + taskqueue_drain(que->tq, &txr->txq_task); +#endif taskqueue_drain(que->tq, &que->que_task); taskqueue_free(que->tq); } @@ -703,6 +709,7 @@ ixgbe_shutdown(device_t dev) } +#if __FreeBSD_version < 800000 /********************************************************************* * Transmit entry point * @@ -774,7 +781,7 @@ ixgbe_start(struct ifnet *ifp) return; } -#if __FreeBSD_version >= 800000 +#else /* ** Multiqueue Transmit driver ** @@ -802,7 +809,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct IXGBE_TX_UNLOCK(txr); } else { err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } return (err); @@ -867,6 +874,22 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } /* + * Called from a taskqueue to drain queued transmit packets. + */ +static void +ixgbe_deferred_mq_start(void *arg, int pending) +{ + struct tx_ring *txr = arg; + struct adapter *adapter = txr->adapter; + struct ifnet *ifp = adapter->ifp; + + IXGBE_TX_LOCK(txr); + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr, NULL); + IXGBE_TX_UNLOCK(txr); +} + +/* ** Flush all ring buffers */ static void @@ -2223,6 +2246,9 @@ ixgbe_allocate_legacy(struct adapter *ad { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; +#if __FreeBSD_version >= 800000 + struct tx_ring *txr = adapter->tx_rings; +#endif int error, rid = 0; /* MSI RID at 1 */ @@ -2242,6 +2268,9 @@ ixgbe_allocate_legacy(struct adapter *ad * Try allocating a fast interrupt and the associated deferred * processing contexts. */ +#if __FreeBSD_version >= 800000 + TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); +#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2288,9 +2317,10 @@ ixgbe_allocate_msix(struct adapter *adap { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; int error, rid, vector = 0; - for (int i = 0; i < adapter->num_queues; i++, vector++, que++) { + for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) { rid = vector + 1; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2320,6 +2350,9 @@ ixgbe_allocate_msix(struct adapter *adap if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); +#if __FreeBSD_version >= 800000 + TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); +#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2563,12 +2596,13 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgbe_ioctl; - ifp->if_start = ixgbe_start; #if __FreeBSD_version >= 800000 ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; +#else + ifp->if_start = ixgbe_start; + IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); #endif - ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 2; ether_ifattach(ifp, adapter->hw.mac.addr); Modified: stable/9/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.h Thu Feb 28 17:30:19 2013 (r247477) +++ stable/9/sys/dev/ixgbe/ixgbe.h Thu Feb 28 18:10:20 2013 (r247478) @@ -314,6 +314,7 @@ struct tx_ring { char mtx_name[16]; #if __FreeBSD_version >= 800000 struct buf_ring *br; + struct task txq_task; #endif #ifdef IXGBE_FDIR u16 atr_sample; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:10:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 94C17F81; Thu, 28 Feb 2013 18:10:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 769538B8; Thu, 28 Feb 2013 18:10:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIAaoA093102; Thu, 28 Feb 2013 18:10:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIAa41093100; Thu, 28 Feb 2013 18:10:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281810.r1SIAa41093100@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247479 - stable/8/sys/dev/ixgbe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:10:36 -0000 Author: jhb Date: Thu Feb 28 18:10:35 2013 New Revision: 247479 URL: http://svnweb.freebsd.org/changeset/base/247479 Log: MFC 240968: Merge similar fixes from 223198 from igb to ixgbe: - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing and lock contention. - Don't define ixgbe_start() at all when if_transmit is used. Modified: stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ixgbe/ (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 18:10:20 2013 (r247478) +++ stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 18:10:35 2013 (r247479) @@ -102,13 +102,15 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #if __FreeBSD_version >= 800000 static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static void ixgbe_qflush(struct ifnet *); +static void ixgbe_deferred_mq_start(void *, int); +#else +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static void ixgbe_init(void *); @@ -621,6 +623,7 @@ ixgbe_detach(device_t dev) { struct adapter *adapter = device_get_softc(dev); struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; u32 ctrl_ext; INIT_DEBUGOUT("ixgbe_detach: begin"); @@ -635,8 +638,11 @@ ixgbe_detach(device_t dev) ixgbe_stop(adapter); IXGBE_CORE_UNLOCK(adapter); - for (int i = 0; i < adapter->num_queues; i++, que++) { + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { +#if __FreeBSD_version >= 800000 + taskqueue_drain(que->tq, &txr->txq_task); +#endif taskqueue_drain(que->tq, &que->que_task); taskqueue_free(que->tq); } @@ -695,6 +701,7 @@ ixgbe_shutdown(device_t dev) } +#if __FreeBSD_version < 800000 /********************************************************************* * Transmit entry point * @@ -766,7 +773,7 @@ ixgbe_start(struct ifnet *ifp) return; } -#if __FreeBSD_version >= 800000 +#else /* ** Multiqueue Transmit driver ** @@ -794,7 +801,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct IXGBE_TX_UNLOCK(txr); } else { err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &que->que_task); + taskqueue_enqueue(que->tq, &txr->txq_task); } return (err); @@ -864,6 +871,22 @@ ixgbe_mq_start_locked(struct ifnet *ifp, } /* + * Called from a taskqueue to drain queued transmit packets. + */ +static void +ixgbe_deferred_mq_start(void *arg, int pending) +{ + struct tx_ring *txr = arg; + struct adapter *adapter = txr->adapter; + struct ifnet *ifp = adapter->ifp; + + IXGBE_TX_LOCK(txr); + if (!drbr_empty(ifp, txr->br)) + ixgbe_mq_start_locked(ifp, txr, NULL); + IXGBE_TX_UNLOCK(txr); +} + +/* ** Flush all ring buffers */ static void @@ -2158,6 +2181,9 @@ ixgbe_allocate_legacy(struct adapter *ad { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; +#if __FreeBSD_version >= 800000 + struct tx_ring *txr = adapter->tx_rings; +#endif int error, rid = 0; /* MSI RID at 1 */ @@ -2177,6 +2203,9 @@ ixgbe_allocate_legacy(struct adapter *ad * Try allocating a fast interrupt and the associated deferred * processing contexts. */ +#if __FreeBSD_version >= 800000 + TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); +#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2223,9 +2252,10 @@ ixgbe_allocate_msix(struct adapter *adap { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; int error, rid, vector = 0; - for (int i = 0; i < adapter->num_queues; i++, vector++, que++) { + for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) { rid = vector + 1; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2255,6 +2285,9 @@ ixgbe_allocate_msix(struct adapter *adap if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); +#if __FreeBSD_version >= 800000 + TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); +#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2499,12 +2532,13 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgbe_ioctl; - ifp->if_start = ixgbe_start; #if __FreeBSD_version >= 800000 ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; +#else + ifp->if_start = ixgbe_start; + IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); #endif - ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 2; ether_ifattach(ifp, adapter->hw.mac.addr); Modified: stable/8/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.h Thu Feb 28 18:10:20 2013 (r247478) +++ stable/8/sys/dev/ixgbe/ixgbe.h Thu Feb 28 18:10:35 2013 (r247479) @@ -298,6 +298,7 @@ struct tx_ring { char mtx_name[16]; #if __FreeBSD_version >= 800000 struct buf_ring *br; + struct task txq_task; #endif #ifdef IXGBE_FDIR u16 atr_sample; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:12:56 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EE6DB626; Thu, 28 Feb 2013 18:12:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C3FFB90D; Thu, 28 Feb 2013 18:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SICuqE094995; Thu, 28 Feb 2013 18:12:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SICuFs094994; Thu, 28 Feb 2013 18:12:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281812.r1SICuFs094994@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247480 - stable/9/usr.sbin/acpi/acpidump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:12:57 -0000 Author: jhb Date: Thu Feb 28 18:12:56 2013 New Revision: 247480 URL: http://svnweb.freebsd.org/changeset/base/247480 Log: MFC 241198: Display the matrix of inter-domain distances in the SLIT table. This is used to complement the SRAT table on NUMA machines. Modified: stable/9/usr.sbin/acpi/acpidump/acpi.c Directory Properties: stable/9/usr.sbin/acpi/acpidump/ (props changed) Modified: stable/9/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- stable/9/usr.sbin/acpi/acpidump/acpi.c Thu Feb 28 18:10:35 2013 (r247479) +++ stable/9/usr.sbin/acpi/acpidump/acpi.c Thu Feb 28 18:12:56 2013 (r247480) @@ -63,6 +63,7 @@ static void acpi_handle_madt(ACPI_TABLE_ static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp); static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp); static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags); static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp); @@ -519,6 +520,33 @@ acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_slit(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_SLIT *slit; + UINT64 i, j; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + slit = (ACPI_TABLE_SLIT *)sdp; + printf("\tLocality Count=%jd\n", slit->LocalityCount); + printf("\n\t "); + for (i = 0; i < slit->LocalityCount; i++) + printf(" %3jd", i); + printf("\n\t +"); + for (i = 0; i < slit->LocalityCount; i++) + printf("----"); + printf("\n"); + for (i = 0; i < slit->LocalityCount; i++) { + printf("\t %3jd |", i); + for (j = 0; j < slit->LocalityCount; j++) + printf(" %3d", + slit->Entry[i * slit->LocalityCount + j]); + printf("\n"); + } + printf(END_COMMENT); +} + +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags) { @@ -1084,6 +1112,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp acpi_handle_ecdt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_MCFG, 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_SLIT, 4)) + acpi_handle_slit(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_SRAT, 4)) acpi_handle_srat(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:22:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B5A1372D; Thu, 28 Feb 2013 18:22:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 998B7A31; Thu, 28 Feb 2013 18:22:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIMgU8098000; Thu, 28 Feb 2013 18:22:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIMfNk097995; Thu, 28 Feb 2013 18:22:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281822.r1SIMfNk097995@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247481 - in stable/9/sys: amd64/include/pc dev/ipmi i386/include/pc x86/bios X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:22:42 -0000 Author: jhb Date: Thu Feb 28 18:22:41 2013 New Revision: 247481 URL: http://svnweb.freebsd.org/changeset/base/247481 Log: MFC 241027: - Re-shuffle the headers to move all kernel-specific bits under #ifdef _KERNEL but leave definitions for various structures defined by standards ($PIR table, SMAP entries, etc.) available to userland. - Consolidate duplicate SMBIOS table structure definitions in ipmi(4) and smbios(4) in and make them available to userland. Modified: stable/9/sys/amd64/include/pc/bios.h stable/9/sys/dev/ipmi/ipmi_smbios.c stable/9/sys/i386/include/pc/bios.h stable/9/sys/x86/bios/smbios.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/amd64/include/pc/bios.h ============================================================================== --- stable/9/sys/amd64/include/pc/bios.h Thu Feb 28 18:12:56 2013 (r247480) +++ stable/9/sys/amd64/include/pc/bios.h Thu Feb 28 18:22:41 2013 (r247481) @@ -30,16 +30,9 @@ #ifndef _MACHINE_PC_BIOS_H_ #define _MACHINE_PC_BIOS_H_ -extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen, - int paralen, int sigofs); - -#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) -#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) - /* * Int 15:E820 'SMAP' structure */ - #define SMAP_SIG 0x534D4150 /* 'SMAP' */ #define SMAP_TYPE_MEMORY 1 @@ -58,22 +51,61 @@ struct bios_smap { u_int32_t type; } __packed; +/* + * System Management BIOS + */ +#define SMBIOS_START 0xf0000 +#define SMBIOS_STEP 0x10 +#define SMBIOS_OFF 0 +#define SMBIOS_LEN 4 +#define SMBIOS_SIG "_SM_" + +struct smbios_eps { + uint8_t anchor_string[4]; /* '_SM_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint16_t maximum_structure_size; + uint8_t entry_point_revision; + uint8_t formatted_area[5]; + uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ + uint8_t intermediate_checksum; + uint16_t structure_table_length; + uint32_t structure_table_address; + uint16_t number_structures; + uint8_t BCD_revision; +}; + +struct smbios_structure_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + +#ifdef _KERNEL +#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) +#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) + struct bios_oem_signature { char * anchor; /* search anchor string in BIOS memory */ size_t offset; /* offset from anchor (may be negative) */ size_t totlen; /* total length of BIOS string to copy */ } __packed; + struct bios_oem_range { u_int from; /* shouldn't be below 0xe0000 */ u_int to; /* shouldn't be above 0xfffff */ } __packed; + struct bios_oem { struct bios_oem_range range; struct bios_oem_signature signature[]; } __packed; -extern int -bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); - +int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +uint32_t bios_sigsearch(uint32_t start, u_char *sig, int siglen, int paralen, + int sigofs); +#endif #endif /* _MACHINE_PC_BIOS_H_ */ Modified: stable/9/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi_smbios.c Thu Feb 28 18:12:56 2013 (r247480) +++ stable/9/sys/dev/ipmi/ipmi_smbios.c Thu Feb 28 18:22:41 2013 (r247481) @@ -52,29 +52,6 @@ __FBSDID("$FreeBSD$"); #define pmap_unmapbios pmap_unmapdev #endif -struct smbios_table { - uint8_t anchor_string[4]; - uint8_t checksum; - uint8_t length; - uint8_t major_version; - uint8_t minor_version; - uint16_t maximum_structure_size; - uint8_t entry_point_revision; - uint8_t formatted_area[5]; - uint8_t DMI_anchor_string[5]; - uint8_t intermediate_checksum; - uint16_t structure_table_length; - uint32_t structure_table_address; - uint16_t number_structures; - uint8_t BCD_revision; -}; - -struct structure_header { - uint8_t type; - uint8_t length; - uint16_t handle; -}; - struct ipmi_entry { uint8_t type; uint8_t length; @@ -102,13 +79,7 @@ struct ipmi_entry { #define SPACING_32 0x1 #define SPACING_16 0x2 -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - -typedef void (*smbios_callback_t)(struct structure_header *, void *); +typedef void (*smbios_callback_t)(struct smbios_structure_header *, void *); static struct ipmi_get_info ipmi_info; static int ipmi_probed; @@ -116,13 +87,13 @@ static struct mtx ipmi_info_mtx; MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); -static int smbios_cksum(struct smbios_table *); +static int smbios_cksum(struct smbios_eps *); static void smbios_walk_table(uint8_t *, int, smbios_callback_t, void *); -static void smbios_ipmi_info(struct structure_header *, void *); +static void smbios_ipmi_info(struct smbios_structure_header *, void *); static void -smbios_ipmi_info(struct structure_header *h, void *arg) +smbios_ipmi_info(struct smbios_structure_header *h, void *arg) { struct ipmi_get_info *info; struct ipmi_entry *s; @@ -178,10 +149,10 @@ smbios_ipmi_info(struct structure_header static void smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) { - struct structure_header *s; + struct smbios_structure_header *s; while (entries--) { - s = (struct structure_header *)p; + s = (struct smbios_structure_header *)p; cb(s, arg); /* @@ -208,7 +179,7 @@ smbios_walk_table(uint8_t *p, int entrie static void ipmi_smbios_probe(struct ipmi_get_info *info) { - struct smbios_table *header; + struct smbios_eps *header; void *table; u_int32_t addr; @@ -225,9 +196,9 @@ ipmi_smbios_probe(struct ipmi_get_info * * length and then map it a second time with the actual length so * we can verify the checksum. */ - header = pmap_mapbios(addr, sizeof(struct smbios_table)); + header = pmap_mapbios(addr, sizeof(struct smbios_eps)); table = pmap_mapbios(addr, header->length); - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_table)); + pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); header = table; if (smbios_cksum(header) != 0) { pmap_unmapbios((vm_offset_t)header, header->length); @@ -282,7 +253,7 @@ ipmi_smbios_identify(struct ipmi_get_inf } static int -smbios_cksum(struct smbios_table *e) +smbios_cksum(struct smbios_eps *e) { u_int8_t *ptr; u_int8_t cksum; Modified: stable/9/sys/i386/include/pc/bios.h ============================================================================== --- stable/9/sys/i386/include/pc/bios.h Thu Feb 28 18:12:56 2013 (r247480) +++ stable/9/sys/i386/include/pc/bios.h Thu Feb 28 18:22:41 2013 (r247481) @@ -44,31 +44,6 @@ struct bios32_SDheader }; /* - * BIOS32 Service Directory entry. Caller supplies name, bios32_SDlookup - * fills in the rest of the details. - */ -struct bios32_SDentry -{ - union - { - u_int8_t name[4]; /* service identifier */ - u_int32_t id; /* as a 32-bit value */ - } ident; - u_int32_t base; /* base of service */ - u_int32_t len; /* service length */ - u_int32_t entry; /* entrypoint offset from base */ - vm_offset_t ventry; /* entrypoint in kernel virtual segment */ -}; - -extern int bios32_SDlookup(struct bios32_SDentry *ent); -extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen, - int paralen, int sigofs); - -#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) -#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) - - -/* * PnP BIOS presence structure */ struct PnPBIOS_table @@ -88,52 +63,13 @@ struct PnPBIOS_table u_int32_t pmdataseg; /* protected-mode data segment */ } __packed; - -/* - * Exported lookup results - */ -extern struct bios32_SDentry PCIbios; - -struct segment_info { - u_int base; - u_int limit; -}; - -#define BIOSCODE_FLAG 0x01 -#define BIOSDATA_FLAG 0x02 -#define BIOSUTIL_FLAG 0x04 -#define BIOSARGS_FLAG 0x08 - -struct bios_segments { - struct segment_info code32; /* 32-bit code (mandatory) */ - struct segment_info code16; /* 16-bit code */ - struct segment_info data; /* 16-bit data */ - struct segment_info util; /* 16-bit utility */ - struct segment_info args; /* 16-bit args */ -}; - -struct bios_regs { - u_int eax; - u_int ebx; - u_int ecx; - u_int edx; - u_int esi; - u_int edi; -}; - -struct bios_args { - u_int entry; /* entry point of routine */ - struct bios_regs r; - struct bios_segments seg; -}; - /* * PnP BIOS return codes */ #define PNP_SUCCESS 0x00 #define PNP_NOT_SET_STATICALLY 0x7f #define PNP_UNKNOWN_FUNCTION 0x81 -#define PNP_FUNTION_NOT_SUPPORTED 0x82 +#define PNP_FUNCTION_NOT_SUPPORTED 0x82 #define PNP_INVALID_HANDLE 0x83 #define PNP_BAD_PARAMETER 0x84 #define PNP_SET_FAILED 0x85 @@ -219,11 +155,6 @@ struct bios_args { #define PCIBIOS_GET_IRQ_ROUTING 0xb10e #define PCIBIOS_ROUTE_INTERRUPT 0xb10f -extern int bios16(struct bios_args *, char *, ...); -extern int bios16_call(struct bios_regs *, char *); -extern int bios32(struct bios_regs *, u_int, u_short); -extern void set_bios_selectors(struct bios_segments *, int); - /* * PCI interrupt routing table. * @@ -272,7 +203,6 @@ struct PIR_table /* * Int 15:E820 'SMAP' structure */ - #define SMAP_SIG 0x534D4150 /* 'SMAP' */ #define SMAP_TYPE_MEMORY 1 @@ -291,22 +221,122 @@ struct bios_smap { u_int32_t type; } __packed; +/* + * System Management BIOS + */ +#define SMBIOS_START 0xf0000 +#define SMBIOS_STEP 0x10 +#define SMBIOS_OFF 0 +#define SMBIOS_LEN 4 +#define SMBIOS_SIG "_SM_" + +struct smbios_eps { + uint8_t anchor_string[4]; /* '_SM_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint16_t maximum_structure_size; + uint8_t entry_point_revision; + uint8_t formatted_area[5]; + uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ + uint8_t intermediate_checksum; + uint16_t structure_table_length; + uint32_t structure_table_address; + uint16_t number_structures; + uint8_t BCD_revision; +}; + +struct smbios_structure_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + +#ifdef _KERNEL +#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) +#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) + struct bios_oem_signature { char * anchor; /* search anchor string in BIOS memory */ size_t offset; /* offset from anchor (may be negative) */ size_t totlen; /* total length of BIOS string to copy */ } __packed; + struct bios_oem_range { u_int from; /* shouldn't be below 0xe0000 */ u_int to; /* shouldn't be above 0xfffff */ } __packed; + struct bios_oem { struct bios_oem_range range; struct bios_oem_signature signature[]; } __packed; -extern int -bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +struct segment_info { + u_int base; + u_int limit; +}; + +#define BIOSCODE_FLAG 0x01 +#define BIOSDATA_FLAG 0x02 +#define BIOSUTIL_FLAG 0x04 +#define BIOSARGS_FLAG 0x08 + +struct bios_segments { + struct segment_info code32; /* 32-bit code (mandatory) */ + struct segment_info code16; /* 16-bit code */ + struct segment_info data; /* 16-bit data */ + struct segment_info util; /* 16-bit utility */ + struct segment_info args; /* 16-bit args */ +}; + +struct bios_regs { + u_int eax; + u_int ebx; + u_int ecx; + u_int edx; + u_int esi; + u_int edi; +}; + +struct bios_args { + u_int entry; /* entry point of routine */ + struct bios_regs r; + struct bios_segments seg; +}; + +/* + * BIOS32 Service Directory entry. Caller supplies name, bios32_SDlookup + * fills in the rest of the details. + */ +struct bios32_SDentry +{ + union + { + u_int8_t name[4]; /* service identifier */ + u_int32_t id; /* as a 32-bit value */ + } ident; + u_int32_t base; /* base of service */ + u_int32_t len; /* service length */ + u_int32_t entry; /* entrypoint offset from base */ + vm_offset_t ventry; /* entrypoint in kernel virtual segment */ +}; + +/* + * Exported lookup results + */ +extern struct bios32_SDentry PCIbios; + +int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +uint32_t bios_sigsearch(uint32_t start, u_char *sig, int siglen, int paralen, + int sigofs); +int bios16(struct bios_args *, char *, ...); +int bios16_call(struct bios_regs *, char *); +int bios32(struct bios_regs *, u_int, u_short); +int bios32_SDlookup(struct bios32_SDentry *ent); +void set_bios_selectors(struct bios_segments *, int); +#endif #endif /* _MACHINE_PC_BIOS_H_ */ Modified: stable/9/sys/x86/bios/smbios.c ============================================================================== --- stable/9/sys/x86/bios/smbios.c Thu Feb 28 18:12:56 2013 (r247480) +++ stable/9/sys/x86/bios/smbios.c Thu Feb 28 18:22:41 2013 (r247481) @@ -50,30 +50,6 @@ __FBSDID("$FreeBSD$"); * http://www.dmtf.org/standards/published_documents/DSP0134.pdf */ -/* - * SMBIOS Entry Point Structure - */ -struct smbios_eps { - u_int8_t Anchor[4]; /* '_SM_' */ - u_int8_t Checksum; - u_int8_t Length; - - u_int8_t SMBIOS_Major; - u_int8_t SMBIOS_Minor; - u_int16_t Max_Size; - u_int8_t Revision; - u_int8_t Formatted_Area[5]; - - u_int8_t Intermediate_Anchor[5]; /* '_DMI_' */ - u_int8_t Intermediate_Checksum; - - u_int16_t Structure_Table_Length; - u_int32_t Structure_Table_Address; - u_int16_t Structure_Count; - - u_int8_t SMBIOS_BCD_Revision; -} __packed; - struct smbios_softc { device_t dev; struct resource * res; @@ -82,12 +58,6 @@ struct smbios_softc { struct smbios_eps * eps; }; -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - #define RES2EPS(res) ((struct smbios_eps *)rman_get_virtual(res)) #define ADDR2EPS(addr) ((struct smbios_eps *)BIOS_PADDRTOVADDR(addr)) @@ -116,13 +86,13 @@ smbios_identify (driver_t *driver, devic SMBIOS_STEP, SMBIOS_OFF); if (addr != 0) { rid = 0; - length = ADDR2EPS(addr)->Length; + length = ADDR2EPS(addr)->length; if (length != 0x1f) { u_int8_t major, minor; - major = ADDR2EPS(addr)->SMBIOS_Major; - minor = ADDR2EPS(addr)->SMBIOS_Minor; + major = ADDR2EPS(addr)->major_version; + minor = ADDR2EPS(addr)->minor_version; /* SMBIOS v2.1 implementation might use 0x1e. */ if (length == 0x1e && major == 2 && minor == 1) @@ -189,11 +159,11 @@ smbios_attach (device_t dev) sc->eps = RES2EPS(sc->res); device_printf(dev, "Version: %u.%u", - sc->eps->SMBIOS_Major, sc->eps->SMBIOS_Minor); - if (bcd2bin(sc->eps->SMBIOS_BCD_Revision)) + sc->eps->major_version, sc->eps->minor_version); + if (bcd2bin(sc->eps->BCD_revision)) printf(", BCD Revision: %u.%u", - bcd2bin(sc->eps->SMBIOS_BCD_Revision >> 4), - bcd2bin(sc->eps->SMBIOS_BCD_Revision & 0x0f)); + bcd2bin(sc->eps->BCD_revision >> 4), + bcd2bin(sc->eps->BCD_revision & 0x0f)); printf("\n"); return (0); @@ -269,7 +239,7 @@ smbios_cksum (struct smbios_eps *e) ptr = (u_int8_t *)e; cksum = 0; - for (i = 0; i < e->Length; i++) { + for (i = 0; i < e->length; i++) { cksum += ptr[i]; } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:22:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 90E41840; Thu, 28 Feb 2013 18:22:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 757B9A32; Thu, 28 Feb 2013 18:22:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIMpDg098062; Thu, 28 Feb 2013 18:22:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIMoBV098058; Thu, 28 Feb 2013 18:22:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281822.r1SIMoBV098058@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247482 - in stable/8/sys: amd64/include/pc dev/ipmi i386/include/pc x86/bios X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:22:51 -0000 Author: jhb Date: Thu Feb 28 18:22:50 2013 New Revision: 247482 URL: http://svnweb.freebsd.org/changeset/base/247482 Log: MFC 241027: - Re-shuffle the headers to move all kernel-specific bits under #ifdef _KERNEL but leave definitions for various structures defined by standards ($PIR table, SMAP entries, etc.) available to userland. - Consolidate duplicate SMBIOS table structure definitions in ipmi(4) and smbios(4) in and make them available to userland. Modified: stable/8/sys/amd64/include/pc/bios.h stable/8/sys/dev/ipmi/ipmi_smbios.c stable/8/sys/i386/include/pc/bios.h stable/8/sys/x86/bios/smbios.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ipmi/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/amd64/include/pc/bios.h ============================================================================== --- stable/8/sys/amd64/include/pc/bios.h Thu Feb 28 18:22:41 2013 (r247481) +++ stable/8/sys/amd64/include/pc/bios.h Thu Feb 28 18:22:50 2013 (r247482) @@ -30,16 +30,9 @@ #ifndef _MACHINE_PC_BIOS_H_ #define _MACHINE_PC_BIOS_H_ -extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen, - int paralen, int sigofs); - -#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) -#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) - /* * Int 15:E820 'SMAP' structure */ - #define SMAP_SIG 0x534D4150 /* 'SMAP' */ #define SMAP_TYPE_MEMORY 1 @@ -58,22 +51,61 @@ struct bios_smap { u_int32_t type; } __packed; +/* + * System Management BIOS + */ +#define SMBIOS_START 0xf0000 +#define SMBIOS_STEP 0x10 +#define SMBIOS_OFF 0 +#define SMBIOS_LEN 4 +#define SMBIOS_SIG "_SM_" + +struct smbios_eps { + uint8_t anchor_string[4]; /* '_SM_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint16_t maximum_structure_size; + uint8_t entry_point_revision; + uint8_t formatted_area[5]; + uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ + uint8_t intermediate_checksum; + uint16_t structure_table_length; + uint32_t structure_table_address; + uint16_t number_structures; + uint8_t BCD_revision; +}; + +struct smbios_structure_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + +#ifdef _KERNEL +#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) +#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) + struct bios_oem_signature { char * anchor; /* search anchor string in BIOS memory */ size_t offset; /* offset from anchor (may be negative) */ size_t totlen; /* total length of BIOS string to copy */ } __packed; + struct bios_oem_range { u_int from; /* shouldn't be below 0xe0000 */ u_int to; /* shouldn't be above 0xfffff */ } __packed; + struct bios_oem { struct bios_oem_range range; struct bios_oem_signature signature[]; } __packed; -extern int -bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); - +int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +uint32_t bios_sigsearch(uint32_t start, u_char *sig, int siglen, int paralen, + int sigofs); +#endif #endif /* _MACHINE_PC_BIOS_H_ */ Modified: stable/8/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- stable/8/sys/dev/ipmi/ipmi_smbios.c Thu Feb 28 18:22:41 2013 (r247481) +++ stable/8/sys/dev/ipmi/ipmi_smbios.c Thu Feb 28 18:22:50 2013 (r247482) @@ -52,29 +52,6 @@ __FBSDID("$FreeBSD$"); #define pmap_unmapbios pmap_unmapdev #endif -struct smbios_table { - uint8_t anchor_string[4]; - uint8_t checksum; - uint8_t length; - uint8_t major_version; - uint8_t minor_version; - uint16_t maximum_structure_size; - uint8_t entry_point_revision; - uint8_t formatted_area[5]; - uint8_t DMI_anchor_string[5]; - uint8_t intermediate_checksum; - uint16_t structure_table_length; - uint32_t structure_table_address; - uint16_t number_structures; - uint8_t BCD_revision; -}; - -struct structure_header { - uint8_t type; - uint8_t length; - uint16_t handle; -}; - struct ipmi_entry { uint8_t type; uint8_t length; @@ -102,13 +79,7 @@ struct ipmi_entry { #define SPACING_32 0x1 #define SPACING_16 0x2 -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - -typedef void (*smbios_callback_t)(struct structure_header *, void *); +typedef void (*smbios_callback_t)(struct smbios_structure_header *, void *); static struct ipmi_get_info ipmi_info; static int ipmi_probed; @@ -116,13 +87,13 @@ static struct mtx ipmi_info_mtx; MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); -static int smbios_cksum(struct smbios_table *); +static int smbios_cksum(struct smbios_eps *); static void smbios_walk_table(uint8_t *, int, smbios_callback_t, void *); -static void smbios_ipmi_info(struct structure_header *, void *); +static void smbios_ipmi_info(struct smbios_structure_header *, void *); static void -smbios_ipmi_info(struct structure_header *h, void *arg) +smbios_ipmi_info(struct smbios_structure_header *h, void *arg) { struct ipmi_get_info *info; struct ipmi_entry *s; @@ -178,10 +149,10 @@ smbios_ipmi_info(struct structure_header static void smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) { - struct structure_header *s; + struct smbios_structure_header *s; while (entries--) { - s = (struct structure_header *)p; + s = (struct smbios_structure_header *)p; cb(s, arg); /* @@ -208,7 +179,7 @@ smbios_walk_table(uint8_t *p, int entrie static void ipmi_smbios_probe(struct ipmi_get_info *info) { - struct smbios_table *header; + struct smbios_eps *header; void *table; u_int32_t addr; @@ -225,9 +196,9 @@ ipmi_smbios_probe(struct ipmi_get_info * * length and then map it a second time with the actual length so * we can verify the checksum. */ - header = pmap_mapbios(addr, sizeof(struct smbios_table)); + header = pmap_mapbios(addr, sizeof(struct smbios_eps)); table = pmap_mapbios(addr, header->length); - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_table)); + pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_eps)); header = table; if (smbios_cksum(header) != 0) { pmap_unmapbios((vm_offset_t)header, header->length); @@ -282,7 +253,7 @@ ipmi_smbios_identify(struct ipmi_get_inf } static int -smbios_cksum(struct smbios_table *e) +smbios_cksum(struct smbios_eps *e) { u_int8_t *ptr; u_int8_t cksum; Modified: stable/8/sys/i386/include/pc/bios.h ============================================================================== --- stable/8/sys/i386/include/pc/bios.h Thu Feb 28 18:22:41 2013 (r247481) +++ stable/8/sys/i386/include/pc/bios.h Thu Feb 28 18:22:50 2013 (r247482) @@ -44,31 +44,6 @@ struct bios32_SDheader }; /* - * BIOS32 Service Directory entry. Caller supplies name, bios32_SDlookup - * fills in the rest of the details. - */ -struct bios32_SDentry -{ - union - { - u_int8_t name[4]; /* service identifier */ - u_int32_t id; /* as a 32-bit value */ - } ident; - u_int32_t base; /* base of service */ - u_int32_t len; /* service length */ - u_int32_t entry; /* entrypoint offset from base */ - vm_offset_t ventry; /* entrypoint in kernel virtual segment */ -}; - -extern int bios32_SDlookup(struct bios32_SDentry *ent); -extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen, - int paralen, int sigofs); - -#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) -#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) - - -/* * PnP BIOS presence structure */ struct PnPBIOS_table @@ -88,52 +63,13 @@ struct PnPBIOS_table u_int32_t pmdataseg; /* protected-mode data segment */ } __packed; - -/* - * Exported lookup results - */ -extern struct bios32_SDentry PCIbios; - -struct segment_info { - u_int base; - u_int limit; -}; - -#define BIOSCODE_FLAG 0x01 -#define BIOSDATA_FLAG 0x02 -#define BIOSUTIL_FLAG 0x04 -#define BIOSARGS_FLAG 0x08 - -struct bios_segments { - struct segment_info code32; /* 32-bit code (mandatory) */ - struct segment_info code16; /* 16-bit code */ - struct segment_info data; /* 16-bit data */ - struct segment_info util; /* 16-bit utility */ - struct segment_info args; /* 16-bit args */ -}; - -struct bios_regs { - u_int eax; - u_int ebx; - u_int ecx; - u_int edx; - u_int esi; - u_int edi; -}; - -struct bios_args { - u_int entry; /* entry point of routine */ - struct bios_regs r; - struct bios_segments seg; -}; - /* * PnP BIOS return codes */ #define PNP_SUCCESS 0x00 #define PNP_NOT_SET_STATICALLY 0x7f #define PNP_UNKNOWN_FUNCTION 0x81 -#define PNP_FUNTION_NOT_SUPPORTED 0x82 +#define PNP_FUNCTION_NOT_SUPPORTED 0x82 #define PNP_INVALID_HANDLE 0x83 #define PNP_BAD_PARAMETER 0x84 #define PNP_SET_FAILED 0x85 @@ -219,11 +155,6 @@ struct bios_args { #define PCIBIOS_GET_IRQ_ROUTING 0xb10e #define PCIBIOS_ROUTE_INTERRUPT 0xb10f -extern int bios16(struct bios_args *, char *, ...); -extern int bios16_call(struct bios_regs *, char *); -extern int bios32(struct bios_regs *, u_int, u_short); -extern void set_bios_selectors(struct bios_segments *, int); - /* * PCI interrupt routing table. * @@ -272,7 +203,6 @@ struct PIR_table /* * Int 15:E820 'SMAP' structure */ - #define SMAP_SIG 0x534D4150 /* 'SMAP' */ #define SMAP_TYPE_MEMORY 1 @@ -291,22 +221,122 @@ struct bios_smap { u_int32_t type; } __packed; +/* + * System Management BIOS + */ +#define SMBIOS_START 0xf0000 +#define SMBIOS_STEP 0x10 +#define SMBIOS_OFF 0 +#define SMBIOS_LEN 4 +#define SMBIOS_SIG "_SM_" + +struct smbios_eps { + uint8_t anchor_string[4]; /* '_SM_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint16_t maximum_structure_size; + uint8_t entry_point_revision; + uint8_t formatted_area[5]; + uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ + uint8_t intermediate_checksum; + uint16_t structure_table_length; + uint32_t structure_table_address; + uint16_t number_structures; + uint8_t BCD_revision; +}; + +struct smbios_structure_header { + uint8_t type; + uint8_t length; + uint16_t handle; +}; + +#ifdef _KERNEL +#define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) +#define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) + struct bios_oem_signature { char * anchor; /* search anchor string in BIOS memory */ size_t offset; /* offset from anchor (may be negative) */ size_t totlen; /* total length of BIOS string to copy */ } __packed; + struct bios_oem_range { u_int from; /* shouldn't be below 0xe0000 */ u_int to; /* shouldn't be above 0xfffff */ } __packed; + struct bios_oem { struct bios_oem_range range; struct bios_oem_signature signature[]; } __packed; -extern int -bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +struct segment_info { + u_int base; + u_int limit; +}; + +#define BIOSCODE_FLAG 0x01 +#define BIOSDATA_FLAG 0x02 +#define BIOSUTIL_FLAG 0x04 +#define BIOSARGS_FLAG 0x08 + +struct bios_segments { + struct segment_info code32; /* 32-bit code (mandatory) */ + struct segment_info code16; /* 16-bit code */ + struct segment_info data; /* 16-bit data */ + struct segment_info util; /* 16-bit utility */ + struct segment_info args; /* 16-bit args */ +}; + +struct bios_regs { + u_int eax; + u_int ebx; + u_int ecx; + u_int edx; + u_int esi; + u_int edi; +}; + +struct bios_args { + u_int entry; /* entry point of routine */ + struct bios_regs r; + struct bios_segments seg; +}; + +/* + * BIOS32 Service Directory entry. Caller supplies name, bios32_SDlookup + * fills in the rest of the details. + */ +struct bios32_SDentry +{ + union + { + u_int8_t name[4]; /* service identifier */ + u_int32_t id; /* as a 32-bit value */ + } ident; + u_int32_t base; /* base of service */ + u_int32_t len; /* service length */ + u_int32_t entry; /* entrypoint offset from base */ + vm_offset_t ventry; /* entrypoint in kernel virtual segment */ +}; + +/* + * Exported lookup results + */ +extern struct bios32_SDentry PCIbios; + +int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); +uint32_t bios_sigsearch(uint32_t start, u_char *sig, int siglen, int paralen, + int sigofs); +int bios16(struct bios_args *, char *, ...); +int bios16_call(struct bios_regs *, char *); +int bios32(struct bios_regs *, u_int, u_short); +int bios32_SDlookup(struct bios32_SDentry *ent); +void set_bios_selectors(struct bios_segments *, int); +#endif #endif /* _MACHINE_PC_BIOS_H_ */ Modified: stable/8/sys/x86/bios/smbios.c ============================================================================== --- stable/8/sys/x86/bios/smbios.c Thu Feb 28 18:22:41 2013 (r247481) +++ stable/8/sys/x86/bios/smbios.c Thu Feb 28 18:22:50 2013 (r247482) @@ -50,30 +50,6 @@ __FBSDID("$FreeBSD$"); * http://www.dmtf.org/standards/published_documents/DSP0134.pdf */ -/* - * SMBIOS Entry Point Structure - */ -struct smbios_eps { - u_int8_t Anchor[4]; /* '_SM_' */ - u_int8_t Checksum; - u_int8_t Length; - - u_int8_t SMBIOS_Major; - u_int8_t SMBIOS_Minor; - u_int16_t Max_Size; - u_int8_t Revision; - u_int8_t Formatted_Area[5]; - - u_int8_t Intermediate_Anchor[5]; /* '_DMI_' */ - u_int8_t Intermediate_Checksum; - - u_int16_t Structure_Table_Length; - u_int32_t Structure_Table_Address; - u_int16_t Structure_Count; - - u_int8_t SMBIOS_BCD_Revision; -} __packed; - struct smbios_softc { device_t dev; struct resource * res; @@ -82,12 +58,6 @@ struct smbios_softc { struct smbios_eps * eps; }; -#define SMBIOS_START 0xf0000 -#define SMBIOS_STEP 0x10 -#define SMBIOS_OFF 0 -#define SMBIOS_LEN 4 -#define SMBIOS_SIG "_SM_" - #define RES2EPS(res) ((struct smbios_eps *)rman_get_virtual(res)) #define ADDR2EPS(addr) ((struct smbios_eps *)BIOS_PADDRTOVADDR(addr)) @@ -116,13 +86,13 @@ smbios_identify (driver_t *driver, devic SMBIOS_STEP, SMBIOS_OFF); if (addr != 0) { rid = 0; - length = ADDR2EPS(addr)->Length; + length = ADDR2EPS(addr)->length; if (length != 0x1f) { u_int8_t major, minor; - major = ADDR2EPS(addr)->SMBIOS_Major; - minor = ADDR2EPS(addr)->SMBIOS_Minor; + major = ADDR2EPS(addr)->major_version; + minor = ADDR2EPS(addr)->minor_version; /* SMBIOS v2.1 implementation might use 0x1e. */ if (length == 0x1e && major == 2 && minor == 1) @@ -189,11 +159,11 @@ smbios_attach (device_t dev) sc->eps = RES2EPS(sc->res); device_printf(dev, "Version: %u.%u", - sc->eps->SMBIOS_Major, sc->eps->SMBIOS_Minor); - if (bcd2bin(sc->eps->SMBIOS_BCD_Revision)) + sc->eps->major_version, sc->eps->minor_version); + if (bcd2bin(sc->eps->BCD_revision)) printf(", BCD Revision: %u.%u", - bcd2bin(sc->eps->SMBIOS_BCD_Revision >> 4), - bcd2bin(sc->eps->SMBIOS_BCD_Revision & 0x0f)); + bcd2bin(sc->eps->BCD_revision >> 4), + bcd2bin(sc->eps->BCD_revision & 0x0f)); printf("\n"); return (0); @@ -269,7 +239,7 @@ smbios_cksum (struct smbios_eps *e) ptr = (u_int8_t *)e; cksum = 0; - for (i = 0; i < e->Length; i++) { + for (i = 0; i < e->length; i++) { cksum += ptr[i]; } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:24:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4F98AA9E; Thu, 28 Feb 2013 18:24:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4066DA51; Thu, 28 Feb 2013 18:24:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIO8Jo098294; Thu, 28 Feb 2013 18:24:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIO8Cu098293; Thu, 28 Feb 2013 18:24:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281824.r1SIO8Cu098293@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247483 - stable/9/usr.bin/top X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:24:08 -0000 Author: jhb Date: Thu Feb 28 18:24:07 2013 New Revision: 247483 URL: http://svnweb.freebsd.org/changeset/base/247483 Log: MFC 241730: Correct the order of the MFU and MRU labels. Modified: stable/9/usr.bin/top/machine.c Directory Properties: stable/9/usr.bin/top/ (props changed) Modified: stable/9/usr.bin/top/machine.c ============================================================================== --- stable/9/usr.bin/top/machine.c Thu Feb 28 18:22:50 2013 (r247482) +++ stable/9/usr.bin/top/machine.c Thu Feb 28 18:24:07 2013 (r247483) @@ -178,7 +178,7 @@ char *memorynames[] = { int arc_stats[7]; char *arcnames[] = { - "K Total, ", "K MRU, ", "K MFU, ", "K Anon, ", "K Header, ", "K Other", + "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other", NULL }; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:24:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CB582BA7; Thu, 28 Feb 2013 18:24:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 83215A54; Thu, 28 Feb 2013 18:24:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIOFAG098346; Thu, 28 Feb 2013 18:24:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIOFJL098345; Thu, 28 Feb 2013 18:24:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281824.r1SIOFJL098345@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247484 - stable/8/usr.bin/top X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:24:16 -0000 Author: jhb Date: Thu Feb 28 18:24:14 2013 New Revision: 247484 URL: http://svnweb.freebsd.org/changeset/base/247484 Log: MFC 241730: Correct the order of the MFU and MRU labels. Modified: stable/8/usr.bin/top/machine.c Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/machine.c ============================================================================== --- stable/8/usr.bin/top/machine.c Thu Feb 28 18:24:07 2013 (r247483) +++ stable/8/usr.bin/top/machine.c Thu Feb 28 18:24:14 2013 (r247484) @@ -178,7 +178,7 @@ char *memorynames[] = { int arc_stats[7]; char *arcnames[] = { - "K Total, ", "K MRU, ", "K MFU, ", "K Anon, ", "K Header, ", "K Other", + "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other", NULL }; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:43:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DC1ADEB; Thu, 28 Feb 2013 18:43:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C6A08B31; Thu, 28 Feb 2013 18:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIhovv004373; Thu, 28 Feb 2013 18:43:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIhoaq004371; Thu, 28 Feb 2013 18:43:50 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201302281843.r1SIhoaq004371@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 28 Feb 2013 18:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247485 - in stable/9: crypto/openssh crypto/openssh/openbsd-compat secure/lib/libssh secure/usr.sbin/sshd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:43:50 -0000 Author: des Date: Thu Feb 28 18:43:50 2013 New Revision: 247485 URL: http://svnweb.freebsd.org/changeset/base/247485 Log: Pull in OpenSSH 6.1 from head. Added: stable/9/crypto/openssh/sandbox-darwin.c - copied unchanged from r226046, head/crypto/openssh/sandbox-darwin.c stable/9/crypto/openssh/sandbox-null.c - copied unchanged from r226046, head/crypto/openssh/sandbox-null.c stable/9/crypto/openssh/sandbox-rlimit.c - copied, changed from r226046, head/crypto/openssh/sandbox-rlimit.c stable/9/crypto/openssh/sandbox-systrace.c - copied, changed from r226046, head/crypto/openssh/sandbox-systrace.c stable/9/crypto/openssh/ssh-sandbox.h - copied unchanged from r226046, head/crypto/openssh/ssh-sandbox.h Deleted: stable/9/crypto/openssh/WARNING.RNG stable/9/crypto/openssh/ssh-rand-helper.8 stable/9/crypto/openssh/ssh-rand-helper.c stable/9/crypto/openssh/version.c Modified: stable/9/crypto/openssh/ChangeLog stable/9/crypto/openssh/INSTALL stable/9/crypto/openssh/LICENCE stable/9/crypto/openssh/PROTOCOL.certkeys stable/9/crypto/openssh/PROTOCOL.mux stable/9/crypto/openssh/README stable/9/crypto/openssh/aclocal.m4 stable/9/crypto/openssh/addrmatch.c stable/9/crypto/openssh/audit-bsm.c stable/9/crypto/openssh/audit-linux.c (contents, props changed) stable/9/crypto/openssh/auth-krb5.c stable/9/crypto/openssh/auth-options.c stable/9/crypto/openssh/auth-passwd.c stable/9/crypto/openssh/auth-rsa.c stable/9/crypto/openssh/auth-skey.c stable/9/crypto/openssh/auth.c stable/9/crypto/openssh/auth.h stable/9/crypto/openssh/auth2-gss.c stable/9/crypto/openssh/auth2-pubkey.c stable/9/crypto/openssh/auth2.c stable/9/crypto/openssh/authfd.c stable/9/crypto/openssh/authfile.c stable/9/crypto/openssh/authfile.h stable/9/crypto/openssh/channels.c stable/9/crypto/openssh/channels.h stable/9/crypto/openssh/clientloop.c stable/9/crypto/openssh/clientloop.h stable/9/crypto/openssh/compat.c stable/9/crypto/openssh/compat.h stable/9/crypto/openssh/config.guess stable/9/crypto/openssh/config.h stable/9/crypto/openssh/config.h.in stable/9/crypto/openssh/defines.h stable/9/crypto/openssh/dh.c stable/9/crypto/openssh/dns.c stable/9/crypto/openssh/dns.h stable/9/crypto/openssh/entropy.c stable/9/crypto/openssh/entropy.h stable/9/crypto/openssh/gss-serv.c stable/9/crypto/openssh/jpake.c stable/9/crypto/openssh/kex.c stable/9/crypto/openssh/key.c stable/9/crypto/openssh/key.h stable/9/crypto/openssh/log.c stable/9/crypto/openssh/log.h stable/9/crypto/openssh/loginrec.c (contents, props changed) stable/9/crypto/openssh/mac.c stable/9/crypto/openssh/misc.c stable/9/crypto/openssh/misc.h stable/9/crypto/openssh/moduli stable/9/crypto/openssh/moduli.5 stable/9/crypto/openssh/moduli.c stable/9/crypto/openssh/monitor.c stable/9/crypto/openssh/monitor.h stable/9/crypto/openssh/monitor_wrap.c stable/9/crypto/openssh/monitor_wrap.h stable/9/crypto/openssh/mux.c stable/9/crypto/openssh/myproposal.h stable/9/crypto/openssh/openbsd-compat/bsd-cygwin_util.c stable/9/crypto/openssh/openbsd-compat/bsd-cygwin_util.h stable/9/crypto/openssh/openbsd-compat/bsd-misc.h stable/9/crypto/openssh/openbsd-compat/getcwd.c stable/9/crypto/openssh/openbsd-compat/getgrouplist.c stable/9/crypto/openssh/openbsd-compat/getrrsetbyname.c stable/9/crypto/openssh/openbsd-compat/glob.c stable/9/crypto/openssh/openbsd-compat/inet_ntop.c stable/9/crypto/openssh/openbsd-compat/mktemp.c stable/9/crypto/openssh/openbsd-compat/openbsd-compat.h stable/9/crypto/openssh/openbsd-compat/openssl-compat.c stable/9/crypto/openssh/openbsd-compat/openssl-compat.h stable/9/crypto/openssh/openbsd-compat/port-linux.c stable/9/crypto/openssh/openbsd-compat/port-linux.h stable/9/crypto/openssh/openbsd-compat/setenv.c stable/9/crypto/openssh/openbsd-compat/sha2.c (contents, props changed) stable/9/crypto/openssh/openbsd-compat/sha2.h (contents, props changed) stable/9/crypto/openssh/openbsd-compat/strlcpy.c stable/9/crypto/openssh/packet.c stable/9/crypto/openssh/packet.h stable/9/crypto/openssh/pathnames.h stable/9/crypto/openssh/readconf.c stable/9/crypto/openssh/readconf.h stable/9/crypto/openssh/roaming.h stable/9/crypto/openssh/roaming_client.c stable/9/crypto/openssh/roaming_common.c stable/9/crypto/openssh/scp.1 stable/9/crypto/openssh/scp.c stable/9/crypto/openssh/servconf.c stable/9/crypto/openssh/servconf.h stable/9/crypto/openssh/serverloop.c stable/9/crypto/openssh/session.c stable/9/crypto/openssh/sftp-client.c stable/9/crypto/openssh/sftp-glob.c stable/9/crypto/openssh/sftp-server.c stable/9/crypto/openssh/sftp.1 stable/9/crypto/openssh/sftp.c stable/9/crypto/openssh/ssh-add.1 stable/9/crypto/openssh/ssh-add.c stable/9/crypto/openssh/ssh-agent.1 stable/9/crypto/openssh/ssh-agent.c stable/9/crypto/openssh/ssh-ecdsa.c (contents, props changed) stable/9/crypto/openssh/ssh-keygen.1 stable/9/crypto/openssh/ssh-keygen.c stable/9/crypto/openssh/ssh-keyscan.c stable/9/crypto/openssh/ssh-keysign.c stable/9/crypto/openssh/ssh-pkcs11-client.c stable/9/crypto/openssh/ssh-pkcs11-helper.c stable/9/crypto/openssh/ssh-pkcs11.c stable/9/crypto/openssh/ssh.1 stable/9/crypto/openssh/ssh.c stable/9/crypto/openssh/ssh_config stable/9/crypto/openssh/ssh_config.5 stable/9/crypto/openssh/ssh_namespace.h stable/9/crypto/openssh/sshconnect.c stable/9/crypto/openssh/sshconnect2.c stable/9/crypto/openssh/sshd.8 stable/9/crypto/openssh/sshd.c stable/9/crypto/openssh/sshd_config stable/9/crypto/openssh/sshd_config.5 stable/9/crypto/openssh/umac.c stable/9/crypto/openssh/version.h stable/9/secure/lib/libssh/Makefile stable/9/secure/usr.sbin/sshd/Makefile Directory Properties: stable/9/crypto/openssh/ (props changed) stable/9/crypto/openssh/bufec.c (props changed) stable/9/crypto/openssh/kexecdh.c (props changed) stable/9/crypto/openssh/kexecdhc.c (props changed) stable/9/crypto/openssh/kexecdhs.c (props changed) stable/9/crypto/openssh/openbsd-compat/charclass.h (props changed) stable/9/crypto/openssh/openbsd-compat/strptime.c (props changed) stable/9/crypto/openssh/openbsd-compat/timingsafe_bcmp.c (props changed) stable/9/secure/lib/libssh/ (props changed) stable/9/secure/usr.sbin/sshd/ (props changed) Modified: stable/9/crypto/openssh/ChangeLog ============================================================================== --- stable/9/crypto/openssh/ChangeLog Thu Feb 28 18:24:14 2013 (r247484) +++ stable/9/crypto/openssh/ChangeLog Thu Feb 28 18:43:50 2013 (r247485) @@ -1,13 +1,1089 @@ -20110403 +20120828 + - (djm) Release openssh-6.1 + +20120828 + - (dtucker) [openbsd-compat/bsd-cygwin_util.h] define WIN32_LEAN_AND_MEAN + for compatibility with future mingw-w64 headers. Patch from vinschen at + redhat com. + +20120822 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Prepare for 5.8p2 release. - - (djm) [version.h] crank version - - Release 5.8p2 - -20110329 - - (djm) [entropy.c] closefrom() before running ssh-rand-helper; leftover fds - noticed by tmraz AT redhat.com - + [contrib/suse/openssh.spec] Update version numbers + +20120731 + - (djm) OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2012/07/06 06:38:03 + [ssh-keygen.c] + missing full stop in usage(); + - djm@cvs.openbsd.org 2012/07/10 02:19:15 + [servconf.c servconf.h sshd.c sshd_config] + Turn on systrace sandboxing of pre-auth sshd by default for new installs + by shipping a config that overrides the current UsePrivilegeSeparation=yes + default. Make it easier to flip the default in the future by adding too. + prodded markus@ feedback dtucker@ "get it in" deraadt@ + - dtucker@cvs.openbsd.org 2012/07/13 01:35:21 + [servconf.c] + handle long comments in config files better. bz#2025, ok markus + - markus@cvs.openbsd.org 2012/07/22 18:19:21 + [version.h] + openssh 6.1 + +20120720 + - (dtucker) Import regened moduli file. + +20120706 + - (djm) [sandbox-seccomp-filter.c] fallback to rlimit if seccomp filter is + not available. Allows use of sshd compiled on host with a filter-capable + kernel on hosts that lack the support. bz#2011 ok dtucker@ + - (djm) [configure.ac] Recursively expand $(bindir) to ensure it has no + unexpanded $(prefix) embedded. bz#2007 patch from nix-corp AT + esperi.org.uk; ok dtucker@ +- (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/07/06 00:41:59 + [moduli.c ssh-keygen.1 ssh-keygen.c] + Add options to specify starting line number and number of lines to process + when screening moduli candidates. This allows processing of different + parts of a candidate moduli file in parallel. man page help jmc@, ok djm@ + - djm@cvs.openbsd.org 2012/07/06 01:37:21 + [mux.c] + fix memory leak of passed-in environment variables and connection + context when new session message is malformed; bz#2003 from Bert.Wesarg + AT googlemail.com + - djm@cvs.openbsd.org 2012/07/06 01:47:38 + [ssh.c] + move setting of tty_flag to after config parsing so RequestTTY options + are correctly picked up. bz#1995 patch from przemoc AT gmail.com; + ok dtucker@ + +20120704 + - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] Add setlinebuf for + platforms that don't have it. "looks good" tim@ + +20120703 + - (dtucker) [configure.ac] Detect platforms that can't use select(2) with + setrlimit(RLIMIT_NOFILE, rl_zero) and disable the rlimit sandbox on those. + - (dtucker) [configure.ac sandbox-rlimit.c] Test whether or not + setrlimit(RLIMIT_FSIZE, rl_zero) and skip it if it's not supported. Its + benefit is minor, so it's not worth disabling the sandbox if it doesn't + work. + +20120702 +- (dtucker) OpenBSD CVS Sync + - naddy@cvs.openbsd.org 2012/06/29 13:57:25 + [ssh_config.5 sshd_config.5] + match the documented MAC order of preference to the actual one; + ok dtucker@ + - markus@cvs.openbsd.org 2012/06/30 14:35:09 + [sandbox-systrace.c sshd.c] + fix a during the load of the sandbox policies (child can still make + the read-syscall and wait forever for systrace-answers) by replacing + the read/write synchronisation with SIGSTOP/SIGCONT; + report and help hshoexer@; ok djm@, dtucker@ + - dtucker@cvs.openbsd.org 2012/07/02 08:50:03 + [ssh.c] + set interactive ToS for forwarded X11 sessions. ok djm@ + - dtucker@cvs.openbsd.org 2012/07/02 12:13:26 + [ssh-pkcs11-helper.c sftp-client.c] + fix a couple of "assigned but not used" warnings. ok markus@ + - dtucker@cvs.openbsd.org 2012/07/02 14:37:06 + [regress/connect-privsep.sh] + remove exit from end of test since it prevents reporting failure + - (dtucker) [regress/reexec.sh regress/sftp-cmds.sh regress/test-exec.sh] + Move cygwin detection to test-exec and use to skip reexec test on cygwin. + - (dtucker) [regress/test-exec.sh] Correct uname for cygwin/w2k. + +20120629 + - OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/06/21 00:16:07 + [addrmatch.c] + fix strlcpy truncation check. from carsten at debian org, ok markus + - dtucker@cvs.openbsd.org 2012/06/22 12:30:26 + [monitor.c sshconnect2.c] + remove dead code following 'for (;;)' loops. + From Steve.McClellan at radisys com, ok markus@ + - dtucker@cvs.openbsd.org 2012/06/22 14:36:33 + [sftp.c] + Remove unused variable leftover from tab-completion changes. + From Steve.McClellan at radisys com, ok markus@ + - dtucker@cvs.openbsd.org 2012/06/26 11:02:30 + [sandbox-systrace.c] + Add mquery to the list of allowed syscalls for "UsePrivilegeSeparation + sandbox" since malloc now uses it. From johnw.mail at gmail com. + - dtucker@cvs.openbsd.org 2012/06/28 05:07:45 + [mac.c myproposal.h ssh_config.5 sshd_config.5] + Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed + from draft6 of the spec and will not be in the RFC when published. Patch + from mdb at juniper net via bz#2023, ok markus. + - naddy@cvs.openbsd.org 2012/06/29 13:57:25 + [ssh_config.5 sshd_config.5] + match the documented MAC order of preference to the actual one; ok dtucker@ + - dtucker@cvs.openbsd.org 2012/05/13 01:42:32 + [regress/addrmatch.sh] + Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests + to match. Feedback and ok djm@ markus@. + - djm@cvs.openbsd.org 2012/06/01 00:47:35 + [regress/multiplex.sh regress/forwarding.sh] + append to rather than truncate test log; bz#2013 from openssh AT + roumenpetrov.info + - djm@cvs.openbsd.org 2012/06/01 00:52:52 + [regress/sftp-cmds.sh] + don't delete .* on cleanup due to unintended env expansion; pointed out in + bz#2014 by openssh AT roumenpetrov.info + - dtucker@cvs.openbsd.org 2012/06/26 12:06:59 + [regress/connect-privsep.sh] + test sandbox with every malloc option + - dtucker@cvs.openbsd.org 2012/06/28 05:07:45 + [regress/try-ciphers.sh regress/cipher-speed.sh] + Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed + from draft6 of the spec and will not be in the RFC when published. Patch + from mdb at juniper net via bz#2023, ok markus. + - (dtucker) [myproposal.h] Remove trailing backslash to fix compile error. + - (dtucker) [key.c] ifdef out sha256 key types on platforms that don't have + the required functions in libcrypto. + +20120628 + - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null + pointer deref in the client when built with LDNS and using DNSSEC with a + CNAME. Patch from gregdlg+mr at hochet info. + +20120622 + - (dtucker) [contrib/cygwin/ssh-host-config] Ensure that user sshd runs as + can logon as a service. Patch from vinschen at redhat com. + +20120620 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/12/02 00:41:56 + [mux.c] + fix bz#1948: ssh -f doesn't fork for multiplexed connection. + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/04 23:16:12 + [mux.c] + revert: + > revision 1.32 + > date: 2011/12/02 00:41:56; author: djm; state: Exp; lines: +4 -1 + > fix bz#1948: ssh -f doesn't fork for multiplexed connection. + > ok dtucker@ + it interacts badly with ControlPersist + - djm@cvs.openbsd.org 2012/01/07 21:11:36 + [mux.c] + fix double-free in new session handler + NB. Id sync only + - djm@cvs.openbsd.org 2012/05/23 03:28:28 + [dns.c dns.h key.c key.h ssh-keygen.c] + add support for RFC6594 SSHFP DNS records for ECDSA key types. + patch from bugzilla-m67 AT nulld.me in bz#1978; ok + tweak markus@ + - djm@cvs.openbsd.org 2012/06/01 00:49:35 + [PROTOCOL.mux] + correct types of port numbers (integers, not strings); bz#2004 from + bert.wesarg AT googlemail.com + - djm@cvs.openbsd.org 2012/06/01 01:01:22 + [mux.c] + fix memory leak when mux socket creation fails; bz#2002 from bert.wesarg + AT googlemail.com + - dtucker@cvs.openbsd.org 2012/06/18 11:43:53 + [jpake.c] + correct sizeof usage. patch from saw at online.de, ok deraadt + - dtucker@cvs.openbsd.org 2012/06/18 11:49:58 + [ssh_config.5] + RSA instead of DSA twice. From Steve.McClellan at radisys com + - dtucker@cvs.openbsd.org 2012/06/18 12:07:07 + [ssh.1 sshd.8] + Remove mention of 'three' key files since there are now four. From + Steve.McClellan at radisys com. + - dtucker@cvs.openbsd.org 2012/06/18 12:17:18 + [ssh.1] + Clarify description of -W. Noted by Steve.McClellan at radisys com, + ok jmc + - markus@cvs.openbsd.org 2012/06/19 18:25:28 + [servconf.c servconf.h sshd_config.5] + sshd_config: extend Match to allow AcceptEnv and {Allow,Deny}{Users,Groups} + this allows 'Match LocalPort 1022' combined with 'AllowUser bauer' + ok djm@ (back in March) + - jmc@cvs.openbsd.org 2012/06/19 21:35:54 + [sshd_config.5] + tweak previous; ok markus + - djm@cvs.openbsd.org 2012/06/20 04:42:58 + [clientloop.c serverloop.c] + initialise accept() backoff timer to avoid EINVAL from select(2) in + rekeying + +20120519 + - (dtucker) [configure.ac] bz#2010: fix non-portable shell construct. Patch + from cjwatson at debian org. + - (dtucker) [configure.ac contrib/Makefile] bz#1996: use AC_PATH_TOOL to find + pkg-config so it does the right thing when cross-compiling. Patch from + cjwatson at debian org. +- (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/05/13 01:42:32 + [servconf.h servconf.c sshd.8 sshd.c auth.c sshd_config.5] + Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests + to match. Feedback and ok djm@ markus@. + - dtucker@cvs.openbsd.org 2012/05/19 06:30:30 + [sshd_config.5] + Document PermitOpen none. bz#2001, patch from Loganaden Velvindron + +20120504 + - (dtucker) [configure.ac] Include rather than + to fix building on some plaforms. Fom bowman at math utah edu and + des at des no. + +20120427 + - (dtucker) [regress/addrmatch.sh] skip tests when running on a non-ipv6 + platform rather than exiting early, so that we still clean up and return + success or failure to test-exec.sh + +20120426 + - (djm) [auth-passwd.c] Handle crypt() returning NULL; from Paul Wouters + via Niels + - (djm) [auth-krb5.c] Save errno across calls that might modify it; + ok dtucker@ + +20120423 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/04/23 08:18:17 + [channels.c] + fix function proto/source mismatch + +20120422 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/02/29 11:21:26 + [ssh-keygen.c] + allow conversion of RSA1 keys to public PEM and PKCS8; "nice" markus@ + - guenther@cvs.openbsd.org 2012/03/15 03:10:27 + [session.c] + root should always be excluded from the test for /etc/nologin instead + of having it always enforced even when marked as ignorenologin. This + regressed when the logic was incompletely flipped around in rev 1.251 + ok halex@ millert@ + - djm@cvs.openbsd.org 2012/03/28 07:23:22 + [PROTOCOL.certkeys] + explain certificate extensions/crit split rationale. Mention requirement + that each appear at most once per cert. + - dtucker@cvs.openbsd.org 2012/03/29 23:54:36 + [channels.c channels.h servconf.c] + Add PermitOpen none option based on patch from Loganaden Velvindron + (bz #1949). ok djm@ + - djm@cvs.openbsd.org 2012/04/11 13:16:19 + [channels.c channels.h clientloop.c serverloop.c] + don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a + while; ok deraadt@ markus@ + - djm@cvs.openbsd.org 2012/04/11 13:17:54 + [auth.c] + Support "none" as an argument for AuthorizedPrincipalsFile to indicate + no file should be read. + - djm@cvs.openbsd.org 2012/04/11 13:26:40 + [sshd.c] + don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a + while; ok deraadt@ markus@ + - djm@cvs.openbsd.org 2012/04/11 13:34:17 + [ssh-keyscan.1 ssh-keyscan.c] + now that sshd defaults to offering ECDSA keys, ssh-keyscan should also + look for them by default; bz#1971 + - djm@cvs.openbsd.org 2012/04/12 02:42:32 + [servconf.c servconf.h sshd.c sshd_config sshd_config.5] + VersionAddendum option to allow server operators to append some arbitrary + text to the SSH-... banner; ok deraadt@ "don't care" markus@ + - djm@cvs.openbsd.org 2012/04/12 02:43:55 + [sshd_config sshd_config.5] + mention AuthorizedPrincipalsFile=none default + - djm@cvs.openbsd.org 2012/04/20 03:24:23 + [sftp.c] + setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...) + - jmc@cvs.openbsd.org 2012/04/20 16:26:22 + [ssh.1] + use "brackets" instead of "braces", for consistency; + +20120420 + - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Update for release 6.0 + - (djm) [README] Update URL to release notes. + - (djm) Release openssh-6.0 + +20120419 + - (djm) [configure.ac] Fix compilation error on FreeBSD, whose libutil + contains openpty() but not login() + +20120404 + - (djm) [Makefile.in configure.ac sandbox-seccomp-filter.c] Add sandbox + mode for Linux's new seccomp filter; patch from Will Drewry; feedback + and ok dtucker@ + +20120330 + - (dtucker) [contrib/redhat/openssh.spec] Bug #1992: remove now-gone WARNING + file from spec file. From crighter at nuclioss com. + - (djm) [entropy.c] bz#1991: relax OpenSSL version test to allow running + openssh binaries on a newer fix release than they were compiled on. + with and ok dtucker@ + - (djm) [openbsd-compat/bsd-cygwin_util.h] #undef _WIN32 to avoid incorrect + assumptions when building on Cygwin; patch from Corinna Vinschen + +20120309 + - (djm) [openbsd-compat/port-linux.c] bz#1960: fix crash on SELinux + systems where sshd is run in te wrong context. Patch from Sven + Vermeulen; ok dtucker@ + - (djm) [packet.c] bz#1963: Fix IPQoS not being set on non-mapped v4-in-v6 + addressed connections. ok dtucker@ + +20120224 + - (dtucker) [audit-bsm.c configure.ac] bug #1968: enable workarounds for BSM + audit breakage in Solaris 11. Patch from Magnus Johansson. + +20120215 + - (tim) [openbsd-compat/bsd-misc.h sshd.c] Fix conflicting return type for + unsetenv due to rev 1.14 change to setenv.c. Cast unsetenv to void in sshd.c + ok dtucker@ + - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN so + it actually works. + - (tim) [regress/keytype.sh] stderr redirection needs to be inside back quote + to work. Spotted by Angel Gonzalez + +20120214 + - (djm) [openbsd-compat/bsd-cygwin_util.c] Add PROGRAMFILES to list of + preserved Cygwin environment variables; from Corinna Vinschen + +20120211 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/01/05 00:16:56 + [monitor.c] + memleak on error path + - djm@cvs.openbsd.org 2012/01/07 21:11:36 + [mux.c] + fix double-free in new session handler + - miod@cvs.openbsd.org 2012/01/08 13:17:11 + [ssh-ecdsa.c] + Fix memory leak in ssh_ecdsa_verify(); from Loganaden Velvindron, + ok markus@ + - miod@cvs.openbsd.org 2012/01/16 20:34:09 + [ssh-pkcs11-client.c] + Fix a memory leak in pkcs11_rsa_private_encrypt(), reported by Jan Klemkow. + While there, be sure to buffer_clear() between send_msg() and recv_msg(). + ok markus@ + - dtucker@cvs.openbsd.org 2012/01/18 21:46:43 + [clientloop.c] + Ensure that $DISPLAY contains only valid characters before using it to + extract xauth data so that it can't be used to play local shell + metacharacter games. Report from r00t_ati at ihteam.net, ok markus. + - markus@cvs.openbsd.org 2012/01/25 19:26:43 + [packet.c] + do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying; + ok dtucker@, djm@ + - markus@cvs.openbsd.org 2012/01/25 19:36:31 + [authfile.c] + memleak in key_load_file(); from Jan Klemkow + - markus@cvs.openbsd.org 2012/01/25 19:40:09 + [packet.c packet.h] + packet_read_poll() is not used anymore. + - markus@cvs.openbsd.org 2012/02/09 20:00:18 + [version.h] + move from 6.0-beta to 6.0 + +20120206 + - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms + that don't support ECC. Patch from Phil Oleson + +20111219 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/12/02 00:41:56 + [mux.c] + fix bz#1948: ssh -f doesn't fork for multiplexed connection. + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/02 00:43:57 + [mac.c] + fix bz#1934: newer OpenSSL versions will require HMAC_CTX_Init before + HMAC_init (this change in policy seems insane to me) + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/04 23:16:12 + [mux.c] + revert: + > revision 1.32 + > date: 2011/12/02 00:41:56; author: djm; state: Exp; lines: +4 -1 + > fix bz#1948: ssh -f doesn't fork for multiplexed connection. + > ok dtucker@ + it interacts badly with ControlPersist + - djm@cvs.openbsd.org 2011/12/07 05:44:38 + [auth2.c dh.c packet.c roaming.h roaming_client.c roaming_common.c] + fix some harmless and/or unreachable int overflows; + reported Xi Wang, ok markus@ + +20111125 + - OpenBSD CVS Sync + - oga@cvs.openbsd.org 2011/11/16 12:24:28 + [sftp.c] + Don't leak list in complete_cmd_parse if there are no commands found. + Discovered when I was ``borrowing'' this code for something else. + ok djm@ + +20111121 + - (dtucker) [configure.ac] Set _FORTIFY_SOURCE. ok djm@ + +20111104 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/10/18 05:15:28 + [ssh.c] + ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@ + - djm@cvs.openbsd.org 2011/10/18 23:37:42 + [ssh-add.c] + add -k to usage(); reminded by jmc@ + - djm@cvs.openbsd.org 2011/10/19 00:06:10 + [moduli.c] + s/tmpfile/tmp/ to make this -Wshadow clean + - djm@cvs.openbsd.org 2011/10/19 10:39:48 + [umac.c] + typo in comment; patch from Michael W. Bombardieri + - djm@cvs.openbsd.org 2011/10/24 02:10:46 + [ssh.c] + bz#1943: unbreak stdio forwarding when ControlPersist is in user - ssh + was incorrectly requesting the forward in both the control master and + slave. skip requesting it in the master to fix. ok markus@ + - djm@cvs.openbsd.org 2011/10/24 02:13:13 + [session.c] + bz#1859: send tty break to pty master instead of (probably already + closed) slave side; "looks good" markus@ + - dtucker@cvs.openbsd.org 011/11/04 00:09:39 + [moduli] + regenerated moduli file; ok deraadt + - (dtucker) [INSTALL LICENCE configure.ac openbsd-compat/Makefile.in + openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/getrrsetbyname.c] + bz 1320: Add optional support for LDNS, a BSD licensed DNS resolver library + which supports DNSSEC. Patch from Simon Vallet (svallet at genoscope cns fr) + with some rework from myself and djm. ok djm. + +20111025 + - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file + fails. Patch from Corinna Vinschen. + +20111018 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/10/04 14:17:32 + [sftp-glob.c] + silence error spam for "ls */foo" in directory with files; bz#1683 + - dtucker@cvs.openbsd.org 2011/10/16 11:02:46 + [moduli.c ssh-keygen.1 ssh-keygen.c] + Add optional checkpoints for moduli screening. feedback & ok deraadt + - jmc@cvs.openbsd.org 2011/10/16 15:02:41 + [ssh-keygen.c] + put -K in the right place (usage()); + - stsp@cvs.openbsd.org 2011/10/16 15:51:39 + [moduli.c] + add missing includes to unbreak tree; fix from rpointel + - djm@cvs.openbsd.org 2011/10/18 04:58:26 + [auth-options.c key.c] + remove explict search for \0 in packet strings, this job is now done + implicitly by buffer_get_cstring; ok markus + - djm@cvs.openbsd.org 2011/10/18 05:00:48 + [ssh-add.1 ssh-add.c] + new "ssh-add -k" option to load plain keys (skipping certificates); + "looks ok" markus@ + +20111001 + - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2011/09/23 00:22:04 + [channels.c auth-options.c servconf.c channels.h sshd.8] + Add wildcard support to PermitOpen, allowing things like "PermitOpen + localhost:*". bz #1857, ok djm markus. + - markus@cvs.openbsd.org 2011/09/23 07:45:05 + [mux.c readconf.h channels.h compat.h compat.c ssh.c readconf.c channels.c + version.h] + unbreak remote portforwarding with dynamic allocated listen ports: + 1) send the actual listen port in the open message (instead of 0). + this allows multiple forwardings with a dynamic listen port + 2) update the matching permit-open entry, so we can identify where + to connect to + report: den at skbkontur.ru and P. Szczygielski + feedback and ok djm@ + - djm@cvs.openbsd.org 2011/09/25 05:44:47 + [auth2-pubkey.c] + improve the AuthorizedPrincipalsFile debug log message to include + file and line number + - dtucker@cvs.openbsd.org 2011/09/30 00:47:37 + [sshd.c] + don't attempt privsep cleanup when not using privsep; ok markus@ + - djm@cvs.openbsd.org 2011/09/30 21:22:49 + [sshd.c] + fix inverted test that caused logspam; spotted by henning@ + +20110929 + - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch + from des AT des.no + - (dtucker) [configure.ac openbsd-compat/Makefile.in + openbsd-compat/strnlen.c] Add strnlen to the compat library. + +20110923 + - (djm) [openbsd-compat/getcwd.c] Remove OpenBSD rcsid marker since we no + longer want to sync this file (OpenBSD uses a __getcwd syscall now, we + want this longhand version) + - (djm) [openbsd-compat/getgrouplist.c] Remove OpenBSD rcsid marker: the + upstream version is YPified and we don't want this + - (djm) [openbsd-compat/mktemp.c] forklift upgrade to -current version. + The file was totally rewritten between what we had in tree and -current. + - (djm) [openbsd-compat/sha2.c openbsd-compat/sha2.h] Remove OpenBSD rcsid + marker. The upstream API has changed (function and structure names) + enough to put it out of sync with other providers of this interface. + - (djm) [openbsd-compat/setenv.c] Forklift upgrade, including inclusion + of static __findenv() function from upstream setenv.c + - OpenBSD CVS Sync + - millert@cvs.openbsd.org 2006/05/05 15:27:38 + [openbsd-compat/strlcpy.c] + Convert do {} while loop -> while {} for clarity. No binary change + on most architectures. From Oliver Smith. OK deraadt@ and henning@ + - tobias@cvs.openbsd.org 2007/10/21 11:09:30 + [openbsd-compat/mktemp.c] + Comment fix about time consumption of _gettemp. + FreeBSD did this in revision 1.20. + OK deraadt@, krw@ + - deraadt@cvs.openbsd.org 2008/07/22 21:47:45 + [openbsd-compat/mktemp.c] + use arc4random_uniform(); ok djm millert + - millert@cvs.openbsd.org 2008/08/21 16:54:44 + [openbsd-compat/mktemp.c] + Remove useless code, the kernel will set errno appropriately if an + element in the path does not exist. OK deraadt@ pvalchev@ + - otto@cvs.openbsd.org 2008/12/09 19:38:38 + [openbsd-compat/inet_ntop.c] + fix inet_ntop(3) prototype; ok millert@ libc to be bumbed very soon + +20110922 + - OpenBSD CVS Sync + - pyr@cvs.openbsd.org 2011/05/12 07:15:10 + [openbsd-compat/glob.c] + When the max number of items for a directory has reached GLOB_LIMIT_READDIR + an error is returned but closedir() is not called. + spotted and fix provided by Frank Denis obsd-tech@pureftpd.org + ok otto@, millert@ + - stsp@cvs.openbsd.org 2011/09/20 10:18:46 + [glob.c] + In glob(3), limit recursion during matching attempts. Similar to + fnmatch fix. Also collapse consecutive '*' (from NetBSD). + ok miod deraadt + - djm@cvs.openbsd.org 2011/09/22 06:27:29 + [glob.c] + fix GLOB_KEEPSTAT without GLOB_NOSORT; the implicit sort was being + applied only to the gl_pathv vector and not the corresponding gl_statv + array. reported in OpenSSH bz#1935; feedback and okay matthew@ + - djm@cvs.openbsd.org 2011/08/26 01:45:15 + [ssh.1] + Add some missing ssh_config(5) options that can be used in ssh(1)'s + -o argument. Patch from duclare AT guu.fi + - djm@cvs.openbsd.org 2011/09/05 05:56:13 + [scp.1 sftp.1] + mention ControlPersist and KbdInteractiveAuthentication in the -o + verbiage in these pages too (prompted by jmc@) + - djm@cvs.openbsd.org 2011/09/05 05:59:08 + [misc.c] + fix typo in IPQoS parsing: there is no "AF14" class, but there is + an "AF21" class. Spotted by giesen AT snickers.org; ok markus stevesk + - jmc@cvs.openbsd.org 2011/09/05 07:01:44 + [scp.1] + knock out a useless Ns; + - deraadt@cvs.openbsd.org 2011/09/07 02:18:31 + [ssh-keygen.1] + typo (they vs the) found by Lawrence Teo + - djm@cvs.openbsd.org 2011/09/09 00:43:00 + [ssh_config.5 sshd_config.5] + fix typo in IPQoS parsing: there is no "AF14" class, but there is + an "AF21" class. Spotted by giesen AT snickers.org; ok markus stevesk + - djm@cvs.openbsd.org 2011/09/09 00:44:07 + [PROTOCOL.mux] + MUX_C_CLOSE_FWD includes forward type in message (though it isn't + implemented anyway) + - djm@cvs.openbsd.org 2011/09/09 22:37:01 + [scp.c] + suppress adding '--' to remote commandlines when the first argument + does not start with '-'. saves breakage on some difficult-to-upgrade + embedded/router platforms; feedback & ok dtucker ok markus + - djm@cvs.openbsd.org 2011/09/09 22:38:21 + [sshd.c] + kill the preauth privsep child on fatal errors in the monitor; + ok markus@ + - djm@cvs.openbsd.org 2011/09/09 22:46:44 + [channels.c channels.h clientloop.h mux.c ssh.c] + support for cancelling local and remote port forwards via the multiplex + socket. Use ssh -O cancel -L xx:xx:xx -R yy:yy:yy user@host" to request + the cancellation of the specified forwardings; ok markus@ + - markus@cvs.openbsd.org 2011/09/10 22:26:34 + [channels.c channels.h clientloop.c ssh.1] + support cancellation of local/dynamic forwardings from ~C commandline; + ok & feedback djm@ + - okan@cvs.openbsd.org 2011/09/11 06:59:05 + [ssh.1] + document new -O cancel command; ok djm@ + - markus@cvs.openbsd.org 2011/09/11 16:07:26 + [sftp-client.c] + fix leaks in do_hardlink() and do_readlink(); bz#1921 + from Loganaden Velvindron + - markus@cvs.openbsd.org 2011/09/12 08:46:15 + [sftp-client.c] + fix leak in do_lsreaddir(); ok djm + - djm@cvs.openbsd.org 2011/09/22 06:29:03 + [sftp.c] + don't let remote_glob() implicitly sort its results in do_globbed_ls() - + in all likelihood, they will be resorted anyway + +20110909 + - (dtucker) [entropy.h] Bug #1932: remove old definition of init_rng. From + Colin Watson. + +20110906 + - (djm) [README version.h] Correct version + - (djm) [contrib/redhat/openssh.spec] Correct restorcon => restorecon + - (djm) Respin OpenSSH-5.9p1 release + +20110905 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Update version numbers. + +20110904 + - (djm) [regress/connect-privsep.sh regress/test-exec.sh] demote fatal + regress errors for the sandbox to warnings. ok tim dtucker + - (dtucker) [ssh-keygen.c ssh-pkcs11.c] Bug #1929: add null implementations + ofsh-pkcs11.cpkcs_init and pkcs_terminate for building without dlopen + support. + +20110829 + - (djm) [openbsd-compat/port-linux.c] Suppress logging when attempting + to switch SELinux context away from unconfined_t, based on patch from + Jan Chadima; bz#1919 ok dtucker@ + +20110827 + - (dtucker) [auth-skey.c] Add log.h to fix build --with-skey. + +20110818 + - (tim) [configure.ac] Typo in error message spotted by Andy Tsouladze + +20110817 + - (tim) [mac.c myproposal.h] Wrap SHA256 and SHA512 in ifdefs for + OpenSSL 0.9.7. ok djm + - (djm) [ openbsd-compat/bsd-cygwin_util.c openbsd-compat/bsd-cygwin_util.h] + binary_pipe is no longer required on Cygwin; patch from Corinna Vinschen + - (djm) [configure.ac] error out if the host lacks the necessary bits for + an explicitly requested sandbox type + - (djm) [contrib/ssh-copy-id] Missing backlslash; spotted by + bisson AT archlinux.org + - (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2011/06/03 05:35:10 + [regress/cfgmatch.sh] + use OBJ to find test configs, patch from Tim Rice + - markus@cvs.openbsd.org 2011/06/30 22:44:43 + [regress/connect-privsep.sh] + test with sandbox enabled; ok djm@ + - djm@cvs.openbsd.org 2011/08/02 01:23:41 + [regress/cipher-speed.sh regress/try-ciphers.sh] + add SHA256/SHA512 based HMAC modes + - (djm) [regress/cipher-speed.sh regress/try-ciphers.sh] disable HMAC-SHA2 + MAC tests for platforms that hack EVP_SHA2 support + +20110812 + - (dtucker) [openbsd-compat/port-linux.c] Bug 1924: Improve selinux context + change error by reporting old and new context names Patch from + jchadima at redhat. + - (djm) [contrib/redhat/openssh.spec contrib/redhat/sshd.init] + [contrib/suse/openssh.spec contrib/suse/rc.sshd] Updated RHEL and SLES + init scrips from imorgan AT nas.nasa.gov; bz#1920 + - (djm) [contrib/ssh-copy-id] Fix failure for cases where the path to the + identify file contained whitespace. bz#1828 patch from gwenael.lambrouin + AT gmail.com; ok dtucker@ + +20110807 + - (dtucker) OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2008/06/26 06:59:39 + [moduli.5] + tweak previous; + - sobrado@cvs.openbsd.org 2009/10/28 08:56:54 + [moduli.5] + "Diffie-Hellman" is the usual spelling for the cryptographic protocol + first published by Whitfield Diffie and Martin Hellman in 1976. + ok jmc@ + - jmc@cvs.openbsd.org 2010/10/14 20:41:28 + [moduli.5] + probabalistic -> probabilistic; from naddy + - dtucker@cvs.openbsd.org 2011/08/07 12:55:30 + [sftp.1] + typo, fix from Laurent Gautrot + +20110805 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/06/23 23:35:42 + [monitor.c] + ignore EINTR errors from poll() + - tedu@cvs.openbsd.org 2011/07/06 18:09:21 + [authfd.c] + bzero the agent address. the kernel was for a while very cranky about + these things. evne though that's fixed, always good to initialize + memory. ok deraadt djm + - djm@cvs.openbsd.org 2011/07/29 14:42:45 + [sandbox-systrace.c] + fail open(2) with EPERM rather than SIGKILLing the whole process. libc + will call open() to do strerror() when NLS is enabled; + feedback and ok markus@ + - markus@cvs.openbsd.org 2011/08/01 19:18:15 + [gss-serv.c] + prevent post-auth resource exhaustion (int overflow leading to 4GB malloc); + report Adam Zabrock; ok djm@, deraadt@ + - djm@cvs.openbsd.org 2011/08/02 01:22:11 + [mac.c myproposal.h ssh.1 ssh_config.5 sshd.8 sshd_config.5] + Add new SHA256 and SHA512 based HMAC modes from + http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt + Patch from mdb AT juniper.net; feedback and ok markus@ + - djm@cvs.openbsd.org 2011/08/02 23:13:01 + [version.h] + crank now, release later + - djm@cvs.openbsd.org 2011/08/02 23:15:03 + [ssh.c] + typo in comment + +20110624 + - (djm) [configure.ac Makefile.in sandbox-darwin.c] Add a sandbox for + Darwin/OS X using sandbox_init() + setrlimit(); feedback and testing + markus@ + +20110623 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/06/22 21:47:28 + [servconf.c] + reuse the multistate option arrays to pretty-print options for "sshd -T" + - djm@cvs.openbsd.org 2011/06/22 21:57:01 + [servconf.c servconf.h sshd.c sshd_config.5] + [configure.ac Makefile.in] + introduce sandboxing of the pre-auth privsep child using systrace(4). + + This introduces a new "UsePrivilegeSeparation=sandbox" option for + sshd_config that applies mandatory restrictions on the syscalls the + privsep child can perform. This prevents a compromised privsep child + from being used to attack other hosts (by opening sockets and proxying) + or probing local kernel attack surface. + + The sandbox is implemented using systrace(4) in unsupervised "fast-path" + mode, where a list of permitted syscalls is supplied. Any syscall not + on the list results in SIGKILL being sent to the privsep child. Note + that this requires a kernel with the new SYSTR_POLICY_KILL option. + + UsePrivilegeSeparation=sandbox will become the default in the future + so please start testing it now. + + feedback dtucker@; ok markus@ + - djm@cvs.openbsd.org 2011/06/22 22:08:42 + [channels.c channels.h clientloop.c clientloop.h mux.c ssh.c] + hook up a channel confirm callback to warn the user then requested X11 + forwarding was refused by the server; ok markus@ + - djm@cvs.openbsd.org 2011/06/23 09:34:13 + [sshd.c ssh-sandbox.h sandbox.h sandbox-rlimit.c sandbox-systrace.c] + [sandbox-null.c] + rename sandbox.h => ssh-sandbox.h to make things easier for portable + - (djm) [sandbox-null.c] Dummy sandbox for platforms that don't support + setrlimit(2) + +20110620 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/06/04 00:10:26 + [ssh_config.5] + explain IdentifyFile's semantics a little better, prompted by bz#1898 + ok dtucker jmc + - markus@cvs.openbsd.org 2011/06/14 22:49:18 + [authfile.c] + make sure key_parse_public/private_rsa1() no longer consumes its input + buffer. fixes ssh-add for passphrase-protected ssh1-keys; + noted by naddy@; ok djm@ + - djm@cvs.openbsd.org 2011/06/17 21:44:31 + [log.c log.h monitor.c monitor.h monitor_wrap.c monitor_wrap.h sshd.c] + make the pre-auth privsep slave log via a socketpair shared with the + monitor rather than /var/empty/dev/log; ok dtucker@ deraadt@ markus@ + - djm@cvs.openbsd.org 2011/06/17 21:46:16 + [sftp-server.c] + the protocol version should be unsigned; bz#1913 reported by mb AT + smartftp.com + - djm@cvs.openbsd.org 2011/06/17 21:47:35 + [servconf.c] + factor out multi-choice option parsing into a parse_multistate label + and some support structures; ok dtucker@ + - djm@cvs.openbsd.org 2011/06/17 21:57:25 + [clientloop.c] + setproctitle for a mux master that has been gracefully stopped; + bz#1911 from Bert.Wesarg AT googlemail.com + +20110603 + - (dtucker) [README version.h contrib/caldera/openssh.spec + contrib/redhat/openssh.spec contrib/suse/openssh.spec] Pull the version + bumps from the 5.8p2 branch into HEAD. ok djm. + - (tim) [configure.ac defines.h] Run test program to detect system mail + directory. Add --with-maildir option to override. Fixed OpenServer 6 + getting it wrong. Fixed many systems having MAIL=/var/mail//username + ok dtucker + - (dtucker) [monitor.c] Remove the !HAVE_SOCKETPAIR case. We use socketpair + unconditionally in other places and the survey data we have does not show + any systems that use it. "nuke it" djm@ + - (djm) [configure.ac] enable setproctitle emulation for OS X + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/06/03 00:54:38 + [ssh.c] + bz#1883 - setproctitle() to identify mux master; patch from Bert.Wesarg + AT googlemail.com; ok dtucker@ + NB. includes additional portability code to enable setproctitle emulation + on platforms that don't support it. + - dtucker@cvs.openbsd.org 2011/06/03 01:37:40 + [ssh-agent.c] + Check current parent process ID against saved one to determine if the parent + has exited, rather than attempting to send a zero signal, since the latter + won't work if the parent has changed privs. bz#1905, patch from Daniel Kahn + Gillmor, ok djm@ + - dtucker@cvs.openbsd.org 2011/05/31 02:01:58 + [regress/dynamic-forward.sh] + back out revs 1.6 and 1.5 since it's not reliable + - dtucker@cvs.openbsd.org 2011/05/31 02:03:34 + [regress/dynamic-forward.sh] + work around startup and teardown races; caught by deraadt + - dtucker@cvs.openbsd.org 2011/06/03 00:29:52 + [regress/dynamic-forward.sh] + Retry establishing the port forwarding after a small delay, should make + the tests less flaky when the previous test is slow to shut down and free + up the port. + - (tim) [regress/cfgmatch.sh] Build/test out of tree fix. + +20110529 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/05/23 03:30:07 + [auth-rsa.c auth.c auth.h auth2-pubkey.c monitor.c monitor_wrap.c] + [pathnames.h servconf.c servconf.h sshd.8 sshd_config sshd_config.5] + allow AuthorizedKeysFile to specify multiple files, separated by spaces. + Bring back authorized_keys2 as a default search path (to avoid breaking + existing users of this file), but override this in sshd_config so it will + be no longer used on fresh installs. Maybe in 2015 we can remove it + entierly :) + + feedback and ok markus@ dtucker@ + - djm@cvs.openbsd.org 2011/05/23 03:33:38 + [auth.c] + make secure_filename() spam debug logs less + - djm@cvs.openbsd.org 2011/05/23 03:52:55 + [sshconnect.c] + remove extra newline + - jmc@cvs.openbsd.org 2011/05/23 07:10:21 + [sshd.8 sshd_config.5] + tweak previous; ok djm + - djm@cvs.openbsd.org 2011/05/23 07:24:57 + [authfile.c] + read in key comments for v.2 keys (though note that these are not + passed over the agent protocol); bz#439, based on patch from binder + AT arago.de; ok markus@ + - djm@cvs.openbsd.org 2011/05/24 07:15:47 + [readconf.c readconf.h ssh.c ssh_config.5 sshconnect.c sshconnect2.c] + Remove undocumented legacy options UserKnownHostsFile2 and + GlobalKnownHostsFile2 by making UserKnownHostsFile/GlobalKnownHostsFile + accept multiple paths per line and making their defaults include + known_hosts2; ok markus + - djm@cvs.openbsd.org 2011/05/23 03:31:31 + [regress/cfgmatch.sh] + include testing of multiple/overridden AuthorizedKeysFiles + refactor to simply daemon start/stop and get rid of racy constructs + +20110520 + - (djm) [session.c] call setexeccon() before executing passwd for pw + changes; bz#1891 reported by jchadima AT redhat.com; ok dtucker@ + - (djm) [aclocal.m4 configure.ac] since gcc-4.x ignores all -Wno-options + options, we should corresponding -W-option when trying to determine + whether it is accepted. Also includes a warning fix on the program + fragment uses (bad main() return type). + bz#1900 and bz#1901 reported by g.esp AT free.fr; ok dtucker@ + - (djm) [servconf.c] remove leftover droppings of AuthorizedKeysFile2 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/05/15 08:09:01 + [authfd.c monitor.c serverloop.c] + use FD_CLOEXEC consistently; patch from zion AT x96.org + - djm@cvs.openbsd.org 2011/05/17 07:13:31 + [key.c] + fatal() if asked to generate a legacy ECDSA cert (these don't exist) + and fix the regress test that was trying to generate them :) + - djm@cvs.openbsd.org 2011/05/20 00:55:02 + [servconf.c] + the options TrustedUserCAKeys, RevokedKeysFile, AuthorizedKeysFile + and AuthorizedPrincipalsFile were not being correctly applied in + Match blocks, despite being overridable there; ok dtucker@ + - dtucker@cvs.openbsd.org 2011/05/20 02:00:19 + [servconf.c] + Add comment documenting what should be after the preauth check. ok djm + - djm@cvs.openbsd.org 2011/05/20 03:25:45 + [monitor.c monitor_wrap.c servconf.c servconf.h] + use a macro to define which string options to copy between configs + for Match. This avoids problems caused by forgetting to keep three + code locations in perfect sync and ordering + + "this is at once beautiful and horrible" + ok dtucker@ + - djm@cvs.openbsd.org 2011/05/17 07:13:31 + [regress/cert-userkey.sh] + fatal() if asked to generate a legacy ECDSA cert (these don't exist) + and fix the regress test that was trying to generate them :) + - djm@cvs.openbsd.org 2011/05/20 02:43:36 + [cert-hostkey.sh] + another attempt to generate a v00 ECDSA key that broke the test + ID sync only - portable already had this somehow + - dtucker@cvs.openbsd.org 2011/05/20 05:19:50 + [dynamic-forward.sh] + Prevent races in dynamic forwarding test; ok djm + - dtucker@cvs.openbsd.org 2011/05/20 06:32:30 + [dynamic-forward.sh] + fix dumb error in dynamic-forward test + +20110515 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/05/05 05:12:08 + [mux.c] + gracefully fall back when ControlPath is too large for a + sockaddr_un. ok markus@ as part of a larger diff + - dtucker@cvs.openbsd.org 2011/05/06 01:03:35 + [sshd_config] + clarify language about overriding defaults. bz#1892, from Petr Cerny + - djm@cvs.openbsd.org 2011/05/06 01:09:53 + [sftp.1] + mention that IPv6 addresses must be enclosed in square brackets; + bz#1845 + - djm@cvs.openbsd.org 2011/05/06 02:05:41 + [sshconnect2.c] + fix memory leak; bz#1849 ok dtucker@ + - djm@cvs.openbsd.org 2011/05/06 21:14:05 + [packet.c packet.h] + set traffic class for IPv6 traffic as we do for IPv4 TOS; + patch from lionel AT mamane.lu via Colin Watson in bz#1855; + ok markus@ + - djm@cvs.openbsd.org 2011/05/06 21:18:02 + [ssh.c ssh_config.5] + add a %L expansion (short-form of the local host name) for ControlPath; + sync some more expansions with LocalCommand; ok markus@ + - djm@cvs.openbsd.org 2011/05/06 21:31:38 + [readconf.c ssh_config.5] + support negated Host matching, e.g. + + Host *.example.org !c.example.org + User mekmitasdigoat + + Will match "a.example.org", "b.example.org", but not "c.example.org" + ok markus@ + - djm@cvs.openbsd.org 2011/05/06 21:34:32 + [clientloop.c mux.c readconf.c readconf.h ssh.c ssh_config.5] + Add a RequestTTY ssh_config option to allow configuration-based + control over tty allocation (like -t/-T); ok markus@ + - djm@cvs.openbsd.org 2011/05/06 21:38:58 + [ssh.c] + fix dropping from previous diff + - djm@cvs.openbsd.org 2011/05/06 22:20:10 + [PROTOCOL.mux] + fix numbering; from bert.wesarg AT googlemail.com + - jmc@cvs.openbsd.org 2011/05/07 23:19:39 + [ssh_config.5] + - tweak previous + - come consistency fixes + ok djm + - jmc@cvs.openbsd.org 2011/05/07 23:20:25 + [ssh.1] + +.It RequestTTY + - djm@cvs.openbsd.org 2011/05/08 12:52:01 + [PROTOCOL.mux clientloop.c clientloop.h mux.c] + improve our behaviour when TTY allocation fails: if we are in + RequestTTY=auto mode (the default), then do not treat at TTY + allocation error as fatal but rather just restore the local TTY + to cooked mode and continue. This is more graceful on devices that + never allocate TTYs. + + If RequestTTY is set to "yes" or "force", then failure to allocate + a TTY is fatal. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:46:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 23BAB3E1; Thu, 28 Feb 2013 18:46:57 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 16774B66; Thu, 28 Feb 2013 18:46:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIku3k004918; Thu, 28 Feb 2013 18:46:56 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIkuFK004917; Thu, 28 Feb 2013 18:46:56 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201302281846.r1SIkuFK004917@svn.freebsd.org> From: Jamie Gritton Date: Thu, 28 Feb 2013 18:46:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247486 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:46:57 -0000 Author: jamie Date: Thu Feb 28 18:46:56 2013 New Revision: 247486 URL: http://svnweb.freebsd.org/changeset/base/247486 Log: MFC r247071: Don't worry if a module is already loaded when looking for a fstype to mount (possible in a race condition). Reviewed by: kib Modified: stable/9/sys/kern/vfs_init.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_init.c ============================================================================== --- stable/9/sys/kern/vfs_init.c Thu Feb 28 18:43:50 2013 (r247485) +++ stable/9/sys/kern/vfs_init.c Thu Feb 28 18:46:56 2013 (r247486) @@ -122,7 +122,7 @@ struct vfsconf * vfs_byname_kld(const char *fstype, struct thread *td, int *error) { struct vfsconf *vfsp; - int fileid; + int fileid, loaded; vfsp = vfs_byname(fstype); if (vfsp != NULL) @@ -130,13 +130,17 @@ vfs_byname_kld(const char *fstype, struc /* Try to load the respective module. */ *error = kern_kldload(td, fstype, &fileid); + loaded = (*error == 0); + if (*error == EEXIST) + *error = 0; if (*error) return (NULL); /* Look up again to see if the VFS was loaded. */ vfsp = vfs_byname(fstype); if (vfsp == NULL) { - (void)kern_kldunload(td, fileid, LINKER_UNLOAD_FORCE); + if (loaded) + (void)kern_kldunload(td, fileid, LINKER_UNLOAD_FORCE); *error = ENODEV; return (NULL); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:49:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9485B5A5; Thu, 28 Feb 2013 18:49:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 82602BE6; Thu, 28 Feb 2013 18:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SInWUI005383; Thu, 28 Feb 2013 18:49:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SInW12005382; Thu, 28 Feb 2013 18:49:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281849.r1SInW12005382@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247487 - stable/9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:49:32 -0000 Author: jhb Date: Thu Feb 28 18:49:31 2013 New Revision: 247487 URL: http://svnweb.freebsd.org/changeset/base/247487 Log: MFC 241748: When checking to see if a video output's _ADR matches an entry in the parent adapter's _DOD list, only check the low 16 bits of both _ADR and _DOD. The language in the ACPI spec seems to indicate that the _ADR values should exactly match the entries in _DOD. However, I assume that the masking added to _DOD values was added to work around some known busted machines (the commit history doesn't indicate either way), and the ACPI spec does require that the low 16 bits are unique for all video outputs, so only checking the low 16 bits should be fine. This fixes recognition of video outputs that use the new standardized device ID scheme in ACPI 3.0 that set bit 31 such as certain Dell laptops. Modified: stable/9/sys/dev/acpica/acpi_video.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_video.c Thu Feb 28 18:46:56 2013 (r247486) +++ stable/9/sys/dev/acpica/acpi_video.c Thu Feb 28 18:49:31 2013 (r247487) @@ -906,7 +906,8 @@ vid_enum_outputs_subr(ACPI_HANDLE handle for (i = 0; i < argset->dod_pkg->Package.Count; i++) { if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & DOD_DEVID_MASK_FULL)) { argset->callback(handle, val, argset->context); argset->count++; } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:49:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7AF5D6BC; Thu, 28 Feb 2013 18:49:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA1FBE7; Thu, 28 Feb 2013 18:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SInfnV005445; Thu, 28 Feb 2013 18:49:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SInfpn005444; Thu, 28 Feb 2013 18:49:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281849.r1SInfpn005444@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247488 - stable/8/sys/dev/acpica X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:49:41 -0000 Author: jhb Date: Thu Feb 28 18:49:40 2013 New Revision: 247488 URL: http://svnweb.freebsd.org/changeset/base/247488 Log: MFC 241748: When checking to see if a video output's _ADR matches an entry in the parent adapter's _DOD list, only check the low 16 bits of both _ADR and _DOD. The language in the ACPI spec seems to indicate that the _ADR values should exactly match the entries in _DOD. However, I assume that the masking added to _DOD values was added to work around some known busted machines (the commit history doesn't indicate either way), and the ACPI spec does require that the low 16 bits are unique for all video outputs, so only checking the low 16 bits should be fine. This fixes recognition of video outputs that use the new standardized device ID scheme in ACPI 3.0 that set bit 31 such as certain Dell laptops. Modified: stable/8/sys/dev/acpica/acpi_video.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_video.c Thu Feb 28 18:49:31 2013 (r247487) +++ stable/8/sys/dev/acpica/acpi_video.c Thu Feb 28 18:49:40 2013 (r247488) @@ -874,7 +874,8 @@ vid_enum_outputs_subr(ACPI_HANDLE handle for (i = 0; i < argset->dod_pkg->Package.Count; i++) { if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & DOD_DEVID_MASK_FULL)) { argset->callback(handle, val, argset->context); argset->count++; } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:58:37 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C884A91A; Thu, 28 Feb 2013 18:58:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A3812C36; Thu, 28 Feb 2013 18:58:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIwblQ008553; Thu, 28 Feb 2013 18:58:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIwbVm008552; Thu, 28 Feb 2013 18:58:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281858.r1SIwbVm008552@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247489 - stable/9/sys/dev/puc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:58:37 -0000 Author: jhb Date: Thu Feb 28 18:58:37 2013 New Revision: 247489 URL: http://svnweb.freebsd.org/changeset/base/247489 Log: MFC 245471: Do not require a filter-only interrupt handler for puc ports that are not serial devices (such as printer ports). This allows ppc devices attached to puc to correctly setup an interrupt handler and work. Modified: stable/9/sys/dev/puc/puc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/puc/ (props changed) Modified: stable/9/sys/dev/puc/puc.c ============================================================================== --- stable/9/sys/dev/puc/puc.c Thu Feb 28 18:49:40 2013 (r247488) +++ stable/9/sys/dev/puc/puc.c Thu Feb 28 18:58:37 2013 (r247489) @@ -622,7 +622,7 @@ puc_bus_setup_intr(device_t dev, device_ if (cookiep == NULL || res != port->p_ires) return (EINVAL); /* We demand that serdev devices use filter_only interrupts. */ - if (ihand != NULL) + if (port->p_type == PUC_TYPE_SERIAL && ihand != NULL) return (ENXIO); if (rman_get_device(port->p_ires) != originator) return (ENXIO); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 18:59:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 25D04A87; Thu, 28 Feb 2013 18:59:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 18C61C3D; Thu, 28 Feb 2013 18:59:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SIx0jp008648; Thu, 28 Feb 2013 18:59:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SIx0fo008647; Thu, 28 Feb 2013 18:59:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281859.r1SIx0fo008647@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 18:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247490 - stable/8/sys/dev/puc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 18:59:01 -0000 Author: jhb Date: Thu Feb 28 18:59:00 2013 New Revision: 247490 URL: http://svnweb.freebsd.org/changeset/base/247490 Log: MFC 245471: Do not require a filter-only interrupt handler for puc ports that are not serial devices (such as printer ports). This allows ppc devices attached to puc to correctly setup an interrupt handler and work. Modified: stable/8/sys/dev/puc/puc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/puc/ (props changed) Modified: stable/8/sys/dev/puc/puc.c ============================================================================== --- stable/8/sys/dev/puc/puc.c Thu Feb 28 18:58:37 2013 (r247489) +++ stable/8/sys/dev/puc/puc.c Thu Feb 28 18:59:00 2013 (r247490) @@ -622,7 +622,7 @@ puc_bus_setup_intr(device_t dev, device_ if (cookiep == NULL || res != port->p_ires) return (EINVAL); /* We demand that serdev devices use filter_only interrupts. */ - if (ihand != NULL) + if (port->p_type == PUC_TYPE_SERIAL && ihand != NULL) return (ENXIO); if (rman_get_device(port->p_ires) != originator) return (ENXIO); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 19:00:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5E770C0B; Thu, 28 Feb 2013 19:00:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 382F3CC0; Thu, 28 Feb 2013 19:00:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SJ0wUa010679; Thu, 28 Feb 2013 19:00:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SJ0vsw010675; Thu, 28 Feb 2013 19:00:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281900.r1SJ0vsw010675@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 19:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247491 - in stable/9/sys: fs/nfs nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 19:00:58 -0000 Author: jhb Date: Thu Feb 28 19:00:57 2013 New Revision: 247491 URL: http://svnweb.freebsd.org/changeset/base/247491 Log: MFC 245476: - More properly handle interrupted NFS requests on an interruptible mount by returning an error of EINTR rather than EACCES. - While here, bring back some (but not all) of the NFS RPC statistics lost when krpc was committed. Modified: stable/9/sys/fs/nfs/nfs_commonkrpc.c stable/9/sys/nfsclient/nfs_krpc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 18:59:00 2013 (r247490) +++ stable/9/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 19:00:57 2013 (r247491) @@ -741,12 +741,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { + NFSINCRGLOBAL(newnfsstats.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EPROTONOSUPPORT; + } else if (stat == RPC_INTR) { + error = EINTR; } else { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EACCES; } if (error) { Modified: stable/9/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/9/sys/nfsclient/nfs_krpc.c Thu Feb 28 18:59:00 2013 (r247490) +++ stable/9/sys/nfsclient/nfs_krpc.c Thu Feb 28 19:00:57 2013 (r247491) @@ -549,14 +549,21 @@ tryagain: */ if (stat == RPC_SUCCESS) error = 0; - else if (stat == RPC_TIMEDOUT) + else if (stat == RPC_TIMEDOUT) { + nfsstats.rpctimeouts++; error = ETIMEDOUT; - else if (stat == RPC_VERSMISMATCH) + } else if (stat == RPC_VERSMISMATCH) { + nfsstats.rpcinvalid++; error = EOPNOTSUPP; - else if (stat == RPC_PROGVERSMISMATCH) + } else if (stat == RPC_PROGVERSMISMATCH) { + nfsstats.rpcinvalid++; error = EPROTONOSUPPORT; - else + } else if (stat == RPC_INTR) { + error = EINTR; + } else { + nfsstats.rpcinvalid++; error = EACCES; + } if (error) goto nfsmout; @@ -572,6 +579,7 @@ tryagain: if (error == ENOMEM) { m_freem(mrep); AUTH_DESTROY(auth); + nfsstats.rpcinvalid++; return (error); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 19:01:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7EDE1D5E; Thu, 28 Feb 2013 19:01:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 59205CC2; Thu, 28 Feb 2013 19:01:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SJ154I010764; Thu, 28 Feb 2013 19:01:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SJ15tH010762; Thu, 28 Feb 2013 19:01:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302281901.r1SJ15tH010762@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 19:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247492 - in stable/8/sys: fs/nfs nfsclient X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 19:01:05 -0000 Author: jhb Date: Thu Feb 28 19:01:04 2013 New Revision: 247492 URL: http://svnweb.freebsd.org/changeset/base/247492 Log: MFC 245476: - More properly handle interrupted NFS requests on an interruptible mount by returning an error of EINTR rather than EACCES. - While here, bring back some (but not all) of the NFS RPC statistics lost when krpc was committed. Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c stable/8/sys/nfsclient/nfs_krpc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/nfsclient/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 19:00:57 2013 (r247491) +++ stable/8/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 19:01:04 2013 (r247492) @@ -695,12 +695,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { + NFSINCRGLOBAL(newnfsstats.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EPROTONOSUPPORT; + } else if (stat == RPC_INTR) { + error = EINTR; } else { + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EACCES; } if (error) { Modified: stable/8/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/8/sys/nfsclient/nfs_krpc.c Thu Feb 28 19:00:57 2013 (r247491) +++ stable/8/sys/nfsclient/nfs_krpc.c Thu Feb 28 19:01:04 2013 (r247492) @@ -549,14 +549,21 @@ tryagain: */ if (stat == RPC_SUCCESS) error = 0; - else if (stat == RPC_TIMEDOUT) + else if (stat == RPC_TIMEDOUT) { + nfsstats.rpctimeouts++; error = ETIMEDOUT; - else if (stat == RPC_VERSMISMATCH) + } else if (stat == RPC_VERSMISMATCH) { + nfsstats.rpcinvalid++; error = EOPNOTSUPP; - else if (stat == RPC_PROGVERSMISMATCH) + } else if (stat == RPC_PROGVERSMISMATCH) { + nfsstats.rpcinvalid++; error = EPROTONOSUPPORT; - else + } else if (stat == RPC_INTR) { + error = EINTR; + } else { + nfsstats.rpcinvalid++; error = EACCES; + } if (error) goto nfsmout; @@ -572,6 +579,7 @@ tryagain: if (error == ENOMEM) { m_freem(mrep); AUTH_DESTROY(auth); + nfsstats.rpcinvalid++; return (error); } From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:24:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1F753E1A; Thu, 28 Feb 2013 21:24:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CB1E2B3; Thu, 28 Feb 2013 21:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLOAtC054782; Thu, 28 Feb 2013 21:24:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLOAZ6054781; Thu, 28 Feb 2013 21:24:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302282124.r1SLOAZ6054781@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 21:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247498 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:24:11 -0000 Author: jhb Date: Thu Feb 28 21:24:10 2013 New Revision: 247498 URL: http://svnweb.freebsd.org/changeset/base/247498 Log: MFC 245238: Add an option to not drop options from the third retransmitted SYN. If the SYNs (or SYN/ACK replies) are dropped due to network congestion, then the remote end of the connection may act as if options such as window scaling are enabled but the local end will think they are not. This can result in very slow data transfers in the case of window scaling disagreements. Note that the unlike HEAD the existing behavior is preserved by default, but it can be disabled by setting the net.inet.tcp.rexmit_drop_options sysctl to zero. Modified: stable/9/sys/netinet/tcp_timer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_timer.c ============================================================================== --- stable/9/sys/netinet/tcp_timer.c Thu Feb 28 19:51:30 2013 (r247497) +++ stable/9/sys/netinet/tcp_timer.c Thu Feb 28 21:24:10 2013 (r247498) @@ -118,6 +118,11 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, keep /* max idle probes */ int tcp_maxpersistidle; +static int tcp_rexmit_drop_options = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rexmit_drop_options, CTLFLAG_RW, + &tcp_rexmit_drop_options, 0, + "Drop TCP options from 3rd and later retransmitted SYN"); + static int per_cpu_timers = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, per_cpu_timers, CTLFLAG_RW, &per_cpu_timers , 0, "run tcp timers on all cpus"); @@ -578,7 +583,8 @@ tcp_timer_rexmt(void * xtp) * header compression code which trashes TCP segments containing * unknown-to-them TCP options. */ - if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3)) + if (tcp_rexmit_drop_options && (tp->t_state == TCPS_SYN_SENT) && + (tp->t_rxtshift == 3)) tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP); /* * If we backed off this far, our srtt estimate is probably bogus. From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:24:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 57A0EF6D; Thu, 28 Feb 2013 21:24:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4ABAF2B5; Thu, 28 Feb 2013 21:24:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLOKwk054837; Thu, 28 Feb 2013 21:24:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLOKrV054836; Thu, 28 Feb 2013 21:24:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302282124.r1SLOKrV054836@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 21:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247499 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:24:20 -0000 Author: jhb Date: Thu Feb 28 21:24:19 2013 New Revision: 247499 URL: http://svnweb.freebsd.org/changeset/base/247499 Log: MFC 245238: Add an option to not drop options from the third retransmitted SYN. If the SYNs (or SYN/ACK replies) are dropped due to network congestion, then the remote end of the connection may act as if options such as window scaling are enabled but the local end will think they are not. This can result in very slow data transfers in the case of window scaling disagreements. Note that the unlike HEAD the existing behavior is preserved by default, but it can be disabled by setting the net.inet.tcp.rexmit_drop_options sysctl to zero. Modified: stable/8/sys/netinet/tcp_timer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/tcp_timer.c ============================================================================== --- stable/8/sys/netinet/tcp_timer.c Thu Feb 28 21:24:10 2013 (r247498) +++ stable/8/sys/netinet/tcp_timer.c Thu Feb 28 21:24:19 2013 (r247499) @@ -117,6 +117,11 @@ int tcp_maxpersistidle; /* max idle time in persist */ int tcp_maxidle; +static int tcp_rexmit_drop_options = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rexmit_drop_options, CTLFLAG_RW, + &tcp_rexmit_drop_options, 0, + "Drop TCP options from 3rd and later retransmitted SYN"); + /* * Tcp protocol timeout routine called every 500 ms. * Updates timestamps used for TCP @@ -552,7 +557,8 @@ tcp_timer_rexmt(void * xtp) * header compression code which trashes TCP segments containing * unknown-to-them TCP options. */ - if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3)) + if (tcp_rexmit_drop_options && (tp->t_state == TCPS_SYN_SENT) && + (tp->t_rxtshift == 3)) tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP); /* * If we backed off this far, our srtt estimate is probably bogus. From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:32:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BEC242B7; Thu, 28 Feb 2013 21:32:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABFE331E; Thu, 28 Feb 2013 21:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLWm5B057727; Thu, 28 Feb 2013 21:32:48 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLWlXQ057721; Thu, 28 Feb 2013 21:32:47 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201302282132.r1SLWlXQ057721@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 28 Feb 2013 21:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247500 - in stable/8/lib/libc: gen stdlib X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:32:48 -0000 Author: des Date: Thu Feb 28 21:32:47 2013 New Revision: 247500 URL: http://svnweb.freebsd.org/changeset/base/247500 Log: MFH (r240107,240111,240361): warn against using weak PRNGs Modified: stable/8/lib/libc/gen/rand48.3 stable/8/lib/libc/stdlib/rand.3 stable/8/lib/libc/stdlib/random.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/rand48.3 ============================================================================== --- stable/8/lib/libc/gen/rand48.3 Thu Feb 28 21:24:19 2013 (r247499) +++ stable/8/lib/libc/gen/rand48.3 Thu Feb 28 21:32:47 2013 (r247500) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd February 2, 2010 +.Dd September 4, 2012 .Dt RAND48 3 .Os .Sh NAME @@ -49,6 +49,14 @@ .Ft void .Fn lcong48 "unsigned short p[7]" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn rand48 family of functions generates pseudo-random numbers using a linear @@ -174,10 +182,8 @@ It is thus not possible to use values gr Note that all three methods of seeding the random number generator always also set the multiplicand and addend for any of the six generator calls. -.Pp -For a more powerful random number generator, see -.Xr random 3 . .Sh SEE ALSO +.Xr arc4random 3 , .Xr rand 3 , .Xr random 3 .Sh AUTHORS Modified: stable/8/lib/libc/stdlib/rand.3 ============================================================================== --- stable/8/lib/libc/stdlib/rand.3 Thu Feb 28 21:24:19 2013 (r247499) +++ stable/8/lib/libc/stdlib/rand.3 Thu Feb 28 21:32:47 2013 (r247500) @@ -32,7 +32,7 @@ .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 6, 2010 +.Dd September 4, 2012 .Dt RAND 3 .Os .Sh NAME @@ -55,9 +55,15 @@ .Fn rand_r "unsigned *ctx" .Sh DESCRIPTION .Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp These interfaces are obsoleted by .Xr random 3 . -.Ef .Pp The .Fn rand @@ -88,9 +94,6 @@ The function initializes a seed using the .Xr random 4 random number device which returns good random numbers. -However, the -.Fn rand -function still remains unsuitable for cryptographic use. .Pp The .Fn rand_r @@ -105,8 +108,6 @@ For better generator quality, use .Xr random 3 or .Xr lrand48 3 . -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . .Sh SEE ALSO .Xr arc4random 3 , .Xr lrand48 3 , Modified: stable/8/lib/libc/stdlib/random.3 ============================================================================== --- stable/8/lib/libc/stdlib/random.3 Thu Feb 28 21:24:19 2013 (r247499) +++ stable/8/lib/libc/stdlib/random.3 Thu Feb 28 21:32:47 2013 (r247500) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 4, 2012 .Dt RANDOM 3 .Os .Sh NAME @@ -53,6 +53,14 @@ .Ft char * .Fn setstate "char *state" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn random function @@ -98,10 +106,8 @@ as the seed. .Pp The .Fn srandomdev -routine initializes a state array using the -.Xr random 4 -random number device which returns good random numbers, -suitable for cryptographic use. +routine initializes a state array using data from +.Xr random 4 . Note that this particular seeding procedure can generate states which are impossible to reproduce by calling @@ -175,7 +181,6 @@ messages are printed on the standard err .Xr arc4random 3 , .Xr lrand48 3 , .Xr rand 3 , -.Xr srand 3 , .Xr random 4 .Sh HISTORY These @@ -191,6 +196,3 @@ The historical implementation used to ha random sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. -.Pp -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:55:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8270B7C3; Thu, 28 Feb 2013 21:55:58 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB9F402; Thu, 28 Feb 2013 21:55:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLtwrF064119; Thu, 28 Feb 2013 21:55:58 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLtwBE064117; Thu, 28 Feb 2013 21:55:58 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201302282155.r1SLtwBE064117@svn.freebsd.org> From: Jack F Vogel Date: Thu, 28 Feb 2013 21:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247501 - stable/8/sys/dev/ixgbe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:55:58 -0000 Author: jfv Date: Thu Feb 28 21:55:57 2013 New Revision: 247501 URL: http://svnweb.freebsd.org/changeset/base/247501 Log: MFC of the ixgbe driver including revisions: 217556,219902,228276,229767,229939,230572,231796,232238, 234137,234229,235547,235964,236627,236729,238149,239940, 240155,240366,240968,241037,241616,241646,241856,241885, 242403,242421,243714,243716,243718,243721,243724,243725, 243728,243729,243733,243735,243736,243741,243833,243857, 244514,245952,246128,246482,247035,247056 Modified: stable/8/sys/dev/ixgbe/ixgbe.c (contents, props changed) stable/8/sys/dev/ixgbe/ixgbe.h stable/8/sys/dev/ixgbe/ixgbe_82598.c stable/8/sys/dev/ixgbe/ixgbe_82598.h (contents, props changed) stable/8/sys/dev/ixgbe/ixgbe_82599.c stable/8/sys/dev/ixgbe/ixgbe_api.c stable/8/sys/dev/ixgbe/ixgbe_api.h stable/8/sys/dev/ixgbe/ixgbe_common.c stable/8/sys/dev/ixgbe/ixgbe_common.h stable/8/sys/dev/ixgbe/ixgbe_osdep.h stable/8/sys/dev/ixgbe/ixgbe_phy.c stable/8/sys/dev/ixgbe/ixgbe_type.h stable/8/sys/dev/ixgbe/ixgbe_vf.c stable/8/sys/dev/ixgbe/ixgbe_x540.c (contents, props changed) stable/8/sys/dev/ixgbe/ixv.c Directory Properties: stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/ixgbe/ixgbe_82599.h (props changed) stable/8/sys/dev/ixgbe/ixgbe_x540.h (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 21:32:47 2013 (r247500) +++ stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 21:55:57 2013 (r247501) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.4.5"; +char ixgbe_driver_version[] = "2.5.0 - 8"; /********************************************************************* * PCI Device ID Table @@ -80,8 +80,10 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -102,16 +104,16 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -#if __FreeBSD_version >= 800000 +#ifdef IXGBE_LEGACY_TX +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); +#else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static void ixgbe_qflush(struct ifnet *); static void ixgbe_deferred_mq_start(void *, int); -#else -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); -#endif +#endif /* IXGBE_LEGACY_TX */ static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static void ixgbe_init(void *); static void ixgbe_init_locked(struct adapter *); @@ -148,7 +150,7 @@ static void ixgbe_enable_intr(struct static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static bool ixgbe_txeof(struct tx_ring *); -static bool ixgbe_rxeof(struct ix_queue *, int); +static bool ixgbe_rxeof(struct ix_queue *); static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); @@ -161,10 +163,10 @@ static int ixgbe_set_thermal_test(SYSCTL static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); -static void ixgbe_add_rx_process_limit(struct adapter *, const char *, - const char *, int *, int); -static bool ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); -static bool ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *); +static int ixgbe_tx_ctx_setup(struct tx_ring *, + struct mbuf *, u32 *, u32 *); +static int ixgbe_tso_setup(struct tx_ring *, + struct mbuf *, u32 *, u32 *); static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); static void ixgbe_configure_ivars(struct adapter *); static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); @@ -179,6 +181,9 @@ static __inline void ixgbe_rx_discard(st static __inline void ixgbe_rx_input(struct rx_ring *, struct ifnet *, struct mbuf *, u32); +static void ixgbe_enable_rx_drop(struct adapter *); +static void ixgbe_disable_rx_drop(struct adapter *); + /* Support for pluggable optic modules */ static bool ixgbe_sfp_probe(struct adapter *); static void ixgbe_setup_optics(struct adapter *); @@ -211,7 +216,8 @@ static device_method_t ixgbe_methods[] = DEVMETHOD(device_attach, ixgbe_attach), DEVMETHOD(device_detach, ixgbe_detach), DEVMETHOD(device_shutdown, ixgbe_shutdown), - {0, 0} + + DEVMETHOD_END }; static driver_t ixgbe_driver = { @@ -237,16 +243,16 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1); static int ixgbe_enable_aim = TRUE; TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim); -static int ixgbe_max_interrupt_rate = (8000000 / IXGBE_LOW_LATENCY); +static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate); /* How many packets rxeof tries to clean at a time */ -static int ixgbe_rx_process_limit = 128; +static int ixgbe_rx_process_limit = 256; TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); -/* Flow control setting, default to full */ -static int ixgbe_flow_control = ixgbe_fc_full; -TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control); +/* How many packets txeof tries to clean at a time */ +static int ixgbe_tx_process_limit = 256; +TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); /* ** Smart speed setting, default to on @@ -265,15 +271,6 @@ static int ixgbe_enable_msix = 1; TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix); /* - * Header split: this causes the hardware to DMA - * the header into a separate mbuf from the payload, - * it can be a performance win in some workloads, but - * in others it actually hurts, its off by default. - */ -static int ixgbe_header_split = FALSE; -TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); - -/* * Number of Queues, can be set to 0, * it then autoconfigures based on the * number of cpus with a max of 8. This @@ -294,6 +291,20 @@ TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); +/* +** HW RSC control: +** this feature only works with +** IPv4, and only on 82599 and later. +** Also this will cause IP forwarding to +** fail and that can't be controlled by +** the stack as LRO can. For all these +** reasons I've deemed it best to leave +** this off and not bother with a tuneable +** interface, this would need to be compiled +** to enable. +*/ +static bool ixgbe_rsc_enable = FALSE; + /* Keep running tab on them for sanity check */ static int ixgbe_total_ports; @@ -318,6 +329,18 @@ static int atr_sample_rate = 20; static int fdir_pballoc = 1; #endif +#ifdef DEV_NETMAP +/* + * The #ifdef DEV_NETMAP / #endif blocks in this file are meant to + * be a reference on how to implement netmap support in a driver. + * Additional comments are in ixgbe_netmap.h . + * + * contains functions for netmap support + * that extend the standard driver. + */ +#include +#endif /* DEV_NETMAP */ + /********************************************************************* * Device identification routine * @@ -406,11 +429,6 @@ ixgbe_attach(device_t dev) OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, adapter, 0, ixgbe_set_flowcntl, "I", "Flow Control"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "advertise_gig", CTLTYPE_INT | CTLFLAG_RW, - adapter, 0, ixgbe_set_advertise, "I", "1G Link"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, @@ -516,28 +534,24 @@ ixgbe_attach(device_t dev) goto err_late; } - /* Get Hardware Flow Control setting */ - hw->fc.requested_mode = ixgbe_fc_full; - adapter->fc = hw->fc.requested_mode; - hw->fc.pause_time = IXGBE_FC_PAUSE; - hw->fc.low_water = IXGBE_FC_LO; - hw->fc.high_water[0] = IXGBE_FC_HI; - hw->fc.send_xon = TRUE; - error = ixgbe_init_hw(hw); - if (error == IXGBE_ERR_EEPROM_VERSION) { + switch (error) { + case IXGBE_ERR_EEPROM_VERSION: device_printf(dev, "This device is a pre-production adapter/" "LOM. Please be aware there may be issues associated " "with your hardware.\n If you are experiencing problems " "please contact your Intel or hardware representative " "who provided you with this hardware.\n"); - } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) + break; + case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev,"Unsupported SFP+ Module\n"); - - if (error) { error = EIO; - device_printf(dev,"Hardware Initialization Failure\n"); goto err_late; + case IXGBE_ERR_SFP_NOT_PRESENT: + device_printf(dev,"No SFP+ Module found\n"); + /* falls thru */ + default: + break; } /* Detect and set physical type */ @@ -554,11 +568,6 @@ ixgbe_attach(device_t dev) if (ixgbe_setup_interface(dev, adapter) != 0) goto err_late; - /* Sysctl for limiting the amount of work done in the taskqueue */ - ixgbe_add_rx_process_limit(adapter, "rx_processing_limit", - "max number of rx packets to process", &adapter->rx_process_limit, - ixgbe_rx_process_limit); - /* Initialize statistics */ ixgbe_update_stats_counters(adapter); @@ -594,6 +603,9 @@ ixgbe_attach(device_t dev) ixgbe_add_hw_stats(adapter); +#ifdef DEV_NETMAP + ixgbe_netmap_attach(adapter); +#endif /* DEV_NETMAP */ INIT_DEBUGOUT("ixgbe_attach: end"); return (0); err_late: @@ -640,7 +652,7 @@ ixgbe_detach(device_t dev) for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { -#if __FreeBSD_version >= 800000 +#ifdef IXGBE_LEGACY_TX taskqueue_drain(que->tq, &txr->txq_task); #endif taskqueue_drain(que->tq, &que->que_task); @@ -672,6 +684,9 @@ ixgbe_detach(device_t dev) ether_ifdetach(adapter->ifp); callout_drain(&adapter->timer); +#ifdef DEV_NETMAP + netmap_detach(adapter->ifp); +#endif /* DEV_NETMAP */ ixgbe_free_pci_resources(adapter); bus_generic_detach(dev); if_free(adapter->ifp); @@ -701,7 +716,7 @@ ixgbe_shutdown(device_t dev) } -#if __FreeBSD_version < 800000 +#ifdef IXGBE_LEGACY_TX /********************************************************************* * Transmit entry point * @@ -720,17 +735,14 @@ ixgbe_start_locked(struct tx_ring *txr, IXGBE_TX_LOCK_ASSERT(txr); - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; if (!adapter->link_active) return; while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) { - txr->queue_status |= IXGBE_QUEUE_DEPLETED; + if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) break; - } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) @@ -739,8 +751,6 @@ ixgbe_start_locked(struct tx_ring *txr, if (ixgbe_xmit(txr, &m_head)) { if (m_head != NULL) IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) - txr->queue_status |= IXGBE_QUEUE_DEPLETED; break; } /* Send a copy of the frame to the BPF listener */ @@ -773,7 +783,8 @@ ixgbe_start(struct ifnet *ifp) return; } -#else +#else /* ! IXGBE_LEGACY_TX */ + /* ** Multiqueue Transmit driver ** @@ -795,8 +806,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; - if (((txr->queue_status & IXGBE_QUEUE_DEPLETED) == 0) && - IXGBE_TX_TRYLOCK(txr)) { + if (IXGBE_TX_TRYLOCK(txr)) { err = ixgbe_mq_start_locked(ifp, txr, m); IXGBE_TX_UNLOCK(txr); } else { @@ -815,17 +825,12 @@ ixgbe_mq_start_locked(struct ifnet *ifp, int enqueued, err = 0; if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || - (txr->queue_status == IXGBE_QUEUE_DEPLETED) || adapter->link_active == 0) { if (m != NULL) err = drbr_enqueue(ifp, txr->br, m); return (err); } - /* Call cleanup if number of TX descriptors low */ - if (txr->tx_avail <= IXGBE_TX_CLEANUP_THRESHOLD) - ixgbe_txeof(txr); - enqueued = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -844,23 +849,21 @@ ixgbe_mq_start_locked(struct ifnet *ifp, break; } enqueued++; - drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); + ifp->if_obytes += next->m_pkthdr.len; + if (next->m_flags & M_MCAST) + ifp->if_omcasts++; /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) ixgbe_txeof(txr); - if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) { - txr->queue_status |= IXGBE_QUEUE_DEPLETED; - break; - } next = drbr_dequeue(ifp, txr->br); } if (enqueued > 0) { /* Set watchdog on */ - txr->queue_status |= IXGBE_QUEUE_WORKING; + txr->queue_status = IXGBE_QUEUE_WORKING; txr->watchdog_time = ticks; } @@ -904,7 +907,7 @@ ixgbe_qflush(struct ifnet *ifp) } if_qflush(ifp); } -#endif /* __FreeBSD_version >= 800000 */ +#endif /* IXGBE_LEGACY_TX */ /********************************************************************* * Ioctl entry point @@ -919,6 +922,7 @@ static int ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { struct adapter *adapter = ifp->if_softc; + struct ixgbe_hw *hw = &adapter->hw; struct ifreq *ifr = (struct ifreq *) data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; @@ -1006,6 +1010,8 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_capenable ^= IFCAP_HWCSUM; if (mask & IFCAP_TSO4) ifp->if_capenable ^= IFCAP_TSO4; + if (mask & IFCAP_TSO6) + ifp->if_capenable ^= IFCAP_TSO6; if (mask & IFCAP_LRO) ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) @@ -1022,7 +1028,22 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c VLAN_CAPABILITIES(ifp); break; } - + case SIOCGI2C: + { + struct ixgbe_i2c_req i2c; + IOCTL_DEBUGOUT("ioctl: SIOCGI2C (Get I2C Data)"); + error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); + if (error) + break; + if ((i2c.dev_addr != 0xA0) || (i2c.dev_addr != 0xA2)){ + error = EINVAL; + break; + } + hw->phy.ops.read_i2c_byte(hw, i2c.offset, + i2c.dev_addr, i2c.data); + error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); + break; + } default: IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); error = ether_ioctl(ifp, command, data); @@ -1070,7 +1091,7 @@ ixgbe_init_locked(struct adapter *adapte /* Set the various hardware offload abilities */ ifp->if_hwassist = 0; - if (ifp->if_capenable & IFCAP_TSO4) + if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO; if (ifp->if_capenable & IFCAP_TXCSUM) { ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); @@ -1095,7 +1116,7 @@ ixgbe_init_locked(struct adapter *adapte /* ** Determine the correct mbuf pool - ** for doing jumbo/headersplit + ** for doing jumbo frames */ if (adapter->max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; @@ -1152,6 +1173,14 @@ ixgbe_init_locked(struct adapter *adapte txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); + /* + * When the internal queue falls below PTHRESH (32), + * start prefetching as long as there are at least + * HTHRESH (1) buffers ready. The values are taken + * from the Intel linux driver 3.8.21. + * Prefetching enables tx line rate even with 1 queue. + */ + txdctl |= (32 << 0) | (1 << 8); IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); } @@ -1176,6 +1205,31 @@ ixgbe_init_locked(struct adapter *adapte msec_delay(1); } wmb(); +#ifdef DEV_NETMAP + /* + * In netmap mode, we must preserve the buffers made + * available to userspace before the if_init() + * (this is true by default on the TX side, because + * init makes all buffers available to userspace). + * + * netmap_reset() and the device specific routines + * (e.g. ixgbe_setup_receive_rings()) map these + * buffers at the end of the NIC ring, so here we + * must set the RDT (tail) register to make sure + * they are not overwritten. + * + * In this driver the NIC ring starts at RDH = 0, + * RDT points to the last slot available for reception (?), + * so RDT = num_rx_desc - 1 means the whole ring is available. + */ + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_kring *kring = &na->rx_rings[i]; + int t = na->num_rx_desc - 1 - kring->nr_hwavail; + + IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t); + } else +#endif /* DEV_NETMAP */ IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); } @@ -1210,7 +1264,7 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ if (hw->mac.type != ixgbe_mac_82598EB) { - u32 hdrm = 64 << fdir_pballoc; + u32 hdrm = 32 << fdir_pballoc; hw->mac.ops.setup_rxpba(hw, 0, hdrm, PBA_STRATEGY_EQUAL); ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); @@ -1236,12 +1290,40 @@ ixgbe_init_locked(struct adapter *adapte /* Config/Enable Link */ ixgbe_config_link(adapter); + /* Hardware Packet Buffer & Flow Control setup */ + { + u32 rxpb, frame, size, tmp; + + frame = adapter->max_frame_size; + + /* Calculate High Water */ + if (hw->mac.type == ixgbe_mac_X540) + tmp = IXGBE_DV_X540(frame, frame); + else + tmp = IXGBE_DV(frame, frame); + size = IXGBE_BT2KB(tmp); + rxpb = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(0)) >> 10; + hw->fc.high_water[0] = rxpb - size; + + /* Now calculate Low Water */ + if (hw->mac.type == ixgbe_mac_X540) + tmp = IXGBE_LOW_DV_X540(frame); + else + tmp = IXGBE_LOW_DV(frame); + hw->fc.low_water[0] = IXGBE_BT2KB(tmp); + + adapter->fc = hw->fc.requested_mode = ixgbe_fc_full; + hw->fc.pause_time = IXGBE_FC_PAUSE; + hw->fc.send_xon = TRUE; + } + /* Initialize the FC settings */ + ixgbe_start_hw(hw); + /* And now turn on interrupts */ ixgbe_enable_intr(adapter); /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; return; } @@ -1331,10 +1413,10 @@ ixgbe_handle_que(void *context, int pend bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que, adapter->rx_process_limit); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr, NULL); #else @@ -1342,7 +1424,7 @@ ixgbe_handle_que(void *context, int pend ixgbe_start_locked(txr, ifp); #endif IXGBE_TX_UNLOCK(txr); - if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + if (more) { taskqueue_enqueue(que->tq, &que->que_task); return; } @@ -1379,7 +1461,7 @@ ixgbe_legacy_irq(void *arg) return; } - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); + more_rx = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); do { @@ -1425,7 +1507,7 @@ ixgbe_msix_que(void *arg) ixgbe_disable_queue(adapter, que->msix); ++que->irqs; - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); + more_rx = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); more_tx = ixgbe_txeof(txr); @@ -1434,7 +1516,7 @@ ixgbe_msix_que(void *arg) ** has anything queued the task gets ** scheduled to handle it. */ -#if __FreeBSD_version < 800000 +#ifdef IXGBE_LEGACY_TX if (!IFQ_DRV_IS_EMPTY(&adapter->ifp->if_snd)) #else if (!drbr_empty(adapter->ifp, txr->br)) @@ -1525,10 +1607,8 @@ ixgbe_msix_link(void *arg) /* This is probably overkill :) */ if (!atomic_cmpset_int(&adapter->fdir_reinit, 0, 1)) return; - /* Clear the interrupt */ - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_FLOW_DIR); - /* Turn off the interface */ - adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + /* Disable the interrupt */ + IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FLOW_DIR); taskqueue_enqueue(adapter->tq, &adapter->fdir_task); } else #endif @@ -1602,7 +1682,7 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_active |= IFM_100_TX | IFM_FDX; break; case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + ifmr->ifm_active |= adapter->optics | IFM_FDX; break; case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= adapter->optics | IFM_FDX; @@ -1661,9 +1741,9 @@ ixgbe_xmit(struct tx_ring *txr, struct m { struct adapter *adapter = txr->adapter; u32 olinfo_status = 0, cmd_type_len; - u32 paylen = 0; int i, j, error, nsegs; - int first, last = 0; + int first; + bool remap = TRUE; struct mbuf *m_head; bus_dma_segment_t segs[adapter->num_segs]; bus_dmamap_t map; @@ -1691,74 +1771,58 @@ ixgbe_xmit(struct tx_ring *txr, struct m /* * Map the packet for DMA. */ +retry: error = bus_dmamap_load_mbuf_sg(txr->txtag, map, *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - if (error == EFBIG) { + if (__predict_false(error)) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); - if (m == NULL) { - adapter->mbuf_defrag_failed++; - m_freem(*m_headp); - *m_headp = NULL; - return (ENOBUFS); - } - *m_headp = m; - - /* Try it again */ - error = bus_dmamap_load_mbuf_sg(txr->txtag, map, - *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - - if (error == ENOMEM) { - adapter->no_tx_dma_setup++; + switch (error) { + case EFBIG: + /* Try it again? - one try */ + if (remap == TRUE) { + remap = FALSE; + m = m_defrag(*m_headp, M_NOWAIT); + if (m == NULL) { + adapter->mbuf_defrag_failed++; + m_freem(*m_headp); + *m_headp = NULL; + return (ENOBUFS); + } + *m_headp = m; + goto retry; + } else + return (error); + case ENOMEM: + txr->no_tx_dma_setup++; return (error); - } else if (error != 0) { - adapter->no_tx_dma_setup++; + default: + txr->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); } - } else if (error == ENOMEM) { - adapter->no_tx_dma_setup++; - return (error); - } else if (error != 0) { - adapter->no_tx_dma_setup++; - m_freem(*m_headp); - *m_headp = NULL; - return (error); } /* Make certain there are enough descriptors */ if (nsegs > txr->tx_avail - 2) { txr->no_desc_avail++; - error = ENOBUFS; - goto xmit_fail; + bus_dmamap_unload(txr->txtag, map); + return (ENOBUFS); } m_head = *m_headp; /* ** Set up the appropriate offload context - ** this becomes the first descriptor of - ** a packet. + ** this will consume the first descriptor */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - if (ixgbe_tso_setup(txr, m_head, &paylen)) { - cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE; - olinfo_status |= IXGBE_TXD_POPTS_IXSM << 8; - olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; - olinfo_status |= paylen << IXGBE_ADVTXD_PAYLEN_SHIFT; - ++adapter->tso_tx; - } else - return (ENXIO); - } else if (ixgbe_tx_ctx_setup(txr, m_head)) - olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; - -#ifdef IXGBE_IEEE1588 - /* This is changing soon to an mtag detection */ - if (we detect this mbuf has a TSTAMP mtag) - cmd_type_len |= IXGBE_ADVTXD_MAC_TSTAMP; -#endif + error = ixgbe_tx_ctx_setup(txr, m_head, &cmd_type_len, &olinfo_status); + if (__predict_false(error)) { + if (error == ENOBUFS) + *m_headp = NULL; + return (error); + } #ifdef IXGBE_FDIR /* Do the flow director magic */ @@ -1770,10 +1834,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m } } #endif - /* Record payload length */ - if (paylen == 0) - olinfo_status |= m_head->m_pkthdr.len << - IXGBE_ADVTXD_PAYLEN_SHIFT; i = txr->next_avail_desc; for (j = 0; j < nsegs; j++) { @@ -1789,13 +1849,9 @@ ixgbe_xmit(struct tx_ring *txr, struct m txd->read.cmd_type_len = htole32(txr->txd_cmd | cmd_type_len |seglen); txd->read.olinfo_status = htole32(olinfo_status); - last = i; /* descriptor that will get completion IRQ */ - if (++i == adapter->num_tx_desc) + if (++i == txr->num_desc) i = 0; - - txbuf->m_head = NULL; - txbuf->eop_index = -1; } txd->read.cmd_type_len |= @@ -1804,14 +1860,19 @@ ixgbe_xmit(struct tx_ring *txr, struct m txr->next_avail_desc = i; txbuf->m_head = m_head; - /* Swap the dma map between the first and last descriptor */ + /* + ** Here we swap the map so the last descriptor, + ** which gets the completion interrupt has the + ** real map, and the first descriptor gets the + ** unused map from this descriptor. + */ txr->tx_buffers[first].map = txbuf->map; txbuf->map = map; bus_dmamap_sync(txr->txtag, map, BUS_DMASYNC_PREWRITE); - /* Set the index of the descriptor that will be marked done */ + /* Set the EOP descriptor that will be marked done */ txbuf = &txr->tx_buffers[first]; - txbuf->eop_index = last; + txbuf->eop = txd; bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -1824,10 +1885,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m return (0); -xmit_fail: - bus_dmamap_unload(txr->txtag, txbuf->map); - return (error); - } static void @@ -1946,13 +2003,11 @@ ixgbe_local_timer(void *arg) { struct adapter *adapter = arg; device_t dev = adapter->dev; - struct ifnet *ifp = adapter->ifp; struct ix_queue *que = adapter->queues; struct tx_ring *txr = adapter->tx_rings; - int hung, busy, paused; + int hung = 0, paused = 0; mtx_assert(&adapter->core_mtx, MA_OWNED); - hung = busy = paused = 0; /* Check for pluggable optics */ if (adapter->sfp_probe) @@ -1971,27 +2026,18 @@ ixgbe_local_timer(void *arg) /* ** Check the TX queues status - ** - central locked handling of OACTIVE ** - watchdog only if all queues show hung */ for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { - if ((txr->queue_status & IXGBE_QUEUE_HUNG) && + if ((txr->queue_status == IXGBE_QUEUE_HUNG) && (paused == 0)) ++hung; - if (txr->queue_status & IXGBE_QUEUE_DEPLETED) - ++busy; - if ((txr->queue_status & IXGBE_QUEUE_IDLE) == 0) + else if (txr->queue_status == IXGBE_QUEUE_WORKING) taskqueue_enqueue(que->tq, &que->que_task); } /* Only truely watchdog if all queues show hung */ if (hung == adapter->num_queues) goto watchdog; - /* Only turn off the stack flow when ALL are depleted */ - if (busy == adapter->num_queues) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - else if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) && - (busy < adapter->num_queues)) - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; out: ixgbe_rearm_queues(adapter, adapter->que_mask); @@ -2020,7 +2066,6 @@ static void ixgbe_update_link_status(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; - struct tx_ring *txr = adapter->tx_rings; device_t dev = adapter->dev; @@ -2031,6 +2076,8 @@ ixgbe_update_link_status(struct adapter ((adapter->link_speed == 128)? 10:1), "Full Duplex"); adapter->link_active = TRUE; + /* Update any Flow Control changes */ + ixgbe_fc_enable(&adapter->hw); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -2039,9 +2086,6 @@ ixgbe_update_link_status(struct adapter device_printf(dev,"Link is Down\n"); if_link_state_change(ifp, LINK_STATE_DOWN); adapter->link_active = FALSE; - for (int i = 0; i < adapter->num_queues; - i++, txr++) - txr->queue_status = IXGBE_QUEUE_IDLE; } } @@ -2072,7 +2116,6 @@ ixgbe_stop(void *arg) /* Let the stack know...*/ ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; ixgbe_reset_hw(hw); hw->adapter_stopped = FALSE; @@ -2144,6 +2187,11 @@ ixgbe_setup_optics(struct adapter *adapt return; } + if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_SX) { + adapter->optics = IFM_1000_SX; + return; + } + if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_LR | IXGBE_PHYSICAL_LAYER_10GBASE_LRM)) { adapter->optics = IFM_10G_LR; @@ -2179,12 +2227,12 @@ ixgbe_setup_optics(struct adapter *adapt static int ixgbe_allocate_legacy(struct adapter *adapter) { - device_t dev = adapter->dev; + device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX struct tx_ring *txr = adapter->tx_rings; #endif - int error, rid = 0; + int error, rid = 0; /* MSI RID at 1 */ if (adapter->msix == 1) @@ -2203,7 +2251,7 @@ ixgbe_allocate_legacy(struct adapter *ad * Try allocating a fast interrupt and the associated deferred * processing contexts. */ -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); @@ -2285,7 +2333,7 @@ ixgbe_allocate_msix(struct adapter *adap if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); @@ -2526,13 +2574,12 @@ ixgbe_setup_interface(device_t dev, stru return (-1); } if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; ifp->if_baudrate = 1000000000; ifp->if_init = ixgbe_init; ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ixgbe_ioctl; -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; #else @@ -2550,16 +2597,14 @@ ixgbe_setup_interface(device_t dev, stru */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); - ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | IFCAP_VLAN_HWCSUM; + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO | IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_JUMBO_MTU; + ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; - /* Don't enable LRO by default */ - ifp->if_capabilities |= IFCAP_LRO; - /* ** Don't turn this on by default, if vlans are ** created on another pseudo device (eg. lagg) @@ -2759,6 +2804,7 @@ ixgbe_allocate_queues(struct adapter *ad txr = &adapter->tx_rings[i]; txr->adapter = adapter; txr->me = i; + txr->num_desc = adapter->num_tx_desc; /* Initialize the TX side lock */ snprintf(txr->mtx_name, sizeof(txr->mtx_name), "%s:tx(%d)", @@ -2782,7 +2828,7 @@ ixgbe_allocate_queues(struct adapter *ad error = ENOMEM; goto err_tx_desc; } -#if __FreeBSD_version >= 800000 +#ifndef IXGBE_LEGACY_TX /* Allocate a buf ring */ txr->br = buf_ring_alloc(IXGBE_BR_SIZE, M_DEVBUF, M_WAITOK, &txr->tx_mtx); @@ -2805,6 +2851,7 @@ ixgbe_allocate_queues(struct adapter *ad /* Set up some basics */ rxr->adapter = adapter; rxr->me = i; + rxr->num_desc = adapter->num_rx_desc; /* Initialize the RX side lock */ snprintf(rxr->mtx_name, sizeof(rxr->mtx_name), "%s:rx(%d)", @@ -2928,9 +2975,20 @@ ixgbe_setup_transmit_ring(struct tx_ring struct adapter *adapter = txr->adapter; struct ixgbe_tx_buf *txbuf; int i; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ /* Clear the old ring contents */ IXGBE_TX_LOCK(txr); +#ifdef DEV_NETMAP + /* + * (under lock): if in netmap mode, do some consistency + * checks and set slot to entry 0 of the netmap ring. + */ + slot = netmap_reset(na, NR_TX, txr->me, 0); +#endif /* DEV_NETMAP */ bzero((void *)txr->tx_base, (sizeof(union ixgbe_adv_tx_desc)) * adapter->num_tx_desc); /* Reset indices */ @@ -2939,7 +2997,7 @@ ixgbe_setup_transmit_ring(struct tx_ring /* Free any existing tx buffers. */ txbuf = txr->tx_buffers; - for (i = 0; i < adapter->num_tx_desc; i++, txbuf++) { + for (i = 0; i < txr->num_desc; i++, txbuf++) { if (txbuf->m_head != NULL) { bus_dmamap_sync(txr->txtag, txbuf->map, BUS_DMASYNC_POSTWRITE); @@ -2947,8 +3005,24 @@ ixgbe_setup_transmit_ring(struct tx_ring *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:57:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5734194D; Thu, 28 Feb 2013 21:57:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3AB7462A; Thu, 28 Feb 2013 21:57:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLvg9b064385; Thu, 28 Feb 2013 21:57:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLvdfe064363; Thu, 28 Feb 2013 21:57:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302282157.r1SLvdfe064363@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 21:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247502 - in stable/9/sys: fs/nfs fs/nfsclient fs/nfsserver nfs nfsclient nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:57:42 -0000 Author: jhb Date: Thu Feb 28 21:57:38 2013 New Revision: 247502 URL: http://svnweb.freebsd.org/changeset/base/247502 Log: MFC 245508,245566,245568,245611,245909: Various fixes to timestamps in NFS: - Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes() instead of comparing the desired time against the current time as a heuristic. - Remove unused nfs_curusec(). - Use vfs_timestamp() to set file timestamps rather than invoking getmicrotime() or getnanotime() directly in NFS. - Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds portion of wall-time stamps to manage timeouts on events. - Remove unused nd_starttime from the per-request structure in the new NFS server. - Use nanotime() for the modification time on a delegation to get as precise a time as possible. - Use time_second instead of extracting the second from a call to getmicrotime(). Modified: stable/9/sys/fs/nfs/nfs.h stable/9/sys/fs/nfs/nfs_commonkrpc.c stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfs/nfsport.h stable/9/sys/fs/nfsclient/nfs_clport.c stable/9/sys/fs/nfsclient/nfs_clstate.c stable/9/sys/fs/nfsclient/nfs_clvnops.c stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c stable/9/sys/fs/nfsserver/nfs_nfsdstate.c stable/9/sys/nfs/nfs_common.c stable/9/sys/nfs/nfs_common.h stable/9/sys/nfsclient/nfs_krpc.c stable/9/sys/nfsclient/nfs_subs.c stable/9/sys/nfsclient/nfs_vnops.c stable/9/sys/nfsserver/nfs_srvsubs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs.h ============================================================================== --- stable/9/sys/fs/nfs/nfs.h Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfs/nfs.h Thu Feb 28 21:57:38 2013 (r247502) @@ -519,7 +519,6 @@ struct nfsrv_descript { int *nd_errp; /* Pointer to ret status */ u_int32_t nd_retxid; /* Reply xid */ struct nfsrvcache *nd_rp; /* Assoc. cache entry */ - struct timeval nd_starttime; /* Time RPC initiated */ fhandle_t nd_fh; /* File handle */ struct ucred *nd_cred; /* Credentials */ uid_t nd_saveduid; /* Saved uid */ Modified: stable/9/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 21:57:38 2013 (r247502) @@ -436,18 +436,17 @@ nfs_feedback(int type, int proc, void *a { struct nfs_feedback_arg *nf = (struct nfs_feedback_arg *) arg; struct nfsmount *nmp = nf->nf_mount; - struct timeval now; - - getmicrouptime(&now); + time_t now; switch (type) { case FEEDBACK_REXMIT2: case FEEDBACK_RECONNECT: - if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { + now = NFSD_MONOSEC; + if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now) { nfs_down(nmp, nf->nf_td, "not responding", 0, NFSSTA_TIMEO); nf->nf_tprintfmsg = TRUE; - nf->nf_lastmsg = now.tv_sec; + nf->nf_lastmsg = now; } break; @@ -477,7 +476,7 @@ newnfs_request(struct nfsrv_descript *nd u_int16_t procnum; u_int trylater_delay = 1; struct nfs_feedback_arg nf; - struct timeval timo, now; + struct timeval timo; AUTH *auth; struct rpc_callextra ext; enum clnt_stat stat; @@ -593,8 +592,7 @@ newnfs_request(struct nfsrv_descript *nd bzero(&nf, sizeof(struct nfs_feedback_arg)); nf.nf_mount = nmp; nf.nf_td = td; - getmicrouptime(&now); - nf.nf_lastmsg = now.tv_sec - + nf.nf_lastmsg = NFSD_MONOSEC - ((nmp->nm_tprintf_delay)-(nmp->nm_tprintf_initial_delay)); } Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonsubs.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfs/nfs_commonsubs.c Thu Feb 28 21:57:38 2013 (r247502) @@ -1980,7 +1980,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd struct statfs fs; struct nfsfsinfo fsinf; struct timespec temptime; - struct timeval curtime; NFSACL_T *aclp, *naclp = NULL; #ifdef QUOTA struct dqblk dqb; @@ -2394,8 +2393,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEACCESSSET: - NFSGETTIME(&curtime); - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_atime, tl); @@ -2424,8 +2422,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEMODIFYSET: - NFSGETTIME(&curtime); - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_mtime, tl); Modified: stable/9/sys/fs/nfs/nfsport.h ============================================================================== --- stable/9/sys/fs/nfs/nfsport.h Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfs/nfsport.h Thu Feb 28 21:57:38 2013 (r247502) @@ -526,12 +526,6 @@ void nfsrvd_rcv(struct socket *, void *, #define NCHNAMLEN 9999999 /* - * Define these to use the time of day clock. - */ -#define NFSGETTIME(t) (getmicrotime(t)) -#define NFSGETNANOTIME(t) (getnanotime(t)) - -/* * These macros are defined to initialize and set the timer routine. */ #define NFS_TIMERINIT \ Modified: stable/9/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clport.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsclient/nfs_clport.c Thu Feb 28 21:57:38 2013 (r247502) @@ -732,7 +732,6 @@ nfscl_fillsattr(struct nfsrv_descript *n u_int32_t *tl; struct nfsv2_sattr *sp; nfsattrbit_t attrbits; - struct timeval curtime; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { case ND_NFSV2: @@ -761,7 +760,6 @@ nfscl_fillsattr(struct nfsrv_descript *n txdr_nfsv2time(&vap->va_mtime, &sp->sa_mtime); break; case ND_NFSV3: - getmicrotime(&curtime); if (vap->va_mode != (mode_t)VNOVAL) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = newnfs_true; @@ -795,7 +793,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = newnfs_false; } if (vap->va_atime.tv_sec != VNOVAL) { - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_atime, tl); @@ -808,7 +806,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (vap->va_mtime.tv_sec != VNOVAL) { - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_mtime, tl); Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clstate.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Thu Feb 28 21:57:38 2013 (r247502) @@ -2394,7 +2394,7 @@ nfscl_renewthread(struct nfsclclient *cl u_int32_t clidrev; int error, cbpathdown, islept, igotlock, ret, clearok; uint32_t recover_done_time = 0; - struct timespec mytime; + time_t mytime; static time_t prevsec = 0; struct nfscllockownerfh *lfhp, *nlfhp; struct nfscllockownerfhhead lfh; @@ -2559,9 +2559,9 @@ tryagain: * Call nfscl_cleanupkext() once per second to check for * open/lock owners where the process has exited. */ - NFSGETNANOTIME(&mytime); - if (prevsec != mytime.tv_sec) { - prevsec = mytime.tv_sec; + mytime = NFSD_MONOSEC; + if (prevsec != mytime) { + prevsec = mytime; nfscl_cleanupkext(clp, &lfh); } @@ -4174,7 +4174,7 @@ nfscl_delegmodtime(vnode_t vp) } dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); if (dp != NULL && (dp->nfsdl_flags & NFSCLDL_WRITE)) { - NFSGETNANOTIME(&dp->nfsdl_modtime); + nanotime(&dp->nfsdl_modtime); dp->nfsdl_flags |= NFSCLDL_MODTIMESET; } NFSUNLOCKCLSTATE(); Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Thu Feb 28 21:57:38 2013 (r247502) @@ -3229,7 +3229,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3248,7 +3248,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3268,7 +3268,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 28 21:57:38 2013 (r247502) @@ -310,7 +310,6 @@ nfs_proc(struct nfsrv_descript *nd, u_in } else { isdgram = 1; } - NFSGETTIME(&nd->nd_starttime); /* * Two cases: Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 28 21:57:38 2013 (r247502) @@ -1477,7 +1477,7 @@ nfsvno_updfilerev(struct vnode *vp, stru struct vattr va; VATTR_NULL(&va); - getnanotime(&va.va_mtime); + vfs_timestamp(&va.va_mtime); (void) VOP_SETATTR(vp, &va, cred); (void) nfsvno_getattr(vp, nvap, cred, p, 1); } @@ -2250,7 +2250,6 @@ nfsrv_sattr(struct nfsrv_descript *nd, s { u_int32_t *tl; struct nfsv2_sattr *sp; - struct timeval curtime; int error = 0, toclient = 0; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { @@ -2309,9 +2308,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; break; }; @@ -2323,9 +2320,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; break; @@ -2355,7 +2350,6 @@ nfsv4_sattr(struct nfsrv_descript *nd, s u_char *cp, namestr[NFSV4_SMALLSTR + 1]; uid_t uid; gid_t gid; - struct timeval curtime; error = nfsrv_getattrbits(nd, attrbitp, NULL, &retnotsup); if (error) @@ -2490,9 +2484,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s toclient = 1; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; } break; @@ -2517,9 +2509,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; } Modified: stable/9/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdstate.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/fs/nfsserver/nfs_nfsdstate.c Thu Feb 28 21:57:38 2013 (r247502) @@ -3966,7 +3966,6 @@ nfsrv_setupstable(NFSPROC_T *p) int error, i, tryagain; off_t off = 0; ssize_t aresid, len; - struct timeval curtime; /* * If NFSNSF_UPDATEDONE is set, this is a restart of the nfsds without @@ -3977,8 +3976,7 @@ nfsrv_setupstable(NFSPROC_T *p) /* * Set Grace over just until the file reads successfully. */ - NFSGETTIME(&curtime); - nfsrvboottime = curtime.tv_sec; + nfsrvboottime = time_second; LIST_INIT(&sf->nsf_head); sf->nsf_flags = (NFSNSF_GRACEOVER | NFSNSF_NEEDLOCK); sf->nsf_eograce = NFSD_MONOSEC + NFSRV_LEASEDELTA; @@ -4649,8 +4647,7 @@ out: APPLESTATIC void nfsd_recalldelegation(vnode_t vp, NFSPROC_T *p) { - struct timespec mytime; - int32_t starttime; + time_t starttime; int error; /* @@ -4674,8 +4671,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO * Now, call nfsrv_checkremove() in a loop while it returns * NFSERR_DELAY. Return upon any other error or when timed out. */ - NFSGETNANOTIME(&mytime); - starttime = (u_int32_t)mytime.tv_sec; + starttime = NFSD_MONOSEC; do { if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(vp, 0, p); @@ -4683,11 +4679,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO } else error = EPERM; if (error == NFSERR_DELAY) { - NFSGETNANOTIME(&mytime); - if (((u_int32_t)mytime.tv_sec - starttime) > - NFS_REMOVETIMEO && - ((u_int32_t)mytime.tv_sec - starttime) < - 100000) + if (NFSD_MONOSEC - starttime > NFS_REMOVETIMEO) break; /* Sleep for a short period of time */ (void) nfs_catnap(PZERO, 0, "nfsremove"); @@ -4948,9 +4940,7 @@ nfsrv_notsamecredname(struct nfsrv_descr static time_t nfsrv_leaseexpiry(void) { - struct timeval curtime; - NFSGETTIME(&curtime); if (nfsrv_stablefirst.nsf_eograce > NFSD_MONOSEC) return (NFSD_MONOSEC + 2 * (nfsrv_lease + NFSRV_LEASEDELTA)); return (NFSD_MONOSEC + nfsrv_lease + NFSRV_LEASEDELTA); Modified: stable/9/sys/nfs/nfs_common.c ============================================================================== --- stable/9/sys/nfs/nfs_common.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfs/nfs_common.c Thu Feb 28 21:57:38 2013 (r247502) @@ -90,15 +90,6 @@ static int nfs_realign_count; SYSCTL_INT(_vfs_nfs_common, OID_AUTO, realign_count, CTLFLAG_RD, &nfs_realign_count, 0, "Number of mbuf realignments done"); -u_quad_t -nfs_curusec(void) -{ - struct timeval tv; - - getmicrotime(&tv); - return ((u_quad_t)tv.tv_sec * 1000000 + (u_quad_t)tv.tv_usec); -} - /* * copies mbuf chain to the uio scatter/gather list */ Modified: stable/9/sys/nfs/nfs_common.h ============================================================================== --- stable/9/sys/nfs/nfs_common.h Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfs/nfs_common.h Thu Feb 28 21:57:38 2013 (r247502) @@ -46,7 +46,6 @@ extern nfstype nfsv3_type[]; #define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) int nfs_adv(struct mbuf **, caddr_t *, int, int); -u_quad_t nfs_curusec(void); void *nfsm_disct(struct mbuf **, caddr_t *, int, int, int); int nfs_realign(struct mbuf **, int); Modified: stable/9/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/9/sys/nfsclient/nfs_krpc.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfsclient/nfs_krpc.c Thu Feb 28 21:57:38 2013 (r247502) @@ -394,18 +394,17 @@ nfs_feedback(int type, int proc, void *a { struct nfs_feedback_arg *nf = (struct nfs_feedback_arg *) arg; struct nfsmount *nmp = nf->nf_mount; - struct timeval now; - - getmicrouptime(&now); + time_t now; switch (type) { case FEEDBACK_REXMIT2: case FEEDBACK_RECONNECT: - if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { + now = time_uptime; + if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now) { nfs_down(nmp, nf->nf_td, "not responding", 0, NFSSTA_TIMEO); nf->nf_tprintfmsg = TRUE; - nf->nf_lastmsg = now.tv_sec; + nf->nf_lastmsg = now; } break; @@ -438,7 +437,6 @@ nfs_request(struct vnode *vp, struct mbu time_t waituntil; caddr_t dpos; int error = 0, timeo; - struct timeval now; AUTH *auth = NULL; enum nfs_rto_timer_t timer; struct nfs_feedback_arg nf; @@ -455,8 +453,7 @@ nfs_request(struct vnode *vp, struct mbu bzero(&nf, sizeof(struct nfs_feedback_arg)); nf.nf_mount = nmp; nf.nf_td = td; - getmicrouptime(&now); - nf.nf_lastmsg = now.tv_sec - + nf.nf_lastmsg = time_uptime - ((nmp->nm_tprintf_delay) - (nmp->nm_tprintf_initial_delay)); /* Modified: stable/9/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/9/sys/nfsclient/nfs_subs.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfsclient/nfs_subs.c Thu Feb 28 21:57:38 2013 (r247502) @@ -1110,7 +1110,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = nfs_false; } if (va->va_atime.tv_sec != VNOVAL) { - if (va->va_atime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_atime, tl); @@ -1123,7 +1123,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (va->va_mtime.tv_sec != VNOVAL) { - if (va->va_mtime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_mtime, tl); Modified: stable/9/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/9/sys/nfsclient/nfs_vnops.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfsclient/nfs_vnops.c Thu Feb 28 21:57:38 2013 (r247502) @@ -3460,7 +3460,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3479,7 +3479,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3499,7 +3499,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: stable/9/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- stable/9/sys/nfsserver/nfs_srvsubs.c Thu Feb 28 21:55:57 2013 (r247501) +++ stable/9/sys/nfsserver/nfs_srvsubs.c Thu Feb 28 21:57:38 2013 (r247502) @@ -1430,7 +1430,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_atime); + vfs_timestamp(&a->va_atime); a->va_vaflags |= VA_UTIMES_NULL; break; } @@ -1446,7 +1446,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct a->va_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_mtime); + vfs_timestamp(&a->va_mtime); if (toclient == 0) a->va_vaflags |= VA_UTIMES_NULL; break; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 28 21:58:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1FAFCACA; Thu, 28 Feb 2013 21:58:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03DF8638; Thu, 28 Feb 2013 21:58:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1SLwAO2064515; Thu, 28 Feb 2013 21:58:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1SLw7cA064499; Thu, 28 Feb 2013 21:58:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302282158.r1SLw7cA064499@svn.freebsd.org> From: John Baldwin Date: Thu, 28 Feb 2013 21:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247503 - in stable/8/sys: fs/nfs fs/nfsclient fs/nfsserver nfs nfsclient nfsserver X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 21:58:11 -0000 Author: jhb Date: Thu Feb 28 21:58:07 2013 New Revision: 247503 URL: http://svnweb.freebsd.org/changeset/base/247503 Log: MFC 245508,245566,245568,245611,245909: Various fixes to timestamps in NFS: - Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes() instead of comparing the desired time against the current time as a heuristic. - Remove unused nfs_curusec(). - Use vfs_timestamp() to set file timestamps rather than invoking getmicrotime() or getnanotime() directly in NFS. - Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds portion of wall-time stamps to manage timeouts on events. - Remove unused nd_starttime from the per-request structure in the new NFS server. - Use nanotime() for the modification time on a delegation to get as precise a time as possible. - Use time_second instead of extracting the second from a call to getmicrotime(). Modified: stable/8/sys/fs/nfs/nfs.h stable/8/sys/fs/nfs/nfs_commonkrpc.c stable/8/sys/fs/nfs/nfs_commonsubs.c stable/8/sys/fs/nfs/nfsport.h stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/fs/nfsclient/nfs_clstate.c stable/8/sys/fs/nfsclient/nfs_clvnops.c stable/8/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/fs/nfsserver/nfs_nfsdstate.c stable/8/sys/nfs/nfs_common.c stable/8/sys/nfs/nfs_common.h stable/8/sys/nfsclient/nfs_krpc.c stable/8/sys/nfsclient/nfs_subs.c stable/8/sys/nfsclient/nfs_vnops.c stable/8/sys/nfsserver/nfs_srvsubs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/nfs/ (props changed) stable/8/sys/nfsclient/ (props changed) stable/8/sys/nfsserver/ (props changed) Modified: stable/8/sys/fs/nfs/nfs.h ============================================================================== --- stable/8/sys/fs/nfs/nfs.h Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfs/nfs.h Thu Feb 28 21:58:07 2013 (r247503) @@ -519,7 +519,6 @@ struct nfsrv_descript { int *nd_errp; /* Pointer to ret status */ u_int32_t nd_retxid; /* Reply xid */ struct nfsrvcache *nd_rp; /* Assoc. cache entry */ - struct timeval nd_starttime; /* Time RPC initiated */ fhandle_t nd_fh; /* File handle */ struct ucred *nd_cred; /* Credentials */ uid_t nd_saveduid; /* Saved uid */ Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfs/nfs_commonkrpc.c Thu Feb 28 21:58:07 2013 (r247503) @@ -413,18 +413,17 @@ nfs_feedback(int type, int proc, void *a { struct nfs_feedback_arg *nf = (struct nfs_feedback_arg *) arg; struct nfsmount *nmp = nf->nf_mount; - struct timeval now; - - getmicrouptime(&now); + time_t now; switch (type) { case FEEDBACK_REXMIT2: case FEEDBACK_RECONNECT: - if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { + now = NFSD_MONOSEC; + if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now) { nfs_down(nmp, nf->nf_td, "not responding", 0, NFSSTA_TIMEO); nf->nf_tprintfmsg = TRUE; - nf->nf_lastmsg = now.tv_sec; + nf->nf_lastmsg = now; } break; @@ -454,7 +453,7 @@ newnfs_request(struct nfsrv_descript *nd u_int16_t procnum; u_int trylater_delay = 1; struct nfs_feedback_arg nf; - struct timeval timo, now; + struct timeval timo; AUTH *auth; struct rpc_callextra ext; enum clnt_stat stat; @@ -570,8 +569,7 @@ newnfs_request(struct nfsrv_descript *nd bzero(&nf, sizeof(struct nfs_feedback_arg)); nf.nf_mount = nmp; nf.nf_td = td; - getmicrouptime(&now); - nf.nf_lastmsg = now.tv_sec - + nf.nf_lastmsg = NFSD_MONOSEC - ((nmp->nm_tprintf_delay)-(nmp->nm_tprintf_initial_delay)); } Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonsubs.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfs/nfs_commonsubs.c Thu Feb 28 21:58:07 2013 (r247503) @@ -1979,7 +1979,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd struct statfs fs; struct nfsfsinfo fsinf; struct timespec temptime; - struct timeval curtime; NFSACL_T *aclp, *naclp = NULL; #ifdef QUOTA struct dqblk dqb; @@ -2393,8 +2392,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEACCESSSET: - NFSGETTIME(&curtime); - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_atime, tl); @@ -2423,8 +2421,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd retnum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEMODIFYSET: - NFSGETTIME(&curtime); - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); *tl++ = txdr_unsigned(NFSV4SATTRTIME_TOCLIENT); txdr_nfsv4time(&vap->va_mtime, tl); Modified: stable/8/sys/fs/nfs/nfsport.h ============================================================================== --- stable/8/sys/fs/nfs/nfsport.h Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfs/nfsport.h Thu Feb 28 21:58:07 2013 (r247503) @@ -522,12 +522,6 @@ void nfsrvd_rcv(struct socket *, void *, #define NCHNAMLEN 9999999 /* - * Define these to use the time of day clock. - */ -#define NFSGETTIME(t) (getmicrotime(t)) -#define NFSGETNANOTIME(t) (getnanotime(t)) - -/* * These macros are defined to initialize and set the timer routine. */ #define NFS_TIMERINIT \ Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Thu Feb 28 21:58:07 2013 (r247503) @@ -702,7 +702,6 @@ nfscl_fillsattr(struct nfsrv_descript *n u_int32_t *tl; struct nfsv2_sattr *sp; nfsattrbit_t attrbits; - struct timeval curtime; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { case ND_NFSV2: @@ -731,7 +730,6 @@ nfscl_fillsattr(struct nfsrv_descript *n txdr_nfsv2time(&vap->va_mtime, &sp->sa_mtime); break; case ND_NFSV3: - getmicrotime(&curtime); if (vap->va_mode != (mode_t)VNOVAL) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = newnfs_true; @@ -765,7 +763,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = newnfs_false; } if (vap->va_atime.tv_sec != VNOVAL) { - if (vap->va_atime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_atime, tl); @@ -778,7 +776,7 @@ nfscl_fillsattr(struct nfsrv_descript *n *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (vap->va_mtime.tv_sec != VNOVAL) { - if (vap->va_mtime.tv_sec != curtime.tv_sec) { + if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&vap->va_mtime, tl); Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clstate.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsclient/nfs_clstate.c Thu Feb 28 21:58:07 2013 (r247503) @@ -2394,7 +2394,7 @@ nfscl_renewthread(struct nfsclclient *cl u_int32_t clidrev; int error, cbpathdown, islept, igotlock, ret, clearok; uint32_t recover_done_time = 0; - struct timespec mytime; + time_t mytime; static time_t prevsec = 0; struct nfscllockownerfh *lfhp, *nlfhp; struct nfscllockownerfhhead lfh; @@ -2559,9 +2559,9 @@ tryagain: * Call nfscl_cleanupkext() once per second to check for * open/lock owners where the process has exited. */ - NFSGETNANOTIME(&mytime); - if (prevsec != mytime.tv_sec) { - prevsec = mytime.tv_sec; + mytime = NFSD_MONOSEC; + if (prevsec != mytime) { + prevsec = mytime; nfscl_cleanupkext(clp, &lfh); } @@ -4174,7 +4174,7 @@ nfscl_delegmodtime(vnode_t vp) } dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); if (dp != NULL && (dp->nfsdl_flags & NFSCLDL_WRITE)) { - NFSGETNANOTIME(&dp->nfsdl_modtime); + nanotime(&dp->nfsdl_modtime); dp->nfsdl_flags |= NFSCLDL_MODTIMESET; } NFSUNLOCKCLSTATE(); Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Thu Feb 28 21:58:07 2013 (r247503) @@ -3162,7 +3162,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3181,7 +3181,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3201,7 +3201,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 28 21:58:07 2013 (r247503) @@ -290,7 +290,6 @@ nfs_proc(struct nfsrv_descript *nd, u_in } else { isdgram = 1; } - NFSGETTIME(&nd->nd_starttime); /* * Two cases: Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Thu Feb 28 21:58:07 2013 (r247503) @@ -1471,7 +1471,7 @@ nfsvno_updfilerev(struct vnode *vp, stru struct vattr va; VATTR_NULL(&va); - getnanotime(&va.va_mtime); + vfs_timestamp(&va.va_mtime); (void) VOP_SETATTR(vp, &va, cred); (void) nfsvno_getattr(vp, nvap, cred, p, 1); } @@ -2244,7 +2244,6 @@ nfsrv_sattr(struct nfsrv_descript *nd, s { u_int32_t *tl; struct nfsv2_sattr *sp; - struct timeval curtime; int error = 0, toclient = 0; switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) { @@ -2303,9 +2302,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; break; }; @@ -2317,9 +2314,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; break; @@ -2349,7 +2344,6 @@ nfsv4_sattr(struct nfsrv_descript *nd, s u_char *cp, namestr[NFSV4_SMALLSTR + 1]; uid_t uid; gid_t gid; - struct timeval curtime; error = nfsrv_getattrbits(nd, attrbitp, NULL, &retnotsup); if (error) @@ -2484,9 +2478,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s toclient = 1; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_atime.tv_sec = curtime.tv_sec; - nvap->na_atime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; } break; @@ -2511,9 +2503,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s nvap->na_vaflags &= ~VA_UTIMES_NULL; attrsum += NFSX_V4TIME; } else { - NFSGETTIME(&curtime); - nvap->na_mtime.tv_sec = curtime.tv_sec; - nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000; + vfs_timestamp(&nvap->na_mtime); if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; } Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Thu Feb 28 21:58:07 2013 (r247503) @@ -3966,7 +3966,6 @@ nfsrv_setupstable(NFSPROC_T *p) int error, i, tryagain; off_t off = 0; int aresid, len; - struct timeval curtime; /* * If NFSNSF_UPDATEDONE is set, this is a restart of the nfsds without @@ -3977,8 +3976,7 @@ nfsrv_setupstable(NFSPROC_T *p) /* * Set Grace over just until the file reads successfully. */ - NFSGETTIME(&curtime); - nfsrvboottime = curtime.tv_sec; + nfsrvboottime = time_second; LIST_INIT(&sf->nsf_head); sf->nsf_flags = (NFSNSF_GRACEOVER | NFSNSF_NEEDLOCK); sf->nsf_eograce = NFSD_MONOSEC + NFSRV_LEASEDELTA; @@ -4649,8 +4647,7 @@ out: APPLESTATIC void nfsd_recalldelegation(vnode_t vp, NFSPROC_T *p) { - struct timespec mytime; - int32_t starttime; + time_t starttime; int error; /* @@ -4674,8 +4671,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO * Now, call nfsrv_checkremove() in a loop while it returns * NFSERR_DELAY. Return upon any other error or when timed out. */ - NFSGETNANOTIME(&mytime); - starttime = (u_int32_t)mytime.tv_sec; + starttime = NFSD_MONOSEC; do { if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(vp, 0, p); @@ -4683,11 +4679,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPRO } else error = EPERM; if (error == NFSERR_DELAY) { - NFSGETNANOTIME(&mytime); - if (((u_int32_t)mytime.tv_sec - starttime) > - NFS_REMOVETIMEO && - ((u_int32_t)mytime.tv_sec - starttime) < - 100000) + if (NFSD_MONOSEC - starttime > NFS_REMOVETIMEO) break; /* Sleep for a short period of time */ (void) nfs_catnap(PZERO, 0, "nfsremove"); @@ -4948,9 +4940,7 @@ nfsrv_notsamecredname(struct nfsrv_descr static time_t nfsrv_leaseexpiry(void) { - struct timeval curtime; - NFSGETTIME(&curtime); if (nfsrv_stablefirst.nsf_eograce > NFSD_MONOSEC) return (NFSD_MONOSEC + 2 * (nfsrv_lease + NFSRV_LEASEDELTA)); return (NFSD_MONOSEC + nfsrv_lease + NFSRV_LEASEDELTA); Modified: stable/8/sys/nfs/nfs_common.c ============================================================================== --- stable/8/sys/nfs/nfs_common.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfs/nfs_common.c Thu Feb 28 21:58:07 2013 (r247503) @@ -90,15 +90,6 @@ static int nfs_realign_count; SYSCTL_INT(_vfs_nfs_common, OID_AUTO, realign_count, CTLFLAG_RD, &nfs_realign_count, 0, "Number of mbuf realignments done"); -u_quad_t -nfs_curusec(void) -{ - struct timeval tv; - - getmicrotime(&tv); - return ((u_quad_t)tv.tv_sec * 1000000 + (u_quad_t)tv.tv_usec); -} - /* * copies mbuf chain to the uio scatter/gather list */ Modified: stable/8/sys/nfs/nfs_common.h ============================================================================== --- stable/8/sys/nfs/nfs_common.h Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfs/nfs_common.h Thu Feb 28 21:58:07 2013 (r247503) @@ -46,7 +46,6 @@ extern nfstype nfsv3_type[]; #define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) int nfs_adv(struct mbuf **, caddr_t *, int, int); -u_quad_t nfs_curusec(void); void *nfsm_disct(struct mbuf **, caddr_t *, int, int, int); int nfs_realign(struct mbuf **, int); Modified: stable/8/sys/nfsclient/nfs_krpc.c ============================================================================== --- stable/8/sys/nfsclient/nfs_krpc.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfsclient/nfs_krpc.c Thu Feb 28 21:58:07 2013 (r247503) @@ -394,18 +394,17 @@ nfs_feedback(int type, int proc, void *a { struct nfs_feedback_arg *nf = (struct nfs_feedback_arg *) arg; struct nfsmount *nmp = nf->nf_mount; - struct timeval now; - - getmicrouptime(&now); + time_t now; switch (type) { case FEEDBACK_REXMIT2: case FEEDBACK_RECONNECT: - if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { + now = time_uptime; + if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now) { nfs_down(nmp, nf->nf_td, "not responding", 0, NFSSTA_TIMEO); nf->nf_tprintfmsg = TRUE; - nf->nf_lastmsg = now.tv_sec; + nf->nf_lastmsg = now; } break; @@ -438,7 +437,6 @@ nfs_request(struct vnode *vp, struct mbu time_t waituntil; caddr_t dpos; int error = 0, timeo; - struct timeval now; AUTH *auth = NULL; enum nfs_rto_timer_t timer; struct nfs_feedback_arg nf; @@ -455,8 +453,7 @@ nfs_request(struct vnode *vp, struct mbu bzero(&nf, sizeof(struct nfs_feedback_arg)); nf.nf_mount = nmp; nf.nf_td = td; - getmicrouptime(&now); - nf.nf_lastmsg = now.tv_sec - + nf.nf_lastmsg = time_uptime - ((nmp->nm_tprintf_delay) - (nmp->nm_tprintf_initial_delay)); /* Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfsclient/nfs_subs.c Thu Feb 28 21:58:07 2013 (r247503) @@ -1119,7 +1119,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = nfs_false; } if (va->va_atime.tv_sec != VNOVAL) { - if (va->va_atime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_atime, tl); @@ -1132,7 +1132,7 @@ nfsm_v3attrbuild_xx(struct vattr *va, in *tl = txdr_unsigned(NFSV3SATTRTIME_DONTCHANGE); } if (va->va_mtime.tv_sec != VNOVAL) { - if (va->va_mtime.tv_sec != time_second) { + if ((va->va_vaflags & VA_UTIMES_NULL) == 0) { tl = nfsm_build_xx(3 * NFSX_UNSIGNED, mb, bpos); *tl++ = txdr_unsigned(NFSV3SATTRTIME_TOCLIENT); txdr_nfsv3time(&va->va_mtime, tl); Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfsclient/nfs_vnops.c Thu Feb 28 21:58:07 2013 (r247503) @@ -3461,7 +3461,7 @@ nfsfifo_read(struct vop_read_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NACC; - getnanotime(&np->n_atim); + vfs_timestamp(&np->n_atim); mtx_unlock(&np->n_mtx); error = fifo_specops.vop_read(ap); return error; @@ -3480,7 +3480,7 @@ nfsfifo_write(struct vop_write_args *ap) */ mtx_lock(&np->n_mtx); np->n_flag |= NUPD; - getnanotime(&np->n_mtim); + vfs_timestamp(&np->n_mtim); mtx_unlock(&np->n_mtx); return(fifo_specops.vop_write(ap)); } @@ -3500,7 +3500,7 @@ nfsfifo_close(struct vop_close_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & (NACC | NUPD)) { - getnanotime(&ts); + vfs_timestamp(&ts); if (np->n_flag & NACC) np->n_atim = ts; if (np->n_flag & NUPD) Modified: stable/8/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- stable/8/sys/nfsserver/nfs_srvsubs.c Thu Feb 28 21:57:38 2013 (r247502) +++ stable/8/sys/nfsserver/nfs_srvsubs.c Thu Feb 28 21:58:07 2013 (r247503) @@ -1430,7 +1430,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct toclient = 1; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_atime); + vfs_timestamp(&a->va_atime); a->va_vaflags |= VA_UTIMES_NULL; break; } @@ -1446,7 +1446,7 @@ nfsm_srvsattr_xx(struct vattr *a, struct a->va_vaflags &= ~VA_UTIMES_NULL; break; case NFSV3SATTRTIME_TOSERVER: - getnanotime(&(a)->va_mtime); + vfs_timestamp(&a->va_mtime); if (toclient == 0) a->va_vaflags |= VA_UTIMES_NULL; break; From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:46:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3A7DCCAB; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C08BBE9; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210kg56016617; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210kgmM016616; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303010046.r210kgmM016616@svn.freebsd.org> From: Xin LI Date: Fri, 1 Mar 2013 00:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247511 - in stable: 6/sys/dev/random 7/sys/dev/random 8/sys/dev/random 9/sys/dev/random X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:46:42 -0000 Author: delphij Date: Fri Mar 1 00:46:41 2013 New Revision: 247511 URL: http://svnweb.freebsd.org/changeset/base/247511 Log: MFC r247334: Correct a typo introduced in r153575, which gives inverted logic when handling blocking semantics when seeding. PR: kern/143298 Submitted by: James Juran Reviewed by: markm Modified: stable/9/sys/dev/random/randomdev_soft.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/6/sys/dev/random/randomdev_soft.c stable/7/sys/dev/random/randomdev_soft.c stable/8/sys/dev/random/randomdev_soft.c Directory Properties: stable/6/sys/ (props changed) stable/7/sys/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/random/ (props changed) Modified: stable/9/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/9/sys/dev/random/randomdev_soft.c Fri Mar 1 00:15:58 2013 (r247510) +++ stable/9/sys/dev/random/randomdev_soft.c Fri Mar 1 00:46:41 2013 (r247511) @@ -391,7 +391,7 @@ random_yarrow_block(int flag) mtx_lock(&random_reseed_mtx); /* Blocking logic */ - while (random_systat.seeded && !error) { + while (!random_systat.seeded && !error) { if (flag & O_NONBLOCK) error = EWOULDBLOCK; else { From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:46:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8FC77CAC; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 819A7BEA; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210kgEh016623; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210kgKv016622; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303010046.r210kgKv016622@svn.freebsd.org> From: Xin LI Date: Fri, 1 Mar 2013 00:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247511 - in stable: 6/sys/dev/random 7/sys/dev/random 8/sys/dev/random 9/sys/dev/random X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:46:42 -0000 Author: delphij Date: Fri Mar 1 00:46:41 2013 New Revision: 247511 URL: http://svnweb.freebsd.org/changeset/base/247511 Log: MFC r247334: Correct a typo introduced in r153575, which gives inverted logic when handling blocking semantics when seeding. PR: kern/143298 Submitted by: James Juran Reviewed by: markm Modified: stable/8/sys/dev/random/randomdev_soft.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/random/ (props changed) Changes in other areas also in this revision: Modified: stable/6/sys/dev/random/randomdev_soft.c stable/7/sys/dev/random/randomdev_soft.c stable/9/sys/dev/random/randomdev_soft.c Directory Properties: stable/6/sys/ (props changed) stable/7/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/8/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/8/sys/dev/random/randomdev_soft.c Fri Mar 1 00:15:58 2013 (r247510) +++ stable/8/sys/dev/random/randomdev_soft.c Fri Mar 1 00:46:41 2013 (r247511) @@ -391,7 +391,7 @@ random_yarrow_block(int flag) mtx_lock(&random_reseed_mtx); /* Blocking logic */ - while (random_systat.seeded && !error) { + while (!random_systat.seeded && !error) { if (flag & O_NONBLOCK) error = EWOULDBLOCK; else { From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:46:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E6502CAD; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D8305BEB; Fri, 1 Mar 2013 00:46:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210kgBm016629; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210kg5S016628; Fri, 1 Mar 2013 00:46:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303010046.r210kg5S016628@svn.freebsd.org> From: Xin LI Date: Fri, 1 Mar 2013 00:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r247511 - in stable: 6/sys/dev/random 7/sys/dev/random 8/sys/dev/random 9/sys/dev/random X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:46:43 -0000 Author: delphij Date: Fri Mar 1 00:46:41 2013 New Revision: 247511 URL: http://svnweb.freebsd.org/changeset/base/247511 Log: MFC r247334: Correct a typo introduced in r153575, which gives inverted logic when handling blocking semantics when seeding. PR: kern/143298 Submitted by: James Juran Reviewed by: markm Modified: stable/7/sys/dev/random/randomdev_soft.c Directory Properties: stable/7/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/6/sys/dev/random/randomdev_soft.c stable/8/sys/dev/random/randomdev_soft.c stable/9/sys/dev/random/randomdev_soft.c Directory Properties: stable/6/sys/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/random/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/7/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/7/sys/dev/random/randomdev_soft.c Fri Mar 1 00:15:58 2013 (r247510) +++ stable/7/sys/dev/random/randomdev_soft.c Fri Mar 1 00:46:41 2013 (r247511) @@ -394,7 +394,7 @@ random_yarrow_block(int flag) mtx_lock(&random_reseed_mtx); /* Blocking logic */ - while (random_systat.seeded && !error) { + while (!random_systat.seeded && !error) { if (flag & O_NONBLOCK) error = EWOULDBLOCK; else { From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:46:43 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4787ECAE; Fri, 1 Mar 2013 00:46:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3966EBEC; Fri, 1 Mar 2013 00:46:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210kh9O016635; Fri, 1 Mar 2013 00:46:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210khP5016634; Fri, 1 Mar 2013 00:46:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303010046.r210khP5016634@svn.freebsd.org> From: Xin LI Date: Fri, 1 Mar 2013 00:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r247511 - in stable: 6/sys/dev/random 7/sys/dev/random 8/sys/dev/random 9/sys/dev/random X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:46:43 -0000 Author: delphij Date: Fri Mar 1 00:46:41 2013 New Revision: 247511 URL: http://svnweb.freebsd.org/changeset/base/247511 Log: MFC r247334: Correct a typo introduced in r153575, which gives inverted logic when handling blocking semantics when seeding. PR: kern/143298 Submitted by: James Juran Reviewed by: markm Modified: stable/6/sys/dev/random/randomdev_soft.c Directory Properties: stable/6/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/7/sys/dev/random/randomdev_soft.c stable/8/sys/dev/random/randomdev_soft.c stable/9/sys/dev/random/randomdev_soft.c Directory Properties: stable/7/sys/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/random/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/6/sys/dev/random/randomdev_soft.c ============================================================================== --- stable/6/sys/dev/random/randomdev_soft.c Fri Mar 1 00:15:58 2013 (r247510) +++ stable/6/sys/dev/random/randomdev_soft.c Fri Mar 1 00:46:41 2013 (r247511) @@ -400,7 +400,7 @@ random_yarrow_block(int flag) mtx_lock(&random_reseed_mtx); /* Blocking logic */ - while (random_systat.seeded && !error) { + while (!random_systat.seeded && !error) { if (flag & O_NONBLOCK) error = EWOULDBLOCK; else { From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:52:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 210F43CD; Fri, 1 Mar 2013 00:52:19 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id D21C3CBE; Fri, 1 Mar 2013 00:52:18 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 32316827D; Fri, 1 Mar 2013 00:52:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BA7C99C4E; Fri, 1 Mar 2013 01:52:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org Subject: Re: svn commit: r247500 - in stable/8/lib/libc: gen stdlib References: <201302282132.r1SLWlXQ057721@svn.freebsd.org> Date: Fri, 01 Mar 2013 01:52:15 +0100 In-Reply-To: <201302282132.r1SLWlXQ057721@svn.freebsd.org> (Dag-Erling SmXXrgrav's message of "Thu, 28 Feb 2013 21:32:47 +0000 (UTC)") Message-ID: <868v6854cg.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:52:19 -0000 Dag-Erling SmXXrgrav writes: > Log: > MFH (r240107,240111,240361): warn against using weak PRNGs I just realized I never merged this into 9 either... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:52:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 85251534; Fri, 1 Mar 2013 00:52:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5D72ECC4; Fri, 1 Mar 2013 00:52:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210qwM1019141; Fri, 1 Mar 2013 00:52:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210qwgh019138; Fri, 1 Mar 2013 00:52:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201303010052.r210qwgh019138@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 1 Mar 2013 00:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247512 - in stable/9/lib/libc: gen stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:52:58 -0000 Author: des Date: Fri Mar 1 00:52:57 2013 New Revision: 247512 URL: http://svnweb.freebsd.org/changeset/base/247512 Log: MFH (r240107,240111,240361): warn against using weak PRNGs Modified: stable/9/lib/libc/gen/rand48.3 stable/9/lib/libc/stdlib/random.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/rand48.3 ============================================================================== --- stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:46:41 2013 (r247511) +++ stable/9/lib/libc/gen/rand48.3 Fri Mar 1 00:52:57 2013 (r247512) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd February 2, 2010 +.Dd September 4, 2012 .Dt RAND48 3 .Os .Sh NAME @@ -49,6 +49,14 @@ .Ft void .Fn lcong48 "unsigned short p[7]" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn rand48 family of functions generates pseudo-random numbers using a linear @@ -174,10 +182,8 @@ It is thus not possible to use values gr Note that all three methods of seeding the random number generator always also set the multiplicand and addend for any of the six generator calls. -.Pp -For a more powerful random number generator, see -.Xr random 3 . .Sh SEE ALSO +.Xr arc4random 3 , .Xr rand 3 , .Xr random 3 .Sh AUTHORS Modified: stable/9/lib/libc/stdlib/random.3 ============================================================================== --- stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:46:41 2013 (r247511) +++ stable/9/lib/libc/stdlib/random.3 Fri Mar 1 00:52:57 2013 (r247512) @@ -181,7 +181,6 @@ messages are printed on the standard err .Xr arc4random 3 , .Xr lrand48 3 , .Xr rand 3 , -.Xr srand 3 , .Xr random 4 .Sh HISTORY These From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 00:56:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D709E6D5; Fri, 1 Mar 2013 00:56:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A7FE5CEB; Fri, 1 Mar 2013 00:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210uxAe019799; Fri, 1 Mar 2013 00:56:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210uvoi019781; Fri, 1 Mar 2013 00:56:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303010056.r210uvoi019781@svn.freebsd.org> From: Xin LI Date: Fri, 1 Mar 2013 00:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247513 - in stable/9: contrib/expat contrib/expat/doc contrib/expat/examples contrib/expat/lib contrib/expat/tests contrib/expat/tests/benchmark contrib/expat/xmlwf lib/libexpat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 00:56:59 -0000 Author: delphij Date: Fri Mar 1 00:56:57 2013 New Revision: 247513 URL: http://svnweb.freebsd.org/changeset/base/247513 Log: MFC r247296: libexpat 2.1.0. Added: stable/9/contrib/expat/FREEBSD-Xlist - copied unchanged from r247511, head/contrib/expat/FREEBSD-Xlist Deleted: stable/9/contrib/expat/FREEBSD-upgrade stable/9/contrib/expat/configure stable/9/contrib/expat/doc/valid-xhtml10.png stable/9/contrib/expat/lib/winconfig.h stable/9/contrib/expat/tests/benchmark/benchmark.dsp stable/9/contrib/expat/tests/benchmark/benchmark.dsw Modified: stable/9/contrib/expat/Changes (contents, props changed) stable/9/contrib/expat/MANIFEST (contents, props changed) stable/9/contrib/expat/Makefile.in (contents, props changed) stable/9/contrib/expat/README (contents, props changed) stable/9/contrib/expat/configure.in (contents, props changed) stable/9/contrib/expat/doc/reference.html (contents, props changed) stable/9/contrib/expat/doc/xmlwf.sgml (contents, props changed) stable/9/contrib/expat/expat_config.h.in (contents, props changed) stable/9/contrib/expat/lib/expat.h (contents, props changed) stable/9/contrib/expat/lib/xmlparse.c (contents, props changed) stable/9/contrib/expat/lib/xmlrole.c (contents, props changed) stable/9/contrib/expat/lib/xmltok.c (contents, props changed) stable/9/contrib/expat/lib/xmltok_impl.c (contents, props changed) stable/9/contrib/expat/tests/README.txt (contents, props changed) stable/9/contrib/expat/tests/minicheck.h stable/9/contrib/expat/tests/runtests.c (contents, props changed) stable/9/contrib/expat/tests/xmltest.sh (contents, props changed) stable/9/contrib/expat/xmlwf/readfilemap.c (contents, props changed) stable/9/contrib/expat/xmlwf/xmlwf.c (contents, props changed) stable/9/lib/libexpat/expat_config.h stable/9/lib/libexpat/libbsdxml.3 Directory Properties: stable/9/contrib/expat/ (props changed) stable/9/contrib/expat/COPYING (props changed) stable/9/contrib/expat/doc/style.css (props changed) stable/9/contrib/expat/doc/xmlwf.1 (props changed) stable/9/contrib/expat/examples/elements.c (props changed) stable/9/contrib/expat/examples/outline.c (props changed) stable/9/contrib/expat/lib/ascii.h (props changed) stable/9/contrib/expat/lib/asciitab.h (props changed) stable/9/contrib/expat/lib/iasciitab.h (props changed) stable/9/contrib/expat/lib/internal.h (props changed) stable/9/contrib/expat/lib/latin1tab.h (props changed) stable/9/contrib/expat/lib/nametab.h (props changed) stable/9/contrib/expat/lib/utf8tab.h (props changed) stable/9/contrib/expat/lib/xmlrole.h (props changed) stable/9/contrib/expat/lib/xmltok.h (props changed) stable/9/contrib/expat/lib/xmltok_impl.h (props changed) stable/9/contrib/expat/lib/xmltok_ns.c (props changed) stable/9/contrib/expat/tests/chardata.c (props changed) stable/9/contrib/expat/tests/chardata.h (props changed) stable/9/contrib/expat/xmlwf/codepage.c (props changed) stable/9/contrib/expat/xmlwf/codepage.h (props changed) stable/9/contrib/expat/xmlwf/ct.c (props changed) stable/9/contrib/expat/xmlwf/filemap.h (props changed) stable/9/contrib/expat/xmlwf/unixfilemap.c (props changed) stable/9/contrib/expat/xmlwf/win32filemap.c (props changed) stable/9/contrib/expat/xmlwf/xmlfile.c (props changed) stable/9/contrib/expat/xmlwf/xmlfile.h (props changed) stable/9/contrib/expat/xmlwf/xmlmime.c (props changed) stable/9/contrib/expat/xmlwf/xmlmime.h (props changed) stable/9/contrib/expat/xmlwf/xmltchar.h (props changed) stable/9/contrib/expat/xmlwf/xmlurl.h (props changed) stable/9/contrib/expat/xmlwf/xmlwin32url.cxx (props changed) stable/9/lib/libexpat/ (props changed) Modified: stable/9/contrib/expat/Changes ============================================================================== --- stable/9/contrib/expat/Changes Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/Changes Fri Mar 1 00:56:57 2013 (r247513) @@ -1,5 +1,41 @@ +Release 2.1.0 Sat March 24 2012 + - Bug Fixes: + #1742315: Harmful XML_ParserCreateNS suggestion. + #2895533: CVE-2012-1147 - Resource leak in readfilemap.c. + #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3. + #1983953, 2517952, 2517962, 2649838: + Build modifications using autoreconf instead of buildconf.sh. + #2815947, #2884086: OBJEXT and EXEEXT support while building. + #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences. + #2517938: xmlwf should return non-zero exit status if not well-formed. + #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml. + #2855609: Dangling positionPtr after error. + #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8(). + #2958794: CVE-2012-1148 - Memory leak in poolGrow. + #2990652: CMake support. + #3010819: UNEXPECTED_STATE with a trailing "%" in entity value. + #3206497: Unitialized memory returned from XML_Parse. + #3287849: make check fails on mingw-w64. + #3496608: CVE-2012-0876 - Hash DOS attack. + - Patches: + #1749198: pkg-config support. + #3010222: Fix for bug #3010819. + #3312568: CMake support. + #3446384: Report byte offsets for attr names and values. + - New Features / API changes: + Added new API member XML_SetHashSalt() that allows setting an intial + value (salt) for hash calculations. This is part of the fix for + bug #3496608 to randomize hash parameters. + When compiled with XML_ATTR_INFO defined, adds new API member + XML_GetAttributeInfo() that allows retrieving the byte + offsets for attribute names and values (patch #3446384). + Added CMake build system. + See bug #2990652 and patch #3312568. + Added run-benchmark target to Makefile.in - relies on testdata module + present in the same relative location as in the repository. + Release 2.0.1 Tue June 5 2007 - - Fixed bugs #1515266, 1515600: The character data handler's calling + - Fixed bugs #1515266, #1515600: The character data handler's calling of XML_StopParser() was not handled properly; if the parser was stopped and the handler set to NULL, the parser would segfault. - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed @@ -8,7 +44,7 @@ Release 2.0.1 Tue June 5 2007 - Fixed xmlwf bug #1513566: "out of memory" error on file size zero. - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call. - Fixes and improvements for Windows platform: - bugs #1409451, #1476160, 1548182, 1602769, 1717322. + bugs #1409451, #1476160, #1548182, #1602769, #1717322. - Build fixes for various platforms: HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180. All Unix: #1554618 (refreshed config.sub/config.guess). @@ -30,8 +66,8 @@ Release 2.0.0 Wed Jan 11 2006 byte indexes and line/column numbers. - Updated to use libtool 1.5.22 (the most recent). - Added support for AmigaOS. - - Some mostly minor bug fixes. SF issues include: 1006708, - 1021776, 1023646, 1114960, 1156398, 1221160, 1271642. + - Some mostly minor bug fixes. SF issues include: #1006708, + #1021776, #1023646, #1114960, #1156398, #1221160, #1271642. Release 1.95.8 Fri Jul 23 2004 - Major new feature: suspend/resume. Handlers can now request @@ -40,8 +76,8 @@ Release 1.95.8 Fri Jul 23 2004 documentation for more details. - Some mostly minor bug fixes, but compilation should no longer generate warnings on most platforms. SF issues - include: 827319, 840173, 846309, 888329, 896188, 923913, - 928113, 961698, 985192. + include: #827319, #840173, #846309, #888329, #896188, #923913, + #928113, #961698, #985192. Release 1.95.7 Mon Oct 20 2003 - Fixed enum XML_Status issue (reported on SourceForge many @@ -54,19 +90,19 @@ Release 1.95.7 Mon Oct 20 2003 - Improved ability to build without the configure-generated expat_config.h header. This is useful for applications which embed Expat rather than linking in the library. - - Fixed a variety of bugs: see SF issues 458907, 609603, - 676844, 679754, 692878, 692964, 695401, 699323, 699487, - 820946. + - Fixed a variety of bugs: see SF issues #458907, #609603, + #676844, #679754, #692878, #692964, #695401, #699323, #699487, + #820946. - Improved hash table lookups. - Added more regression tests and improved documentation. Release 1.95.6 Tue Jan 28 2003 - Added XML_FreeContentModel(). - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). - - Fixed a variety of bugs: see SF issues 615606, 616863, - 618199, 653180, 673791. + - Fixed a variety of bugs: see SF issues #615606, #616863, + #618199, #653180, #673791. - Enhanced the regression test suite. - - Man page improvements: includes SF issue 632146. + - Man page improvements: includes SF issue #632146. Release 1.95.5 Fri Sep 6 2002 - Added XML_UseForeignDTD() for improved SAX2 support. @@ -84,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002 - Reduced line-length for all source code and headers to be no longer than 80 characters, to help with AS/400 support. - Reduced memory copying during parsing (SF patch #600964). - - Fixed a variety of bugs: see SF issues 580793, 434664, - 483514, 580503, 581069, 584041, 584183, 584832, 585537, - 596555, 596678, 598352, 598944, 599715, 600479, 600971. + - Fixed a variety of bugs: see SF issues #580793, #434664, + #483514, #580503, #581069, #584041, #584183, #584832, #585537, + #596555, #596678, #598352, #598944, #599715, #600479, #600971. Release 1.95.4 Fri Jul 12 2002 - Added support for VMS, contributed by Craig Berry. See @@ -95,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002 contributed by Thomas Wegner and Daryle Walker. - Added Borland C++ Builder 5 / BCC 5.5 support, contributed by Patrick McConnell (SF patch #538032). - - Fixed a variety of bugs: see SF issues 441449, 563184, - 564342, 566334, 566901, 569461, 570263, 575168, 579196. + - Fixed a variety of bugs: see SF issues #441449, #563184, + #564342, #566334, #566901, #569461, #570263, #575168, #579196. - Made skippedEntityHandler conform to SAX2 (see source comment) - Re-implemented WFC: Entity Declared from XML 1.0 spec and added a new error "entity declared in parameter entity": - see SF bug report 569461 and SF patch 578161 + see SF bug report #569461 and SF patch #578161 - Re-implemented section 5.1 from XML 1.0 spec: - see SF bug report 570263 and SF patch 578161 + see SF bug report #570263 and SF patch #578161 Release 1.95.3 Mon Jun 3 2002 - Added a project to the MSVC workspace to create a wchar_t @@ -114,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002 - Made the XML_UNICODE builds usable (thanks, Karl!). - Allow xmlwf to read from standard input. - Install a man page for xmlwf on Unix systems. - - Fixed many bugs; see SF bug reports 231864, 461380, 464837, - 466885, 469226, 477667, 484419, 487840, 494749, 496505, - 547350. Other bugs which we can't test as easily may also + - Fixed many bugs; see SF bug reports #231864, #461380, #464837, + #466885, #469226, #477667, #484419, #487840, #494749, #496505, + #547350. Other bugs which we can't test as easily may also have been fixed, especially in the area of build support. Release 1.95.2 Fri Jul 27 2001 Copied: stable/9/contrib/expat/FREEBSD-Xlist (from r247511, head/contrib/expat/FREEBSD-Xlist) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/expat/FREEBSD-Xlist Fri Mar 1 00:56:57 2013 (r247513, copy of r247511, head/contrib/expat/FREEBSD-Xlist) @@ -0,0 +1,19 @@ +# $FreeBSD$ +*.MPW +*.cmake +*.def +*.dsp +*.dsw +*.m4 +*.pc.in +*config.h +CMake* +Configure* +amiga +bcb5 +configure +conftools +doc/valid-xhtml10.png +m4 +vms +win32 Modified: stable/9/contrib/expat/MANIFEST ============================================================================== --- stable/9/contrib/expat/MANIFEST Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/MANIFEST Fri Mar 1 00:56:57 2013 (r247513) @@ -1,5 +1,8 @@ -amiga/stdlib.c amiga/launch.c +amiga/expat_68k.c +amiga/expat_68k.h +amiga/expat_68k_handler_stubs.c +amiga/expat_base.h amiga/expat_vectors.c amiga/expat_lib.c amiga/expat.xml @@ -42,25 +45,35 @@ doc/style.css doc/valid-xhtml10.png doc/xmlwf.1 doc/xmlwf.sgml +CMakeLists.txt +CMake.README COPYING Changes +ConfigureChecks.cmake MANIFEST Makefile.in README configure configure.in expat_config.h.in +expat_config.h.cmake +expat.pc.in expat.dsw +aclocal.m4 conftools/PrintPath conftools/ac_c_bigendian_cross.m4 -conftools/config.guess -conftools/config.sub conftools/expat.m4 conftools/get-version.sh +conftools/mkinstalldirs +conftools/config.guess +conftools/config.sub conftools/install-sh -conftools/libtool.m4 conftools/ltmain.sh -conftools/mkinstalldirs +m4/libtool.m4 +m4/ltversion.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/lt~obsolete.m4 examples/elements.c examples/elements.dsp examples/outline.c Modified: stable/9/contrib/expat/Makefile.in ============================================================================== --- stable/9/contrib/expat/Makefile.in Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/Makefile.in Fri Mar 1 00:56:57 2013 (r247513) @@ -31,6 +31,7 @@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ man1dir = @mandir@/man1 +pkgconfigdir = $(libdir)/pkgconfig top_builddir = . @@ -46,18 +47,18 @@ LIBRARY = libexpat.la DESTDIR = $(INSTALL_ROOT) -default: buildlib xmlwf/xmlwf +default: buildlib xmlwf/xmlwf@EXEEXT@ -buildlib: $(LIBRARY) +buildlib: $(LIBRARY) expat.pc -all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline +all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline clean: - cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs - cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs - cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs - cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o - cd tests && rm -f chardata.o minicheck.o + cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs + cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs + cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs + cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@ + cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@ rm -rf .libs libexpat.la rm -f examples/core tests/core xmlwf/core @@ -65,34 +66,37 @@ clobber: clean distclean: clean rm -f expat_config.h config.status config.log config.cache libtool - rm -f Makefile + rm -f Makefile expat.pc extraclean: distclean rm -f expat_config.h.in configure - rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4 + rm -f aclocal.m4 m4/* + rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub check: tests/runtests tests/runtestspp tests/runtests tests/runtestspp -install: xmlwf/xmlwf installlib +install: xmlwf/xmlwf@EXEEXT@ installlib $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) -installlib: $(LIBRARY) $(APIHEADER) - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) +installlib: $(LIBRARY) $(APIHEADER) expat.pc + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir) $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done + $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc uninstall: uninstalllib - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@ rm -f $(DESTDIR)$(man1dir)/xmlwf.1 uninstalllib: $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY) rm -f $(DESTDIR)$(includedir)/expat.h rm -f $(DESTDIR)$(includedir)/expat_external.h + rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc # for VPATH builds (invoked by configure) mkdir-init: @@ -125,6 +129,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo $(LIBRARY): $(LIB_OBJS) $(LINK_LIB) $(LIB_OBJS) +expat.pc: $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ + lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h @@ -137,46 +144,53 @@ lib/xmltok.lo: lib/xmltok.c lib/xmltok_i $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h -XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o -xmlwf/xmlwf.o: xmlwf/xmlwf.c -xmlwf/xmlfile.o: xmlwf/xmlfile.c -xmlwf/codepage.o: xmlwf/codepage.c -xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c -xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY) +XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@ +xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c +xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c +xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c +xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c +xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY) $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY) -examples/elements.o: examples/elements.c -examples/elements: examples/elements.o $(LIBRARY) +examples/elements.@OBJEXT@: examples/elements.c +examples/elements: examples/elements.@OBJEXT@ $(LIBRARY) $(LINK_EXE) $< $(LIBRARY) -examples/outline.o: examples/outline.c -examples/outline: examples/outline.o $(LIBRARY) +examples/outline.@OBJEXT@: examples/outline.c +examples/outline: examples/outline.@OBJEXT@ $(LIBRARY) $(LINK_EXE) $< $(LIBRARY) -tests/chardata.o: tests/chardata.c tests/chardata.h -tests/minicheck.o: tests/minicheck.c tests/minicheck.h -tests/runtests.o: tests/runtests.c tests/chardata.h -tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY) - $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY) -tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h -tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) - $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY) +tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h +tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h +tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h +tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) + $(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) +tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h +tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) + $(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY) + +tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c +tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY) + $(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY) + +run-benchmark: tests/benchmark/benchmark + tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3 tests/xmlts.zip: wget --output-document=tests/xmlts.zip \ - http://www.w3.org/XML/Test/xmlts20020606.zip + http://www.w3.org/XML/Test/xmlts20080827.zip tests/XML-Test-Suite: tests/xmlts.zip cd tests && unzip -q xmlts.zip -run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite +run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite tests/xmltest.sh -.SUFFIXES: .c .cpp .lo .o +.SUFFIXES: .c .cpp .lo .@OBJEXT@ -.cpp.o: +.cpp.@OBJEXT@: $(CXXCOMPILE) -o $@ -c $< -.c.o: +.c.@OBJEXT@: $(COMPILE) -o $@ -c $< .c.lo: $(LTCOMPILE) -o $@ -c $< Modified: stable/9/contrib/expat/README ============================================================================== --- stable/9/contrib/expat/README Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/README Fri Mar 1 00:56:57 2013 (r247513) @@ -1,5 +1,5 @@ - Expat, Release 2.0.1 + Expat, Release 2.1.0 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register @@ -25,8 +25,7 @@ intended to be production grade software If you are building Expat from a check-out from the CVS repository, you need to run a script that generates the configure script using the GNU autoconf and libtool tools. To do this, you need to have -autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred). -Run the script like this: +autoconf 2.58 or newer. Run the script like this: ./buildconf.sh @@ -65,8 +64,8 @@ location. Have a look at the "Makefile" the directories into which things will be installed. If you are interested in building Expat to provide document -information in UTF-16 rather than the default UTF-8, follow these -instructions (after having run "make distclean"): +information in UTF-16 encoding rather than the default UTF-8, follow +these instructions (after having run "make distclean"): 1. For UTF-16 output as unsigned short (and version/error strings as char), run: @@ -106,7 +105,10 @@ use DESTDIR=$(INSTALL_ROOT), even if DES environment, because variable-setting priority is 1) commandline 2) in-makefile -3) environment +3) environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. Note for Solaris users: The "ar" command is usually located in "/usr/ccs/bin", which is not in the default PATH. You will need to Modified: stable/9/contrib/expat/configure.in ============================================================================== --- stable/9/contrib/expat/configure.in Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/configure.in Fri Mar 1 00:56:57 2013 (r247513) @@ -10,8 +10,8 @@ dnl under the terms of the License (ba dnl in the file COPYING that comes with this distribution. dnl -dnl Ensure that Expat is configured with autoconf 2.52 or newer -AC_PREREQ(2.52) +dnl Ensure that Expat is configured with autoconf 2.58 or newer +AC_PREREQ(2.58) dnl Get the version number of Expat, using m4's esyscmd() command to run dnl the command at m4-generation time. This allows us to create an m4 @@ -25,12 +25,13 @@ dnl test. I believe this test will work, dnl GNU M4 to test it right now. define([expat_version], ifdef([__gnu__], [esyscmd(conftools/get-version.sh lib/expat.h)], - [2.0.x])) + [2.1.x])) AC_INIT(expat, expat_version, expat-bugs@libexpat.org) undefine([expat_version]) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_AUX_DIR(conftools) +AC_CONFIG_MACRO_DIR([m4]) dnl @@ -44,13 +45,12 @@ dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=6 -LIBREVISION=2 -LIBAGE=5 +LIBCURRENT=7 +LIBREVISION=0 +LIBAGE=6 AC_CONFIG_HEADER(expat_config.h) -sinclude(conftools/libtool.m4) sinclude(conftools/ac_c_bigendian_cross.m4) AC_LIBTOOL_WIN32_DLL @@ -62,6 +62,7 @@ AC_SUBST(LIBAGE) dnl Checks for programs. AC_PROG_CC +AC_PROG_CXX AC_PROG_INSTALL if test "$GCC" = yes ; then @@ -144,7 +145,7 @@ AC_DEFINE([XML_DTD], 1, AC_DEFINE([XML_CONTEXT_BYTES], 1024, [Define to specify how much context to retain around the current parse point.]) -AC_CONFIG_FILES(Makefile) +AC_CONFIG_FILES([Makefile expat.pc]) AC_OUTPUT abs_srcdir="`cd $srcdir && pwd`" Modified: stable/9/contrib/expat/doc/reference.html ============================================================================== --- stable/9/contrib/expat/doc/reference.html Fri Mar 1 00:52:57 2013 (r247512) +++ stable/9/contrib/expat/doc/reference.html Fri Mar 1 00:56:57 2013 (r247513) @@ -129,8 +129,10 @@ interface.

  • XML_GetBase
  • XML_GetSpecifiedAttributeCount
  • XML_GetIdAttributeIndex
  • +
  • XML_GetAttributeInfo
  • XML_SetEncoding
  • XML_SetParamEntityParsing
  • +
  • XML_SetHashSalt
  • XML_UseForeignDTD
  • XML_SetReturnNSTriplet
  • XML_DefaultCurrent
  • @@ -369,6 +371,11 @@ footprint and can be faster. statically with the code that calls it; this is required to get all the right MSVC magic annotations correct. This is ignored on other platforms. + +
    XML_ATTR_INFO
    +
    If defined, makes the the additional function XML_GetAttributeInfo available +for reporting attribute byte offsets.

    @@ -917,12 +924,15 @@ XML_ParserCreateNS(const XML_Char *encod Constructs a new parser that has namespace processing in effect. Namespace expanded element names and attribute names are returned as a concatenation of the namespace URI, sep, and the local part of the name. This -means that you should pick a character for sep that can't be -part of a legal URI. There is a special case when sep is the null -character '\0': the namespace URI and the local part will be -concatenated without any separator - this is intended to support RDF processors. -It is a programming error to use the null separator with -namespace triplets. +means that you should pick a character for sep that can't be part +of an URI. Since Expat does not check namespace URIs for conformance, the +only safe choice for a namespace separator is a character that is illegal +in XML. For instance, '\xFF' is not legal in UTF-8, and +'\xFFFF' is not legal in UTF-16. There is a special case when +sep is the null character '\0': the namespace URI and +the local part will be concatenated without any separator - this is intended +to support RDF processors. It is a programming error to use the null separator +with namespace triplets.
     XML_Parser XMLCALL
    @@ -2074,6 +2084,27 @@ attribute. If called inside a start hand
     current call.
     
     
    +
    +const XML_AttrInfo * XMLCALL
    +XML_GetAttributeInfo(XML_Parser parser);
    +
    +
    +typedef struct {
    +  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
    +  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
    +  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
    +  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
    +} XML_AttrInfo;
    +
    +
    +Returns an array of XML_AttrInfo structures for the +attribute/value pairs passed in the last call to the +XML_StartElementHandler that were specified +in the start-tag rather than defaulted. Each attribute/value pair counts +as 1; thus the number of entries in the array is +XML_GetSpecifiedAttributeCount(parser) / 2. +
    +
     enum XML_Status XMLCALL
     XML_SetEncoding(XML_Parser p,
    @@ -2104,6 +2135,24 @@ The choices for code are:
     
  • XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
  • XML_PARAM_ENTITY_PARSING_ALWAYS
  • +Note: If XML_SetParamEntityParsing is called after +XML_Parse or XML_ParseBuffer, then it has +no effect and will always return 0. + + +
    +int XMLCALL
    +XML_SetHashSalt(XML_Parser p,
    +                unsigned long hash_salt);
    +
    +
    +Sets the hash salt to use for internal hash calculations. +Helps in preventing DoS attacks based on predicting hash +function behavior. In order to have an effect this must be called +before parsing has started. Returns 1 if successful, 0 when called +after XML_Parse or XML_ParseBuffer. +

    Note: This call is optional, as the parser will auto-generate a new +random salt value if no value has been set at the start of parsing.

    
    Modified: stable/9/contrib/expat/doc/xmlwf.sgml
    ==============================================================================
    --- stable/9/contrib/expat/doc/xmlwf.sgml	Fri Mar  1 00:52:57 2013	(r247512)
    +++ stable/9/contrib/expat/doc/xmlwf.sgml	Fri Mar  1 00:56:57 2013	(r247513)
    @@ -389,11 +389,6 @@ supports both.
       
         BUGS
     	
    -	According to the W3C standard, an XML file without a
    -	declaration at the beginning is not considered well-formed.
    -	However, &dhpackage; allows this to pass.
    -	
    -	
     	&dhpackage; returns a 0 - noerr result,
     	even if the file is not well-formed.  There is no good way for
     	a program to use &dhpackage; to quickly
    
    Modified: stable/9/contrib/expat/expat_config.h.in
    ==============================================================================
    --- stable/9/contrib/expat/expat_config.h.in	Fri Mar  1 00:52:57 2013	(r247512)
    +++ stable/9/contrib/expat/expat_config.h.in	Fri Mar  1 00:56:57 2013	(r247513)
    @@ -39,6 +39,9 @@
     /* Define to 1 if you have the  header file. */
     #undef HAVE_STRING_H
     
    +/* Define to 1 if you have the  header file. */
    +#undef HAVE_SYS_PARAM_H
    +
     /* Define to 1 if you have the  header file. */
     #undef HAVE_SYS_STAT_H
     
    @@ -48,6 +51,10 @@
     /* Define to 1 if you have the  header file. */
     #undef HAVE_UNISTD_H
     
    +/* Define to the sub-directory in which libtool stores uninstalled libraries.
    +   */
    +#undef LT_OBJDIR
    +
     /* Define to the address where bug reports for this package should be sent. */
     #undef PACKAGE_BUGREPORT
     
    @@ -60,6 +67,9 @@
     /* Define to the one symbol short name of this package. */
     #undef PACKAGE_TARNAME
     
    +/* Define to the home page for this package. */
    +#undef PACKAGE_URL
    +
     /* Define to the version of this package. */
     #undef PACKAGE_VERSION
     
    @@ -85,8 +95,8 @@
     /* Define to empty if `const' does not conform to ANSI C. */
     #undef const
     
    -/* Define to `long' if  does not define. */
    +/* Define to `long int' if  does not define. */
     #undef off_t
     
    -/* Define to `unsigned' if  does not define. */
    +/* Define to `unsigned int' if  does not define. */
     #undef size_t
    
    Modified: stable/9/contrib/expat/lib/expat.h
    ==============================================================================
    --- stable/9/contrib/expat/lib/expat.h	Fri Mar  1 00:52:57 2013	(r247512)
    +++ stable/9/contrib/expat/lib/expat.h	Fri Mar  1 00:56:57 2013	(r247513)
    @@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parse
     XMLPARSEAPI(int)
     XML_GetIdAttributeIndex(XML_Parser parser);
     
    +#ifdef XML_ATTR_INFO
    +/* Source file byte offsets for the start and end of attribute names and values.
    +   The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
    +   file an attribute value of "blah" will yield:
    +   info->valueEnd - info->valueStart = 4 bytes.
    +*/
    +typedef struct {
    +  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
    +  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
    +  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
    +  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
    +} XML_AttrInfo;
    +
    +/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
    +   passed in last call to the XML_StartElementHandler that were specified
    +   in the start-tag rather than defaulted. Each attribute/value pair counts
    +   as 1; thus the number of entries in the array is
    +   XML_GetSpecifiedAttributeCount(parser) / 2.
    +*/
    +XMLPARSEAPI(const XML_AttrInfo *)
    +XML_GetAttributeInfo(XML_Parser parser);
    +#endif
    +
     /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
        detected.  The last call to XML_Parse must have isFinal true; len
        may be zero for this call (or any other).
    @@ -883,6 +906,15 @@ XMLPARSEAPI(int)
     XML_SetParamEntityParsing(XML_Parser parser,
                               enum XML_ParamEntityParsing parsing);
     
    +/* Sets the hash salt to use for internal hash calculations.
    +   Helps in preventing DoS attacks based on predicting hash
    +   function behavior. This must be called before parsing is started.
    +   Returns 1 if successful, 0 when called after parsing has started.
    +*/
    +XMLPARSEAPI(int)
    +XML_SetHashSalt(XML_Parser parser,
    +                unsigned long hash_salt);
    +
     /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
        XML_GetErrorCode returns information about the error.
     */
    @@ -984,7 +1016,8 @@ enum XML_FeatureEnum {
       XML_FEATURE_SIZEOF_XML_CHAR,
       XML_FEATURE_SIZEOF_XML_LCHAR,
       XML_FEATURE_NS,
    -  XML_FEATURE_LARGE_SIZE
    +  XML_FEATURE_LARGE_SIZE,
    +  XML_FEATURE_ATTR_INFO
       /* Additional features must be added to the end of this enum. */
     };
     
    @@ -1004,8 +1037,8 @@ XML_GetFeatureList(void);
        change to major or minor version.
     */
     #define XML_MAJOR_VERSION 2
    -#define XML_MINOR_VERSION 0
    -#define XML_MICRO_VERSION 1
    +#define XML_MINOR_VERSION 1
    +#define XML_MICRO_VERSION 0
     
     #ifdef __cplusplus
     }
    
    Modified: stable/9/contrib/expat/lib/xmlparse.c
    ==============================================================================
    --- stable/9/contrib/expat/lib/xmlparse.c	Fri Mar  1 00:52:57 2013	(r247512)
    +++ stable/9/contrib/expat/lib/xmlparse.c	Fri Mar  1 00:56:57 2013	(r247513)
    @@ -5,6 +5,8 @@
     #include 
     #include                      /* memset(), memcpy() */
     #include 
    +#include                      /* UINT_MAX */
    +#include                        /* time() */
     
     #define XML_BUILDING_EXPAT 1
     
    @@ -12,7 +14,7 @@
     #include "winconfig.h"
     #elif defined(MACOS_CLASSIC)
     #include "macconfig.h"
    -#elif defined(__amigaos4__)
    +#elif defined(__amigaos__)
     #include "amigaconfig.h"
     #elif defined(__WATCOMC__)
     #include "watcomconfig.h"
    @@ -327,15 +329,15 @@ processXmlDecl(XML_Parser parser, int is
     static enum XML_Error
     initializeEncoding(XML_Parser parser);
     static enum XML_Error
    -doProlog(XML_Parser parser, const ENCODING *enc, const char *s, 
    -         const char *end, int tok, const char *next, const char **nextPtr, 
    +doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
    +         const char *end, int tok, const char *next, const char **nextPtr,
              XML_Bool haveMore);
     static enum XML_Error
    -processInternalEntity(XML_Parser parser, ENTITY *entity, 
    +processInternalEntity(XML_Parser parser, ENTITY *entity,
                           XML_Bool betweenDecl);
     static enum XML_Error
     doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
    -          const char *start, const char *end, const char **endPtr, 
    +          const char *start, const char *end, const char **endPtr,
               XML_Bool haveMore);
     static enum XML_Error
     doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr,
    @@ -353,7 +355,7 @@ static enum XML_Error
     addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
                const XML_Char *uri, BINDING **bindingsPtr);
     static int
    -defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, 
    +defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata,
                     XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser);
     static enum XML_Error
     storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
    @@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
     static void
     dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
     static int
    -dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
    +dtdCopy(XML_Parser oldParser,
    +        DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
     static int
    -copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
    -
    +copyEntityTable(XML_Parser oldParser,
    +                HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
     static NAMED *
    -lookup(HASH_TABLE *table, KEY name, size_t createSize);
    +lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
     static void FASTCALL
     hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
     static void FASTCALL hashTableClear(HASH_TABLE *);
    @@ -429,11 +432,15 @@ static ELEMENT_TYPE *
     getElementType(XML_Parser parser, const ENCODING *enc,
                    const char *ptr, const char *end);
     
    +static unsigned long generate_hash_secret_salt(void);
    +static XML_Bool startParsing(XML_Parser parser);
    +
     static XML_Parser
     parserCreate(const XML_Char *encodingName,
                  const XML_Memory_Handling_Suite *memsuite,
                  const XML_Char *nameSep,
                  DTD *dtd);
    +
     static void
     parserInit(XML_Parser parser, const XML_Char *encodingName);
     
    @@ -533,6 +540,9 @@ struct XML_ParserStruct {
       NS_ATT *m_nsAtts;
       unsigned long m_nsAttsVersion;
       unsigned char m_nsAttsPower;
    +#ifdef XML_ATTR_INFO
    +  XML_AttrInfo *m_attInfo;
    +#endif
       POSITION m_position;
       STRING_POOL m_tempPool;
       STRING_POOL m_temp2Pool;
    @@ -546,6 +556,7 @@ struct XML_ParserStruct {
       XML_Bool m_useForeignDTD;
       enum XML_ParamEntityParsing m_paramEntityParsing;
     #endif
    +  unsigned long m_hash_secret_salt;
     };
     
     #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
    @@ -640,6 +651,7 @@ struct XML_ParserStruct {
     #define nsAtts (parser->m_nsAtts)
     #define nsAttsVersion (parser->m_nsAttsVersion)
     #define nsAttsPower (parser->m_nsAttsPower)
    +#define attInfo (parser->m_attInfo)
     #define tempPool (parser->m_tempPool)
     #define temp2Pool (parser->m_temp2Pool)
     #define groupConnector (parser->m_groupConnector)
    @@ -653,6 +665,7 @@ struct XML_ParserStruct {
     #define useForeignDTD (parser->m_useForeignDTD)
     #define paramEntityParsing (parser->m_paramEntityParsing)
     #endif /* XML_DTD */
    +#define hash_secret_salt (parser->m_hash_secret_salt)
     
     XML_Parser XMLCALL
     XML_ParserCreate(const XML_Char *encodingName)
    @@ -670,29 +683,42 @@ XML_ParserCreateNS(const XML_Char *encod
     
     static const XML_Char implicitContext[] = {
       ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p,
    -  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, 
    +  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w,
       ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g,
       ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9,
       ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e,
       ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
     };
     
    +static unsigned long
    +generate_hash_secret_salt(void)
    +{
    +  unsigned int seed = time(NULL) % UINT_MAX;
    +  srand(seed);
    +  return rand();
    +}
    +
    +static XML_Bool  /* only valid for root parser */
    +startParsing(XML_Parser parser)
    +{
    +    /* hash functions must be initialized before setContext() is called */
    +    if (hash_secret_salt == 0)
    +      hash_secret_salt = generate_hash_secret_salt();
    +    if (ns) {
    +      /* implicit context only set for root parser, since child
    +         parsers (i.e. external entity parsers) will inherit it
    +      */
    +      return setContext(parser, implicitContext);
    +    }
    +    return XML_TRUE;
    +}
    +
     XML_Parser XMLCALL
     XML_ParserCreate_MM(const XML_Char *encodingName,
                         const XML_Memory_Handling_Suite *memsuite,
                         const XML_Char *nameSep)
     {
    -  XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
    -  if (parser != NULL && ns) {
    -    /* implicit context only set for root parser, since child
    -       parsers (i.e. external entity parsers) will inherit it
    -    */
    -    if (!setContext(parser, implicitContext)) {
    -      XML_ParserFree(parser);
    -      return NULL;
    -    }
    -  }
    -  return parser;
    +  return parserCreate(encodingName, memsuite, nameSep, NULL);
     }
     
     static XML_Parser
    @@ -737,9 +763,20 @@ parserCreate(const XML_Char *encodingNam
         FREE(parser);
         return NULL;
       }
    +#ifdef XML_ATTR_INFO
    +  attInfo = (XML_AttrInfo*)MALLOC(attsSize * sizeof(XML_AttrInfo));
    +  if (attInfo == NULL) {
    +    FREE(atts);
    +    FREE(parser);
    +    return NULL;
    +  }
    +#endif
       dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
       if (dataBuf == NULL) {
         FREE(atts);
    +#ifdef XML_ATTR_INFO
    +    FREE(attInfo);
    +#endif
         FREE(parser);
         return NULL;
       }
    @@ -752,6 +789,9 @@ parserCreate(const XML_Char *encodingNam
         if (_dtd == NULL) {
           FREE(dataBuf);
           FREE(atts);
    +#ifdef XML_ATTR_INFO
    +      FREE(attInfo);
    +#endif
           FREE(parser);
           return NULL;
         }
    @@ -866,6 +906,7 @@ parserInit(XML_Parser parser, const XML_
       useForeignDTD = XML_FALSE;
       paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
     #endif
    +  hash_secret_salt = 0;
     }
     
     /* moves list of bindings to freeBindingList */
    @@ -913,7 +954,7 @@ XML_ParserReset(XML_Parser parser, const
       poolClear(&temp2Pool);
       parserInit(parser, encodingName);
       dtdReset(_dtd, &parser->m_mem);
    -  return setContext(parser, implicitContext);
    +  return XML_TRUE;
     }
     
     enum XML_Status XMLCALL
    @@ -982,6 +1023,12 @@ XML_ExternalEntityParserCreate(XML_Parse
       int oldInEntityValue = prologState.inEntityValue;
     #endif
       XML_Bool oldns_triplets = ns_triplets;
    +  /* Note that the new parser shares the same hash secret as the old
    +     parser, so that dtdCopy and copyEntityTable can lookup values
    +     from hash tables associated with either parser without us having
    +     to worry which hash secrets each table has.
    +  */
    +  unsigned long oldhash_secret_salt = hash_secret_salt;
     
     #ifdef XML_DTD
       if (!context)
    @@ -1035,13 +1082,14 @@ XML_ExternalEntityParserCreate(XML_Parse
         externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
       defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
       ns_triplets = oldns_triplets;
    +  hash_secret_salt = oldhash_secret_salt;
       parentParser = oldParser;
     #ifdef XML_DTD
       paramEntityParsing = oldParamEntityParsing;
       prologState.inEntityValue = oldInEntityValue;
       if (context) {
     #endif /* XML_DTD */
    -    if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
    +    if (!dtdCopy(oldParser, _dtd, oldDtd, &parser->m_mem)
           || !setContext(parser, context)) {
           XML_ParserFree(parser);
           return NULL;
    @@ -1130,6 +1178,9 @@ XML_ParserFree(XML_Parser parser)
     #endif /* XML_DTD */
         dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
       FREE((void *)atts);
    +#ifdef XML_ATTR_INFO
    +  FREE((void *)attInfo);
    +#endif
       FREE(groupConnector);
       FREE(buffer);
       FREE(dataBuf);
    @@ -1210,6 +1261,14 @@ XML_GetIdAttributeIndex(XML_Parser parse
       return idAttIndex;
     }
     
    +#ifdef XML_ATTR_INFO
    +const XML_AttrInfo * XMLCALL
    +XML_GetAttributeInfo(XML_Parser parser)
    +{
    +  return attInfo;
    +}
    +#endif
    +
     void XMLCALL
     XML_SetElementHandler(XML_Parser parser,
                           XML_StartElementHandler start,
    @@ -1426,6 +1485,17 @@ XML_SetParamEntityParsing(XML_Parser par
     #endif
     }
     
    +int XMLCALL
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 00:58:47 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 654C4849;
     Fri,  1 Mar 2013 00:58:47 +0000 (UTC)
     (envelope-from delphij@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 544B1CF6;
     Fri,  1 Mar 2013 00:58:47 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r210wlqi020108;
     Fri, 1 Mar 2013 00:58:47 GMT (envelope-from delphij@svn.freebsd.org)
    Received: (from delphij@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r210wj3S020087;
     Fri, 1 Mar 2013 00:58:45 GMT (envelope-from delphij@svn.freebsd.org)
    Message-Id: <201303010058.r210wj3S020087@svn.freebsd.org>
    From: Xin LI 
    Date: Fri, 1 Mar 2013 00:58:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247514 - in stable/8: contrib/expat contrib/expat/doc
     contrib/expat/examples contrib/expat/lib contrib/expat/tests
     contrib/expat/tests/benchmark contrib/expat/xmlwf lib/libexpat
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 00:58:47 -0000
    
    Author: delphij
    Date: Fri Mar  1 00:58:44 2013
    New Revision: 247514
    URL: http://svnweb.freebsd.org/changeset/base/247514
    
    Log:
      MFC: libexpat 2.1.0.
    
    Added:
      stable/8/contrib/expat/FREEBSD-Xlist
         - copied unchanged from r247511, head/contrib/expat/FREEBSD-Xlist
    Deleted:
      stable/8/contrib/expat/FREEBSD-upgrade
      stable/8/contrib/expat/configure
      stable/8/contrib/expat/doc/valid-xhtml10.png
      stable/8/contrib/expat/lib/winconfig.h
      stable/8/contrib/expat/tests/benchmark/benchmark.dsp
      stable/8/contrib/expat/tests/benchmark/benchmark.dsw
    Modified:
      stable/8/contrib/expat/Changes   (contents, props changed)
      stable/8/contrib/expat/MANIFEST   (contents, props changed)
      stable/8/contrib/expat/Makefile.in   (contents, props changed)
      stable/8/contrib/expat/README   (contents, props changed)
      stable/8/contrib/expat/configure.in   (contents, props changed)
      stable/8/contrib/expat/doc/reference.html   (contents, props changed)
      stable/8/contrib/expat/doc/xmlwf.sgml   (contents, props changed)
      stable/8/contrib/expat/expat_config.h.in   (contents, props changed)
      stable/8/contrib/expat/lib/expat.h   (contents, props changed)
      stable/8/contrib/expat/lib/xmlparse.c   (contents, props changed)
      stable/8/contrib/expat/lib/xmlrole.c   (contents, props changed)
      stable/8/contrib/expat/lib/xmltok.c   (contents, props changed)
      stable/8/contrib/expat/lib/xmltok_impl.c   (contents, props changed)
      stable/8/contrib/expat/tests/README.txt   (contents, props changed)
      stable/8/contrib/expat/tests/minicheck.h   (contents, props changed)
      stable/8/contrib/expat/tests/runtests.c   (contents, props changed)
      stable/8/contrib/expat/tests/xmltest.sh   (contents, props changed)
      stable/8/contrib/expat/xmlwf/readfilemap.c   (contents, props changed)
      stable/8/contrib/expat/xmlwf/xmlwf.c   (contents, props changed)
      stable/8/lib/libexpat/expat_config.h
      stable/8/lib/libexpat/libbsdxml.3
    Directory Properties:
      stable/8/contrib/expat/   (props changed)
      stable/8/contrib/expat/COPYING   (props changed)
      stable/8/contrib/expat/doc/expat.png   (props changed)
      stable/8/contrib/expat/doc/style.css   (props changed)
      stable/8/contrib/expat/doc/xmlwf.1   (props changed)
      stable/8/contrib/expat/examples/elements.c   (props changed)
      stable/8/contrib/expat/examples/outline.c   (props changed)
      stable/8/contrib/expat/lib/ascii.h   (props changed)
      stable/8/contrib/expat/lib/asciitab.h   (props changed)
      stable/8/contrib/expat/lib/expat_external.h   (props changed)
      stable/8/contrib/expat/lib/iasciitab.h   (props changed)
      stable/8/contrib/expat/lib/internal.h   (props changed)
      stable/8/contrib/expat/lib/latin1tab.h   (props changed)
      stable/8/contrib/expat/lib/nametab.h   (props changed)
      stable/8/contrib/expat/lib/utf8tab.h   (props changed)
      stable/8/contrib/expat/lib/xmlrole.h   (props changed)
      stable/8/contrib/expat/lib/xmltok.h   (props changed)
      stable/8/contrib/expat/lib/xmltok_impl.h   (props changed)
      stable/8/contrib/expat/lib/xmltok_ns.c   (props changed)
      stable/8/contrib/expat/tests/benchmark/README.txt   (props changed)
      stable/8/contrib/expat/tests/benchmark/benchmark.c   (props changed)
      stable/8/contrib/expat/tests/chardata.c   (props changed)
      stable/8/contrib/expat/tests/chardata.h   (props changed)
      stable/8/contrib/expat/tests/minicheck.c   (props changed)
      stable/8/contrib/expat/tests/runtestspp.cpp   (props changed)
      stable/8/contrib/expat/xmlwf/codepage.c   (props changed)
      stable/8/contrib/expat/xmlwf/codepage.h   (props changed)
      stable/8/contrib/expat/xmlwf/ct.c   (props changed)
      stable/8/contrib/expat/xmlwf/filemap.h   (props changed)
      stable/8/contrib/expat/xmlwf/unixfilemap.c   (props changed)
      stable/8/contrib/expat/xmlwf/win32filemap.c   (props changed)
      stable/8/contrib/expat/xmlwf/xmlfile.c   (props changed)
      stable/8/contrib/expat/xmlwf/xmlfile.h   (props changed)
      stable/8/contrib/expat/xmlwf/xmlmime.c   (props changed)
      stable/8/contrib/expat/xmlwf/xmlmime.h   (props changed)
      stable/8/contrib/expat/xmlwf/xmltchar.h   (props changed)
      stable/8/contrib/expat/xmlwf/xmlurl.h   (props changed)
      stable/8/contrib/expat/xmlwf/xmlwin32url.cxx   (props changed)
      stable/8/lib/libexpat/   (props changed)
    
    Modified: stable/8/contrib/expat/Changes
    ==============================================================================
    --- stable/8/contrib/expat/Changes	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/Changes	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -1,5 +1,41 @@
    +Release 2.1.0 Sat March 24 2012
    +        - Bug Fixes:
    +          #1742315: Harmful XML_ParserCreateNS suggestion.
    +          #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
    +          #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
    +          #1983953, 2517952, 2517962, 2649838: 
    +                Build modifications using autoreconf instead of buildconf.sh.
    +          #2815947, #2884086: OBJEXT and EXEEXT support while building.
    +          #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
    +          #2517938: xmlwf should return non-zero exit status if not well-formed.
    +          #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
    +          #2855609: Dangling positionPtr after error.
    +          #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
    +          #2958794: CVE-2012-1148 - Memory leak in poolGrow.
    +          #2990652: CMake support.
    +          #3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
    +          #3206497: Unitialized memory returned from XML_Parse.
    +          #3287849: make check fails on mingw-w64.
    +          #3496608: CVE-2012-0876 - Hash DOS attack.
    +        - Patches:
    +          #1749198: pkg-config support.
    +          #3010222: Fix for bug #3010819.
    +          #3312568: CMake support.
    +          #3446384: Report byte offsets for attr names and values.
    +        - New Features / API changes:
    +          Added new API member XML_SetHashSalt() that allows setting an intial
    +                value (salt) for hash calculations. This is part of the fix for
    +                bug #3496608 to randomize hash parameters.
    +          When compiled with XML_ATTR_INFO defined, adds new API member
    +                XML_GetAttributeInfo() that allows retrieving the byte
    +                offsets for attribute names and values (patch #3446384).
    +          Added CMake build system.
    +                See bug #2990652 and patch #3312568.
    +          Added run-benchmark target to Makefile.in - relies on testdata module
    +                present in the same relative location as in the repository.
    +          
     Release 2.0.1 Tue June 5 2007
    -        - Fixed bugs #1515266, 1515600: The character data handler's calling
    +        - Fixed bugs #1515266, #1515600: The character data handler's calling
               of XML_StopParser() was not handled properly; if the parser was
               stopped and the handler set to NULL, the parser would segfault.
             - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
    @@ -8,7 +44,7 @@ Release 2.0.1 Tue June 5 2007
             - Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
             - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
             - Fixes and improvements for Windows platform:
    -          bugs #1409451, #1476160, 1548182, 1602769, 1717322.
    +          bugs #1409451, #1476160, #1548182, #1602769, #1717322.
             - Build fixes for various platforms:
               HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
               All Unix: #1554618 (refreshed config.sub/config.guess).
    @@ -30,8 +66,8 @@ Release 2.0.0 Wed Jan 11 2006
               byte indexes and line/column numbers.
             - Updated to use libtool 1.5.22 (the most recent).
             - Added support for AmigaOS.
    -        - Some mostly minor bug fixes. SF issues include: 1006708,
    -          1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
    +        - Some mostly minor bug fixes. SF issues include: #1006708,
    +          #1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
     
     Release 1.95.8 Fri Jul 23 2004
             - Major new feature: suspend/resume.  Handlers can now request
    @@ -40,8 +76,8 @@ Release 1.95.8 Fri Jul 23 2004
               documentation for more details.
             - Some mostly minor bug fixes, but compilation should no
               longer generate warnings on most platforms.  SF issues
    -          include: 827319, 840173, 846309, 888329, 896188, 923913,
    -          928113, 961698, 985192.
    +          include: #827319, #840173, #846309, #888329, #896188, #923913,
    +          #928113, #961698, #985192.
     
     Release 1.95.7 Mon Oct 20 2003
             - Fixed enum XML_Status issue (reported on SourceForge many
    @@ -54,19 +90,19 @@ Release 1.95.7 Mon Oct 20 2003
             - Improved ability to build without the configure-generated
               expat_config.h header.  This is useful for applications
               which embed Expat rather than linking in the library.
    -        - Fixed a variety of bugs: see SF issues 458907, 609603,
    -          676844, 679754, 692878, 692964, 695401, 699323, 699487,
    -          820946.
    +        - Fixed a variety of bugs: see SF issues #458907, #609603,
    +          #676844, #679754, #692878, #692964, #695401, #699323, #699487,
    +          #820946.
             - Improved hash table lookups.
             - Added more regression tests and improved documentation.
     
     Release 1.95.6 Tue Jan 28 2003
             - Added XML_FreeContentModel().
             - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
    -        - Fixed a variety of bugs: see SF issues 615606, 616863,
    -          618199, 653180, 673791.
    +        - Fixed a variety of bugs: see SF issues #615606, #616863,
    +          #618199, #653180, #673791.
             - Enhanced the regression test suite.
    -        - Man page improvements: includes SF issue 632146.
    +        - Man page improvements: includes SF issue #632146.
     
     Release 1.95.5 Fri Sep 6 2002
             - Added XML_UseForeignDTD() for improved SAX2 support.
    @@ -84,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002
             - Reduced line-length for all source code and headers to be
               no longer than 80 characters, to help with AS/400 support.
             - Reduced memory copying during parsing (SF patch #600964).
    -        - Fixed a variety of bugs: see SF issues 580793, 434664,
    -          483514, 580503, 581069, 584041, 584183, 584832, 585537,
    -          596555, 596678, 598352, 598944, 599715, 600479, 600971.
    +        - Fixed a variety of bugs: see SF issues #580793, #434664,
    +          #483514, #580503, #581069, #584041, #584183, #584832, #585537,
    +          #596555, #596678, #598352, #598944, #599715, #600479, #600971.
     
     Release 1.95.4 Fri Jul 12 2002
             - Added support for VMS, contributed by Craig Berry.  See
    @@ -95,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002
               contributed by Thomas Wegner and Daryle Walker.
             - Added Borland C++ Builder 5 / BCC 5.5 support, contributed
               by Patrick McConnell (SF patch #538032).
    -        - Fixed a variety of bugs: see SF issues 441449, 563184,
    -          564342, 566334, 566901, 569461, 570263, 575168, 579196.
    +        - Fixed a variety of bugs: see SF issues #441449, #563184,
    +          #564342, #566334, #566901, #569461, #570263, #575168, #579196.
             - Made skippedEntityHandler conform to SAX2 (see source comment)
             - Re-implemented WFC: Entity Declared from XML 1.0 spec and
               added a new error "entity declared in parameter entity":
    -          see SF bug report 569461 and SF patch 578161
    +          see SF bug report #569461 and SF patch #578161
             - Re-implemented section 5.1 from XML 1.0 spec:
    -          see SF bug report 570263 and SF patch 578161
    +          see SF bug report #570263 and SF patch #578161
     
     Release 1.95.3 Mon Jun 3 2002
             - Added a project to the MSVC workspace to create a wchar_t
    @@ -114,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002
             - Made the XML_UNICODE builds usable (thanks, Karl!).
             - Allow xmlwf to read from standard input.
             - Install a man page for xmlwf on Unix systems.
    -        - Fixed many bugs; see SF bug reports 231864, 461380, 464837,
    -          466885, 469226, 477667, 484419, 487840, 494749, 496505,
    -          547350.  Other bugs which we can't test as easily may also
    +        - Fixed many bugs; see SF bug reports #231864, #461380, #464837,
    +          #466885, #469226, #477667, #484419, #487840, #494749, #496505,
    +          #547350.  Other bugs which we can't test as easily may also
               have been fixed, especially in the area of build support.
     
     Release 1.95.2 Fri Jul 27 2001
    
    Copied: stable/8/contrib/expat/FREEBSD-Xlist (from r247511, head/contrib/expat/FREEBSD-Xlist)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/8/contrib/expat/FREEBSD-Xlist	Fri Mar  1 00:58:44 2013	(r247514, copy of r247511, head/contrib/expat/FREEBSD-Xlist)
    @@ -0,0 +1,19 @@
    +# $FreeBSD$
    +*.MPW
    +*.cmake
    +*.def
    +*.dsp
    +*.dsw
    +*.m4
    +*.pc.in
    +*config.h
    +CMake*
    +Configure*
    +amiga
    +bcb5
    +configure
    +conftools
    +doc/valid-xhtml10.png
    +m4
    +vms
    +win32
    
    Modified: stable/8/contrib/expat/MANIFEST
    ==============================================================================
    --- stable/8/contrib/expat/MANIFEST	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/MANIFEST	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -1,5 +1,8 @@
    -amiga/stdlib.c
     amiga/launch.c
    +amiga/expat_68k.c
    +amiga/expat_68k.h
    +amiga/expat_68k_handler_stubs.c
    +amiga/expat_base.h
     amiga/expat_vectors.c
     amiga/expat_lib.c
     amiga/expat.xml
    @@ -42,25 +45,35 @@ doc/style.css
     doc/valid-xhtml10.png
     doc/xmlwf.1
     doc/xmlwf.sgml
    +CMakeLists.txt
    +CMake.README
     COPYING
     Changes
    +ConfigureChecks.cmake
     MANIFEST
     Makefile.in
     README
     configure
     configure.in
     expat_config.h.in
    +expat_config.h.cmake
    +expat.pc.in
     expat.dsw
    +aclocal.m4
     conftools/PrintPath
     conftools/ac_c_bigendian_cross.m4
    -conftools/config.guess
    -conftools/config.sub
     conftools/expat.m4
     conftools/get-version.sh
    +conftools/mkinstalldirs
    +conftools/config.guess
    +conftools/config.sub
     conftools/install-sh
    -conftools/libtool.m4
     conftools/ltmain.sh
    -conftools/mkinstalldirs
    +m4/libtool.m4
    +m4/ltversion.m4
    +m4/ltoptions.m4
    +m4/ltsugar.m4
    +m4/lt~obsolete.m4
     examples/elements.c
     examples/elements.dsp
     examples/outline.c
    
    Modified: stable/8/contrib/expat/Makefile.in
    ==============================================================================
    --- stable/8/contrib/expat/Makefile.in	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/Makefile.in	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -31,6 +31,7 @@ bindir = @bindir@
     libdir = @libdir@
     includedir = @includedir@
     man1dir = @mandir@/man1
    +pkgconfigdir = $(libdir)/pkgconfig
     
     top_builddir = .
     
    @@ -46,18 +47,18 @@ LIBRARY = libexpat.la
     
     DESTDIR = $(INSTALL_ROOT)
     
    -default:  buildlib xmlwf/xmlwf
    +default:  buildlib xmlwf/xmlwf@EXEEXT@
     
    -buildlib: $(LIBRARY)
    +buildlib: $(LIBRARY) expat.pc
     
    -all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
    +all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
     
     clean:
    -	cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
    -	cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
    -	cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
    -	cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
    -	cd tests && rm -f chardata.o minicheck.o
    +	cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
    +	cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
    +	cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
    +	cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
    +	cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
     	rm -rf .libs libexpat.la
     	rm -f examples/core tests/core xmlwf/core
     
    @@ -65,34 +66,37 @@ clobber: clean
     
     distclean: clean
     	rm -f expat_config.h config.status config.log config.cache libtool
    -	rm -f Makefile
    +	rm -f Makefile expat.pc
     
     extraclean: distclean
     	rm -f expat_config.h.in configure
    -	rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
    +	rm -f aclocal.m4 m4/*
    +	rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
     
     check: tests/runtests tests/runtestspp
     	tests/runtests
     	tests/runtestspp
     
    -install: xmlwf/xmlwf installlib
    +install: xmlwf/xmlwf@EXEEXT@ installlib
     	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
    -	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
    +	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
     	$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
     
    -installlib: $(LIBRARY) $(APIHEADER)
    -	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
    +installlib: $(LIBRARY) $(APIHEADER) expat.pc
    +	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
     	$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
     	for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
    +	$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
     
     uninstall: uninstalllib
    -	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
    +	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
     	rm -f $(DESTDIR)$(man1dir)/xmlwf.1
     
     uninstalllib:
     	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
     	rm -f $(DESTDIR)$(includedir)/expat.h
     	rm -f $(DESTDIR)$(includedir)/expat_external.h
    +	rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
     
     # for VPATH builds (invoked by configure)
     mkdir-init:
    @@ -125,6 +129,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo
     $(LIBRARY): $(LIB_OBJS)
     	$(LINK_LIB) $(LIB_OBJS)
     
    +expat.pc: $(top_builddir)/config.status
    +	cd $(top_builddir) && $(SHELL) ./config.status $@
    +
     lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
     	$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
     
    @@ -137,46 +144,53 @@ lib/xmltok.lo: lib/xmltok.c lib/xmltok_i
     	$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
     
     
    -XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
    -xmlwf/xmlwf.o: xmlwf/xmlwf.c
    -xmlwf/xmlfile.o: xmlwf/xmlfile.c
    -xmlwf/codepage.o: xmlwf/codepage.c
    -xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
    -xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
    +XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
    +xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
    +xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
    +xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
    +xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
    +xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
     	$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
     
    -examples/elements.o: examples/elements.c
    -examples/elements: examples/elements.o $(LIBRARY)
    +examples/elements.@OBJEXT@: examples/elements.c
    +examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
     	$(LINK_EXE) $< $(LIBRARY)
     
    -examples/outline.o: examples/outline.c
    -examples/outline: examples/outline.o $(LIBRARY)
    +examples/outline.@OBJEXT@: examples/outline.c
    +examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
     	$(LINK_EXE) $< $(LIBRARY)
     
    -tests/chardata.o: tests/chardata.c tests/chardata.h
    -tests/minicheck.o: tests/minicheck.c tests/minicheck.h
    -tests/runtests.o: tests/runtests.c tests/chardata.h
    -tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
    -	$(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
    -tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
    -tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
    -	$(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
    +tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
    +tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
    +tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
    +tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
    +	$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
    +tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
    +tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
    +	$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
    +
    +tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
    +tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
    +	$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
    +
    +run-benchmark: tests/benchmark/benchmark
    +	tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
     
     tests/xmlts.zip:
     	wget --output-document=tests/xmlts.zip \
    -		http://www.w3.org/XML/Test/xmlts20020606.zip
    +		http://www.w3.org/XML/Test/xmlts20080827.zip
     
     tests/XML-Test-Suite: tests/xmlts.zip
     	cd tests && unzip -q xmlts.zip
     
    -run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
    +run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
     	tests/xmltest.sh
     
    -.SUFFIXES: .c .cpp .lo .o
    +.SUFFIXES: .c .cpp .lo .@OBJEXT@
     
    -.cpp.o:
    +.cpp.@OBJEXT@:
     	$(CXXCOMPILE) -o $@ -c $<
    -.c.o:
    +.c.@OBJEXT@:
     	$(COMPILE) -o $@ -c $<
     .c.lo:
     	$(LTCOMPILE) -o $@ -c $<
    
    Modified: stable/8/contrib/expat/README
    ==============================================================================
    --- stable/8/contrib/expat/README	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/README	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -1,5 +1,5 @@
     
    -                        Expat, Release 2.0.1
    +                        Expat, Release 2.1.0
     
     This is Expat, a C library for parsing XML, written by James Clark.
     Expat is a stream-oriented XML parser.  This means that you register
    @@ -25,8 +25,7 @@ intended to be production grade software
     If you are building Expat from a check-out from the CVS repository,
     you need to run a script that generates the configure script using the
     GNU autoconf and libtool tools.  To do this, you need to have
    -autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred).
    -Run the script like this:
    +autoconf 2.58 or newer. Run the script like this:
     
             ./buildconf.sh
     
    @@ -65,8 +64,8 @@ location.  Have a look at the "Makefile"
     the directories into which things will be installed.
     
     If you are interested in building Expat to provide document
    -information in UTF-16 rather than the default UTF-8, follow these
    -instructions (after having run "make distclean"):
    +information in UTF-16 encoding rather than the default UTF-8, follow
    +these instructions (after having run "make distclean"):
     
             1. For UTF-16 output as unsigned short (and version/error
                strings as char), run:
    @@ -106,7 +105,10 @@ use DESTDIR=$(INSTALL_ROOT), even if DES
     environment, because variable-setting priority is
     1) commandline
     2) in-makefile
    -3) environment           
    +3) environment  
    +
    +Note: This only applies to the Expat library itself, building UTF-16 versions
    +of xmlwf and the tests is currently not supported.         
     
     Note for Solaris users:  The "ar" command is usually located in
     "/usr/ccs/bin", which is not in the default PATH.  You will need to
    
    Modified: stable/8/contrib/expat/configure.in
    ==============================================================================
    --- stable/8/contrib/expat/configure.in	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/configure.in	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -10,8 +10,8 @@ dnl   under the terms of the License (ba
     dnl   in the file COPYING that comes with this distribution.
     dnl
     
    -dnl Ensure that Expat is configured with autoconf 2.52 or newer
    -AC_PREREQ(2.52)
    +dnl Ensure that Expat is configured with autoconf 2.58 or newer
    +AC_PREREQ(2.58)
     
     dnl Get the version number of Expat, using m4's esyscmd() command to run
     dnl the command at m4-generation time. This allows us to create an m4
    @@ -25,12 +25,13 @@ dnl test. I believe this test will work,
     dnl GNU M4 to test it right now.
     define([expat_version], ifdef([__gnu__],
                                   [esyscmd(conftools/get-version.sh lib/expat.h)],
    -                              [2.0.x]))
    +                              [2.1.x]))
     AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
     undefine([expat_version])
     
     AC_CONFIG_SRCDIR(Makefile.in)
     AC_CONFIG_AUX_DIR(conftools)
    +AC_CONFIG_MACRO_DIR([m4])
     
     
     dnl
    @@ -44,13 +45,12 @@ dnl 
     dnl If the API changes incompatibly set LIBAGE back to 0
     dnl
     
    -LIBCURRENT=6
    -LIBREVISION=2
    -LIBAGE=5
    +LIBCURRENT=7
    +LIBREVISION=0
    +LIBAGE=6
     
     AC_CONFIG_HEADER(expat_config.h)
     
    -sinclude(conftools/libtool.m4)
     sinclude(conftools/ac_c_bigendian_cross.m4)
     
     AC_LIBTOOL_WIN32_DLL
    @@ -62,6 +62,7 @@ AC_SUBST(LIBAGE)
     
     dnl Checks for programs.
     AC_PROG_CC
    +AC_PROG_CXX
     AC_PROG_INSTALL
     
     if test "$GCC" = yes ; then
    @@ -144,7 +145,7 @@ AC_DEFINE([XML_DTD], 1,
     AC_DEFINE([XML_CONTEXT_BYTES], 1024,
               [Define to specify how much context to retain around the current parse point.])
     
    -AC_CONFIG_FILES(Makefile)
    +AC_CONFIG_FILES([Makefile expat.pc])
     AC_OUTPUT
     
     abs_srcdir="`cd $srcdir && pwd`"
    
    Modified: stable/8/contrib/expat/doc/reference.html
    ==============================================================================
    --- stable/8/contrib/expat/doc/reference.html	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/doc/reference.html	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -129,8 +129,10 @@ interface.

  • XML_GetBase
  • XML_GetSpecifiedAttributeCount
  • XML_GetIdAttributeIndex
  • +
  • XML_GetAttributeInfo
  • XML_SetEncoding
  • XML_SetParamEntityParsing
  • +
  • XML_SetHashSalt
  • XML_UseForeignDTD
  • XML_SetReturnNSTriplet
  • XML_DefaultCurrent
  • @@ -369,6 +371,11 @@ footprint and can be faster. statically with the code that calls it; this is required to get all the right MSVC magic annotations correct. This is ignored on other platforms. + +
    XML_ATTR_INFO
    +
    If defined, makes the the additional function XML_GetAttributeInfo available +for reporting attribute byte offsets.

    @@ -917,12 +924,15 @@ XML_ParserCreateNS(const XML_Char *encod Constructs a new parser that has namespace processing in effect. Namespace expanded element names and attribute names are returned as a concatenation of the namespace URI, sep, and the local part of the name. This -means that you should pick a character for sep that can't be -part of a legal URI. There is a special case when sep is the null -character '\0': the namespace URI and the local part will be -concatenated without any separator - this is intended to support RDF processors. -It is a programming error to use the null separator with -namespace triplets. +means that you should pick a character for sep that can't be part +of an URI. Since Expat does not check namespace URIs for conformance, the +only safe choice for a namespace separator is a character that is illegal +in XML. For instance, '\xFF' is not legal in UTF-8, and +'\xFFFF' is not legal in UTF-16. There is a special case when +sep is the null character '\0': the namespace URI and +the local part will be concatenated without any separator - this is intended +to support RDF processors. It is a programming error to use the null separator +with namespace triplets.
     XML_Parser XMLCALL
    @@ -2074,6 +2084,27 @@ attribute. If called inside a start hand
     current call.
     
     
    +
    +const XML_AttrInfo * XMLCALL
    +XML_GetAttributeInfo(XML_Parser parser);
    +
    +
    +typedef struct {
    +  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
    +  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
    +  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
    +  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
    +} XML_AttrInfo;
    +
    +
    +Returns an array of XML_AttrInfo structures for the +attribute/value pairs passed in the last call to the +XML_StartElementHandler that were specified +in the start-tag rather than defaulted. Each attribute/value pair counts +as 1; thus the number of entries in the array is +XML_GetSpecifiedAttributeCount(parser) / 2. +
    +
     enum XML_Status XMLCALL
     XML_SetEncoding(XML_Parser p,
    @@ -2104,6 +2135,24 @@ The choices for code are:
     
  • XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
  • XML_PARAM_ENTITY_PARSING_ALWAYS
  • +Note: If XML_SetParamEntityParsing is called after +XML_Parse or XML_ParseBuffer, then it has +no effect and will always return 0. + + +
    +int XMLCALL
    +XML_SetHashSalt(XML_Parser p,
    +                unsigned long hash_salt);
    +
    +
    +Sets the hash salt to use for internal hash calculations. +Helps in preventing DoS attacks based on predicting hash +function behavior. In order to have an effect this must be called +before parsing has started. Returns 1 if successful, 0 when called +after XML_Parse or XML_ParseBuffer. +

    Note: This call is optional, as the parser will auto-generate a new +random salt value if no value has been set at the start of parsing.

    
    Modified: stable/8/contrib/expat/doc/xmlwf.sgml
    ==============================================================================
    --- stable/8/contrib/expat/doc/xmlwf.sgml	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/doc/xmlwf.sgml	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -389,11 +389,6 @@ supports both.
       
         BUGS
     	
    -	According to the W3C standard, an XML file without a
    -	declaration at the beginning is not considered well-formed.
    -	However, &dhpackage; allows this to pass.
    -	
    -	
     	&dhpackage; returns a 0 - noerr result,
     	even if the file is not well-formed.  There is no good way for
     	a program to use &dhpackage; to quickly
    
    Modified: stable/8/contrib/expat/expat_config.h.in
    ==============================================================================
    --- stable/8/contrib/expat/expat_config.h.in	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/expat_config.h.in	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -39,6 +39,9 @@
     /* Define to 1 if you have the  header file. */
     #undef HAVE_STRING_H
     
    +/* Define to 1 if you have the  header file. */
    +#undef HAVE_SYS_PARAM_H
    +
     /* Define to 1 if you have the  header file. */
     #undef HAVE_SYS_STAT_H
     
    @@ -48,6 +51,10 @@
     /* Define to 1 if you have the  header file. */
     #undef HAVE_UNISTD_H
     
    +/* Define to the sub-directory in which libtool stores uninstalled libraries.
    +   */
    +#undef LT_OBJDIR
    +
     /* Define to the address where bug reports for this package should be sent. */
     #undef PACKAGE_BUGREPORT
     
    @@ -60,6 +67,9 @@
     /* Define to the one symbol short name of this package. */
     #undef PACKAGE_TARNAME
     
    +/* Define to the home page for this package. */
    +#undef PACKAGE_URL
    +
     /* Define to the version of this package. */
     #undef PACKAGE_VERSION
     
    @@ -85,8 +95,8 @@
     /* Define to empty if `const' does not conform to ANSI C. */
     #undef const
     
    -/* Define to `long' if  does not define. */
    +/* Define to `long int' if  does not define. */
     #undef off_t
     
    -/* Define to `unsigned' if  does not define. */
    +/* Define to `unsigned int' if  does not define. */
     #undef size_t
    
    Modified: stable/8/contrib/expat/lib/expat.h
    ==============================================================================
    --- stable/8/contrib/expat/lib/expat.h	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/lib/expat.h	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parse
     XMLPARSEAPI(int)
     XML_GetIdAttributeIndex(XML_Parser parser);
     
    +#ifdef XML_ATTR_INFO
    +/* Source file byte offsets for the start and end of attribute names and values.
    +   The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
    +   file an attribute value of "blah" will yield:
    +   info->valueEnd - info->valueStart = 4 bytes.
    +*/
    +typedef struct {
    +  XML_Index  nameStart;  /* Offset to beginning of the attribute name. */
    +  XML_Index  nameEnd;    /* Offset after the attribute name's last byte. */
    +  XML_Index  valueStart; /* Offset to beginning of the attribute value. */
    +  XML_Index  valueEnd;   /* Offset after the attribute value's last byte. */
    +} XML_AttrInfo;
    +
    +/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
    +   passed in last call to the XML_StartElementHandler that were specified
    +   in the start-tag rather than defaulted. Each attribute/value pair counts
    +   as 1; thus the number of entries in the array is
    +   XML_GetSpecifiedAttributeCount(parser) / 2.
    +*/
    +XMLPARSEAPI(const XML_AttrInfo *)
    +XML_GetAttributeInfo(XML_Parser parser);
    +#endif
    +
     /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
        detected.  The last call to XML_Parse must have isFinal true; len
        may be zero for this call (or any other).
    @@ -883,6 +906,15 @@ XMLPARSEAPI(int)
     XML_SetParamEntityParsing(XML_Parser parser,
                               enum XML_ParamEntityParsing parsing);
     
    +/* Sets the hash salt to use for internal hash calculations.
    +   Helps in preventing DoS attacks based on predicting hash
    +   function behavior. This must be called before parsing is started.
    +   Returns 1 if successful, 0 when called after parsing has started.
    +*/
    +XMLPARSEAPI(int)
    +XML_SetHashSalt(XML_Parser parser,
    +                unsigned long hash_salt);
    +
     /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
        XML_GetErrorCode returns information about the error.
     */
    @@ -984,7 +1016,8 @@ enum XML_FeatureEnum {
       XML_FEATURE_SIZEOF_XML_CHAR,
       XML_FEATURE_SIZEOF_XML_LCHAR,
       XML_FEATURE_NS,
    -  XML_FEATURE_LARGE_SIZE
    +  XML_FEATURE_LARGE_SIZE,
    +  XML_FEATURE_ATTR_INFO
       /* Additional features must be added to the end of this enum. */
     };
     
    @@ -1004,8 +1037,8 @@ XML_GetFeatureList(void);
        change to major or minor version.
     */
     #define XML_MAJOR_VERSION 2
    -#define XML_MINOR_VERSION 0
    -#define XML_MICRO_VERSION 1
    +#define XML_MINOR_VERSION 1
    +#define XML_MICRO_VERSION 0
     
     #ifdef __cplusplus
     }
    
    Modified: stable/8/contrib/expat/lib/xmlparse.c
    ==============================================================================
    --- stable/8/contrib/expat/lib/xmlparse.c	Fri Mar  1 00:56:57 2013	(r247513)
    +++ stable/8/contrib/expat/lib/xmlparse.c	Fri Mar  1 00:58:44 2013	(r247514)
    @@ -5,6 +5,8 @@
     #include 
     #include                      /* memset(), memcpy() */
     #include 
    +#include                      /* UINT_MAX */
    +#include                        /* time() */
     
     #define XML_BUILDING_EXPAT 1
     
    @@ -12,7 +14,7 @@
     #include "winconfig.h"
     #elif defined(MACOS_CLASSIC)
     #include "macconfig.h"
    -#elif defined(__amigaos4__)
    +#elif defined(__amigaos__)
     #include "amigaconfig.h"
     #elif defined(__WATCOMC__)
     #include "watcomconfig.h"
    @@ -327,15 +329,15 @@ processXmlDecl(XML_Parser parser, int is
     static enum XML_Error
     initializeEncoding(XML_Parser parser);
     static enum XML_Error
    -doProlog(XML_Parser parser, const ENCODING *enc, const char *s, 
    -         const char *end, int tok, const char *next, const char **nextPtr, 
    +doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
    +         const char *end, int tok, const char *next, const char **nextPtr,
              XML_Bool haveMore);
     static enum XML_Error
    -processInternalEntity(XML_Parser parser, ENTITY *entity, 
    +processInternalEntity(XML_Parser parser, ENTITY *entity,
                           XML_Bool betweenDecl);
     static enum XML_Error
     doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
    -          const char *start, const char *end, const char **endPtr, 
    +          const char *start, const char *end, const char **endPtr,
               XML_Bool haveMore);
     static enum XML_Error
     doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr,
    @@ -353,7 +355,7 @@ static enum XML_Error
     addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
                const XML_Char *uri, BINDING **bindingsPtr);
     static int
    -defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, 
    +defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata,
                     XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser);
     static enum XML_Error
     storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
    @@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
     static void
     dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
     static int
    -dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
    +dtdCopy(XML_Parser oldParser,
    +        DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
     static int
    -copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
    -
    +copyEntityTable(XML_Parser oldParser,
    +                HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
     static NAMED *
    -lookup(HASH_TABLE *table, KEY name, size_t createSize);
    +lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
     static void FASTCALL
     hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
     static void FASTCALL hashTableClear(HASH_TABLE *);
    @@ -429,11 +432,15 @@ static ELEMENT_TYPE *
     getElementType(XML_Parser parser, const ENCODING *enc,
                    const char *ptr, const char *end);
     
    +static unsigned long generate_hash_secret_salt(void);
    +static XML_Bool startParsing(XML_Parser parser);
    +
     static XML_Parser
     parserCreate(const XML_Char *encodingName,
                  const XML_Memory_Handling_Suite *memsuite,
                  const XML_Char *nameSep,
                  DTD *dtd);
    +
     static void
     parserInit(XML_Parser parser, const XML_Char *encodingName);
     
    @@ -533,6 +540,9 @@ struct XML_ParserStruct {
       NS_ATT *m_nsAtts;
       unsigned long m_nsAttsVersion;
       unsigned char m_nsAttsPower;
    +#ifdef XML_ATTR_INFO
    +  XML_AttrInfo *m_attInfo;
    +#endif
       POSITION m_position;
       STRING_POOL m_tempPool;
       STRING_POOL m_temp2Pool;
    @@ -546,6 +556,7 @@ struct XML_ParserStruct {
       XML_Bool m_useForeignDTD;
       enum XML_ParamEntityParsing m_paramEntityParsing;
     #endif
    +  unsigned long m_hash_secret_salt;
     };
     
     #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
    @@ -640,6 +651,7 @@ struct XML_ParserStruct {
     #define nsAtts (parser->m_nsAtts)
     #define nsAttsVersion (parser->m_nsAttsVersion)
     #define nsAttsPower (parser->m_nsAttsPower)
    +#define attInfo (parser->m_attInfo)
     #define tempPool (parser->m_tempPool)
     #define temp2Pool (parser->m_temp2Pool)
     #define groupConnector (parser->m_groupConnector)
    @@ -653,6 +665,7 @@ struct XML_ParserStruct {
     #define useForeignDTD (parser->m_useForeignDTD)
     #define paramEntityParsing (parser->m_paramEntityParsing)
     #endif /* XML_DTD */
    +#define hash_secret_salt (parser->m_hash_secret_salt)
     
     XML_Parser XMLCALL
     XML_ParserCreate(const XML_Char *encodingName)
    @@ -670,29 +683,42 @@ XML_ParserCreateNS(const XML_Char *encod
     
     static const XML_Char implicitContext[] = {
       ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p,
    -  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, 
    +  ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w,
       ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g,
       ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9,
       ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e,
       ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
     };
     
    +static unsigned long
    +generate_hash_secret_salt(void)
    +{
    +  unsigned int seed = time(NULL) % UINT_MAX;
    +  srand(seed);
    +  return rand();
    +}
    +
    +static XML_Bool  /* only valid for root parser */
    +startParsing(XML_Parser parser)
    +{
    +    /* hash functions must be initialized before setContext() is called */
    +    if (hash_secret_salt == 0)
    +      hash_secret_salt = generate_hash_secret_salt();
    +    if (ns) {
    +      /* implicit context only set for root parser, since child
    +         parsers (i.e. external entity parsers) will inherit it
    +      */
    +      return setContext(parser, implicitContext);
    +    }
    +    return XML_TRUE;
    +}
    +
     XML_Parser XMLCALL
     XML_ParserCreate_MM(const XML_Char *encodingName,
                         const XML_Memory_Handling_Suite *memsuite,
                         const XML_Char *nameSep)
     {
    -  XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
    -  if (parser != NULL && ns) {
    -    /* implicit context only set for root parser, since child
    -       parsers (i.e. external entity parsers) will inherit it
    -    */
    -    if (!setContext(parser, implicitContext)) {
    -      XML_ParserFree(parser);
    -      return NULL;
    -    }
    -  }
    -  return parser;
    +  return parserCreate(encodingName, memsuite, nameSep, NULL);
     }
     
     static XML_Parser
    @@ -737,9 +763,20 @@ parserCreate(const XML_Char *encodingNam
         FREE(parser);
         return NULL;
       }
    +#ifdef XML_ATTR_INFO
    +  attInfo = (XML_AttrInfo*)MALLOC(attsSize * sizeof(XML_AttrInfo));
    +  if (attInfo == NULL) {
    +    FREE(atts);
    +    FREE(parser);
    +    return NULL;
    +  }
    +#endif
       dataBuf = (XML_Char *)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
       if (dataBuf == NULL) {
         FREE(atts);
    +#ifdef XML_ATTR_INFO
    +    FREE(attInfo);
    +#endif
         FREE(parser);
         return NULL;
       }
    @@ -752,6 +789,9 @@ parserCreate(const XML_Char *encodingNam
         if (_dtd == NULL) {
           FREE(dataBuf);
           FREE(atts);
    +#ifdef XML_ATTR_INFO
    +      FREE(attInfo);
    +#endif
           FREE(parser);
           return NULL;
         }
    @@ -866,6 +906,7 @@ parserInit(XML_Parser parser, const XML_
       useForeignDTD = XML_FALSE;
       paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
     #endif
    +  hash_secret_salt = 0;
     }
     
     /* moves list of bindings to freeBindingList */
    @@ -913,7 +954,7 @@ XML_ParserReset(XML_Parser parser, const
       poolClear(&temp2Pool);
       parserInit(parser, encodingName);
       dtdReset(_dtd, &parser->m_mem);
    -  return setContext(parser, implicitContext);
    +  return XML_TRUE;
     }
     
     enum XML_Status XMLCALL
    @@ -982,6 +1023,12 @@ XML_ExternalEntityParserCreate(XML_Parse
       int oldInEntityValue = prologState.inEntityValue;
     #endif
       XML_Bool oldns_triplets = ns_triplets;
    +  /* Note that the new parser shares the same hash secret as the old
    +     parser, so that dtdCopy and copyEntityTable can lookup values
    +     from hash tables associated with either parser without us having
    +     to worry which hash secrets each table has.
    +  */
    +  unsigned long oldhash_secret_salt = hash_secret_salt;
     
     #ifdef XML_DTD
       if (!context)
    @@ -1035,13 +1082,14 @@ XML_ExternalEntityParserCreate(XML_Parse
         externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
       defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
       ns_triplets = oldns_triplets;
    +  hash_secret_salt = oldhash_secret_salt;
       parentParser = oldParser;
     #ifdef XML_DTD
       paramEntityParsing = oldParamEntityParsing;
       prologState.inEntityValue = oldInEntityValue;
       if (context) {
     #endif /* XML_DTD */
    -    if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
    +    if (!dtdCopy(oldParser, _dtd, oldDtd, &parser->m_mem)
           || !setContext(parser, context)) {
           XML_ParserFree(parser);
           return NULL;
    @@ -1130,6 +1178,9 @@ XML_ParserFree(XML_Parser parser)
     #endif /* XML_DTD */
         dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
       FREE((void *)atts);
    +#ifdef XML_ATTR_INFO
    +  FREE((void *)attInfo);
    +#endif
       FREE(groupConnector);
       FREE(buffer);
       FREE(dataBuf);
    @@ -1210,6 +1261,14 @@ XML_GetIdAttributeIndex(XML_Parser parse
       return idAttIndex;
     }
     
    +#ifdef XML_ATTR_INFO
    +const XML_AttrInfo * XMLCALL
    +XML_GetAttributeInfo(XML_Parser parser)
    +{
    +  return attInfo;
    +}
    +#endif
    +
     void XMLCALL
     XML_SetElementHandler(XML_Parser parser,
                           XML_StartElementHandler start,
    @@ -1426,6 +1485,17 @@ XML_SetParamEntityParsing(XML_Parser par
     #endif
     }
     
    +int XMLCALL
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 01:02:27 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 926D5B0D;
     Fri,  1 Mar 2013 01:02:27 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 82337D2F;
     Fri,  1 Mar 2013 01:02:27 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r2112R7X022500;
     Fri, 1 Mar 2013 01:02:27 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r2112QFI022491;
     Fri, 1 Mar 2013 01:02:26 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010102.r2112QFI022491@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 01:02:26 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247515 - in stable/9: secure/lib/libssh
     secure/usr.bin/ssh secure/usr.sbin/sshd share/mk tools/build/options
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 01:02:27 -0000
    
    Author: des
    Date: Fri Mar  1 01:02:26 2013
    New Revision: 247515
    URL: http://svnweb.freebsd.org/changeset/base/247515
    
    Log:
      MFH (r245527): add OPENSSH_NONE_CIPHER build option
    
    Added:
      stable/9/tools/build/options/WITH_OPENSSH_NONE_CIPHER
         - copied unchanged from r245527, head/tools/build/options/WITH_OPENSSH_NONE_CIPHER
    Modified:
      stable/9/secure/lib/libssh/Makefile
      stable/9/secure/usr.bin/ssh/Makefile
      stable/9/secure/usr.sbin/sshd/Makefile
      stable/9/share/mk/bsd.own.mk
    Directory Properties:
      stable/9/secure/lib/libssh/   (props changed)
      stable/9/secure/usr.bin/ssh/   (props changed)
      stable/9/secure/usr.sbin/sshd/   (props changed)
      stable/9/share/mk/   (props changed)
      stable/9/tools/build/options/   (props changed)
    
    Modified: stable/9/secure/lib/libssh/Makefile
    ==============================================================================
    --- stable/9/secure/lib/libssh/Makefile	Fri Mar  1 00:58:44 2013	(r247514)
    +++ stable/9/secure/lib/libssh/Makefile	Fri Mar  1 01:02:26 2013	(r247515)
    @@ -38,6 +38,10 @@ DPADD+=	${LIBGSSAPI} ${LIBKRB5} ${LIBHX5
     LDADD+=	-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
     .endif
     
    +.if ${MK_OPENSSH_NONE_CIPHER} != "no"
    +CFLAGS+= -DNONE_CIPHER_ENABLED
    +.endif
    +
     NO_LINT=
     
     DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
    
    Modified: stable/9/secure/usr.bin/ssh/Makefile
    ==============================================================================
    --- stable/9/secure/usr.bin/ssh/Makefile	Fri Mar  1 00:58:44 2013	(r247514)
    +++ stable/9/secure/usr.bin/ssh/Makefile	Fri Mar  1 01:02:26 2013	(r247515)
    @@ -25,6 +25,10 @@ DPADD+=	 ${LIBGSSAPI}
     LDADD+=	 -lgssapi
     .endif
     
    +.if ${MK_OPENSSH_NONE_CIPHER} != "no"
    +CFLAGS+= -DNONE_CIPHER_ENABLED
    +.endif
    +
     DPADD+=	${LIBCRYPT} ${LIBCRYPTO}
     LDADD+=	-lcrypt -lcrypto
     
    
    Modified: stable/9/secure/usr.sbin/sshd/Makefile
    ==============================================================================
    --- stable/9/secure/usr.sbin/sshd/Makefile	Fri Mar  1 00:58:44 2013	(r247514)
    +++ stable/9/secure/usr.sbin/sshd/Makefile	Fri Mar  1 01:02:26 2013	(r247515)
    @@ -40,6 +40,10 @@ DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} 
     LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lasn1
     .endif
     
    +.if ${MK_OPENSSH_NONE_CIPHER} != "no"
    +CFLAGS+= -DNONE_CIPHER_ENABLED
    +.endif
    +
     DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
     LDADD+=	-lcrypto -lcrypt
     
    
    Modified: stable/9/share/mk/bsd.own.mk
    ==============================================================================
    --- stable/9/share/mk/bsd.own.mk	Fri Mar  1 00:58:44 2013	(r247514)
    +++ stable/9/share/mk/bsd.own.mk	Fri Mar  1 01:02:26 2013	(r247515)
    @@ -431,6 +431,7 @@ __DEFAULT_NO_OPTIONS = \
         LIBCPLUSPLUS \
         NMTREE \
         OFED \
    +    OPENSSH_NONE_CIPHER \
         SHARED_TOOLCHAIN
     
     #
    
    Copied: stable/9/tools/build/options/WITH_OPENSSH_NONE_CIPHER (from r245527, head/tools/build/options/WITH_OPENSSH_NONE_CIPHER)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/9/tools/build/options/WITH_OPENSSH_NONE_CIPHER	Fri Mar  1 01:02:26 2013	(r247515, copy of r245527, head/tools/build/options/WITH_OPENSSH_NONE_CIPHER)
    @@ -0,0 +1,9 @@
    +.\" $FreeBSD$
    +Set to include the "None" cipher support in OpenSSH and its libraries.
    +Additional adjustments may need to be done to system configuration
    +files, such as
    +.Xr sshd_config 5 ,
    +to enable this cipher.
    +Please see
    +.Pa /usr/src/crypto/openssh/README.hpn
    +for full details.
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 01:02:30 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 36EF7B0E;
     Fri,  1 Mar 2013 01:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 1AD98D30;
     Fri,  1 Mar 2013 01:02:30 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r2112TcX022543;
     Fri, 1 Mar 2013 01:02:29 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r2112TFI022539;
     Fri, 1 Mar 2013 01:02:29 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303010102.r2112TFI022539@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 01:02:29 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247516 - in stable/9: bin/ps usr.bin/w
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 01:02:30 -0000
    
    Author: jhb
    Date: Fri Mar  1 01:02:28 2013
    New Revision: 247516
    URL: http://svnweb.freebsd.org/changeset/base/247516
    
    Log:
      MFC 245610,245633,245635:
      Include the thread name along with the command name when displaying the
      command name of a thread from a multi-threaded process that doesn't have
      an available argument list (such as kernel processes) and threads display
      is enabled via -H.
    
    Modified:
      stable/9/bin/ps/extern.h
      stable/9/bin/ps/fmt.c
      stable/9/bin/ps/ps.c
      stable/9/usr.bin/w/w.c
    Directory Properties:
      stable/9/bin/ps/   (props changed)
      stable/9/usr.bin/w/   (props changed)
    
    Modified: stable/9/bin/ps/extern.h
    ==============================================================================
    --- stable/9/bin/ps/extern.h	Fri Mar  1 01:02:26 2013	(r247515)
    +++ stable/9/bin/ps/extern.h	Fri Mar  1 01:02:28 2013	(r247516)
    @@ -51,7 +51,7 @@ char	 *elapsed(KINFO *, VARENT *);
     char	 *elapseds(KINFO *, VARENT *);
     char	 *emulname(KINFO *, VARENT *);
     VARENT	*find_varentry(VAR *);
    -const	 char *fmt_argv(char **, char *, size_t);
    +const	 char *fmt_argv(char **, char *, char *, size_t);
     double	 getpcpu(const KINFO *);
     char	 *kvar(KINFO *, VARENT *);
     char	 *label(KINFO *, VARENT *);
    
    Modified: stable/9/bin/ps/fmt.c
    ==============================================================================
    --- stable/9/bin/ps/fmt.c	Fri Mar  1 01:02:26 2013	(r247515)
    +++ stable/9/bin/ps/fmt.c	Fri Mar  1 01:02:28 2013	(r247516)
    @@ -105,7 +105,7 @@ cmdpart(char *arg0)
     }
     
     const char *
    -fmt_argv(char **argv, char *cmd, size_t maxlen)
    +fmt_argv(char **argv, char *cmd, char *thread, size_t maxlen)
     {
     	size_t len;
     	char *ap, *cp;
    @@ -122,9 +122,14 @@ fmt_argv(char **argv, char *cmd, size_t 
     	cp = malloc(len);
     	if (cp == NULL)
     		errx(1, "malloc failed");
    -	if (ap == NULL)
    -		sprintf(cp, "[%.*s]", (int)maxlen, cmd);
    -	else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
    +	if (ap == NULL) {
    +		if (thread != NULL) {
    +			asprintf(&ap, "%s/%s", cmd, thread);
    +			sprintf(cp, "[%.*s]", (int)maxlen, ap);
    +			free(ap);
    +		} else
    +			sprintf(cp, "[%.*s]", (int)maxlen, cmd);
    +	} else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
     		sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd);
     	else
     		strcpy(cp, ap);
    
    Modified: stable/9/bin/ps/ps.c
    ==============================================================================
    --- stable/9/bin/ps/ps.c	Fri Mar  1 01:02:26 2013	(r247515)
    +++ stable/9/bin/ps/ps.c	Fri Mar  1 01:02:28 2013	(r247516)
    @@ -140,7 +140,7 @@ static void	 format_output(KINFO *);
     static void	*expand_list(struct listinfo *);
     static const char *
     		 fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int),
    -		    KINFO *, char *, int);
    +		    KINFO *, char *, char *, int);
     static void	 free_list(struct listinfo *);
     static void	 init_list(struct listinfo *, addelem_rtn, int, const char *);
     static char	*kludge_oldps_options(const char *, char *, const char *);
    @@ -1161,11 +1161,12 @@ sizevars(void)
     
     static const char *
     fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki,
    -    char *comm, int maxlen)
    +    char *comm, char *thread, int maxlen)
     {
     	const char *s;
     
    -	s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, maxlen);
    +	s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm,
    +	    showthreads && ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen);
     	return (s);
     }
     
    @@ -1193,7 +1194,7 @@ saveuser(KINFO *ki)
     			ki->ki_args = strdup("");
     		else if (UREADOK(ki) || (ki->ki_p->ki_args != NULL))
     			ki->ki_args = strdup(fmt(kvm_getargv, ki,
    -			    ki->ki_p->ki_comm, MAXCOMLEN));
    +			    ki->ki_p->ki_comm, ki->ki_p->ki_tdname, MAXCOMLEN));
     		else
     			asprintf(&ki->ki_args, "(%s)", ki->ki_p->ki_comm);
     		if (ki->ki_args == NULL)
    @@ -1204,7 +1205,7 @@ saveuser(KINFO *ki)
     	if (needenv) {
     		if (UREADOK(ki))
     			ki->ki_env = strdup(fmt(kvm_getenvv, ki,
    -			    (char *)NULL, 0));
    +			    (char *)NULL, (char *)NULL, 0));
     		else
     			ki->ki_env = strdup("()");
     		if (ki->ki_env == NULL)
    
    Modified: stable/9/usr.bin/w/w.c
    ==============================================================================
    --- stable/9/usr.bin/w/w.c	Fri Mar  1 01:02:26 2013	(r247515)
    +++ stable/9/usr.bin/w/w.c	Fri Mar  1 01:02:28 2013	(r247516)
    @@ -124,7 +124,7 @@ static struct stat	*ttystat(char *);
     static void		 usage(int);
     static int		 this_is_uptime(const char *s);
     
    -char *fmt_argv(char **, char *, int);	/* ../../bin/ps/fmt.c */
    +char *fmt_argv(char **, char *, char *, size_t);	/* ../../bin/ps/fmt.c */
     
     int
     main(int argc, char *argv[])
    @@ -321,7 +321,7 @@ main(int argc, char *argv[])
     			continue;
     		}
     		ep->args = fmt_argv(kvm_getargv(kd, ep->kp, argwidth),
    -		    ep->kp->ki_comm, MAXCOMLEN);
    +		    ep->kp->ki_comm, NULL, MAXCOMLEN);
     		if (ep->args == NULL)
     			err(1, NULL);
     	}
    @@ -405,7 +405,7 @@ main(int argc, char *argv[])
     				const char *ptr;
     
     				ptr = fmt_argv(kvm_getargv(kd, dkp, argwidth),
    -				    dkp->ki_comm, MAXCOMLEN);
    +				    dkp->ki_comm, NULL, MAXCOMLEN);
     				if (ptr == NULL)
     					ptr = "-";
     				(void)printf("\t\t%-9d %s\n",
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 01:02:46 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 3604DD84;
     Fri,  1 Mar 2013 01:02:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 1A01ED34;
     Fri,  1 Mar 2013 01:02:46 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r2112jhE022637;
     Fri, 1 Mar 2013 01:02:45 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r2112jZY022632;
     Fri, 1 Mar 2013 01:02:45 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303010102.r2112jZY022632@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 01:02:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247517 - in stable/8: bin/ps usr.bin/w
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 01:02:46 -0000
    
    Author: jhb
    Date: Fri Mar  1 01:02:44 2013
    New Revision: 247517
    URL: http://svnweb.freebsd.org/changeset/base/247517
    
    Log:
      MFC 245610,245633,245635:
      Include the thread name along with the command name when displaying the
      command name of a thread from a multi-threaded process that doesn't have
      an available argument list (such as kernel processes) and threads display
      is enabled via -H.
    
    Modified:
      stable/8/bin/ps/extern.h
      stable/8/bin/ps/fmt.c
      stable/8/bin/ps/ps.c
      stable/8/usr.bin/w/w.c
    Directory Properties:
      stable/8/bin/ps/   (props changed)
      stable/8/usr.bin/w/   (props changed)
    
    Modified: stable/8/bin/ps/extern.h
    ==============================================================================
    --- stable/8/bin/ps/extern.h	Fri Mar  1 01:02:28 2013	(r247516)
    +++ stable/8/bin/ps/extern.h	Fri Mar  1 01:02:44 2013	(r247517)
    @@ -50,7 +50,7 @@ int	 donlist(void);
     void	 elapsed(KINFO *, VARENT *);
     void	 emulname(KINFO *, VARENT *);
     VARENT	*find_varentry(VAR *);
    -const	 char *fmt_argv(char **, char *, size_t);
    +const	 char *fmt_argv(char **, char *, char *, size_t);
     double	 getpcpu(const KINFO *);
     void	 kvar(KINFO *, VARENT *);
     void	 label(KINFO *, VARENT *);
    
    Modified: stable/8/bin/ps/fmt.c
    ==============================================================================
    --- stable/8/bin/ps/fmt.c	Fri Mar  1 01:02:28 2013	(r247516)
    +++ stable/8/bin/ps/fmt.c	Fri Mar  1 01:02:44 2013	(r247517)
    @@ -105,7 +105,7 @@ cmdpart(char *arg0)
     }
     
     const char *
    -fmt_argv(char **argv, char *cmd, size_t maxlen)
    +fmt_argv(char **argv, char *cmd, char *thread, size_t maxlen)
     {
     	size_t len;
     	char *ap, *cp;
    @@ -122,9 +122,14 @@ fmt_argv(char **argv, char *cmd, size_t 
     	cp = malloc(len);
     	if (cp == NULL)
     		errx(1, "malloc failed");
    -	if (ap == NULL)
    -		sprintf(cp, "[%.*s]", (int)maxlen, cmd);
    -	else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
    +	if (ap == NULL) {
    +		if (thread != NULL) {
    +			asprintf(&ap, "%s/%s", cmd, thread);
    +			sprintf(cp, "[%.*s]", (int)maxlen, ap);
    +			free(ap);
    +		} else
    +			sprintf(cp, "[%.*s]", (int)maxlen, cmd);
    +	} else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
     		sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd);
     	else
     		strcpy(cp, ap);
    
    Modified: stable/8/bin/ps/ps.c
    ==============================================================================
    --- stable/8/bin/ps/ps.c	Fri Mar  1 01:02:28 2013	(r247516)
    +++ stable/8/bin/ps/ps.c	Fri Mar  1 01:02:44 2013	(r247517)
    @@ -143,7 +143,7 @@ static void	 dynsizevars(KINFO *);
     static void	*expand_list(struct listinfo *);
     static const char *
     		 fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int),
    -		    KINFO *, char *, int);
    +		    KINFO *, char *, char *, int);
     static void	 free_list(struct listinfo *);
     static void	 init_list(struct listinfo *, addelem_rtn, int, const char *);
     static char	*kludge_oldps_options(const char *, char *, const char *);
    @@ -1127,11 +1127,12 @@ sizevars(void)
     
     static const char *
     fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki,
    -    char *comm, int maxlen)
    +    char *comm, char *thread, int maxlen)
     {
     	const char *s;
     
    -	s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, maxlen);
    +	s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm,
    +	    showthreads && ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen);
     	return (s);
     }
     
    @@ -1159,7 +1160,7 @@ saveuser(KINFO *ki)
     			ki->ki_args = strdup("");
     		else if (UREADOK(ki) || (ki->ki_p->ki_args != NULL))
     			ki->ki_args = strdup(fmt(kvm_getargv, ki,
    -			    ki->ki_p->ki_comm, MAXCOMLEN));
    +			    ki->ki_p->ki_comm, ki->ki_p->ki_ocomm, MAXCOMLEN));
     		else
     			asprintf(&ki->ki_args, "(%s)", ki->ki_p->ki_comm);
     		if (ki->ki_args == NULL)
    @@ -1170,7 +1171,7 @@ saveuser(KINFO *ki)
     	if (needenv) {
     		if (UREADOK(ki))
     			ki->ki_env = strdup(fmt(kvm_getenvv, ki,
    -			    (char *)NULL, 0));
    +			    (char *)NULL, (char *)NULL, 0));
     		else
     			ki->ki_env = strdup("()");
     		if (ki->ki_env == NULL)
    
    Modified: stable/8/usr.bin/w/w.c
    ==============================================================================
    --- stable/8/usr.bin/w/w.c	Fri Mar  1 01:02:28 2013	(r247516)
    +++ stable/8/usr.bin/w/w.c	Fri Mar  1 01:02:44 2013	(r247517)
    @@ -127,7 +127,7 @@ static struct stat	*ttystat(char *, int)
     static void		 usage(int);
     static int		 this_is_uptime(const char *s);
     
    -char *fmt_argv(char **, char *, int);	/* ../../bin/ps/fmt.c */
    +char *fmt_argv(char **, char *, char *, size_t);	/* ../../bin/ps/fmt.c */
     
     int
     main(int argc, char *argv[])
    @@ -325,7 +325,7 @@ main(int argc, char *argv[])
     			continue;
     		}
     		ep->args = fmt_argv(kvm_getargv(kd, ep->kp, argwidth),
    -		    ep->kp->ki_comm, MAXCOMLEN);
    +		    ep->kp->ki_comm, NULL, MAXCOMLEN);
     		if (ep->args == NULL)
     			err(1, NULL);
     	}
    @@ -392,7 +392,7 @@ main(int argc, char *argv[])
     				const char *ptr;
     
     				ptr = fmt_argv(kvm_getargv(kd, dkp, argwidth),
    -				    dkp->ki_comm, MAXCOMLEN);
    +				    dkp->ki_comm, NULL, MAXCOMLEN);
     				if (ptr == NULL)
     					ptr = "-";
     				(void)printf("\t\t%-9d %s\n",
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 01:03:28 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 6B93DF40;
     Fri,  1 Mar 2013 01:03:28 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 5DBA0D41;
     Fri,  1 Mar 2013 01:03:28 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r2113Su1022801;
     Fri, 1 Mar 2013 01:03:28 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r2113SbW022799;
     Fri, 1 Mar 2013 01:03:28 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010103.r2113SbW022799@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 01:03:28 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247518 - stable/9/share/man/man5
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 01:03:28 -0000
    
    Author: des
    Date: Fri Mar  1 01:03:27 2013
    New Revision: 247518
    URL: http://svnweb.freebsd.org/changeset/base/247518
    
    Log:
      Regenerate
    
    Modified:
      stable/9/share/man/man5/src.conf.5
    
    Modified: stable/9/share/man/man5/src.conf.5
    ==============================================================================
    --- stable/9/share/man/man5/src.conf.5	Fri Mar  1 01:02:44 2013	(r247517)
    +++ stable/9/share/man/man5/src.conf.5	Fri Mar  1 01:03:27 2013	(r247518)
    @@ -1,7 +1,7 @@
     .\" DO NOT EDIT-- this file is automatically generated.
     .\" from FreeBSD: stable/9/tools/build/options/makeman 236430 2012-06-02 02:26:37Z gjb
     .\" $FreeBSD$
    -.Dd February 10, 2013
    +.Dd March 1, 2013
     .Dt SRC.CONF 5
     .Os
     .Sh NAME
    @@ -801,6 +801,16 @@ Infiniband software stack.
     .It Va WITHOUT_OPENSSH
     .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru
     Set to not build OpenSSH.
    +.It Va WITH_OPENSSH_NONE_CIPHER
    +.\" from FreeBSD: stable/9/tools/build/options/WITH_OPENSSH_NONE_CIPHER 247515 2013-03-01 01:02:26Z des
    +Set to include the "None" cipher support in OpenSSH and its libraries.
    +Additional adjustments may need to be done to system configuration
    +files, such as
    +.Xr sshd_config 5 ,
    +to enable this cipher.
    +Please see
    +.Pa /usr/src/crypto/openssh/README.hpn
    +for full details.
     .It Va WITHOUT_OPENSSL
     .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru
     Set to not build OpenSSL.
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 02:06:05 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 2118F9B9;
     Fri,  1 Mar 2013 02:06:05 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id E448EF04;
     Fri,  1 Mar 2013 02:06:04 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21264e2041884;
     Fri, 1 Mar 2013 02:06:04 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21264rB041882;
     Fri, 1 Mar 2013 02:06:04 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010206.r21264rB041882@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 02:06:04 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247521 - in stable/8: crypto/openssh
     crypto/openssh/openbsd-compat etc/rc.d secure/lib/libssh secure/usr.bin/ssh
     secure/usr.sbin/sshd share/mk tools/build/options
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 02:06:05 -0000
    
    Author: des
    Date: Fri Mar  1 02:06:04 2013
    New Revision: 247521
    URL: http://svnweb.freebsd.org/changeset/base/247521
    
    Log:
      Pull in OpenSSH 6.1 from head.
      
      Although ECC-based algorithms are now supported, the order of preference
      has been changed so that RSA and DSA are still the preferred algorithms.
    
    Added:
      stable/8/crypto/openssh/audit-linux.c   (contents, props changed)
         - copied, changed from r221420, head/crypto/openssh/audit-linux.c
         - copied unchanged from r221420, head/crypto/openssh/bufec.c
         - copied unchanged from r221420, head/crypto/openssh/kexecdh.c
         - copied unchanged from r221420, head/crypto/openssh/kexecdhc.c
         - copied unchanged from r221420, head/crypto/openssh/kexecdhs.c
         - copied unchanged from r221420, head/crypto/openssh/openbsd-compat/charclass.h
         - copied unchanged from r215116, head/crypto/openssh/openbsd-compat/strptime.c
         - copied unchanged from r221420, head/crypto/openssh/openbsd-compat/timingsafe_bcmp.c
      stable/8/crypto/openssh/sandbox-darwin.c
         - copied unchanged from r226046, head/crypto/openssh/sandbox-darwin.c
      stable/8/crypto/openssh/sandbox-null.c
         - copied unchanged from r226046, head/crypto/openssh/sandbox-null.c
      stable/8/crypto/openssh/sandbox-rlimit.c
         - copied, changed from r226046, head/crypto/openssh/sandbox-rlimit.c
      stable/8/crypto/openssh/sandbox-systrace.c
         - copied, changed from r226046, head/crypto/openssh/sandbox-systrace.c
      stable/8/crypto/openssh/ssh-ecdsa.c   (contents, props changed)
         - copied, changed from r221420, head/crypto/openssh/ssh-ecdsa.c
      stable/8/crypto/openssh/ssh-sandbox.h
         - copied unchanged from r226046, head/crypto/openssh/ssh-sandbox.h
      stable/8/tools/build/options/WITH_OPENSSH_NONE_CIPHER
         - copied unchanged from r245527, head/tools/build/options/WITH_OPENSSH_NONE_CIPHER
    Directory Properties:
      stable/8/crypto/openssh/bufec.c   (props changed)
      stable/8/crypto/openssh/kexecdh.c   (props changed)
      stable/8/crypto/openssh/kexecdhc.c   (props changed)
      stable/8/crypto/openssh/kexecdhs.c   (props changed)
      stable/8/crypto/openssh/openbsd-compat/charclass.h   (props changed)
      stable/8/crypto/openssh/openbsd-compat/strptime.c   (props changed)
      stable/8/crypto/openssh/openbsd-compat/timingsafe_bcmp.c   (props changed)
    Deleted:
      stable/8/crypto/openssh/WARNING.RNG
      stable/8/crypto/openssh/ssh-pkcs11-helper.0
      stable/8/crypto/openssh/ssh-rand-helper.8
      stable/8/crypto/openssh/ssh-rand-helper.c
      stable/8/crypto/openssh/version.c
    Modified:
      stable/8/crypto/openssh/ChangeLog
      stable/8/crypto/openssh/INSTALL
      stable/8/crypto/openssh/LICENCE
      stable/8/crypto/openssh/PROTOCOL
      stable/8/crypto/openssh/PROTOCOL.agent
      stable/8/crypto/openssh/PROTOCOL.certkeys
      stable/8/crypto/openssh/PROTOCOL.mux
      stable/8/crypto/openssh/README
      stable/8/crypto/openssh/aclocal.m4
      stable/8/crypto/openssh/addrmatch.c
      stable/8/crypto/openssh/atomicio.c
      stable/8/crypto/openssh/atomicio.h
      stable/8/crypto/openssh/audit-bsm.c
      stable/8/crypto/openssh/audit.c
      stable/8/crypto/openssh/audit.h
      stable/8/crypto/openssh/auth-krb5.c
      stable/8/crypto/openssh/auth-options.c
      stable/8/crypto/openssh/auth-options.h
      stable/8/crypto/openssh/auth-pam.c   (contents, props changed)
      stable/8/crypto/openssh/auth-passwd.c
      stable/8/crypto/openssh/auth-rsa.c
      stable/8/crypto/openssh/auth-skey.c
      stable/8/crypto/openssh/auth.c
      stable/8/crypto/openssh/auth.h
      stable/8/crypto/openssh/auth1.c
      stable/8/crypto/openssh/auth2-gss.c
      stable/8/crypto/openssh/auth2-hostbased.c
      stable/8/crypto/openssh/auth2-jpake.c
      stable/8/crypto/openssh/auth2-none.c
      stable/8/crypto/openssh/auth2-pubkey.c
      stable/8/crypto/openssh/auth2.c
      stable/8/crypto/openssh/authfd.c
      stable/8/crypto/openssh/authfile.c
      stable/8/crypto/openssh/authfile.h
      stable/8/crypto/openssh/bufaux.c
      stable/8/crypto/openssh/buffer.h
      stable/8/crypto/openssh/canohost.c
      stable/8/crypto/openssh/channels.c
      stable/8/crypto/openssh/channels.h
      stable/8/crypto/openssh/cipher-3des1.c
      stable/8/crypto/openssh/cipher-acss.c
      stable/8/crypto/openssh/cipher-aes.c
      stable/8/crypto/openssh/cipher-bf1.c
      stable/8/crypto/openssh/cipher-ctr.c
      stable/8/crypto/openssh/clientloop.c
      stable/8/crypto/openssh/clientloop.h
      stable/8/crypto/openssh/compat.c
      stable/8/crypto/openssh/compat.h
      stable/8/crypto/openssh/compress.c
      stable/8/crypto/openssh/config.guess
      stable/8/crypto/openssh/config.h
      stable/8/crypto/openssh/config.h.in
      stable/8/crypto/openssh/defines.h
      stable/8/crypto/openssh/dh.c
      stable/8/crypto/openssh/dns.c
      stable/8/crypto/openssh/dns.h
      stable/8/crypto/openssh/entropy.c
      stable/8/crypto/openssh/entropy.h
      stable/8/crypto/openssh/gss-serv.c
      stable/8/crypto/openssh/hostfile.c
      stable/8/crypto/openssh/hostfile.h
      stable/8/crypto/openssh/includes.h
      stable/8/crypto/openssh/jpake.c
      stable/8/crypto/openssh/kex.c
      stable/8/crypto/openssh/kex.h
      stable/8/crypto/openssh/kexdhc.c
      stable/8/crypto/openssh/kexdhs.c
      stable/8/crypto/openssh/kexgexc.c
      stable/8/crypto/openssh/kexgexs.c
      stable/8/crypto/openssh/key.c
      stable/8/crypto/openssh/key.h
      stable/8/crypto/openssh/log.c
      stable/8/crypto/openssh/log.h
      stable/8/crypto/openssh/loginrec.c   (contents, props changed)
      stable/8/crypto/openssh/loginrec.h
      stable/8/crypto/openssh/logintest.c
      stable/8/crypto/openssh/mac.c
      stable/8/crypto/openssh/misc.c
      stable/8/crypto/openssh/misc.h
      stable/8/crypto/openssh/moduli
      stable/8/crypto/openssh/moduli.5
      stable/8/crypto/openssh/moduli.c
      stable/8/crypto/openssh/monitor.c
      stable/8/crypto/openssh/monitor.h
      stable/8/crypto/openssh/monitor_wrap.c
      stable/8/crypto/openssh/monitor_wrap.h
      stable/8/crypto/openssh/mux.c
      stable/8/crypto/openssh/myproposal.h
      stable/8/crypto/openssh/openbsd-compat/bindresvport.c
      stable/8/crypto/openssh/openbsd-compat/bsd-arc4random.c
      stable/8/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
      stable/8/crypto/openssh/openbsd-compat/bsd-cygwin_util.h
      stable/8/crypto/openssh/openbsd-compat/bsd-misc.c
      stable/8/crypto/openssh/openbsd-compat/bsd-misc.h
      stable/8/crypto/openssh/openbsd-compat/getcwd.c
      stable/8/crypto/openssh/openbsd-compat/getgrouplist.c
      stable/8/crypto/openssh/openbsd-compat/getrrsetbyname.c
      stable/8/crypto/openssh/openbsd-compat/glob.c
      stable/8/crypto/openssh/openbsd-compat/glob.h
      stable/8/crypto/openssh/openbsd-compat/inet_ntop.c
      stable/8/crypto/openssh/openbsd-compat/mktemp.c
      stable/8/crypto/openssh/openbsd-compat/openbsd-compat.h
      stable/8/crypto/openssh/openbsd-compat/openssl-compat.c
      stable/8/crypto/openssh/openbsd-compat/openssl-compat.h
      stable/8/crypto/openssh/openbsd-compat/port-linux.c
      stable/8/crypto/openssh/openbsd-compat/port-linux.h
      stable/8/crypto/openssh/openbsd-compat/port-solaris.c
      stable/8/crypto/openssh/openbsd-compat/port-solaris.h
      stable/8/crypto/openssh/openbsd-compat/port-tun.c
      stable/8/crypto/openssh/openbsd-compat/port-uw.c
      stable/8/crypto/openssh/openbsd-compat/setenv.c
      stable/8/crypto/openssh/openbsd-compat/sha2.c   (contents, props changed)
      stable/8/crypto/openssh/openbsd-compat/sha2.h   (contents, props changed)
      stable/8/crypto/openssh/openbsd-compat/strlcpy.c
      stable/8/crypto/openssh/packet.c
      stable/8/crypto/openssh/packet.h
      stable/8/crypto/openssh/pathnames.h
      stable/8/crypto/openssh/platform.c
      stable/8/crypto/openssh/platform.h
      stable/8/crypto/openssh/readconf.c
      stable/8/crypto/openssh/readconf.h
      stable/8/crypto/openssh/readpass.c
      stable/8/crypto/openssh/roaming.h
      stable/8/crypto/openssh/roaming_client.c
      stable/8/crypto/openssh/roaming_common.c
      stable/8/crypto/openssh/schnorr.c
      stable/8/crypto/openssh/scp.1
      stable/8/crypto/openssh/scp.c
      stable/8/crypto/openssh/servconf.c
      stable/8/crypto/openssh/servconf.h
      stable/8/crypto/openssh/serverloop.c
      stable/8/crypto/openssh/session.c
      stable/8/crypto/openssh/sftp-client.c
      stable/8/crypto/openssh/sftp-client.h
      stable/8/crypto/openssh/sftp-glob.c
      stable/8/crypto/openssh/sftp-server.c
      stable/8/crypto/openssh/sftp.1
      stable/8/crypto/openssh/sftp.c
      stable/8/crypto/openssh/ssh-add.1
      stable/8/crypto/openssh/ssh-add.c
      stable/8/crypto/openssh/ssh-agent.1
      stable/8/crypto/openssh/ssh-agent.c
      stable/8/crypto/openssh/ssh-dss.c
      stable/8/crypto/openssh/ssh-keygen.1
      stable/8/crypto/openssh/ssh-keygen.c
      stable/8/crypto/openssh/ssh-keyscan.1
      stable/8/crypto/openssh/ssh-keyscan.c
      stable/8/crypto/openssh/ssh-keysign.8
      stable/8/crypto/openssh/ssh-keysign.c
      stable/8/crypto/openssh/ssh-pkcs11-client.c
      stable/8/crypto/openssh/ssh-pkcs11-helper.c
      stable/8/crypto/openssh/ssh-pkcs11.c
      stable/8/crypto/openssh/ssh-rsa.c
      stable/8/crypto/openssh/ssh.1
      stable/8/crypto/openssh/ssh.c
      stable/8/crypto/openssh/ssh.h
      stable/8/crypto/openssh/ssh2.h
      stable/8/crypto/openssh/ssh_config
      stable/8/crypto/openssh/ssh_config.5
      stable/8/crypto/openssh/ssh_namespace.h
      stable/8/crypto/openssh/sshconnect.c
      stable/8/crypto/openssh/sshconnect.h
      stable/8/crypto/openssh/sshconnect2.c
      stable/8/crypto/openssh/sshd.8
      stable/8/crypto/openssh/sshd.c
      stable/8/crypto/openssh/sshd_config
      stable/8/crypto/openssh/sshd_config.5
      stable/8/crypto/openssh/sshlogin.c
      stable/8/crypto/openssh/umac.c
      stable/8/crypto/openssh/uuencode.c
      stable/8/crypto/openssh/uuencode.h
      stable/8/crypto/openssh/version.h
      stable/8/etc/rc.d/sshd
      stable/8/secure/lib/libssh/Makefile
      stable/8/secure/usr.bin/ssh/Makefile
      stable/8/secure/usr.sbin/sshd/Makefile
      stable/8/share/mk/bsd.own.mk
    Directory Properties:
      stable/8/crypto/openssh/   (props changed)
      stable/8/etc/   (props changed)
      stable/8/secure/lib/libssh/   (props changed)
      stable/8/secure/usr.bin/ssh/   (props changed)
      stable/8/secure/usr.sbin/sshd/   (props changed)
      stable/8/share/mk/   (props changed)
      stable/8/tools/build/options/   (props changed)
    
    Modified: stable/8/crypto/openssh/ChangeLog
    ==============================================================================
    --- stable/8/crypto/openssh/ChangeLog	Fri Mar  1 01:47:11 2013	(r247520)
    +++ stable/8/crypto/openssh/ChangeLog	Fri Mar  1 02:06:04 2013	(r247521)
    @@ -1,2627 +1,2349 @@
    -20100307
    +20120828
    + - (djm) Release openssh-6.1
    +
    +20120828
    + - (dtucker) [openbsd-compat/bsd-cygwin_util.h] define WIN32_LEAN_AND_MEAN
    +   for compatibility with future mingw-w64 headers.  Patch from vinschen at
    +   redhat com.
    +
    +20120822
    + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
    +   [contrib/suse/openssh.spec] Update version numbers
    +
    +20120731
      - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/03/07 22:16:01
    +   - jmc@cvs.openbsd.org 2012/07/06 06:38:03
          [ssh-keygen.c]
    -     make internal strptime string match strftime format;
    -     suggested by vinschen AT redhat.com and markus@
    -   - djm@cvs.openbsd.org 2010/03/08 00:28:55
    -     [ssh-keygen.1]
    -     document permit-agent-forwarding certificate constraint; patch from
    -     stevesk@
    -   - djm@cvs.openbsd.org 2010/03/07 22:01:32
    +     missing full stop in usage();
    +   - djm@cvs.openbsd.org 2012/07/10 02:19:15
    +     [servconf.c servconf.h sshd.c sshd_config]
    +     Turn on systrace sandboxing of pre-auth sshd by default for new installs
    +     by shipping a config that overrides the current UsePrivilegeSeparation=yes
    +     default. Make it easier to flip the default in the future by adding too.
    +     prodded markus@ feedback dtucker@ "get it in" deraadt@
    +   - dtucker@cvs.openbsd.org 2012/07/13 01:35:21
    +     [servconf.c]
    +     handle long comments in config files better.  bz#2025, ok markus
    +   - markus@cvs.openbsd.org 2012/07/22 18:19:21
          [version.h]
    -     openssh-5.4
    - - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
    -   crank version numbers
    - - (djm) Release OpenSSH-5.4p1
    +     openssh 6.1
     
    -20100307
    - - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that
    -   it gets the passwd struct from the LAM that knows about the user which is
    -   not necessarily the default.  Patch from Alexandre Letourneau.
    - - (dtucker) [session.c] Bug #1567: move setpcred call to before chroot and
    -   do not set real uid, since that's needed for the chroot, and will be set
    -   by permanently_set_uid.
    - - (dtucker) [session.c] Also initialize creds to NULL for handing to
    -    setpcred.
    - - (dtucker) OpenBSD CVS Sync
    -   - dtucker@cvs.openbsd.org 2010/03/07 11:57:13
    -     [auth-rhosts.c monitor.c monitor_wrap.c session.c auth-options.c sshd.c]
    -     Hold authentication debug messages until after successful authentication.
    -     Fixes an info leak of environment variables specified in authorized_keys,
    -     reported by Jacob Appelbaum.  ok djm@
    +20120720
    + - (dtucker) Import regened moduli file.
     
    -20100305
    - - OpenBSD CVS Sync
    -   - jmc@cvs.openbsd.org 2010/03/04 12:51:25
    -     [ssh.1 sshd_config.5]
    -     tweak previous;
    -   - djm@cvs.openbsd.org 2010/03/04 20:35:08
    -     [ssh-keygen.1 ssh-keygen.c]
    -     Add a -L flag to print the contents of a certificate; ok markus@
    -   - jmc@cvs.openbsd.org 2010/03/04 22:52:40
    -     [ssh-keygen.1]
    -     fix Bk/Ek;
    -   - djm@cvs.openbsd.org 2010/03/04 23:17:25
    -     [sshd_config.5]
    -     missing word; spotted by jmc@
    -   - djm@cvs.openbsd.org 2010/03/04 23:19:29
    -     [ssh.1 sshd.8]
    -     move section on CA and revoked keys from ssh.1 to sshd.8's known hosts
    -     format section and rework it a bit; requested by jmc@
    -   - djm@cvs.openbsd.org 2010/03/04 23:27:25
    -     [auth-options.c ssh-keygen.c]
    -     "force-command" is not spelled "forced-command"; spotted by
    -     imorgan AT nas.nasa.gov
    -   - djm@cvs.openbsd.org 2010/03/05 02:58:11
    -     [auth.c]
    -     make the warning for a revoked key louder and more noticable
    -   - jmc@cvs.openbsd.org 2010/03/05 06:50:35
    -     [ssh.1 sshd.8]
    -     tweak previous;
    -   - jmc@cvs.openbsd.org 2010/03/05 08:31:20
    -     [ssh.1]
    -     document certificate authentication; help/ok djm
    -   - djm@cvs.openbsd.org 2010/03/05 10:28:21
    -     [ssh-add.1 ssh.1 ssh_config.5]
    -     mention loading of certificate files from [private]-cert.pub when
    -     they are present; feedback and ok jmc@
    - - (tim) [ssh-pkcs11.c] Fix "non-constant initializer" errors in older
    -   compilers. OK djm@
    - - (djm) [ssh-rand-helper.c] declare optind, avoiding compilation failure
    -   on some platforms
    - - (djm) [configure.ac] set -fno-strict-aliasing for gcc4; ok dtucker@
    -
    -20100304
    - - (djm) [ssh-keygen.c] Use correct local variable, instead of
    -   maybe-undefined global "optarg"
    - - (djm) [contrib/redhat/openssh.spec] Replace obsolete BuildPreReq
    -   on XFree86-devel with neutral /usr/include/X11/Xlib.h;
    -   imorgan AT nas.nasa.gov in bz#1731
    - - (djm) [.cvsignore] Ignore ssh-pkcs11-helper
    - - (djm) [regress/Makefile] Cleanup sshd_proxy_orig
    - - OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/03/03 01:44:36
    -     [auth-options.c key.c]
    -     reject strings with embedded ASCII nul chars in certificate key IDs,
    -     principal names and constraints
    -   - djm@cvs.openbsd.org 2010/03/03 22:49:50
    -     [sshd.8]
    -     the authorized_keys option for CA keys is "cert-authority", not
    -     "from=cert-authority". spotted by imorgan AT nas.nasa.gov
    -   - djm@cvs.openbsd.org 2010/03/03 22:50:40
    -     [PROTOCOL.certkeys]
    -     s/similar same/similar/; from imorgan AT nas.nasa.gov
    -   - djm@cvs.openbsd.org 2010/03/04 01:44:57
    -     [key.c]
    -     use buffer_get_string_ptr_ret() where we are checking the return
    -     value explicitly instead of the fatal()-causing buffer_get_string_ptr()
    -   - djm@cvs.openbsd.org 2010/03/04 10:36:03
    -     [auth-rh-rsa.c auth-rsa.c auth.c auth.h auth2-hostbased.c auth2-pubkey.c]
    -     [authfile.c authfile.h hostfile.c hostfile.h servconf.c servconf.h]
    -     [ssh-keygen.c ssh.1 sshconnect.c sshd_config.5]
    -     Add a TrustedUserCAKeys option to sshd_config to specify CA keys that
    -     are trusted to authenticate users (in addition than doing it per-user
    -     in authorized_keys).
    -     
    -     Add a RevokedKeys option to sshd_config and a @revoked marker to
    -     known_hosts to allow keys to me revoked and banned for user or host
    -     authentication.
    -     
    -     feedback and ok markus@
    -   - djm@cvs.openbsd.org 2010/03/03 00:47:23
    -     [regress/cert-hostkey.sh regress/cert-userkey.sh]
    -     add an extra test to ensure that authentication with the wrong
    -     certificate fails as it should (and it does)
    -   - djm@cvs.openbsd.org 2010/03/04 10:38:23
    -     [regress/cert-hostkey.sh regress/cert-userkey.sh]
    -     additional regression tests for revoked keys and TrustedUserCAKeys
    +20120706
    + - (djm) [sandbox-seccomp-filter.c] fallback to rlimit if seccomp filter is
    +   not available. Allows use of sshd compiled on host with a filter-capable
    +   kernel on hosts that lack the support. bz#2011 ok dtucker@
    + - (djm) [configure.ac] Recursively expand $(bindir) to ensure it has no
    +   unexpanded $(prefix) embedded. bz#2007 patch from nix-corp AT
    +   esperi.org.uk; ok dtucker@
    +- (djm) OpenBSD CVS Sync
    +   - dtucker@cvs.openbsd.org 2012/07/06 00:41:59
    +     [moduli.c ssh-keygen.1 ssh-keygen.c]
    +     Add options to specify starting line number and number of lines to process
    +     when screening moduli candidates.  This allows processing of different
    +     parts of a candidate moduli file in parallel.  man page help jmc@, ok djm@
    +   - djm@cvs.openbsd.org 2012/07/06 01:37:21
    +     [mux.c]
    +     fix memory leak of passed-in environment variables and connection
    +     context when new session message is malformed; bz#2003 from Bert.Wesarg
    +     AT googlemail.com
    +   - djm@cvs.openbsd.org 2012/07/06 01:47:38
    +     [ssh.c]
    +     move setting of tty_flag to after config parsing so RequestTTY options
    +     are correctly picked up. bz#1995 patch from przemoc AT gmail.com;
    +     ok dtucker@
    +
    +20120704
    + - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] Add setlinebuf for
    +   platforms that don't have it.  "looks good" tim@
    +
    +20120703
    + - (dtucker) [configure.ac] Detect platforms that can't use select(2) with
    +   setrlimit(RLIMIT_NOFILE, rl_zero) and disable the rlimit sandbox on those.
    + - (dtucker) [configure.ac sandbox-rlimit.c] Test whether or not
    +   setrlimit(RLIMIT_FSIZE, rl_zero) and skip it if it's not supported.  Its
    +   benefit is minor, so it's not worth disabling the sandbox if it doesn't
    +   work.
    +
    +20120702
    +- (dtucker) OpenBSD CVS Sync
    +   - naddy@cvs.openbsd.org 2012/06/29 13:57:25
    +     [ssh_config.5 sshd_config.5]
    +     match the documented MAC order of preference to the actual one;
    +     ok dtucker@
    +   - markus@cvs.openbsd.org 2012/06/30 14:35:09
    +     [sandbox-systrace.c sshd.c]
    +     fix a during the load of the sandbox policies (child can still make
    +     the read-syscall and wait forever for systrace-answers) by replacing
    +     the read/write synchronisation with SIGSTOP/SIGCONT;
    +     report and help hshoexer@; ok djm@, dtucker@
    +   - dtucker@cvs.openbsd.org 2012/07/02 08:50:03
    +     [ssh.c]
    +     set interactive ToS for forwarded X11 sessions.  ok djm@
    +   - dtucker@cvs.openbsd.org 2012/07/02 12:13:26
    +     [ssh-pkcs11-helper.c sftp-client.c]
    +     fix a couple of "assigned but not used" warnings.  ok markus@
    +   - dtucker@cvs.openbsd.org 2012/07/02 14:37:06
    +     [regress/connect-privsep.sh]
    +     remove exit from end of test since it prevents reporting failure
    + - (dtucker) [regress/reexec.sh regress/sftp-cmds.sh regress/test-exec.sh]
    +   Move cygwin detection to test-exec and use to skip reexec test on cygwin.
    + - (dtucker) [regress/test-exec.sh] Correct uname for cygwin/w2k.
     
    -20100303
    - - (djm) [PROTOCOL.certkeys] Add RCS Ident
    +20120629
      - OpenBSD CVS Sync
    -   - jmc@cvs.openbsd.org 2010/02/26 22:09:28
    -     [ssh-keygen.1 ssh.1 sshd.8]
    -     tweak previous;
    -   - otto@cvs.openbsd.org 2010/03/01 11:07:06
    -     [ssh-add.c]
    -     zap what seems to be a left-over debug message; ok markus@
    -   - djm@cvs.openbsd.org 2010/03/02 23:20:57
    -     [ssh-keygen.c]
    -     POSIX strptime is stricter than OpenBSD's so do a little dance to
    -     appease it.
    - - (djm) [regress/cert-userkey.sh] s/echo -n/echon/ here too
    -
    -20100302
    - - (tim) [config.guess config.sub] Bug 1722: Update to latest versions from
    -   http://git.savannah.gnu.org/gitweb/ (2009-12-30 and 2010-01-22
    -   respectively).
    -
    -20100301
    - - (dtucker) [regress/{cert-hostkey,cfgmatch,cipher-speed}.sh} Replace
    -   "echo -n" with "echon" for portability.
    - - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
    -   adjust log at verbose only, since according to cjwatson in bug #1470
    -   some virtualization platforms don't allow writes.
    -
    -20100228
    - - (djm) [auth.c] On Cygwin, refuse usernames that have differences in
    -   case from that matched in the system password database. On this
    -   platform, passwords are stored case-insensitively, but sshd requires
    -   exact case matching for Match blocks in sshd_config(5). Based on
    -   a patch from vinschen AT redhat.com.
    - - (tim) [ssh-pkcs11-helper.c] Move declarations before calling functions
    -   to make older compilers (gcc 2.95) happy.
    -
    -20100227
    - - (djm) [ssh-pkcs11-helper.c ] Ensure RNG is initialised and seeded
    - - (djm) [openbsd-compat/bsd-cygwin_util.c] Reduce the set of environment
    -   variables copied into sshd child processes. From vinschen AT redhat.com
    -
    -20100226
    - - OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/02/26 20:29:54
    -     [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys addrmatch.c auth-options.c]
    -     [auth-options.h auth.h auth2-pubkey.c authfd.c dns.c dns.h hostfile.c]
    -     [hostfile.h kex.h kexdhs.c kexgexs.c key.c key.h match.h monitor.c]
    -     [myproposal.h servconf.c servconf.h ssh-add.c ssh-agent.c ssh-dss.c]
    -     [ssh-keygen.1 ssh-keygen.c ssh-rsa.c ssh.1 ssh.c ssh2.h sshconnect.c]
    -     [sshconnect2.c sshd.8 sshd.c sshd_config.5]
    -     Add support for certificate key types for users and hosts.
    -     
    -     OpenSSH certificate key types are not X.509 certificates, but a much
    -     simpler format that encodes a public key, identity information and
    -     some validity constraints and signs it with a CA key. CA keys are
    -     regular SSH keys. This certificate style avoids the attack surface
    -     of X.509 certificates and is very easy to deploy.
    -     
    -     Certified host keys allow automatic acceptance of new host keys
    -     when a CA certificate is marked as trusted in ~/.ssh/known_hosts.
    -     see VERIFYING HOST KEYS in ssh(1) for details.
    -     
    -     Certified user keys allow authentication of users when the signing
    -     CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS
    -     FILE FORMAT" in sshd(8) for details.
    -     
    -     Certificates are minted using ssh-keygen(1), documentation is in
    -     the "CERTIFICATES" section of that manpage.
    -     
    -     Documentation on the format of certificates is in the file
    -     PROTOCOL.certkeys
    -     
    -     feedback and ok markus@
    -   - djm@cvs.openbsd.org 2010/02/26 20:33:21
    -     [Makefile regress/cert-hostkey.sh regress/cert-userkey.sh]
    -     regression tests for certified keys
    -
    -20100224
    - - (djm) [pkcs11.h ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
    -   [ssh-pkcs11.h] Add $OpenBSD$ RCS idents so we can sync portable
    - - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/02/11 20:37:47
    -     [pathnames.h]
    -     correct comment
    -   - dtucker@cvs.openbsd.org 2009/11/09 04:20:04
    -     [regress/Makefile]
    -     add regression test for ssh-keygen pubkey conversions
    -   - dtucker@cvs.openbsd.org 2010/01/11 02:53:44
    -     [regress/forwarding.sh]
    -     regress test for stdio forwarding
    -   - djm@cvs.openbsd.org 2010/02/09 04:57:36
    +   - dtucker@cvs.openbsd.org 2012/06/21 00:16:07
    +     [addrmatch.c]
    +     fix strlcpy truncation check.  from carsten at debian org, ok markus
    +   - dtucker@cvs.openbsd.org 2012/06/22 12:30:26
    +     [monitor.c sshconnect2.c]
    +     remove dead code following 'for (;;)' loops.
    +     From Steve.McClellan at radisys com, ok markus@
    +   - dtucker@cvs.openbsd.org 2012/06/22 14:36:33
    +     [sftp.c]
    +     Remove unused variable leftover from tab-completion changes.
    +     From Steve.McClellan at radisys com, ok markus@
    +   - dtucker@cvs.openbsd.org 2012/06/26 11:02:30
    +     [sandbox-systrace.c]
    +     Add mquery to the list of allowed syscalls for "UsePrivilegeSeparation
    +     sandbox" since malloc now uses it.  From johnw.mail at gmail com.
    +   - dtucker@cvs.openbsd.org 2012/06/28 05:07:45
    +     [mac.c myproposal.h ssh_config.5 sshd_config.5]
    +     Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed
    +     from draft6 of the spec and will not be in the RFC when published.  Patch
    +     from mdb at juniper net via bz#2023, ok markus.
    +   - naddy@cvs.openbsd.org 2012/06/29 13:57:25
    +     [ssh_config.5 sshd_config.5]
    +     match the documented MAC order of preference to the actual one; ok dtucker@
    +   - dtucker@cvs.openbsd.org 2012/05/13 01:42:32
          [regress/addrmatch.sh]
    -     clean up droppings
    -   - djm@cvs.openbsd.org 2010/02/09 06:29:02
    -     [regress/Makefile]
    -     turn on all the malloc(3) checking options when running regression
    -     tests. this has caught a few bugs for me in the past; ok dtucker@
    -   - djm@cvs.openbsd.org 2010/02/24 06:21:56
    -     [regress/test-exec.sh]
    -     wait for sshd to fully stop in cleanup() function; avoids races in tests
    -     that do multiple start_sshd/cleanup cycles; "I hate pidfiles" deraadt@
    -   - markus@cvs.openbsd.org 2010/02/08 10:52:47
    -     [regress/agent-pkcs11.sh]
    -     test for PKCS#11 support (currently disabled)
    - - (djm) [Makefile.in ssh-pkcs11-helper.8] Add manpage for PKCS#11 helper
    - - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
    -   [contrib/suse/openssh.spec] Add PKCS#11 helper binary and manpage
    +     Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests
    +     to match.  Feedback and ok djm@ markus@.
    +   - djm@cvs.openbsd.org 2012/06/01 00:47:35
    +     [regress/multiplex.sh regress/forwarding.sh]
    +     append to rather than truncate test log; bz#2013 from openssh AT
    +     roumenpetrov.info
    +   - djm@cvs.openbsd.org 2012/06/01 00:52:52
    +     [regress/sftp-cmds.sh]
    +     don't delete .* on cleanup due to unintended env expansion; pointed out in
    +     bz#2014 by openssh AT roumenpetrov.info
    +   - dtucker@cvs.openbsd.org 2012/06/26 12:06:59
    +     [regress/connect-privsep.sh]
    +     test sandbox with every malloc option
    +   - dtucker@cvs.openbsd.org 2012/06/28 05:07:45
    +     [regress/try-ciphers.sh regress/cipher-speed.sh]
    +     Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed
    +     from draft6 of the spec and will not be in the RFC when published.  Patch
    +     from mdb at juniper net via bz#2023, ok markus.
    + - (dtucker) [myproposal.h] Remove trailing backslash to fix compile error.
    + - (dtucker) [key.c] ifdef out sha256 key types on platforms that don't have
    +   the required functions in libcrypto.
    +
    +20120628
    + - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null
    +   pointer deref in the client when built with LDNS and using DNSSEC with a
    +   CNAME.  Patch from gregdlg+mr at hochet info.
    +
    +20120622
    + - (dtucker) [contrib/cygwin/ssh-host-config] Ensure that user sshd runs as
    +   can logon as a service.  Patch from vinschen at redhat com.
     
    -20100212
    +20120620
      - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/02/02 22:49:34
    -     [bufaux.c]
    -     make buffer_get_string_ret() really non-fatal in all cases (it was
    -     using buffer_get_int(), which could fatal() on buffer empty);
    -     ok markus dtucker
    -   - markus@cvs.openbsd.org 2010/02/08 10:50:20
    -     [pathnames.h readconf.c readconf.h scp.1 sftp.1 ssh-add.1 ssh-add.c]
    -     [ssh-agent.c ssh-keygen.1 ssh-keygen.c ssh.1 ssh.c ssh_config.5]
    -     replace our obsolete smartcard code with PKCS#11.
    -        ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20.pdf
    -     ssh(1) and ssh-keygen(1) use dlopen(3) directly to talk to a PKCS#11
    -     provider (shared library) while ssh-agent(1) delegates PKCS#11 to
    -     a forked a ssh-pkcs11-helper process.
    -     PKCS#11 is currently a compile time option.
    -     feedback and ok djm@; inspired by patches from Alon Bar-Lev
    -   - jmc@cvs.openbsd.org 2010/02/08 22:03:05
    -     [ssh-add.1 ssh-keygen.1 ssh.1 ssh.c]
    +   - djm@cvs.openbsd.org 2011/12/02 00:41:56
    +     [mux.c]
    +     fix bz#1948: ssh -f doesn't fork for multiplexed connection.
    +     ok dtucker@
    +   - djm@cvs.openbsd.org 2011/12/04 23:16:12
    +     [mux.c]
    +     revert:
    +     > revision 1.32
    +     > date: 2011/12/02 00:41:56;  author: djm;  state: Exp;  lines: +4 -1
    +     > fix bz#1948: ssh -f doesn't fork for multiplexed connection.
    +     > ok dtucker@
    +     it interacts badly with ControlPersist
    +   - djm@cvs.openbsd.org 2012/01/07 21:11:36
    +     [mux.c]
    +     fix double-free in new session handler
    +     NB. Id sync only
    +   - djm@cvs.openbsd.org 2012/05/23 03:28:28
    +     [dns.c dns.h key.c key.h ssh-keygen.c]
    +     add support for RFC6594 SSHFP DNS records for ECDSA key types.
    +     patch from bugzilla-m67 AT nulld.me in bz#1978; ok + tweak markus@
    +   - djm@cvs.openbsd.org 2012/06/01 00:49:35
    +     [PROTOCOL.mux]
    +     correct types of port numbers (integers, not strings); bz#2004 from
    +     bert.wesarg AT googlemail.com
    +   - djm@cvs.openbsd.org 2012/06/01 01:01:22
    +     [mux.c]
    +     fix memory leak when mux socket creation fails; bz#2002 from bert.wesarg
    +     AT googlemail.com
    +   - dtucker@cvs.openbsd.org 2012/06/18 11:43:53
    +     [jpake.c]
    +     correct sizeof usage.  patch from saw at online.de, ok deraadt
    +   - dtucker@cvs.openbsd.org 2012/06/18 11:49:58
    +     [ssh_config.5]
    +     RSA instead of DSA twice.  From Steve.McClellan at radisys com
    +   - dtucker@cvs.openbsd.org 2012/06/18 12:07:07
    +     [ssh.1 sshd.8]
    +     Remove mention of 'three' key files since there are now four.  From
    +     Steve.McClellan at radisys com.
    +   - dtucker@cvs.openbsd.org 2012/06/18 12:17:18
    +     [ssh.1]
    +     Clarify description of -W.  Noted by Steve.McClellan at radisys com,
    +     ok jmc
    +   - markus@cvs.openbsd.org 2012/06/19 18:25:28
    +     [servconf.c servconf.h sshd_config.5]
    +     sshd_config: extend Match to allow AcceptEnv and {Allow,Deny}{Users,Groups}
    +     this allows 'Match LocalPort 1022' combined with 'AllowUser bauer'
    +     ok djm@ (back in March)
    +   - jmc@cvs.openbsd.org 2012/06/19 21:35:54
    +     [sshd_config.5]
          tweak previous; ok markus
    -   - djm@cvs.openbsd.org 2010/02/09 00:50:36
    -     [ssh-agent.c]
    -     fallout from PKCS#11: unbreak -D
    -   - djm@cvs.openbsd.org 2010/02/09 00:50:59
    +   - djm@cvs.openbsd.org 2012/06/20 04:42:58
    +     [clientloop.c serverloop.c]
    +     initialise accept() backoff timer to avoid EINVAL from select(2) in
    +     rekeying
    +
    +20120519
    + - (dtucker) [configure.ac] bz#2010: fix non-portable shell construct.  Patch
    +   from cjwatson at debian org.
    + - (dtucker) [configure.ac contrib/Makefile] bz#1996: use AC_PATH_TOOL to find
    +   pkg-config so it does the right thing when cross-compiling.  Patch from
    +   cjwatson at debian org.
    +- (dtucker) OpenBSD CVS Sync
    +   - dtucker@cvs.openbsd.org 2012/05/13 01:42:32
    +     [servconf.h servconf.c sshd.8 sshd.c auth.c sshd_config.5]
    +     Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests
    +     to match.  Feedback and ok djm@ markus@.
    +   - dtucker@cvs.openbsd.org 2012/05/19 06:30:30
    +     [sshd_config.5]
    +     Document PermitOpen none.  bz#2001, patch from Loganaden Velvindron
    +
    +20120504
    + - (dtucker) [configure.ac] Include  rather than 
    +   to fix building on some plaforms.  Fom bowman at math utah edu and
    +   des at des no.
    +
    +20120427
    + - (dtucker) [regress/addrmatch.sh] skip tests when running on a non-ipv6
    +   platform rather than exiting early, so that we still clean up and return
    +   success or failure to test-exec.sh
    +
    +20120426
    + - (djm) [auth-passwd.c] Handle crypt() returning NULL; from Paul Wouters
    +   via Niels
    + - (djm) [auth-krb5.c] Save errno across calls that might modify it;
    +   ok dtucker@
    +
    +20120423
    + - OpenBSD CVS Sync
    +   - djm@cvs.openbsd.org 2012/04/23 08:18:17
    +     [channels.c]
    +     fix function proto/source mismatch
    +
    +20120422
    + - OpenBSD CVS Sync
    +   - djm@cvs.openbsd.org 2012/02/29 11:21:26
          [ssh-keygen.c]
    -     fix -Wall
    -   - djm@cvs.openbsd.org 2010/02/09 03:56:28
    -     [buffer.c buffer.h]
    -     constify the arguments to buffer_len, buffer_ptr and buffer_dump
    -   - djm@cvs.openbsd.org 2010/02/09 06:18:46
    +     allow conversion of RSA1 keys to public PEM and PKCS8; "nice" markus@
    +   - guenther@cvs.openbsd.org 2012/03/15 03:10:27
    +     [session.c]
    +     root should always be excluded from the test for /etc/nologin instead
    +     of having it always enforced even when marked as ignorenologin.  This
    +     regressed when the logic was incompletely flipped around in rev 1.251
    +     ok halex@ millert@
    +   - djm@cvs.openbsd.org 2012/03/28 07:23:22
    +     [PROTOCOL.certkeys]
    +     explain certificate extensions/crit split rationale. Mention requirement
    +     that each appear at most once per cert.
    +   - dtucker@cvs.openbsd.org 2012/03/29 23:54:36
    +     [channels.c channels.h servconf.c]
    +     Add PermitOpen none option based on patch from Loganaden Velvindron
    +     (bz #1949).  ok djm@
    +   - djm@cvs.openbsd.org 2012/04/11 13:16:19
    +     [channels.c channels.h clientloop.c serverloop.c]
    +     don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a
    +     while; ok deraadt@ markus@
    +   - djm@cvs.openbsd.org 2012/04/11 13:17:54
          [auth.c]
    -     unbreak ChrootDirectory+internal-sftp by skipping check for executable
    -     shell when chrooting; reported by danh AT wzrd.com; ok dtucker@
    -   - markus@cvs.openbsd.org 2010/02/10 23:20:38
    -     [ssh-add.1 ssh-keygen.1 ssh.1 ssh_config.5]
    -     pkcs#11 is no longer optional; improve wording; ok jmc@
    -   - jmc@cvs.openbsd.org 2010/02/11 13:23:29
    +     Support "none" as an argument for AuthorizedPrincipalsFile to indicate
    +     no file should be read.
    +   - djm@cvs.openbsd.org 2012/04/11 13:26:40
    +     [sshd.c]
    +     don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a
    +     while; ok deraadt@ markus@
    +   - djm@cvs.openbsd.org 2012/04/11 13:34:17
    +     [ssh-keyscan.1 ssh-keyscan.c]
    +     now that sshd defaults to offering ECDSA keys, ssh-keyscan should also
    +     look for them by default; bz#1971
    +   - djm@cvs.openbsd.org 2012/04/12 02:42:32
    +     [servconf.c servconf.h sshd.c sshd_config sshd_config.5]
    +     VersionAddendum option to allow server operators to append some arbitrary
    +     text to the SSH-... banner; ok deraadt@ "don't care" markus@
    +   - djm@cvs.openbsd.org 2012/04/12 02:43:55
    +     [sshd_config sshd_config.5]
    +     mention AuthorizedPrincipalsFile=none default
    +   - djm@cvs.openbsd.org 2012/04/20 03:24:23
    +     [sftp.c]
    +     setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...)
    +   - jmc@cvs.openbsd.org 2012/04/20 16:26:22
          [ssh.1]
    -     libarary -> library;
    - - (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c]
    -   [scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java]
    -   Remove obsolete smartcard support
    - - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
    -   Make it compile on OSX
    - - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
    -   Use ssh_get_progname to fill __progname
    - - (djm) [configure.ac] Enable PKCS#11 support only when we find a working
    -   dlopen()
    -
    -20100210
    - - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
    -   getseuserbyname; patch from calebcase AT gmail.com via
    -   cjwatson AT debian.org
    +     use "brackets" instead of "braces", for consistency;
     
    -20100202
    - - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/01/30 21:08:33
    -     [sshd.8]
    -     debug output goes to stderr, not "the system log"; ok markus dtucker
    -   - djm@cvs.openbsd.org 2010/01/30 21:12:08
    -     [channels.c]
    -     fake local addr:port when stdio fowarding as some servers (Tectia at
    -     least) validate that they are well-formed;
    -     reported by imorgan AT nas.nasa.gov
    -     ok dtucker
    +20120420
    + - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
    +   [contrib/suse/openssh.spec] Update for release 6.0
    + - (djm) [README] Update URL to release notes.
    + - (djm) Release openssh-6.0
    +
    +20120419
    + - (djm) [configure.ac] Fix compilation error on FreeBSD, whose libutil
    +   contains openpty() but not login()
    +
    +20120404
    + - (djm) [Makefile.in configure.ac sandbox-seccomp-filter.c] Add sandbox
    +   mode for Linux's new seccomp filter; patch from Will Drewry; feedback
    +   and ok dtucker@
    +
    +20120330
    + - (dtucker) [contrib/redhat/openssh.spec] Bug #1992: remove now-gone WARNING
    +   file from spec file.  From crighter at nuclioss com.
    + - (djm) [entropy.c] bz#1991: relax OpenSSL version test to allow running
    +   openssh binaries on a newer fix release than they were compiled on.
    +   with and ok dtucker@
    + - (djm) [openbsd-compat/bsd-cygwin_util.h] #undef _WIN32 to avoid incorrect
    +   assumptions when building on Cygwin; patch from Corinna Vinschen
    +
    +20120309
    + - (djm) [openbsd-compat/port-linux.c] bz#1960: fix crash on SELinux 
    +   systems where sshd is run in te wrong context. Patch from Sven
    +   Vermeulen; ok dtucker@
    + - (djm) [packet.c] bz#1963: Fix IPQoS not being set on non-mapped v4-in-v6
    +   addressed connections. ok dtucker@
    +
    +20120224
    + - (dtucker) [audit-bsm.c configure.ac] bug #1968: enable workarounds for BSM
    +   audit breakage in Solaris 11.  Patch from Magnus Johansson.
    +
    +20120215
    + - (tim) [openbsd-compat/bsd-misc.h sshd.c] Fix conflicting return type for
    +   unsetenv due to rev 1.14 change to setenv.c. Cast unsetenv to void in sshd.c
    +   ok dtucker@
    + - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN so
    +   it actually works.
    + - (tim) [regress/keytype.sh] stderr redirection needs to be inside back quote
    +   to work. Spotted by Angel Gonzalez
    +
    +20120214
    + - (djm) [openbsd-compat/bsd-cygwin_util.c] Add PROGRAMFILES to list of
    +   preserved Cygwin environment variables; from Corinna Vinschen
     
    -20100130
    +20120211
      - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/01/28 00:21:18
    -     [clientloop.c]
    -     downgrade an error() to a debug() - this particular case can be hit in
    -     normal operation for certain sequences of mux slave vs session closure
    -     and is harmless
    -   - djm@cvs.openbsd.org 2010/01/29 00:20:41
    -     [sshd.c]
    -     set FD_CLOEXEC on sock_in/sock_out; bz#1706 from jchadima AT redhat.com
    -     ok dtucker@
    -   - djm@cvs.openbsd.org 2010/01/29 20:16:17
    -     [mux.c]
    -     kill correct channel (was killing already-dead mux channel, not
    -     its session channel)
    -   - djm@cvs.openbsd.org 2010/01/30 02:54:53
    +   - djm@cvs.openbsd.org 2012/01/05 00:16:56
    +     [monitor.c]
    +     memleak on error path
    +   - djm@cvs.openbsd.org 2012/01/07 21:11:36
          [mux.c]
    -     don't mark channel as read failed if it is already closing; suppresses
    -     harmless error messages when connecting to SSH.COM Tectia server
    -     report by imorgan AT nas.nasa.gov
    -
    -20100129
    - - (dtucker) [openbsd-compat/openssl-compat.c] Bug #1707: Call OPENSSL_config()
    -   after registering the hardware engines, which causes the openssl.cnf file to
    -   be processed.  See OpenSSL's man page for OPENSSL_config(3) for details.
    -   Patch from Solomon Peachy, ok djm@.
    +     fix double-free in new session handler
    +   - miod@cvs.openbsd.org 2012/01/08 13:17:11
    +     [ssh-ecdsa.c]
    +     Fix memory leak in ssh_ecdsa_verify(); from Loganaden Velvindron,
    +     ok markus@
    +   - miod@cvs.openbsd.org 2012/01/16 20:34:09
    +     [ssh-pkcs11-client.c]
    +     Fix a memory leak in pkcs11_rsa_private_encrypt(), reported by Jan Klemkow.
    +     While there, be sure to buffer_clear() between send_msg() and recv_msg().
    +     ok markus@
    +   - dtucker@cvs.openbsd.org 2012/01/18 21:46:43
    +     [clientloop.c]
    +     Ensure that $DISPLAY contains only valid characters before using it to
    +     extract xauth data so that it can't be used to play local shell
    +     metacharacter games.  Report from r00t_ati at ihteam.net, ok markus.
    +   - markus@cvs.openbsd.org 2012/01/25 19:26:43
    +     [packet.c]
    +     do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying;
    +     ok dtucker@, djm@
    +   - markus@cvs.openbsd.org 2012/01/25 19:36:31
    +     [authfile.c]
    +     memleak in key_load_file(); from Jan Klemkow
    +   - markus@cvs.openbsd.org 2012/01/25 19:40:09
    +     [packet.c packet.h]
    +     packet_read_poll() is not used anymore.
    +   - markus@cvs.openbsd.org 2012/02/09 20:00:18
    +     [version.h]
    +     move from 6.0-beta to 6.0
     
    -20100128
    - - (djm) OpenBSD CVS Sync
    -   - djm@cvs.openbsd.org 2010/01/26 02:15:20
    +20120206
    + - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms
    +   that don't support ECC. Patch from Phil Oleson
    +
    +20111219
    + - OpenBSD CVS Sync
    +   - djm@cvs.openbsd.org 2011/12/02 00:41:56
          [mux.c]
    -     -Wuninitialized and remove a // comment; from portable
    -     (Id sync only)
    -   - djm@cvs.openbsd.org 2010/01/27 13:26:17
    +     fix bz#1948: ssh -f doesn't fork for multiplexed connection.
    +     ok dtucker@
    +   - djm@cvs.openbsd.org 2011/12/02 00:43:57
    +     [mac.c]
    +     fix bz#1934: newer OpenSSL versions will require HMAC_CTX_Init before
    +     HMAC_init (this change in policy seems insane to me)
    +     ok dtucker@
    +   - djm@cvs.openbsd.org 2011/12/04 23:16:12
          [mux.c]
    -     fix bug introduced in mux rewrite:
    -     
    -     In a mux master, when a socket to a mux slave closes before its server
    -     session (as may occur when the slave has been signalled), gracefully
    -     close the server session rather than deleting its channel immediately.
    -     A server may have more messages on that channel to send (e.g. an exit
    -     message) that will fatal() the client if they are sent to a channel that
    -     has been prematurely deleted.
    -     
    -     spotted by imorgan AT nas.nasa.gov
    -   - djm@cvs.openbsd.org 2010/01/27 19:21:39
    -     [sftp.c]
    -     add missing "p" flag to getopt optstring;
    -     bz#1704 from imorgan AT nas.nasa.gov
    +     revert:
    +     > revision 1.32
    +     > date: 2011/12/02 00:41:56;  author: djm;  state: Exp;  lines: +4 -1
    +     > fix bz#1948: ssh -f doesn't fork for multiplexed connection.
    +     > ok dtucker@
    +     it interacts badly with ControlPersist
    +   - djm@cvs.openbsd.org 2011/12/07 05:44:38
    +     [auth2.c dh.c packet.c roaming.h roaming_client.c roaming_common.c]
    +     fix some harmless and/or unreachable int overflows;
    +     reported Xi Wang, ok markus@
     
    -20100126
    - - (djm) OpenBSD CVS Sync
    -   - tedu@cvs.openbsd.org 2010/01/17 21:49:09
    -     [ssh-agent.1]
    -     Correct and clarify ssh-add's password asking behavior.
    -     Improved text dtucker and ok jmc
    -   - dtucker@cvs.openbsd.org 2010/01/18 01:50:27
    -     [roaming_client.c]
    -     s/long long unsigned/unsigned long long/, from tim via portable
    -     (Id sync only, change already in portable)
    -   - djm@cvs.openbsd.org 2010/01/26 01:28:35
    -     [channels.c channels.h clientloop.c clientloop.h mux.c nchan.c ssh.c]
    -     rewrite ssh(1) multiplexing code to a more sensible protocol.
    -     
    -     The new multiplexing code uses channels for the listener and
    -     accepted control sockets to make the mux master non-blocking, so
    -     no stalls when processing messages from a slave.
    -     
    -     avoid use of fatal() in mux master protocol parsing so an errant slave
    -     process cannot take down a running master.
    -     
    -     implement requesting of port-forwards over multiplexed sessions. Any
    -     port forwards requested by the slave are added to those the master has
    -     established.
    -     
    -     add support for stdio forwarding ("ssh -W host:port ...") in mux slaves.
    -     
    -     document master/slave mux protocol so that other tools can use it to
    -     control a running ssh(1). Note: there are no guarantees that this
    -     protocol won't be incompatibly changed (though it is versioned).
    -     
    -     feedback Salvador Fandino, dtucker@
    -     channel changes ok markus@
    -
    -20100122
    - - (tim) [configure.ac] Due to constraints in Windows Sockets in terms of
    -   socket inheritance, reduce the default SO_RCVBUF/SO_SNDBUF buffer size
    -   in Cygwin to 65535. Patch from Corinna Vinschen.
    -
    -20100117
    - - (tim) [configure.ac] OpenServer 5 needs BROKEN_GETADDRINFO too.
    - - (tim) [configure.ac] On SVR5 systems, use the C99-conforming functions
    -   snprintf() and vsnprintf() named _xsnprintf() and _xvsnprintf().
    -
    -20100116
    - - (dtucker) [openbsd-compat/pwcache.c] Pull in includes.h and thus defines.h
    -   so we correctly detect whether or not we have a native user_from_uid.
    - - (dtucker) [openbsd-compat/openbsd-compat.h] Prototypes for user_from_uid
    -   and group_from_gid.
    - - (dtucker) [openbsd-compat/openbsd-compat.h] Fix prototypes, spotted by
    -   Tim.
    - - (dtucker) OpenBSD CVS Sync
    -   - markus@cvs.openbsd.org 2010/01/15 09:24:23
    -     [sftp-common.c]
    -     unused
    - - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
    -   variable warnings.
    - - (dtucker) [openbsd-compat/openbsd-compat.h] Typo.
    - - (tim) [regress/portnum.sh] Shell portability fix.
    - - (tim) [configure.ac] Define BROKEN_GETADDRINFO on SVR5 systems. The native
    -   getaddrinfo() is too old and limited for addr_pton() in addrmatch.c.
    - - (tim) [roaming_client.c] Use of  is not really portable so we
    -   use "openbsd-compat/sys-queue.h". s/long long unsigned/unsigned long long/
    -   to keep USL compilers happy.
    -
    -20100115
    - - (dtucker) OpenBSD CVS Sync
    -   - jmc@cvs.openbsd.org 2010/01/13 12:48:34
    -     [sftp.1 sftp.c]
    -     sftp.1: put ls -h in the right place
    -     sftp.c: as above, plus add -p to get/put, and shorten their arg names
    -     to keep the help usage nicely aligned
    -     ok djm
    -   - djm@cvs.openbsd.org 2010/01/13 23:47:26
    -     [auth.c]
    -     when using ChrootDirectory, make sure we test for the existence of the
    -     user's shell inside the chroot; bz #1679, patch from alex AT rtfs.hu;
    -     ok dtucker
    -   - dtucker@cvs.openbsd.org 2010/01/14 23:41:49
    -     [sftp-common.c]
    -     use user_from{uid,gid} to lookup up ids since it keeps a small cache.
    -     ok djm
    -   - guenther@cvs.openbsd.org 2010/01/15 00:05:22
    -     [sftp.c]
    -     Reset SIGTERM to SIG_DFL before executing ssh, so that even if sftp
    -     inherited SIGTERM as ignored it will still be able to kill the ssh it
    -     starts.
    -     ok dtucker@
    - - (dtucker) [openbsd-compat/pwcache.c] Pull in pwcache.c from OpenBSD (no
    -   changes yet but there will be some to come).
    - - (dtucker) [configure.ac openbsd-compat/{Makefile.in,pwcache.c} Portability
    -   for pwcache.  Also, added caching of negative hits.
    -
    -20100114
    - - (djm) [platform.h] Add missing prototype for
    -   platform_krb5_get_principal_name
    -
    -20100113
    - - (dtucker) [monitor_fdpass.c] Wrap poll.h include in ifdefs.
    - - (dtucker) [openbsd-compat/readpassphrase.c] Resync against OpenBSD's r1.18:
    -   missing restore of SIGTTOU and some whitespace.
    - - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.21.
    - - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.22.
    -   Fixes bz #1590, where sometimes you could not interrupt a connection while
    -   ssh was prompting for a passphrase or password.
    - - (dtucker) OpenBSD CVS Sync
    -   - dtucker@cvs.openbsd.org 2010/01/13 00:19:04
    -     [sshconnect.c auth.c]
    -     Fix a couple of typos/mispellings in comments
    -   - dtucker@cvs.openbsd.org 2010/01/13 01:10:56
    -     [key.c]
    -     Ignore and log any Protocol 1 keys where the claimed size is not equal to
    -     the actual size.  Noted by Derek Martin, ok djm@
    -   - dtucker@cvs.openbsd.org 2010/01/13 01:20:20
    -     [canohost.c ssh-keysign.c sshconnect2.c]
    -     Make HostBased authentication work with a ProxyCommand.  bz #1569, patch
    -     from imorgan at nas nasa gov, ok djm@
    -   - djm@cvs.openbsd.org 2010/01/13 01:40:16
    -     [sftp.c sftp-server.c sftp.1 sftp-common.c sftp-common.h]
    -     support '-h' (human-readable units) for sftp's ls command, just like
    -     ls(1); ok dtucker@
    -   - djm@cvs.openbsd.org 2010/01/13 03:48:13
    -     [servconf.c servconf.h sshd.c]
    -     avoid run-time failures when specifying hostkeys via a relative
    -     path by prepending the cwd in these cases; bz#1290; ok dtucker@
    -   - djm@cvs.openbsd.org 2010/01/13 04:10:50
    +20111125
    + - OpenBSD CVS Sync
    +   - oga@cvs.openbsd.org 2011/11/16 12:24:28
          [sftp.c]
    -     don't append a space after inserting a completion of a directory (i.e.
    -     a path ending in '/') for a slightly better user experience; ok dtucker@
    - - (dtucker) [sftp-common.c] Wrap include of util.h in an ifdef.
    - - (tim) [defines.h] openbsd-compat/readpassphrase.c now needs _NSIG. 
    -   feedback and ok dtucker@
    +     Don't leak list in complete_cmd_parse if there are no commands found.
    +     Discovered when I was ``borrowing'' this code for something else.
    +     ok djm@
     
    -20100112
    - - (dtucker) OpenBSD CVS Sync
    -   - dtucker@cvs.openbsd.org 2010/01/11 01:39:46
    -     [ssh_config channels.c ssh.1 channels.h ssh.c]
    -     Add a 'netcat mode' (ssh -W).  This connects stdio on the client to a
    -     single port forward on the server.  This allows, for example, using ssh as
    -     a ProxyCommand to route connections via intermediate servers.
    -     bz #1618, man page help from jmc@, ok markus@
    -   - dtucker@cvs.openbsd.org 2010/01/11 04:46:45
    -     [authfile.c sshconnect2.c]
    -     Do not prompt for a passphrase if we fail to open a keyfile, and log the
    -     reason the open failed to debug.
    -     bz #1693, found by tj AT castaglia org, ok djm@
    -   - djm@cvs.openbsd.org 2010/01/11 10:51:07
    -     [ssh-keygen.c]
    -     when converting keys, truncate key comments at 72 chars as per RFC4716;
    -     bz#1630 reported by tj AT castaglia.org; ok markus@
    -   - dtucker@cvs.openbsd.org 2010/01/12 00:16:47
    -     [authfile.c]
    -     Fix bug introduced in r1.78 (incorrect brace location) that broke key auth.
    -     Patch from joachim joachimschipper nl.
    -   - djm@cvs.openbsd.org 2010/01/12 00:58:25
    -     [monitor_fdpass.c]
    -     avoid spinning when fd passing on nonblocking sockets by calling poll()
    -     in the EINTR/EAGAIN path, much like we do in atomicio; ok dtucker@
    -   - djm@cvs.openbsd.org 2010/01/12 00:59:29
    -     [roaming_common.c]
    -     delete with extreme prejudice a debug() that fired with every keypress;
    -     ok dtucker deraadt
    -   - dtucker@cvs.openbsd.org 2010/01/12 01:31:05
    -     [session.c]
    -     Do not allow logins if /etc/nologin exists but is not readable by the user
    -     logging in.  Noted by Jan.Pechanec at Sun, ok djm@ deraadt@
    -   - djm@cvs.openbsd.org 2010/01/12 01:36:08
    -     [buffer.h bufaux.c]
    -     add a buffer_get_string_ptr_ret() that does the same as
    -     buffer_get_string_ptr() but does not fatal() on error; ok dtucker@
    -   - dtucker@cvs.openbsd.org 2010/01/12 08:33:17
    -     [session.c]
    -     Add explicit stat so we reliably detect nologin with bad perms.
    -     ok djm markus
    +20111121
    + - (dtucker) [configure.ac] Set _FORTIFY_SOURCE.  ok djm@
     
    -20100110
    - - (dtucker) [configure.ac misc.c readconf.c servconf.c ssh-keyscan.c]
    -   Remove hacks add for RoutingDomain in preparation for its removal.
    +20111104
      - (dtucker) OpenBSD CVS Sync
    -   - dtucker@cvs.openbsd.org 2010/01/09 23:04:13
    -     [channels.c ssh.1 servconf.c sshd_config.5 sshd.c channels.h servconf.h
    -     ssh-keyscan.1 ssh-keyscan.c readconf.c sshconnect.c misc.c ssh.c
    -     readconf.h scp.1 sftp.1 ssh_config.5 misc.h]
    -     Remove RoutingDomain from ssh since it's now not needed.  It can be
    -     replaced with "route exec" or "nc -V" as a proxycommand.  "route exec"
    -     also ensures that trafic such as DNS lookups stays withing the specified
    -     routingdomain.  For example (from reyk):
    -     # route -T 2 exec /usr/sbin/sshd
    -     or inherited from the parent process
    -     $ route -T 2 exec sh
    -     $ ssh 10.1.2.3
    -     ok deraadt@ markus@ stevesk@ reyk@
    -   - dtucker@cvs.openbsd.org 2010/01/10 03:51:17
    -     [servconf.c]
    -     Add ChrootDirectory to sshd.c test-mode output
    -   - dtucker@cvs.openbsd.org 2010/01/10 07:15:56
    -     [auth.c]
    -     Output a debug if we can't open an existing keyfile.  bz#1694, ok djm@
    +   - djm@cvs.openbsd.org 2011/10/18 05:15:28
    +     [ssh.c]
    +     ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@
    +   - djm@cvs.openbsd.org 2011/10/18 23:37:42
    +     [ssh-add.c]
    +     add -k to usage(); reminded by jmc@
    +   - djm@cvs.openbsd.org 2011/10/19 00:06:10
    +     [moduli.c]
    +     s/tmpfile/tmp/ to make this -Wshadow clean
    +   - djm@cvs.openbsd.org 2011/10/19 10:39:48
    +     [umac.c]
    +     typo in comment; patch from Michael W. Bombardieri
    +   - djm@cvs.openbsd.org 2011/10/24 02:10:46
    +     [ssh.c]
    +     bz#1943: unbreak stdio forwarding when ControlPersist is in user - ssh
    +     was incorrectly requesting the forward in both the control master and
    +     slave. skip requesting it in the master to fix. ok markus@
    +   - djm@cvs.openbsd.org 2011/10/24 02:13:13
    +     [session.c]
    +     bz#1859: send tty break to pty master instead of (probably already
    +     closed) slave side; "looks good" markus@
    +   - dtucker@cvs.openbsd.org 011/11/04 00:09:39
    +     [moduli]
    +     regenerated moduli file; ok deraadt
    + - (dtucker) [INSTALL LICENCE configure.ac openbsd-compat/Makefile.in
    +   openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/getrrsetbyname.c]
    +   bz 1320: Add optional support for LDNS, a BSD licensed DNS resolver library
    +   which supports DNSSEC.  Patch from Simon Vallet (svallet at genoscope cns fr)
    +   with some rework from myself and djm.  ok djm.
    +
    +20111025
    + - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file
    +   fails.  Patch from Corinna Vinschen.
    +
    +20111018
    + - (djm) OpenBSD CVS Sync
    +   - djm@cvs.openbsd.org 2011/10/04 14:17:32
    +     [sftp-glob.c]
    +     silence error spam for "ls */foo" in directory with files; bz#1683
    +   - dtucker@cvs.openbsd.org 2011/10/16 11:02:46
    +     [moduli.c ssh-keygen.1 ssh-keygen.c]
    +     Add optional checkpoints for moduli screening.  feedback & ok deraadt
    +   - jmc@cvs.openbsd.org 2011/10/16 15:02:41
    +     [ssh-keygen.c]
    +     put -K in the right place (usage());
    +   - stsp@cvs.openbsd.org 2011/10/16 15:51:39
    +     [moduli.c]
    +     add missing includes to unbreak tree; fix from rpointel
    +   - djm@cvs.openbsd.org 2011/10/18 04:58:26
    +     [auth-options.c key.c]
    +     remove explict search for \0 in packet strings, this job is now done
    +     implicitly by buffer_get_cstring; ok markus
    +   - djm@cvs.openbsd.org 2011/10/18 05:00:48
    +     [ssh-add.1 ssh-add.c]
    +     new "ssh-add -k" option to load plain keys (skipping certificates);
    +     "looks ok" markus@
     
    -20100109
    - - (dtucker) Wrap use of IPPROTO_IPV6 in an ifdef for platforms that don't
    -   have it.
    - - (dtucker) [defines.h] define PRIu64 for platforms that don't have it.
    - - (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef.
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 02:09:06 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id DC2DEC54;
     Fri,  1 Mar 2013 02:09:06 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id CE63AF26;
     Fri,  1 Mar 2013 02:09:06 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21296Xt042516;
     Fri, 1 Mar 2013 02:09:06 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21296YZ042515;
     Fri, 1 Mar 2013 02:09:06 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010209.r21296YZ042515@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 02:09:06 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247522 - stable/8/share/man/man5
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 02:09:06 -0000
    
    Author: des
    Date: Fri Mar  1 02:09:06 2013
    New Revision: 247522
    URL: http://svnweb.freebsd.org/changeset/base/247522
    
    Log:
      Regenerate
    
    Modified:
      stable/8/share/man/man5/src.conf.5
    
    Modified: stable/8/share/man/man5/src.conf.5
    ==============================================================================
    --- stable/8/share/man/man5/src.conf.5	Fri Mar  1 02:06:04 2013	(r247521)
    +++ stable/8/share/man/man5/src.conf.5	Fri Mar  1 02:09:06 2013	(r247522)
    @@ -1,7 +1,7 @@
     .\" DO NOT EDIT-- this file is automatically generated.
    -.\" from FreeBSD: stable/8/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm
    +.\" from FreeBSD: stable/8/tools/build/options/makeman 236431 2012-06-02 02:26:49Z gjb
     .\" $FreeBSD$
    -.Dd January  4, 2012
    +.Dd March  1, 2013
     .Dt SRC.CONF 5
     .Os
     .Sh NAME
    @@ -204,6 +204,14 @@ and
     .\" from FreeBSD: stable/8/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb
     Set to enable the http statistics interface for named.
     This requires ports/textproc/libxml2 to be installed in /usr/local.
    +.It Va WITHOUT_BINUTILS
    +.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BINUTILS 236342 2012-05-30 22:31:45Z obrien
    +Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib,
    +ld, nm, objcopy, objdump, readelf, size and strip)
    +.Bf -symbolic
    +The option does not generally work for build targets, unless some alternative
    +toolchain is enabled.
    +.Ef
     .It Va WITHOUT_BLUETOOTH
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru
     Set to not build Bluetooth related kernel modules, programs and libraries.
    @@ -316,6 +324,13 @@ Set to not build
     .It Va WITHOUT_GAMES
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru
     Set to not build games.
    +.It Va WITHOUT_GCC
    +.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GCC 236342 2012-05-30 22:31:45Z obrien
    +Set to not install gcc and g++.
    +.Bf -symbolic
    +The option does not generally work for build targets, unless some alternative
    +toolchain is enabled.
    +.Ef
     .It Va WITHOUT_GCOV
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru
     Set to not build the
    @@ -652,6 +667,16 @@ Set to not build Objective C support.
     .It Va WITHOUT_OPENSSH
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru
     Set to not build OpenSSH.
    +.It Va WITH_OPENSSH_NONE_CIPHER
    +.\" $FreeBSD$
    +Set to include the "None" cipher support in OpenSSH and its libraries.
    +Additional adjustments may need to be done to system configuration
    +files, such as
    +.Xr sshd_config 5 ,
    +to enable this cipher.
    +Please see
    +.Pa /usr/src/crypto/openssh/README.hpn
    +for full details.
     .It Va WITHOUT_OPENSSL
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru
     Set to not build OpenSSL.
    @@ -811,6 +836,10 @@ When set, it also enforces the following
     .Pp
     .Bl -item -compact
     .It
    +.Va WITHOUT_BINUTILS
    +.It
    +.Va WITHOUT_GCC
    +.It
     .Va WITHOUT_GDB
     .El
     .It Va WITHOUT_USB
    @@ -843,11 +872,11 @@ protocols (usable only via 802.1X).
     .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZFS 168409 2007-04-06 02:13:30Z pjd
     Set to not build ZFS file system.
     .It Va WITHOUT_ZONEINFO
    -.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko
    +.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_ZONEINFO 235588 2012-05-18 02:00:41Z gjb
     Set to not build the timezone database.
     .El
     .Sh FILES
    -.Bl -tag -compact
    +.Bl -tag -compact -width Pa
     .It Pa /etc/src.conf
     .It Pa /usr/share/mk/bsd.own.mk
     .El
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 03:04:58 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id D6AA866E;
     Fri,  1 Mar 2013 03:04:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id C460E212;
     Fri,  1 Mar 2013 03:04:58 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r2134wix061257;
     Fri, 1 Mar 2013 03:04:58 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r2134wBl061250;
     Fri, 1 Mar 2013 03:04:58 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303010304.r2134wBl061250@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 03:04:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247525 - in stable/9/sys: netinet sys
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 03:04:58 -0000
    
    Author: jhb
    Date: Fri Mar  1 03:04:57 2013
    New Revision: 247525
    URL: http://svnweb.freebsd.org/changeset/base/247525
    
    Log:
      MFC 245823,245824,246210
      - Use decimal values for UDP, TCP, and UNIX domain socket options rather
        than hex to avoid implying that these constants should be treated as bit
        masks.
      - Add placeholder constants to reserve a portion of the socket option
        name space for use by downstream vendors to add custom options.
    
    Modified:
      stable/9/sys/netinet/tcp.h
      stable/9/sys/netinet/udp.h
      stable/9/sys/sys/socket.h
      stable/9/sys/sys/un.h
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/netinet/tcp.h
    ==============================================================================
    --- stable/9/sys/netinet/tcp.h	Fri Mar  1 02:59:56 2013	(r247524)
    +++ stable/9/sys/netinet/tcp.h	Fri Mar  1 03:04:57 2013	(r247525)
    @@ -149,20 +149,25 @@ struct tcphdr {
     #endif /* __BSD_VISIBLE */
     
     /*
    - * User-settable options (used with setsockopt).
    + * User-settable options (used with setsockopt).  These are discrete
    + * values and are not masked together.  Some values appear to be
    + * bitmasks for historical reasons.
      */
    -#define	TCP_NODELAY	0x01	/* don't delay send to coalesce packets */
    +#define	TCP_NODELAY	1	/* don't delay send to coalesce packets */
     #if __BSD_VISIBLE
    -#define	TCP_MAXSEG	0x02	/* set maximum segment size */
    -#define TCP_NOPUSH	0x04	/* don't push last block of write */
    -#define TCP_NOOPT	0x08	/* don't use TCP options */
    -#define TCP_MD5SIG	0x10	/* use MD5 digests (RFC2385) */
    -#define	TCP_INFO	0x20	/* retrieve tcp_info structure */
    -#define	TCP_CONGESTION	0x40	/* get/set congestion control algorithm */
    -#define	TCP_KEEPINIT	0x80	/* N, time to establish connection */
    -#define	TCP_KEEPIDLE	0x100	/* L,N,X start keeplives after this period */
    -#define	TCP_KEEPINTVL	0x200	/* L,N interval between keepalives */
    -#define	TCP_KEEPCNT	0x400	/* L,N number of keepalives before close */
    +#define	TCP_MAXSEG	2	/* set maximum segment size */
    +#define TCP_NOPUSH	4	/* don't push last block of write */
    +#define TCP_NOOPT	8	/* don't use TCP options */
    +#define TCP_MD5SIG	16	/* use MD5 digests (RFC2385) */
    +#define	TCP_INFO	32	/* retrieve tcp_info structure */
    +#define	TCP_CONGESTION	64	/* get/set congestion control algorithm */
    +#define	TCP_KEEPINIT	128	/* N, time to establish connection */
    +#define	TCP_KEEPIDLE	256	/* L,N,X start keeplives after this period */
    +#define	TCP_KEEPINTVL	512	/* L,N interval between keepalives */
    +#define	TCP_KEEPCNT	1024	/* L,N number of keepalives before close */
    +
    +/* Start of reserved space for third-party user-settable options. */
    +#define	TCP_VENDOR	SO_VENDOR
     
     #define	TCP_CA_NAME_MAX	16	/* max congestion control name length */
     
    
    Modified: stable/9/sys/netinet/udp.h
    ==============================================================================
    --- stable/9/sys/netinet/udp.h	Fri Mar  1 02:59:56 2013	(r247524)
    +++ stable/9/sys/netinet/udp.h	Fri Mar  1 03:04:57 2013	(r247525)
    @@ -48,8 +48,10 @@ struct udphdr {
     /* 
      * User-settable options (used with setsockopt).
      */
    -#define	UDP_ENCAP			0x01
    +#define	UDP_ENCAP			1
     
    +/* Start of reserved space for third-party user-settable options. */
    +#define	UDP_VENDOR			SO_VENDOR
     
     /*
      * UDP Encapsulation of IPsec Packets options.
    
    Modified: stable/9/sys/sys/socket.h
    ==============================================================================
    --- stable/9/sys/sys/socket.h	Fri Mar  1 02:59:56 2013	(r247524)
    +++ stable/9/sys/sys/socket.h	Fri Mar  1 03:04:57 2013	(r247525)
    @@ -143,6 +143,15 @@ typedef	__uid_t		uid_t;
     #endif
     
     /*
    + * Space reserved for new socket options added by third-party vendors.
    + * This range applies to all socket option levels.  New socket options
    + * in FreeBSD should always use an option value less than SO_VENDOR.
    + */
    +#if __BSD_VISIBLE
    +#define	SO_VENDOR	0x80000000
    +#endif
    +
    +/*
      * Structure used for manipulating linger option.
      */
     struct linger {
    
    Modified: stable/9/sys/sys/un.h
    ==============================================================================
    --- stable/9/sys/sys/un.h	Fri Mar  1 02:59:56 2013	(r247524)
    +++ stable/9/sys/sys/un.h	Fri Mar  1 03:04:57 2013	(r247525)
    @@ -53,9 +53,12 @@ struct sockaddr_un {
     #if __BSD_VISIBLE
     
     /* Socket options. */
    -#define	LOCAL_PEERCRED		0x001	/* retrieve peer credentials */
    -#define	LOCAL_CREDS		0x002	/* pass credentials to receiver */
    -#define	LOCAL_CONNWAIT		0x004	/* connects block until accepted */
    +#define	LOCAL_PEERCRED		1	/* retrieve peer credentials */
    +#define	LOCAL_CREDS		2	/* pass credentials to receiver */
    +#define	LOCAL_CONNWAIT		4	/* connects block until accepted */
    +
    +/* Start of reserved space for third-party socket options. */
    +#define	LOCAL_VENDOR		SO_VENDOR
     
     #ifndef _KERNEL
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 03:05:09 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 60EC57BF;
     Fri,  1 Mar 2013 03:05:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 53B91213;
     Fri,  1 Mar 2013 03:05:09 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r213597Z061350;
     Fri, 1 Mar 2013 03:05:09 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21358Dm061345;
     Fri, 1 Mar 2013 03:05:08 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303010305.r21358Dm061345@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 03:05:08 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247526 - in stable/8/sys: netinet sys
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 03:05:09 -0000
    
    Author: jhb
    Date: Fri Mar  1 03:05:08 2013
    New Revision: 247526
    URL: http://svnweb.freebsd.org/changeset/base/247526
    
    Log:
      MFC 245823,245824,246210
      - Use decimal values for UDP, TCP, and UNIX domain socket options rather
        than hex to avoid implying that these constants should be treated as bit
        masks.
      - Add placeholder constants to reserve a portion of the socket option
        name space for use by downstream vendors to add custom options.
    
    Modified:
      stable/8/sys/netinet/tcp.h
      stable/8/sys/netinet/udp.h
      stable/8/sys/sys/socket.h
      stable/8/sys/sys/un.h
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/netinet/   (props changed)
      stable/8/sys/sys/   (props changed)
    
    Modified: stable/8/sys/netinet/tcp.h
    ==============================================================================
    --- stable/8/sys/netinet/tcp.h	Fri Mar  1 03:04:57 2013	(r247525)
    +++ stable/8/sys/netinet/tcp.h	Fri Mar  1 03:05:08 2013	(r247526)
    @@ -140,16 +140,21 @@ struct tcphdr {
     #endif /* __BSD_VISIBLE */
     
     /*
    - * User-settable options (used with setsockopt).
    + * User-settable options (used with setsockopt).  These are discrete
    + * values and are not masked together.  Some values appear to be
    + * bitmasks for historical reasons.
      */
    -#define	TCP_NODELAY	0x01	/* don't delay send to coalesce packets */
    +#define	TCP_NODELAY	1	/* don't delay send to coalesce packets */
     #if __BSD_VISIBLE
    -#define	TCP_MAXSEG	0x02	/* set maximum segment size */
    -#define TCP_NOPUSH	0x04	/* don't push last block of write */
    -#define TCP_NOOPT	0x08	/* don't use TCP options */
    -#define TCP_MD5SIG	0x10	/* use MD5 digests (RFC2385) */
    -#define	TCP_INFO	0x20	/* retrieve tcp_info structure */
    -#define	TCP_CONGESTION	0x40	/* get/set congestion control algorithm */
    +#define	TCP_MAXSEG	2	/* set maximum segment size */
    +#define TCP_NOPUSH	4	/* don't push last block of write */
    +#define TCP_NOOPT	8	/* don't use TCP options */
    +#define TCP_MD5SIG	16	/* use MD5 digests (RFC2385) */
    +#define	TCP_INFO	32	/* retrieve tcp_info structure */
    +#define	TCP_CONGESTION	64	/* get/set congestion control algorithm */
    +
    +/* Start of reserved space for third-party user-settable options. */
    +#define	TCP_VENDOR	SO_VENDOR
     
     #define	TCP_CA_NAME_MAX	16	/* max congestion control name length */
     
    
    Modified: stable/8/sys/netinet/udp.h
    ==============================================================================
    --- stable/8/sys/netinet/udp.h	Fri Mar  1 03:04:57 2013	(r247525)
    +++ stable/8/sys/netinet/udp.h	Fri Mar  1 03:05:08 2013	(r247526)
    @@ -48,8 +48,10 @@ struct udphdr {
     /* 
      * User-settable options (used with setsockopt).
      */
    -#define	UDP_ENCAP			0x01
    +#define	UDP_ENCAP			1
     
    +/* Start of reserved space for third-party user-settable options. */
    +#define	UDP_VENDOR			SO_VENDOR
     
     /*
      * UDP Encapsulation of IPsec Packets options.
    
    Modified: stable/8/sys/sys/socket.h
    ==============================================================================
    --- stable/8/sys/sys/socket.h	Fri Mar  1 03:04:57 2013	(r247525)
    +++ stable/8/sys/sys/socket.h	Fri Mar  1 03:05:08 2013	(r247526)
    @@ -144,6 +144,15 @@ typedef	__uid_t		uid_t;
     #endif
     
     /*
    + * Space reserved for new socket options added by third-party vendors.
    + * This range applies to all socket option levels.  New socket options
    + * in FreeBSD should always use an option value less than SO_VENDOR.
    + */
    +#if __BSD_VISIBLE
    +#define	SO_VENDOR	0x80000000
    +#endif
    +
    +/*
      * Structure used for manipulating linger option.
      */
     struct linger {
    
    Modified: stable/8/sys/sys/un.h
    ==============================================================================
    --- stable/8/sys/sys/un.h	Fri Mar  1 03:04:57 2013	(r247525)
    +++ stable/8/sys/sys/un.h	Fri Mar  1 03:05:08 2013	(r247526)
    @@ -53,9 +53,12 @@ struct sockaddr_un {
     #if __BSD_VISIBLE
     
     /* Socket options. */
    -#define	LOCAL_PEERCRED		0x001	/* retrieve peer credentials */
    -#define	LOCAL_CREDS		0x002	/* pass credentials to receiver */
    -#define	LOCAL_CONNWAIT		0x004	/* connects block until accepted */
    +#define	LOCAL_PEERCRED		1	/* retrieve peer credentials */
    +#define	LOCAL_CREDS		2	/* pass credentials to receiver */
    +#define	LOCAL_CONNWAIT		4	/* connects block until accepted */
    +
    +/* Start of reserved space for third-party socket options. */
    +#define	LOCAL_VENDOR		SO_VENDOR
     
     #ifndef _KERNEL
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 09:39:31 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 1857A40B;
     Fri,  1 Mar 2013 09:39:31 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id E2F2C255;
     Fri,  1 Mar 2013 09:39:30 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219dUQZ080668;
     Fri, 1 Mar 2013 09:39:30 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219dUKm080666;
     Fri, 1 Mar 2013 09:39:30 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010939.r219dUKm080666@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 09:39:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247537 - in stable/8: . contrib/bsnmp/snmpd contrib/xz
     gnu/usr.bin share/misc usr.bin/chpass usr.bin/su
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 09:39:31 -0000
    
    Author: des
    Date: Fri Mar  1 09:39:29 2013
    New Revision: 247537
    URL: http://svnweb.freebsd.org/changeset/base/247537
    
    Log:
      Fix a few instances of broken mergeinfo
    
    Modified:
    Directory Properties:
      stable/8/   (props changed)
      stable/8/COPYRIGHT   (props changed)
      stable/8/LOCKS   (props changed)
      stable/8/MAINTAINERS   (props changed)
      stable/8/Makefile   (props changed)
      stable/8/Makefile.inc1   (props changed)
      stable/8/README   (props changed)
      stable/8/bin/   (props changed)
      stable/8/bin/cat/   (props changed)
      stable/8/bin/chio/   (props changed)
      stable/8/bin/chmod/   (props changed)
      stable/8/bin/cp/   (props changed)
      stable/8/bin/date/   (props changed)
      stable/8/bin/df/   (props changed)
      stable/8/bin/echo/   (props changed)
      stable/8/bin/ed/   (props changed)
      stable/8/bin/expr/   (props changed)
      stable/8/bin/getfacl/   (props changed)
      stable/8/bin/kenv/   (props changed)
      stable/8/bin/kill/   (props changed)
      stable/8/bin/ln/   (props changed)
      stable/8/bin/ls/   (props changed)
      stable/8/bin/mv/   (props changed)
      stable/8/bin/pax/   (props changed)
      stable/8/bin/pkill/   (props changed)
      stable/8/bin/ps/   (props changed)
      stable/8/bin/pwait/   (props changed)
      stable/8/bin/rm/   (props changed)
      stable/8/bin/setfacl/   (props changed)
      stable/8/bin/sleep/   (props changed)
      stable/8/bin/stty/   (props changed)
      stable/8/bin/test/   (props changed)
      stable/8/bin/uuidgen/   (props changed)
      stable/8/cddl/   (props changed)
      stable/8/cddl/compat/opensolaris/   (props changed)
      stable/8/cddl/contrib/dtracetoolkit/   (props changed)
      stable/8/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/   (props changed)
      stable/8/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
      stable/8/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
      stable/8/cddl/lib/   (props changed)
      stable/8/cddl/lib/libzpool/   (props changed)
      stable/8/cddl/sbin/   (props changed)
      stable/8/cddl/usr.bin/   (props changed)
      stable/8/cddl/usr.sbin/   (props changed)
      stable/8/contrib/bsnmp/   (props changed)
      stable/8/contrib/bsnmp/snmpd/bsnmpd.1   (props changed)
      stable/8/contrib/expat/   (props changed)
      stable/8/contrib/gcc/   (props changed)
      stable/8/contrib/groff/   (props changed)
      stable/8/contrib/one-true-awk/   (props changed)
      stable/8/contrib/pf/   (props changed)
      stable/8/contrib/tcp_wrappers/   (props changed)
      stable/8/contrib/telnet/   (props changed)
      stable/8/contrib/xz/   (props changed)
      stable/8/contrib/xz/AUTHORS   (props changed)
      stable/8/contrib/xz/ChangeLog   (props changed)
      stable/8/contrib/xz/README   (props changed)
      stable/8/contrib/xz/THANKS   (props changed)
      stable/8/contrib/xz/po/   (props changed)
      stable/8/contrib/xz/src/   (props changed)
      stable/8/crypto/   (props changed)
      stable/8/crypto/heimdal/   (props changed)
      stable/8/games/   (props changed)
      stable/8/games/bcd/   (props changed)
      stable/8/games/caesar/   (props changed)
      stable/8/games/factor/   (props changed)
      stable/8/games/fortune/   (props changed)
      stable/8/games/grdc/   (props changed)
      stable/8/games/pom/   (props changed)
      stable/8/games/random/   (props changed)
      stable/8/gnu/   (props changed)
      stable/8/gnu/lib/csu/   (props changed)
      stable/8/gnu/lib/libgcc/   (props changed)
      stable/8/gnu/lib/libstdc++/   (props changed)
      stable/8/gnu/usr.bin/   (props changed)
      stable/8/gnu/usr.bin/Makefile   (props changed)
      stable/8/gnu/usr.bin/cc/include/   (props changed)
      stable/8/gnu/usr.bin/dialog/   (props changed)
      stable/8/gnu/usr.bin/gdb/   (props changed)
      stable/8/gnu/usr.bin/gdb/arch/sparc64/   (props changed)
      stable/8/gnu/usr.bin/gdb/kgdb/   (props changed)
      stable/8/gnu/usr.bin/gperf/   (props changed)
      stable/8/gnu/usr.bin/groff/   (props changed)
      stable/8/gnu/usr.bin/send-pr/   (props changed)
      stable/8/kerberos5/   (props changed)
      stable/8/kerberos5/usr.bin/kdestroy/   (props changed)
      stable/8/kerberos5/usr.bin/kpasswd/   (props changed)
      stable/8/lib/csu/   (props changed)
      stable/8/lib/libbluetooth/   (props changed)
      stable/8/lib/libc_r/   (props changed)
      stable/8/lib/libelf/   (props changed)
      stable/8/lib/libexpat/   (props changed)
      stable/8/lib/libfetch/   (props changed)
      stable/8/lib/libgpib/   (props changed)
      stable/8/lib/libgssapi/   (props changed)
      stable/8/lib/libjail/   (props changed)
      stable/8/lib/libkse/   (props changed)
      stable/8/lib/liblzma/   (props changed)
      stable/8/lib/libpam/   (props changed)
      stable/8/lib/libpmc/   (props changed)
      stable/8/lib/libradius/   (props changed)
      stable/8/lib/librpcsec_gss/   (props changed)
      stable/8/lib/libsm/   (props changed)
      stable/8/lib/libstand/   (props changed)
      stable/8/lib/libtacplus/   (props changed)
      stable/8/lib/libufs/   (props changed)
      stable/8/lib/libusbhid/   (props changed)
      stable/8/lib/libz/   (props changed)
      stable/8/lib/msun/   (props changed)
      stable/8/libexec/   (props changed)
      stable/8/libexec/atrun/   (props changed)
      stable/8/libexec/comsat/   (props changed)
      stable/8/libexec/ftpd/   (props changed)
      stable/8/libexec/rshd/   (props changed)
      stable/8/libexec/save-entropy/   (props changed)
      stable/8/libexec/tftpd/   (props changed)
      stable/8/libexec/ypxfr/   (props changed)
      stable/8/rescue/   (props changed)
      stable/8/rescue/rescue/   (props changed)
      stable/8/secure/   (props changed)
      stable/8/secure/lib/libcrypto/   (props changed)
      stable/8/secure/lib/libssh/   (props changed)
      stable/8/secure/lib/libssl/   (props changed)
      stable/8/secure/usr.bin/bdes/   (props changed)
      stable/8/secure/usr.bin/openssl/   (props changed)
      stable/8/secure/usr.bin/ssh/   (props changed)
      stable/8/share/   (props changed)
      stable/8/share/dict/   (props changed)
      stable/8/share/doc/   (props changed)
      stable/8/share/doc/bind9/   (props changed)
      stable/8/share/doc/papers/devfs/   (props changed)
      stable/8/share/doc/papers/jail/   (props changed)
      stable/8/share/doc/smm/01.setup/   (props changed)
      stable/8/share/examples/   (props changed)
      stable/8/share/examples/csh/   (props changed)
      stable/8/share/examples/cvsup/   (props changed)
      stable/8/share/man/   (props changed)
      stable/8/share/man/man1/   (props changed)
      stable/8/share/man/man3/   (props changed)
      stable/8/share/man/man8/   (props changed)
      stable/8/share/misc/   (props changed)
      stable/8/share/misc/bsd-family-tree   (props changed)
      stable/8/share/mk/   (props changed)
      stable/8/share/skel/   (props changed)
      stable/8/share/syscons/   (props changed)
      stable/8/share/syscons/keymaps/   (props changed)
      stable/8/share/termcap/   (props changed)
      stable/8/tools/   (props changed)
      stable/8/tools/build/mk/   (props changed)
      stable/8/tools/build/options/   (props changed)
      stable/8/tools/debugscripts/   (props changed)
      stable/8/tools/diag/   (props changed)
      stable/8/tools/kerneldoc/   (props changed)
      stable/8/tools/kerneldoc/subsys/   (props changed)
      stable/8/tools/regression/acct/   (props changed)
      stable/8/tools/regression/acltools/   (props changed)
      stable/8/tools/regression/aio/aiotest/   (props changed)
      stable/8/tools/regression/bin/   (props changed)
      stable/8/tools/regression/bin/date/   (props changed)
      stable/8/tools/regression/bin/test/   (props changed)
      stable/8/tools/regression/doat/   (props changed)
      stable/8/tools/regression/fifo/   (props changed)
      stable/8/tools/regression/geom/   (props changed)
      stable/8/tools/regression/lib/libc/   (props changed)
      stable/8/tools/regression/mqueue/mqtest1/   (props changed)
      stable/8/tools/regression/mqueue/mqtest2/   (props changed)
      stable/8/tools/regression/mqueue/mqtest3/   (props changed)
      stable/8/tools/regression/mqueue/mqtest4/   (props changed)
      stable/8/tools/regression/mqueue/mqtest5/   (props changed)
      stable/8/tools/regression/netinet/   (props changed)
      stable/8/tools/regression/pipe/   (props changed)
      stable/8/tools/regression/posixsem/   (props changed)
      stable/8/tools/regression/sockets/   (props changed)
      stable/8/tools/regression/sockets/unix_gc/   (props changed)
      stable/8/tools/regression/usr.bin/   (props changed)
      stable/8/tools/regression/usr.bin/pkill/   (props changed)
      stable/8/tools/regression/usr.bin/sed/   (props changed)
      stable/8/tools/regression/usr.bin/tr/   (props changed)
      stable/8/tools/test/   (props changed)
      stable/8/tools/test/malloc/   (props changed)
      stable/8/tools/tools/   (props changed)
      stable/8/tools/tools/aac/   (props changed)
      stable/8/tools/tools/ath/   (props changed)
      stable/8/tools/tools/cfi/   (props changed)
      stable/8/tools/tools/ether_reflect/   (props changed)
      stable/8/tools/tools/iwi/   (props changed)
      stable/8/tools/tools/mctest/   (props changed)
      stable/8/tools/tools/nanobsd/   (props changed)
      stable/8/tools/tools/netrate/   (props changed)
      stable/8/tools/tools/netrate/netblast/   (props changed)
      stable/8/tools/tools/netrate/netsend/   (props changed)
      stable/8/tools/tools/netrate/tcpp/   (props changed)
      stable/8/tools/tools/sysdoc/   (props changed)
      stable/8/tools/tools/umastat/   (props changed)
      stable/8/usr.bin/   (props changed)
      stable/8/usr.bin/apply/   (props changed)
      stable/8/usr.bin/ar/   (props changed)
      stable/8/usr.bin/awk/   (props changed)
      stable/8/usr.bin/biff/   (props changed)
      stable/8/usr.bin/brandelf/   (props changed)
      stable/8/usr.bin/bsdiff/   (props changed)
      stable/8/usr.bin/c89/   (props changed)
      stable/8/usr.bin/c99/   (props changed)
      stable/8/usr.bin/catman/   (props changed)
      stable/8/usr.bin/checknr/   (props changed)
      stable/8/usr.bin/chpass/   (props changed)
      stable/8/usr.bin/chpass/Makefile   (props changed)
      stable/8/usr.bin/column/   (props changed)
      stable/8/usr.bin/comm/   (props changed)
      stable/8/usr.bin/compress/   (props changed)
      stable/8/usr.bin/cpio/   (props changed)
      stable/8/usr.bin/cpuset/   (props changed)
      stable/8/usr.bin/cut/   (props changed)
      stable/8/usr.bin/du/   (props changed)
      stable/8/usr.bin/ee/   (props changed)
      stable/8/usr.bin/enigma/   (props changed)
      stable/8/usr.bin/find/   (props changed)
      stable/8/usr.bin/finger/   (props changed)
      stable/8/usr.bin/fold/   (props changed)
      stable/8/usr.bin/gcore/   (props changed)
      stable/8/usr.bin/getopt/   (props changed)
      stable/8/usr.bin/gprof/   (props changed)
      stable/8/usr.bin/gzip/   (props changed)
      stable/8/usr.bin/hexdump/   (props changed)
      stable/8/usr.bin/indent/   (props changed)
      stable/8/usr.bin/ipcrm/   (props changed)
      stable/8/usr.bin/ipcs/   (props changed)
      stable/8/usr.bin/join/   (props changed)
      stable/8/usr.bin/jot/   (props changed)
      stable/8/usr.bin/kdump/   (props changed)
      stable/8/usr.bin/killall/   (props changed)
      stable/8/usr.bin/ktrace/   (props changed)
      stable/8/usr.bin/lastcomm/   (props changed)
      stable/8/usr.bin/ldd/   (props changed)
      stable/8/usr.bin/less/   (props changed)
      stable/8/usr.bin/lex/   (props changed)
      stable/8/usr.bin/limits/   (props changed)
      stable/8/usr.bin/locale/   (props changed)
      stable/8/usr.bin/locate/   (props changed)
      stable/8/usr.bin/lock/   (props changed)
      stable/8/usr.bin/lockf/   (props changed)
      stable/8/usr.bin/logger/   (props changed)
      stable/8/usr.bin/m4/   (props changed)
      stable/8/usr.bin/mail/   (props changed)
      stable/8/usr.bin/make/   (props changed)
      stable/8/usr.bin/makewhatis/   (props changed)
      stable/8/usr.bin/minigzip/   (props changed)
      stable/8/usr.bin/mktemp/   (props changed)
      stable/8/usr.bin/msgs/   (props changed)
      stable/8/usr.bin/ncal/   (props changed)
      stable/8/usr.bin/ncplist/   (props changed)
      stable/8/usr.bin/ncplogin/   (props changed)
      stable/8/usr.bin/newgrp/   (props changed)
      stable/8/usr.bin/nfsstat/   (props changed)
      stable/8/usr.bin/nsupdate/   (props changed)
      stable/8/usr.bin/pathchk/   (props changed)
      stable/8/usr.bin/perror/   (props changed)
      stable/8/usr.bin/pr/   (props changed)
      stable/8/usr.bin/printf/   (props changed)
      stable/8/usr.bin/rlogin/   (props changed)
      stable/8/usr.bin/rpcgen/   (props changed)
      stable/8/usr.bin/rpcinfo/   (props changed)
      stable/8/usr.bin/rs/   (props changed)
      stable/8/usr.bin/ruptime/   (props changed)
      stable/8/usr.bin/script/   (props changed)
      stable/8/usr.bin/sed/   (props changed)
      stable/8/usr.bin/showmount/   (props changed)
      stable/8/usr.bin/sockstat/   (props changed)
      stable/8/usr.bin/split/   (props changed)
      stable/8/usr.bin/stat/   (props changed)
      stable/8/usr.bin/stdbuf/   (props changed)
      stable/8/usr.bin/su/   (props changed)
      stable/8/usr.bin/su/Makefile   (props changed)
      stable/8/usr.bin/su/su.1   (props changed)
      stable/8/usr.bin/su/su.c   (props changed)
      stable/8/usr.bin/systat/   (props changed)
      stable/8/usr.bin/tail/   (props changed)
      stable/8/usr.bin/tar/   (props changed)
      stable/8/usr.bin/tftp/   (props changed)
      stable/8/usr.bin/tip/   (props changed)
      stable/8/usr.bin/top/   (props changed)
      stable/8/usr.bin/touch/   (props changed)
      stable/8/usr.bin/tr/   (props changed)
      stable/8/usr.bin/truss/   (props changed)
      stable/8/usr.bin/uname/   (props changed)
      stable/8/usr.bin/unifdef/   (props changed)
      stable/8/usr.bin/uniq/   (props changed)
      stable/8/usr.bin/unzip/   (props changed)
      stable/8/usr.bin/usbhidaction/   (props changed)
      stable/8/usr.bin/usbhidctl/   (props changed)
      stable/8/usr.bin/uudecode/   (props changed)
      stable/8/usr.bin/uuencode/   (props changed)
      stable/8/usr.bin/vmstat/   (props changed)
      stable/8/usr.bin/wall/   (props changed)
      stable/8/usr.bin/who/   (props changed)
      stable/8/usr.bin/xargs/   (props changed)
      stable/8/usr.bin/xinstall/   (props changed)
      stable/8/usr.bin/xlint/   (props changed)
      stable/8/usr.bin/xz/   (props changed)
      stable/8/usr.bin/yacc/   (props changed)
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 09:39:54 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 1FB87577;
     Fri,  1 Mar 2013 09:39:54 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id EDC65259;
     Fri,  1 Mar 2013 09:39:53 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219drfa080761;
     Fri, 1 Mar 2013 09:39:53 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219dr0C080759;
     Fri, 1 Mar 2013 09:39:53 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010939.r219dr0C080759@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 09:39:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247538 - stable/9/usr.bin/du
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 09:39:54 -0000
    
    Author: des
    Date: Fri Mar  1 09:39:53 2013
    New Revision: 247538
    URL: http://svnweb.freebsd.org/changeset/base/247538
    
    Log:
      MFH (r238602): add -g (gigabyte) flag
    
    Modified:
      stable/9/usr.bin/du/du.1
      stable/9/usr.bin/du/du.c
    Directory Properties:
      stable/9/usr.bin/du/   (props changed)
    
    Modified: stable/9/usr.bin/du/du.1
    ==============================================================================
    --- stable/9/usr.bin/du/du.1	Fri Mar  1 09:39:29 2013	(r247537)
    +++ stable/9/usr.bin/du/du.1	Fri Mar  1 09:39:53 2013	(r247538)
    @@ -28,7 +28,7 @@
     .\"	@(#)du.1	8.2 (Berkeley) 4/1/94
     .\" $FreeBSD$
     .\"
    -.Dd December 17, 2011
    +.Dd July 18, 2012
     .Dt DU 1
     .Os
     .Sh NAME
    @@ -38,7 +38,7 @@
     .Nm
     .Op Fl Aclnx
     .Op Fl H | L | P
    -.Op Fl h | k | m
    +.Op Fl g | h | k | m
     .Op Fl a | s | d Ar depth
     .Op Fl B Ar blocksize
     .Op Fl I Ar mask
    @@ -63,9 +63,9 @@ Calculate block counts in
     .Ar blocksize
     byte blocks.
     This is different from the
    -.Fl h, k
    +.Fl h, k, m
     and
    -.Fl  m
    +.Fl  g
     options or setting
     .Ev BLOCKSIZE
     and gives an estimate of how much space the examined file hierarchy would
    @@ -95,13 +95,15 @@ Display a grand total.
     Display an entry for all files and directories
     .Ar depth
     directories deep.
    +.It Fl g
    +Display block counts in 1073741824-byte (1 GiB) blocks.
     .It Fl h
     .Dq Human-readable
     output.
     Use unit suffixes: Byte, Kilobyte, Megabyte,
     Gigabyte, Terabyte and Petabyte.
     .It Fl k
    -Display block counts in 1024-byte (1-Kbyte) blocks.
    +Display block counts in 1024-byte (1 kiB) blocks.
     .It Fl l
     If a file has multiple hard links, count its size multiple times.
     The default behavior of
    @@ -112,7 +114,7 @@ When the
     option is specified, the hard link checks are disabled, and these files
     are counted (and displayed) as many times as they are found.
     .It Fl m
    -Display block counts in 1048576-byte (1-Mbyte) blocks.
    +Display block counts in 1048576-byte (1 MiB) blocks.
     .It Fl n
     Ignore files and directories with user
     .Dq nodump
    
    Modified: stable/9/usr.bin/du/du.c
    ==============================================================================
    --- stable/9/usr.bin/du/du.c	Fri Mar  1 09:39:29 2013	(r247537)
    +++ stable/9/usr.bin/du/du.c	Fri Mar  1 09:39:53 2013	(r247538)
    @@ -110,7 +110,7 @@ main(int argc, char *argv[])
     	depth = INT_MAX;
     	SLIST_INIT(&ignores);
     
    -	while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrt:x")) != -1)
    +	while ((ch = getopt(argc, argv, "AB:HI:LPasd:cghklmnrt:x")) != -1)
     		switch (ch) {
     		case 'A':
     			Aflag = 1;
    @@ -157,6 +157,10 @@ main(int argc, char *argv[])
     		case 'c':
     			cflag = 1;
     			break;
    +		case 'g':
    +			hflag = 0;
    +			blocksize = 1073741824;
    +			break;
     		case 'h':
     			hflag = 1;
     			break;
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 09:40:03 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id D35536CF;
     Fri,  1 Mar 2013 09:40:03 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id ADEE225D;
     Fri,  1 Mar 2013 09:40:03 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219e3Cj080864;
     Fri, 1 Mar 2013 09:40:03 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219e3TG080861;
     Fri, 1 Mar 2013 09:40:03 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010940.r219e3TG080861@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 09:40:03 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247539 - stable/8/usr.bin/du
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 09:40:03 -0000
    
    Author: des
    Date: Fri Mar  1 09:40:02 2013
    New Revision: 247539
    URL: http://svnweb.freebsd.org/changeset/base/247539
    
    Log:
      MFH (r238602): add -g (gigabyte) flag
    
    Modified:
      stable/8/usr.bin/du/du.1
      stable/8/usr.bin/du/du.c
    Directory Properties:
      stable/8/usr.bin/du/   (props changed)
    
    Modified: stable/8/usr.bin/du/du.1
    ==============================================================================
    --- stable/8/usr.bin/du/du.1	Fri Mar  1 09:39:53 2013	(r247538)
    +++ stable/8/usr.bin/du/du.1	Fri Mar  1 09:40:02 2013	(r247539)
    @@ -32,7 +32,7 @@
     .\"	@(#)du.1	8.2 (Berkeley) 4/1/94
     .\" $FreeBSD$
     .\"
    -.Dd December 17, 2011
    +.Dd July 18, 2012
     .Dt DU 1
     .Os
     .Sh NAME
    @@ -42,7 +42,7 @@
     .Nm
     .Op Fl Aclnx
     .Op Fl H | L | P
    -.Op Fl h | k | m
    +.Op Fl g | h | k | m
     .Op Fl a | s | d Ar depth
     .Op Fl B Ar blocksize
     .Op Fl I Ar mask
    @@ -67,9 +67,9 @@ Calculate block counts in
     .Ar blocksize
     byte blocks.
     This is different from the
    -.Fl h, k
    +.Fl h, k, m
     and
    -.Fl  m
    +.Fl  g
     options or setting
     .Ev BLOCKSIZE
     and gives an estimate of how much space the examined file hierarchy would
    @@ -99,13 +99,15 @@ Display a grand total.
     Display an entry for all files and directories
     .Ar depth
     directories deep.
    +.It Fl g
    +Display block counts in 1073741824-byte (1 GiB) blocks.
     .It Fl h
     .Dq Human-readable
     output.
     Use unit suffixes: Byte, Kilobyte, Megabyte,
     Gigabyte, Terabyte and Petabyte.
     .It Fl k
    -Display block counts in 1024-byte (1-Kbyte) blocks.
    +Display block counts in 1024-byte (1 kiB) blocks.
     .It Fl l
     If a file has multiple hard links, count its size multiple times.
     The default behavior of
    @@ -116,7 +118,7 @@ When the
     option is specified, the hard link checks are disabled, and these files
     are counted (and displayed) as many times as they are found.
     .It Fl m
    -Display block counts in 1048576-byte (1-Mbyte) blocks.
    +Display block counts in 1048576-byte (1 MiB) blocks.
     .It Fl n
     Ignore files and directories with user
     .Dq nodump
    
    Modified: stable/8/usr.bin/du/du.c
    ==============================================================================
    --- stable/8/usr.bin/du/du.c	Fri Mar  1 09:39:53 2013	(r247538)
    +++ stable/8/usr.bin/du/du.c	Fri Mar  1 09:40:02 2013	(r247539)
    @@ -114,7 +114,7 @@ main(int argc, char *argv[])
     	depth = INT_MAX;
     	SLIST_INIT(&ignores);
     
    -	while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrt:x")) != -1)
    +	while ((ch = getopt(argc, argv, "AB:HI:LPasd:cghklmnrt:x")) != -1)
     		switch (ch) {
     		case 'A':
     			Aflag = 1;
    @@ -161,6 +161,10 @@ main(int argc, char *argv[])
     		case 'c':
     			cflag = 1;
     			break;
    +		case 'g':
    +			hflag = 0;
    +			blocksize = 1073741824;
    +			break;
     		case 'h':
     			hflag = 1;
     			break;
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 09:49:55 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id EABD1B69;
     Fri,  1 Mar 2013 09:49:55 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id C30012D1;
     Fri,  1 Mar 2013 09:49:55 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219nt2x083863;
     Fri, 1 Mar 2013 09:49:55 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219ntc0083862;
     Fri, 1 Mar 2013 09:49:55 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010949.r219ntc0083862@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 09:49:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247541 - stable/9/usr.bin/find
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 09:49:56 -0000
    
    Author: des
    Date: Fri Mar  1 09:49:55 2013
    New Revision: 247541
    URL: http://svnweb.freebsd.org/changeset/base/247541
    
    Log:
      MFH (r240278): document -quit
    
    Modified:
      stable/9/usr.bin/find/find.1
    Directory Properties:
      stable/9/usr.bin/find/   (props changed)
    
    Modified: stable/9/usr.bin/find/find.1
    ==============================================================================
    --- stable/9/usr.bin/find/find.1	Fri Mar  1 09:42:58 2013	(r247540)
    +++ stable/9/usr.bin/find/find.1	Fri Mar  1 09:49:55 2013	(r247541)
    @@ -31,7 +31,7 @@
     .\"	@(#)find.1	8.7 (Berkeley) 5/9/95
     .\" $FreeBSD$
     .\"
    -.Dd June 13, 2012
    +.Dd September 9, 2012
     .Dt FIND 1
     .Os
     .Sh NAME
    @@ -735,6 +735,10 @@ Note, the
     primary has no effect if the
     .Fl d
     option was specified.
    +.It Ic -quit
    +Causes
    +.Nm
    +to immediately terminate.
     .It Ic -regex Ar pattern
     True if the whole path of the file matches
     .Ar pattern
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 09:50:45 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id E32A5D1F;
     Fri,  1 Mar 2013 09:50:45 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id C73682DF;
     Fri,  1 Mar 2013 09:50:45 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219ojtZ085569;
     Fri, 1 Mar 2013 09:50:45 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219ojkj085568;
     Fri, 1 Mar 2013 09:50:45 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303010950.r219ojkj085568@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 09:50:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247542 - in stable/8/sys: . dev/sound
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 09:50:46 -0000
    
    Author: des
    Date: Fri Mar  1 09:50:45 2013
    New Revision: 247542
    URL: http://svnweb.freebsd.org/changeset/base/247542
    
    Log:
      More misapplied mergeinfo.
    
    Modified:
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/Makefile   (props changed)
      stable/8/sys/amd64/   (props changed)
      stable/8/sys/amd64/include/xen/   (props changed)
      stable/8/sys/arm/   (props changed)
      stable/8/sys/boot/   (props changed)
      stable/8/sys/bsm/   (props changed)
      stable/8/sys/cam/   (props changed)
      stable/8/sys/cddl/   (props changed)
      stable/8/sys/cddl/contrib/opensolaris/   (props changed)
      stable/8/sys/compat/   (props changed)
      stable/8/sys/conf/   (props changed)
      stable/8/sys/contrib/   (props changed)
      stable/8/sys/contrib/dev/acpica/   (props changed)
      stable/8/sys/contrib/pf/   (props changed)
      stable/8/sys/crypto/   (props changed)
      stable/8/sys/ddb/   (props changed)
      stable/8/sys/dev/   (props changed)
      stable/8/sys/dev/aac/   (props changed)
      stable/8/sys/dev/acpi_support/   (props changed)
      stable/8/sys/dev/acpica/   (props changed)
      stable/8/sys/dev/adb/   (props changed)
      stable/8/sys/dev/adlink/   (props changed)
      stable/8/sys/dev/advansys/   (props changed)
      stable/8/sys/dev/ae/   (props changed)
      stable/8/sys/dev/age/   (props changed)
      stable/8/sys/dev/agp/   (props changed)
      stable/8/sys/dev/aha/   (props changed)
      stable/8/sys/dev/ahb/   (props changed)
      stable/8/sys/dev/ahci/   (props changed)
      stable/8/sys/dev/aic/   (props changed)
      stable/8/sys/dev/aic7xxx/   (props changed)
      stable/8/sys/dev/alc/   (props changed)
      stable/8/sys/dev/ale/   (props changed)
      stable/8/sys/dev/amd/   (props changed)
      stable/8/sys/dev/amdsbwd/   (props changed)
      stable/8/sys/dev/amdtemp/   (props changed)
      stable/8/sys/dev/amr/   (props changed)
      stable/8/sys/dev/an/   (props changed)
      stable/8/sys/dev/arcmsr/   (props changed)
      stable/8/sys/dev/asmc/   (props changed)
      stable/8/sys/dev/asr/   (props changed)
      stable/8/sys/dev/ata/   (props changed)
      stable/8/sys/dev/ath/   (props changed)
      stable/8/sys/dev/atkbdc/   (props changed)
      stable/8/sys/dev/auxio/   (props changed)
      stable/8/sys/dev/bce/   (props changed)
      stable/8/sys/dev/bfe/   (props changed)
      stable/8/sys/dev/bge/   (props changed)
      stable/8/sys/dev/bktr/   (props changed)
      stable/8/sys/dev/bm/   (props changed)
      stable/8/sys/dev/buslogic/   (props changed)
      stable/8/sys/dev/bwi/   (props changed)
      stable/8/sys/dev/bwn/   (props changed)
      stable/8/sys/dev/cardbus/   (props changed)
      stable/8/sys/dev/cas/   (props changed)
      stable/8/sys/dev/ce/   (props changed)
      stable/8/sys/dev/cfe/   (props changed)
      stable/8/sys/dev/cfi/   (props changed)
      stable/8/sys/dev/ciss/   (props changed)
      stable/8/sys/dev/cm/   (props changed)
      stable/8/sys/dev/cmx/   (props changed)
      stable/8/sys/dev/coretemp/   (props changed)
      stable/8/sys/dev/cp/   (props changed)
      stable/8/sys/dev/cpuctl/   (props changed)
      stable/8/sys/dev/cpufreq/   (props changed)
      stable/8/sys/dev/cs/   (props changed)
      stable/8/sys/dev/ct/   (props changed)
      stable/8/sys/dev/ctau/   (props changed)
      stable/8/sys/dev/cx/   (props changed)
      stable/8/sys/dev/cxgb/   (props changed)
      stable/8/sys/dev/cxgbe/   (props changed)
      stable/8/sys/dev/cy/   (props changed)
      stable/8/sys/dev/dc/   (props changed)
      stable/8/sys/dev/dcons/   (props changed)
      stable/8/sys/dev/de/   (props changed)
      stable/8/sys/dev/digi/   (props changed)
      stable/8/sys/dev/dpms/   (props changed)
      stable/8/sys/dev/dpt/   (props changed)
      stable/8/sys/dev/drm/   (props changed)
      stable/8/sys/dev/e1000/   (props changed)
      stable/8/sys/dev/ed/   (props changed)
      stable/8/sys/dev/eisa/   (props changed)
      stable/8/sys/dev/en/   (props changed)
      stable/8/sys/dev/ep/   (props changed)
      stable/8/sys/dev/esp/   (props changed)
      stable/8/sys/dev/et/   (props changed)
      stable/8/sys/dev/ex/   (props changed)
      stable/8/sys/dev/exca/   (props changed)
      stable/8/sys/dev/fatm/   (props changed)
      stable/8/sys/dev/fb/   (props changed)
      stable/8/sys/dev/fdc/   (props changed)
      stable/8/sys/dev/fe/   (props changed)
      stable/8/sys/dev/firewire/   (props changed)
      stable/8/sys/dev/flash/   (props changed)
      stable/8/sys/dev/fxp/   (props changed)
      stable/8/sys/dev/gem/   (props changed)
      stable/8/sys/dev/glxsb/   (props changed)
      stable/8/sys/dev/hatm/   (props changed)
      stable/8/sys/dev/hifn/   (props changed)
      stable/8/sys/dev/hme/   (props changed)
      stable/8/sys/dev/hpt27xx/   (props changed)
      stable/8/sys/dev/hptiop/   (props changed)
      stable/8/sys/dev/hptmv/   (props changed)
      stable/8/sys/dev/hptrr/   (props changed)
      stable/8/sys/dev/hwpmc/   (props changed)
      stable/8/sys/dev/ic/   (props changed)
      stable/8/sys/dev/ichsmb/   (props changed)
      stable/8/sys/dev/ichwd/   (props changed)
      stable/8/sys/dev/ida/   (props changed)
      stable/8/sys/dev/ie/   (props changed)
      stable/8/sys/dev/ieee488/   (props changed)
      stable/8/sys/dev/if_ndis/   (props changed)
      stable/8/sys/dev/iicbus/   (props changed)
      stable/8/sys/dev/iir/   (props changed)
      stable/8/sys/dev/io/   (props changed)
      stable/8/sys/dev/ipmi/   (props changed)
      stable/8/sys/dev/ips/   (props changed)
      stable/8/sys/dev/ipw/   (props changed)
      stable/8/sys/dev/isci/   (props changed)
      stable/8/sys/dev/iscsi/   (props changed)
      stable/8/sys/dev/isp/   (props changed)
      stable/8/sys/dev/ispfw/   (props changed)
      stable/8/sys/dev/iwi/   (props changed)
      stable/8/sys/dev/iwn/   (props changed)
      stable/8/sys/dev/ixgb/   (props changed)
      stable/8/sys/dev/ixgbe/   (props changed)
      stable/8/sys/dev/jme/   (props changed)
      stable/8/sys/dev/joy/   (props changed)
      stable/8/sys/dev/kbd/   (props changed)
      stable/8/sys/dev/kbdmux/   (props changed)
      stable/8/sys/dev/ksyms/   (props changed)
      stable/8/sys/dev/le/   (props changed)
      stable/8/sys/dev/led/   (props changed)
      stable/8/sys/dev/lge/   (props changed)
      stable/8/sys/dev/lindev/   (props changed)
      stable/8/sys/dev/lmc/   (props changed)
      stable/8/sys/dev/malo/   (props changed)
      stable/8/sys/dev/mc146818/   (props changed)
      stable/8/sys/dev/mca/   (props changed)
      stable/8/sys/dev/mcd/   (props changed)
      stable/8/sys/dev/md/   (props changed)
      stable/8/sys/dev/mem/   (props changed)
      stable/8/sys/dev/mfi/   (props changed)
      stable/8/sys/dev/mge/   (props changed)
      stable/8/sys/dev/mii/   (props changed)
      stable/8/sys/dev/mk48txx/   (props changed)
      stable/8/sys/dev/mlx/   (props changed)
      stable/8/sys/dev/mly/   (props changed)
      stable/8/sys/dev/mmc/   (props changed)
      stable/8/sys/dev/mn/   (props changed)
      stable/8/sys/dev/mps/   (props changed)
      stable/8/sys/dev/mpt/   (props changed)
      stable/8/sys/dev/mse/   (props changed)
      stable/8/sys/dev/msk/   (props changed)
      stable/8/sys/dev/mvs/   (props changed)
      stable/8/sys/dev/mwl/   (props changed)
      stable/8/sys/dev/mxge/   (props changed)
      stable/8/sys/dev/my/   (props changed)
      stable/8/sys/dev/ncv/   (props changed)
      stable/8/sys/dev/netmap/   (props changed)
      stable/8/sys/dev/nfe/   (props changed)
      stable/8/sys/dev/nge/   (props changed)
      stable/8/sys/dev/nmdm/   (props changed)
      stable/8/sys/dev/nsp/   (props changed)
      stable/8/sys/dev/null/   (props changed)
      stable/8/sys/dev/nve/   (props changed)
      stable/8/sys/dev/nvram/   (props changed)
      stable/8/sys/dev/nxge/   (props changed)
      stable/8/sys/dev/oce/   (props changed)
      stable/8/sys/dev/ofw/   (props changed)
      stable/8/sys/dev/patm/   (props changed)
      stable/8/sys/dev/pbio/   (props changed)
      stable/8/sys/dev/pccard/   (props changed)
      stable/8/sys/dev/pccbb/   (props changed)
      stable/8/sys/dev/pcf/   (props changed)
      stable/8/sys/dev/pci/   (props changed)
      stable/8/sys/dev/pcn/   (props changed)
      stable/8/sys/dev/pdq/   (props changed)
      stable/8/sys/dev/powermac_nvram/   (props changed)
      stable/8/sys/dev/ppbus/   (props changed)
      stable/8/sys/dev/ppc/   (props changed)
      stable/8/sys/dev/pst/   (props changed)
      stable/8/sys/dev/puc/   (props changed)
      stable/8/sys/dev/quicc/   (props changed)
      stable/8/sys/dev/ral/   (props changed)
      stable/8/sys/dev/random/   (props changed)
      stable/8/sys/dev/rc/   (props changed)
      stable/8/sys/dev/re/   (props changed)
      stable/8/sys/dev/rndtest/   (props changed)
      stable/8/sys/dev/rp/   (props changed)
      stable/8/sys/dev/safe/   (props changed)
      stable/8/sys/dev/sbni/   (props changed)
      stable/8/sys/dev/scc/   (props changed)
      stable/8/sys/dev/scd/   (props changed)
      stable/8/sys/dev/sdhci/   (props changed)
      stable/8/sys/dev/sec/   (props changed)
      stable/8/sys/dev/sf/   (props changed)
      stable/8/sys/dev/sge/   (props changed)
      stable/8/sys/dev/si/   (props changed)
      stable/8/sys/dev/siba/   (props changed)
      stable/8/sys/dev/siis/   (props changed)
      stable/8/sys/dev/sio/   (props changed)
      stable/8/sys/dev/sis/   (props changed)
      stable/8/sys/dev/sk/   (props changed)
      stable/8/sys/dev/smbus/   (props changed)
      stable/8/sys/dev/smc/   (props changed)
      stable/8/sys/dev/sn/   (props changed)
      stable/8/sys/dev/snc/   (props changed)
      stable/8/sys/dev/snp/   (props changed)
      stable/8/sys/dev/sound/   (props changed)
      stable/8/sys/dev/sound/chip.h   (props changed)
      stable/8/sys/dev/sound/clone.c   (props changed)
      stable/8/sys/dev/sound/clone.h   (props changed)
      stable/8/sys/dev/sound/driver.c   (props changed)
      stable/8/sys/dev/sound/isa/   (props changed)
      stable/8/sys/dev/sound/macio/   (props changed)
      stable/8/sys/dev/sound/midi/   (props changed)
      stable/8/sys/dev/sound/pci/   (props changed)
      stable/8/sys/dev/sound/pcm/   (props changed)
      stable/8/sys/dev/sound/sbus/   (props changed)
      stable/8/sys/dev/sound/unit.c   (props changed)
      stable/8/sys/dev/sound/unit.h   (props changed)
      stable/8/sys/dev/sound/usb/   (props changed)
      stable/8/sys/dev/sound/version.h   (props changed)
      stable/8/sys/dev/speaker/   (props changed)
      stable/8/sys/dev/spibus/   (props changed)
      stable/8/sys/dev/ste/   (props changed)
      stable/8/sys/dev/stg/   (props changed)
      stable/8/sys/dev/stge/   (props changed)
      stable/8/sys/dev/streams/   (props changed)
      stable/8/sys/dev/sym/   (props changed)
      stable/8/sys/dev/syscons/   (props changed)
      stable/8/sys/dev/tdfx/   (props changed)
      stable/8/sys/dev/ti/   (props changed)
      stable/8/sys/dev/tl/   (props changed)
      stable/8/sys/dev/tpm/   (props changed)
      stable/8/sys/dev/trm/   (props changed)
      stable/8/sys/dev/tsec/   (props changed)
      stable/8/sys/dev/twa/   (props changed)
      stable/8/sys/dev/twe/   (props changed)
      stable/8/sys/dev/tws/   (props changed)
      stable/8/sys/dev/tx/   (props changed)
      stable/8/sys/dev/txp/   (props changed)
      stable/8/sys/dev/uart/   (props changed)
      stable/8/sys/dev/ubsec/   (props changed)
      stable/8/sys/dev/usb/   (props changed)
      stable/8/sys/dev/utopia/   (props changed)
      stable/8/sys/dev/vge/   (props changed)
      stable/8/sys/dev/viawd/   (props changed)
      stable/8/sys/dev/virtio/   (props changed)
      stable/8/sys/dev/vkbd/   (props changed)
      stable/8/sys/dev/vr/   (props changed)
      stable/8/sys/dev/vte/   (props changed)
      stable/8/sys/dev/vx/   (props changed)
      stable/8/sys/dev/watchdog/   (props changed)
      stable/8/sys/dev/wb/   (props changed)
      stable/8/sys/dev/wbwd/   (props changed)
      stable/8/sys/dev/wds/   (props changed)
      stable/8/sys/dev/wi/   (props changed)
      stable/8/sys/dev/wl/   (props changed)
      stable/8/sys/dev/wpi/   (props changed)
      stable/8/sys/dev/xe/   (props changed)
      stable/8/sys/dev/xen/   (props changed)
      stable/8/sys/dev/xl/   (props changed)
      stable/8/sys/fs/   (props changed)
      stable/8/sys/gdb/   (props changed)
      stable/8/sys/geom/   (props changed)
      stable/8/sys/gnu/   (props changed)
      stable/8/sys/i386/   (props changed)
      stable/8/sys/ia64/   (props changed)
      stable/8/sys/isa/   (props changed)
      stable/8/sys/kern/   (props changed)
      stable/8/sys/kgssapi/   (props changed)
      stable/8/sys/libkern/   (props changed)
      stable/8/sys/mips/   (props changed)
      stable/8/sys/modules/   (props changed)
      stable/8/sys/net/   (props changed)
      stable/8/sys/net80211/   (props changed)
      stable/8/sys/netatalk/   (props changed)
      stable/8/sys/netgraph/   (props changed)
      stable/8/sys/netinet/   (props changed)
      stable/8/sys/netinet6/   (props changed)
      stable/8/sys/netipsec/   (props changed)
      stable/8/sys/netipx/   (props changed)
      stable/8/sys/netnatm/   (props changed)
      stable/8/sys/netncp/   (props changed)
      stable/8/sys/netsmb/   (props changed)
      stable/8/sys/nfs/   (props changed)
      stable/8/sys/nfsclient/   (props changed)
      stable/8/sys/nfsserver/   (props changed)
      stable/8/sys/nlm/   (props changed)
      stable/8/sys/opencrypto/   (props changed)
      stable/8/sys/pc98/   (props changed)
      stable/8/sys/pci/   (props changed)
      stable/8/sys/powerpc/   (props changed)
      stable/8/sys/rpc/   (props changed)
      stable/8/sys/security/   (props changed)
      stable/8/sys/sparc64/   (props changed)
      stable/8/sys/sun4v/   (props changed)
      stable/8/sys/sys/   (props changed)
      stable/8/sys/tools/   (props changed)
      stable/8/sys/ufs/   (props changed)
      stable/8/sys/vm/   (props changed)
      stable/8/sys/x86/   (props changed)
      stable/8/sys/xdr/   (props changed)
      stable/8/sys/xen/   (props changed)
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 10:23:37 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 578B9365;
     Fri,  1 Mar 2013 10:23:37 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 44164648;
     Fri,  1 Mar 2013 10:23:37 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21ANbOB095486;
     Fri, 1 Mar 2013 10:23:37 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21ANbsX095485;
     Fri, 1 Mar 2013 10:23:37 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303011023.r21ANbsX095485@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 10:23:37 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247543 - stable/8/usr.bin/find
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 10:23:37 -0000
    
    Author: des
    Date: Fri Mar  1 10:23:36 2013
    New Revision: 247543
    URL: http://svnweb.freebsd.org/changeset/base/247543
    
    Log:
      MFH (r240278): document -quit
    
    Modified:
      stable/8/usr.bin/find/find.1
    Directory Properties:
      stable/8/usr.bin/find/   (props changed)
    
    Modified: stable/8/usr.bin/find/find.1
    ==============================================================================
    --- stable/8/usr.bin/find/find.1	Fri Mar  1 09:50:45 2013	(r247542)
    +++ stable/8/usr.bin/find/find.1	Fri Mar  1 10:23:36 2013	(r247543)
    @@ -35,7 +35,7 @@
     .\"	@(#)find.1	8.7 (Berkeley) 5/9/95
     .\" $FreeBSD$
     .\"
    -.Dd February 24, 2008
    +.Dd September 9, 2012
     .Dt FIND 1
     .Os
     .Sh NAME
    @@ -741,6 +741,10 @@ Note, the
     primary has no effect if the
     .Fl d
     option was specified.
    +.It Ic -quit
    +Causes
    +.Nm
    +to immediately terminate.
     .It Ic -regex Ar pattern
     True if the whole path of the file matches
     .Ar pattern
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 10:33:31 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id D817A52D;
     Fri,  1 Mar 2013 10:33:31 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id CA775695;
     Fri,  1 Mar 2013 10:33:31 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21AXVQQ098499;
     Fri, 1 Mar 2013 10:33:31 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21AXVBN098498;
     Fri, 1 Mar 2013 10:33:31 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303011033.r21AXVBN098498@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 10:33:31 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247544 - stable/9/lib
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 10:33:31 -0000
    
    Author: des
    Date: Fri Mar  1 10:33:31 2013
    New Revision: 247544
    URL: http://svnweb.freebsd.org/changeset/base/247544
    
    Log:
      MFH (r246328): sort knobs
    
    Modified:
      stable/9/lib/Makefile   (contents, props changed)
    Directory Properties:
      stable/9/lib/   (props changed)
    
    Modified: stable/9/lib/Makefile
    ==============================================================================
    --- stable/9/lib/Makefile	Fri Mar  1 10:23:36 2013	(r247543)
    +++ stable/9/lib/Makefile	Fri Mar  1 10:33:31 2013	(r247544)
    @@ -169,6 +169,11 @@ _libiconv_modules=	libiconv_modules
     _libipx=	libipx
     .endif
     
    +.if ${MK_LIBCPLUSPLUS} != "no"
    +_libcxxrt=	libcxxrt
    +_libcplusplus=	libc++
    +.endif
    +
     .if ${MK_LIBTHR} != "no"
     _libthr=	libthr
     .endif
    @@ -214,11 +219,6 @@ _libsmb=	libsmb
     _libmp=		libmp
     .endif
     
    -.if ${MK_LIBCPLUSPLUS} != "no"
    -_libcxxrt=	libcxxrt
    -_libcplusplus=	libc++
    -.endif
    -
     .if ${MK_PMC} != "no"
     _libpmc=	libpmc
     .endif
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 14:54:28 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 6B973F09;
     Fri,  1 Mar 2013 14:54:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 581E51A8;
     Fri,  1 Mar 2013 14:54:28 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21EsRNP077056;
     Fri, 1 Mar 2013 14:54:27 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21EsRQU077053;
     Fri, 1 Mar 2013 14:54:27 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011454.r21EsRQU077053@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 14:54:27 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247547 - in stable/9/sys: amd64/amd64 i386/i386 x86/x86
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 14:54:28 -0000
    
    Author: jhb
    Date: Fri Mar  1 14:54:26 2013
    New Revision: 247547
    URL: http://svnweb.freebsd.org/changeset/base/247547
    
    Log:
      MFC 245577,245640:
      Don't attempt to use clflush on the local APIC register window.  Various
      CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on
      Pentium-M, and trashing of the local APIC registers on a VIA C7).  The
      local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't
      necessary anyway.
    
    Modified:
      stable/9/sys/amd64/amd64/pmap.c
      stable/9/sys/i386/i386/pmap.c
      stable/9/sys/x86/x86/local_apic.c
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/amd64/amd64/pmap.c
    ==============================================================================
    --- stable/9/sys/amd64/amd64/pmap.c	Fri Mar  1 13:27:32 2013	(r247546)
    +++ stable/9/sys/amd64/amd64/pmap.c	Fri Mar  1 14:54:26 2013	(r247547)
    @@ -109,6 +109,7 @@ __FBSDID("$FreeBSD$");
     #include "opt_vm.h"
     
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -140,6 +141,8 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     
    +#include 
    +#include 
     #include 
     #include 
     #include 
    @@ -1166,6 +1169,15 @@ pmap_invalidate_cache_range(vm_offset_t 
     	    eva - sva < PMAP_CLFLUSH_THRESHOLD) {
     
     		/*
    +		 * XXX: Some CPUs fault, hang, or trash the local APIC
    +		 * registers if we use CLFLUSH on the local APIC
    +		 * range.  The local APIC is always uncached, so we
    +		 * don't need to flush for that range anyway.
    +		 */
    +		if (pmap_kextract(sva) == lapic_paddr)
    +			return;
    +
    +		/*
     		 * Otherwise, do per-cache line flush.  Use the mfence
     		 * instruction to insure that previous stores are
     		 * included in the write-back.  The processor
    
    Modified: stable/9/sys/i386/i386/pmap.c
    ==============================================================================
    --- stable/9/sys/i386/i386/pmap.c	Fri Mar  1 13:27:32 2013	(r247546)
    +++ stable/9/sys/i386/i386/pmap.c	Fri Mar  1 14:54:26 2013	(r247547)
    @@ -103,6 +103,7 @@ __FBSDID("$FreeBSD$");
      *	and to when physical maps must be made correct.
      */
     
    +#include "opt_apic.h"
     #include "opt_cpu.h"
     #include "opt_pmap.h"
     #include "opt_smp.h"
    @@ -142,6 +143,11 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     
    +#ifdef DEV_APIC
    +#include 
    +#include 
    +#include 
    +#endif
     #include 
     #include 
     #include 
    @@ -1191,6 +1197,16 @@ pmap_invalidate_cache_range(vm_offset_t 
     	else if ((cpu_feature & CPUID_CLFSH) != 0 &&
     	    eva - sva < PMAP_CLFLUSH_THRESHOLD) {
     
    +#ifdef DEV_APIC
    +		/*
    +		 * XXX: Some CPUs fault, hang, or trash the local APIC
    +		 * registers if we use CLFLUSH on the local APIC
    +		 * range.  The local APIC is always uncached, so we
    +		 * don't need to flush for that range anyway.
    +		 */
    +		if (pmap_kextract(sva) == lapic_paddr)
    +			return;
    +#endif
     		/*
     		 * Otherwise, do per-cache line flush.  Use the mfence
     		 * instruction to insure that previous stores are
    
    Modified: stable/9/sys/x86/x86/local_apic.c
    ==============================================================================
    --- stable/9/sys/x86/x86/local_apic.c	Fri Mar  1 13:27:32 2013	(r247546)
    +++ stable/9/sys/x86/x86/local_apic.c	Fri Mar  1 14:54:26 2013	(r247547)
    @@ -223,8 +223,8 @@ lapic_init(vm_paddr_t addr)
     	/* Map the local APIC and setup the spurious interrupt handler. */
     	KASSERT(trunc_page(addr) == addr,
     	    ("local APIC not aligned on a page boundary"));
    -	lapic = pmap_mapdev(addr, sizeof(lapic_t));
     	lapic_paddr = addr;
    +	lapic = pmap_mapdev(addr, sizeof(lapic_t));
     	setidt(APIC_SPURIOUS_INT, IDTVEC(spuriousint), SDT_APIC, SEL_KPL,
     	    GSEL_APIC);
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 14:54:38 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id ED07F91;
     Fri,  1 Mar 2013 14:54:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id DF25F1A9;
     Fri,  1 Mar 2013 14:54:38 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21Esc8m077121;
     Fri, 1 Mar 2013 14:54:38 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21Esckw077117;
     Fri, 1 Mar 2013 14:54:38 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011454.r21Esckw077117@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 14:54:38 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247548 - in stable/8/sys: amd64/amd64 i386/i386 x86/x86
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 14:54:39 -0000
    
    Author: jhb
    Date: Fri Mar  1 14:54:37 2013
    New Revision: 247548
    URL: http://svnweb.freebsd.org/changeset/base/247548
    
    Log:
      MFC 245577,245640:
      Don't attempt to use clflush on the local APIC register window.  Various
      CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on
      Pentium-M, and trashing of the local APIC registers on a VIA C7).  The
      local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't
      necessary anyway.
    
    Modified:
      stable/8/sys/amd64/amd64/pmap.c
      stable/8/sys/i386/i386/pmap.c
      stable/8/sys/x86/x86/local_apic.c
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/amd64/   (props changed)
      stable/8/sys/i386/   (props changed)
      stable/8/sys/x86/   (props changed)
    
    Modified: stable/8/sys/amd64/amd64/pmap.c
    ==============================================================================
    --- stable/8/sys/amd64/amd64/pmap.c	Fri Mar  1 14:54:26 2013	(r247547)
    +++ stable/8/sys/amd64/amd64/pmap.c	Fri Mar  1 14:54:37 2013	(r247548)
    @@ -109,6 +109,7 @@ __FBSDID("$FreeBSD$");
     #include "opt_vm.h"
     
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -137,6 +138,8 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     
    +#include 
    +#include 
     #include 
     #include 
     #include 
    @@ -1054,6 +1057,15 @@ pmap_invalidate_cache_range(vm_offset_t 
     		 eva - sva < 2 * 1024 * 1024) {
     
     		/*
    +		 * XXX: Some CPUs fault, hang, or trash the local APIC
    +		 * registers if we use CLFLUSH on the local APIC
    +		 * range.  The local APIC is always uncached, so we
    +		 * don't need to flush for that range anyway.
    +		 */
    +		if (pmap_kextract(sva) == lapic_paddr)
    +			return;
    +
    +		/*
     		 * Otherwise, do per-cache line flush.  Use the mfence
     		 * instruction to insure that previous stores are
     		 * included in the write-back.  The processor
    
    Modified: stable/8/sys/i386/i386/pmap.c
    ==============================================================================
    --- stable/8/sys/i386/i386/pmap.c	Fri Mar  1 14:54:26 2013	(r247547)
    +++ stable/8/sys/i386/i386/pmap.c	Fri Mar  1 14:54:37 2013	(r247548)
    @@ -103,6 +103,7 @@ __FBSDID("$FreeBSD$");
      *	and to when physical maps must be made correct.
      */
     
    +#include "opt_apic.h"
     #include "opt_cpu.h"
     #include "opt_pmap.h"
     #include "opt_smp.h"
    @@ -139,6 +140,11 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     
    +#ifdef DEV_APIC
    +#include 
    +#include 
    +#include 
    +#endif
     #include 
     #include 
     #include 
    @@ -1164,6 +1170,16 @@ pmap_invalidate_cache_range(vm_offset_t 
     	else if ((cpu_feature & CPUID_CLFSH) != 0 &&
     		 eva - sva < 2 * 1024 * 1024) {
     
    +#ifdef DEV_APIC
    +		/*
    +		 * XXX: Some CPUs fault, hang, or trash the local APIC
    +		 * registers if we use CLFLUSH on the local APIC
    +		 * range.  The local APIC is always uncached, so we
    +		 * don't need to flush for that range anyway.
    +		 */
    +		if (pmap_kextract(sva) == lapic_paddr)
    +			return;
    +#endif
     		/*
     		 * Otherwise, do per-cache line flush.  Use the mfence
     		 * instruction to insure that previous stores are
    
    Modified: stable/8/sys/x86/x86/local_apic.c
    ==============================================================================
    --- stable/8/sys/x86/x86/local_apic.c	Fri Mar  1 14:54:26 2013	(r247547)
    +++ stable/8/sys/x86/x86/local_apic.c	Fri Mar  1 14:54:37 2013	(r247548)
    @@ -223,8 +223,8 @@ lapic_init(vm_paddr_t addr)
     	/* Map the local APIC and setup the spurious interrupt handler. */
     	KASSERT(trunc_page(addr) == addr,
     	    ("local APIC not aligned on a page boundary"));
    -	lapic = pmap_mapdev(addr, sizeof(lapic_t));
     	lapic_paddr = addr;
    +	lapic = pmap_mapdev(addr, sizeof(lapic_t));
     	setidt(APIC_SPURIOUS_INT, IDTVEC(spuriousint), SDT_APIC, SEL_KPL,
     	    GSEL_APIC);
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 16:18:41 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id A9300F9F;
     Fri,  1 Mar 2013 16:18:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 834DE7E4;
     Fri,  1 Mar 2013 16:18:41 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21GIfW8002434;
     Fri, 1 Mar 2013 16:18:41 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21GIfIT002433;
     Fri, 1 Mar 2013 16:18:41 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011618.r21GIfIT002433@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 16:18:41 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247553 - stable/9/lib/libproc
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 16:18:41 -0000
    
    Author: jhb
    Date: Fri Mar  1 16:18:40 2013
    New Revision: 247553
    URL: http://svnweb.freebsd.org/changeset/base/247553
    
    Log:
      MFC 246035:
      - Compute the correct size to reallocate when doubling the size of the
        array of loaded objects to avoid a buffer overrun.
      - Use reallocf() to avoid leaking memory if the realloc() fails.
      
      PR:		kern/175648
    
    Modified:
      stable/9/lib/libproc/proc_rtld.c
    Directory Properties:
      stable/9/lib/libproc/   (props changed)
    
    Modified: stable/9/lib/libproc/proc_rtld.c
    ==============================================================================
    --- stable/9/lib/libproc/proc_rtld.c	Fri Mar  1 15:59:14 2013	(r247552)
    +++ stable/9/lib/libproc/proc_rtld.c	Fri Mar  1 16:18:40 2013	(r247553)
    @@ -44,7 +44,8 @@ map_iter(const rd_loadobj_t *lop, void *
     
     	if (phdl->nobjs >= phdl->rdobjsz) {
     		phdl->rdobjsz *= 2;
    -		phdl->rdobjs = realloc(phdl->rdobjs, phdl->rdobjsz);
    +		phdl->rdobjs = reallocf(phdl->rdobjs, sizeof(*phdl->rdobjs) *
    +		    phdl->rdobjsz);
     		if (phdl->rdobjs == NULL)
     			return (-1);
     	}
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 16:19:10 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 10A40219;
     Fri,  1 Mar 2013 16:19:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 02C6B7ED;
     Fri,  1 Mar 2013 16:19:10 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21GJ952002536;
     Fri, 1 Mar 2013 16:19:09 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21GJ9wn002534;
     Fri, 1 Mar 2013 16:19:09 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011619.r21GJ9wn002534@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 16:19:09 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247554 - stable/8/lib/libproc
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 16:19:10 -0000
    
    Author: jhb
    Date: Fri Mar  1 16:19:09 2013
    New Revision: 247554
    URL: http://svnweb.freebsd.org/changeset/base/247554
    
    Log:
      MFC 246035:
      - Compute the correct size to reallocate when doubling the size of the
        array of loaded objects to avoid a buffer overrun.
      - Use reallocf() to avoid leaking memory if the realloc() fails.
      
      PR:		kern/175648
    
    Modified:
      stable/8/lib/libproc/proc_rtld.c
    Directory Properties:
      stable/8/lib/libproc/   (props changed)
    
    Modified: stable/8/lib/libproc/proc_rtld.c
    ==============================================================================
    --- stable/8/lib/libproc/proc_rtld.c	Fri Mar  1 16:18:40 2013	(r247553)
    +++ stable/8/lib/libproc/proc_rtld.c	Fri Mar  1 16:19:09 2013	(r247554)
    @@ -44,7 +44,8 @@ map_iter(const rd_loadobj_t *lop, void *
     
     	if (phdl->nobjs >= phdl->rdobjsz) {
     		phdl->rdobjsz *= 2;
    -		phdl->rdobjs = realloc(phdl->rdobjs, phdl->rdobjsz);
    +		phdl->rdobjs = reallocf(phdl->rdobjs, sizeof(*phdl->rdobjs) *
    +		    phdl->rdobjsz);
     		if (phdl->rdobjs == NULL)
     			return (-1);
     	}
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 17:10:46 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 12068264;
     Fri,  1 Mar 2013 17:10:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id ECADBA49;
     Fri,  1 Mar 2013 17:10:45 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21HAjIU019336;
     Fri, 1 Mar 2013 17:10:45 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21HAiq8019330;
     Fri, 1 Mar 2013 17:10:44 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011710.r21HAiq8019330@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 17:10:44 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247555 - in stable/9/sys: dev/usb/net kern pci sys
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 17:10:46 -0000
    
    Author: jhb
    Date: Fri Mar  1 17:10:43 2013
    New Revision: 247555
    URL: http://svnweb.freebsd.org/changeset/base/247555
    
    Log:
      MFC 246037:
      Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the
      compiler from caching their values in tight loops.
    
    Modified:
      stable/9/sys/dev/usb/net/if_cdce.c
      stable/9/sys/kern/kern_clock.c
      stable/9/sys/kern/kern_tc.c
      stable/9/sys/pci/ncr.c
      stable/9/sys/sys/kernel.h
      stable/9/sys/sys/time.h
    Directory Properties:
      stable/9/sys/   (props changed)
      stable/9/sys/dev/   (props changed)
    
    Modified: stable/9/sys/dev/usb/net/if_cdce.c
    ==============================================================================
    --- stable/9/sys/dev/usb/net/if_cdce.c	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/dev/usb/net/if_cdce.c	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -500,6 +500,7 @@ cdce_attach(device_t dev)
     	const struct usb_interface_descriptor *id;
     	const struct usb_cdc_ethernet_descriptor *ued;
     	const struct usb_config *pcfg;
    +	uint32_t seed;
     	int error;
     	uint8_t i;
     	uint8_t data_iface_no;
    @@ -612,8 +613,9 @@ alloc_transfers:
     		/* fake MAC address */
     
     		device_printf(dev, "faking MAC address\n");
    +		seed = ticks;
     		sc->sc_ue.ue_eaddr[0] = 0x2a;
    -		memcpy(&sc->sc_ue.ue_eaddr[1], &ticks, sizeof(uint32_t));
    +		memcpy(&sc->sc_ue.ue_eaddr[1], &seed, sizeof(uint32_t));
     		sc->sc_ue.ue_eaddr[5] = device_get_unit(dev);
     
     	} else {
    
    Modified: stable/9/sys/kern/kern_clock.c
    ==============================================================================
    --- stable/9/sys/kern/kern_clock.c	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/kern/kern_clock.c	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -381,7 +381,7 @@ static void watchdog_config(void *, u_in
     int	stathz;
     int	profhz;
     int	profprocs;
    -int	ticks;
    +volatile int	ticks;
     int	psratio;
     
     static DPCPU_DEFINE(int, pcputicks);	/* Per-CPU version of ticks. */
    @@ -468,7 +468,7 @@ void
     hardclock(int usermode, uintfptr_t pc)
     {
     
    -	atomic_add_int((volatile int *)&ticks, 1);
    +	atomic_add_int(&ticks, 1);
     	hardclock_cpu(usermode);
     	tc_ticktock(1);
     	cpu_tick_calibration();
    
    Modified: stable/9/sys/kern/kern_tc.c
    ==============================================================================
    --- stable/9/sys/kern/kern_tc.c	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/kern/kern_tc.c	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -91,8 +91,8 @@ static struct timecounter *timecounters 
     
     int tc_min_ticktock_freq = 1;
     
    -time_t time_second = 1;
    -time_t time_uptime = 1;
    +volatile time_t time_second = 1;
    +volatile time_t time_uptime = 1;
     
     struct bintime boottimebin;
     struct timeval boottime;
    
    Modified: stable/9/sys/pci/ncr.c
    ==============================================================================
    --- stable/9/sys/pci/ncr.c	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/pci/ncr.c	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -1386,7 +1386,7 @@ static char *ncr_name (ncb_p np)
      * Kernel variables referenced in the scripts.
      * THESE MUST ALL BE ALIGNED TO A 4-BYTE BOUNDARY.
      */
    -static void *script_kvars[] =
    +static volatile void *script_kvars[] =
     	{ &time_second, &ticks, &ncr_cache };
     
     static	struct script script0 = {
    
    Modified: stable/9/sys/sys/kernel.h
    ==============================================================================
    --- stable/9/sys/sys/kernel.h	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/sys/kernel.h	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -63,7 +63,7 @@ extern int psratio;			/* ratio: prof / s
     extern int stathz;			/* statistics clock's frequency */
     extern int profhz;			/* profiling clock's frequency */
     extern int profprocs;			/* number of process's profiling */
    -extern int ticks;
    +extern volatile int ticks;
     
     #endif /* _KERNEL */
     
    
    Modified: stable/9/sys/sys/time.h
    ==============================================================================
    --- stable/9/sys/sys/time.h	Fri Mar  1 16:19:09 2013	(r247554)
    +++ stable/9/sys/sys/time.h	Fri Mar  1 17:10:43 2013	(r247555)
    @@ -281,8 +281,8 @@ struct clockinfo {
     void	inittodr(time_t base);
     void	resettodr(void);
     
    -extern time_t	time_second;
    -extern time_t	time_uptime;
    +extern volatile time_t	time_second;
    +extern volatile time_t	time_uptime;
     extern struct bintime boottimebin;
     extern struct timeval boottime;
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 17:10:53 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id B43063B8;
     Fri,  1 Mar 2013 17:10:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id A6251A4B;
     Fri,  1 Mar 2013 17:10:53 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21HAr82019408;
     Fri, 1 Mar 2013 17:10:53 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21HAqHR019398;
     Fri, 1 Mar 2013 17:10:52 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011710.r21HAqHR019398@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 17:10:52 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247556 - in stable/8/sys: dev/usb/net kern pci sys
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 17:10:53 -0000
    
    Author: jhb
    Date: Fri Mar  1 17:10:52 2013
    New Revision: 247556
    URL: http://svnweb.freebsd.org/changeset/base/247556
    
    Log:
      MFC 246037:
      Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the
      compiler from caching their values in tight loops.
    
    Modified:
      stable/8/sys/dev/usb/net/if_cdce.c
      stable/8/sys/kern/kern_clock.c
      stable/8/sys/kern/kern_tc.c
      stable/8/sys/pci/ncr.c
      stable/8/sys/sys/kernel.h
      stable/8/sys/sys/time.h
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/dev/   (props changed)
      stable/8/sys/dev/usb/   (props changed)
      stable/8/sys/kern/   (props changed)
      stable/8/sys/pci/   (props changed)
      stable/8/sys/sys/   (props changed)
    
    Modified: stable/8/sys/dev/usb/net/if_cdce.c
    ==============================================================================
    --- stable/8/sys/dev/usb/net/if_cdce.c	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/dev/usb/net/if_cdce.c	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -500,6 +500,7 @@ cdce_attach(device_t dev)
     	const struct usb_interface_descriptor *id;
     	const struct usb_cdc_ethernet_descriptor *ued;
     	const struct usb_config *pcfg;
    +	uint32_t seed;
     	int error;
     	uint8_t i;
     	uint8_t data_iface_no;
    @@ -612,8 +613,9 @@ alloc_transfers:
     		/* fake MAC address */
     
     		device_printf(dev, "faking MAC address\n");
    +		seed = ticks;
     		sc->sc_ue.ue_eaddr[0] = 0x2a;
    -		memcpy(&sc->sc_ue.ue_eaddr[1], &ticks, sizeof(uint32_t));
    +		memcpy(&sc->sc_ue.ue_eaddr[1], &seed, sizeof(uint32_t));
     		sc->sc_ue.ue_eaddr[5] = device_get_unit(dev);
     
     	} else {
    
    Modified: stable/8/sys/kern/kern_clock.c
    ==============================================================================
    --- stable/8/sys/kern/kern_clock.c	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/kern/kern_clock.c	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -379,7 +379,7 @@ static void watchdog_config(void *, u_in
     int	stathz;
     int	profhz;
     int	profprocs;
    -int	ticks;
    +volatile int	ticks;
     int	psratio;
     
     /*
    @@ -461,7 +461,7 @@ void
     hardclock(int usermode, uintfptr_t pc)
     {
     
    -	atomic_add_int((volatile int *)&ticks, 1);
    +	atomic_add_int(&ticks, 1);
     	hardclock_cpu(usermode);
     	tc_ticktock();
     	/*
    
    Modified: stable/8/sys/kern/kern_tc.c
    ==============================================================================
    --- stable/8/sys/kern/kern_tc.c	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/kern/kern_tc.c	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -87,8 +87,8 @@ static struct timehands *volatile timeha
     struct timecounter *timecounter = &dummy_timecounter;
     static struct timecounter *timecounters = &dummy_timecounter;
     
    -time_t time_second = 1;
    -time_t time_uptime = 1;
    +volatile time_t time_second = 1;
    +volatile time_t time_uptime = 1;
     
     static struct bintime boottimebin;
     struct timeval boottime;
    
    Modified: stable/8/sys/pci/ncr.c
    ==============================================================================
    --- stable/8/sys/pci/ncr.c	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/pci/ncr.c	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -1386,7 +1386,7 @@ static char *ncr_name (ncb_p np)
      * Kernel variables referenced in the scripts.
      * THESE MUST ALL BE ALIGNED TO A 4-BYTE BOUNDARY.
      */
    -static void *script_kvars[] =
    +static volatile void *script_kvars[] =
     	{ &time_second, &ticks, &ncr_cache };
     
     static	struct script script0 = {
    
    Modified: stable/8/sys/sys/kernel.h
    ==============================================================================
    --- stable/8/sys/sys/kernel.h	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/sys/kernel.h	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -63,7 +63,7 @@ extern int psratio;			/* ratio: prof / s
     extern int stathz;			/* statistics clock's frequency */
     extern int profhz;			/* profiling clock's frequency */
     extern int profprocs;			/* number of process's profiling */
    -extern int ticks;
    +extern volatile int ticks;
     
     #endif /* _KERNEL */
     
    
    Modified: stable/8/sys/sys/time.h
    ==============================================================================
    --- stable/8/sys/sys/time.h	Fri Mar  1 17:10:43 2013	(r247555)
    +++ stable/8/sys/sys/time.h	Fri Mar  1 17:10:52 2013	(r247556)
    @@ -262,8 +262,8 @@ struct clockinfo {
     void	inittodr(time_t base);
     void	resettodr(void);
     
    -extern time_t	time_second;
    -extern time_t	time_uptime;
    +extern volatile time_t	time_second;
    +extern volatile time_t	time_uptime;
     extern struct timeval boottime;
     
     /*
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 17:37:59 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id EF9D9CB9;
     Fri,  1 Mar 2013 17:37:58 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id DFA21B62;
     Fri,  1 Mar 2013 17:37:58 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21Hbwsf026404;
     Fri, 1 Mar 2013 17:37:58 GMT (envelope-from dim@svn.freebsd.org)
    Received: (from dim@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21Hbw8i026402;
     Fri, 1 Mar 2013 17:37:58 GMT (envelope-from dim@svn.freebsd.org)
    Message-Id: <201303011737.r21Hbw8i026402@svn.freebsd.org>
    From: Dimitry Andric 
    Date: Fri, 1 Mar 2013 17:37:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247557 - stable/9/contrib/llvm/tools/clang/lib/Driver
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 17:37:59 -0000
    
    Author: dim
    Date: Fri Mar  1 17:37:57 2013
    New Revision: 247557
    URL: http://svnweb.freebsd.org/changeset/base/247557
    
    Log:
      MFC r247166:
      
      Pull in r172354 from upstream clang trunk:
      
        Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
        flag information down from the Clang driver into the Gold linker plugin
        for LTO. This allows specifying -march on the linker commandline and
        should hopefully have it pass all the way through to the LTO optimizer.
      
        Fixes PR14697.
      
      Pull in r175919 from upstream clang trunk:
      
        Driver: Pass down the -march setting down to -cc1as on x86 too.
      
        The assembler historically didn't make use of any target features, but this has
        changed when support for old CPUs that don't support long nops was added.
      
      This should fix the long nops that still occurred in crt*.o, and
      possibly other object files, if the system was compiled for a CPU that
      does not support those, such as Geode.
      
      Note that gcc on i386 also does not pass through any -march, -mcpu or
      -mtune setting to gas, but this has not caused any trouble yet, because
      gas defaults to i386.
      
      Reported by:	lev
    
    Modified:
      stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
      stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h
    Directory Properties:
      stable/9/contrib/llvm/   (props changed)
      stable/9/contrib/llvm/tools/clang/   (props changed)
    
    Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
    ==============================================================================
    --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Fri Mar  1 17:10:52 2013	(r247556)
    +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Fri Mar  1 17:37:57 2013	(r247557)
    @@ -1114,10 +1114,59 @@ void Clang::AddSparcTargetArgs(const Arg
       }
     }
     
    +static const char *getX86TargetCPU(const ArgList &Args,
    +                                   const llvm::Triple &Triple) {
    +  if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
    +    if (StringRef(A->getValue()) != "native")
    +      return A->getValue();
    +
    +    // FIXME: Reject attempts to use -march=native unless the target matches
    +    // the host.
    +    //
    +    // FIXME: We should also incorporate the detected target features for use
    +    // with -native.
    +    std::string CPU = llvm::sys::getHostCPUName();
    +    if (!CPU.empty() && CPU != "generic")
    +      return Args.MakeArgString(CPU);
    +  }
    +
    +  // Select the default CPU if none was given (or detection failed).
    +
    +  if (Triple.getArch() != llvm::Triple::x86_64 &&
    +      Triple.getArch() != llvm::Triple::x86)
    +    return 0; // This routine is only handling x86 targets.
    +
    +  bool Is64Bit = Triple.getArch() == llvm::Triple::x86_64;
    +
    +  // FIXME: Need target hooks.
    +  if (Triple.isOSDarwin())
    +    return Is64Bit ? "core2" : "yonah";
    +
    +  // Everything else goes to x86-64 in 64-bit mode.
    +  if (Is64Bit)
    +    return "x86-64";
    +
    +  if (Triple.getOSName().startswith("haiku"))
    +    return "i586";
    +  if (Triple.getOSName().startswith("openbsd"))
    +    return "i486";
    +  if (Triple.getOSName().startswith("bitrig"))
    +    return "i686";
    +  if (Triple.getOSName().startswith("freebsd"))
    +    return "i486";
    +  if (Triple.getOSName().startswith("netbsd"))
    +    return "i486";
    +  // All x86 devices running Android have core2 as their common
    +  // denominator. This makes a better choice than pentium4.
    +  if (Triple.getEnvironment() == llvm::Triple::Android)
    +    return "core2";
    +
    +  // Fallback to p4.
    +  return "pentium4";
    +}
    +
     void Clang::AddX86TargetArgs(const ArgList &Args,
                                  ArgStringList &CmdArgs) const {
    -  const bool isAndroid =
    -    getToolChain().getTriple().getEnvironment() == llvm::Triple::Android;
       if (!Args.hasFlag(options::OPT_mred_zone,
                         options::OPT_mno_red_zone,
                         true) ||
    @@ -1130,65 +1179,7 @@ void Clang::AddX86TargetArgs(const ArgLi
                        false))
         CmdArgs.push_back("-no-implicit-float");
     
    -  const char *CPUName = 0;
    -  if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
    -    if (StringRef(A->getValue()) == "native") {
    -      // FIXME: Reject attempts to use -march=native unless the target matches
    -      // the host.
    -      //
    -      // FIXME: We should also incorporate the detected target features for use
    -      // with -native.
    -      std::string CPU = llvm::sys::getHostCPUName();
    -      if (!CPU.empty() && CPU != "generic")
    -        CPUName = Args.MakeArgString(CPU);
    -    } else
    -      CPUName = A->getValue();
    -  }
    -
    -  // Select the default CPU if none was given (or detection failed).
    -  if (!CPUName) {
    -    // FIXME: Need target hooks.
    -    if (getToolChain().getTriple().isOSDarwin()) {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "core2";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "yonah";
    -    } else if (getToolChain().getOS().startswith("haiku"))  {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "i586";
    -    } else if (getToolChain().getOS().startswith("openbsd"))  {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "i486";
    -    } else if (getToolChain().getOS().startswith("bitrig"))  {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "i686";
    -    } else if (getToolChain().getOS().startswith("freebsd"))  {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "i486";
    -    } else if (getToolChain().getOS().startswith("netbsd"))  {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        CPUName = "i486";
    -    } else {
    -      if (getToolChain().getArch() == llvm::Triple::x86_64)
    -        CPUName = "x86-64";
    -      else if (getToolChain().getArch() == llvm::Triple::x86)
    -        // All x86 devices running Android have core2 as their common
    -        // denominator. This makes a better choice than pentium4.
    -        CPUName = isAndroid ? "core2" : "pentium4";
    -    }
    -  }
    -
    -  if (CPUName) {
    +  if (const char *CPUName = getX86TargetCPU(Args, getToolChain().getTriple())) {
         CmdArgs.push_back("-target-cpu");
         CmdArgs.push_back(CPUName);
       }
    @@ -3091,6 +3082,15 @@ void ClangAs::AddARMTargetArgs(const Arg
         addFPMathArgs(D, A, Args, CmdArgs, getARMTargetCPU(Args, Triple));
     }
     
    +void ClangAs::AddX86TargetArgs(const ArgList &Args,
    +                               ArgStringList &CmdArgs) const {
    +  // Set the CPU based on -march=.
    +  if (const char *CPUName = getX86TargetCPU(Args, getToolChain().getTriple())) {
    +    CmdArgs.push_back("-target-cpu");
    +    CmdArgs.push_back(CPUName);
    +  }
    +}
    +
     /// Add options related to the Objective-C runtime/ABI.
     ///
     /// Returns true if the runtime is non-fragile.
    @@ -3261,6 +3261,11 @@ void ClangAs::ConstructJob(Compilation &
       case llvm::Triple::thumb:
         AddARMTargetArgs(Args, CmdArgs);
         break;
    +
    +  case llvm::Triple::x86:
    +  case llvm::Triple::x86_64:
    +    AddX86TargetArgs(Args, CmdArgs);
    +    break;
       }
     
       // Ignore explicit -force_cpusubtype_ALL option.
    @@ -6068,8 +6073,27 @@ void linuxtools::Link::ConstructJob(Comp
         CmdArgs.push_back("-plugin");
         std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
         CmdArgs.push_back(Args.MakeArgString(Plugin));
    +
    +    // Try to pass driver level flags relevant to LTO code generation down to
    +    // the plugin.
    +
    +    // Handle architecture-specific flags for selecting CPU variants.
    +    if (ToolChain.getArch() == llvm::Triple::x86 ||
    +        ToolChain.getArch() == llvm::Triple::x86_64)
    +      CmdArgs.push_back(
    +          Args.MakeArgString(Twine("-plugin-opt=mcpu=") +
    +                             getX86TargetCPU(Args, ToolChain.getTriple())));
    +    else if (ToolChain.getArch() == llvm::Triple::arm ||
    +             ToolChain.getArch() == llvm::Triple::thumb)
    +      CmdArgs.push_back(
    +          Args.MakeArgString(Twine("-plugin-opt=mcpu=") +
    +                             getARMTargetCPU(Args, ToolChain.getTriple())));
    +
    +    // FIXME: Factor out logic for MIPS, PPC, and other targets to support this
    +    // as well.
       }
     
    +
       if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle))
         CmdArgs.push_back("--no-demangle");
     
    
    Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h
    ==============================================================================
    --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h	Fri Mar  1 17:10:52 2013	(r247556)
    +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h	Fri Mar  1 17:37:57 2013	(r247557)
    @@ -68,6 +68,7 @@ namespace tools {
       /// \brief Clang integrated assembler tool.
       class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool {
         void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
    +    void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
       public:
         ClangAs(const ToolChain &TC) : Tool("clang::as",
                                             "clang integrated assembler", TC) {}
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 18:39:47 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id EC6EDB5D;
     Fri,  1 Mar 2013 18:39:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id DDF67F20;
     Fri,  1 Mar 2013 18:39:47 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21IdluV044651;
     Fri, 1 Mar 2013 18:39:47 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21Idlr6044648;
     Fri, 1 Mar 2013 18:39:47 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011839.r21Idlr6044648@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 18:39:47 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247558 - in stable/9/sys: amd64/linux32 compat/linux
     i386/linux
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 18:39:48 -0000
    
    Author: jhb
    Date: Fri Mar  1 18:39:46 2013
    New Revision: 247558
    URL: http://svnweb.freebsd.org/changeset/base/247558
    
    Log:
      MFC 245849:
      Don't assume that all Linux TCP-level socket options are identical to
      FreeBSD TCP-level socket options (only the first two are).  Instead,
      using a mapping function and fail unsupported options as we do for other
      socket option levels.
    
    Modified:
      stable/9/sys/amd64/linux32/linux.h
      stable/9/sys/compat/linux/linux_socket.c
      stable/9/sys/i386/linux/linux.h
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/amd64/linux32/linux.h
    ==============================================================================
    --- stable/9/sys/amd64/linux32/linux.h	Fri Mar  1 17:37:57 2013	(r247557)
    +++ stable/9/sys/amd64/linux32/linux.h	Fri Mar  1 18:39:46 2013	(r247558)
    @@ -725,6 +725,13 @@ union l_semun {
     #define	LINUX_IP_ADD_MEMBERSHIP		35
     #define	LINUX_IP_DROP_MEMBERSHIP	36
     
    +#define	LINUX_TCP_NODELAY	1
    +#define	LINUX_TCP_MAXSEG	2
    +#define	LINUX_TCP_KEEPIDLE	4
    +#define	LINUX_TCP_KEEPINTVL	5
    +#define	LINUX_TCP_KEEPCNT	6
    +#define	LINUX_TCP_MD5SIG	14
    +
     struct l_sockaddr {
     	l_ushort	sa_family;
     	char		sa_data[14];
    
    Modified: stable/9/sys/compat/linux/linux_socket.c
    ==============================================================================
    --- stable/9/sys/compat/linux/linux_socket.c	Fri Mar  1 17:37:57 2013	(r247557)
    +++ stable/9/sys/compat/linux/linux_socket.c	Fri Mar  1 18:39:46 2013	(r247558)
    @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    +#include 
     #ifdef INET6
     #include 
     #include 
    @@ -326,6 +327,27 @@ linux_to_bsd_so_sockopt(int opt)
     }
     
     static int
    +linux_to_bsd_tcp_sockopt(int opt)
    +{
    +
    +	switch (opt) {
    +	case LINUX_TCP_NODELAY:
    +		return (TCP_NODELAY);
    +	case LINUX_TCP_MAXSEG:
    +		return (TCP_MAXSEG);
    +	case LINUX_TCP_KEEPIDLE:
    +		return (TCP_KEEPIDLE);
    +	case LINUX_TCP_KEEPINTVL:
    +		return (TCP_KEEPINTVL);
    +	case LINUX_TCP_KEEPCNT:
    +		return (TCP_KEEPCNT);
    +	case LINUX_TCP_MD5SIG:
    +		return (TCP_MD5SIG);
    +	}
    +	return (-1);
    +}
    +
    +static int
     linux_to_bsd_msg_flags(int flags)
     {
     	int ret_flags = 0;
    @@ -1496,8 +1518,7 @@ linux_setsockopt(struct thread *td, stru
     		name = linux_to_bsd_ip_sockopt(args->optname);
     		break;
     	case IPPROTO_TCP:
    -		/* Linux TCP option values match BSD's */
    -		name = args->optname;
    +		name = linux_to_bsd_tcp_sockopt(args->optname);
     		break;
     	default:
     		name = -1;
    @@ -1591,8 +1612,7 @@ linux_getsockopt(struct thread *td, stru
     		name = linux_to_bsd_ip_sockopt(args->optname);
     		break;
     	case IPPROTO_TCP:
    -		/* Linux TCP option values match BSD's */
    -		name = args->optname;
    +		name = linux_to_bsd_tcp_sockopt(args->optname);
     		break;
     	default:
     		name = -1;
    
    Modified: stable/9/sys/i386/linux/linux.h
    ==============================================================================
    --- stable/9/sys/i386/linux/linux.h	Fri Mar  1 17:37:57 2013	(r247557)
    +++ stable/9/sys/i386/linux/linux.h	Fri Mar  1 18:39:46 2013	(r247558)
    @@ -701,6 +701,13 @@ union l_semun {
     #define	LINUX_IP_ADD_MEMBERSHIP		35
     #define	LINUX_IP_DROP_MEMBERSHIP	36
     
    +#define	LINUX_TCP_NODELAY	1
    +#define	LINUX_TCP_MAXSEG	2
    +#define	LINUX_TCP_KEEPIDLE	4
    +#define	LINUX_TCP_KEEPINTVL	5
    +#define	LINUX_TCP_KEEPCNT	6
    +#define	LINUX_TCP_MD5SIG	14
    +
     struct l_sockaddr {
     	l_ushort	sa_family;
     	char		sa_data[14];
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 18:39:56 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 760E0CBB;
     Fri,  1 Mar 2013 18:39:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 688C5F22;
     Fri,  1 Mar 2013 18:39:56 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21IduOJ044708;
     Fri, 1 Mar 2013 18:39:56 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21IdtfS044705;
     Fri, 1 Mar 2013 18:39:55 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011839.r21IdtfS044705@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 18:39:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247559 - in stable/8/sys: amd64/linux32 compat/linux
     i386/linux
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 18:39:56 -0000
    
    Author: jhb
    Date: Fri Mar  1 18:39:55 2013
    New Revision: 247559
    URL: http://svnweb.freebsd.org/changeset/base/247559
    
    Log:
      MFC 245849:
      Don't assume that all Linux TCP-level socket options are identical to
      FreeBSD TCP-level socket options (only the first two are).  Instead,
      using a mapping function and fail unsupported options as we do for other
      socket option levels.
    
    Modified:
      stable/8/sys/amd64/linux32/linux.h
      stable/8/sys/compat/linux/linux_socket.c
      stable/8/sys/i386/linux/linux.h
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/amd64/   (props changed)
      stable/8/sys/compat/   (props changed)
      stable/8/sys/i386/   (props changed)
    
    Modified: stable/8/sys/amd64/linux32/linux.h
    ==============================================================================
    --- stable/8/sys/amd64/linux32/linux.h	Fri Mar  1 18:39:46 2013	(r247558)
    +++ stable/8/sys/amd64/linux32/linux.h	Fri Mar  1 18:39:55 2013	(r247559)
    @@ -721,6 +721,13 @@ union l_semun {
     #define	LINUX_IP_ADD_MEMBERSHIP		35
     #define	LINUX_IP_DROP_MEMBERSHIP	36
     
    +#define	LINUX_TCP_NODELAY	1
    +#define	LINUX_TCP_MAXSEG	2
    +#define	LINUX_TCP_KEEPIDLE	4
    +#define	LINUX_TCP_KEEPINTVL	5
    +#define	LINUX_TCP_KEEPCNT	6
    +#define	LINUX_TCP_MD5SIG	14
    +
     struct l_sockaddr {
     	l_ushort	sa_family;
     	char		sa_data[14];
    
    Modified: stable/8/sys/compat/linux/linux_socket.c
    ==============================================================================
    --- stable/8/sys/compat/linux/linux_socket.c	Fri Mar  1 18:39:46 2013	(r247558)
    +++ stable/8/sys/compat/linux/linux_socket.c	Fri Mar  1 18:39:55 2013	(r247559)
    @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    +#include 
     #ifdef INET6
     #include 
     #include 
    @@ -334,6 +335,21 @@ linux_to_bsd_so_sockopt(int opt)
     }
     
     static int
    +linux_to_bsd_tcp_sockopt(int opt)
    +{
    +
    +	switch (opt) {
    +	case LINUX_TCP_NODELAY:
    +		return (TCP_NODELAY);
    +	case LINUX_TCP_MAXSEG:
    +		return (TCP_MAXSEG);
    +	case LINUX_TCP_MD5SIG:
    +		return (TCP_MD5SIG);
    +	}
    +	return (-1);
    +}
    +
    +static int
     linux_to_bsd_msg_flags(int flags)
     {
     	int ret_flags = 0;
    @@ -1504,8 +1520,7 @@ linux_setsockopt(struct thread *td, stru
     		name = linux_to_bsd_ip_sockopt(args->optname);
     		break;
     	case IPPROTO_TCP:
    -		/* Linux TCP option values match BSD's */
    -		name = args->optname;
    +		name = linux_to_bsd_tcp_sockopt(args->optname);
     		break;
     	default:
     		name = -1;
    @@ -1599,8 +1614,7 @@ linux_getsockopt(struct thread *td, stru
     		name = linux_to_bsd_ip_sockopt(args->optname);
     		break;
     	case IPPROTO_TCP:
    -		/* Linux TCP option values match BSD's */
    -		name = args->optname;
    +		name = linux_to_bsd_tcp_sockopt(args->optname);
     		break;
     	default:
     		name = -1;
    
    Modified: stable/8/sys/i386/linux/linux.h
    ==============================================================================
    --- stable/8/sys/i386/linux/linux.h	Fri Mar  1 18:39:46 2013	(r247558)
    +++ stable/8/sys/i386/linux/linux.h	Fri Mar  1 18:39:55 2013	(r247559)
    @@ -697,6 +697,13 @@ union l_semun {
     #define	LINUX_IP_ADD_MEMBERSHIP		35
     #define	LINUX_IP_DROP_MEMBERSHIP	36
     
    +#define	LINUX_TCP_NODELAY	1
    +#define	LINUX_TCP_MAXSEG	2
    +#define	LINUX_TCP_KEEPIDLE	4
    +#define	LINUX_TCP_KEEPINTVL	5
    +#define	LINUX_TCP_KEEPCNT	6
    +#define	LINUX_TCP_MD5SIG	14
    +
     struct l_sockaddr {
     	l_ushort	sa_family;
     	char		sa_data[14];
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 19:01:41 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 2B1A36A7;
     Fri,  1 Mar 2013 19:01:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 1CE0E1018;
     Fri,  1 Mar 2013 19:01:41 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21J1eu3052710;
     Fri, 1 Mar 2013 19:01:41 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21J1eGq052708;
     Fri, 1 Mar 2013 19:01:40 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011901.r21J1eGq052708@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 19:01:40 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247562 - stable/9/usr.sbin/tcpdrop
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 19:01:41 -0000
    
    Author: jhb
    Date: Fri Mar  1 19:01:40 2013
    New Revision: 247562
    URL: http://svnweb.freebsd.org/changeset/base/247562
    
    Log:
      MFC 246129:
      Allow the address and ports to be separated by a colon or period rather
      than a space to permit directly pasting the output of commands such as
      netstat and sockstat on the command line.
    
    Modified:
      stable/9/usr.sbin/tcpdrop/tcpdrop.8
      stable/9/usr.sbin/tcpdrop/tcpdrop.c
    Directory Properties:
      stable/9/usr.sbin/tcpdrop/   (props changed)
    
    Modified: stable/9/usr.sbin/tcpdrop/tcpdrop.8
    ==============================================================================
    --- stable/9/usr.sbin/tcpdrop/tcpdrop.8	Fri Mar  1 18:49:14 2013	(r247561)
    +++ stable/9/usr.sbin/tcpdrop/tcpdrop.8	Fri Mar  1 19:01:40 2013	(r247562)
    @@ -17,7 +17,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd March 24, 2009
    +.Dd January 30, 2013
     .Dt TCPDROP 8
     .Os
     .Sh NAME
    @@ -62,6 +62,9 @@ will be dropped.
     .Pp
     Addresses and ports may be specified by name or numeric value.
     Both IPv4 and IPv6 address formats are supported.
    +.Pp
    +The addresses and ports may be separated by periods or colons
    +instead of spaces.
     .Sh EXIT STATUS
     .Ex -std
     .Sh EXAMPLES
    
    Modified: stable/9/usr.sbin/tcpdrop/tcpdrop.c
    ==============================================================================
    --- stable/9/usr.sbin/tcpdrop/tcpdrop.c	Fri Mar  1 18:49:14 2013	(r247561)
    +++ stable/9/usr.sbin/tcpdrop/tcpdrop.c	Fri Mar  1 19:01:40 2013	(r247562)
    @@ -50,6 +50,7 @@ struct host_service {
     
     static bool tcpdrop_list_commands = false;
     
    +static char *findport(const char *);
     static struct xinpgen *getxpcblist(const char *);
     static void sockinfo(const struct sockaddr *, struct host_service *);
     static bool tcpdrop(const struct sockaddr *, const struct sockaddr *);
    @@ -65,6 +66,7 @@ static void usage(void);
     int
     main(int argc, char *argv[])
     {
    +	char *lport, *fport;
     	bool dropall;
     	int ch;
     
    @@ -93,15 +95,43 @@ main(int argc, char *argv[])
     		exit(0);
     	}
     
    -	if (argc != 4 || tcpdrop_list_commands)
    +	if ((argc != 2 && argc != 4) || tcpdrop_list_commands)
     		usage();
     
    -	if (!tcpdropbyname(argv[0], argv[1], argv[2], argv[3]))
    +	if (argc == 2) {
    +		lport = findport(argv[0]);
    +		fport = findport(argv[1]);
    +		if (lport == NULL || lport[1] == '\0' || fport == NULL ||
    +		    fport[1] == '\0')
    +			usage();
    +		*lport++ = '\0';
    +		*fport++ = '\0';
    +		if (!tcpdropbyname(argv[0], lport, argv[1], fport))
    +			exit(1);
    +	} else if (!tcpdropbyname(argv[0], argv[1], argv[2], argv[3]))
     		exit(1);
     
     	exit(0);
     }
     
    +static char *
    +findport(const char *arg)
    +{
    +	char *dot, *colon;
    +
    +	/* A strrspn() or strrpbrk() would be nice. */
    +	dot = strrchr(arg, '.');
    +	colon = strrchr(arg, ':');
    +	if (dot == NULL)
    +		return (colon);
    +	if (colon == NULL)
    +		return (dot);
    +	if (dot < colon)
    +		return (colon);
    +	else
    +		return (dot);
    +}
    +
     static struct xinpgen *
     getxpcblist(const char *name)
     {
    @@ -237,7 +267,7 @@ tcpdropbyname(const char *lhost, const c
     	error = getaddrinfo(fhost, fport, &hints, &foreign);
     	if (error != 0) {
     		freeaddrinfo(local); /* XXX gratuitous */
    -		errx(1, "getaddrinfo: %s port %s: %s", lhost, lport,
    +		errx(1, "getaddrinfo: %s port %s: %s", fhost, fport,
     		    gai_strerror(error));
     	}
     
    @@ -318,6 +348,8 @@ usage(void)
     {
     	fprintf(stderr,
     "usage: tcpdrop local-address local-port foreign-address foreign-port\n"
    +"       tcpdrop local-address:local-port foreign-address:foreign-port\n"
    +"       tcpdrop local-address.local-port foreign-address.foreign-port\n"
     "       tcpdrop [-l] -a\n");
     	exit(1);
     }
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 19:01:53 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id AF1BD7C5;
     Fri,  1 Mar 2013 19:01:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id A20A71019;
     Fri,  1 Mar 2013 19:01:53 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21J1rJY052785;
     Fri, 1 Mar 2013 19:01:53 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21J1rJ9052783;
     Fri, 1 Mar 2013 19:01:53 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011901.r21J1rJ9052783@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 19:01:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247563 - stable/8/usr.sbin/tcpdrop
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 19:01:53 -0000
    
    Author: jhb
    Date: Fri Mar  1 19:01:52 2013
    New Revision: 247563
    URL: http://svnweb.freebsd.org/changeset/base/247563
    
    Log:
      MFC 246129:
      Allow the address and ports to be separated by a colon or period rather
      than a space to permit directly pasting the output of commands such as
      netstat and sockstat on the command line.
    
    Modified:
      stable/8/usr.sbin/tcpdrop/tcpdrop.8
      stable/8/usr.sbin/tcpdrop/tcpdrop.c
    Directory Properties:
      stable/8/usr.sbin/tcpdrop/   (props changed)
    
    Modified: stable/8/usr.sbin/tcpdrop/tcpdrop.8
    ==============================================================================
    --- stable/8/usr.sbin/tcpdrop/tcpdrop.8	Fri Mar  1 19:01:40 2013	(r247562)
    +++ stable/8/usr.sbin/tcpdrop/tcpdrop.8	Fri Mar  1 19:01:52 2013	(r247563)
    @@ -17,7 +17,7 @@
     .\"
     .\" $FreeBSD$
     .\"
    -.Dd March 24, 2009
    +.Dd January 30, 2013
     .Dt TCPDROP 8
     .Os
     .Sh NAME
    @@ -62,6 +62,9 @@ will be dropped.
     .Pp
     Addresses and ports may be specified by name or numeric value.
     Both IPv4 and IPv6 address formats are supported.
    +.Pp
    +The addresses and ports may be separated by periods or colons
    +instead of spaces.
     .Sh EXIT STATUS
     .Ex -std
     .Sh EXAMPLES
    
    Modified: stable/8/usr.sbin/tcpdrop/tcpdrop.c
    ==============================================================================
    --- stable/8/usr.sbin/tcpdrop/tcpdrop.c	Fri Mar  1 19:01:40 2013	(r247562)
    +++ stable/8/usr.sbin/tcpdrop/tcpdrop.c	Fri Mar  1 19:01:52 2013	(r247563)
    @@ -49,6 +49,7 @@ struct host_service {
     
     static bool tcpdrop_list_commands = false;
     
    +static char *findport(const char *);
     static struct xinpgen *getxpcblist(const char *);
     static void sockinfo(const struct sockaddr *, struct host_service *);
     static bool tcpdrop(const struct sockaddr *, const struct sockaddr *);
    @@ -64,6 +65,7 @@ static void usage(void);
     int
     main(int argc, char *argv[])
     {
    +	char *lport, *fport;
     	bool dropall;
     	int ch;
     
    @@ -92,15 +94,43 @@ main(int argc, char *argv[])
     		exit(0);
     	}
     
    -	if (argc != 4 || tcpdrop_list_commands)
    +	if ((argc != 2 && argc != 4) || tcpdrop_list_commands)
     		usage();
     
    -	if (!tcpdropbyname(argv[0], argv[1], argv[2], argv[3]))
    +	if (argc == 2) {
    +		lport = findport(argv[0]);
    +		fport = findport(argv[1]);
    +		if (lport == NULL || lport[1] == '\0' || fport == NULL ||
    +		    fport[1] == '\0')
    +			usage();
    +		*lport++ = '\0';
    +		*fport++ = '\0';
    +		if (!tcpdropbyname(argv[0], lport, argv[1], fport))
    +			exit(1);
    +	} else if (!tcpdropbyname(argv[0], argv[1], argv[2], argv[3]))
     		exit(1);
     
     	exit(0);
     }
     
    +static char *
    +findport(const char *arg)
    +{
    +	char *dot, *colon;
    +
    +	/* A strrspn() or strrpbrk() would be nice. */
    +	dot = strrchr(arg, '.');
    +	colon = strrchr(arg, ':');
    +	if (dot == NULL)
    +		return (colon);
    +	if (colon == NULL)
    +		return (dot);
    +	if (dot < colon)
    +		return (colon);
    +	else
    +		return (dot);
    +}
    +
     static struct xinpgen *
     getxpcblist(const char *name)
     {
    @@ -236,7 +266,7 @@ tcpdropbyname(const char *lhost, const c
     	error = getaddrinfo(fhost, fport, &hints, &foreign);
     	if (error != 0) {
     		freeaddrinfo(local); /* XXX gratuitous */
    -		errx(1, "getaddrinfo: %s port %s: %s", lhost, lport,
    +		errx(1, "getaddrinfo: %s port %s: %s", fhost, fport,
     		    gai_strerror(error));
     	}
     
    @@ -317,6 +347,8 @@ usage(void)
     {
     	fprintf(stderr,
     "usage: tcpdrop local-address local-port foreign-address foreign-port\n"
    +"       tcpdrop local-address:local-port foreign-address:foreign-port\n"
    +"       tcpdrop local-address.local-port foreign-address.foreign-port\n"
     "       tcpdrop [-l] -a\n");
     	exit(1);
     }
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 19:39:55 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id A65118C0;
     Fri,  1 Mar 2013 19:39:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 97B3411CD;
     Fri,  1 Mar 2013 19:39:55 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21Jdtan063628;
     Fri, 1 Mar 2013 19:39:55 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21JdtJE063625;
     Fri, 1 Mar 2013 19:39:55 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011939.r21JdtJE063625@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 19:39:55 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247566 - in stable/9: etc/mtree include usr.sbin/pciconf
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 19:39:55 -0000
    
    Author: jhb
    Date: Fri Mar  1 19:39:54 2013
    New Revision: 247566
    URL: http://svnweb.freebsd.org/changeset/base/247566
    
    Log:
      MFC 246367:
      Install  and  as userland headers
      in /usr/include.
    
    Modified:
      stable/9/etc/mtree/BSD.include.dist
      stable/9/include/Makefile
      stable/9/usr.sbin/pciconf/Makefile
    Directory Properties:
      stable/9/etc/   (props changed)
      stable/9/include/   (props changed)
      stable/9/usr.sbin/pciconf/   (props changed)
    
    Modified: stable/9/etc/mtree/BSD.include.dist
    ==============================================================================
    --- stable/9/etc/mtree/BSD.include.dist	Fri Mar  1 19:12:38 2013	(r247565)
    +++ stable/9/etc/mtree/BSD.include.dist	Fri Mar  1 19:39:54 2013	(r247566)
    @@ -96,6 +96,8 @@
         dev
             acpica
             ..
    +        agp
    +        ..
             an
             ..
             bktr
    @@ -128,6 +130,8 @@
             ..
             pbio
             ..
    +        pci
    +        ..
             powermac_nvram
             ..
             ppbus
    
    Modified: stable/9/include/Makefile
    ==============================================================================
    --- stable/9/include/Makefile	Fri Mar  1 19:12:38 2013	(r247565)
    +++ stable/9/include/Makefile	Fri Mar  1 19:39:54 2013	(r247566)
    @@ -42,9 +42,10 @@ LDIRS=	bsm cam geom net net80211 netatal
     	sys vm
     
     LSUBDIRS=	cam/ata cam/scsi \
    -	dev/acpica dev/an dev/bktr dev/ciss dev/filemon dev/firewire dev/hwpmc \
    +	dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
    +	dev/hwpmc \
     	dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \
    -	dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \
    +	dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \
     	dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \
     	fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \
     	${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \
    @@ -160,7 +161,7 @@ copies:
     	done
     .endif
     .endfor
    -.for i in ${LDIRS} ${LSUBDIRS:Ndev/acpica:Ndev/bktr} ${LSUBSUBDIRS}
    +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/pci} ${LSUBSUBDIRS}
     	cd ${.CURDIR}/../sys; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
     	    ${DESTDIR}${INCLUDEDIR}/$i
    @@ -168,9 +169,15 @@ copies:
     	cd ${.CURDIR}/../sys/dev/acpica; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
     	    ${DESTDIR}${INCLUDEDIR}/dev/acpica
    +	cd ${.CURDIR}/../sys/dev/agp; \
    +	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
    +	    ${DESTDIR}${INCLUDEDIR}/dev/agp
     	cd ${.CURDIR}/../sys/dev/bktr; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
     	    ${DESTDIR}${INCLUDEDIR}/dev/bktr
    +	cd ${.CURDIR}/../sys/dev/pci; \
    +	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
    +	    ${DESTDIR}${INCLUDEDIR}/dev/pci
     	cd ${.CURDIR}/../sys/contrib/altq/altq; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
     	    ${DESTDIR}${INCLUDEDIR}/altq
    @@ -227,7 +234,7 @@ symlinks:
     		ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
     	done
     .endfor
    -.for i in ${LSUBDIRS:Ndev/acpica:Ndev/bktr}
    +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/pci}
     	cd ${.CURDIR}/../sys/$i; \
     	for h in *.h; do \
     		ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
    @@ -238,11 +245,21 @@ symlinks:
     		ln -fs ../../../../sys/dev/acpica/$$h \
     		    ${DESTDIR}${INCLUDEDIR}/dev/acpica; \
     	done
    +	cd ${.CURDIR}/../sys/dev/agp; \
    +	for h in agpreg.h; do \
    +		ln -fs ../../../../sys/dev/agp/$$h \
    +		    ${DESTDIR}${INCLUDEDIR}/dev/agp; \
    +	done
     	cd ${.CURDIR}/../sys/dev/bktr; \
     	for h in ioctl_*.h; do \
     		ln -fs ../../../../sys/dev/bktr/$$h \
     		    ${DESTDIR}${INCLUDEDIR}/dev/bktr; \
     	done
    +	cd ${.CURDIR}/../sys/dev/pci; \
    +	for h in pcireg.h; do \
    +		ln -fs ../../../../sys/dev/pci/$$h \
    +		    ${DESTDIR}${INCLUDEDIR}/dev/pci; \
    +	done
     .for i in ${LSUBSUBDIRS}
     	cd ${.CURDIR}/../sys/$i; \
     	for h in *.h; do \
    
    Modified: stable/9/usr.sbin/pciconf/Makefile
    ==============================================================================
    --- stable/9/usr.sbin/pciconf/Makefile	Fri Mar  1 19:12:38 2013	(r247565)
    +++ stable/9/usr.sbin/pciconf/Makefile	Fri Mar  1 19:39:54 2013	(r247566)
    @@ -5,8 +5,6 @@ PROG=	pciconf
     SRCS=	pciconf.c cap.c err.c
     MAN=	pciconf.8
     
    -CFLAGS+= -I${.CURDIR}/../../sys
    -
     WARNS?=	3
     
     .include 
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 19:40:03 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 3BA35A11;
     Fri,  1 Mar 2013 19:40:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 2E1E111CE;
     Fri,  1 Mar 2013 19:40:03 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21Je3am063722;
     Fri, 1 Mar 2013 19:40:03 GMT (envelope-from jhb@svn.freebsd.org)
    Received: (from jhb@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21Je20Z063717;
     Fri, 1 Mar 2013 19:40:02 GMT (envelope-from jhb@svn.freebsd.org)
    Message-Id: <201303011940.r21Je20Z063717@svn.freebsd.org>
    From: John Baldwin 
    Date: Fri, 1 Mar 2013 19:40:02 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247567 - in stable/8: etc/mtree include usr.sbin/pciconf
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 19:40:03 -0000
    
    Author: jhb
    Date: Fri Mar  1 19:40:02 2013
    New Revision: 247567
    URL: http://svnweb.freebsd.org/changeset/base/247567
    
    Log:
      MFC 246367:
      Install  and  as userland headers
      in /usr/include.
    
    Modified:
      stable/8/etc/mtree/BSD.include.dist
      stable/8/include/Makefile
      stable/8/usr.sbin/pciconf/Makefile
    Directory Properties:
      stable/8/etc/   (props changed)
      stable/8/include/   (props changed)
      stable/8/usr.sbin/pciconf/   (props changed)
    
    Modified: stable/8/etc/mtree/BSD.include.dist
    ==============================================================================
    --- stable/8/etc/mtree/BSD.include.dist	Fri Mar  1 19:39:54 2013	(r247566)
    +++ stable/8/etc/mtree/BSD.include.dist	Fri Mar  1 19:40:02 2013	(r247567)
    @@ -88,6 +88,8 @@
         dev
             acpica
             ..
    +        agp
    +        ..
             an
             ..
             bktr
    @@ -118,6 +120,8 @@
             ..
             pbio
             ..
    +        pci
    +        ..
             powermac_nvram
             ..
             ppbus
    
    Modified: stable/8/include/Makefile
    ==============================================================================
    --- stable/8/include/Makefile	Fri Mar  1 19:39:54 2013	(r247566)
    +++ stable/8/include/Makefile	Fri Mar  1 19:40:02 2013	(r247567)
    @@ -39,9 +39,9 @@ LDIRS=	bsm cam geom net net80211 netatal
     	sys vm
     
     LSUBDIRS=	cam/ata cam/scsi \
    -	dev/acpica dev/an dev/bktr dev/ciss dev/firewire dev/hwpmc \
    +	dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/firewire dev/hwpmc \
     	dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \
    -	dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \
    +	dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \
     	dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \
     	fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \
     	${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \
    @@ -150,7 +150,7 @@ copies:
     	done
     .endif
     .endfor
    -.for i in ${LDIRS} ${LSUBDIRS:Ndev/acpica:Ndev/bktr} ${LSUBSUBDIRS}
    +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/pci} ${LSUBSUBDIRS}
     	cd ${.CURDIR}/../sys; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
     	    ${DESTDIR}${INCLUDEDIR}/$i
    @@ -158,9 +158,15 @@ copies:
     	cd ${.CURDIR}/../sys/dev/acpica; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
     	    ${DESTDIR}${INCLUDEDIR}/dev/acpica
    +	cd ${.CURDIR}/../sys/dev/agp; \
    +	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
    +	    ${DESTDIR}${INCLUDEDIR}/dev/agp
     	cd ${.CURDIR}/../sys/dev/bktr; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
     	    ${DESTDIR}${INCLUDEDIR}/dev/bktr
    +	cd ${.CURDIR}/../sys/dev/pci; \
    +	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
    +	    ${DESTDIR}${INCLUDEDIR}/dev/pci
     	cd ${.CURDIR}/../sys/contrib/altq/altq; \
     	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
     	    ${DESTDIR}${INCLUDEDIR}/altq
    @@ -215,7 +221,7 @@ symlinks:
     		ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
     	done
     .endfor
    -.for i in ${LSUBDIRS:Ndev/acpica:Ndev/bktr}
    +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/pci}
     	cd ${.CURDIR}/../sys/$i; \
     	for h in *.h; do \
     		ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
    @@ -226,11 +232,21 @@ symlinks:
     		ln -fs ../../../../sys/dev/acpica/$$h \
     		    ${DESTDIR}${INCLUDEDIR}/dev/acpica; \
     	done
    +	cd ${.CURDIR}/../sys/dev/agp; \
    +	for h in agpreg.h; do \
    +		ln -fs ../../../../sys/dev/agp/$$h \
    +		    ${DESTDIR}${INCLUDEDIR}/dev/agp; \
    +	done
     	cd ${.CURDIR}/../sys/dev/bktr; \
     	for h in ioctl_*.h; do \
     		ln -fs ../../../../sys/dev/bktr/$$h \
     		    ${DESTDIR}${INCLUDEDIR}/dev/bktr; \
     	done
    +	cd ${.CURDIR}/../sys/dev/pci; \
    +	for h in pcireg.h; do \
    +		ln -fs ../../../../sys/dev/pci/$$h \
    +		    ${DESTDIR}${INCLUDEDIR}/dev/pci; \
    +	done
     .for i in ${LSUBSUBDIRS}
     	cd ${.CURDIR}/../sys/$i; \
     	for h in *.h; do \
    
    Modified: stable/8/usr.sbin/pciconf/Makefile
    ==============================================================================
    --- stable/8/usr.sbin/pciconf/Makefile	Fri Mar  1 19:39:54 2013	(r247566)
    +++ stable/8/usr.sbin/pciconf/Makefile	Fri Mar  1 19:40:02 2013	(r247567)
    @@ -5,6 +5,4 @@ PROG=	pciconf
     SRCS=	pciconf.c cap.c err.c
     MAN=	pciconf.8
     
    -CFLAGS+= -I${.CURDIR}/../../sys
    -
     .include 
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 19:42:53 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 086B8C84;
     Fri,  1 Mar 2013 19:42:53 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id CBE9E11ED;
     Fri,  1 Mar 2013 19:42:52 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21JgqVT065737;
     Fri, 1 Mar 2013 19:42:52 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21JgpOO065726;
     Fri, 1 Mar 2013 19:42:51 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303011942.r21JgpOO065726@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 19:42:51 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247568 - in stable/9: contrib/openpam
     contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy
     contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc
     contrib/openpam...
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 19:42:53 -0000
    
    Author: des
    Date: Fri Mar  1 19:42:50 2013
    New Revision: 247568
    URL: http://svnweb.freebsd.org/changeset/base/247568
    
    Log:
      Pull in OpenPAM Micrampelis from head.  Also merge a few minor module
      changes, most importantly support for ECDSA keys in pam_ssh.
    
    Added:
      stable/9/contrib/openpam/TODO
         - copied unchanged from r236109, head/contrib/openpam/TODO
      stable/9/contrib/openpam/bin/openpam_dump_policy/
         - copied from r236109, head/contrib/openpam/bin/openpam_dump_policy/
      stable/9/contrib/openpam/bin/pamtest/
         - copied from r228692, head/contrib/openpam/bin/pamtest/
      stable/9/contrib/openpam/bin/su/su.1
         - copied, changed from r228692, head/contrib/openpam/bin/su/su.1
      stable/9/contrib/openpam/doc/man/openpam_get_feature.3
         - copied unchanged from r236109, head/contrib/openpam/doc/man/openpam_get_feature.3
      stable/9/contrib/openpam/doc/man/openpam_readlinev.3
         - copied unchanged from r236109, head/contrib/openpam/doc/man/openpam_readlinev.3
      stable/9/contrib/openpam/doc/man/openpam_readword.3
         - copied unchanged from r236109, head/contrib/openpam/doc/man/openpam_readword.3
      stable/9/contrib/openpam/doc/man/openpam_set_feature.3
         - copied unchanged from r236109, head/contrib/openpam/doc/man/openpam_set_feature.3
      stable/9/contrib/openpam/doc/man/openpam_straddch.3
         - copied unchanged from r236109, head/contrib/openpam/doc/man/openpam_straddch.3
      stable/9/contrib/openpam/doc/man/openpam_subst.3
         - copied, changed from r228692, head/contrib/openpam/doc/man/openpam_subst.3
      stable/9/contrib/openpam/lib/openpam_check_owner_perms.c
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_check_owner_perms.c
      stable/9/contrib/openpam/lib/openpam_constants.c
         - copied unchanged from r228692, head/contrib/openpam/lib/openpam_constants.c
      stable/9/contrib/openpam/lib/openpam_constants.h
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_constants.h
      stable/9/contrib/openpam/lib/openpam_ctype.h
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_ctype.h
      stable/9/contrib/openpam/lib/openpam_debug.h
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_debug.h
      stable/9/contrib/openpam/lib/openpam_features.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_features.c
      stable/9/contrib/openpam/lib/openpam_features.h
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_features.h
      stable/9/contrib/openpam/lib/openpam_get_feature.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_get_feature.c
      stable/9/contrib/openpam/lib/openpam_readlinev.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_readlinev.c
      stable/9/contrib/openpam/lib/openpam_readword.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_readword.c
      stable/9/contrib/openpam/lib/openpam_set_feature.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_set_feature.c
      stable/9/contrib/openpam/lib/openpam_straddch.c
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_straddch.c
      stable/9/contrib/openpam/lib/openpam_strlcat.h
         - copied unchanged from r236109, head/contrib/openpam/lib/openpam_strlcat.h
      stable/9/contrib/openpam/lib/openpam_strlcmp.h
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_strlcmp.h
      stable/9/contrib/openpam/lib/openpam_strlcpy.h
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_strlcpy.h
      stable/9/contrib/openpam/lib/openpam_subst.c
         - copied, changed from r228692, head/contrib/openpam/lib/openpam_subst.c
      stable/9/contrib/openpam/pamgdb.in
         - copied unchanged from r236109, head/contrib/openpam/pamgdb.in
      stable/9/contrib/openpam/t/
         - copied from r236109, head/contrib/openpam/t/
    Modified:
      stable/9/contrib/openpam/CREDITS
      stable/9/contrib/openpam/HISTORY
      stable/9/contrib/openpam/LICENSE
      stable/9/contrib/openpam/Makefile.am
      stable/9/contrib/openpam/Makefile.in
      stable/9/contrib/openpam/README
      stable/9/contrib/openpam/RELNOTES
      stable/9/contrib/openpam/aclocal.m4
      stable/9/contrib/openpam/bin/Makefile.am
      stable/9/contrib/openpam/bin/Makefile.in
      stable/9/contrib/openpam/bin/pamtest/pamtest.1
      stable/9/contrib/openpam/bin/pamtest/pamtest.c
      stable/9/contrib/openpam/bin/su/Makefile.am
      stable/9/contrib/openpam/bin/su/Makefile.in
      stable/9/contrib/openpam/bin/su/su.c
      stable/9/contrib/openpam/config.h.in
      stable/9/contrib/openpam/configure
      stable/9/contrib/openpam/configure.ac
      stable/9/contrib/openpam/depcomp
      stable/9/contrib/openpam/doc/Makefile.in
      stable/9/contrib/openpam/doc/man/Makefile.am
      stable/9/contrib/openpam/doc/man/Makefile.in
      stable/9/contrib/openpam/doc/man/openpam.3
      stable/9/contrib/openpam/doc/man/openpam_borrow_cred.3
      stable/9/contrib/openpam/doc/man/openpam_free_data.3
      stable/9/contrib/openpam/doc/man/openpam_free_envlist.3
      stable/9/contrib/openpam/doc/man/openpam_get_option.3
      stable/9/contrib/openpam/doc/man/openpam_log.3
      stable/9/contrib/openpam/doc/man/openpam_nullconv.3
      stable/9/contrib/openpam/doc/man/openpam_readline.3
      stable/9/contrib/openpam/doc/man/openpam_restore_cred.3
      stable/9/contrib/openpam/doc/man/openpam_set_option.3
      stable/9/contrib/openpam/doc/man/openpam_ttyconv.3
      stable/9/contrib/openpam/doc/man/pam.3
      stable/9/contrib/openpam/doc/man/pam.conf.5
      stable/9/contrib/openpam/doc/man/pam_acct_mgmt.3
      stable/9/contrib/openpam/doc/man/pam_authenticate.3
      stable/9/contrib/openpam/doc/man/pam_chauthtok.3
      stable/9/contrib/openpam/doc/man/pam_close_session.3
      stable/9/contrib/openpam/doc/man/pam_conv.3
      stable/9/contrib/openpam/doc/man/pam_end.3
      stable/9/contrib/openpam/doc/man/pam_error.3
      stable/9/contrib/openpam/doc/man/pam_get_authtok.3
      stable/9/contrib/openpam/doc/man/pam_get_data.3
      stable/9/contrib/openpam/doc/man/pam_get_item.3
      stable/9/contrib/openpam/doc/man/pam_get_user.3
      stable/9/contrib/openpam/doc/man/pam_getenv.3
      stable/9/contrib/openpam/doc/man/pam_getenvlist.3
      stable/9/contrib/openpam/doc/man/pam_info.3
      stable/9/contrib/openpam/doc/man/pam_open_session.3
      stable/9/contrib/openpam/doc/man/pam_prompt.3
      stable/9/contrib/openpam/doc/man/pam_putenv.3
      stable/9/contrib/openpam/doc/man/pam_set_data.3
      stable/9/contrib/openpam/doc/man/pam_set_item.3
      stable/9/contrib/openpam/doc/man/pam_setcred.3
      stable/9/contrib/openpam/doc/man/pam_setenv.3
      stable/9/contrib/openpam/doc/man/pam_sm_acct_mgmt.3
      stable/9/contrib/openpam/doc/man/pam_sm_authenticate.3
      stable/9/contrib/openpam/doc/man/pam_sm_chauthtok.3
      stable/9/contrib/openpam/doc/man/pam_sm_close_session.3
      stable/9/contrib/openpam/doc/man/pam_sm_open_session.3
      stable/9/contrib/openpam/doc/man/pam_sm_setcred.3
      stable/9/contrib/openpam/doc/man/pam_start.3
      stable/9/contrib/openpam/doc/man/pam_strerror.3
      stable/9/contrib/openpam/doc/man/pam_verror.3
      stable/9/contrib/openpam/doc/man/pam_vinfo.3
      stable/9/contrib/openpam/doc/man/pam_vprompt.3
      stable/9/contrib/openpam/include/Makefile.in
      stable/9/contrib/openpam/include/security/Makefile.in
      stable/9/contrib/openpam/include/security/openpam.h
      stable/9/contrib/openpam/include/security/openpam_version.h
      stable/9/contrib/openpam/include/security/pam_appl.h
      stable/9/contrib/openpam/include/security/pam_constants.h
      stable/9/contrib/openpam/include/security/pam_modules.h
      stable/9/contrib/openpam/include/security/pam_types.h
      stable/9/contrib/openpam/install-sh
      stable/9/contrib/openpam/lib/Makefile.am
      stable/9/contrib/openpam/lib/Makefile.in
      stable/9/contrib/openpam/lib/openpam_borrow_cred.c
      stable/9/contrib/openpam/lib/openpam_configure.c
      stable/9/contrib/openpam/lib/openpam_dispatch.c
      stable/9/contrib/openpam/lib/openpam_dynamic.c
      stable/9/contrib/openpam/lib/openpam_findenv.c
      stable/9/contrib/openpam/lib/openpam_free_data.c
      stable/9/contrib/openpam/lib/openpam_free_envlist.c
      stable/9/contrib/openpam/lib/openpam_get_option.c
      stable/9/contrib/openpam/lib/openpam_impl.h
      stable/9/contrib/openpam/lib/openpam_load.c
      stable/9/contrib/openpam/lib/openpam_log.c
      stable/9/contrib/openpam/lib/openpam_nullconv.c
      stable/9/contrib/openpam/lib/openpam_readline.c
      stable/9/contrib/openpam/lib/openpam_restore_cred.c
      stable/9/contrib/openpam/lib/openpam_set_option.c
      stable/9/contrib/openpam/lib/openpam_static.c
      stable/9/contrib/openpam/lib/openpam_ttyconv.c
      stable/9/contrib/openpam/lib/pam_acct_mgmt.c
      stable/9/contrib/openpam/lib/pam_authenticate.c
      stable/9/contrib/openpam/lib/pam_authenticate_secondary.c
      stable/9/contrib/openpam/lib/pam_chauthtok.c
      stable/9/contrib/openpam/lib/pam_close_session.c
      stable/9/contrib/openpam/lib/pam_end.c
      stable/9/contrib/openpam/lib/pam_error.c
      stable/9/contrib/openpam/lib/pam_get_authtok.c
      stable/9/contrib/openpam/lib/pam_get_data.c
      stable/9/contrib/openpam/lib/pam_get_item.c
      stable/9/contrib/openpam/lib/pam_get_mapped_authtok.c
      stable/9/contrib/openpam/lib/pam_get_mapped_username.c
      stable/9/contrib/openpam/lib/pam_get_user.c
      stable/9/contrib/openpam/lib/pam_getenv.c
      stable/9/contrib/openpam/lib/pam_getenvlist.c
      stable/9/contrib/openpam/lib/pam_info.c
      stable/9/contrib/openpam/lib/pam_open_session.c
      stable/9/contrib/openpam/lib/pam_prompt.c
      stable/9/contrib/openpam/lib/pam_putenv.c
      stable/9/contrib/openpam/lib/pam_set_data.c
      stable/9/contrib/openpam/lib/pam_set_item.c
      stable/9/contrib/openpam/lib/pam_set_mapped_authtok.c
      stable/9/contrib/openpam/lib/pam_set_mapped_username.c
      stable/9/contrib/openpam/lib/pam_setcred.c
      stable/9/contrib/openpam/lib/pam_setenv.c
      stable/9/contrib/openpam/lib/pam_sm_acct_mgmt.c
      stable/9/contrib/openpam/lib/pam_sm_authenticate.c
      stable/9/contrib/openpam/lib/pam_sm_authenticate_secondary.c
      stable/9/contrib/openpam/lib/pam_sm_chauthtok.c
      stable/9/contrib/openpam/lib/pam_sm_close_session.c
      stable/9/contrib/openpam/lib/pam_sm_get_mapped_authtok.c
      stable/9/contrib/openpam/lib/pam_sm_get_mapped_username.c
      stable/9/contrib/openpam/lib/pam_sm_open_session.c
      stable/9/contrib/openpam/lib/pam_sm_set_mapped_authtok.c
      stable/9/contrib/openpam/lib/pam_sm_set_mapped_username.c
      stable/9/contrib/openpam/lib/pam_sm_setcred.c
      stable/9/contrib/openpam/lib/pam_start.c
      stable/9/contrib/openpam/lib/pam_strerror.c
      stable/9/contrib/openpam/lib/pam_verror.c
      stable/9/contrib/openpam/lib/pam_vinfo.c
      stable/9/contrib/openpam/lib/pam_vprompt.c
      stable/9/contrib/openpam/ltmain.sh
      stable/9/contrib/openpam/misc/gendoc.pl
      stable/9/contrib/openpam/missing
      stable/9/contrib/openpam/modules/Makefile.in
      stable/9/contrib/openpam/modules/pam_deny/Makefile.in
      stable/9/contrib/openpam/modules/pam_deny/pam_deny.c
      stable/9/contrib/openpam/modules/pam_permit/Makefile.in
      stable/9/contrib/openpam/modules/pam_permit/pam_permit.c
      stable/9/contrib/openpam/modules/pam_unix/Makefile.am
      stable/9/contrib/openpam/modules/pam_unix/Makefile.in
      stable/9/contrib/openpam/modules/pam_unix/pam_unix.c
      stable/9/lib/libpam/libpam/Makefile
      stable/9/lib/libpam/modules/pam_radius/pam_radius.c
      stable/9/lib/libpam/modules/pam_ssh/pam_ssh.8
      stable/9/lib/libpam/modules/pam_ssh/pam_ssh.c
      stable/9/lib/libpam/modules/pam_unix/Makefile
      stable/9/lib/libpam/modules/pam_unix/pam_unix.8
      stable/9/lib/libpam/modules/pam_unix/pam_unix.c
    Directory Properties:
      stable/9/contrib/openpam/   (props changed)
      stable/9/lib/libpam/   (props changed)
    
    Modified: stable/9/contrib/openpam/CREDITS
    ==============================================================================
    --- stable/9/contrib/openpam/CREDITS	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/CREDITS	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -6,32 +6,41 @@ Network Associates, Inc.  under DARPA/SP
     
     Principal design and development by:
     
    -	 Dag-Erling Smørgrav 
    +	 Dag-Erling Smørgrav 
     
    -The following persons (in no particular order) have contributed, directly
    -or indirectly, with patches, criticism, suggestions, or ideas:
    +The following persons (in alphabetical order) have contributed,
    +directly or indirectly, with patches, criticism, suggestions, or
    +ideas:
     
     	Andrew Morgan 
     	Brian Fundakowski Feldman 
     	Christos Zoulas 
     	Daniel Richard G. 
    -	Darren J. Moffat 
    +	Darren J. Moffat 
     	Dmitry V. Levin 
    +	Don Lewis 
     	Emmanuel Dreyfus 
     	Eric Melville 
    -	Gary Winiger 
    +	Gary Winiger 
    +	Gleb Smirnoff 
    +	Hubert Feyrer 
    +	Jason Evans 
     	Joe Marcus Clarke 
     	Juli Mallett 
    -	Hubert Feyrer 
    +	Jörg Sonnenberger 
    +	Maëlle Lesage 
     	Mark Murray 
    +	Matthias Drochner 
     	Mike Petullo 
     	Mikhail Teterin 
    -	Mikko Työläjärvi 
    +	Mikko Työläjärvi 
    +	Nick Hibma 
     	Robert Watson 
     	Ruslan Ermilov 
    +	Sebastian Krahmer 
     	Solar Designer 
     	Takanori Saneto 
     	Wojciech A. Koszek 
     	Yar Tikhiy 
     
    -$Id: CREDITS 400 2007-10-24 15:04:23Z des $
    +$Id: CREDITS 587 2012-04-08 11:12:10Z des $
    
    Modified: stable/9/contrib/openpam/HISTORY
    ==============================================================================
    --- stable/9/contrib/openpam/HISTORY	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/HISTORY	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,3 +1,77 @@
    +OpenPAM Micrampelis						2012-05-26
    +
    + - FEATURE: Add an openpam_readword(3) function which reads the next
    +   word from an input stream, applying shell quoting and escaping
    +   rules.  Add numerous unit tests for openpam_readword(3).
    +
    + - FEATURE: Add an openpam_readlinev(3) function which uses the
    +   openpam_readword(3) function to read words from an input stream one
    +   at a time until it reaches an unquoted, unescaped newline, and
    +   returns an array of those words.  Add several unit tests for
    +   openpam_readlinev(3).
    +
    + - FEATURE: Add a PAM_HOST item which pam_start(3) initializes to the
    +   machine's hostname.  This was implemented in Lycopsida but
    +   inadvertantly left out of the release notes.
    +
    + - FEATURE: In pam_get_authtok(3), if neither the application nor the
    +   module have specified a prompt and PAM_HOST and PAM_RHOST are both
    +   defined but not equal, use a different default prompt that includes
    +   PAM_USER and PAM_HOST.
    +
    + - ENHANCE: Rewrite the policy parser to used openpam_readlinev(),
    +   which greatly simplifies the code.
    +
    + - ENHANCE: The previous implementation of the policy parser relied on
    +   the openpam_readline(3) function, which (by design) munges
    +   whitespace and understands neither quotes nor backslash escapes.
    +   As a result of the aforementioned rewrite, whitespace, quotes and
    +   backslash escapes in policy files are now handled in a consistent
    +   and predictable manner.
    +
    + - ENHANCE: On platforms that have it, use fdlopen(3) to load modules.
    +   This closes the race between the ownership / permission check and
    +   the dlopen(3) call.
    +
    + - ENHANCE: Reduce the amount of pointless error messages generated
    +   while searching for a module.
    +
    + - ENHANCE: Numerous documentation improvements, both in content and
    +   formatting.
    +
    + - BUGFIX: A patch incorporated in Lycopsida inadvertantly changed
    +   OpenPAM's behavior when several policies exist for the same
    +   service, from ignoring all but the first to concatenating them all.
    +   Revert to the original behavior.
    +
    + - BUGFIX: Plug a memory leak in the policy parser.
    +============================================================================
    +OpenPAM Lycopsida						2011-12-18
    +
    + - ENHANCE: removed static build autodetection, which didn't work
    +   anyway.  Use an explicit, user-specified preprocessor variable
    +   instead.
    +
    + - ENHANCE: cleaned up the documentation a bit.
    +
    + - ENHANCE: added openpam_subst(3), allowing certain PAM items to be
    +   embedded in strings such as prompts.  Apply it to the prompts used
    +   by pam_get_user(3) and pam_get_authtok(3).
    +
    + - ENHANCE: added support for the user_prompt, authtok_prompt and
    +   oldauthtok_prompt module options, which override the prompts passed
    +   by the module to pam_set_user(3) and pam_get_authtok(3).
    +
    + - ENHANCE: rewrote the policy parser to support quoted option values.
    +
    + - ENHANCE: added pamtest(1), a tool for testing modules and policies.
    +
    + - ENHANCE: added code to check the ownership and permissions of a
    +   module before loading it.
    +
    + - ENHANCE: added / improved input validation in many cases, including
    +   the policy file and some function arguments.
    +============================================================================
     OpenPAM Hydrangea						2007-12-21
     
      - ENHANCE: when compiling with GCC, mark up API functions with GCC
    @@ -21,7 +95,7 @@ OpenPAM Hydrangea						2007-12-21
        contexts), since the module cache was the only part of OpenPAM that
        was not thread-safe.
     ============================================================================
    -OpenPAM Figwort 2005-06-16
    +OpenPAM Figwort							2005-06-16
     
      - BUGFIX: Correct several small signedness and initialization bugs
        discovered during review by the NetBSD team.
    @@ -243,7 +317,7 @@ OpenPAM Cinchona						2002-04-08
      - ENHANCE: Add openpam_free_data(), a generic cleanup function for
        pam_set_data() consumers.
     ============================================================================
    -OpenPAM	Centaury						2002-03-14
    +OpenPAM Centaury						2002-03-14
     
      - BUGFIX: Add missing #include  to openpam_log.c.
     
    @@ -282,7 +356,7 @@ OpenPAM Celandine						2002-03-05
        module with the same version number as the library itself to one
        with no version number at all.
     ============================================================================
    -OpenPAM	Cantaloupe						2002-02-22
    +OpenPAM Cantaloupe						2002-02-22
     
      - BUGFIX: The proper use of PAM_SYMBOL_ERR is to indicate an invalid
        argument to pam_[gs]et_item(3), not to indicate dlsym(3) failures.
    @@ -312,7 +386,7 @@ OpenPAM	Cantaloupe						2002-02-22
      - ENHANCE: openpam_get_authtok() now respects the echo_pass,
        try_first_pass, and use_first_pass options.
     ============================================================================
    -OpenPAM	Caliopsis						2002-02-13
    +OpenPAM Caliopsis						2002-02-13
     
     Fixed a number of bugs in the previous release, including:
       - a number of bugs in and related to pam_[gs]et_item(3)
    @@ -323,8 +397,8 @@ Fixed a number of bugs in the previous r
       - missing 'continue' in openpam_dispatch.c caused successes to be
         counted as failures
     ============================================================================
    -OpenPAM	Calamite						2002-02-09
    +OpenPAM Calamite						2002-02-09
     
     First (beta) release.
     ============================================================================
    -$Id: HISTORY 409 2007-12-21 11:38:50Z des $
    +$Id: HISTORY 609 2012-05-26 13:57:45Z des $
    
    Modified: stable/9/contrib/openpam/LICENSE
    ==============================================================================
    --- stable/9/contrib/openpam/LICENSE	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/LICENSE	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,6 +1,6 @@
     
     Copyright (c) 2002-2003 Networks Associates Technology, Inc.
    -Copyright (c) 2004-2007 Dag-Erling Smørgrav
    +Copyright (c) 2004-2012 Dag-Erling Smørgrav
     All rights reserved.
     
     This software was developed for the FreeBSD Project by ThinkSec AS and
    @@ -32,4 +32,4 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     SUCH DAMAGE.
     
    -$Id: LICENSE 408 2007-12-21 11:36:24Z des $
    +$Id: LICENSE 546 2012-03-31 23:13:20Z des $
    
    Modified: stable/9/contrib/openpam/Makefile.am
    ==============================================================================
    --- stable/9/contrib/openpam/Makefile.am	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/Makefile.am	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,4 +1,6 @@
    -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
    +# $Id: Makefile.am 549 2012-04-01 20:38:30Z des $
    +
    +ACLOCAL_AMFLAGS = -I m4
     
     SUBDIRS = lib bin modules include
     
    @@ -6,6 +8,8 @@ if WITH_DOC
     SUBDIRS += doc
     endif
     
    +SUBDIRS += t
    +
     EXTRA_DIST = \
     	CREDITS \
     	HISTORY \
    
    Modified: stable/9/contrib/openpam/Makefile.in
    ==============================================================================
    --- stable/9/contrib/openpam/Makefile.in	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/Makefile.in	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,8 +1,9 @@
    -# Makefile.in generated by automake 1.9.6 from Makefile.am.
    +# Makefile.in generated by automake 1.11.1 from Makefile.am.
     # @configure_input@
     
     # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
    -# 2003, 2004, 2005  Free Software Foundation, Inc.
    +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
    +# Inc.
     # This Makefile.in is free software; the Free Software Foundation
     # gives unlimited permission to copy and/or distribute it,
     # with or without modifications, as long as this notice is preserved.
    @@ -14,16 +15,13 @@
     
     @SET_MAKE@
     
    -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $
    -srcdir = @srcdir@
    -top_srcdir = @top_srcdir@
    +# $Id: Makefile.am 549 2012-04-01 20:38:30Z des $
     VPATH = @srcdir@
     pkgdatadir = $(datadir)/@PACKAGE@
    -pkglibdir = $(libdir)/@PACKAGE@
     pkgincludedir = $(includedir)/@PACKAGE@
    -top_builddir = .
    +pkglibdir = $(libdir)/@PACKAGE@
    +pkglibexecdir = $(libexecdir)/@PACKAGE@
     am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    -INSTALL = @INSTALL@
     install_sh_DATA = $(install_sh) -c -m 644
     install_sh_PROGRAM = $(install_sh) -c
     install_sh_SCRIPT = $(install_sh) -c
    @@ -37,47 +35,76 @@ PRE_UNINSTALL = :
     POST_UNINSTALL = :
     build_triplet = @build@
     host_triplet = @host@
    -target_triplet = @target@
     @WITH_DOC_TRUE@am__append_1 = doc
    +subdir = .
     DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
     	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
    -	$(top_srcdir)/configure INSTALL compile config.guess \
    -	config.sub depcomp install-sh ltmain.sh missing
    -subdir = .
    +	$(srcdir)/pamgdb.in $(top_srcdir)/configure INSTALL TODO \
    +	config.guess config.sub depcomp install-sh ltmain.sh missing
     ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     	$(ACLOCAL_M4)
     am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
    - configure.lineno configure.status.lineno
    + configure.lineno config.status.lineno
     mkinstalldirs = $(install_sh) -d
     CONFIG_HEADER = config.h
    -CONFIG_CLEAN_FILES =
    +CONFIG_CLEAN_FILES = pamgdb
    +CONFIG_CLEAN_VPATH_FILES =
     SOURCES =
     DIST_SOURCES =
     RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
     	html-recursive info-recursive install-data-recursive \
    -	install-exec-recursive install-info-recursive \
    -	install-recursive installcheck-recursive installdirs-recursive \
    -	pdf-recursive ps-recursive uninstall-info-recursive \
    -	uninstall-recursive
    +	install-dvi-recursive install-exec-recursive \
    +	install-html-recursive install-info-recursive \
    +	install-pdf-recursive install-ps-recursive install-recursive \
    +	installcheck-recursive installdirs-recursive pdf-recursive \
    +	ps-recursive uninstall-recursive
    +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
    +  distclean-recursive maintainer-clean-recursive
    +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
    +	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
    +	distdir dist dist-all distcheck
     ETAGS = etags
     CTAGS = ctags
    -DIST_SUBDIRS = lib bin modules include doc
    +DIST_SUBDIRS = lib bin modules include doc t
     DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     distdir = $(PACKAGE)-$(VERSION)
     top_distdir = $(distdir)
     am__remove_distdir = \
    -  { test ! -d $(distdir) \
    -    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
    -         && rm -fr $(distdir); }; }
    +  { test ! -d "$(distdir)" \
    +    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
    +         && rm -fr "$(distdir)"; }; }
    +am__relativize = \
    +  dir0=`pwd`; \
    +  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
    +  sed_rest='s,^[^/]*/*,,'; \
    +  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
    +  sed_butlast='s,/*[^/]*$$,,'; \
    +  while test -n "$$dir1"; do \
    +    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
    +    if test "$$first" != "."; then \
    +      if test "$$first" = ".."; then \
    +        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
    +        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
    +      else \
    +        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
    +        if test "$$first2" = "$$first"; then \
    +          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
    +        else \
    +          dir2="../$$dir2"; \
    +        fi; \
    +        dir0="$$dir0"/"$$first"; \
    +      fi; \
    +    fi; \
    +    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
    +  done; \
    +  reldir="$$dir2"
     DIST_ARCHIVES = $(distdir).tar.gz
     GZIP_ENV = --best
     distuninstallcheck_listfiles = find . -type f -print
     distcleancheck_listfiles = find . -type f -print
     ACLOCAL = @ACLOCAL@
    -AMDEP_FALSE = @AMDEP_FALSE@
    -AMDEP_TRUE = @AMDEP_TRUE@
     AMTAR = @AMTAR@
     AR = @AR@
     AUTOCONF = @AUTOCONF@
    @@ -90,42 +117,50 @@ CFLAGS = @CFLAGS@
     CPP = @CPP@
     CPPFLAGS = @CPPFLAGS@
     CRYPT_LIBS = @CRYPT_LIBS@
    -CXX = @CXX@
    -CXXCPP = @CXXCPP@
    -CXXDEPMODE = @CXXDEPMODE@
    -CXXFLAGS = @CXXFLAGS@
     CYGPATH_W = @CYGPATH_W@
     DEFS = @DEFS@
     DEPDIR = @DEPDIR@
    +DLLTOOL = @DLLTOOL@
     DL_LIBS = @DL_LIBS@
    -ECHO = @ECHO@
    +DSYMUTIL = @DSYMUTIL@
    +DUMPBIN = @DUMPBIN@
     ECHO_C = @ECHO_C@
     ECHO_N = @ECHO_N@
     ECHO_T = @ECHO_T@
     EGREP = @EGREP@
     EXEEXT = @EXEEXT@
    -F77 = @F77@
    -FFLAGS = @FFLAGS@
    +FGREP = @FGREP@
     GREP = @GREP@
    +INSTALL = @INSTALL@
     INSTALL_DATA = @INSTALL_DATA@
     INSTALL_PROGRAM = @INSTALL_PROGRAM@
     INSTALL_SCRIPT = @INSTALL_SCRIPT@
     INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    +LD = @LD@
     LDFLAGS = @LDFLAGS@
     LIBOBJS = @LIBOBJS@
     LIBS = @LIBS@
     LIBTOOL = @LIBTOOL@
     LIB_MAJ = @LIB_MAJ@
    +LIPO = @LIPO@
     LN_S = @LN_S@
     LTLIBOBJS = @LTLIBOBJS@
     MAKEINFO = @MAKEINFO@
    +MANIFEST_TOOL = @MANIFEST_TOOL@
    +MKDIR_P = @MKDIR_P@
    +NM = @NM@
    +NMEDIT = @NMEDIT@
    +OBJDUMP = @OBJDUMP@
     OBJEXT = @OBJEXT@
     OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
    +OTOOL = @OTOOL@
    +OTOOL64 = @OTOOL64@
     PACKAGE = @PACKAGE@
     PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
     PACKAGE_NAME = @PACKAGE_NAME@
     PACKAGE_STRING = @PACKAGE_STRING@
     PACKAGE_TARNAME = @PACKAGE_TARNAME@
    +PACKAGE_URL = @PACKAGE_URL@
     PACKAGE_VERSION = @PACKAGE_VERSION@
     PATH_SEPARATOR = @PATH_SEPARATOR@
     RANLIB = @RANLIB@
    @@ -134,19 +169,13 @@ SET_MAKE = @SET_MAKE@
     SHELL = @SHELL@
     STRIP = @STRIP@
     VERSION = @VERSION@
    -WITH_DOC_FALSE = @WITH_DOC_FALSE@
    -WITH_DOC_TRUE = @WITH_DOC_TRUE@
    -WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@
    -WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@
    -WITH_SU_FALSE = @WITH_SU_FALSE@
    -WITH_SU_TRUE = @WITH_SU_TRUE@
    +abs_builddir = @abs_builddir@
    +abs_srcdir = @abs_srcdir@
    +abs_top_builddir = @abs_top_builddir@
    +abs_top_srcdir = @abs_top_srcdir@
    +ac_ct_AR = @ac_ct_AR@
     ac_ct_CC = @ac_ct_CC@
    -ac_ct_CXX = @ac_ct_CXX@
    -ac_ct_F77 = @ac_ct_F77@
    -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
    -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
    -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
    -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
    +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
     am__include = @am__include@
     am__leading_dot = @am__leading_dot@
     am__quote = @am__quote@
    @@ -158,6 +187,7 @@ build_alias = @build_alias@
     build_cpu = @build_cpu@
     build_os = @build_os@
     build_vendor = @build_vendor@
    +builddir = @builddir@
     datadir = @datadir@
     datarootdir = @datarootdir@
     docdir = @docdir@
    @@ -185,13 +215,14 @@ program_transform_name = @program_transf
     psdir = @psdir@
     sbindir = @sbindir@
     sharedstatedir = @sharedstatedir@
    +srcdir = @srcdir@
     sysconfdir = @sysconfdir@
    -target = @target@
     target_alias = @target_alias@
    -target_cpu = @target_cpu@
    -target_os = @target_os@
    -target_vendor = @target_vendor@
    -SUBDIRS = lib bin modules include $(am__append_1)
    +top_build_prefix = @top_build_prefix@
    +top_builddir = @top_builddir@
    +top_srcdir = @top_srcdir@
    +ACLOCAL_AMFLAGS = -I m4
    +SUBDIRS = lib bin modules include $(am__append_1) t
     EXTRA_DIST = \
     	CREDITS \
     	HISTORY \
    @@ -212,15 +243,15 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefi
     	@for dep in $?; do \
     	  case '$(am__configure_deps)' in \
     	    *$$dep*) \
    -	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
    -	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
    +	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
    +	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
     		&& exit 0; \
     	      exit 1;; \
     	  esac; \
     	done; \
    -	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
    -	cd $(top_srcdir) && \
    -	  $(AUTOMAKE) --foreign  Makefile
    +	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
    +	$(am__cd) $(top_srcdir) && \
    +	  $(AUTOMAKE) --foreign Makefile
     .PRECIOUS: Makefile
     Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     	@case '$?' in \
    @@ -236,26 +267,29 @@ $(top_builddir)/config.status: $(top_src
     	$(SHELL) ./config.status --recheck
     
     $(top_srcdir)/configure:  $(am__configure_deps)
    -	cd $(srcdir) && $(AUTOCONF)
    +	$(am__cd) $(srcdir) && $(AUTOCONF)
     $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
    -	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
    +	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
    +$(am__aclocal_m4_deps):
     
     config.h: stamp-h1
     	@if test ! -f $@; then \
     	  rm -f stamp-h1; \
    -	  $(MAKE) stamp-h1; \
    +	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
     	else :; fi
     
     stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
     	@rm -f stamp-h1
     	cd $(top_builddir) && $(SHELL) ./config.status config.h
     $(srcdir)/config.h.in:  $(am__configure_deps) 
    -	cd $(top_srcdir) && $(AUTOHEADER)
    +	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
     	rm -f stamp-h1
     	touch $@
     
     distclean-hdr:
     	-rm -f config.h stamp-h1
    +pamgdb: $(top_builddir)/config.status $(srcdir)/pamgdb.in
    +	cd $(top_builddir) && $(SHELL) ./config.status $@
     
     mostlyclean-libtool:
     	-rm -f *.lo
    @@ -264,8 +298,7 @@ clean-libtool:
     	-rm -rf .libs _libs
     
     distclean-libtool:
    -	-rm -f libtool
    -uninstall-info-am:
    +	-rm -f libtool config.lt
     
     # This directory's subdirectories are mostly independent; you can cd
     # into them and run `make' without going through this Makefile.
    @@ -274,7 +307,7 @@ uninstall-info-am:
     #     (which will cause the Makefiles to be regenerated when you run `make');
     # (2) otherwise, pass the desired values on the `make' command line.
     $(RECURSIVE_TARGETS):
    -	@failcom='exit 1'; \
    +	@fail= failcom='exit 1'; \
     	for f in x $$MAKEFLAGS; do \
     	  case $$f in \
     	    *=* | --[!k]*);; \
    @@ -291,16 +324,15 @@ $(RECURSIVE_TARGETS):
     	  else \
     	    local_target="$$target"; \
     	  fi; \
    -	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
    +	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     	  || eval $$failcom; \
     	done; \
     	if test "$$dot_seen" = "no"; then \
     	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
     	fi; test -z "$$fail"
     
    -mostlyclean-recursive clean-recursive distclean-recursive \
    -maintainer-clean-recursive:
    -	@failcom='exit 1'; \
    +$(RECURSIVE_CLEAN_TARGETS):
    +	@fail= failcom='exit 1'; \
     	for f in x $$MAKEFLAGS; do \
     	  case $$f in \
     	    *=* | --[!k]*);; \
    @@ -326,16 +358,16 @@ maintainer-clean-recursive:
     	  else \
     	    local_target="$$target"; \
     	  fi; \
    -	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
    +	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     	  || eval $$failcom; \
     	done && test -z "$$fail"
     tags-recursive:
     	list='$(SUBDIRS)'; for subdir in $$list; do \
    -	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
    +	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
     	done
     ctags-recursive:
     	list='$(SUBDIRS)'; for subdir in $$list; do \
    -	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
    +	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
     	done
     
     ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
    @@ -343,14 +375,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS
     	unique=`for i in $$list; do \
     	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
     	  done | \
    -	  $(AWK) '    { files[$$0] = 1; } \
    -	       END { for (i in files) print i; }'`; \
    +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
    +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
     	mkid -fID $$unique
     tags: TAGS
     
     TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
     		$(TAGS_FILES) $(LISP)
    -	tags=; \
    +	set x; \
     	here=`pwd`; \
     	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
     	  include_option=--etags-include; \
    @@ -362,93 +394,114 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE
     	list='$(SUBDIRS)'; for subdir in $$list; do \
     	  if test "$$subdir" = .; then :; else \
     	    test ! -f $$subdir/TAGS || \
    -	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    +	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
     	  fi; \
     	done; \
     	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
     	unique=`for i in $$list; do \
     	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
     	  done | \
    -	  $(AWK) '    { files[$$0] = 1; } \
    -	       END { for (i in files) print i; }'`; \
    -	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
    +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
    +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
    +	shift; \
    +	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
     	  test -n "$$unique" || unique=$$empty_fix; \
    -	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    -	    $$tags $$unique; \
    +	  if test $$# -gt 0; then \
    +	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    +	      "$$@" $$unique; \
    +	  else \
    +	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    +	      $$unique; \
    +	  fi; \
     	fi
     ctags: CTAGS
     CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
     		$(TAGS_FILES) $(LISP)
    -	tags=; \
    -	here=`pwd`; \
     	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
     	unique=`for i in $$list; do \
     	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
     	  done | \
    -	  $(AWK) '    { files[$$0] = 1; } \
    -	       END { for (i in files) print i; }'`; \
    -	test -z "$(CTAGS_ARGS)$$tags$$unique" \
    +	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
    +	      END { if (nonempty) { for (i in files) print i; }; }'`; \
    +	test -z "$(CTAGS_ARGS)$$unique" \
     	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
    -	     $$tags $$unique
    +	     $$unique
     
     GTAGS:
     	here=`$(am__cd) $(top_builddir) && pwd` \
    -	  && cd $(top_srcdir) \
    -	  && gtags -i $(GTAGS_ARGS) $$here
    +	  && $(am__cd) $(top_srcdir) \
    +	  && gtags -i $(GTAGS_ARGS) "$$here"
     
     distclean-tags:
     	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
     
     distdir: $(DISTFILES)
     	$(am__remove_distdir)
    -	mkdir $(distdir)
    -	$(mkdir_p) $(distdir)/misc
    -	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    -	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
    -	list='$(DISTFILES)'; for file in $$list; do \
    -	  case $$file in \
    -	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
    -	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
    -	  esac; \
    +	test -d "$(distdir)" || mkdir "$(distdir)"
    +	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
    +	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
    +	list='$(DISTFILES)'; \
    +	  dist_files=`for file in $$list; do echo $$file; done | \
    +	  sed -e "s|^$$srcdirstrip/||;t" \
    +	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
    +	case $$dist_files in \
    +	  */*) $(MKDIR_P) `echo "$$dist_files" | \
    +			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
    +			   sort -u` ;; \
    +	esac; \
    +	for file in $$dist_files; do \
     	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
    -	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
    -	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
    -	    dir="/$$dir"; \
    -	    $(mkdir_p) "$(distdir)$$dir"; \
    -	  else \
    -	    dir=''; \
    -	  fi; \
     	  if test -d $$d/$$file; then \
    +	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
    +	    if test -d "$(distdir)/$$file"; then \
    +	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
    +	    fi; \
     	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
    -	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
    +	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
    +	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
     	    fi; \
    -	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
    +	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
     	  else \
    -	    test -f $(distdir)/$$file \
    -	    || cp -p $$d/$$file $(distdir)/$$file \
    +	    test -f "$(distdir)/$$file" \
    +	    || cp -p $$d/$$file "$(distdir)/$$file" \
     	    || exit 1; \
     	  fi; \
     	done
    -	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
    +	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
     	  if test "$$subdir" = .; then :; else \
     	    test -d "$(distdir)/$$subdir" \
    -	    || $(mkdir_p) "$(distdir)/$$subdir" \
    +	    || $(MKDIR_P) "$(distdir)/$$subdir" \
     	    || exit 1; \
    -	    distdir=`$(am__cd) $(distdir) && pwd`; \
    -	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
    -	    (cd $$subdir && \
    +	  fi; \
    +	done
    +	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
    +	  if test "$$subdir" = .; then :; else \
    +	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
    +	    $(am__relativize); \
    +	    new_distdir=$$reldir; \
    +	    dir1=$$subdir; dir2="$(top_distdir)"; \
    +	    $(am__relativize); \
    +	    new_top_distdir=$$reldir; \
    +	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
    +	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
    +	    ($(am__cd) $$subdir && \
     	      $(MAKE) $(AM_MAKEFLAGS) \
    -	        top_distdir="$$top_distdir" \
    -	        distdir="$$distdir/$$subdir" \
    +	        top_distdir="$$new_top_distdir" \
    +	        distdir="$$new_distdir" \
    +		am__remove_distdir=: \
    +		am__skip_length_check=: \
    +		am__skip_mode_fix=: \
     	        distdir) \
     	      || exit 1; \
     	  fi; \
     	done
    -	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
    +	-test -n "$(am__skip_mode_fix)" \
    +	|| find "$(distdir)" -type d ! -perm -755 \
    +		-exec chmod u+rwx,go+rx {} \; -o \
     	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
     	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
    -	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
    -	|| chmod -R a+r $(distdir)
    +	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
    +	|| chmod -R a+r "$(distdir)"
     dist-gzip: distdir
     	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
     	$(am__remove_distdir)
    @@ -457,6 +510,14 @@ dist-bzip2: distdir
     	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
     	$(am__remove_distdir)
     
    +dist-lzma: distdir
    +	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
    +	$(am__remove_distdir)
    +
    +dist-xz: distdir
    +	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
    +	$(am__remove_distdir)
    +
     dist-tarZ: distdir
     	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
     	$(am__remove_distdir)
    @@ -480,13 +541,17 @@ dist dist-all: distdir
     distcheck: dist
     	case '$(DIST_ARCHIVES)' in \
     	*.tar.gz*) \
    -	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
    +	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
     	*.tar.bz2*) \
    -	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
    +	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
    +	*.tar.lzma*) \
    +	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
    +	*.tar.xz*) \
    +	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
     	*.tar.Z*) \
     	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
     	*.shar.gz*) \
    -	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
    +	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
     	*.zip*) \
     	  unzip $(distdir).zip ;;\
     	esac
    @@ -494,9 +559,11 @@ distcheck: dist
     	mkdir $(distdir)/_build
     	mkdir $(distdir)/_inst
     	chmod a-w $(distdir)
    +	test -d $(distdir)/_build || exit 0; \
     	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
     	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
    -	  && cd $(distdir)/_build \
    +	  && am__cwd=`pwd` \
    +	  && $(am__cd) $(distdir)/_build \
     	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
     	    $(DISTCHECK_CONFIGURE_FLAGS) \
     	  && $(MAKE) $(AM_MAKEFLAGS) \
    @@ -518,13 +585,15 @@ distcheck: dist
     	  && rm -rf "$$dc_destdir" \
     	  && $(MAKE) $(AM_MAKEFLAGS) dist \
     	  && rm -rf $(DIST_ARCHIVES) \
    -	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
    +	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
    +	  && cd "$$am__cwd" \
    +	  || exit 1
     	$(am__remove_distdir)
     	@(echo "$(distdir) archives ready for distribution: "; \
     	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
    -	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
    +	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
     distuninstallcheck:
    -	@cd $(distuninstallcheck_dir) \
    +	@$(am__cd) '$(distuninstallcheck_dir)' \
     	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
     	   || { echo "ERROR: files left after uninstall:" ; \
     	        if test -n "$(DESTDIR)"; then \
    @@ -566,6 +635,7 @@ clean-generic:
     
     distclean-generic:
     	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    +	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
     
     maintainer-clean-generic:
     	@echo "This command is intended for maintainers to use"
    @@ -586,18 +656,38 @@ dvi-am:
     
     html: html-recursive
     
    +html-am:
    +
     info: info-recursive
     
     info-am:
     
     install-data-am:
     
    +install-dvi: install-dvi-recursive
    +
    +install-dvi-am:
    +
     install-exec-am:
     
    +install-html: install-html-recursive
    +
    +install-html-am:
    +
     install-info: install-info-recursive
     
    +install-info-am:
    +
     install-man:
     
    +install-pdf: install-pdf-recursive
    +
    +install-pdf-am:
    +
    +install-ps: install-ps-recursive
    +
    +install-ps-am:
    +
     installcheck-am:
     
     maintainer-clean: maintainer-clean-recursive
    @@ -618,24 +708,27 @@ ps: ps-recursive
     
     ps-am:
     
    -uninstall-am: uninstall-info-am
    +uninstall-am:
     
    -uninstall-info: uninstall-info-recursive
    +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
    +	ctags-recursive install-am install-strip tags-recursive
     
    -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
    -	check-am clean clean-generic clean-libtool clean-recursive \
    -	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
    -	dist-shar dist-tarZ dist-zip distcheck distclean \
    -	distclean-generic distclean-hdr distclean-libtool \
    -	distclean-recursive distclean-tags distcleancheck distdir \
    +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
    +	all all-am am--refresh check check-am clean clean-generic \
    +	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
    +	dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
    +	distcheck distclean distclean-generic distclean-hdr \
    +	distclean-libtool distclean-tags distcleancheck distdir \
     	distuninstallcheck dvi dvi-am html html-am info info-am \
    -	install install-am install-data install-data-am install-exec \
    -	install-exec-am install-info install-info-am install-man \
    +	install install-am install-data install-data-am install-dvi \
    +	install-dvi-am install-exec install-exec-am install-html \
    +	install-html-am install-info install-info-am install-man \
    +	install-pdf install-pdf-am install-ps install-ps-am \
     	install-strip installcheck installcheck-am installdirs \
     	installdirs-am maintainer-clean maintainer-clean-generic \
    -	maintainer-clean-recursive mostlyclean mostlyclean-generic \
    -	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
    -	tags tags-recursive uninstall uninstall-am uninstall-info-am
    +	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
    +	ps ps-am tags tags-recursive uninstall uninstall-am
    +
     
     # Tell versions [3.59,3.63) of GNU make to not export all variables.
     # Otherwise a system limit (for SysV at least) may be exceeded.
    
    Modified: stable/9/contrib/openpam/README
    ==============================================================================
    --- stable/9/contrib/openpam/README	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/README	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -22,6 +22,6 @@ These are some of OpenPAM's features:
          /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order;
          this will be made configurable in a future release.
     
    -Please direct bug reports and inquiries to des@freebsd.org.
    +Please direct bug reports and inquiries to .
     
    -$Id: README 320 2006-02-16 20:33:19Z des $
    +$Id: README 424 2009-10-29 17:10:22Z des $
    
    Modified: stable/9/contrib/openpam/RELNOTES
    ==============================================================================
    --- stable/9/contrib/openpam/RELNOTES	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/RELNOTES	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,13 +1,11 @@
     
    -		 Release notes for OpenPAM Hydrangea
    -		 ===================================
    +		Release notes for OpenPAM Micrampelis
    +		=====================================
     
    -This release corresponds to the code used in FreeBSD-CURRENT as of the
    -release date.  It has also been tested on several other platforms, and
    -is expected to work on almost any POSIX-like platform that has GNU
    -autotools, GNU make and the GNU compiler suite installed.  One notable
    -exception is MacOS X, which ships with a very weird, heavily modified
    -version of GCC.
    +This release corresponds to the code used in FreeBSD HEAD as of the
    +release date, and is also expected to work on almost any POSIX-like
    +platform that has GNU autotools, GNU make and the GNU compiler suite
    +installed.
     
     The library itself is complete.  Documentation exists in the form of
     man pages for the library functions.  These man pages are generated by
    @@ -18,12 +16,12 @@ of date.
     The distribution also includes three sample modules (pam_deny,
     pam_permit and pam_unix) and a sample application (su).  These are not
     intended for actual use, but rather to serve as examples for module or
    -application developers.
    +application developers.  It also includes a command-line application
    +(pamtest) which can be used to test policies and modules.
     
    -NOTE: to the person who sent me MacOS patches in July 2002: I have
    -lost your name and email address.  Please contact me so I can give you
    -proper credit for your contribution.
    +Unit tests for limited portions of the library can be found in the t
    +subdirectory.
     
    -Please direct bug reports and inquiries to .
    +Please direct bug reports and inquiries to .
     
    -$Id: RELNOTES 404 2007-11-28 12:31:04Z des $
    +$Id: RELNOTES 609 2012-05-26 13:57:45Z des $
    
    Copied: stable/9/contrib/openpam/TODO (from r236109, head/contrib/openpam/TODO)
    ==============================================================================
    --- /dev/null	00:00:00 1970	(empty, because file is newly added)
    +++ stable/9/contrib/openpam/TODO	Fri Mar  1 19:42:50 2013	(r247568, copy of r236109, head/contrib/openpam/TODO)
    @@ -0,0 +1,13 @@
    +Before the next release:
    +
    + - Complete the transition from PAM_LOG_DEBUG to PAM_LOG_LIBDEBUG.
    +
    +Whenever:
    +
    + - Implement mechanism to enable / disable optional features.  Use it
    +   to disable strict error checking so pamtest and unit tests can do
    +   things that we don't allow in production.
    +
    + - Rewrite the module-loading code.
    +
    +$Id: TODO 592 2012-04-08 13:19:51Z des $
    
    Modified: stable/9/contrib/openpam/aclocal.m4
    ==============================================================================
    --- stable/9/contrib/openpam/aclocal.m4	Fri Mar  1 19:40:02 2013	(r247567)
    +++ stable/9/contrib/openpam/aclocal.m4	Fri Mar  1 19:42:50 2013	(r247568)
    @@ -1,7 +1,7 @@
    -# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
    +# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
     
     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
    -# 2005  Free Software Foundation, Inc.
    +# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
     # This file is free software; the Free Software Foundation
     # gives unlimited permission to copy and/or distribute it,
     # with or without modifications, as long as this notice is preserved.
    @@ -11,103 +11,208 @@
     # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     # PARTICULAR PURPOSE.
     
    +m4_ifndef([AC_AUTOCONF_VERSION],
    +  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
    +[m4_warning([this file was generated for autoconf 2.68.
    +You have another version of autoconf.  It may work, but is not guaranteed to.
    +If you have problems, you may need to regenerate the build system entirely.
    +To do so, use the procedure documented by the package, typically `autoreconf'.])])
    +
     # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    +#
    +#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
    +#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
    +#                 Foundation, Inc.
    +#   Written by Gordon Matzigkeit, 1996
    +#
    +# This file is free software; the Free Software Foundation gives
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 20:33:36 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 7BE8F1AE;
     Fri,  1 Mar 2013 20:33:36 +0000 (UTC)
     (envelope-from jpaetzel@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 3D5301666;
     Fri,  1 Mar 2013 20:33:36 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21KXa6J081620;
     Fri, 1 Mar 2013 20:33:36 GMT (envelope-from jpaetzel@svn.freebsd.org)
    Received: (from jpaetzel@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21KXZqc081618;
     Fri, 1 Mar 2013 20:33:35 GMT (envelope-from jpaetzel@svn.freebsd.org)
    Message-Id: <201303012033.r21KXZqc081618@svn.freebsd.org>
    From: Josh Paetzel 
    Date: Fri, 1 Mar 2013 20:33:35 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247572 - stable/9/sys/dev/oce
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 20:33:36 -0000
    
    Author: jpaetzel
    Date: Fri Mar  1 20:33:35 2013
    New Revision: 247572
    URL: http://svnweb.freebsd.org/changeset/base/247572
    
    Log:
      MFC 246799:
      
      Resolve issue that caused WITNESS to report LORs.
    
    Modified:
      stable/9/sys/dev/oce/oce_if.c
      stable/9/sys/dev/oce/oce_if.h
    Directory Properties:
      stable/9/sys/   (props changed)
      stable/9/sys/dev/   (props changed)
    
    Modified: stable/9/sys/dev/oce/oce_if.c
    ==============================================================================
    --- stable/9/sys/dev/oce/oce_if.c	Fri Mar  1 20:16:06 2013	(r247571)
    +++ stable/9/sys/dev/oce/oce_if.c	Fri Mar  1 20:33:35 2013	(r247572)
    @@ -1856,6 +1856,9 @@ oce_local_timer(void *arg)
     }
     
     
    +/* NOTE : This should only be called holding
    + *        DEVICE_LOCK.
    +*/
     static void
     oce_if_deactivate(POCE_SOFTC sc)
     {
    @@ -1885,11 +1888,17 @@ oce_if_deactivate(POCE_SOFTC sc)
     	/* Stop intrs and finish any bottom halves pending */
     	oce_hw_intr_disable(sc);
     
    +    /* Since taskqueue_drain takes a Giant Lock, We should not acquire
    +       any other lock. So unlock device lock and require after
    +       completing taskqueue_drain.
    +    */
    +    UNLOCK(&sc->dev_lock);
     	for (i = 0; i < sc->intr_count; i++) {
     		if (sc->intrs[i].tq != NULL) {
     			taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task);
     		}
     	}
    +    LOCK(&sc->dev_lock);
     
     	/* Delete RX queue in card with flush param */
     	oce_stop_rx(sc);
    
    Modified: stable/9/sys/dev/oce/oce_if.h
    ==============================================================================
    --- stable/9/sys/dev/oce/oce_if.h	Fri Mar  1 20:16:06 2013	(r247571)
    +++ stable/9/sys/dev/oce/oce_if.h	Fri Mar  1 20:33:35 2013	(r247572)
    @@ -491,7 +491,7 @@ struct oce_lock {
     #define LOCK_CREATE(lock, desc) 		{ \
     	strncpy((lock)->name, (desc), MAX_LOCK_DESC_LEN); \
     	(lock)->name[MAX_LOCK_DESC_LEN] = '\0'; \
    -	mtx_init(&(lock)->mutex, (lock)->name, MTX_NETWORK_LOCK, MTX_DEF); \
    +	mtx_init(&(lock)->mutex, (lock)->name, NULL, MTX_DEF); \
     }
     #define LOCK_DESTROY(lock) 			\
     		if (mtx_initialized(&(lock)->mutex))\
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 20:48:54 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 02B26EE1;
     Fri,  1 Mar 2013 20:48:54 +0000 (UTC) (envelope-from ian@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id DC11F1754;
     Fri,  1 Mar 2013 20:48:53 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21KmroR085425;
     Fri, 1 Mar 2013 20:48:53 GMT (envelope-from ian@svn.freebsd.org)
    Received: (from ian@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21KmrUw085421;
     Fri, 1 Mar 2013 20:48:53 GMT (envelope-from ian@svn.freebsd.org)
    Message-Id: <201303012048.r21KmrUw085421@svn.freebsd.org>
    From: Ian Lepore 
    Date: Fri, 1 Mar 2013 20:48:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247576 - stable/9/sbin/devd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 20:48:54 -0000
    
    Author: ian
    Date: Fri Mar  1 20:48:53 2013
    New Revision: 247576
    URL: http://svnweb.freebsd.org/changeset/base/247576
    
    Log:
      MFC r246121 ...
      
      Fix a descriptor leak in devd.  Clients reading /var/run/devd.pipe can close
      their socket connection any time, and devd only notices that when it gets an
      error trying to write an event to the client.  On a system with no device
      change activity, clients could connect and disappear repeatedly without devd
      noticing, leading to an ever-growing list of open socket descriptors in devd.
      
      Now devd uses poll(2) looking for POLLHUP on all existing clients every time
      a new client connection is established, and also periodically (once a minute)
      to proactively find zombie clients and reap the socket descriptors.  It also
      now has a connection limit, configurable with a new -l  command line arg.
      When the maximum number of connections is reached it stops accepting new
      connections until some current clients drop off.
    
    Modified:
      stable/9/sbin/devd/devd.8
      stable/9/sbin/devd/devd.cc
    Directory Properties:
      stable/9/sbin/devd/   (props changed)
    
    Modified: stable/9/sbin/devd/devd.8
    ==============================================================================
    --- stable/9/sbin/devd/devd.8	Fri Mar  1 20:48:07 2013	(r247575)
    +++ stable/9/sbin/devd/devd.8	Fri Mar  1 20:48:53 2013	(r247576)
    @@ -35,6 +35,7 @@
     .Nm
     .Op Fl Ddn
     .Op Fl f Ar file
    +.Op Fl l Ar num
     .Sh DESCRIPTION
     The
     .Nm
    @@ -55,6 +56,12 @@ instead of the default
     If option
     .Fl f
     is specified more than once, the last file specified is used.
    +.It Fl l Ar num
    +Limit concurrent
    +.Pa /var/run/devd.pipe
    +connections to
    +.Ar num .
    +The default connection limit is 10.
     .It Fl n
     Do not process all pending events before becoming a daemon.
     Instead, call daemon right away.
    
    Modified: stable/9/sbin/devd/devd.cc
    ==============================================================================
    --- stable/9/sbin/devd/devd.cc	Fri Mar  1 20:48:07 2013	(r247575)
    +++ stable/9/sbin/devd/devd.cc	Fri Mar  1 20:48:53 2013	(r247576)
    @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -805,23 +806,58 @@ create_socket(const char *name)
     	return (fd);
     }
     
    +unsigned int max_clients = 10;	/* Default, can be overriden on cmdline. */
    +unsigned int num_clients;
     list clients;
     
     void
     notify_clients(const char *data, int len)
     {
    -	list bad;
    -	list::const_iterator i;
    +	list::iterator i;
     
    -	for (i = clients.begin(); i != clients.end(); ++i) {
    -		if (write(*i, data, len) <= 0) {
    -			bad.push_back(*i);
    +	/*
    +	 * Deliver the data to all clients.  Throw clients overboard at the
    +	 * first sign of trouble.  This reaps clients who've died or closed
    +	 * their sockets, and also clients who are alive but failing to keep up
    +	 * (or who are maliciously not reading, to consume buffer space in
    +	 * kernel memory or tie up the limited number of available connections).
    +	 */
    +	for (i = clients.begin(); i != clients.end(); ) {
    +		if (write(*i, data, len) != len) {
    +			--num_clients;
     			close(*i);
    -		}
    +			i = clients.erase(i);
    +		} else
    +			++i;
     	}
    +}
    +
    +void
    +check_clients(void)
    +{
    +	int s;
    +	struct pollfd pfd;
    +	list::iterator i;
     
    -	for (i = bad.begin(); i != bad.end(); ++i)
    -		clients.erase(find(clients.begin(), clients.end(), *i));
    +	/*
    +	 * Check all existing clients to see if any of them have disappeared.
    +	 * Normally we reap clients when we get an error trying to send them an
    +	 * event.  This check eliminates the problem of an ever-growing list of
    +	 * zombie clients because we're never writing to them on a system
    +	 * without frequent device-change activity.
    +	 */
    +	pfd.events = 0;
    +	for (i = clients.begin(); i != clients.end(); ) {
    +		pfd.fd = *i;
    +		s = poll(&pfd, 1, 0);
    +		if ((s < 0 && s != EINTR ) ||
    +		    (s > 0 && (pfd.revents & POLLHUP))) {
    +			--num_clients;
    +			close(*i);
    +			i = clients.erase(i);
    +		} else
    +			++i;
    +	}
     }
     
     void
    @@ -829,9 +865,18 @@ new_client(int fd)
     {
     	int s;
     
    +	/*
    +	 * First go reap any zombie clients, then accept the connection, and
    +	 * shut down the read side to stop clients from consuming kernel memory
    +	 * by sending large buffers full of data we'll never read.
    +	 */
    +	check_clients();
     	s = accept(fd, NULL, NULL);
    -	if (s != -1)
    +	if (s != -1) {
    +		shutdown(s, SHUT_RD);
     		clients.push_back(s);
    +		++num_clients;
    +	}
     }
     
     static void
    @@ -842,6 +887,7 @@ event_loop(void)
     	char buffer[DEVCTL_MAXBUF];
     	int once = 0;
     	int server_fd, max_fd;
    +	int accepting;
     	timeval tv;
     	fd_set fds;
     
    @@ -851,6 +897,7 @@ event_loop(void)
     	if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0)
     		err(1, "Can't set close-on-exec flag on devctl");
     	server_fd = create_socket(PIPE);
    +	accepting = 1;
     	max_fd = max(fd, server_fd) + 1;
     	while (1) {
     		if (romeo_must_die)
    @@ -873,15 +920,38 @@ event_loop(void)
     				once++;
     			}
     		}
    +		/*
    +		 * When we've already got the max number of clients, stop
    +		 * accepting new connections (don't put server_fd in the set),
    +		 * shrink the accept() queue to reject connections quickly, and
    +		 * poll the existing clients more often, so that we notice more
    +		 * quickly when any of them disappear to free up client slots.
    +		 */
     		FD_ZERO(&fds);
     		FD_SET(fd, &fds);
    -		FD_SET(server_fd, &fds);
    -		rv = select(max_fd, &fds, NULL, NULL, NULL);
    +		if (num_clients < max_clients) {
    +			if (!accepting) {
    +				listen(server_fd, max_clients);
    +				accepting = 1;
    +			}
    +			FD_SET(server_fd, &fds);
    +			tv.tv_sec = 60;
    +			tv.tv_usec = 0;
    +		} else {
    +			if (accepting) {
    +				listen(server_fd, 0);
    +				accepting = 0;
    +			}
    +			tv.tv_sec = 2;
    +			tv.tv_usec = 0;
    +		}
    +		rv = select(max_fd, &fds, NULL, NULL, &tv);
     		if (rv == -1) {
     			if (errno == EINTR)
     				continue;
     			err(1, "select");
    -		}
    +		} else if (rv == 0)
    +			check_clients();
     		if (FD_ISSET(fd, &fds)) {
     			rv = read(fd, buffer, sizeof(buffer) - 1);
     			if (rv > 0) {
    @@ -1000,7 +1070,8 @@ gensighand(int)
     static void
     usage()
     {
    -	fprintf(stderr, "usage: %s [-Ddn] [-f file]\n", getprogname());
    +	fprintf(stderr, "usage: %s [-Ddn] [-l connlimit] [-f file]\n",
    +	    getprogname());
     	exit(1);
     }
     
    @@ -1029,7 +1100,7 @@ main(int argc, char **argv)
     	int ch;
     
     	check_devd_enabled();
    -	while ((ch = getopt(argc, argv, "Ddf:n")) != -1) {
    +	while ((ch = getopt(argc, argv, "Ddf:l:n")) != -1) {
     		switch (ch) {
     		case 'D':
     			Dflag++;
    @@ -1040,6 +1111,9 @@ main(int argc, char **argv)
     		case 'f':
     			configfile = optarg;
     			break;
    +		case 'l':
    +			max_clients = MAX(1, strtoul(optarg, NULL, 0));
    +			break;
     		case 'n':
     			nflag++;
     			break;
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 21:35:53 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id C449EF6C;
     Fri,  1 Mar 2013 21:35:53 +0000 (UTC) (envelope-from des@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id B69E918C8;
     Fri,  1 Mar 2013 21:35:53 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21LZrMK000711;
     Fri, 1 Mar 2013 21:35:53 GMT (envelope-from des@svn.freebsd.org)
    Received: (from des@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21LZrMK000710;
     Fri, 1 Mar 2013 21:35:53 GMT (envelope-from des@svn.freebsd.org)
    Message-Id: <201303012135.r21LZrMK000710@svn.freebsd.org>
    From: Dag-Erling Smørgrav 
    Date: Fri, 1 Mar 2013 21:35:53 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247583 - stable/8/share/misc
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 21:35:53 -0000
    
    Author: des
    Date: Fri Mar  1 21:35:53 2013
    New Revision: 247583
    URL: http://svnweb.freebsd.org/changeset/base/247583
    
    Log:
      Manually fix screwed-up mergeinfo.
    
    Modified:
    Directory Properties:
      stable/8/cddl/compat/opensolaris/   (props changed)
      stable/8/cddl/contrib/opensolaris/   (props changed)
      stable/8/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
      stable/8/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
      stable/8/contrib/pf/   (props changed)
      stable/8/games/fortune/   (props changed)
      stable/8/gnu/usr.bin/groff/   (props changed)
      stable/8/lib/libradius/   (props changed)
      stable/8/lib/libstand/   (props changed)
      stable/8/share/misc/   (props changed)
      stable/8/share/misc/bsd-family-tree   (props changed)
      stable/8/tools/kerneldoc/subsys/   (props changed)
      stable/8/usr.bin/find/   (props changed)
      stable/8/usr.bin/gcore/   (props changed)
      stable/8/usr.bin/locale/   (props changed)
      stable/8/usr.bin/systat/   (props changed)
      stable/8/usr.bin/vmstat/   (props changed)
    
    From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  1 22:03:58 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 05C92DB2;
     Fri,  1 Mar 2013 22:03:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id EC35E19D0;
     Fri,  1 Mar 2013 22:03:57 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r21M3vnl009791;
     Fri, 1 Mar 2013 22:03:57 GMT (envelope-from pfg@svn.freebsd.org)
    Received: (from pfg@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r21M3vRA009788;
     Fri, 1 Mar 2013 22:03:57 GMT (envelope-from pfg@svn.freebsd.org)
    Message-Id: <201303012203.r21M3vRA009788@svn.freebsd.org>
    From: "Pedro F. Giffuni" 
    Date: Fri, 1 Mar 2013 22:03:57 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247589 - in stable/9/sys: fs/ext2fs ufs/ufs
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Fri, 01 Mar 2013 22:03:58 -0000
    
    Author: pfg
    Date: Fri Mar  1 22:03:57 2013
    New Revision: 247589
    URL: http://svnweb.freebsd.org/changeset/base/247589
    
    Log:
      MFC	r246562:
      
      Remove unused MAXSYMLINKLEN macro.
      
      Reviewed by:	mckusick
      PR:		kern/175794
    
    Modified:
      stable/9/sys/fs/ext2fs/inode.h
      stable/9/sys/ufs/ufs/inode.h
    Directory Properties:
      stable/9/sys/   (props changed)
      stable/9/sys/fs/   (props changed)
    
    Modified: stable/9/sys/fs/ext2fs/inode.h
    ==============================================================================
    --- stable/9/sys/fs/ext2fs/inode.h	Fri Mar  1 22:03:31 2013	(r247588)
    +++ stable/9/sys/fs/ext2fs/inode.h	Fri Mar  1 22:03:57 2013	(r247589)
    @@ -108,7 +108,6 @@ struct inode {
      */
     #define	i_shortlink	i_db
     #define	i_rdev		i_db[0]
    -#define	MAXSYMLINKLEN	((NDADDR + NIADDR) * sizeof(int32_t))
     
     /* File permissions. */
     #define	IEXEC		0000100		/* Executable. */
    
    Modified: stable/9/sys/ufs/ufs/inode.h
    ==============================================================================
    --- stable/9/sys/ufs/ufs/inode.h	Fri Mar  1 22:03:31 2013	(r247588)
    +++ stable/9/sys/ufs/ufs/inode.h	Fri Mar  1 22:03:57 2013	(r247589)
    @@ -151,10 +151,6 @@ struct inode {
     		(ip)->i_din2->d##field = (val); \
     	} while (0)
     
    -#define	MAXSYMLINKLEN(ip) \
    -	((ip)->i_ump->um_fstype == UFS1) ? \
    -	((NDADDR + NIADDR) * sizeof(ufs1_daddr_t)) : \
    -	((NDADDR + NIADDR) * sizeof(ufs2_daddr_t))
     #define	SHORTLINK(ip) \
     	(((ip)->i_ump->um_fstype == UFS1) ? \
     	(caddr_t)(ip)->i_din1->di_db : (caddr_t)(ip)->i_din2->di_db)
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 01:04:03 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 958C4A30;
     Sat,  2 Mar 2013 01:04:03 +0000 (UTC)
     (envelope-from delphij@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 71BB11FC7;
     Sat,  2 Mar 2013 01:04:03 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22143xd067087;
     Sat, 2 Mar 2013 01:04:03 GMT (envelope-from delphij@svn.freebsd.org)
    Received: (from delphij@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22143Dm067086;
     Sat, 2 Mar 2013 01:04:03 GMT (envelope-from delphij@svn.freebsd.org)
    Message-Id: <201303020104.r22143Dm067086@svn.freebsd.org>
    From: Xin LI 
    Date: Sat, 2 Mar 2013 01:04:03 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247607 - in stable: 8 9
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 01:04:03 -0000
    
    Author: delphij
    Date: Sat Mar  2 01:04:02 2013
    New Revision: 247607
    URL: http://svnweb.freebsd.org/changeset/base/247607
    
    Log:
      MFC r247422:
      
      Add a reminder that the user should update boot block if they are upgrading
      their existing system and use LZ4 compression for ZFS.
      
      Suggested by:	mm
    
    Modified:
      stable/9/UPDATING   (contents, props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/8/UPDATING   (contents, props changed)
    
    Modified: stable/9/UPDATING
    ==============================================================================
    --- stable/9/UPDATING	Sat Mar  2 01:00:26 2013	(r247606)
    +++ stable/9/UPDATING	Sat Mar  2 01:04:02 2013	(r247607)
    @@ -11,6 +11,13 @@ handbook:
     Items affecting the ports and packages system can be found in
     /usr/ports/UPDATING.  Please read that file before running portupgrade.
     
    +20130225:
    +	A new compression method (lz4) has been merged to.  Please refer to
    +	zpool-features(7) for more information.
    +
    +	Please refer to the "ZFS notes" section of this file for information
    +	on upgrading boot ZFS pools.
    +
     20121224:
     	The VFS KBI was changed with the merge of several nullfs
     	optimizations and fixes.  All filesystem modules must be
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 01:04:03 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id D3DE0A31;
     Sat,  2 Mar 2013 01:04:03 +0000 (UTC)
     (envelope-from delphij@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id C634D1FC8;
     Sat,  2 Mar 2013 01:04:03 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r221433a067093;
     Sat, 2 Mar 2013 01:04:03 GMT (envelope-from delphij@svn.freebsd.org)
    Received: (from delphij@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22143jI067092;
     Sat, 2 Mar 2013 01:04:03 GMT (envelope-from delphij@svn.freebsd.org)
    Message-Id: <201303020104.r22143jI067092@svn.freebsd.org>
    From: Xin LI 
    Date: Sat, 2 Mar 2013 01:04:03 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247607 - in stable: 8 9
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 01:04:03 -0000
    
    Author: delphij
    Date: Sat Mar  2 01:04:02 2013
    New Revision: 247607
    URL: http://svnweb.freebsd.org/changeset/base/247607
    
    Log:
      MFC r247422:
      
      Add a reminder that the user should update boot block if they are upgrading
      their existing system and use LZ4 compression for ZFS.
      
      Suggested by:	mm
    
    Modified:
      stable/8/UPDATING   (contents, props changed)
    
    Changes in other areas also in this revision:
    Modified:
      stable/9/UPDATING   (contents, props changed)
    
    Modified: stable/8/UPDATING
    ==============================================================================
    --- stable/8/UPDATING	Sat Mar  2 01:00:26 2013	(r247606)
    +++ stable/8/UPDATING	Sat Mar  2 01:04:02 2013	(r247607)
    @@ -15,6 +15,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
     	debugging tools present in HEAD were left in place because
     	sun4v support still needs work to become production ready.
     
    +20130225:
    +	A new compression method (lz4) has been merged.  Please refer to
    +	zpool-features(7) for more information.
    +
    +	Please refer to the "ZFS notes" section of this file for information
    +	on upgrading boot ZFS pools.
    +
     20121130:
     	A new version of ZFS (pool version 5000) has been merged to 8-STABLE.
     	Starting with this version the old system of ZFS pool versioning
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 14:39:48 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id EEBDD777;
     Sat,  2 Mar 2013 14:39:48 +0000 (UTC) (envelope-from dim@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id B9854E9A;
     Sat,  2 Mar 2013 14:39:48 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22Edmjd018587;
     Sat, 2 Mar 2013 14:39:48 GMT (envelope-from dim@svn.freebsd.org)
    Received: (from dim@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22EdmeH018586;
     Sat, 2 Mar 2013 14:39:48 GMT (envelope-from dim@svn.freebsd.org)
    Message-Id: <201303021439.r22EdmeH018586@svn.freebsd.org>
    From: Dimitry Andric 
    Date: Sat, 2 Mar 2013 14:39:48 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247625 - stable/9/contrib/llvm/lib/Target/X86
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 14:39:49 -0000
    
    Author: dim
    Date: Sat Mar  2 14:39:48 2013
    New Revision: 247625
    URL: http://svnweb.freebsd.org/changeset/base/247625
    
    Log:
      MFC r247205:
      
      Pull in r175962 from upstream llvm trunk:
      
        X86: Disable cmov-memory patterns on subtargets without cmov.
      
        Fixes PR15115.
      
      For the i386 arch, this should enable cmov instructions only on
      -march=pentiumpro and higher.  Since our default CPU is i486, cmov
      instructions will now be disabled by default.
    
    Modified:
      stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
    Directory Properties:
      stable/9/contrib/llvm/   (props changed)
    
    Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
    ==============================================================================
    --- stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td	Sat Mar  2 14:35:15 2013	(r247624)
    +++ stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td	Sat Mar  2 14:39:48 2013	(r247625)
    @@ -1076,12 +1076,14 @@ def : Pat<(X86cmp GR64:$src1, 0),
     // inverted.
     multiclass CMOVmr {
    -  def : Pat<(X86cmov (loadi16 addr:$src1), GR16:$src2, InvertedCond, EFLAGS),
    -            (Inst16 GR16:$src2, addr:$src1)>;
    -  def : Pat<(X86cmov (loadi32 addr:$src1), GR32:$src2, InvertedCond, EFLAGS),
    -            (Inst32 GR32:$src2, addr:$src1)>;
    -  def : Pat<(X86cmov (loadi64 addr:$src1), GR64:$src2, InvertedCond, EFLAGS),
    -            (Inst64 GR64:$src2, addr:$src1)>;
    +  let Predicates = [HasCMov] in {
    +    def : Pat<(X86cmov (loadi16 addr:$src1), GR16:$src2, InvertedCond, EFLAGS),
    +              (Inst16 GR16:$src2, addr:$src1)>;
    +    def : Pat<(X86cmov (loadi32 addr:$src1), GR32:$src2, InvertedCond, EFLAGS),
    +              (Inst32 GR32:$src2, addr:$src1)>;
    +    def : Pat<(X86cmov (loadi64 addr:$src1), GR64:$src2, InvertedCond, EFLAGS),
    +              (Inst64 GR64:$src2, addr:$src1)>;
    +  }
     }
     
     defm : CMOVmr;
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 15:11:21 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 9DC3E9BD;
     Sat,  2 Mar 2013 15:11:21 +0000 (UTC)
     (envelope-from melifaro@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 755B9DC;
     Sat,  2 Mar 2013 15:11:21 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22FBLp1031843;
     Sat, 2 Mar 2013 15:11:21 GMT (envelope-from melifaro@svn.freebsd.org)
    Received: (from melifaro@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22FBLod031840;
     Sat, 2 Mar 2013 15:11:21 GMT (envelope-from melifaro@svn.freebsd.org)
    Message-Id: <201303021511.r22FBLod031840@svn.freebsd.org>
    From: "Alexander V. Chernikov" 
    Date: Sat, 2 Mar 2013 15:11:21 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247629 - in stable/9/sys: kern net security/mac
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 15:11:21 -0000
    
    Author: melifaro
    Date: Sat Mar  2 15:11:20 2013
    New Revision: 247629
    URL: http://svnweb.freebsd.org/changeset/base/247629
    
    Log:
      Merge
      * r233937 - Improve BPF locking model
      * r233938 - Improve performace for writer-only BPF users
      * r233946 - Fix build
      * r235744 - Fix (new) panic on attaching to non-existent interface
      * r235745 - Fix old panic when BPF consumer attaches to destroying interface
      * r235746 - Call bpf_jitter() before acquiring BPF global lock
      * r235747 - Make most BPF ioctls() SMP-safe.
      * r236231 - Fix BPF_JITTER code broken by r235746.
      * r236251 - Fix shim for BIOCSETF to drop all packets buffered on the descriptor.
      * r236261 - Save the previous filter right before we set new one.
      * r236262 - Fix style(9) nits, reduce unnecessary type castings.
      * r236559 - Fix panic introduced by r235745
      * r236806 - Fix typo introduced in r236559.
      
      r233937
        - Improve BPF locking model.
      
        Interface locks and descriptor locks are converted from mutex(9) to rwlock(9).
        This greately improves performance: in most common case we need to acquire 1
        reader lock instead of 2 mutexes.
      
        - Remove filter(descriptor) (reader) lock in bpf_mtap[2]
        This was suggested by glebius@. We protect filter by requesting interface
        writer lock on filter change.
      
        - Cover struct bpf_if under BPF_INTERNAL define. This permits including bpf.h
        without including rwlock stuff. However, this is is temporary solution,
        struct bpf_if should be made opaque for any external caller.
      
      r233938
        - Improve performace for writer-only BPF users.
      
        Linux and Solaris (at least OpenSolaris) has PF_PACKET socket families to send
        raw ethernet frames. The only FreeBSD interface that can be used to send raw
        frames is BPF. As a result, many programs like cdpd, lldpd, various dhcp stuff
        uses BPF only to send data. This leads us to the situation when software like
        cdpd, being run on high-traffic-volume interface significantly reduces overall
        performance since we have to acquire additional locks for every packet.
      
        Here we add sysctl that changes BPF behavior in the following way:
        If program came and opens BPF socket without explicitly specifyin read filter
        we assume it to be write-only and add it to special writer-only per-interface
        list. This makes bpf_peers_present() return 0, so no additional overhead is
        introduced. After filter is supplied, descriptor is added to original
        per-interface list permitting packets to be captured.
      
        Unfortunately, pcap_open_live() sets catch-all filter itself for the purpose
        of setting snap length.
      
        Fortunately, most programs explicitly sets (event catch-all) filter after
        that. tcpdump(1) is a good example.
      
        So a bit hackis approach is taken: we upgrade description only after second
        BIOCSETF is received.
      
        Sysctl is named net.bpf.optimize_writers and is turned off by default.
      
        - While here, document all sysctl variables in bpf.4
      
      r233946
        Fix build broken by r233938.
      
      r235744
        Fix panic on attaching to non-existent interface
      	(introduced by r233937, pointed by hrs@)
        Fix panic on tcpdump being attached to interface being removed
      	(introduced by r233937, pointed by hrs@ and adrian@)
        Protect most of bpf_setf() by BPF global lock
      
        Add several forgotten assertions (thanks to adrian@)
      
        Document current locking model inside bpf.c
        Document EVENTHANDLER(9) usage inside BPF.
      
      r235745
        Fix old panic when BPF consumer attaches to destroying interface.
        'flags' field is added to the end of bpf_if structure. Currently the only
        flag is BPFIF_FLAG_DYING which is set on bpf detach and checked by bpf_attachd()
        Problem can be easily triggered on SMP stable/[89] by the following command
        (sort of):
        'while true; do ifconfig vlan222 create vlan 222 vlandev em0 up ; \
          tcpdump -pi vlan222 & ; ifconfig vlan222 destroy ; done'
      
        Fix possible use-after-free when BPF detaches itself from interface, freeing
        bpf_bif memory, while interface is still UP and there can be routes via this
        interface. Freeing is now delayed till ifnet_departure_event is received via
        eventhandler(9) api.
      
        Convert bpfd rwlock back to mutex due lack of performance gain
        (currently checking if packet matches filter is done without holding bpfd
         lock and we have to acquire write lock if packet matches)
      
      r235746
        Call bpf_jitter() before acquiring BPF global lock due to malloc() being
        used inside bpf_jitter.
      
        Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor creation
         and BIOCSBLEN ioctl. This permits us not to allocate buffers inside
         bpf_attachd() which is protected by global lock.
      
      r235747
        Make most BPF ioctls() SMP-safe.
      
      r236559
        Fix panic introduced by r235745. Panic occurs after first packet traverse
        renamed interface.
        Add several comments on locking
      
      r236231
        Fix BPF_JITTER code broken by r235746.
      
      r236251
        Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
        and reset statistics as it should.
      
      r236261
        - Save the previous filter right before we set new one.
        - Reduce duplicate code and make it little easier to read.
      
      r236262
        Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf().
      
      r236806
        Fix typo introduced in r236559.
    
    Modified:
      stable/9/sys/kern/subr_witness.c
      stable/9/sys/net/bpf.c
      stable/9/sys/net/bpf.h
      stable/9/sys/net/bpf_buffer.c
      stable/9/sys/net/bpf_buffer.h
      stable/9/sys/net/bpfdesc.h
      stable/9/sys/security/mac/mac_net.c
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/kern/subr_witness.c
    ==============================================================================
    --- stable/9/sys/kern/subr_witness.c	Sat Mar  2 14:54:33 2013	(r247628)
    +++ stable/9/sys/kern/subr_witness.c	Sat Mar  2 15:11:20 2013	(r247629)
    @@ -562,7 +562,7 @@ static struct witness_order_list_entry o
     	 * BPF
     	 */
     	{ "bpf global lock", &lock_class_mtx_sleep },
    -	{ "bpf interface lock", &lock_class_mtx_sleep },
    +	{ "bpf interface lock", &lock_class_rw },
     	{ "bpf cdev lock", &lock_class_mtx_sleep },
     	{ NULL, NULL },
     	/*
    
    Modified: stable/9/sys/net/bpf.c
    ==============================================================================
    --- stable/9/sys/net/bpf.c	Sat Mar  2 14:54:33 2013	(r247628)
    +++ stable/9/sys/net/bpf.c	Sat Mar  2 15:11:20 2013	(r247629)
    @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$");
     
     #include 
     #include 
    +#include 
    +#include 
     #include 
     #include 
     #include 
    @@ -66,6 +68,7 @@ __FBSDID("$FreeBSD$");
     #include 
     
     #include 
    +#define	BPF_INTERNAL
     #include 
     #include 
     #ifdef BPF_JITTER
    @@ -144,6 +147,7 @@ static int		bpf_bpfd_cnt;
     
     static void	bpf_attachd(struct bpf_d *, struct bpf_if *);
     static void	bpf_detachd(struct bpf_d *);
    +static void	bpf_detachd_locked(struct bpf_d *);
     static void	bpf_freed(struct bpf_d *);
     static int	bpf_movein(struct uio *, int, struct ifnet *, struct mbuf **,
     		    struct sockaddr *, int *, struct bpf_insn *);
    @@ -155,7 +159,7 @@ static void	catchpacket(struct bpf_d *, 
     		    void (*)(struct bpf_d *, caddr_t, u_int, void *, u_int),
     		    struct bintime *);
     static void	reset_d(struct bpf_d *);
    -static int	 bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd);
    +static int	bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd);
     static int	bpf_getdltlist(struct bpf_d *, struct bpf_dltlist *);
     static int	bpf_setdlt(struct bpf_d *, u_int);
     static void	filt_bpfdetach(struct knote *);
    @@ -173,6 +177,12 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_
     SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW,
         bpf_stats_sysctl, "bpf statistics portal");
     
    +static VNET_DEFINE(int, bpf_optimize_writers) = 0;
    +#define	V_bpf_optimize_writers VNET(bpf_optimize_writers)
    +SYSCTL_VNET_INT(_net_bpf, OID_AUTO, optimize_writers,
    +    CTLFLAG_RW, &VNET_NAME(bpf_optimize_writers), 0,
    +    "Do not send packets until BPF program is set");
    +
     static	d_open_t	bpfopen;
     static	d_read_t	bpfread;
     static	d_write_t	bpfwrite;
    @@ -197,6 +207,37 @@ static struct filterops bpfread_filtops 
     	.f_event = filt_bpfread,
     };
     
    +eventhandler_tag	bpf_ifdetach_cookie = NULL;
    +
    +/*
    + * LOCKING MODEL USED BY BPF:
    + * Locks:
    + * 1) global lock (BPF_LOCK). Mutex, used to protect interface addition/removal,
    + * some global counters and every bpf_if reference.
    + * 2) Interface lock. Rwlock, used to protect list of BPF descriptors and their filters.
    + * 3) Descriptor lock. Mutex, used to protect BPF buffers and various structure fields
    + *   used by bpf_mtap code.
    + *
    + * Lock order:
    + *
    + * Global lock, interface lock, descriptor lock
    + *
    + * We have to acquire interface lock before descriptor main lock due to BPF_MTAP[2]
    + * working model. In many places (like bpf_detachd) we start with BPF descriptor
    + * (and we need to at least rlock it to get reliable interface pointer). This
    + * gives us potential LOR. As a result, we use global lock to protect from bpf_if
    + * change in every such place.
    + *
    + * Changing d->bd_bif is protected by 1) global lock, 2) interface lock and
    + * 3) descriptor main wlock.
    + * Reading bd_bif can be protected by any of these locks, typically global lock.
    + *
    + * Changing read/write BPF filter is protected by the same three locks,
    + * the same applies for reading.
    + *
    + * Sleeping in global lock is not allowed due to bpfdetach() using it.
    + */
    +
     /*
      * Wrapper functions for various buffering methods.  If the set of buffer
      * modes expands, we will probably want to introduce a switch data structure
    @@ -290,7 +331,6 @@ bpf_canfreebuf(struct bpf_d *d)
     static int
     bpf_canwritebuf(struct bpf_d *d)
     {
    -
     	BPFD_LOCK_ASSERT(d);
     
     	switch (d->bd_bufmode) {
    @@ -569,17 +609,92 @@ bad:
     static void
     bpf_attachd(struct bpf_d *d, struct bpf_if *bp)
     {
    +	int op_w;
    +
    +	BPF_LOCK_ASSERT();
    +
    +	/*
    +	 * Save sysctl value to protect from sysctl change
    +	 * between reads
    +	 */
    +	op_w = V_bpf_optimize_writers;
    +
    +	if (d->bd_bif != NULL)
    +		bpf_detachd_locked(d);
     	/*
    -	 * Point d at bp, and add d to the interface's list of listeners.
    -	 * Finally, point the driver's bpf cookie at the interface so
    -	 * it will divert packets to bpf.
    +	 * Point d at bp, and add d to the interface's list.
    +	 * Since there are many applicaiotns using BPF for
    +	 * sending raw packets only (dhcpd, cdpd are good examples)
    +	 * we can delay adding d to the list of active listeners until
    +	 * some filter is configured.
     	 */
    -	BPFIF_LOCK(bp);
    +
    +	BPFIF_WLOCK(bp);
    +	BPFD_LOCK(d);
    +
     	d->bd_bif = bp;
    -	LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next);
    +
    +	if (op_w != 0) {
    +		/* Add to writers-only list */
    +		LIST_INSERT_HEAD(&bp->bif_wlist, d, bd_next);
    +		/*
    +		 * We decrement bd_writer on every filter set operation.
    +		 * First BIOCSETF is done by pcap_open_live() to set up
    +		 * snap length. After that appliation usually sets its own filter
    +		 */
    +		d->bd_writer = 2;
    +	} else
    +		LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next);
    +
    +	BPFD_UNLOCK(d);
    +	BPFIF_WUNLOCK(bp);
     
     	bpf_bpfd_cnt++;
    -	BPFIF_UNLOCK(bp);
    +
    +	CTR3(KTR_NET, "%s: bpf_attach called by pid %d, adding to %s list",
    +	    __func__, d->bd_pid, d->bd_writer ? "writer" : "active");
    +
    +	if (op_w == 0)
    +		EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1);
    +}
    +
    +/*
    + * Add d to the list of active bp filters.
    + * Reuqires bpf_attachd() to be called before
    + */
    +static void
    +bpf_upgraded(struct bpf_d *d)
    +{
    +	struct bpf_if *bp;
    +
    +	BPF_LOCK_ASSERT();
    +
    +	bp = d->bd_bif;
    +
    +	/*
    +	 * Filter can be set several times without specifying interface.
    +	 * Mark d as reader and exit.
    +	 */
    +	if (bp == NULL) {
    +		BPFD_LOCK(d);
    +		d->bd_writer = 0;
    +		BPFD_UNLOCK(d);
    +		return;
    +	}
    +
    +	BPFIF_WLOCK(bp);
    +	BPFD_LOCK(d);
    +
    +	/* Remove from writers-only list */
    +	LIST_REMOVE(d, bd_next);
    +	LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next);
    +	/* Mark d as reader */
    +	d->bd_writer = 0;
    +
    +	BPFD_UNLOCK(d);
    +	BPFIF_WUNLOCK(bp);
    +
    +	CTR2(KTR_NET, "%s: upgrade required by pid %d", __func__, d->bd_pid);
     
     	EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1);
     }
    @@ -590,26 +705,47 @@ bpf_attachd(struct bpf_d *d, struct bpf_
     static void
     bpf_detachd(struct bpf_d *d)
     {
    +	BPF_LOCK();
    +	bpf_detachd_locked(d);
    +	BPF_UNLOCK();
    +}
    +
    +static void
    +bpf_detachd_locked(struct bpf_d *d)
    +{
     	int error;
     	struct bpf_if *bp;
     	struct ifnet *ifp;
     
    -	bp = d->bd_bif;
    -	BPFIF_LOCK(bp);
    +	CTR2(KTR_NET, "%s: detach required by pid %d", __func__, d->bd_pid);
    +
    +	BPF_LOCK_ASSERT();
    +
    +	/* Check if descriptor is attached */
    +	if ((bp = d->bd_bif) == NULL)
    +		return;
    +
    +	BPFIF_WLOCK(bp);
     	BPFD_LOCK(d);
    -	ifp = d->bd_bif->bif_ifp;
    +
    +	/* Save bd_writer value */
    +	error = d->bd_writer;
     
     	/*
     	 * Remove d from the interface's descriptor list.
     	 */
     	LIST_REMOVE(d, bd_next);
     
    -	bpf_bpfd_cnt--;
    +	ifp = bp->bif_ifp;
     	d->bd_bif = NULL;
     	BPFD_UNLOCK(d);
    -	BPFIF_UNLOCK(bp);
    +	BPFIF_WUNLOCK(bp);
    +
    +	bpf_bpfd_cnt--;
     
    -	EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0);
    +	/* Call event handler iff d is attached */
    +	if (error == 0)
    +		EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0);
     
     	/*
     	 * Check if this descriptor had requested promiscuous mode.
    @@ -648,10 +784,7 @@ bpf_dtor(void *data)
     	d->bd_state = BPF_IDLE;
     	BPFD_UNLOCK(d);
     	funsetown(&d->bd_sigio);
    -	mtx_lock(&bpf_mtx);
    -	if (d->bd_bif)
    -		bpf_detachd(d);
    -	mtx_unlock(&bpf_mtx);
    +	bpf_detachd(d);
     #ifdef MAC
     	mac_bpfdesc_destroy(d);
     #endif /* MAC */
    @@ -671,7 +804,7 @@ static	int
     bpfopen(struct cdev *dev, int flags, int fmt, struct thread *td)
     {
     	struct bpf_d *d;
    -	int error;
    +	int error, size;
     
     	d = malloc(sizeof(*d), M_BPF, M_WAITOK | M_ZERO);
     	error = devfs_set_cdevpriv(d, bpf_dtor);
    @@ -689,14 +822,18 @@ bpfopen(struct cdev *dev, int flags, int
     	d->bd_bufmode = BPF_BUFMODE_BUFFER;
     	d->bd_sig = SIGIO;
     	d->bd_direction = BPF_D_INOUT;
    -	d->bd_pid = td->td_proc->p_pid;
    +	BPF_PID_REFRESH(d, td);
     #ifdef MAC
     	mac_bpfdesc_init(d);
     	mac_bpfdesc_create(td->td_ucred, d);
     #endif
    -	mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
    -	callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0);
    -	knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx);
    +	mtx_init(&d->bd_lock, devtoname(dev), "bpf cdev lock", MTX_DEF);
    +	callout_init_mtx(&d->bd_callout, &d->bd_lock, 0);
    +	knlist_init_mtx(&d->bd_sel.si_note, &d->bd_lock);
    +
    +	/* Allocate default buffers */
    +	size = d->bd_bufsize;
    +	bpf_buffer_ioctl_sblen(d, &size);
     
     	return (0);
     }
    @@ -726,7 +863,7 @@ bpfread(struct cdev *dev, struct uio *ui
     	non_block = ((ioflag & O_NONBLOCK) != 0);
     
     	BPFD_LOCK(d);
    -	d->bd_pid = curthread->td_proc->p_pid;
    +	BPF_PID_REFRESH_CUR(d);
     	if (d->bd_bufmode != BPF_BUFMODE_BUFFER) {
     		BPFD_UNLOCK(d);
     		return (EOPNOTSUPP);
    @@ -772,7 +909,7 @@ bpfread(struct cdev *dev, struct uio *ui
     			BPFD_UNLOCK(d);
     			return (EWOULDBLOCK);
     		}
    -		error = msleep(d, &d->bd_mtx, PRINET|PCATCH,
    +		error = msleep(d, &d->bd_lock, PRINET|PCATCH,
     		     "bpf", d->bd_rtout);
     		if (error == EINTR || error == ERESTART) {
     			BPFD_UNLOCK(d);
    @@ -889,8 +1026,9 @@ bpfwrite(struct cdev *dev, struct uio *u
     	if (error != 0)
     		return (error);
     
    -	d->bd_pid = curthread->td_proc->p_pid;
    +	BPF_PID_REFRESH_CUR(d);
     	d->bd_wcount++;
    +	/* XXX: locking required */
     	if (d->bd_bif == NULL) {
     		d->bd_wdcount++;
     		return (ENXIO);
    @@ -911,6 +1049,7 @@ bpfwrite(struct cdev *dev, struct uio *u
     	bzero(&dst, sizeof(dst));
     	m = NULL;
     	hlen = 0;
    +	/* XXX: bpf_movein() can sleep */
     	error = bpf_movein(uio, (int)d->bd_bif->bif_dlt, ifp,
     	    &m, &dst, &hlen, d->bd_wfilter);
     	if (error) {
    @@ -970,7 +1109,7 @@ static void
     reset_d(struct bpf_d *d)
     {
     
    -	mtx_assert(&d->bd_mtx, MA_OWNED);
    +	BPFD_LOCK_ASSERT(d);
     
     	if ((d->bd_hbuf != NULL) &&
     	    (d->bd_bufmode != BPF_BUFMODE_ZBUF || bpf_canfreebuf(d))) {
    @@ -1038,7 +1177,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Refresh PID associated with this descriptor.
     	 */
     	BPFD_LOCK(d);
    -	d->bd_pid = td->td_proc->p_pid;
    +	BPF_PID_REFRESH(d, td);
     	if (d->bd_state == BPF_WAITING)
     		callout_stop(&d->bd_callout);
     	d->bd_state = BPF_IDLE;
    @@ -1090,7 +1229,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	case BIOCGDLTLIST32:
     	case BIOCGRTIMEOUT32:
     	case BIOCSRTIMEOUT32:
    +		BPFD_LOCK(d);
     		d->bd_compat32 = 1;
    +		BPFD_UNLOCK(d);
     	}
     #endif
     
    @@ -1135,7 +1276,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Get buffer len [for read()].
     	 */
     	case BIOCGBLEN:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_bufsize;
    +		BPFD_UNLOCK(d);
     		break;
     
     	/*
    @@ -1190,10 +1333,12 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Get current data link type.
     	 */
     	case BIOCGDLT:
    +		BPF_LOCK();
     		if (d->bd_bif == NULL)
     			error = EINVAL;
     		else
     			*(u_int *)addr = d->bd_bif->bif_dlt;
    +		BPF_UNLOCK();
     		break;
     
     	/*
    @@ -1208,6 +1353,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     			list32 = (struct bpf_dltlist32 *)addr;
     			dltlist.bfl_len = list32->bfl_len;
     			dltlist.bfl_list = PTRIN(list32->bfl_list);
    +			BPF_LOCK();
     			if (d->bd_bif == NULL)
     				error = EINVAL;
     			else {
    @@ -1215,31 +1361,37 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     				if (error == 0)
     					list32->bfl_len = dltlist.bfl_len;
     			}
    +			BPF_UNLOCK();
     			break;
     		}
     #endif
     
     	case BIOCGDLTLIST:
    +		BPF_LOCK();
     		if (d->bd_bif == NULL)
     			error = EINVAL;
     		else
     			error = bpf_getdltlist(d, (struct bpf_dltlist *)addr);
    +		BPF_UNLOCK();
     		break;
     
     	/*
     	 * Set data link type.
     	 */
     	case BIOCSDLT:
    +		BPF_LOCK();
     		if (d->bd_bif == NULL)
     			error = EINVAL;
     		else
     			error = bpf_setdlt(d, *(u_int *)addr);
    +		BPF_UNLOCK();
     		break;
     
     	/*
     	 * Get interface name.
     	 */
     	case BIOCGETIF:
    +		BPF_LOCK();
     		if (d->bd_bif == NULL)
     			error = EINVAL;
     		else {
    @@ -1249,13 +1401,16 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     			strlcpy(ifr->ifr_name, ifp->if_xname,
     			    sizeof(ifr->ifr_name));
     		}
    +		BPF_UNLOCK();
     		break;
     
     	/*
     	 * Set interface.
     	 */
     	case BIOCSETIF:
    +		BPF_LOCK();
     		error = bpf_setif(d, (struct ifreq *)addr);
    +		BPF_UNLOCK();
     		break;
     
     	/*
    @@ -1338,7 +1493,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Set immediate mode.
     	 */
     	case BIOCIMMEDIATE:
    +		BPFD_LOCK(d);
     		d->bd_immediate = *(u_int *)addr;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case BIOCVERSION:
    @@ -1354,21 +1511,27 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Get "header already complete" flag
     	 */
     	case BIOCGHDRCMPLT:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_hdrcmplt;
    +		BPFD_UNLOCK(d);
     		break;
     
     	/*
     	 * Set "header already complete" flag
     	 */
     	case BIOCSHDRCMPLT:
    +		BPFD_LOCK(d);
     		d->bd_hdrcmplt = *(u_int *)addr ? 1 : 0;
    +		BPFD_UNLOCK(d);
     		break;
     
     	/*
     	 * Get packet direction flag
     	 */
     	case BIOCGDIRECTION:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_direction;
    +		BPFD_UNLOCK(d);
     		break;
     
     	/*
    @@ -1383,7 +1546,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     			case BPF_D_IN:
     			case BPF_D_INOUT:
     			case BPF_D_OUT:
    +				BPFD_LOCK(d);
     				d->bd_direction = direction;
    +				BPFD_UNLOCK(d);
     				break;
     			default:
     				error = EINVAL;
    @@ -1395,7 +1560,9 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     	 * Get packet timestamp format and resolution.
     	 */
     	case BIOCGTSTAMP:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_tstamp;
    +		BPFD_UNLOCK(d);
     		break;
     
     	/*
    @@ -1414,26 +1581,38 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     		break;
     
     	case BIOCFEEDBACK:
    +		BPFD_LOCK(d);
     		d->bd_feedback = *(u_int *)addr;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case BIOCLOCK:
    +		BPFD_LOCK(d);
     		d->bd_locked = 1;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case FIONBIO:		/* Non-blocking I/O */
     		break;
     
     	case FIOASYNC:		/* Send signal on receive packets */
    +		BPFD_LOCK(d);
     		d->bd_async = *(int *)addr;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case FIOSETOWN:
    +		/*
    +		 * XXX: Add some sort of locking here?
    +		 * fsetown() can sleep.
    +		 */
     		error = fsetown(*(int *)addr, &d->bd_sigio);
     		break;
     
     	case FIOGETOWN:
    +		BPFD_LOCK(d);
     		*(int *)addr = fgetown(&d->bd_sigio);
    +		BPFD_UNLOCK(d);
     		break;
     
     	/* This is deprecated, FIOSETOWN should be used instead. */
    @@ -1454,16 +1633,23 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     
     			if (sig >= NSIG)
     				error = EINVAL;
    -			else
    +			else {
    +				BPFD_LOCK(d);
     				d->bd_sig = sig;
    +				BPFD_UNLOCK(d);
    +			}
     			break;
     		}
     	case BIOCGRSIG:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_sig;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case BIOCGETBUFMODE:
    +		BPFD_LOCK(d);
     		*(u_int *)addr = d->bd_bufmode;
    +		BPFD_UNLOCK(d);
     		break;
     
     	case BIOCSETBUFMODE:
    @@ -1518,19 +1704,31 @@ bpfioctl(struct cdev *dev, u_long cmd, c
     /*
      * Set d's packet filter program to fp.  If this file already has a filter,
      * free it and replace it.  Returns EINVAL for bogus requests.
    + *
    + * Note we need global lock here to serialize bpf_setf() and bpf_setif() calls
    + * since reading d->bd_bif can't be protected by d or interface lock due to
    + * lock order.
    + *
    + * Additionally, we have to acquire interface write lock due to bpf_mtap() uses
    + * interface read lock to read all filers.
    + *
      */
     static int
     bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd)
     {
    +#ifdef COMPAT_FREEBSD32
    +	struct bpf_program fp_swab;
    +	struct bpf_program32 *fp32;
    +#endif
     	struct bpf_insn *fcode, *old;
    -	u_int wfilter, flen, size;
     #ifdef BPF_JITTER
    -	bpf_jit_filter *ofunc;
    +	bpf_jit_filter *jfunc, *ofunc;
     #endif
    -#ifdef COMPAT_FREEBSD32
    -	struct bpf_program32 *fp32;
    -	struct bpf_program fp_swab;
    +	size_t size;
    +	u_int flen;
    +	int need_upgrade;
     
    +#ifdef COMPAT_FREEBSD32
     	switch (cmd) {
     	case BIOCSETF32:
     	case BIOCSETWF32:
    @@ -1550,73 +1748,86 @@ bpf_setf(struct bpf_d *d, struct bpf_pro
     		break;
     	}
     #endif
    -	if (cmd == BIOCSETWF) {
    -		old = d->bd_wfilter;
    -		wfilter = 1;
    -#ifdef BPF_JITTER
    -		ofunc = NULL;
    -#endif
    -	} else {
    -		wfilter = 0;
    -		old = d->bd_rfilter;
    +
    +	fcode = NULL;
     #ifdef BPF_JITTER
    -		ofunc = d->bd_bfilter;
    +	jfunc = ofunc = NULL;
     #endif
    -	}
    -	if (fp->bf_insns == NULL) {
    -		if (fp->bf_len != 0)
    +	need_upgrade = 0;
    +
    +	/*
    +	 * Check new filter validness before acquiring any locks.
    +	 * Allocate memory for new filter, if needed.
    +	 */
    +	flen = fp->bf_len;
    +	if (flen > bpf_maxinsns || (fp->bf_insns == NULL && flen != 0))
    +		return (EINVAL);
    +	size = flen * sizeof(*fp->bf_insns);
    +	if (size > 0) {
    +		/* We're setting up new filter.  Copy and check actual data. */
    +		fcode = malloc(size, M_BPF, M_WAITOK);
    +		if (copyin(fp->bf_insns, fcode, size) != 0 ||
    +		    !bpf_validate(fcode, flen)) {
    +			free(fcode, M_BPF);
     			return (EINVAL);
    -		BPFD_LOCK(d);
    -		if (wfilter)
    -			d->bd_wfilter = NULL;
    -		else {
    -			d->bd_rfilter = NULL;
    -#ifdef BPF_JITTER
    -			d->bd_bfilter = NULL;
    -#endif
    -			if (cmd == BIOCSETF)
    -				reset_d(d);
     		}
    -		BPFD_UNLOCK(d);
    -		if (old != NULL)
    -			free((caddr_t)old, M_BPF);
     #ifdef BPF_JITTER
    -		if (ofunc != NULL)
    -			bpf_destroy_jit_filter(ofunc);
    +		/* Filter is copied inside fcode and is perfectly valid. */
    +		jfunc = bpf_jitter(fcode, flen);
     #endif
    -		return (0);
     	}
    -	flen = fp->bf_len;
    -	if (flen > bpf_maxinsns)
    -		return (EINVAL);
     
    -	size = flen * sizeof(*fp->bf_insns);
    -	fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK);
    -	if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) == 0 &&
    -	    bpf_validate(fcode, (int)flen)) {
    -		BPFD_LOCK(d);
    -		if (wfilter)
    -			d->bd_wfilter = fcode;
    -		else {
    -			d->bd_rfilter = fcode;
    +	BPF_LOCK();
    +
    +	/*
    +	 * Set up new filter.
    +	 * Protect filter change by interface lock.
    +	 * Additionally, we are protected by global lock here.
    +	 */
    +	if (d->bd_bif != NULL)
    +		BPFIF_WLOCK(d->bd_bif);
    +	BPFD_LOCK(d);
    +	if (cmd == BIOCSETWF) {
    +		old = d->bd_wfilter;
    +		d->bd_wfilter = fcode;
    +	} else {
    +		old = d->bd_rfilter;
    +		d->bd_rfilter = fcode;
     #ifdef BPF_JITTER
    -			d->bd_bfilter = bpf_jitter(fcode, flen);
    +		ofunc = d->bd_bfilter;
    +		d->bd_bfilter = jfunc;
     #endif
    -			if (cmd == BIOCSETF)
    -				reset_d(d);
    +		if (cmd == BIOCSETF)
    +			reset_d(d);
    +
    +		if (fcode != NULL) {
    +			/*
    +			 * Do not require upgrade by first BIOCSETF
    +			 * (used to set snaplen) by pcap_open_live().
    +			 */
    +			if (d->bd_writer != 0 && --d->bd_writer == 0)
    +				need_upgrade = 1;
    +			CTR4(KTR_NET, "%s: filter function set by pid %d, "
    +			    "bd_writer counter %d, need_upgrade %d",
    +			    __func__, d->bd_pid, d->bd_writer, need_upgrade);
     		}
    -		BPFD_UNLOCK(d);
    -		if (old != NULL)
    -			free((caddr_t)old, M_BPF);
    +	}
    +	BPFD_UNLOCK(d);
    +	if (d->bd_bif != NULL)
    +		BPFIF_WUNLOCK(d->bd_bif);
    +	if (old != NULL)
    +		free(old, M_BPF);
     #ifdef BPF_JITTER
    -		if (ofunc != NULL)
    -			bpf_destroy_jit_filter(ofunc);
    +	if (ofunc != NULL)
    +		bpf_destroy_jit_filter(ofunc);
     #endif
     
    -		return (0);
    -	}
    -	free((caddr_t)fcode, M_BPF);
    -	return (EINVAL);
    +	/* Move d to active readers list. */
    +	if (need_upgrade)
    +		bpf_upgraded(d);
    +
    +	BPF_UNLOCK();
    +	return (0);
     }
     
     /*
    @@ -1630,28 +1841,30 @@ bpf_setif(struct bpf_d *d, struct ifreq 
     	struct bpf_if *bp;
     	struct ifnet *theywant;
     
    +	BPF_LOCK_ASSERT();
    +
     	theywant = ifunit(ifr->ifr_name);
     	if (theywant == NULL || theywant->if_bpf == NULL)
     		return (ENXIO);
     
     	bp = theywant->if_bpf;
     
    +	/* Check if interface is not being detached from BPF */
    +	BPFIF_RLOCK(bp);
    +	if (bp->flags & BPFIF_FLAG_DYING) {
    +		BPFIF_RUNLOCK(bp);
    +		return (ENXIO);
    +	}
    +	BPFIF_RUNLOCK(bp);
    +
     	/*
     	 * Behavior here depends on the buffering model.  If we're using
     	 * kernel memory buffers, then we can allocate them here.  If we're
     	 * using zero-copy, then the user process must have registered
     	 * buffers by the time we get here.  If not, return an error.
    -	 *
    -	 * XXXRW: There are locking issues here with multi-threaded use: what
    -	 * if two threads try to set the interface at once?
     	 */
     	switch (d->bd_bufmode) {
     	case BPF_BUFMODE_BUFFER:
    -		if (d->bd_sbuf == NULL)
    -			bpf_buffer_alloc(d);
    -		KASSERT(d->bd_sbuf != NULL, ("bpf_setif: bd_sbuf NULL"));
    -		break;
    -
     	case BPF_BUFMODE_ZBUF:
     		if (d->bd_sbuf == NULL)
     			return (EINVAL);
    @@ -1660,15 +1873,8 @@ bpf_setif(struct bpf_d *d, struct ifreq 
     	default:
     		panic("bpf_setif: bufmode %d", d->bd_bufmode);
     	}
    -	if (bp != d->bd_bif) {
    -		if (d->bd_bif)
    -			/*
    -			 * Detach if attached to something else.
    -			 */
    -			bpf_detachd(d);
    -
    +	if (bp != d->bd_bif)
     		bpf_attachd(d, bp);
    -	}
     	BPFD_LOCK(d);
     	reset_d(d);
     	BPFD_UNLOCK(d);
    @@ -1696,7 +1902,7 @@ bpfpoll(struct cdev *dev, int events, st
     	 */
     	revents = events & (POLLOUT | POLLWRNORM);
     	BPFD_LOCK(d);
    -	d->bd_pid = td->td_proc->p_pid;
    +	BPF_PID_REFRESH(d, td);
     	if (events & (POLLIN | POLLRDNORM)) {
     		if (bpf_ready(d))
     			revents |= events & (POLLIN | POLLRDNORM);
    @@ -1731,7 +1937,7 @@ bpfkqfilter(struct cdev *dev, struct kno
     	 * Refresh PID associated with this descriptor.
     	 */
     	BPFD_LOCK(d);
    -	d->bd_pid = curthread->td_proc->p_pid;
    +	BPF_PID_REFRESH_CUR(d);
     	kn->kn_fop = &bpfread_filtops;
     	kn->kn_hook = d;
     	knlist_add(&d->bd_sel.si_note, kn, 1);
    @@ -1829,9 +2035,19 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, 
     	int gottime;
     
     	gottime = BPF_TSTAMP_NONE;
    -	BPFIF_LOCK(bp);
    +
    +	BPFIF_RLOCK(bp);
    +
     	LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
    -		BPFD_LOCK(d);
    +		/*
    +		 * We are not using any locks for d here because:
    +		 * 1) any filter change is protected by interface
    +		 * write lock
    +		 * 2) destroying/detaching d is protected by interface
    +		 * write lock, too
    +		 */
    +
    +		/* XXX: Do not protect counter for the sake of performance. */
     		++d->bd_rcount;
     		/*
     		 * NB: We dont call BPF_CHECK_DIRECTION() here since there is no
    @@ -1847,6 +2063,11 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, 
     #endif
     		slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen);
     		if (slen != 0) {
    +			/*
    +			 * Filter matches. Let's to acquire write lock.
    +			 */
    +			BPFD_LOCK(d);
    +
     			d->bd_fcount++;
     			if (gottime < bpf_ts_quality(d->bd_tstamp))
     				gottime = bpf_gettime(&bt, d->bd_tstamp, NULL);
    @@ -1855,10 +2076,10 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, 
     #endif
     				catchpacket(d, pkt, pktlen, slen,
     				    bpf_append_bytes, &bt);
    +			BPFD_UNLOCK(d);
     		}
    -		BPFD_UNLOCK(d);
     	}
    -	BPFIF_UNLOCK(bp);
    +	BPFIF_RUNLOCK(bp);
     }
     
     #define	BPF_CHECK_DIRECTION(d, r, i)				\
    @@ -1867,6 +2088,7 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, 
     
     /*
      * Incoming linkage from device drivers, when packet is in an mbuf chain.
    + * Locking model is explained in bpf_tap().
      */
     void
     bpf_mtap(struct bpf_if *bp, struct mbuf *m)
    @@ -1886,13 +2108,13 @@ bpf_mtap(struct bpf_if *bp, struct mbuf 
     	}
     
     	pktlen = m_length(m, NULL);
    -
     	gottime = BPF_TSTAMP_NONE;
    -	BPFIF_LOCK(bp);
    +
    +	BPFIF_RLOCK(bp);
    +
     	LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
     		if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp))
     			continue;
    -		BPFD_LOCK(d);
     		++d->bd_rcount;
     #ifdef BPF_JITTER
     		bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL;
    @@ -1903,6 +2125,8 @@ bpf_mtap(struct bpf_if *bp, struct mbuf 
     #endif
     		slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0);
     		if (slen != 0) {
    +			BPFD_LOCK(d);
    +
     			d->bd_fcount++;
     			if (gottime < bpf_ts_quality(d->bd_tstamp))
     				gottime = bpf_gettime(&bt, d->bd_tstamp, m);
    @@ -1911,10 +2135,10 @@ bpf_mtap(struct bpf_if *bp, struct mbuf 
     #endif
     				catchpacket(d, (u_char *)m, pktlen, slen,
     				    bpf_append_mbuf, &bt);
    +			BPFD_UNLOCK(d);
     		}
    -		BPFD_UNLOCK(d);
     	}
    -	BPFIF_UNLOCK(bp);
    +	BPFIF_RUNLOCK(bp);
     }
     
     /*
    @@ -1948,14 +2172,17 @@ bpf_mtap2(struct bpf_if *bp, void *data,
     	pktlen += dlen;
     
     	gottime = BPF_TSTAMP_NONE;
    -	BPFIF_LOCK(bp);
    +
    +	BPFIF_RLOCK(bp);
    +
     	LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
     		if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp))
     			continue;
    -		BPFD_LOCK(d);
     		++d->bd_rcount;
     		slen = bpf_filter(d->bd_rfilter, (u_char *)&mb, pktlen, 0);
     		if (slen != 0) {
    +			BPFD_LOCK(d);
    +
     			d->bd_fcount++;
     			if (gottime < bpf_ts_quality(d->bd_tstamp))
     				gottime = bpf_gettime(&bt, d->bd_tstamp, m);
    @@ -1964,10 +2191,10 @@ bpf_mtap2(struct bpf_if *bp, void *data,
     #endif
     				catchpacket(d, (u_char *)&mb, pktlen, slen,
     				    bpf_append_mbuf, &bt);
    +			BPFD_UNLOCK(d);
     		}
    -		BPFD_UNLOCK(d);
     	}
    -	BPFIF_UNLOCK(bp);
    +	BPFIF_RUNLOCK(bp);
     }
     
     #undef	BPF_CHECK_DIRECTION
    @@ -2206,7 +2433,7 @@ bpf_freed(struct bpf_d *d)
     	}
     	if (d->bd_wfilter != NULL)
     		free((caddr_t)d->bd_wfilter, M_BPF);
    -	mtx_destroy(&d->bd_mtx);
    +	mtx_destroy(&d->bd_lock);
     }
     
     /*
    @@ -2236,15 +2463,16 @@ bpfattach2(struct ifnet *ifp, u_int dlt,
     		panic("bpfattach");
     
     	LIST_INIT(&bp->bif_dlist);
    +	LIST_INIT(&bp->bif_wlist);
     	bp->bif_ifp = ifp;
     	bp->bif_dlt = dlt;
    -	mtx_init(&bp->bif_mtx, "bpf interface lock", NULL, MTX_DEF);
    +	rw_init(&bp->bif_lock, "bpf interface lock");
     	KASSERT(*driverp == NULL, ("bpfattach2: driverp already initialized"));
     	*driverp = bp;
     
    -	mtx_lock(&bpf_mtx);
    +	BPF_LOCK();
     	LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next);
    -	mtx_unlock(&bpf_mtx);
    +	BPF_UNLOCK();
     
     	bp->bif_hdrlen = hdrlen;
     
    @@ -2253,10 +2481,9 @@ bpfattach2(struct ifnet *ifp, u_int dlt,
     }
     
     /*
    - * Detach bpf from an interface.  This involves detaching each descriptor
    - * associated with the interface, and leaving bd_bif NULL.  Notify each
    - * descriptor as it's detached so that any sleepers wake up and get
    - * ENXIO.
    + * Detach bpf from an interface. This involves detaching each descriptor
    + * associated with the interface. Notify each descriptor as it's detached
    + * so that any sleepers wake up and get ENXIO.
      */
     void
     bpfdetach(struct ifnet *ifp)
    @@ -2269,31 +2496,45 @@ bpfdetach(struct ifnet *ifp)
     	ndetached = 0;
     #endif
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:18:41 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 06263619;
     Sat,  2 Mar 2013 16:18:41 +0000 (UTC)
     (envelope-from dteske@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id E1959607;
     Sat,  2 Mar 2013 16:18:40 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22GIet5051489;
     Sat, 2 Mar 2013 16:18:40 GMT (envelope-from dteske@svn.freebsd.org)
    Received: (from dteske@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22GIeYv051488;
     Sat, 2 Mar 2013 16:18:40 GMT (envelope-from dteske@svn.freebsd.org)
    Message-Id: <201303021618.r22GIeYv051488@svn.freebsd.org>
    From: Devin Teske 
    Date: Sat, 2 Mar 2013 16:18:40 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247634 - stable/9/usr.sbin/sysinstall
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:18:41 -0000
    
    Author: dteske
    Date: Sat Mar  2 16:18:40 2013
    New Revision: 247634
    URL: http://svnweb.freebsd.org/changeset/base/247634
    
    Log:
      Update FTP directories to include new layout. Previously discussed with
      kensmith and others as this alleviates the need for the symbolic link upkeep
      which is currently manually maintained.
    
    Modified:
      stable/9/usr.sbin/sysinstall/ftp.c
    
    Modified: stable/9/usr.sbin/sysinstall/ftp.c
    ==============================================================================
    --- stable/9/usr.sbin/sysinstall/ftp.c	Sat Mar  2 16:07:55 2013	(r247633)
    +++ stable/9/usr.sbin/sysinstall/ftp.c	Sat Mar  2 16:18:40 2013	(r247634)
    @@ -50,8 +50,12 @@ int FtpPort;
     
     /* List of sub directories to look for under a given FTP server. */
     const char *ftp_dirs[] = { ".", "releases/"MACHINE, "snapshots/"MACHINE,
    +    "releases/"MACHINE"/"MACHINE_ARCH, "snapshots/"MACHINE"/"MACHINE_ARCH,
         "pub/FreeBSD", "pub/FreeBSD/releases/"MACHINE,
    -    "pub/FreeBSD/snapshots/"MACHINE, NULL };
    +    "pub/FreeBSD/snapshots/"MACHINE,
    +    "pub/FreeBSD/releases/"MACHINE"/"MACHINE_ARCH,
    +    "pub/FreeBSD/snapshots/"MACHINE"/"MACHINE_ARCH,
    +    NULL };
     
     /* Brings up attached network device, if any - takes FTP device as arg */
     static Boolean
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:33:40 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id A7371E23;
     Sat,  2 Mar 2013 16:33:40 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 813EF6B3;
     Sat,  2 Mar 2013 16:33:40 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22GXemp057027;
     Sat, 2 Mar 2013 16:33:40 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22GXeDk057025;
     Sat, 2 Mar 2013 16:33:40 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021633.r22GXeDk057025@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 16: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
    Subject: svn commit: r247636 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:33:40 -0000
    
    Author: marius
    Date: Sat Mar  2 16:33:39 2013
    New Revision: 247636
    URL: http://svnweb.freebsd.org/changeset/base/247636
    
    Log:
      MFC: r235643
      
      Properly use LDADD & DPADD to link against libwrap.
    
    Modified:
      stable/8/libexec/tftpd/Makefile
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/Makefile
    ==============================================================================
    --- stable/8/libexec/tftpd/Makefile	Sat Mar  2 16:30:18 2013	(r247635)
    +++ stable/8/libexec/tftpd/Makefile	Sat Mar  2 16:33:39 2013	(r247636)
    @@ -7,6 +7,8 @@ SRCS=	tftp-file.c tftp-io.c tftp-options
     SRCS+=	tftpd.c
     WARNS=	6
     WFORMAT=0
    -LDFLAGS= -lwrap
    +
    +DPADD=	${LIBWRAP}
    +LDADD=	-lwrap
     
     .include 
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:33:44 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 3C318E25;
     Sat,  2 Mar 2013 16:33:44 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 2C6766B5;
     Sat,  2 Mar 2013 16:33:44 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22GXiKL057066;
     Sat, 2 Mar 2013 16:33:44 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22GXivR057065;
     Sat, 2 Mar 2013 16:33:44 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021633.r22GXivR057065@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 16:33:44 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247637 - stable/9/libexec/tftpd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:33:44 -0000
    
    Author: marius
    Date: Sat Mar  2 16:33:43 2013
    New Revision: 247637
    URL: http://svnweb.freebsd.org/changeset/base/247637
    
    Log:
      MFC: r235643
      
      Properly use LDADD & DPADD to link against libwrap.
    
    Modified:
      stable/9/libexec/tftpd/Makefile
    Directory Properties:
      stable/9/libexec/tftpd/   (props changed)
    
    Modified: stable/9/libexec/tftpd/Makefile
    ==============================================================================
    --- stable/9/libexec/tftpd/Makefile	Sat Mar  2 16:33:39 2013	(r247636)
    +++ stable/9/libexec/tftpd/Makefile	Sat Mar  2 16:33:43 2013	(r247637)
    @@ -6,6 +6,8 @@ MAN=	tftpd.8
     SRCS=	tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
     SRCS+=	tftpd.c
     WFORMAT=0
    -LDFLAGS= -lwrap
    +
    +DPADD=	${LIBWRAP}
    +LDADD=	-lwrap
     
     .include 
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:38:59 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id A7FA5452;
     Sat,  2 Mar 2013 16:38:59 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 8005E6EA;
     Sat,  2 Mar 2013 16:38:59 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22Gcxba058042;
     Sat, 2 Mar 2013 16:38:59 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22GcxVI058039;
     Sat, 2 Mar 2013 16:38:59 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021638.r22GcxVI058039@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 16:38:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247638 - stable/9/libexec/tftpd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:38:59 -0000
    
    Author: marius
    Date: Sat Mar  2 16:38:58 2013
    New Revision: 247638
    URL: http://svnweb.freebsd.org/changeset/base/247638
    
    Log:
      MFC: r241720 (partial)
      
      Fix warnings found by -Wmising-variable-declarations.
    
    Modified:
      stable/9/libexec/tftpd/tftp-io.c
      stable/9/libexec/tftpd/tftp-utils.c
      stable/9/libexec/tftpd/tftpd.c
    Directory Properties:
      stable/9/libexec/tftpd/   (props changed)
    
    Modified: stable/9/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 16:33:43 2013	(r247637)
    +++ stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 16:38:58 2013	(r247638)
    @@ -53,7 +53,7 @@ struct sockaddr_storage me_sock;
     
     static int send_packet(int peer, uint16_t block, char *pkt, int size);
     
    -struct errmsg {
    +static struct errmsg {
     	int	e_code;
     	const char	*e_msg;
     } errmsgs[] = {
    @@ -374,7 +374,7 @@ send_data(int peer, uint16_t block, char
     /*
      * Receive a packet
      */
    -jmp_buf	timeoutbuf;
    +static jmp_buf timeoutbuf;
     
     static void
     timeout(int sig __unused)
    
    Modified: stable/9/libexec/tftpd/tftp-utils.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-utils.c	Sat Mar  2 16:33:43 2013	(r247637)
    +++ stable/9/libexec/tftpd/tftp-utils.c	Sat Mar  2 16:38:58 2013	(r247638)
    @@ -121,7 +121,7 @@ get_field(int peer, char *buffer, ssize_
     /*
      * Logging functions
      */
    -int	_tftp_logtostdout = 1;
    +static int _tftp_logtostdout = 1;
     
     void
     tftp_openlog(const char *ident, int logopt, int facility)
    
    Modified: stable/9/libexec/tftpd/tftpd.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftpd.c	Sat Mar  2 16:33:43 2013	(r247637)
    +++ stable/9/libexec/tftpd/tftpd.c	Sat Mar  2 16:38:58 2013	(r247638)
    @@ -107,9 +107,9 @@ static void	tftp_xmitfile(int peer, cons
     static int	validate_access(int peer, char **, int);
     static char	peername[NI_MAXHOST];
     
    -FILE *file;
    +static FILE *file;
     
    -struct formats {
    +static struct formats {
     	const char	*f_mode;
     	int	f_convert;
     } formats[] = {
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:39:01 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 64FE6453;
     Sat,  2 Mar 2013 16:39:01 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 3A28B6EB;
     Sat,  2 Mar 2013 16:39:01 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22Gd12H058086;
     Sat, 2 Mar 2013 16:39:01 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22Gd0Ko058081;
     Sat, 2 Mar 2013 16:39:00 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021639.r22Gd0Ko058081@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 16:39:00 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247639 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:39:01 -0000
    
    Author: marius
    Date: Sat Mar  2 16:39:00 2013
    New Revision: 247639
    URL: http://svnweb.freebsd.org/changeset/base/247639
    
    Log:
      MFC: r241720 (partial)
      
      Fix warnings found by -Wmising-variable-declarations.
    
    Modified:
      stable/8/libexec/tftpd/tftp-io.c
      stable/8/libexec/tftpd/tftp-utils.c
      stable/8/libexec/tftpd/tftpd.c
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 16:38:58 2013	(r247638)
    +++ stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 16:39:00 2013	(r247639)
    @@ -53,7 +53,7 @@ struct sockaddr_storage me_sock;
     
     static int send_packet(int peer, uint16_t block, char *pkt, int size);
     
    -struct errmsg {
    +static struct errmsg {
     	int	e_code;
     	const char	*e_msg;
     } errmsgs[] = {
    @@ -375,7 +375,7 @@ send_data(int peer, uint16_t block, char
     /*
      * Receive a packet
      */
    -jmp_buf	timeoutbuf;
    +static jmp_buf timeoutbuf;
     
     static void
     timeout(int sig __unused)
    
    Modified: stable/8/libexec/tftpd/tftp-utils.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-utils.c	Sat Mar  2 16:38:58 2013	(r247638)
    +++ stable/8/libexec/tftpd/tftp-utils.c	Sat Mar  2 16:39:00 2013	(r247639)
    @@ -121,7 +121,7 @@ get_field(int peer, char *buffer, ssize_
     /*
      * Logging functions
      */
    -int	_tftp_logtostdout = 1;
    +static int _tftp_logtostdout = 1;
     
     void
     tftp_openlog(const char *ident, int logopt, int facility)
    
    Modified: stable/8/libexec/tftpd/tftpd.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftpd.c	Sat Mar  2 16:38:58 2013	(r247638)
    +++ stable/8/libexec/tftpd/tftpd.c	Sat Mar  2 16:39:00 2013	(r247639)
    @@ -107,9 +107,9 @@ static void	tftp_xmitfile(int peer, cons
     static int	validate_access(int peer, char **, int);
     static char	peername[NI_MAXHOST];
     
    -FILE *file;
    +static FILE *file;
     
    -struct formats {
    +static struct formats {
     	const char	*f_mode;
     	int	f_convert;
     } formats[] = {
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 16:45:59 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id DDC79B98;
     Sat,  2 Mar 2013 16:45:59 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 9FFE4742;
     Sat,  2 Mar 2013 16:45:59 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22GjwVH060975;
     Sat, 2 Mar 2013 16:45:59 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22GjwnY060964;
     Sat, 2 Mar 2013 16:45:58 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021645.r22GjwnY060964@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 16:45:58 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247641 - stable/9/libexec/tftpd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 16:45:59 -0000
    
    Author: marius
    Date: Sat Mar  2 16:45:58 2013
    New Revision: 247641
    URL: http://svnweb.freebsd.org/changeset/base/247641
    
    Log:
      MFC: r229780 (partial)
      
      Spelling fixes for libexec/
    
    Modified:
      stable/9/libexec/tftpd/tftp-io.c
      stable/9/libexec/tftpd/tftp-utils.h
    Directory Properties:
      stable/9/libexec/tftpd/   (props changed)
    
    Modified: stable/9/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 16:43:28 2013	(r247640)
    +++ stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 16:45:58 2013	(r247641)
    @@ -72,13 +72,13 @@ static struct errmsg {
     #define DROPPACKET(s)							\
     	if (packetdroppercentage != 0 &&				\
     	    random()%100 < packetdroppercentage) {			\
    -		tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s);	\
    +		tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s);	\
     		return;							\
     	}
     #define DROPPACKETn(s,n)						\
     	if (packetdroppercentage != 0 &&				\
     	    random()%100 < packetdroppercentage) {			\
    -		tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s);	\
    +		tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s);	\
     		return (n);						\
     	}
     
    
    Modified: stable/9/libexec/tftpd/tftp-utils.h
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-utils.h	Sat Mar  2 16:43:28 2013	(r247640)
    +++ stable/9/libexec/tftpd/tftp-utils.h	Sat Mar  2 16:45:58 2013	(r247641)
    @@ -36,11 +36,11 @@ __FBSDID("$FreeBSD$");
     #define	MAXPKTSIZE	(MAXSEGSIZE + 4) /* Maximum size of the packet */
     
     /* For the blksize option */
    -#define BLKSIZE_MIN	8		/* Minumum size of the data segment */
    +#define BLKSIZE_MIN	8		/* Minimum size of the data segment */
     #define BLKSIZE_MAX	MAXSEGSIZE	/* Maximum size of the data segment */
     
     /* For the timeout option */
    -#define TIMEOUT_MIN	0		/* Minumum timeout value */
    +#define TIMEOUT_MIN	0		/* Minimum timeout value */
     #define TIMEOUT_MAX	255		/* Maximum timeout value */
     #define MIN_TIMEOUTS	3
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:14:53 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 2570CC7D;
     Sat,  2 Mar 2013 17:14:53 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id F1FFA86C;
     Sat,  2 Mar 2013 17:14:52 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HEqOO070863;
     Sat, 2 Mar 2013 17:14:52 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HEqAJ070855;
     Sat, 2 Mar 2013 17:14:52 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021714.r22HEqAJ070855@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:14:52 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247644 - stable/9/libexec/tftpd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:14:53 -0000
    
    Author: marius
    Date: Sat Mar  2 17:14:51 2013
    New Revision: 247644
    URL: http://svnweb.freebsd.org/changeset/base/247644
    
    Log:
      MFC: r246106, r246139
      
      Mark tftp_log() as __printflike() and deal with the fallout.
    
    Modified:
      stable/9/libexec/tftpd/tftp-io.c
      stable/9/libexec/tftpd/tftp-options.c
      stable/9/libexec/tftpd/tftp-utils.h
      stable/9/libexec/tftpd/tftpd.c
    Directory Properties:
      stable/9/libexec/tftpd/   (props changed)
    
    Modified: stable/9/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 17:08:14 2013	(r247643)
    +++ stable/9/libexec/tftpd/tftp-io.c	Sat Mar  2 17:14:51 2013	(r247644)
    @@ -106,13 +106,13 @@ send_packet(int peer, uint16_t block, ch
     	for (i = 0; i < 12 ; i++) {
     		DROPPACKETn("send_packet", 0);
     
    -		if (sendto(peer, pkt, size, 0,
    -			(struct sockaddr *)&peer_sock, peer_sock.ss_len)
    -			== size) {
    +		if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock,
    +		    peer_sock.ss_len) == size) {
     			if (i)
     				tftp_log(LOG_ERR,
     				    "%s block %d, attempt %d successful",
    -				    block, i);
    +		    		    packettype(ntohs(((struct tftphdr *)
    +				    (pkt))->th_opcode)), block, i);
     			return (0);
     		}
     		tftp_log(LOG_ERR,
    @@ -142,7 +142,7 @@ send_error(int peer, int error)
     	char buf[MAXPKTSIZE];
     
     	if (debug&DEBUG_PACKETS)
    -		tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error);
    +		tftp_log(LOG_DEBUG, "Sending ERROR %d", error);
     
     	DROPPACKET("send_error");
     
    
    Modified: stable/9/libexec/tftpd/tftp-options.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-options.c	Sat Mar  2 17:08:14 2013	(r247643)
    +++ stable/9/libexec/tftpd/tftp-options.c	Sat Mar  2 17:14:51 2013	(r247644)
    @@ -99,16 +99,17 @@ option_tsize(int peer __unused, struct t
     int
     option_timeout(int peer)
     {
    +	int to;
     
     	if (options[OPT_TIMEOUT].o_request == NULL)
     		return (0);
     
    -	int to = atoi(options[OPT_TIMEOUT].o_request);
    +	to = atoi(options[OPT_TIMEOUT].o_request);
     	if (to < TIMEOUT_MIN || to > TIMEOUT_MAX) {
     		tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING,
     		    "Received bad value for timeout. "
    -		    "Should be between %d and %d, received %s",
    -		    TIMEOUT_MIN, TIMEOUT_MAX);
    +		    "Should be between %d and %d, received %d",
    +		    TIMEOUT_MIN, TIMEOUT_MAX, to);
     		send_error(peer, EBADOP);
     		if (acting_as_client)
     			return (1);
    @@ -195,14 +196,14 @@ option_blksize(int peer)
     			tftp_log(LOG_ERR,
     			    "Invalid blocksize (%d bytes), "
     			    "net.inet.udp.maxdgram sysctl limits it to "
    -			    "%d bytes.\n", size, maxdgram);
    +			    "%ld bytes.\n", size, maxdgram);
     			send_error(peer, EBADOP);
     			return (1);
     		} else {
     			tftp_log(LOG_WARNING,
     			    "Invalid blocksize (%d bytes), "
     			    "net.inet.udp.maxdgram sysctl limits it to "
    -			    "%d bytes.\n", size, maxdgram);
    +			    "%ld bytes.\n", size, maxdgram);
     			size = maxdgram;
     			/* No reason to return */
     		}
    @@ -257,7 +258,7 @@ option_blksize2(int peer __unused)
     		}
     		tftp_log(LOG_INFO,
     		    "Invalid blocksize2 (%d bytes), net.inet.udp.maxdgram "
    -		    "sysctl limits it to %d bytes.\n", size, maxdgram);
    +		    "sysctl limits it to %ld bytes.\n", size, maxdgram);
     		size = sizes[i];
     		/* No need to return */
     	}
    
    Modified: stable/9/libexec/tftpd/tftp-utils.h
    ==============================================================================
    --- stable/9/libexec/tftpd/tftp-utils.h	Sat Mar  2 17:08:14 2013	(r247643)
    +++ stable/9/libexec/tftpd/tftp-utils.h	Sat Mar  2 17:14:51 2013	(r247644)
    @@ -106,7 +106,7 @@ const char *debug_show(int d);
     extern int tftp_logtostdout;
     void	tftp_openlog(const char *ident, int logopt, int facility);
     void	tftp_closelog(void);
    -void	tftp_log(int priority, const char *message, ...);
    +void	tftp_log(int priority, const char *message, ...) __printflike(2, 3);
     
     /*
      * Performance figures
    
    Modified: stable/9/libexec/tftpd/tftpd.c
    ==============================================================================
    --- stable/9/libexec/tftpd/tftpd.c	Sat Mar  2 17:08:14 2013	(r247643)
    +++ stable/9/libexec/tftpd/tftpd.c	Sat Mar  2 17:14:51 2013	(r247644)
    @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -799,8 +800,8 @@ tftp_xmitfile(int peer, const char *mode
     	tftp_send(peer, &block, &ts);
     	read_close();
     	if (debug&DEBUG_SIMPLE)
    -		tftp_log(LOG_INFO, "Sent %d bytes in %d seconds",
    -		    ts.amount, time(NULL) - now);
    +		tftp_log(LOG_INFO, "Sent %jd bytes in %jd seconds",
    +		    (intmax_t)ts.amount, (intmax_t)time(NULL) - now);
     }
     
     static void
    @@ -832,8 +833,8 @@ tftp_recvfile(int peer, const char *mode
     		f = now2.tv_sec - now1.tv_sec +
     		    (now2.tv_usec - now1.tv_usec) / 100000.0;
     		tftp_log(LOG_INFO,
    -		    "Download of %d bytes in %d blocks completed after %0.1f seconds\n",
    -		    ts.amount, block, f);
    +		    "Download of %jd bytes in %d blocks completed after %0.1f seconds\n",
    +		    (intmax_t)ts.amount, block, f);
     	}
     
     	return;
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:14:55 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 3DB64C7E;
     Sat,  2 Mar 2013 17:14:55 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 16A3B86D;
     Sat,  2 Mar 2013 17:14:55 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HEs7p070910;
     Sat, 2 Mar 2013 17:14:54 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HEsZf070906;
     Sat, 2 Mar 2013 17:14:54 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021714.r22HEsZf070906@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:14:54 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247645 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:14:55 -0000
    
    Author: marius
    Date: Sat Mar  2 17:14:53 2013
    New Revision: 247645
    URL: http://svnweb.freebsd.org/changeset/base/247645
    
    Log:
      MFC: r246106, r246139
      
      Mark tftp_log() as __printflike() and deal with the fallout.
    
    Modified:
      stable/8/libexec/tftpd/tftp-io.c
      stable/8/libexec/tftpd/tftp-options.c
      stable/8/libexec/tftpd/tftp-utils.h
      stable/8/libexec/tftpd/tftpd.c
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:14:51 2013	(r247644)
    +++ stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:14:53 2013	(r247645)
    @@ -107,13 +107,13 @@ send_packet(int peer, uint16_t block, ch
     	for (i = 0; i < 12 ; i++) {
     		DROPPACKETn("send_packet", 0);
     
    -		if (sendto(peer, pkt, size, 0,
    -			(struct sockaddr *)&peer_sock, peer_sock.ss_len)
    -			== size) {
    +		if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock,
    +		    peer_sock.ss_len) == size) {
     			if (i)
     				tftp_log(LOG_ERR,
     				    "%s block %d, attempt %d successful",
    -				    block, i);
    +		    		    packettype(ntohs(((struct tftphdr *)
    +				    (pkt))->th_opcode)), block, i);
     			return (0);
     		}
     		tftp_log(LOG_ERR,
    @@ -143,7 +143,7 @@ send_error(int peer, int error)
     	char buf[MAXPKTSIZE];
     
     	if (debug&DEBUG_PACKETS)
    -		tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error);
    +		tftp_log(LOG_DEBUG, "Sending ERROR %d", error);
     
     	DROPPACKET("send_error");
     
    
    Modified: stable/8/libexec/tftpd/tftp-options.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-options.c	Sat Mar  2 17:14:51 2013	(r247644)
    +++ stable/8/libexec/tftpd/tftp-options.c	Sat Mar  2 17:14:53 2013	(r247645)
    @@ -99,16 +99,17 @@ option_tsize(int peer __unused, struct t
     int
     option_timeout(int peer)
     {
    +	int to;
     
     	if (options[OPT_TIMEOUT].o_request == NULL)
     		return (0);
     
    -	int to = atoi(options[OPT_TIMEOUT].o_request);
    +	to = atoi(options[OPT_TIMEOUT].o_request);
     	if (to < TIMEOUT_MIN || to > TIMEOUT_MAX) {
     		tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING,
     		    "Received bad value for timeout. "
    -		    "Should be between %d and %d, received %s",
    -		    TIMEOUT_MIN, TIMEOUT_MAX);
    +		    "Should be between %d and %d, received %d",
    +		    TIMEOUT_MIN, TIMEOUT_MAX, to);
     		send_error(peer, EBADOP);
     		if (acting_as_client)
     			return (1);
    @@ -195,14 +196,14 @@ option_blksize(int peer)
     			tftp_log(LOG_ERR,
     			    "Invalid blocksize (%d bytes), "
     			    "net.inet.udp.maxdgram sysctl limits it to "
    -			    "%d bytes.\n", size, maxdgram);
    +			    "%ld bytes.\n", size, maxdgram);
     			send_error(peer, EBADOP);
     			return (1);
     		} else {
     			tftp_log(LOG_WARNING,
     			    "Invalid blocksize (%d bytes), "
     			    "net.inet.udp.maxdgram sysctl limits it to "
    -			    "%d bytes.\n", size, maxdgram);
    +			    "%ld bytes.\n", size, maxdgram);
     			size = maxdgram;
     			/* No reason to return */
     		}
    @@ -257,7 +258,7 @@ option_blksize2(int peer __unused)
     		}
     		tftp_log(LOG_INFO,
     		    "Invalid blocksize2 (%d bytes), net.inet.udp.maxdgram "
    -		    "sysctl limits it to %d bytes.\n", size, maxdgram);
    +		    "sysctl limits it to %ld bytes.\n", size, maxdgram);
     		size = sizes[i];
     		/* No need to return */
     	}
    
    Modified: stable/8/libexec/tftpd/tftp-utils.h
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-utils.h	Sat Mar  2 17:14:51 2013	(r247644)
    +++ stable/8/libexec/tftpd/tftp-utils.h	Sat Mar  2 17:14:53 2013	(r247645)
    @@ -106,7 +106,7 @@ const char *debug_show(int d);
     extern int tftp_logtostdout;
     void	tftp_openlog(const char *ident, int logopt, int facility);
     void	tftp_closelog(void);
    -void	tftp_log(int priority, const char *message, ...);
    +void	tftp_log(int priority, const char *message, ...) __printflike(2, 3);
     
     /*
      * Performance figures
    
    Modified: stable/8/libexec/tftpd/tftpd.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftpd.c	Sat Mar  2 17:14:51 2013	(r247644)
    +++ stable/8/libexec/tftpd/tftpd.c	Sat Mar  2 17:14:53 2013	(r247645)
    @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
     #include 
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -799,8 +800,8 @@ tftp_xmitfile(int peer, const char *mode
     	tftp_send(peer, &block, &ts);
     	read_close();
     	if (debug&DEBUG_SIMPLE)
    -		tftp_log(LOG_INFO, "Sent %d bytes in %d seconds",
    -		    ts.amount, time(NULL) - now);
    +		tftp_log(LOG_INFO, "Sent %jd bytes in %jd seconds",
    +		    (intmax_t)ts.amount, (intmax_t)time(NULL) - now);
     }
     
     static void
    @@ -832,8 +833,8 @@ tftp_recvfile(int peer, const char *mode
     		f = now2.tv_sec - now1.tv_sec +
     		    (now2.tv_usec - now1.tv_usec) / 100000.0;
     		tftp_log(LOG_INFO,
    -		    "Download of %d bytes in %d blocks completed after %0.1f seconds\n",
    -		    ts.amount, block, f);
    +		    "Download of %jd bytes in %d blocks completed after %0.1f seconds\n",
    +		    (intmax_t)ts.amount, block, f);
     	}
     
     	return;
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:18:39 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 56AD0FAE;
     Sat,  2 Mar 2013 17:18:39 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 3155E894;
     Sat,  2 Mar 2013 17:18:39 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HIdJ7071505;
     Sat, 2 Mar 2013 17:18:39 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HId7Q071503;
     Sat, 2 Mar 2013 17:18:39 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021718.r22HId7Q071503@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:18:39 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247646 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:18:39 -0000
    
    Author: marius
    Date: Sat Mar  2 17:18:38 2013
    New Revision: 247646
    URL: http://svnweb.freebsd.org/changeset/base/247646
    
    Log:
      MFC: r244686
      
      Use correct size in snprintf.
      Remove unused buffer.
      
      PR:		174631
      Submitted by:	Henning Petersen
    
    Modified:
      stable/8/libexec/tftpd/tftp-io.c
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:14:53 2013	(r247645)
    +++ stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:18:38 2013	(r247646)
    @@ -87,14 +87,13 @@ errtomsg(int error)
     {
     	static char ebuf[40];
     	struct errmsg *pe;
    -	char buf[MAXPKTSIZE];
     
     	if (error == 0)
     		return ("success");
     	for (pe = errmsgs; pe->e_code >= 0; pe++)
     		if (pe->e_code == error)
     			return (pe->e_msg);
    -	snprintf(ebuf, sizeof(buf), "error %d", error);
    +	snprintf(ebuf, sizeof(ebuf), "error %d", error);
     	return (ebuf);
     }
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:21:45 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 3FD8631D;
     Sat,  2 Mar 2013 17:21:45 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 323EC8D1;
     Sat,  2 Mar 2013 17:21:45 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HLjO6073532;
     Sat, 2 Mar 2013 17:21:45 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HLjIp073531;
     Sat, 2 Mar 2013 17:21:45 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021721.r22HLjIp073531@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:21:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247647 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:21:45 -0000
    
    Author: marius
    Date: Sat Mar  2 17:21:44 2013
    New Revision: 247647
    URL: http://svnweb.freebsd.org/changeset/base/247647
    
    Log:
      MFC: r231973
      
      Avoid error log for transfer stop w/o error code.
    
    Modified:
      stable/8/libexec/tftpd/tftp-io.c
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftp-io.c
    ==============================================================================
    --- stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:18:38 2013	(r247646)
    +++ stable/8/libexec/tftpd/tftp-io.c	Sat Mar  2 17:21:44 2013	(r247647)
    @@ -462,7 +462,8 @@ receive_packet(int peer, char *data, int
     	}
     
     	if (pkt->th_opcode == ERROR) {
    -		tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg);
    +		tftp_log(pkt->th_code == EUNDEF ? LOG_DEBUG : LOG_ERR,
    +		    "Got ERROR packet: %s", pkt->th_msg);
     		return (RP_ERROR);
     	}
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:24:29 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id ED109614;
     Sat,  2 Mar 2013 17:24:29 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id C83CF8EC;
     Sat,  2 Mar 2013 17:24:29 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HOTpn074093;
     Sat, 2 Mar 2013 17:24:29 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HOT9Z074092;
     Sat, 2 Mar 2013 17:24:29 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021724.r22HOT9Z074092@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:24:29 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247649 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:24:30 -0000
    
    Author: marius
    Date: Sat Mar  2 17:24:29 2013
    New Revision: 247649
    URL: http://svnweb.freebsd.org/changeset/base/247649
    
    Log:
      MFC: r233648 (partial)
      
      Remove trailing whitespace per mdoc lint warning.
    
    Modified:
      stable/8/libexec/tftpd/tftpd.8
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftpd.8
    ==============================================================================
    --- stable/8/libexec/tftpd/tftpd.8	Sat Mar  2 17:23:47 2013	(r247648)
    +++ stable/8/libexec/tftpd/tftpd.8	Sat Mar  2 17:24:29 2013	(r247649)
    @@ -161,9 +161,9 @@ which is specified.
     .Pp
     If
     .Ar value
    -is specified, then the debug level is set to 
    +is specified, then the debug level is set to
     .Ar value .
    -The debug level is a bitmask implemented in 
    +The debug level is a bitmask implemented in
     .Pa src/libexec/tftpd/tftp-utils.h .
     Valid values are 0 (DEBUG_NONE), 1 (DEBUG_PACKETS), 2, (DEBUG_SIMPLE),
     4 (DEBUG_OPTIONS), and 8 (DEBUG_ACCESS).  Multiple debug values can be combined
    @@ -262,7 +262,7 @@ TFTP options are mentioned here:
     .Rs
     .%T Extending TFTP
     .%U http://www.compuphase.com/tftp.htm
    -.Re 
    +.Re
     .Sh HISTORY
     The
     .Nm
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:25:41 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id DFBA1782;
     Sat,  2 Mar 2013 17:25:41 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id D24AD8F6;
     Sat,  2 Mar 2013 17:25:41 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HPfdd074304;
     Sat, 2 Mar 2013 17:25:41 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HPfrv074303;
     Sat, 2 Mar 2013 17:25:41 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021725.r22HPfrv074303@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:25:41 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247650 - stable/9/libexec/tftpd
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:25:42 -0000
    
    Author: marius
    Date: Sat Mar  2 17:25:41 2013
    New Revision: 247650
    URL: http://svnweb.freebsd.org/changeset/base/247650
    
    Log:
      MFC: r235857
      
      mdoc: Only use macros inside a reference block.
    
    Modified:
      stable/9/libexec/tftpd/tftpd.8
    Directory Properties:
      stable/9/libexec/tftpd/   (props changed)
    
    Modified: stable/9/libexec/tftpd/tftpd.8
    ==============================================================================
    --- stable/9/libexec/tftpd/tftpd.8	Sat Mar  2 17:24:29 2013	(r247649)
    +++ stable/9/libexec/tftpd/tftpd.8	Sat Mar  2 17:25:41 2013	(r247650)
    @@ -238,20 +238,16 @@ option.
     .Pp
     The following RFC's are supported:
     .Rs
    -RFC 1350
    -.%T The TFTP Protocol (Revision 2)
    +.%T RFC 1350: The TFTP Protocol (Revision 2)
     .Re
     .Rs
    -RFC 2347
    -.%T TFTP Option Extension
    +.%T RFC 2347: TFTP Option Extension
     .Re
     .Rs
    -RFC 2348
    -.%T TFTP Blocksize Option
    +.%T RFC 2348: TFTP Blocksize Option
     .Re
     .Rs
    -RFC 2349
    -.%T TFTP Timeout Interval and Transfer Size Options
    +.%T RFC 2349: TFTP Timeout Interval and Transfer Size Options
     .Re
     .Pp
     The non-standard
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:25:45 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id BA1D7787;
     Sat,  2 Mar 2013 17:25:45 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id AC5218FA;
     Sat,  2 Mar 2013 17:25:45 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HPjg5074347;
     Sat, 2 Mar 2013 17:25:45 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HPjUF074346;
     Sat, 2 Mar 2013 17:25:45 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021725.r22HPjUF074346@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:25:45 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247651 - stable/8/libexec/tftpd
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:25:45 -0000
    
    Author: marius
    Date: Sat Mar  2 17:25:45 2013
    New Revision: 247651
    URL: http://svnweb.freebsd.org/changeset/base/247651
    
    Log:
      MFC: r235857
      
      mdoc: Only use macros inside a reference block.
    
    Modified:
      stable/8/libexec/tftpd/tftpd.8
    Directory Properties:
      stable/8/libexec/tftpd/   (props changed)
    
    Modified: stable/8/libexec/tftpd/tftpd.8
    ==============================================================================
    --- stable/8/libexec/tftpd/tftpd.8	Sat Mar  2 17:25:41 2013	(r247650)
    +++ stable/8/libexec/tftpd/tftpd.8	Sat Mar  2 17:25:45 2013	(r247651)
    @@ -238,20 +238,16 @@ option.
     .Pp
     The following RFC's are supported:
     .Rs
    -RFC 1350
    -.%T The TFTP Protocol (Revision 2)
    +.%T RFC 1350: The TFTP Protocol (Revision 2)
     .Re
     .Rs
    -RFC 2347
    -.%T TFTP Option Extension
    +.%T RFC 2347: TFTP Option Extension
     .Re
     .Rs
    -RFC 2348
    -.%T TFTP Blocksize Option
    +.%T RFC 2348: TFTP Blocksize Option
     .Re
     .Rs
    -RFC 2349
    -.%T TFTP Timeout Interval and Transfer Size Options
    +.%T RFC 2349: TFTP Timeout Interval and Transfer Size Options
     .Re
     .Pp
     The non-standard
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:32:16 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 009F6B99;
     Sat,  2 Mar 2013 17:32:15 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id D6E1D936;
     Sat,  2 Mar 2013 17:32:15 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HWF8n076858;
     Sat, 2 Mar 2013 17:32:15 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HWF5u076855;
     Sat, 2 Mar 2013 17:32:15 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021732.r22HWF5u076855@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:32:15 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247652 - stable/9/sys/dev/ata
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:32:16 -0000
    
    Author: marius
    Date: Sat Mar  2 17:32:15 2013
    New Revision: 247652
    URL: http://svnweb.freebsd.org/changeset/base/247652
    
    Log:
      MFC: r246257
      
      Improve r238673 (MFC'ed to stable/9 in r239494) to additionally allow
      for odd-aligned buffers as passed in by smartd of smartmontools.
      While at it, hint the compiler that 32-bit PIO is the most likely
      case (idea from Linux) and use bus_{read,write}_stream_2(9) instead
      of bus_{read,write}_multi_stream_2(9) for single count reads/writes.
    
    Modified:
      stable/9/sys/dev/ata/ata-all.h
      stable/9/sys/dev/ata/ata-lowlevel.c
    Directory Properties:
      stable/9/sys/   (props changed)
      stable/9/sys/dev/   (props changed)
    
    Modified: stable/9/sys/dev/ata/ata-all.h
    ==============================================================================
    --- stable/9/sys/dev/ata/ata-all.h	Sat Mar  2 17:25:45 2013	(r247651)
    +++ stable/9/sys/dev/ata/ata-all.h	Sat Mar  2 17:32:15 2013	(r247652)
    @@ -698,6 +698,8 @@ MALLOC_DECLARE(M_ATA);
     
     #define ATA_INW(res, offset) \
     	bus_read_2((res), (offset))
    +#define ATA_INW_STRM(res, offset) \
    +	bus_read_stream_2((res), (offset))
     #define ATA_INL(res, offset) \
     	bus_read_4((res), (offset))
     #define ATA_INSW(res, offset, addr, count) \
    @@ -712,6 +714,8 @@ MALLOC_DECLARE(M_ATA);
     	bus_write_1((res), (offset), (value))
     #define ATA_OUTW(res, offset, value) \
     	bus_write_2((res), (offset), (value))
    +#define ATA_OUTW_STRM(res, offset, value) \
    +	bus_write_stream_2((res), (offset), (value))
     #define ATA_OUTL(res, offset, value) \
     	bus_write_4((res), (offset), (value))
     #define ATA_OUTSW(res, offset, addr, count) \
    @@ -729,6 +733,9 @@ MALLOC_DECLARE(M_ATA);
     #define ATA_IDX_INW(ch, idx) \
     	ATA_INW(ch->r_io[idx].res, ch->r_io[idx].offset)
     
    +#define ATA_IDX_INW_STRM(ch, idx) \
    +	ATA_INW_STRM(ch->r_io[idx].res, ch->r_io[idx].offset)
    +
     #define ATA_IDX_INL(ch, idx) \
     	ATA_INL(ch->r_io[idx].res, ch->r_io[idx].offset)
     
    @@ -750,6 +757,9 @@ MALLOC_DECLARE(M_ATA);
     #define ATA_IDX_OUTW(ch, idx, value) \
     	ATA_OUTW(ch->r_io[idx].res, ch->r_io[idx].offset, value)
     
    +#define ATA_IDX_OUTW_STRM(ch, idx, value) \
    +	ATA_OUTW_STRM(ch->r_io[idx].res, ch->r_io[idx].offset, value)
    +
     #define ATA_IDX_OUTL(ch, idx, value) \
     	ATA_OUTL(ch->r_io[idx].res, ch->r_io[idx].offset, value)
     
    
    Modified: stable/9/sys/dev/ata/ata-lowlevel.c
    ==============================================================================
    --- stable/9/sys/dev/ata/ata-lowlevel.c	Sat Mar  2 17:25:45 2013	(r247651)
    +++ stable/9/sys/dev/ata/ata-lowlevel.c	Sat Mar  2 17:32:15 2013	(r247652)
    @@ -847,14 +847,28 @@ ata_pio_read(struct ata_request *request
         uint8_t *addr;
         int size = min(request->transfersize, length);
         int resid;
    -    uint8_t buf[2];
    +    uint8_t buf[2] __aligned(sizeof(int16_t));
    +#ifndef __NO_STRICT_ALIGNMENT
    +    int i;
    +#endif
     
         addr = (uint8_t *)request->data + request->donecount;
    -    if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) ||
    -	((uintptr_t)addr % sizeof(int32_t))) {
    -	ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t));
    +    if (__predict_false(ch->flags & ATA_USE_16BIT ||
    +      (size % sizeof(int32_t)) || ((uintptr_t)addr % sizeof(int32_t)))) {
    +#ifndef __NO_STRICT_ALIGNMENT
    +	if (__predict_false((uintptr_t)addr % sizeof(int16_t))) {
    +	    for (i = 0, resid = size & ~1; resid > 0; resid -=
    +	      sizeof(int16_t)) {
    +		*(uint16_t *)&buf = ATA_IDX_INW_STRM(ch, ATA_DATA);
    +	        addr[i++] = buf[0];
    +	        addr[i++] = buf[1];
    +	    }
    +	} else
    +#endif
    +	    ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)addr, size /
    +	      sizeof(int16_t));
     	if (size & 1) {
    -	    ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)buf, 1);
    +	    *(uint16_t *)&buf = ATA_IDX_INW_STRM(ch, ATA_DATA);
     	    (addr + (size & ~1))[0] = buf[0];
     	}
         } else
    @@ -876,15 +890,30 @@ ata_pio_write(struct ata_request *reques
         uint8_t *addr;
         int size = min(request->transfersize, length);
         int resid;
    -    uint8_t buf[2];
    +    uint8_t buf[2] __aligned(sizeof(int16_t));
    +#ifndef __NO_STRICT_ALIGNMENT
    +    int i;
    +#endif
     
    +    size = min(request->transfersize, length);
         addr = (uint8_t *)request->data + request->donecount;
    -    if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) ||
    -	((uintptr_t)addr % sizeof(int32_t))) {
    -	ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t));
    +    if (__predict_false(ch->flags & ATA_USE_16BIT ||
    +      (size % sizeof(int32_t)) || ((uintptr_t)addr % sizeof(int32_t)))) {
    +#ifndef __NO_STRICT_ALIGNMENT
    +	if (__predict_false((uintptr_t)addr % sizeof(int16_t))) {
    +	    for (i = 0, resid = size & ~1; resid > 0; resid -=
    +	      sizeof(int16_t)) {
    +	        buf[0] = addr[i++];
    +	        buf[1] = addr[i++];
    +		ATA_IDX_OUTW_STRM(ch, ATA_DATA, *(uint16_t *)&buf);
    +	    }
    +	} else
    +#endif
    +	    ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)addr, size /
    +	      sizeof(int16_t));
     	if (size & 1) {
     	    buf[0] = (addr + (size & ~1))[0];
    -	    ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)buf, 1);
    +	    ATA_IDX_OUTW_STRM(ch, ATA_DATA, *(uint16_t *)&buf);
     	}
         } else
     	ATA_IDX_OUTSL_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int32_t));
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:32:21 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 32594B9A;
     Sat,  2 Mar 2013 17:32:21 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 15ED2937;
     Sat,  2 Mar 2013 17:32:21 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HWKSU076905;
     Sat, 2 Mar 2013 17:32:20 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HWKa6076903;
     Sat, 2 Mar 2013 17:32:20 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021732.r22HWKa6076903@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:32:20 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247653 - stable/8/sys/dev/ata
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:32:21 -0000
    
    Author: marius
    Date: Sat Mar  2 17:32:20 2013
    New Revision: 247653
    URL: http://svnweb.freebsd.org/changeset/base/247653
    
    Log:
      MFC: r246257
      
      Improve r238673 (MFC'ed to stable/8 in r239495) to additionally allow
      for odd-aligned buffers as passed in by smartd of smartmontools.
      While at it, hint the compiler that 32-bit PIO is the most likely
      case (idea from Linux) and use bus_{read,write}_stream_2(9) instead
      of bus_{read,write}_multi_stream_2(9) for single count reads/writes.
    
    Modified:
      stable/8/sys/dev/ata/ata-all.h
      stable/8/sys/dev/ata/ata-lowlevel.c
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/dev/   (props changed)
      stable/8/sys/dev/ata/   (props changed)
    
    Modified: stable/8/sys/dev/ata/ata-all.h
    ==============================================================================
    --- stable/8/sys/dev/ata/ata-all.h	Sat Mar  2 17:32:15 2013	(r247652)
    +++ stable/8/sys/dev/ata/ata-all.h	Sat Mar  2 17:32:20 2013	(r247653)
    @@ -698,6 +698,8 @@ MALLOC_DECLARE(M_ATA);
     
     #define ATA_INW(res, offset) \
     	bus_read_2((res), (offset))
    +#define ATA_INW_STRM(res, offset) \
    +	bus_read_stream_2((res), (offset))
     #define ATA_INL(res, offset) \
     	bus_read_4((res), (offset))
     #define ATA_INSW(res, offset, addr, count) \
    @@ -712,6 +714,8 @@ MALLOC_DECLARE(M_ATA);
     	bus_write_1((res), (offset), (value))
     #define ATA_OUTW(res, offset, value) \
     	bus_write_2((res), (offset), (value))
    +#define ATA_OUTW_STRM(res, offset, value) \
    +	bus_write_stream_2((res), (offset), (value))
     #define ATA_OUTL(res, offset, value) \
     	bus_write_4((res), (offset), (value))
     #define ATA_OUTSW(res, offset, addr, count) \
    @@ -729,6 +733,9 @@ MALLOC_DECLARE(M_ATA);
     #define ATA_IDX_INW(ch, idx) \
     	ATA_INW(ch->r_io[idx].res, ch->r_io[idx].offset)
     
    +#define ATA_IDX_INW_STRM(ch, idx) \
    +	ATA_INW_STRM(ch->r_io[idx].res, ch->r_io[idx].offset)
    +
     #define ATA_IDX_INL(ch, idx) \
     	ATA_INL(ch->r_io[idx].res, ch->r_io[idx].offset)
     
    @@ -750,6 +757,9 @@ MALLOC_DECLARE(M_ATA);
     #define ATA_IDX_OUTW(ch, idx, value) \
     	ATA_OUTW(ch->r_io[idx].res, ch->r_io[idx].offset, value)
     
    +#define ATA_IDX_OUTW_STRM(ch, idx, value) \
    +	ATA_OUTW_STRM(ch->r_io[idx].res, ch->r_io[idx].offset, value)
    +
     #define ATA_IDX_OUTL(ch, idx, value) \
     	ATA_OUTL(ch->r_io[idx].res, ch->r_io[idx].offset, value)
     
    
    Modified: stable/8/sys/dev/ata/ata-lowlevel.c
    ==============================================================================
    --- stable/8/sys/dev/ata/ata-lowlevel.c	Sat Mar  2 17:32:15 2013	(r247652)
    +++ stable/8/sys/dev/ata/ata-lowlevel.c	Sat Mar  2 17:32:20 2013	(r247653)
    @@ -847,14 +847,28 @@ ata_pio_read(struct ata_request *request
         uint8_t *addr;
         int size = min(request->transfersize, length);
         int resid;
    -    uint8_t buf[2];
    +    uint8_t buf[2] __aligned(sizeof(int16_t));
    +#ifndef __NO_STRICT_ALIGNMENT
    +    int i;
    +#endif
     
         addr = (uint8_t *)request->data + request->donecount;
    -    if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) ||
    -	((uintptr_t)addr % sizeof(int32_t))) {
    -	ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t));
    +    if (__predict_false(ch->flags & ATA_USE_16BIT ||
    +      (size % sizeof(int32_t)) || ((uintptr_t)addr % sizeof(int32_t)))) {
    +#ifndef __NO_STRICT_ALIGNMENT
    +	if (__predict_false((uintptr_t)addr % sizeof(int16_t))) {
    +	    for (i = 0, resid = size & ~1; resid > 0; resid -=
    +	      sizeof(int16_t)) {
    +		*(uint16_t *)&buf = ATA_IDX_INW_STRM(ch, ATA_DATA);
    +	        addr[i++] = buf[0];
    +	        addr[i++] = buf[1];
    +	    }
    +	} else
    +#endif
    +	    ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)addr, size /
    +	      sizeof(int16_t));
     	if (size & 1) {
    -	    ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)buf, 1);
    +	    *(uint16_t *)&buf = ATA_IDX_INW_STRM(ch, ATA_DATA);
     	    (addr + (size & ~1))[0] = buf[0];
     	}
         } else
    @@ -876,15 +890,30 @@ ata_pio_write(struct ata_request *reques
         uint8_t *addr;
         int size = min(request->transfersize, length);
         int resid;
    -    uint8_t buf[2];
    +    uint8_t buf[2] __aligned(sizeof(int16_t));
    +#ifndef __NO_STRICT_ALIGNMENT
    +    int i;
    +#endif
     
    +    size = min(request->transfersize, length);
         addr = (uint8_t *)request->data + request->donecount;
    -    if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) ||
    -	((uintptr_t)addr % sizeof(int32_t))) {
    -	ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t));
    +    if (__predict_false(ch->flags & ATA_USE_16BIT ||
    +      (size % sizeof(int32_t)) || ((uintptr_t)addr % sizeof(int32_t)))) {
    +#ifndef __NO_STRICT_ALIGNMENT
    +	if (__predict_false((uintptr_t)addr % sizeof(int16_t))) {
    +	    for (i = 0, resid = size & ~1; resid > 0; resid -=
    +	      sizeof(int16_t)) {
    +	        buf[0] = addr[i++];
    +	        buf[1] = addr[i++];
    +		ATA_IDX_OUTW_STRM(ch, ATA_DATA, *(uint16_t *)&buf);
    +	    }
    +	} else
    +#endif
    +	    ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)addr, size /
    +	      sizeof(int16_t));
     	if (size & 1) {
     	    buf[0] = (addr + (size & ~1))[0];
    -	    ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)buf, 1);
    +	    ATA_IDX_OUTW_STRM(ch, ATA_DATA, *(uint16_t *)&buf);
     	}
         } else
     	ATA_IDX_OUTSL_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int32_t));
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:36:30 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id A4047F59;
     Sat,  2 Mar 2013 17:36:30 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 96701957;
     Sat,  2 Mar 2013 17:36:30 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HaUmJ077562;
     Sat, 2 Mar 2013 17:36:30 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HaUae077561;
     Sat, 2 Mar 2013 17:36:30 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021736.r22HaUae077561@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:36:30 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247654 - stable/9/sys/dev/uart
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:36:30 -0000
    
    Author: marius
    Date: Sat Mar  2 17:36:29 2013
    New Revision: 247654
    URL: http://svnweb.freebsd.org/changeset/base/247654
    
    Log:
      MFC: r246300
      
      - Make pci_ns8250_ids[] const.
      - Use DEVMETHOD_END.
      - Use NULL instead of 0 for pointers.
    
    Modified:
      stable/9/sys/dev/uart/uart_bus_pci.c
    Directory Properties:
      stable/9/sys/   (props changed)
      stable/9/sys/dev/   (props changed)
    
    Modified: stable/9/sys/dev/uart/uart_bus_pci.c
    ==============================================================================
    --- stable/9/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:32:20 2013	(r247653)
    +++ stable/9/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:36:29 2013	(r247654)
    @@ -51,7 +51,7 @@ static device_method_t uart_pci_methods[
     	DEVMETHOD(device_probe,		uart_pci_probe),
     	DEVMETHOD(device_attach,	uart_bus_attach),
     	DEVMETHOD(device_detach,	uart_bus_detach),
    -	{ 0, 0 }
    +	DEVMETHOD_END
     };
     
     static driver_t uart_pci_driver = {
    @@ -70,7 +70,7 @@ struct pci_id {
     	int		rclk;
     };
     
    -static struct pci_id pci_ns8250_ids[] = {
    +static const struct pci_id pci_ns8250_ids[] = {
     { 0x1028, 0x0008, 0xffff, 0, "Dell Remote Access Card III", 0x14,
     	128 * DEFAULT_RCLK },
     { 0x1028, 0x0012, 0xffff, 0, "Dell RAC 4 Daughter Card Virtual UART", 0x14,
    @@ -133,8 +133,8 @@ static struct pci_id pci_ns8250_ids[] = 
     { 0xffff, 0, 0xffff, 0, NULL, 0, 0}
     };
     
    -static struct pci_id *
    -uart_pci_match(device_t dev, struct pci_id *id)
    +const static struct pci_id *
    +uart_pci_match(device_t dev, const struct pci_id *id)
     {
     	uint16_t device, subdev, subven, vendor;
     
    @@ -159,7 +159,7 @@ static int
     uart_pci_probe(device_t dev)
     {
     	struct uart_softc *sc;
    -	struct pci_id *id;
    +	const struct pci_id *id;
     
     	sc = device_get_softc(dev);
     
    @@ -177,4 +177,4 @@ uart_pci_probe(device_t dev)
     	return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0));
     }
     
    -DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, 0, 0);
    +DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL);
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:36:32 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 790D3F5A;
     Sat,  2 Mar 2013 17:36:32 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 5334A959;
     Sat,  2 Mar 2013 17:36:32 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HaW8B077598;
     Sat, 2 Mar 2013 17:36:32 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HaWns077597;
     Sat, 2 Mar 2013 17:36:32 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021736.r22HaWns077597@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:36:32 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247655 - stable/8/sys/dev/uart
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:36:32 -0000
    
    Author: marius
    Date: Sat Mar  2 17:36:31 2013
    New Revision: 247655
    URL: http://svnweb.freebsd.org/changeset/base/247655
    
    Log:
      MFC: r246300
      
      - Make pci_ns8250_ids[] const.
      - Use DEVMETHOD_END.
      - Use NULL instead of 0 for pointers.
    
    Modified:
      stable/8/sys/dev/uart/uart_bus_pci.c
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/dev/   (props changed)
      stable/8/sys/dev/uart/   (props changed)
    
    Modified: stable/8/sys/dev/uart/uart_bus_pci.c
    ==============================================================================
    --- stable/8/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:36:29 2013	(r247654)
    +++ stable/8/sys/dev/uart/uart_bus_pci.c	Sat Mar  2 17:36:31 2013	(r247655)
    @@ -51,7 +51,7 @@ static device_method_t uart_pci_methods[
     	DEVMETHOD(device_probe,		uart_pci_probe),
     	DEVMETHOD(device_attach,	uart_bus_attach),
     	DEVMETHOD(device_detach,	uart_bus_detach),
    -	{ 0, 0 }
    +	DEVMETHOD_END
     };
     
     static driver_t uart_pci_driver = {
    @@ -70,7 +70,7 @@ struct pci_id {
     	int		rclk;
     };
     
    -static struct pci_id pci_ns8250_ids[] = {
    +static const struct pci_id pci_ns8250_ids[] = {
     { 0x1028, 0x0008, 0xffff, 0, "Dell Remote Access Card III", 0x14,
     	128 * DEFAULT_RCLK },
     { 0x1028, 0x0012, 0xffff, 0, "Dell RAC 4 Daughter Card Virtual UART", 0x14,
    @@ -129,8 +129,8 @@ static struct pci_id pci_ns8250_ids[] = 
     { 0xffff, 0, 0xffff, 0, NULL, 0, 0}
     };
     
    -static struct pci_id *
    -uart_pci_match(device_t dev, struct pci_id *id)
    +const static struct pci_id *
    +uart_pci_match(device_t dev, const struct pci_id *id)
     {
     	uint16_t device, subdev, subven, vendor;
     
    @@ -155,7 +155,7 @@ static int
     uart_pci_probe(device_t dev)
     {
     	struct uart_softc *sc;
    -	struct pci_id *id;
    +	const struct pci_id *id;
     
     	sc = device_get_softc(dev);
     
    @@ -173,4 +173,4 @@ uart_pci_probe(device_t dev)
     	return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0));
     }
     
    -DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, 0, 0);
    +DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL);
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:39:12 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 6D7042E1;
     Sat,  2 Mar 2013 17:39:12 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 2F828983;
     Sat,  2 Mar 2013 17:39:12 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HdCwv078025;
     Sat, 2 Mar 2013 17:39:12 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HdC5w078024;
     Sat, 2 Mar 2013 17:39:12 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021739.r22HdC5w078024@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:39:12 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247656 - stable/9/sys/kern
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:39:12 -0000
    
    Author: marius
    Date: Sat Mar  2 17:39:11 2013
    New Revision: 247656
    URL: http://svnweb.freebsd.org/changeset/base/247656
    
    Log:
      MFC: r246689, r246696
      
      Make SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
      constant values.
      
      Reviewed by:	kib
    
    Modified:
      stable/9/sys/kern/kern_sysctl.c
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/kern/kern_sysctl.c
    ==============================================================================
    --- stable/9/sys/kern/kern_sysctl.c	Sat Mar  2 17:36:31 2013	(r247655)
    +++ stable/9/sys/kern/kern_sysctl.c	Sat Mar  2 17:39:11 2013	(r247656)
    @@ -1036,7 +1036,10 @@ sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS
     
     
     /*
    - * Handle a long, signed or unsigned.  arg1 points to it.
    + * Handle a long, signed or unsigned.
    + * Two cases:
    + *     a variable:  point arg1 at it.
    + *     a constant:  pass it in arg2.
      */
     
     int
    @@ -1051,9 +1054,10 @@ sysctl_handle_long(SYSCTL_HANDLER_ARGS)
     	/*
     	 * Attempt to get a coherent snapshot by making a copy of the data.
     	 */
    -	if (!arg1)
    -		return (EINVAL);
    -	tmplong = *(long *)arg1;
    +	if (arg1)
    +		tmplong = *(long *)arg1;
    +	else
    +		tmplong = arg2;
     #ifdef SCTL_MASK32
     	if (req->flags & SCTL_MASK32) {
     		tmpint = tmplong;
    @@ -1065,18 +1069,24 @@ sysctl_handle_long(SYSCTL_HANDLER_ARGS)
     	if (error || !req->newptr)
     		return (error);
     
    +	if (!arg1)
    +		error = EPERM;
     #ifdef SCTL_MASK32
    -	if (req->flags & SCTL_MASK32) {
    +	else if (req->flags & SCTL_MASK32) {
     		error = SYSCTL_IN(req, &tmpint, sizeof(int));
     		*(long *)arg1 = (long)tmpint;
    -	} else
    +	}
     #endif
    +	else
     		error = SYSCTL_IN(req, arg1, sizeof(long));
     	return (error);
     }
     
     /*
    - * Handle a 64 bit int, signed or unsigned.  arg1 points to it.
    + * Handle a 64 bit int, signed or unsigned.
    + * Two cases:
    + *     a variable:  point arg1 at it.
    + *     a constant:  pass it in arg2.
      */
     int
     sysctl_handle_64(SYSCTL_HANDLER_ARGS)
    @@ -1087,15 +1097,19 @@ sysctl_handle_64(SYSCTL_HANDLER_ARGS)
     	/*
     	 * Attempt to get a coherent snapshot by making a copy of the data.
     	 */
    -	if (!arg1)
    -		return (EINVAL);
    -	tmpout = *(uint64_t *)arg1;
    +	if (arg1)
    +		tmpout = *(uint64_t *)arg1;
    +	else
    +		tmpout = arg2;
     	error = SYSCTL_OUT(req, &tmpout, sizeof(uint64_t));
     
     	if (error || !req->newptr)
     		return (error);
     
    -	error = SYSCTL_IN(req, arg1, sizeof(uint64_t));
    +	if (!arg1)
    +		error = EPERM;
    +	else
    +		error = SYSCTL_IN(req, arg1, sizeof(uint64_t));
     	return (error);
     }
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:39:21 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.freebsd.org
     [IPv6:2001:1900:2254:206a::19:1])
     by hub.freebsd.org (Postfix) with ESMTP id 0E32C432;
     Sat,  2 Mar 2013 17:39:21 +0000 (UTC)
     (envelope-from marius@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id DC514984;
     Sat,  2 Mar 2013 17:39:20 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HdKml078088;
     Sat, 2 Mar 2013 17:39:20 GMT (envelope-from marius@svn.freebsd.org)
    Received: (from marius@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HdKKV078087;
     Sat, 2 Mar 2013 17:39:20 GMT (envelope-from marius@svn.freebsd.org)
    Message-Id: <201303021739.r22HdKKV078087@svn.freebsd.org>
    From: Marius Strobl 
    Date: Sat, 2 Mar 2013 17:39:20 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247657 - stable/8/sys/kern
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:39:21 -0000
    
    Author: marius
    Date: Sat Mar  2 17:39:20 2013
    New Revision: 247657
    URL: http://svnweb.freebsd.org/changeset/base/247657
    
    Log:
      MFC: r246689, r246696
      
      Make SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
      constant values.
      
      Reviewed by:	kib
    
    Modified:
      stable/8/sys/kern/kern_sysctl.c
    Directory Properties:
      stable/8/sys/   (props changed)
      stable/8/sys/kern/   (props changed)
    
    Modified: stable/8/sys/kern/kern_sysctl.c
    ==============================================================================
    --- stable/8/sys/kern/kern_sysctl.c	Sat Mar  2 17:39:11 2013	(r247656)
    +++ stable/8/sys/kern/kern_sysctl.c	Sat Mar  2 17:39:20 2013	(r247657)
    @@ -992,7 +992,10 @@ sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS
     
     
     /*
    - * Handle a long, signed or unsigned.  arg1 points to it.
    + * Handle a long, signed or unsigned.
    + * Two cases:
    + *     a variable:  point arg1 at it.
    + *     a constant:  pass it in arg2.
      */
     
     int
    @@ -1007,9 +1010,10 @@ sysctl_handle_long(SYSCTL_HANDLER_ARGS)
     	/*
     	 * Attempt to get a coherent snapshot by making a copy of the data.
     	 */
    -	if (!arg1)
    -		return (EINVAL);
    -	tmplong = *(long *)arg1;
    +	if (arg1)
    +		tmplong = *(long *)arg1;
    +	else
    +		tmplong = arg2;
     #ifdef SCTL_MASK32
     	if (req->flags & SCTL_MASK32) {
     		tmpint = tmplong;
    @@ -1021,18 +1025,24 @@ sysctl_handle_long(SYSCTL_HANDLER_ARGS)
     	if (error || !req->newptr)
     		return (error);
     
    +	if (!arg1)
    +		error = EPERM;
     #ifdef SCTL_MASK32
    -	if (req->flags & SCTL_MASK32) {
    +	else if (req->flags & SCTL_MASK32) {
     		error = SYSCTL_IN(req, &tmpint, sizeof(int));
     		*(long *)arg1 = (long)tmpint;
    -	} else
    +	}
     #endif
    +	else
     		error = SYSCTL_IN(req, arg1, sizeof(long));
     	return (error);
     }
     
     /*
    - * Handle a 64 bit int, signed or unsigned.  arg1 points to it.
    + * Handle a 64 bit int, signed or unsigned.
    + * Two cases:
    + *     a variable:  point arg1 at it.
    + *     a constant:  pass it in arg2.
      */
     
     int
    @@ -1044,15 +1054,19 @@ sysctl_handle_quad(SYSCTL_HANDLER_ARGS)
     	/*
     	 * Attempt to get a coherent snapshot by making a copy of the data.
     	 */
    -	if (!arg1)
    -		return (EINVAL);
    -	tmpout = *(uint64_t *)arg1;
    +	if (arg1)
    +		tmpout = *(uint64_t *)arg1;
    +	else
    +		tmpout = arg2;
     	error = SYSCTL_OUT(req, &tmpout, sizeof(uint64_t));
     
     	if (error || !req->newptr)
     		return (error);
     
    -	error = SYSCTL_IN(req, arg1, sizeof(uint64_t));
    +	if (!arg1)
    +		error = EPERM;
    +	else
    +		error = SYSCTL_IN(req, arg1, sizeof(uint64_t));
     	return (error);
     }
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 17:51:23 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 5E23F841;
     Sat,  2 Mar 2013 17:51:23 +0000 (UTC) (envelope-from flo@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 383499F1;
     Sat,  2 Mar 2013 17:51:23 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22HpNVd082877;
     Sat, 2 Mar 2013 17:51:23 GMT (envelope-from flo@svn.freebsd.org)
    Received: (from flo@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22HpNgB082876;
     Sat, 2 Mar 2013 17:51:23 GMT (envelope-from flo@svn.freebsd.org)
    Message-Id: <201303021751.r22HpNgB082876@svn.freebsd.org>
    From: Florian Smeets 
    Date: Sat, 2 Mar 2013 17:51:23 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
    Subject: svn commit: r247658 - stable/9/sys/netinet
    X-SVN-Group: stable-9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 17:51:23 -0000
    
    Author: flo (ports committer)
    Date: Sat Mar  2 17:51:22 2013
    New Revision: 247658
    URL: http://svnweb.freebsd.org/changeset/base/247658
    
    Log:
      MFC: r242854 (by rdivacky)
      
      Initialize hdrlen to 0 to avoid clang warning in NOINET case.
      
      This fixes the kernel build for INET6 only kernels.
      
      Approved by:	cognet
    
    Modified:
      stable/9/sys/netinet/tcp_timewait.c
    Directory Properties:
      stable/9/sys/   (props changed)
    
    Modified: stable/9/sys/netinet/tcp_timewait.c
    ==============================================================================
    --- stable/9/sys/netinet/tcp_timewait.c	Sat Mar  2 17:39:20 2013	(r247657)
    +++ stable/9/sys/netinet/tcp_timewait.c	Sat Mar  2 17:51:22 2013	(r247658)
    @@ -519,6 +519,7 @@ tcp_twrespond(struct tcptw *tw, int flag
     	struct ip6_hdr *ip6 = NULL;
     	int isipv6 = inp->inp_inc.inc_flags & INC_ISIPV6;
     #endif
    +	hdrlen = 0;                     /* Keep compiler happy */
     
     	INP_WLOCK_ASSERT(inp);
     
    
    From owner-svn-src-stable@FreeBSD.ORG  Sat Mar  2 21:59:09 2013
    Return-Path: 
    Delivered-To: svn-src-stable@freebsd.org
    Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
     by hub.freebsd.org (Postfix) with ESMTP id 24705308;
     Sat,  2 Mar 2013 21:59:09 +0000 (UTC) (envelope-from np@FreeBSD.org)
    Received: from svn.freebsd.org (svn.freebsd.org
     [IPv6:2001:1900:2254:2068::e6a:0])
     by mx1.freebsd.org (Postfix) with ESMTP id 081243DC;
     Sat,  2 Mar 2013 21:59:09 +0000 (UTC)
    Received: from svn.freebsd.org ([127.0.1.70])
     by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r22Lx9Dq058603;
     Sat, 2 Mar 2013 21:59:09 GMT (envelope-from np@svn.freebsd.org)
    Received: (from np@localhost)
     by svn.freebsd.org (8.14.5/8.14.5/Submit) id r22Lx7QD058594;
     Sat, 2 Mar 2013 21:59:07 GMT (envelope-from np@svn.freebsd.org)
    Message-Id: <201303022159.r22Lx7QD058594@svn.freebsd.org>
    From: Navdeep Parhar 
    Date: Sat, 2 Mar 2013 21:59:07 +0000 (UTC)
    To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
    Subject: svn commit: r247670 - in stable/8: share/man/man4 sys/conf
     sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware
     sys/modules/cxgbe/firmware sys/modules/cxgbe/if_cxgbe tools/tools/cxgbetool
    X-SVN-Group: stable-8
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-BeenThere: svn-src-stable@freebsd.org
    X-Mailman-Version: 2.1.14
    Precedence: list
    List-Id: SVN commit messages for all the -stable branches of the src tree
     
    List-Unsubscribe: ,
     
    List-Archive: 
    List-Post: 
    List-Help: 
    List-Subscribe: ,
     
    X-List-Received-Date: Sat, 02 Mar 2013 21:59:09 -0000
    
    Author: np
    Date: Sat Mar  2 21:59:07 2013
    New Revision: 247670
    URL: http://svnweb.freebsd.org/changeset/base/247670
    
    Log:
      MFC r234831, r234833, r237263**, r237436*, r237439, r237463, r237512,
      r237587, r237799, r237819, r237831, r238028, r238054, r238313, r239102,
      r239258, r239259, r239264*, r239266, r239336, r239338*, r239339,
      r239341, r239344, r240443, r240451, r240452*, r240453, r241397, r241398,
      r241399, r241401, r241409, r241416, r241493, r244551, r244580, r245243,
      r245274*, r245276*, r245434*, r245517, r245518, r245520, r245567,
      r245933, r245935, r245936, r246093, r246385, r246575, r247062, r247122,
      r247289, r247291, r247347, r247355.
      
      This brings stable/8's cxgbe(4) up to date with what's in head right
      now.  One major difference is the missing t4_tom (TCP Offload Module);
      there are no plans to backport it to 8.
      
      Build tested with make universe (with -DMAKE_JUST_KERNELS)
      
      *  partial
      ** partial manual backport, not really an MFC
    
    Added:
      stable/8/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu
         - copied unchanged from r247289, head/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu
    Deleted:
      stable/8/sys/dev/cxgbe/common/jhash.h
    Modified:
      stable/8/share/man/man4/cxgbe.4
      stable/8/sys/conf/files
      stable/8/sys/conf/kern.pre.mk
      stable/8/sys/dev/cxgbe/adapter.h
      stable/8/sys/dev/cxgbe/common/common.h
      stable/8/sys/dev/cxgbe/common/t4_hw.c
      stable/8/sys/dev/cxgbe/common/t4_hw.h
      stable/8/sys/dev/cxgbe/common/t4_msg.h
      stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt
      stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt
      stable/8/sys/dev/cxgbe/firmware/t4fw_interface.h
      stable/8/sys/dev/cxgbe/offload.h
      stable/8/sys/dev/cxgbe/osdep.h
      stable/8/sys/dev/cxgbe/t4_ioctl.h
      stable/8/sys/dev/cxgbe/t4_l2t.c
      stable/8/sys/dev/cxgbe/t4_l2t.h
      stable/8/sys/dev/cxgbe/t4_main.c
      stable/8/sys/dev/cxgbe/t4_sge.c
      stable/8/sys/modules/cxgbe/firmware/Makefile
      stable/8/sys/modules/cxgbe/if_cxgbe/Makefile
      stable/8/tools/tools/cxgbetool/cxgbetool.c
    Directory Properties:
      stable/8/share/man/man4/   (props changed)
      stable/8/sys/   (props changed)
      stable/8/sys/conf/   (props changed)
      stable/8/sys/dev/   (props changed)
      stable/8/sys/dev/cxgbe/   (props changed)
      stable/8/sys/modules/   (props changed)
      stable/8/tools/tools/cxgbetool/   (props changed)
    
    Modified: stable/8/share/man/man4/cxgbe.4
    ==============================================================================
    --- stable/8/share/man/man4/cxgbe.4	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/share/man/man4/cxgbe.4	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -1,4 +1,4 @@
    -.\" Copyright (c) 2011, Chelsio Inc
    +.\" Copyright (c) 2011-2012, Chelsio Inc
     .\" All rights reserved.
     .\"
     .\" Redistribution and use in source and binary forms, with or without
    @@ -145,10 +145,9 @@ dev.cxgbe.X.holdoff_tmr_idx sysctl.
     The packet-count index value to use to delay interrupts.
     The packet-count list has the values 1, 8, 16, and 32 by default
     and the index selects a value from this list.
    -The default value is 2 for both 10Gb and 1Gb ports, which means 16
    -packets (or the holdoff timer going off) before an interrupt is
    -generated.
    --1 disables packet counting.
    +The default value is -1 for both 10Gb and 1Gb ports, which means packet
    +counting is disabled and interrupts are generated based solely on the
    +holdoff timer value.
     Different cxgbe interfaces can be assigned different values via the
     dev.cxgbe.X.holdoff_pktc_idx sysctl.
     This sysctl works only when the interface has never been marked up (as done by
    @@ -179,6 +178,15 @@ Bit 0 represents INTx (line interrupts),
     The default is 7 (all allowed).
     The driver will select the best possible type out of the allowed types by
     itself.
    +.It Va hw.cxgbe.fw_install
    +0 prohibits the driver from installing a firmware on the card.
    +1 allows the driver to install a new firmware if internal driver
    +heuristics indicate that the new firmware is preferable to the one
    +already on the card.
    +2 instructs the driver to always install the new firmware on the card as
    +long as it is compatible with the driver and is a different version than
    +the one already on the card.
    +The default is 1.
     .It Va hw.cxgbe.config_file
     Select a pre-packaged device configuration file.
     A configuration file contains a recipe for partitioning and configuring the
    
    Modified: stable/8/sys/conf/files
    ==============================================================================
    --- stable/8/sys/conf/files	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/sys/conf/files	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -815,6 +815,40 @@ dev/cxgbe/t4_l2t.c		optional cxgbe pci \
     	compile-with "${NORMAL_C} -I$S/dev/cxgbe"
     dev/cxgbe/common/t4_hw.c	optional cxgbe pci \
     	compile-with "${NORMAL_C} -I$S/dev/cxgbe"
    +t4fw_cfg.c		optional cxgbe					\
    +	compile-with	"${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \
    +	no-implicit-rule before-depend local				\
    +	clean		"t4fw_cfg.c"
    +t4fw_cfg.fwo		optional cxgbe					\
    +	dependency	"t4fw_cfg.fw"					\
    +	compile-with	"${NORMAL_FWO}"					\
    +	no-implicit-rule						\
    +	clean		"t4fw_cfg.fwo"
    +t4fw_cfg.fw		optional cxgbe					\
    +	dependency	"$S/dev/cxgbe/firmware/t4fw_cfg.txt"		\
    +	compile-with	"${CP} ${.ALLSRC} ${.TARGET}"			\
    +	no-obj no-implicit-rule						\
    +	clean		"t4fw_cfg.fw"
    +t4fw_cfg_uwire.fwo	optional cxgbe					\
    +	dependency	"t4fw_cfg_uwire.fw"				\
    +	compile-with	"${NORMAL_FWO}"					\
    +	no-implicit-rule						\
    +	clean		"t4fw_cfg_uwire.fwo"
    +t4fw_cfg_uwire.fw	optional cxgbe					\
    +	dependency	"$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt"	\
    +	compile-with	"${CP} ${.ALLSRC} ${.TARGET}"			\
    +	no-obj no-implicit-rule						\
    +	clean		"t4fw_cfg_uwire.fw"
    +t4fw.fwo		optional cxgbe					\
    +	dependency	"t4fw.fw"					\
    +	compile-with	"${NORMAL_FWO}"					\
    +	no-implicit-rule						\
    +	clean		"t4fw.fwo"
    +t4fw.fw			optional cxgbe					\
    +	dependency	"$S/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu"	\
    +	compile-with	"${NORMAL_FW}"					\
    +	no-obj no-implicit-rule						\
    +	clean		"t4fw.fw"
     dev/cy/cy.c			optional cy
     dev/cy/cy_isa.c			optional cy isa
     dev/cy/cy_pci.c			optional cy pci
    
    Modified: stable/8/sys/conf/kern.pre.mk
    ==============================================================================
    --- stable/8/sys/conf/kern.pre.mk	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/sys/conf/kern.pre.mk	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -15,6 +15,7 @@ LDSCRIPT?=	$S/conf/${LDSCRIPT_NAME}
     M=	${MACHINE_ARCH}
     
     AWK?=		awk
    +CP?=		cp
     LINT?=		lint
     NM?=		nm
     OBJCOPY?=	objcopy
    
    Modified: stable/8/sys/dev/cxgbe/adapter.h
    ==============================================================================
    --- stable/8/sys/dev/cxgbe/adapter.h	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/sys/dev/cxgbe/adapter.h	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -44,6 +44,7 @@
     #include 
     #include 
     #include 
    +#include 
     #include 
     
     #include "offload.h"
    @@ -77,6 +78,15 @@ prefetch(void *x)
     #define SBUF_DRAIN 1
     #endif
     
    +#if (__FreeBSD_version < 900000)
    +#define IFCAP_RXCSUM_IPV6 0
    +#define IFCAP_TXCSUM_IPV6 0
    +#define CSUM_DATA_VALID_IPV6 0
    +#define IFCAP_HWCSUM_IPV6 0
    +#define CSUM_UDP_IPV6 0
    +#define CSUM_TCP_IPV6 0
    +#endif
    +
     #ifdef __amd64__
     /* XXX: need systemwide bus_space_read_8/bus_space_write_8 */
     static __inline uint64_t
    @@ -134,6 +144,7 @@ enum {
     #else
     	FL_BUF_SIZES = 3,	/* cluster, jumbo9k, jumbo16k */
     #endif
    +	OFLD_BUF_SIZE = MJUM16BYTES,	/* size of fl buffer for TOE rxq */
     
     	CTRL_EQ_QSIZE = 128,
     
    @@ -142,6 +153,12 @@ enum {
     	TX_WR_FLITS = SGE_MAX_WR_LEN / 8
     };
     
    +#ifdef T4_PKT_TIMESTAMP
    +#define RX_COPY_THRESHOLD (MINCLSIZE - 8)
    +#else
    +#define RX_COPY_THRESHOLD MINCLSIZE
    +#endif
    +
     enum {
     	/* adapter intr_type */
     	INTR_INTX	= (1 << 0),
    @@ -150,12 +167,23 @@ enum {
     };
     
     enum {
    +	/* flags understood by begin_synchronized_op */
    +	HOLD_LOCK	= (1 << 0),
    +	SLEEP_OK	= (1 << 1),
    +	INTR_OK		= (1 << 2),
    +
    +	/* flags understood by end_synchronized_op */
    +	LOCK_HELD	= HOLD_LOCK,
    +};
    +
    +enum {
     	/* adapter flags */
     	FULL_INIT_DONE	= (1 << 0),
     	FW_OK		= (1 << 1),
     	INTR_DIRECT	= (1 << 2),	/* direct interrupts for everything */
     	MASTER_PF	= (1 << 3),
     	ADAP_SYSCTL_CTX	= (1 << 4),
    +	TOM_INIT_DONE	= (1 << 5),
     
     	CXGBE_BUSY	= (1 << 9),
     
    @@ -165,11 +193,11 @@ enum {
     	PORT_SYSCTL_CTX	= (1 << 2),
     };
     
    -#define IS_DOOMED(pi)	(pi->flags & DOOMED)
    -#define SET_DOOMED(pi)	do {pi->flags |= DOOMED;} while (0)
    -#define IS_BUSY(sc)	(sc->flags & CXGBE_BUSY)
    -#define SET_BUSY(sc)	do {sc->flags |= CXGBE_BUSY;} while (0)
    -#define CLR_BUSY(sc)	do {sc->flags &= ~CXGBE_BUSY;} while (0)
    +#define IS_DOOMED(pi)	((pi)->flags & DOOMED)
    +#define SET_DOOMED(pi)	do {(pi)->flags |= DOOMED;} while (0)
    +#define IS_BUSY(sc)	((sc)->flags & CXGBE_BUSY)
    +#define SET_BUSY(sc)	do {(sc)->flags |= CXGBE_BUSY;} while (0)
    +#define CLR_BUSY(sc)	do {(sc)->flags &= ~CXGBE_BUSY;} while (0)
     
     struct port_info {
     	device_t dev;
    @@ -198,7 +226,7 @@ struct port_info {
     	int first_txq;	/* index of first tx queue */
     	int nrxq;	/* # of rx queues */
     	int first_rxq;	/* index of first rx queue */
    -#ifndef TCP_OFFLOAD_DISABLE
    +#ifdef TCP_OFFLOAD
     	int nofldtxq;		/* # of offload tx queues */
     	int first_ofld_txq;	/* index of first offload tx queue */
     	int nofldrxq;		/* # of offload rx queues */
    @@ -271,7 +299,6 @@ struct sge_iq {
     	bus_dma_tag_t desc_tag;
     	bus_dmamap_t desc_map;
     	bus_addr_t ba;		/* bus address of descriptor ring */
    -	char lockname[16];
     	uint32_t flags;
     	uint16_t abs_id;	/* absolute SGE id for the iq */
     	int8_t   intr_pktc_idx;	/* packet count threshold index */
    @@ -295,7 +322,7 @@ struct sge_iq {
     enum {
     	EQ_CTRL		= 1,
     	EQ_ETH		= 2,
    -#ifndef TCP_OFFLOAD_DISABLE
    +#ifdef TCP_OFFLOAD
     	EQ_OFLD		= 3,
     #endif
     
    @@ -388,7 +415,7 @@ struct sge_txq {
     	/* stats for common events first */
     
     	uint64_t txcsum;	/* # of times hardware assisted with checksum */
    -	uint64_t tso_wrs;	/* # of IPv4 TSO work requests */
    +	uint64_t tso_wrs;	/* # of TSO work requests */
     	uint64_t vlan_insertion;/* # of times VLAN tag was inserted */
     	uint64_t imm_wrs;	/* # of work requests with immediate data */
     	uint64_t sgl_wrs;	/* # of work requests with direct SGL */
    @@ -408,7 +435,7 @@ struct sge_rxq {
     	struct sge_fl fl;	/* MUST follow iq */
     
     	struct ifnet *ifp;	/* the interface this rxq belongs to */
    -#ifdef INET
    +#if defined(INET) || defined(INET6)
     	struct lro_ctrl lro;	/* LRO state */
     #endif
     
    @@ -421,14 +448,36 @@ struct sge_rxq {
     
     } __aligned(CACHE_LINE_SIZE);
     
    -#ifndef TCP_OFFLOAD_DISABLE
    +static inline struct sge_rxq *
    +iq_to_rxq(struct sge_iq *iq)
    +{
    +
    +	return (member2struct(sge_rxq, iq, iq));
    +}
    +
    +
    +#ifdef TCP_OFFLOAD
     /* ofld_rxq: SGE ingress queue + SGE free list + miscellaneous items */
     struct sge_ofld_rxq {
     	struct sge_iq iq;	/* MUST be first */
     	struct sge_fl fl;	/* MUST follow iq */
     } __aligned(CACHE_LINE_SIZE);
    +
    +static inline struct sge_ofld_rxq *
    +iq_to_ofld_rxq(struct sge_iq *iq)
    +{
    +
    +	return (member2struct(sge_ofld_rxq, iq, iq));
    +}
     #endif
     
    +struct wrqe {
    +	STAILQ_ENTRY(wrqe) link;
    +	struct sge_wrq *wrq;
    +	int wr_len;
    +	uint64_t wr[] __aligned(16);
    +};
    +
     /*
      * wrq: SGE egress queue that is given prebuilt work requests.  Both the control
      * and offload tx queues are of this type.
    @@ -437,8 +486,9 @@ struct sge_wrq {
     	struct sge_eq eq;	/* MUST be first */
     
     	struct adapter *adapter;
    -	struct mbuf *head;	/* held up due to lack of descriptors */
    -	struct mbuf *tail;	/* valid only if head is valid */
    +
    +	/* List of WRs held up due to lack of tx descriptors */
    +	STAILQ_HEAD(, wrqe) wr_list;
     
     	/* stats for common events first */
     
    @@ -456,7 +506,7 @@ struct sge {
     
     	int nrxq;	/* total # of Ethernet rx queues */
     	int ntxq;	/* total # of Ethernet tx tx queues */
    -#ifndef TCP_OFFLOAD_DISABLE
    +#ifdef TCP_OFFLOAD
     	int nofldrxq;	/* total # of TOE rx queues */
     	int nofldtxq;	/* total # of TOE tx queues */
     #endif
    @@ -468,7 +518,7 @@ struct sge {
     	struct sge_wrq *ctrlq;	/* Control queues */
     	struct sge_txq *txq;	/* NIC tx queues */
     	struct sge_rxq *rxq;	/* NIC rx queues */
    -#ifndef TCP_OFFLOAD_DISABLE
    +#ifdef TCP_OFFLOAD
     	struct sge_wrq *ofld_txq;	/* TOE tx queues */
     	struct sge_ofld_rxq *ofld_rxq;	/* TOE rx queues */
     #endif
    @@ -482,6 +532,8 @@ struct sge {
     struct rss_header;
     typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *,
         struct mbuf *);
    +typedef int (*an_handler_t)(struct sge_iq *, const struct rsp_ctrl *);
    +typedef int (*fw_msg_handler_t)(struct adapter *, const __be64 *);
     
     struct adapter {
     	SLIST_ENTRY(adapter) link;
    @@ -518,21 +570,22 @@ struct adapter {
     	uint8_t chan_map[NCHAN];
     	uint32_t filter_mode;
     
    -#ifndef TCP_OFFLOAD_DISABLE
    -	struct uld_softc tom;
    +#ifdef TCP_OFFLOAD
    +	void *tom_softc;	/* (struct tom_data *) */
     	struct tom_tunables tt;
     #endif
     	struct l2t_data *l2t;	/* L2 table */
     	struct tid_info tids;
     
     	int open_device_map;
    -#ifndef TCP_OFFLOAD_DISABLE
    +#ifdef TCP_OFFLOAD
     	int offload_map;
     #endif
     	int flags;
     
     	char fw_version[32];
    -	unsigned int cfcsum;
    +	char cfg_file[32];
    +	u_int cfcsum;
     	struct adapter_params params;
     	struct t4_virt_res vres;
     
    @@ -553,7 +606,14 @@ struct adapter {
     	TAILQ_HEAD(, sge_fl) sfl;
     	struct callout sfl_callout;
     
    -	cpl_handler_t cpl_handler[256] __aligned(CACHE_LINE_SIZE);
    +	an_handler_t an_handler __aligned(CACHE_LINE_SIZE);
    +	fw_msg_handler_t fw_msg_handler[5];	/* NUM_FW6_TYPES */
    +	cpl_handler_t cpl_handler[0xef];	/* NUM_CPL_CMDS */
    +
    +#ifdef INVARIANTS
    +	const char *last_op;
    +	const void *last_op_thr;
    +#endif
     };
     
     #define ADAPTER_LOCK(sc)		mtx_lock(&(sc)->sc_lock)
    @@ -561,6 +621,12 @@ struct adapter {
     #define ADAPTER_LOCK_ASSERT_OWNED(sc)	mtx_assert(&(sc)->sc_lock, MA_OWNED)
     #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED)
     
    +/* XXX: not bulletproof, but much better than nothing */
    +#define ASSERT_SYNCHRONIZED_OP(sc)	\
    +    KASSERT(IS_BUSY(sc) && \
    +	(mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \
    +	("%s: operation not synchronized.", __func__))
    +
     #define PORT_LOCK(pi)			mtx_lock(&(pi)->pi_lock)
     #define PORT_UNLOCK(pi)			mtx_unlock(&(pi)->pi_lock)
     #define PORT_LOCK_ASSERT_OWNED(pi)	mtx_assert(&(pi)->pi_lock, MA_OWNED)
    @@ -589,18 +655,18 @@ struct adapter {
     #define TXQ_LOCK_ASSERT_OWNED(txq)	EQ_LOCK_ASSERT_OWNED(&(txq)->eq)
     #define TXQ_LOCK_ASSERT_NOTOWNED(txq)	EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq)
     
    -#define for_each_txq(pi, iter, txq) \
    -	txq = &pi->adapter->sge.txq[pi->first_txq]; \
    -	for (iter = 0; iter < pi->ntxq; ++iter, ++txq)
    -#define for_each_rxq(pi, iter, rxq) \
    -	rxq = &pi->adapter->sge.rxq[pi->first_rxq]; \
    -	for (iter = 0; iter < pi->nrxq; ++iter, ++rxq)
    -#define for_each_ofld_txq(pi, iter, ofld_txq) \
    -	ofld_txq = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \
    -	for (iter = 0; iter < pi->nofldtxq; ++iter, ++ofld_txq)
    -#define for_each_ofld_rxq(pi, iter, ofld_rxq) \
    -	ofld_rxq = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \
    -	for (iter = 0; iter < pi->nofldrxq; ++iter, ++ofld_rxq)
    +#define for_each_txq(pi, iter, q) \
    +	for (q = &pi->adapter->sge.txq[pi->first_txq], iter = 0; \
    +	    iter < pi->ntxq; ++iter, ++q)
    +#define for_each_rxq(pi, iter, q) \
    +	for (q = &pi->adapter->sge.rxq[pi->first_rxq], iter = 0; \
    +	    iter < pi->nrxq; ++iter, ++q)
    +#define for_each_ofld_txq(pi, iter, q) \
    +	for (q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq], iter = 0; \
    +	    iter < pi->nofldtxq; ++iter, ++q)
    +#define for_each_ofld_rxq(pi, iter, q) \
    +	for (q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq], iter = 0; \
    +	    iter < pi->nofldrxq; ++iter, ++q)
     
     /* One for errors, one for firmware events */
     #define T4_EXTRA_INTR 2
    @@ -608,82 +674,96 @@ struct adapter {
     static inline uint32_t
     t4_read_reg(struct adapter *sc, uint32_t reg)
     {
    +
     	return bus_space_read_4(sc->bt, sc->bh, reg);
     }
     
     static inline void
     t4_write_reg(struct adapter *sc, uint32_t reg, uint32_t val)
     {
    +
     	bus_space_write_4(sc->bt, sc->bh, reg, val);
     }
     
     static inline uint64_t
     t4_read_reg64(struct adapter *sc, uint32_t reg)
     {
    +
     	return t4_bus_space_read_8(sc->bt, sc->bh, reg);
     }
     
     static inline void
     t4_write_reg64(struct adapter *sc, uint32_t reg, uint64_t val)
     {
    +
     	t4_bus_space_write_8(sc->bt, sc->bh, reg, val);
     }
     
     static inline void
     t4_os_pci_read_cfg1(struct adapter *sc, int reg, uint8_t *val)
     {
    +
     	*val = pci_read_config(sc->dev, reg, 1);
     }
     
     static inline void
     t4_os_pci_write_cfg1(struct adapter *sc, int reg, uint8_t val)
     {
    +
     	pci_write_config(sc->dev, reg, val, 1);
     }
     
     static inline void
     t4_os_pci_read_cfg2(struct adapter *sc, int reg, uint16_t *val)
     {
    +
     	*val = pci_read_config(sc->dev, reg, 2);
     }
     
     static inline void
     t4_os_pci_write_cfg2(struct adapter *sc, int reg, uint16_t val)
     {
    +
     	pci_write_config(sc->dev, reg, val, 2);
     }
     
     static inline void
     t4_os_pci_read_cfg4(struct adapter *sc, int reg, uint32_t *val)
     {
    +
     	*val = pci_read_config(sc->dev, reg, 4);
     }
     
     static inline void
     t4_os_pci_write_cfg4(struct adapter *sc, int reg, uint32_t val)
     {
    +
     	pci_write_config(sc->dev, reg, val, 4);
     }
     
     static inline struct port_info *
     adap2pinfo(struct adapter *sc, int idx)
     {
    +
     	return (sc->port[idx]);
     }
     
     static inline void
     t4_os_set_hw_addr(struct adapter *sc, int idx, uint8_t hw_addr[])
     {
    +
     	bcopy(hw_addr, sc->port[idx]->hw_addr, ETHER_ADDR_LEN);
     }
     
     static inline bool is_10G_port(const struct port_info *pi)
     {
    +
     	return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) != 0);
     }
     
     static inline int tx_resume_threshold(struct sge_eq *eq)
     {
    +
     	return (eq->qsize / 4);
     }
     
    @@ -697,6 +777,11 @@ void t4_os_portmod_changed(const struct 
     void t4_os_link_changed(struct adapter *, int, int);
     void t4_iterate(void (*)(struct adapter *, void *), void *);
     int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t);
    +int t4_register_an_handler(struct adapter *, an_handler_t);
    +int t4_register_fw_msg_handler(struct adapter *, int, fw_msg_handler_t);
    +int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *);
    +int begin_synchronized_op(struct adapter *, struct port_info *, int, char *);
    +void end_synchronized_op(struct adapter *, int);
     
     /* t4_sge.c */
     void t4_sge_modload(void);
    @@ -713,21 +798,45 @@ void t4_intr_all(void *);
     void t4_intr(void *);
     void t4_intr_err(void *);
     void t4_intr_evt(void *);
    -int t4_mgmt_tx(struct adapter *, struct mbuf *);
    -int t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct mbuf *);
    +void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *);
     int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *);
     void t4_update_fl_bufsize(struct ifnet *);
     int can_resume_tx(struct sge_eq *);
     
    -static inline int t4_wrq_tx(struct adapter *sc, struct sge_wrq *wrq, struct mbuf *m)
    +static inline struct wrqe *
    +alloc_wrqe(int wr_len, struct sge_wrq *wrq)
     {
    -	int rc;
    +	int len = offsetof(struct wrqe, wr) + wr_len;
    +	struct wrqe *wr;
    +
    +	wr = malloc(len, M_CXGBE, M_NOWAIT);
    +	if (__predict_false(wr == NULL))
    +		return (NULL);
    +	wr->wr_len = wr_len;
    +	wr->wrq = wrq;
    +	return (wr);
    +}
    +
    +static inline void *
    +wrtod(struct wrqe *wr)
    +{
    +	return (&wr->wr[0]);
    +}
    +
    +static inline void
    +free_wrqe(struct wrqe *wr)
    +{
    +	free(wr, M_CXGBE);
    +}
    +
    +static inline void
    +t4_wrq_tx(struct adapter *sc, struct wrqe *wr)
    +{
    +	struct sge_wrq *wrq = wr->wrq;
     
     	TXQ_LOCK(wrq);
    -	rc = t4_wrq_tx_locked(sc, wrq, m);
    +	t4_wrq_tx_locked(sc, wrq, wr);
     	TXQ_UNLOCK(wrq);
    -	return (rc);
     }
     
    -
     #endif
    
    Modified: stable/8/sys/dev/cxgbe/common/common.h
    ==============================================================================
    --- stable/8/sys/dev/cxgbe/common/common.h	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/sys/dev/cxgbe/common/common.h	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -38,6 +38,8 @@ enum {
     	SERNUM_LEN     = 24,    /* Serial # length */
     	EC_LEN         = 16,    /* E/C length */
     	ID_LEN         = 16,    /* ID length */
    +	PN_LEN         = 16,    /* Part Number length */
    +	MACADDR_LEN    = 12,    /* MAC Address length */
     };
     
     enum { MEM_EDC0, MEM_EDC1, MEM_MC };
    @@ -62,8 +64,14 @@ enum {
     };
     
     #define FW_VERSION_MAJOR 1
    -#define FW_VERSION_MINOR 4
    -#define FW_VERSION_MICRO 16
    +#define FW_VERSION_MINOR 8
    +#define FW_VERSION_MICRO 4
    +#define FW_VERSION_BUILD 0
    +
    +#define FW_VERSION (V_FW_HDR_FW_VER_MAJOR(FW_VERSION_MAJOR) | \
    +    V_FW_HDR_FW_VER_MINOR(FW_VERSION_MINOR) | \
    +    V_FW_HDR_FW_VER_MICRO(FW_VERSION_MICRO) | \
    +    V_FW_HDR_FW_VER_BUILD(FW_VERSION_BUILD))
     
     struct port_stats {
     	u64 tx_octets;            /* total # of octets in good frames */
    @@ -219,6 +227,8 @@ struct vpd_params {
     	u8 ec[EC_LEN + 1];
     	u8 sn[SERNUM_LEN + 1];
     	u8 id[ID_LEN + 1];
    +	u8 pn[PN_LEN + 1];
    +	u8 na[MACADDR_LEN + 1];
     };
     
     struct pci_params {
    @@ -356,6 +366,8 @@ void t4_write_indirect(struct adapter *a
     		       unsigned int data_reg, const u32 *vals,
     		       unsigned int nregs, unsigned int start_idx);
     
    +u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg);
    +
     struct fw_filter_wr;
     
     void t4_intr_enable(struct adapter *adapter);
    @@ -374,7 +386,7 @@ int t4_seeprom_wp(struct adapter *adapte
     int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
     		  u32 *data, int byte_oriented);
     int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
    -int t4_load_boot(struct adapter *adap, const u8 *boot_data,
    +int t4_load_boot(struct adapter *adap, u8 *boot_data,
                      unsigned int boot_addr, unsigned int size);
     unsigned int t4_flash_cfg_addr(struct adapter *adapter);
     int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
    @@ -431,6 +443,9 @@ int t4_mem_read(struct adapter *adap, in
     		__be32 *data);
     
     void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
    +void t4_get_port_stats_offset(struct adapter *adap, int idx,
    +		struct port_stats *stats,
    +		struct port_stats *offset);
     void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
     void t4_clr_port_stats(struct adapter *adap, int idx);
     
    @@ -472,6 +487,10 @@ int t4_fw_hello(struct adapter *adap, un
     		enum dev_master master, enum dev_state *state);
     int t4_fw_bye(struct adapter *adap, unsigned int mbox);
     int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
    +int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force);
    +int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset);
    +int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
    +		  const u8 *fw_data, unsigned int size, int force);
     int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
     int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
     		    unsigned int vf, unsigned int nparams, const u32 *params,
    @@ -484,6 +503,10 @@ int t4_cfg_pfvf(struct adapter *adap, un
     		unsigned int rxqi, unsigned int rxq, unsigned int tc,
     		unsigned int vi, unsigned int cmask, unsigned int pmask,
     		unsigned int exactf, unsigned int rcaps, unsigned int wxcaps);
    +int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
    +		     unsigned int port, unsigned int pf, unsigned int vf,
    +		     unsigned int nmac, u8 *mac, unsigned int *rss_size,
    +		     unsigned int portfunc, unsigned int idstype);
     int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
     		unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac,
     		unsigned int *rss_size);
    @@ -504,6 +527,8 @@ int t4_enable_vi(struct adapter *adap, u
     		 bool rx_en, bool tx_en);
     int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
     		     unsigned int nblinks);
    +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id,
    +	      u8 dev_addr, u8 offset, u8 *valp);
     int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
     	       unsigned int mmd, unsigned int reg, unsigned int *valp);
     int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
    @@ -524,5 +549,7 @@ int t4_sge_ctxt_rd(struct adapter *adap,
     		   enum ctxt_type ctype, u32 *data);
     int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
     		      u32 *data);
    +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
     int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
    +int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
     #endif /* __CHELSIO_COMMON_H */
    
    Modified: stable/8/sys/dev/cxgbe/common/t4_hw.c
    ==============================================================================
    --- stable/8/sys/dev/cxgbe/common/t4_hw.c	Sat Mar  2 21:16:40 2013	(r247669)
    +++ stable/8/sys/dev/cxgbe/common/t4_hw.c	Sat Mar  2 21:59:07 2013	(r247670)
    @@ -1,5 +1,5 @@
     /*-
    - * Copyright (c) 2011 Chelsio Communications, Inc.
    + * Copyright (c) 2012 Chelsio Communications, Inc.
      * All rights reserved.
      *
      * Redistribution and use in source and binary forms, with or without
    @@ -27,13 +27,20 @@
     #include 
     __FBSDID("$FreeBSD$");
     
    +#include "opt_inet.h"
    +
     #include "common.h"
     #include "t4_regs.h"
     #include "t4_regs_values.h"
     #include "firmware/t4fw_interface.h"
     
     #undef msleep
    -#define msleep(x) pause("t4hw", (x) * hz / 1000)
    +#define msleep(x) do { \
    +	if (cold) \
    +		DELAY((x) * 1000); \
    +	else \
    +		pause("t4hw", (x) * hz / 1000); \
    +} while (0)
     
     /**
      *	t4_wait_op_done_val - wait until an operation is completed
    @@ -133,6 +140,50 @@ void t4_write_indirect(struct adapter *a
     }
     
     /*
    + * Read a 32-bit PCI Configuration Space register via the PCI-E backdoor
    + * mechanism.  This guarantees that we get the real value even if we're
    + * operating within a Virtual Machine and the Hypervisor is trapping our
    + * Configuration Space accesses.
    + */
    +u32 t4_hw_pci_read_cfg4(adapter_t *adap, int reg)
    +{
    +	t4_write_reg(adap, A_PCIE_CFG_SPACE_REQ,
    +		     F_ENABLE | F_LOCALCFG | V_FUNCTION(adap->pf) |
    +		     V_REGISTER(reg));
    +	return t4_read_reg(adap, A_PCIE_CFG_SPACE_DATA);
    +}
    +
    +/*
    + *	t4_report_fw_error - report firmware error
    + *	@adap: the adapter
    + *
    + *	The adapter firmware can indicate error conditions to the host.
    + *	This routine prints out the reason for the firmware error (as
    + *	reported by the firmware).
    + */
    +static void t4_report_fw_error(struct adapter *adap)
    +{
    +	static const char *reason[] = {
    +		"Crash",			/* PCIE_FW_EVAL_CRASH */
    +		"During Device Preparation",	/* PCIE_FW_EVAL_PREP */
    +		"During Device Configuration",	/* PCIE_FW_EVAL_CONF */
    +		"During Device Initialization",	/* PCIE_FW_EVAL_INIT */
    +		"Unexpected Event",		/* PCIE_FW_EVAL_UNEXPECTEDEVENT */
    +		"Insufficient Airflow",		/* PCIE_FW_EVAL_OVERHEAT */
    +		"Device Shutdown",		/* PCIE_FW_EVAL_DEVICESHUTDOWN */
    +		"Reserved",			/* reserved */
    +	};
    +	u32 pcie_fw;
    +
    +	pcie_fw = t4_read_reg(adap, A_PCIE_FW);
    +	if (!(pcie_fw & F_PCIE_FW_ERR))
    +		CH_ERR(adap, "Firmware error report called with no error\n");
    +	else
    +		CH_ERR(adap, "Firmware reports adapter error: %s\n",
    +		       reason[G_PCIE_FW_EVAL(pcie_fw)]);
    +}
    +
    +/*
      * Get the reply to a mailbox command and store it in @rpl in big-endian order.
      */
     static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit,
    @@ -194,7 +245,6 @@ int t4_wr_mbox_meat(struct adapter *adap
     	u64 res;
     	int i, ms, delay_idx;
     	const __be64 *p = cmd;
    -
     	u32 data_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_DATA);
     	u32 ctl_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_CTRL);
     
    @@ -247,8 +297,15 @@ int t4_wr_mbox_meat(struct adapter *adap
     		}
     	}
     
    +	/*
    +	 * We timed out waiting for a reply to our mailbox command.  Report
    +	 * the error and also check to see if the firmware reported any
    +	 * errors ...
    +	 */
     	CH_ERR(adap, "command %#x in mailbox %d timed out\n",
     	       *(const u8 *)cmd, mbox);
    +	if (t4_read_reg(adap, A_PCIE_FW) & F_PCIE_FW_ERR)
    +		t4_report_fw_error(adap);
     	return -ETIMEDOUT;
     }
     
    @@ -281,7 +338,7 @@ int t4_mc_read(struct adapter *adap, u32
     #define MC_DATA(i) MC_BIST_STATUS_REG(A_MC_BIST_STATUS_RDATA, i)
     
     	for (i = 15; i >= 0; i--)
    -		*data++ = htonl(t4_read_reg(adap, MC_DATA(i)));
    +		*data++ = ntohl(t4_read_reg(adap, MC_DATA(i)));
     	if (ecc)
     		*ecc = t4_read_reg64(adap, MC_DATA(16));
     #undef MC_DATA
    @@ -319,7 +376,7 @@ int t4_edc_read(struct adapter *adap, in
     #define EDC_DATA(i) (EDC_BIST_STATUS_REG(A_EDC_BIST_STATUS_RDATA, i) + idx)
     
     	for (i = 15; i >= 0; i--)
    -		*data++ = htonl(t4_read_reg(adap, EDC_DATA(i)));
    +		*data++ = ntohl(t4_read_reg(adap, EDC_DATA(i)));
     	if (ecc)
     		*ecc = t4_read_reg64(adap, EDC_DATA(16));
     #undef EDC_DATA
    @@ -564,7 +621,7 @@ static int get_vpd_keyword_val(const str
     static int get_vpd_params(struct adapter *adapter, struct vpd_params *p)
     {
     	int i, ret, addr;
    -	int ec, sn;
    +	int ec, sn, pn, na;
     	u8 vpd[VPD_LEN], csum;
     	const struct t4_vpd_hdr *v;
     
    @@ -600,6 +657,8 @@ static int get_vpd_params(struct adapter
     	}
     	FIND_VPD_KW(ec, "EC");
     	FIND_VPD_KW(sn, "SN");
    +	FIND_VPD_KW(pn, "PN");
    +	FIND_VPD_KW(na, "NA");
     #undef FIND_VPD_KW
     
     	memcpy(p->id, v->id_data, ID_LEN);
    @@ -609,6 +668,10 @@ static int get_vpd_params(struct adapter
     	i = vpd[sn - VPD_INFO_FLD_HDR_SIZE + 2];
     	memcpy(p->sn, vpd + sn, min(i, SERNUM_LEN));
     	strstrip(p->sn);
    +	memcpy(p->pn, vpd + pn, min(i, PN_LEN));
    +	strstrip((char *)p->pn);
    +	memcpy(p->na, vpd + na, min(i, MACADDR_LEN));
    +	strstrip((char *)p->na);
     
     	return 0;
     }
    @@ -952,7 +1015,7 @@ int t4_load_cfg(struct adapter *adap, co
     	if (ret || size == 0)
     		goto out;
     
    -        /* this will write to the flash up to SF_PAGE_SIZE at a time */
    +	/* this will write to the flash up to SF_PAGE_SIZE at a time */
     	for (i = 0; i< size; i+= SF_PAGE_SIZE) {
     		if ( (size - i) <  SF_PAGE_SIZE) 
     			n = size - i;
    @@ -1054,42 +1117,209 @@ out:
     	return ret;
     }
     
    -/* BIOS boot header */
    -typedef struct boot_header_s {
    -	u8	signature[2];	/* signature */
    -	u8	length;		/* image length (include header) */
    -	u8	offset[4];	/* initialization vector */
    -	u8	reserved[19];	/* reserved */
    -	u8	exheader[2];	/* offset to expansion header */
    -} boot_header_t;
    +/* BIOS boot headers */
    +typedef struct pci_expansion_rom_header {
    +	u8	signature[2]; /* ROM Signature. Should be 0xaa55 */
    +	u8	reserved[22]; /* Reserved per processor Architecture data */
    +	u8	pcir_offset[2]; /* Offset to PCI Data Structure */
    +} pci_exp_rom_header_t; /* PCI_EXPANSION_ROM_HEADER */
    +
    +/* Legacy PCI Expansion ROM Header */
    +typedef struct legacy_pci_expansion_rom_header {
    +	u8	signature[2]; /* ROM Signature. Should be 0xaa55 */
    +	u8	size512; /* Current Image Size in units of 512 bytes */
    +	u8	initentry_point[4];
    +	u8	cksum; /* Checksum computed on the entire Image */
    +	u8	reserved[16]; /* Reserved */
    +	u8	pcir_offset[2]; /* Offset to PCI Data Struture */
    +} legacy_pci_exp_rom_header_t; /* LEGACY_PCI_EXPANSION_ROM_HEADER */
    +
    +/* EFI PCI Expansion ROM Header */
    +typedef struct efi_pci_expansion_rom_header {
    +	u8	signature[2]; // ROM signature. The value 0xaa55
    +	u8	initialization_size[2]; /* Units 512. Includes this header */
    +	u8	efi_signature[4]; /* Signature from EFI image header. 0x0EF1 */
    +	u8	efi_subsystem[2]; /* Subsystem value for EFI image header */
    +	u8	efi_machine_type[2]; /* Machine type from EFI image header */
    +	u8	compression_type[2]; /* Compression type. */
    +		/* 
    +		 * Compression type definition
    +		 * 0x0: uncompressed
    +		 * 0x1: Compressed
    +		 * 0x2-0xFFFF: Reserved
    +		 */
    +	u8	reserved[8]; /* Reserved */
    +	u8	efi_image_header_offset[2]; /* Offset to EFI Image */
    +	u8	pcir_offset[2]; /* Offset to PCI Data Structure */
    +} efi_pci_exp_rom_header_t; /* EFI PCI Expansion ROM Header */
    +
    +/* PCI Data Structure Format */
    +typedef struct pcir_data_structure { /* PCI Data Structure */
    +	u8	signature[4]; /* Signature. The string "PCIR" */
    +	u8	vendor_id[2]; /* Vendor Identification */
    +	u8	device_id[2]; /* Device Identification */
    +	u8	vital_product[2]; /* Pointer to Vital Product Data */
    +	u8	length[2]; /* PCIR Data Structure Length */
    +	u8	revision; /* PCIR Data Structure Revision */
    +	u8	class_code[3]; /* Class Code */
    +	u8	image_length[2]; /* Image Length. Multiple of 512B */
    +	u8	code_revision[2]; /* Revision Level of Code/Data */
    +	u8	code_type; /* Code Type. */
    +		/*
    +		 * PCI Expansion ROM Code Types
    +		 * 0x00: Intel IA-32, PC-AT compatible. Legacy
    +		 * 0x01: Open Firmware standard for PCI. FCODE
    +		 * 0x02: Hewlett-Packard PA RISC. HP reserved
    +		 * 0x03: EFI Image. EFI
    +		 * 0x04-0xFF: Reserved.
    +		 */
    +	u8	indicator; /* Indicator. Identifies the last image in the ROM */
    +	u8	reserved[2]; /* Reserved */
    +} pcir_data_t; /* PCI__DATA_STRUCTURE */
     
    +/* BOOT constants */
     enum {
     	BOOT_FLASH_BOOT_ADDR = 0x0,/* start address of boot image in flash */
     	BOOT_SIGNATURE = 0xaa55,   /* signature of BIOS boot ROM */
     	BOOT_SIZE_INC = 512,       /* image size measured in 512B chunks */
    -	BOOT_MIN_SIZE = sizeof(boot_header_t), /* at least basic header */
    -	BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC /* 1 byte * length increment  */
    +	BOOT_MIN_SIZE = sizeof(pci_exp_rom_header_t), /* basic header */
    +	BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC, /* 1 byte * length increment  */
    +	VENDOR_ID = 0x1425, /* Vendor ID */
    +	PCIR_SIGNATURE = 0x52494350 /* PCIR signature */
     };
     
     /*
    + *	modify_device_id - Modifies the device ID of the Boot BIOS image 
    + *	@adatper: the device ID to write.
    + *	@boot_data: the boot image to modify.
    + *
    + *	Write the supplied device ID to the boot BIOS image.
    + */
    +static void modify_device_id(int device_id, u8 *boot_data)
    +{
    +	legacy_pci_exp_rom_header_t *header;
    +	pcir_data_t *pcir_header;
    +	u32 cur_header = 0;
    +
    +	/*
    +	 * Loop through all chained images and change the device ID's
    +	 */
    +	while (1) {
    +		header = (legacy_pci_exp_rom_header_t *) &boot_data[cur_header];
    +		pcir_header = (pcir_data_t *) &boot_data[cur_header +
    +		    le16_to_cpu(*(u16*)header->pcir_offset)];
    +
    +		/*
    +		 * Only modify the Device ID if code type is Legacy or HP.
    +		 * 0x00: Okay to modify
    +		 * 0x01: FCODE. Do not be modify
    +		 * 0x03: Okay to modify
    +		 * 0x04-0xFF: Do not modify
    +		 */
    +		if (pcir_header->code_type == 0x00) {
    +			u8 csum = 0;
    +			int i;
    +
    +			/*
    +			 * Modify Device ID to match current adatper
    +			 */
    +			*(u16*) pcir_header->device_id = device_id;
    +
    +			/*
    +			 * Set checksum temporarily to 0.
    +			 * We will recalculate it later.
    +			 */
    +			header->cksum = 0x0;
    +
    +			/*
    +			 * Calculate and update checksum
    +			 */
    +			for (i = 0; i < (header->size512 * 512); i++)
    +				csum += (u8)boot_data[cur_header + i];
    +
    +			/*
    +			 * Invert summed value to create the checksum
    +			 * Writing new checksum value directly to the boot data
    +			 */
    +			boot_data[cur_header + 7] = -csum;
    +
    +		} else if (pcir_header->code_type == 0x03) {
    +
    +			/*
    +			 * Modify Device ID to match current adatper
    +			 */
    +			*(u16*) pcir_header->device_id = device_id;
    +
    +		}
    +
    +
    +		/*
    +		 * Check indicator element to identify if this is the last
    +		 * image in the ROM.
    +		 */
    +		if (pcir_header->indicator & 0x80)
    +			break;
    +
    +		/*
    +		 * Move header pointer up to the next image in the ROM.
    +		 */
    +		cur_header += header->size512 * 512;
    +	}
    +}
    +
    +/*
      *	t4_load_boot - download boot flash
      *	@adapter: the adapter
      *	@boot_data: the boot image to write
    + *	@boot_addr: offset in flash to write boot_data
      *	@size: image size
      *
      *	Write the supplied boot image to the card's serial flash.
      *	The boot image has the following sections: a 28-byte header and the
      *	boot image.
      */
    -int t4_load_boot(struct adapter *adap, const u8 *boot_data, 
    +int t4_load_boot(struct adapter *adap, u8 *boot_data, 
     		 unsigned int boot_addr, unsigned int size)
     {
    +	pci_exp_rom_header_t *header;
    +	int pcir_offset ;
    +	pcir_data_t *pcir_header;
     	int ret, addr;
    +	uint16_t device_id;
     	unsigned int i;
    
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***