From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 00:18:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46C2106568B; Sun, 14 Feb 2010 00:18:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C28858FC13; Sun, 14 Feb 2010 00:18:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E0IWij004242; Sun, 14 Feb 2010 00:18:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E0IWsY004240; Sun, 14 Feb 2010 00:18:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002140018.o1E0IWsY004240@svn.freebsd.org> From: Rick Macklem Date: Sun, 14 Feb 2010 00:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203849 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 00:18:32 -0000 Author: rmacklem Date: Sun Feb 14 00:18:32 2010 New Revision: 203849 URL: http://svn.freebsd.org/changeset/base/203849 Log: Change the default value for vfs.newnfs.enable_locallocks to 0 for the experimental NFS server, since local locking is known to be broken and the patch to fix it is still a work in progress. MFC after: 5 days Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Sat Feb 13 23:56:19 2010 (r203848) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Sun Feb 14 00:18:32 2010 (r203849) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); struct nfsrv_stablefirst nfsrv_stablefirst; int nfsrv_issuedelegs = 0; -int nfsrv_dolocallocks = 1; +int nfsrv_dolocallocks = 0; struct nfsv4lock nfsv4rootfs_lock; extern int newnfs_numnfsd; From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 00:43:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8091065672; Sun, 14 Feb 2010 00:43:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5DA58FC08; Sun, 14 Feb 2010 00:43:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E0hgD2009843; Sun, 14 Feb 2010 00:43:42 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E0hgGk009838; Sun, 14 Feb 2010 00:43:42 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002140043.o1E0hgGk009838@svn.freebsd.org> From: Rick Macklem Date: Sun, 14 Feb 2010 00:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203851 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 00:43:43 -0000 Author: rmacklem Date: Sun Feb 14 00:43:42 2010 New Revision: 203851 URL: http://svn.freebsd.org/changeset/base/203851 Log: MFC: r203303 Patch the experimental NFS client so that there is a timeout for negative name cache entries in a manner analogous to r202767 for the regular NFS client. Also, make the code in nfs_lookup() compatible with that of the regular client and replace the sysctl variable that enabled negative name caching with the mount point option. Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c stable/8/sys/fs/nfsclient/nfs_clvnops.c stable/8/sys/fs/nfsclient/nfsmount.h stable/8/sys/fs/nfsclient/nfsnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sun Feb 14 00:30:24 2010 (r203850) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sun Feb 14 00:43:42 2010 (r203851) @@ -99,7 +99,7 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, struct ucred *, struct thread *); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, u_char *, u_char *, u_char *, - struct vnode **, struct ucred *, struct thread *); + struct vnode **, struct ucred *, struct thread *, int); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; static vfs_unmount_t nfs_unmount; @@ -498,7 +498,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, NULL, NULL, NULL, vpp, - td->td_ucred, td)) != 0) { + td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -669,6 +669,7 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", + "negnametimeo", NULL }; /* @@ -717,6 +718,7 @@ nfs_mount(struct mount *mp) char hst[MNAMELEN]; u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100]; char *opt, *name, *secname; + int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; @@ -891,6 +893,16 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_TIMEO; } + if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL) + == 0) { + ret = sscanf(opt, "%d", &negnametimeo); + if (ret != 1 || negnametimeo < 0) { + vfs_mount_error(mp, "illegal negnametimeo: %s", + opt); + error = EINVAL; + goto out; + } + } if (vfs_getopt(mp->mnt_optnew, "sec", (void **) &secname, NULL) == 0) nfs_sec_name(secname, &args.flags); @@ -990,7 +1002,7 @@ nfs_mount(struct mount *mp) args.fh = nfh; error = mountnfs(&args, mp, nam, hst, krbname, dirpath, srvkrbname, - &vp, td->td_ucred, td); + &vp, td->td_ucred, td, negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1033,7 +1045,8 @@ nfs_cmount(struct mntarg *ma, void *data static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, char *hst, u_char *krbname, u_char *dirpath, u_char *srvkrbname, - struct vnode **vpp, struct ucred *cred, struct thread *td) + struct vnode **vpp, struct ucred *cred, struct thread *td, + int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1101,6 +1114,7 @@ mountnfs(struct nfs_args *argp, struct m vfs_getnewfsid(mp); nmp->nm_mountp = mp; mtx_init(&nmp->nm_mtx, "NFSmount lock", NULL, MTX_DEF | MTX_DUPOK); + nmp->nm_negnametimeo = negnametimeo; nfs_decode_args(mp, nmp, argp, cred, td); Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 14 00:30:24 2010 (r203850) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 14 00:43:42 2010 (r203851) @@ -224,10 +224,6 @@ int newnfs_directio_enable = 0; SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); -static int newnfs_neglookup_enable = 1; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, neglookup_enable, CTLFLAG_RW, - &newnfs_neglookup_enable, 0, "Enable NFS negative lookup caching"); - /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while @@ -713,11 +709,11 @@ nfs_close(struct vop_close_args *ap) * enabled. (What does this have to do with negative lookup * caching? Well nothing, except it was reported by the * same user that needed negative lookup caching and I wanted - * there to be a way to disable it via sysctl to see if it + * there to be a way to disable it to see if it * is the cause of some caching/coherency issue that might * crop up.) */ - if (newnfs_neglookup_enable == 0) + if (VFSTONFS(vp->v_mount)->nm_negnametimeo == 0) np->n_attrstamp = 0; if (np->n_flag & NWRITEERR) { np->n_flag &= ~NWRITEERR; @@ -1007,6 +1003,8 @@ nfs_lookup(struct vop_lookup_args *ap) struct thread *td = cnp->cn_thread; struct nfsfh *nfhp; struct nfsvattr dnfsva, nfsva; + struct vattr vattr; + time_t dmtime; *vpp = NULLVP; if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && @@ -1027,37 +1025,68 @@ nfs_lookup(struct vop_lookup_args *ap) if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) return (error); - if ((error = cache_lookup(dvp, vpp, cnp)) && - (error != ENOENT || newnfs_neglookup_enable != 0)) { - struct vattr vattr; - - if (error == ENOENT) { - if (!VOP_GETATTR(dvp, &vattr, cnp->cn_cred) && - vattr.va_mtime.tv_sec == np->n_dmtime) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); - return (ENOENT); - } - cache_purge_negative(dvp); - np->n_dmtime = 0; - } else { - newvp = *vpp; - if (nfscl_nodeleg(newvp, 0) == 0 || - (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) && - vattr.va_ctime.tv_sec==VTONFS(newvp)->n_ctime)) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); - if (cnp->cn_nameiop != LOOKUP && - (flags & ISLASTCN)) - cnp->cn_flags |= SAVENAME; - return (0); - } - cache_purge(newvp); - if (dvp != newvp) - vput(newvp); - else - vrele(newvp); - *vpp = NULLVP; + error = cache_lookup(dvp, vpp, cnp); + if (error > 0 && error != ENOENT) + return (error); + if (error == -1) { + /* + * We only accept a positive hit in the cache if the + * change time of the file matches our cached copy. + * Otherwise, we discard the cache entry and fallback + * to doing a lookup RPC. + */ + newvp = *vpp; + if (nfscl_nodeleg(newvp, 0) == 0 || + (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) + && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) { + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + if (cnp->cn_nameiop != LOOKUP && + (flags & ISLASTCN)) + cnp->cn_flags |= SAVENAME; + return (0); } + cache_purge(newvp); + if (dvp != newvp) + vput(newvp); + else + vrele(newvp); + *vpp = NULLVP; + } else if (error == ENOENT) { + if (dvp->v_iflag & VI_DOOMED) + return (ENOENT); + /* + * We only accept a negative hit in the cache if the + * modification time of the parent directory matches + * our cached copy. Otherwise, we discard all of the + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * nm_negative_namecache_timeout seconds. + */ + if ((u_int)(ticks - np->n_dmtime_ticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + vattr.va_mtime.tv_sec == np->n_dmtime) { + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + return (ENOENT); + } + cache_purge_negative(dvp); + mtx_lock(&np->n_mtx); + np->n_dmtime = 0; + mtx_unlock(&np->n_mtx); } + + /* + * Cache the modification time of the parent directory in case + * the lookup fails and results in adding the first negative + * name cache entry for the directory. Since this is reading + * a single time_t, don't bother with locking. The + * modification time may be a bit stale, but it must be read + * before performing the lookup RPC to prevent a race where + * another lookup updates the timestamp on the directory after + * the lookup RPC has been performed on the server but before + * n_dmtime is set at the end of this function. + */ + dmtime = np->n_vattr.na_mtime.tv_sec; error = 0; newvp = NULLVP; NFSINCRGLOBAL(newnfsstats.lookupcache_misses); @@ -1067,29 +1096,60 @@ nfs_lookup(struct vop_lookup_args *ap) if (dattrflag) (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (error) { - if (newnfs_neglookup_enable != 0 && - error == ENOENT && (cnp->cn_flags & MAKEENTRY) && - cnp->cn_nameiop != CREATE) { - if (np->n_dmtime == 0) - np->n_dmtime = np->n_vattr.na_mtime.tv_sec; - cache_enter(dvp, NULL, cnp); - } if (newvp != NULLVP) { vput(newvp); *vpp = NULLVP; } + + if (error != ENOENT) { + if (NFS_ISV4(dvp)) + error = nfscl_maperr(td, error, (uid_t)0, + (gid_t)0); + return (error); + } + + /* The requested file was not found. */ if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) && - (flags & ISLASTCN) && error == ENOENT) { + (flags & ISLASTCN)) { + /* + * XXX: UFS does a full VOP_ACCESS(dvp, + * VWRITE) here instead of just checking + * MNT_RDONLY. + */ if (mp->mnt_flag & MNT_RDONLY) - error = EROFS; - else - error = EJUSTRETURN; - } - if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) + return (EROFS); cnp->cn_flags |= SAVENAME; - if (NFS_ISV4(dvp)) - error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0); - return (error); + return (EJUSTRETURN); + } + + if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) { + /* + * Maintain n_dmtime as the modification time + * of the parent directory when the oldest -ve + * name cache entry for this directory was + * added. If a -ve cache entry has already + * been added with a newer modification time + * by a concurrent lookup, then don't bother + * adding a cache entry. The modification + * time of the directory might have changed + * due to the file this lookup failed to find + * being created. In that case a subsequent + * lookup would incorrectly use the entry + * added here instead of doing an extra + * lookup. + */ + mtx_lock(&np->n_mtx); + if (np->n_dmtime <= dmtime) { + if (np->n_dmtime == 0) { + np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } + mtx_unlock(&np->n_mtx); + cache_enter(dvp, NULL, cnp); + } else + mtx_unlock(&np->n_mtx); + } + return (ENOENT); } /* @@ -1829,7 +1889,7 @@ nfs_link(struct vop_link_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(vp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(tdvp, vp, cnp); if (error && NFS_ISV4(vp)) @@ -1893,7 +1953,7 @@ nfs_symlink(struct vop_symlink_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; @@ -1973,7 +2033,7 @@ nfs_mkdir(struct vop_mkdir_args *ap) * but if negative caching is enabled, then the system * must care about lookup caching hit rate, so... */ - if (newnfs_neglookup_enable != 0 && + if (VFSTONFS(dvp->v_mount)->nm_negnametimeo != 0 && (cnp->cn_flags & MAKEENTRY)) cache_enter(dvp, newvp, cnp); *ap->a_vpp = newvp; Modified: stable/8/sys/fs/nfsclient/nfsmount.h ============================================================================== --- stable/8/sys/fs/nfsclient/nfsmount.h Sun Feb 14 00:30:24 2010 (r203850) +++ stable/8/sys/fs/nfsclient/nfsmount.h Sun Feb 14 00:43:42 2010 (r203851) @@ -69,6 +69,7 @@ struct nfsmount { u_int64_t nm_maxfilesize; /* maximum file size */ int nm_tprintf_initial_delay; /* initial delay */ int nm_tprintf_delay; /* interval for messages */ + int nm_negnametimeo; /* timeout for -ve entries (sec) */ /* Newnfs additions */ struct nfsclclient *nm_clp; @@ -99,6 +100,10 @@ struct nfsmount { */ #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #endif /* _KERNEL */ #endif /* _NFSCLIENT_NFSMOUNT_H_ */ Modified: stable/8/sys/fs/nfsclient/nfsnode.h ============================================================================== --- stable/8/sys/fs/nfsclient/nfsnode.h Sun Feb 14 00:30:24 2010 (r203850) +++ stable/8/sys/fs/nfsclient/nfsnode.h Sun Feb 14 00:43:42 2010 (r203851) @@ -108,6 +108,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ struct nfsfh *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 05:02:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAE3E1065670; Sun, 14 Feb 2010 05:02:08 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB01C8FC0C; Sun, 14 Feb 2010 05:02:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E5281p068981; Sun, 14 Feb 2010 05:02:08 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E528ZK068979; Sun, 14 Feb 2010 05:02:08 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201002140502.o1E528ZK068979@svn.freebsd.org> From: Kevin Lo Date: Sun, 14 Feb 2010 05:02:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203852 - head/sys/arm/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 05:02:08 -0000 Author: kevlo Date: Sun Feb 14 05:02:08 2010 New Revision: 203852 URL: http://svn.freebsd.org/changeset/base/203852 Log: Correct cpu id for FA526. While I'm here, add cpu id for FA626TE. Modified: head/sys/arm/include/armreg.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sun Feb 14 00:43:42 2010 (r203851) +++ head/sys/arm/include/armreg.h Sun Feb 14 05:02:08 2010 (r203852) @@ -151,7 +151,8 @@ #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ #define CPU_ID_MV88FR571_VD 0x56155710 /* Marvell Feroceon 88FR571-VD Core (ID from datasheet) */ #define CPU_ID_MV88FR571_41 0x41159260 /* Marvell Feroceon 88FR571-VD Core (actual ID from CPU reg) */ -#define CPU_ID_FA526 0x66015260 +#define CPU_ID_FA526 0x66015261 +#define CPU_ID_FA626TE 0x66056261 #define CPU_ID_SA1110 0x6901b110 #define CPU_ID_IXP1200 0x6901c120 #define CPU_ID_80200 0x69052000 From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 09:34:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26F79106566B; Sun, 14 Feb 2010 09:34:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 150CA8FC0C; Sun, 14 Feb 2010 09:34:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E9YRlm028386; Sun, 14 Feb 2010 09:34:27 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E9YRRi028384; Sun, 14 Feb 2010 09:34:27 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002140934.o1E9YRRi028384@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Feb 2010 09:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203855 - stable/8/sys/dev/wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 09:34:28 -0000 Author: gavin Date: Sun Feb 14 09:34:27 2010 New Revision: 203855 URL: http://svn.freebsd.org/changeset/base/203855 Log: Merge r200530 from head: Don't panic on failure to attach if we fail before or during the if_alloc() of ifp. This fixes the panic reported in the PRs, but not the attach failure. PR: kern/139079, kern/143874 Tested by: Steven Noonan Reviewed by: thompsa Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sun Feb 14 07:20:58 2010 (r203854) +++ stable/8/sys/dev/wpi/if_wpi.c Sun Feb 14 09:34:27 2010 (r203855) @@ -713,13 +713,14 @@ wpi_detach(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211com *ic; int ac; - ieee80211_draintask(ic, &sc->sc_restarttask); - ieee80211_draintask(ic, &sc->sc_radiotask); - if (ifp != NULL) { + ic = ifp->if_l2com; + + ieee80211_draintask(ic, &sc->sc_restarttask); + ieee80211_draintask(ic, &sc->sc_radiotask); wpi_stop(sc); callout_drain(&sc->watchdog_to); callout_drain(&sc->calib_to); From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 09:37:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 937E6106566B; Sun, 14 Feb 2010 09:37:13 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81B9B8FC08; Sun, 14 Feb 2010 09:37:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E9bD67029063; Sun, 14 Feb 2010 09:37:13 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E9bDgA029061; Sun, 14 Feb 2010 09:37:13 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002140937.o1E9bDgA029061@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Feb 2010 09:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203856 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 09:37:14 -0000 Author: gavin Date: Sun Feb 14 09:37:13 2010 New Revision: 203856 URL: http://svn.freebsd.org/changeset/base/203856 Log: Merge r203636 from head: Correct arguments to free_unr(), "item" was missing. Modified: stable/8/share/man/man9/alloc_unr.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/alloc_unr.9 ============================================================================== --- stable/8/share/man/man9/alloc_unr.9 Sun Feb 14 09:34:27 2010 (r203855) +++ stable/8/share/man/man9/alloc_unr.9 Sun Feb 14 09:37:13 2010 (r203856) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 23, 2005 +.Dd February 7, 2010 .Dt ALLOC_UNR 9 .Os .Sh NAME @@ -81,7 +81,7 @@ is returned. Same as .Fn alloc_unr except that mutex is assumed to be already locked and thus is not used. -.It Fn free_unr uh +.It Fn free_unr uh item Free a previously allocated unit number. This function may require allocating memory, and thus it can sleep. There is no pre-locked variant. From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 09:40:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB618106566B; Sun, 14 Feb 2010 09:40:58 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9E5F8FC15; Sun, 14 Feb 2010 09:40:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E9ew6V029904; Sun, 14 Feb 2010 09:40:58 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E9ewMJ029902; Sun, 14 Feb 2010 09:40:58 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002140940.o1E9ewMJ029902@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Feb 2010 09:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203857 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 09:40:58 -0000 Author: gavin Date: Sun Feb 14 09:40:58 2010 New Revision: 203857 URL: http://svn.freebsd.org/changeset/base/203857 Log: Merge r203620,203621 from head: Document support for the D-Link DFE520-TX card (supported with the vr(4) driver) PR: kern/135989 Submitted by: "Rashid N. Achilov" citycat4 ngs.ru Modified: stable/8/share/man/man4/vr.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/vr.4 ============================================================================== --- stable/8/share/man/man4/vr.4 Sun Feb 14 09:37:13 2010 (r203856) +++ stable/8/share/man/man4/vr.4 Sun Feb 14 09:40:58 2010 (r203857) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2008 +.Dd February 7, 2010 .Dt VR 4 .Os .Sh NAME @@ -130,6 +130,8 @@ Fast Ethernet adapters including: .It AOpen/Acer ALN-320 .It +D-Link DFE520-TX +.It D-Link DFE530-TX .It Hawking Technologies PN102TX From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 09:48:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E6910656A8; Sun, 14 Feb 2010 09:48:55 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA3058FC1F; Sun, 14 Feb 2010 09:48:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1E9mrlh031689; Sun, 14 Feb 2010 09:48:53 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1E9mr0h031686; Sun, 14 Feb 2010 09:48:53 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002140948.o1E9mr0h031686@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Feb 2010 09:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203858 - stable/8/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 09:49:00 -0000 Author: gavin Date: Sun Feb 14 09:48:53 2010 New Revision: 203858 URL: http://svn.freebsd.org/changeset/base/203858 Log: Merge r203310,203547,203717 from head: Implement the "-i" option to sysctl(8), to ignore failures while retrieving individual OIDs. This allows the same list of OIDs to be passed to sysctl(8) across different systems where particular OIDs may not exist, and still get as much information as possible from them. PR: bin/123644 Submitted by: dhw Modified: stable/8/sbin/sysctl/sysctl.8 stable/8/sbin/sysctl/sysctl.c Directory Properties: stable/8/sbin/sysctl/ (props changed) Modified: stable/8/sbin/sysctl/sysctl.8 ============================================================================== --- stable/8/sbin/sysctl/sysctl.8 Sun Feb 14 09:40:58 2010 (r203857) +++ stable/8/sbin/sysctl/sysctl.8 Sun Feb 14 09:48:53 2010 (r203858) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 28, 2007 +.Dd February 6, 2010 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehNnoqx +.Op Fl bdehiNnoqx .Ar name Ns Op = Ns Ar value .Ar ... .Nm @@ -82,6 +82,12 @@ or is specified, or a variable is being set. .It Fl h Format output for human, rather than machine, readability. +.It Fl i +Ignore unknown OIDs. +The purpose is to make use of +.Nm +for collecting data from a variety of machines (not all of which +are necessarily running exactly the same software) easier. .It Fl N Show only variable names, not their values. This is particularly useful with shells that offer programmable Modified: stable/8/sbin/sysctl/sysctl.c ============================================================================== --- stable/8/sbin/sysctl/sysctl.c Sun Feb 14 09:40:58 2010 (r203857) +++ stable/8/sbin/sysctl/sysctl.c Sun Feb 14 09:48:53 2010 (r203858) @@ -58,8 +58,8 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, Nflag, nflag, oflag; -static int qflag, xflag, warncount; +static int aflag, bflag, dflag, eflag, hflag, iflag; +static int Nflag, nflag, oflag, qflag, xflag, warncount; static int oidfmt(int *, int, char *, u_int *); static void parse(char *); @@ -75,7 +75,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehNnoqx] name[=value] ...", + "usage: sysctl [-bdehiNnoqx] name[=value] ...", " sysctl [-bdehNnoqx] -a"); exit(1); } @@ -89,7 +89,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabdehNnoqwxX")) != -1) { + while ((ch = getopt(argc, argv, "AabdehiNnoqwxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -110,6 +110,9 @@ main(int argc, char **argv) case 'h': hflag = 1; break; + case 'i': + iflag = 1; + break; case 'N': Nflag = 1; break; @@ -187,6 +190,8 @@ parse(char *string) len = name2oid(bufp, mib); if (len < 0) { + if (iflag) + return; if (qflag) exit(1); else From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 11:04:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04E9106566C; Sun, 14 Feb 2010 11:04:52 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E00978FC0A; Sun, 14 Feb 2010 11:04:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EB4qd5051201; Sun, 14 Feb 2010 11:04:52 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EB4qPN051199; Sun, 14 Feb 2010 11:04:52 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002141104.o1EB4qPN051199@svn.freebsd.org> From: Rui Paulo Date: Sun, 14 Feb 2010 11:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203859 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 11:04:53 -0000 Author: rpaulo Date: Sun Feb 14 11:04:52 2010 New Revision: 203859 URL: http://svn.freebsd.org/changeset/base/203859 Log: Also build ah_eeprom_v4k.c when ar9280 is selected. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Feb 14 09:48:53 2010 (r203858) +++ head/sys/conf/files Sun Feb 14 11:04:52 2010 (r203859) @@ -555,7 +555,7 @@ dev/ath/ath_hal/ah_eeprom_v14.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v4k.c \ - optional ath_hal | ath_ar9285 \ + optional ath_hal | ath_ar9280 | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 11:53:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC4551065672; Sun, 14 Feb 2010 11:53:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90EEE8FC08; Sun, 14 Feb 2010 11:53:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EBrpgK061918; Sun, 14 Feb 2010 11:53:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EBrpZm061915; Sun, 14 Feb 2010 11:53:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141153.o1EBrpZm061915@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 11:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203860 - stable/8/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 11:53:51 -0000 Author: mav Date: Sun Feb 14 11:53:51 2010 New Revision: 203860 URL: http://svn.freebsd.org/changeset/base/203860 Log: MFC r202150, r202170: Make OSS_GETVERSION ioctl really work. It has 'M' group, not 'P', as different nearby ones, and was grabbed by MIXER_xxx() handler. While there, replace '(cmd & MIXER_xxx(0)) == MIXER_xxx(0)' expressions with more correct '(cmd & ~0xff) == MIXER_xxx(0)'. Use of bit operations to compare numeric fields doesn't looks sane. Modified: stable/8/sys/dev/sound/pcm/dsp.c stable/8/sys/dev/sound/pcm/mixer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/sound/pcm/dsp.c ============================================================================== --- stable/8/sys/dev/sound/pcm/dsp.c Sun Feb 14 11:04:52 2010 (r203859) +++ stable/8/sys/dev/sound/pcm/dsp.c Sun Feb 14 11:53:51 2010 (r203860) @@ -1003,7 +1003,7 @@ dsp_ioctl_channel(struct cdev *dev, stru if (volch != NULL && ((j == SOUND_MIXER_PCM && volch->direction == PCMDIR_PLAY) || (j == SOUND_MIXER_RECLEV && volch->direction == PCMDIR_REC))) { - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + if ((cmd & ~0xff) == MIXER_WRITE(0)) { int left, right, center; left = *(int *)arg & 0x7f; @@ -1011,7 +1011,7 @@ dsp_ioctl_channel(struct cdev *dev, stru center = (left + right) >> 1; chn_setvolume_multi(volch, SND_VOL_C_PCM, left, right, center); - } else if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + } else if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = CHN_GETVOLUME(volch, SND_VOL_C_PCM, SND_CHN_T_FL); *(int *)arg |= CHN_GETVOLUME(volch, @@ -1023,7 +1023,7 @@ dsp_ioctl_channel(struct cdev *dev, stru case SOUND_MIXER_DEVMASK: case SOUND_MIXER_CAPS: case SOUND_MIXER_STEREODEVS: - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = 0; if (rdch != NULL) *(int *)arg |= SOUND_MASK_RECLEV; @@ -1034,7 +1034,7 @@ dsp_ioctl_channel(struct cdev *dev, stru break; case SOUND_MIXER_RECMASK: case SOUND_MIXER_RECSRC: - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) + if ((cmd & ~0xff) == MIXER_READ(0)) *(int *)arg = 0; ret = 0; break; @@ -1069,6 +1069,10 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd chn = NULL; if (IOCGROUP(cmd) == 'M') { + if (cmd == OSS_GETVERSION) { + *arg_i = SOUND_VERSION; + return (0); + } ret = dsp_ioctl_channel(i_dev, PCM_VOLCH(i_dev), cmd, arg); if (ret != -1) { PCM_GIANT_EXIT(d); Modified: stable/8/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/mixer.c Sun Feb 14 11:04:52 2010 (r203859) +++ stable/8/sys/dev/sound/pcm/mixer.c Sun Feb 14 11:53:51 2010 (r203860) @@ -1136,7 +1136,7 @@ mixer_ioctl_channel(struct cdev *dev, u_ if ((j == SOUND_MIXER_DEVMASK || j == SOUND_MIXER_CAPS || j == SOUND_MIXER_STEREODEVS) && - (cmd & MIXER_READ(0)) == MIXER_READ(0)) { + (cmd & ~0xff) == MIXER_READ(0)) { snd_mtxlock(m->lock); *(int *)arg = mix_getdevs(m); snd_mtxunlock(m->lock); @@ -1154,14 +1154,14 @@ mixer_ioctl_channel_proc: KASSERT(c != NULL, ("%s(): NULL channel", __func__)); CHN_LOCKASSERT(c); - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + if ((cmd & ~0xff) == MIXER_WRITE(0)) { int left, right, center; left = *(int *)arg & 0x7f; right = (*(int *)arg >> 8) & 0x7f; center = (left + right) >> 1; chn_setvolume_multi(c, SND_VOL_C_PCM, left, right, center); - } else if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + } else if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FL); *(int *)arg |= CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FR) << 8; @@ -1214,7 +1214,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo struct thread *td, int from) { struct snd_mixer *m; - int ret, *arg_i = (int *)arg; + int ret = EINVAL, *arg_i = (int *)arg; int v = -1, j = cmd & 0xff; /* @@ -1248,8 +1248,23 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return (EBADF); } - - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + switch (cmd) { + case SNDCTL_DSP_GET_RECSRC_NAMES: + bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); + ret = 0; + goto done; + case SNDCTL_DSP_GET_RECSRC: + ret = mixer_get_recroute(m, arg_i); + goto done; + case SNDCTL_DSP_SET_RECSRC: + ret = mixer_set_recroute(m, *arg_i); + goto done; + case OSS_GETVERSION: + *arg_i = SOUND_VERSION; + ret = 0; + goto done; + } + if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); else @@ -1257,23 +1272,19 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return ((ret == 0) ? 0 : ENXIO); } - - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + if ((cmd & ~0xff) == MIXER_READ(0)) { switch (j) { - case SOUND_MIXER_DEVMASK: - case SOUND_MIXER_CAPS: - case SOUND_MIXER_STEREODEVS: + case SOUND_MIXER_DEVMASK: + case SOUND_MIXER_CAPS: + case SOUND_MIXER_STEREODEVS: v = mix_getdevs(m); break; - - case SOUND_MIXER_RECMASK: + case SOUND_MIXER_RECMASK: v = mix_getrecdevs(m); break; - - case SOUND_MIXER_RECSRC: + case SOUND_MIXER_RECSRC: v = mixer_getrecsrc(m); break; - default: v = mixer_get(m, j); } @@ -1281,29 +1292,8 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return ((v != -1) ? 0 : ENXIO); } - - ret = 0; - - switch (cmd) { - case SNDCTL_DSP_GET_RECSRC_NAMES: - bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); - break; - case SNDCTL_DSP_GET_RECSRC: - ret = mixer_get_recroute(m, arg_i); - break; - case SNDCTL_DSP_SET_RECSRC: - ret = mixer_set_recroute(m, *arg_i); - break; - case OSS_GETVERSION: - *arg_i = SOUND_VERSION; - break; - default: - ret = EINVAL; - break; - } - +done: snd_mtxunlock(m->lock); - return (ret); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:00:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BDBE106575A; Sun, 14 Feb 2010 12:00:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19DD38FC0A; Sun, 14 Feb 2010 12:00:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EC0NNA063496; Sun, 14 Feb 2010 12:00:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EC0NfK063493; Sun, 14 Feb 2010 12:00:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141200.o1EC0NfK063493@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203861 - stable/8/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:00:24 -0000 Author: mav Date: Sun Feb 14 12:00:23 2010 New Revision: 203861 URL: http://svn.freebsd.org/changeset/base/203861 Log: MFC r203484: Do not release device, when changing number of openings. Modified: stable/8/sys/dev/mpt/mpt_cam.c stable/8/sys/dev/mpt/mpt_raid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_cam.c Sun Feb 14 11:53:51 2010 (r203860) +++ stable/8/sys/dev/mpt/mpt_cam.c Sun Feb 14 12:00:23 2010 (r203861) @@ -2553,6 +2553,7 @@ mpt_cam_event(struct mpt_softc *mpt, req } xpt_setup_ccb(&crs.ccb_h, tmppath, 5); crs.ccb_h.func_code = XPT_REL_SIMQ; + crs.ccb_h.flags = CAM_DEV_QFREEZE; crs.release_flags = RELSIM_ADJUST_OPENINGS; crs.openings = pqf->CurrentDepth - 1; xpt_action((union ccb *)&crs); Modified: stable/8/sys/dev/mpt/mpt_raid.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_raid.c Sun Feb 14 11:53:51 2010 (r203860) +++ stable/8/sys/dev/mpt/mpt_raid.c Sun Feb 14 12:00:23 2010 (r203861) @@ -1062,6 +1062,7 @@ mpt_adjust_queue_depth(struct mpt_softc xpt_setup_ccb(&crs.ccb_h, path, /*priority*/5); crs.ccb_h.func_code = XPT_REL_SIMQ; + crs.ccb_h.flags = CAM_DEV_QFREEZE; crs.release_flags = RELSIM_ADJUST_OPENINGS; crs.openings = mpt->raid_queue_depth; xpt_action((union ccb *)&crs); From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:00:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA07106588E; Sun, 14 Feb 2010 12:00:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFF558FC27; Sun, 14 Feb 2010 12:00:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EC0gk3063610; Sun, 14 Feb 2010 12:00:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EC0gf8063608; Sun, 14 Feb 2010 12:00:42 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002141200.o1EC0gf8063608@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Feb 2010 12:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203862 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:00:43 -0000 Author: ed Date: Sun Feb 14 12:00:42 2010 New Revision: 203862 URL: http://svn.freebsd.org/changeset/base/203862 Log: Make work without including . According to the last POSIX specification that contained , this header should also typedef time_t properly. Also add a proper comment to the final #endif. Modified: head/sys/sys/timeb.h Modified: head/sys/sys/timeb.h ============================================================================== --- head/sys/sys/timeb.h Sun Feb 14 12:00:23 2010 (r203861) +++ head/sys/sys/timeb.h Sun Feb 14 12:00:42 2010 (r203862) @@ -38,6 +38,13 @@ #ifndef _SYS_TIMEB_H_ #define _SYS_TIMEB_H_ +#include + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + /* The ftime(2) system call structure -- deprecated. */ struct timeb { time_t time; /* seconds since the Epoch */ @@ -54,4 +61,4 @@ int ftime(struct timeb *); __END_DECLS #endif /* _KERNEL */ -#endif +#endif /* !_SYS_TIMEB_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:03:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5062D10656AA; Sun, 14 Feb 2010 12:03:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06FCE8FC0A; Sun, 14 Feb 2010 12:03:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EC34nM064231; Sun, 14 Feb 2010 12:03:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EC34Ao064229; Sun, 14 Feb 2010 12:03:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141203.o1EC34Ao064229@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203863 - stable/8/sys/dev/ciss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:03:05 -0000 Author: mav Date: Sun Feb 14 12:03:04 2010 New Revision: 203863 URL: http://svn.freebsd.org/changeset/base/203863 Log: MFC r203489: Return CAM_RELEASE_SIMQ flag only when it is needed, when SIM really was frozen before and should be released. Modified: stable/8/sys/dev/ciss/ciss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ciss/ciss.c ============================================================================== --- stable/8/sys/dev/ciss/ciss.c Sun Feb 14 12:00:42 2010 (r203862) +++ stable/8/sys/dev/ciss/ciss.c Sun Feb 14 12:03:04 2010 (r203863) @@ -3101,6 +3101,7 @@ ciss_cam_action_io(struct cam_sim *sim, */ if ((error = ciss_get_request(sc, &cr)) != 0) { xpt_freeze_simq(sim, 1); + csio->ccb_h.status |= CAM_RELEASE_SIMQ; csio->ccb_h.status |= CAM_REQUEUE_REQ; return(error); } @@ -3152,8 +3153,8 @@ ciss_cam_action_io(struct cam_sim *sim, */ if ((error = ciss_start(cr)) != 0) { xpt_freeze_simq(sim, 1); + csio->ccb_h.status |= CAM_RELEASE_SIMQ; if (error == EINPROGRESS) { - csio->ccb_h.status |= CAM_RELEASE_SIMQ; error = 0; } else { csio->ccb_h.status |= CAM_REQUEUE_REQ; @@ -3181,7 +3182,7 @@ ciss_cam_emulate(struct ciss_softc *sc, if (CISS_IS_PHYSICAL(bus)) { if (sc->ciss_physical[CISS_CAM_TO_PBUS(bus)][target].cp_online != 1) { - csio->ccb_h.status = CAM_SEL_TIMEOUT; + csio->ccb_h.status |= CAM_SEL_TIMEOUT; xpt_done((union ccb *)csio); return(1); } else @@ -3194,7 +3195,7 @@ ciss_cam_emulate(struct ciss_softc *sc, * Other errors might be better. */ if (sc->ciss_logical[bus][target].cl_status != CISS_LD_ONLINE) { - csio->ccb_h.status = CAM_SEL_TIMEOUT; + csio->ccb_h.status |= CAM_SEL_TIMEOUT; xpt_done((union ccb *)csio); return(1); } @@ -3208,7 +3209,7 @@ ciss_cam_emulate(struct ciss_softc *sc, if (((csio->ccb_h.flags & CAM_CDB_POINTER) ? *(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0]) == SYNCHRONIZE_CACHE) { ciss_flush_adapter(sc); - csio->ccb_h.status = CAM_REQ_CMP; + csio->ccb_h.status |= CAM_REQ_CMP; xpt_done((union ccb *)csio); return(1); } @@ -3269,13 +3270,13 @@ ciss_cam_complete(struct ciss_request *c /* no status due to adapter error */ case -1: debug(0, "adapter error"); - csio->ccb_h.status = CAM_REQ_CMP_ERR; + csio->ccb_h.status |= CAM_REQ_CMP_ERR; break; /* no status due to command completed OK */ case SCSI_STATUS_OK: /* CISS_SCSI_STATUS_GOOD */ debug(2, "SCSI_STATUS_OK"); - csio->ccb_h.status = CAM_REQ_CMP; + csio->ccb_h.status |= CAM_REQ_CMP; break; /* check condition, sense data included */ @@ -3286,7 +3287,7 @@ ciss_cam_complete(struct ciss_request *c bcopy(&ce->sense_info[0], &csio->sense_data, ce->sense_length); csio->sense_len = ce->sense_length; csio->resid = ce->residual_count; - csio->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; + csio->ccb_h.status |= CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; #ifdef CISS_DEBUG { struct scsi_sense_data *sns = (struct scsi_sense_data *)&ce->sense_info[0]; @@ -3297,21 +3298,18 @@ ciss_cam_complete(struct ciss_request *c case SCSI_STATUS_BUSY: /* CISS_SCSI_STATUS_BUSY */ debug(0, "SCSI_STATUS_BUSY"); - csio->ccb_h.status = CAM_SCSI_BUSY; + csio->ccb_h.status |= CAM_SCSI_BUSY; break; default: debug(0, "unknown status 0x%x", csio->scsi_status); - csio->ccb_h.status = CAM_REQ_CMP_ERR; + csio->ccb_h.status |= CAM_REQ_CMP_ERR; break; } /* handle post-command fixup */ ciss_cam_complete_fixup(sc, csio); - /* tell CAM we're ready for more commands */ - csio->ccb_h.status |= CAM_RELEASE_SIMQ; - ciss_release_request(cr); xpt_done((union ccb *)csio); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:04:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D227E106566B; Sun, 14 Feb 2010 12:04:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C11EE8FC0A; Sun, 14 Feb 2010 12:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EC4Ppj064594; Sun, 14 Feb 2010 12:04:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EC4PDR064592; Sun, 14 Feb 2010 12:04:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141204.o1EC4PDR064592@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203864 - stable/8/sys/dev/ciss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:04:25 -0000 Author: mav Date: Sun Feb 14 12:04:25 2010 New Revision: 203864 URL: http://svn.freebsd.org/changeset/base/203864 Log: MFC r203524: When hacking INQUIRY result, make sure that it is right INQUIRY and there is enough of result to hack. Modified: stable/8/sys/dev/ciss/ciss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ciss/ciss.c ============================================================================== --- stable/8/sys/dev/ciss/ciss.c Sun Feb 14 12:03:04 2010 (r203863) +++ stable/8/sys/dev/ciss/ciss.c Sun Feb 14 12:04:25 2010 (r203864) @@ -3322,10 +3322,15 @@ ciss_cam_complete_fixup(struct ciss_soft { struct scsi_inquiry_data *inq; struct ciss_ldrive *cl; + uint8_t *cdb; int bus, target; - if (((csio->ccb_h.flags & CAM_CDB_POINTER) ? - *(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0]) == INQUIRY) { + cdb = (csio->ccb_h.flags & CAM_CDB_POINTER) ? + (uint8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes; + if (cdb[0] == INQUIRY && + (cdb[1] & SI_EVPD) == 0 && + (csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + csio->dxfer_len >= SHORT_INQUIRY_LENGTH) { inq = (struct scsi_inquiry_data *)csio->data_ptr; target = csio->ccb_h.target_id; From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:08:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E72D31065710; Sun, 14 Feb 2010 12:08:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6C698FC19; Sun, 14 Feb 2010 12:08:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EC8iYg065557; Sun, 14 Feb 2010 12:08:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EC8iln065555; Sun, 14 Feb 2010 12:08:44 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002141208.o1EC8iln065555@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Feb 2010 12:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203865 - head/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:08:45 -0000 Author: gavin Date: Sun Feb 14 12:08:44 2010 New Revision: 203865 URL: http://svn.freebsd.org/changeset/base/203865 Log: The -newerXB option was being interpreted the same as the -newerXm option as a check for F_TIME2_B was missing. Fix this. PR: bin/138245 Submitted by: "David E. Cross" MFC after: 1 month Modified: head/usr.bin/find/function.c Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Sun Feb 14 12:04:25 2010 (r203864) +++ head/usr.bin/find/function.c Sun Feb 14 12:08:44 2010 (r203865) @@ -1164,6 +1164,8 @@ c_newer(OPTION *option, char ***argvp) new->t_data = sb.st_ctime; else if (option->flags & F_TIME2_A) new->t_data = sb.st_atime; + else if (option->flags & F_TIME2_B) + new->t_data = sb.st_birthtime; else new->t_data = sb.st_mtime; } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:10:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 702B41065670; Sun, 14 Feb 2010 12:10:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 604BC8FC16; Sun, 14 Feb 2010 12:10:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECAnMe066058; Sun, 14 Feb 2010 12:10:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECAnZS066056; Sun, 14 Feb 2010 12:10:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141210.o1ECAnZS066056@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203866 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:10:49 -0000 Author: kib Date: Sun Feb 14 12:10:49 2010 New Revision: 203866 URL: http://svn.freebsd.org/changeset/base/203866 Log: Invalid filesystem might cause the bp to be never read. Noted by: Pedro F. Giffuni Obtanined from: NetBSD MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 14 12:08:44 2010 (r203865) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Feb 14 12:10:49 2010 (r203866) @@ -944,7 +944,8 @@ fillinusemap(pmp) if (readcn == 0) usemap_free(pmp, cn); } - brelse(bp); + if (bp != NULL) + brelse(bp); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:24:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51D1B106566B; Sun, 14 Feb 2010 12:24:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0972E8FC13; Sun, 14 Feb 2010 12:24:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECOCFN069048; Sun, 14 Feb 2010 12:24:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECOCht069047; Sun, 14 Feb 2010 12:24:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141224.o1ECOCht069047@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203867 - stable/8/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:24:13 -0000 Author: mav Date: Sun Feb 14 12:24:12 2010 New Revision: 203867 URL: http://svn.freebsd.org/changeset/base/203867 Log: MFp4: After last running command completed, give commands in timeout state second time. Modified: stable/8/sys/dev/siis/siis.c Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun Feb 14 12:10:49 2010 (r203866) +++ stable/8/sys/dev/siis/siis.c Sun Feb 14 12:24:12 2010 (r203867) @@ -1056,6 +1056,28 @@ siis_process_timeout(device_t dev) } } +/* Must be called with channel locked. */ +static void +siis_rearm_timeout(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + struct siis_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < SIIS_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 1000, + (timeout_t*)siis_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void siis_timeout(struct siis_slot *slot) @@ -1216,8 +1238,9 @@ siis_end_transaction(struct siis_slot *s siis_issue_read_log(dev); } /* If all the reset of commands are in timeout - abort them. */ - } else if ((ch->rslots & ~ch->toslots) == 0) - siis_process_timeout(dev); + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != SIIS_ERR_TIMEOUT) + siis_rearm_timeout(dev); } static void From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:25:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47C5E106566B; Sun, 14 Feb 2010 12:25:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36F0D8FC0C; Sun, 14 Feb 2010 12:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECP4Zd069293; Sun, 14 Feb 2010 12:25:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECP4UR069292; Sun, 14 Feb 2010 12:25:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141225.o1ECP4UR069292@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203868 - head/sbin/newfs_msdos X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:25:04 -0000 Author: kib Date: Sun Feb 14 12:25:03 2010 New Revision: 203868 URL: http://svn.freebsd.org/changeset/base/203868 Log: Some cleanups from NetBSD: - C99 initializers. - Change the default volume label from "NO NAME" to "NO_NAME". - Set OEM String to "BSD4.4 " following the unnamed spacing convention in that other OS that suggests "MSWIN4.1" Also, David Naylor's changes for Clang, mostly changing the signess of constants. Submitted by: Pedro F. Giffuni Clang fixes by: David Naylor Reviewed by: bde (with some disagreement about Clang issues) MFC after: 2 weeks Modified: head/sbin/newfs_msdos/newfs_msdos.8 head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 14 12:24:12 2010 (r203867) +++ head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 14 12:25:03 2010 (r203868) @@ -116,7 +116,7 @@ The default is .It Fl S Ar sector-size Number of bytes per sector. Acceptable values are powers of 2 -in the range 128 through 32768. +in the range 512 through 32768. .It Fl a Ar FAT-size Number of sectors per FAT. .It Fl b Ar block-size Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Sun Feb 14 12:24:12 2010 (r203867) +++ head/sbin/newfs_msdos/newfs_msdos.c Sun Feb 14 12:25:03 2010 (r203868) @@ -62,12 +62,12 @@ static const char rcsid[] = #define DEFBLK16 2048 /* default block size FAT16 */ #define DEFRDE 512 /* default root directory entries */ #define RESFTE 2 /* reserved FAT entries */ -#define MINCLS12 1 /* minimum FAT12 clusters */ -#define MINCLS16 0x1000 /* minimum FAT16 clusters */ -#define MINCLS32 2 /* minimum FAT32 clusters */ -#define MAXCLS12 0xfed /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff5 /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff5 /* maximum FAT32 clusters */ +#define MINCLS12 1U /* minimum FAT12 clusters */ +#define MINCLS16 0x1000U /* minimum FAT16 clusters */ +#define MINCLS32 2U /* minimum FAT32 clusters */ +#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff5U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */ #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ @@ -165,20 +165,23 @@ struct bpb { #define BPBGAP 0, 0, 0, 0, 0, 0 +#define INIT(a, b, c, d, e, f, g, h, i, j) \ + { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ + .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } static struct { const char *name; struct bpb bpb; } const stdfmt[] = { - {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}}, - {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, - {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, - {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, - {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, - {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, - {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, - {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, - {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, - {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} + {"160", INIT(512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1)}, + {"180", INIT(512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1)}, + {"320", INIT(512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2)}, + {"360", INIT(512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2)}, + {"640", INIT(512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2)}, + {"720", INIT(512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2)}, + {"1200", INIT(512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2)}, + {"1232", INIT(1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2)}, + {"1440", INIT(512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2)}, + {"2880", INIT(512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2)} }; static const u_int8_t bootcode[] = { @@ -533,7 +536,7 @@ main(int argc, char *argv[]) if (!bpb.res) bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; else if (bpb.res < x) - errx(1, "too few reserved sectors"); + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); if (fat != 32 && !bpb.rde) bpb.rde = DEFRDE; rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); @@ -657,7 +660,7 @@ main(int argc, char *argv[]) ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO NAME"); + mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); setstr(bsx->type, buf, sizeof(bsx->type)); if (!opt_B) { @@ -666,7 +669,7 @@ main(int argc, char *argv[]) mk1(bs->jmp[0], 0xeb); mk1(bs->jmp[1], x1 - 2); mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD 4.4", + setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", sizeof(bs->oem)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:25:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E13AC1065692; Sun, 14 Feb 2010 12:25:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFCB38FC08; Sun, 14 Feb 2010 12:25:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECPd81069463; Sun, 14 Feb 2010 12:25:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECPdwB069460; Sun, 14 Feb 2010 12:25:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141225.o1ECPdwB069460@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203869 - head/sbin/newfs_msdos X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:25:40 -0000 Author: kib Date: Sun Feb 14 12:25:39 2010 New Revision: 203869 URL: http://svn.freebsd.org/changeset/base/203869 Log: Rename variables to match msdosfs headers. Submitted by: Pedro F. Giffuni Reviewed by: bde MFC after: 2 weeks Modified: head/sbin/newfs_msdos/newfs_msdos.8 head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 14 12:25:03 2010 (r203868) +++ head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 14 12:25:39 2010 (r203869) @@ -38,14 +38,14 @@ .Op Fl B Ar boot .Op Fl C Ar create-size .Op Fl F Ar FAT-type -.Op Fl I Ar volid +.Op Fl I Ar VolumeId .Op Fl L Ar label .Op Fl O Ar OEM .Op Fl S Ar sector-size .Op Fl a Ar FAT-size .Op Fl b Ar block-size .Op Fl c Ar cluster-size -.Op Fl e Ar dirents +.Op Fl e Ar DirEnts .Op Fl f Ar format .Op Fl h Ar heads .Op Fl i Ar info @@ -103,7 +103,7 @@ If the file system supports sparse files smaller than the size specified as parameter. .It Fl F Ar FAT-type FAT type (one of 12, 16, or 32). -.It Fl I Ar volid +.It Fl I Ar VolumeID Volume ID, a 32 bit number in decimal or hexadecimal (0x...) format. .It Fl L Ar label Volume label (up to 11 characters). @@ -130,7 +130,7 @@ Acceptable values are powers of 2 in the If the block or cluster size are not specified, the code uses a cluster between 512 bytes and 32K depending on the filesystem size. -.It Fl e Ar dirents +.It Fl e Ar DirEnts Number of root directory entries (FAT12 and FAT16 only). .It Fl f Ar format Specify a standard (floppy disk) format. Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Sun Feb 14 12:25:03 2010 (r203868) +++ head/sbin/newfs_msdos/newfs_msdos.c Sun Feb 14 12:25:39 2010 (r203869) @@ -96,78 +96,78 @@ static const char rcsid[] = #define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) struct bs { - u_int8_t jmp[3]; /* bootstrap entry point */ - u_int8_t oem[8]; /* OEM name and version */ + u_int8_t bsJump[3]; /* bootstrap entry point */ + u_int8_t bsOemName[8]; /* OEM name and version */ }; struct bsbpb { - u_int8_t bps[2]; /* bytes per sector */ - u_int8_t spc; /* sectors per cluster */ - u_int8_t res[2]; /* reserved sectors */ - u_int8_t nft; /* number of FATs */ - u_int8_t rde[2]; /* root directory entries */ - u_int8_t sec[2]; /* total sectors */ - u_int8_t mid; /* media descriptor */ - u_int8_t spf[2]; /* sectors per FAT */ - u_int8_t spt[2]; /* sectors per track */ - u_int8_t hds[2]; /* drive heads */ - u_int8_t hid[4]; /* hidden sectors */ - u_int8_t bsec[4]; /* big total sectors */ + u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ + u_int8_t bpbSecPerClust; /* sectors per cluster */ + u_int8_t bpbResSectors[2]; /* reserved sectors */ + u_int8_t bpbFATs; /* number of FATs */ + u_int8_t bpbRootDirEnts[2]; /* root directory entries */ + u_int8_t bpbSectors[2]; /* total sectors */ + u_int8_t bpbMedia; /* media descriptor */ + u_int8_t bpbFATsecs[2]; /* sectors per FAT */ + u_int8_t bpbSecPerTrack[2]; /* sectors per track */ + u_int8_t bpbHeads[2]; /* drive heads */ + u_int8_t bpbHiddenSecs[4]; /* hidden sectors */ + u_int8_t bpbHugeSectors[4]; /* big total sectors */ }; struct bsxbpb { - u_int8_t bspf[4]; /* big sectors per FAT */ - u_int8_t xflg[2]; /* FAT control flags */ - u_int8_t vers[2]; /* file system version */ - u_int8_t rdcl[4]; /* root directory start cluster */ - u_int8_t infs[2]; /* file system info sector */ - u_int8_t bkbs[2]; /* backup boot sector */ - u_int8_t rsvd[12]; /* reserved */ + u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */ + u_int8_t bpbExtFlags[2]; /* FAT control flags */ + u_int8_t bpbFSVers[2]; /* file system version */ + u_int8_t bpbRootClust[4]; /* root directory start cluster */ + u_int8_t bpbFSInfo[2]; /* file system info sector */ + u_int8_t bpbBackup[2]; /* backup boot sector */ + u_int8_t bpbReserved[12]; /* reserved */ }; struct bsx { - u_int8_t drv; /* drive number */ - u_int8_t rsvd; /* reserved */ - u_int8_t sig; /* extended boot signature */ - u_int8_t volid[4]; /* volume ID number */ - u_int8_t label[11]; /* volume label */ - u_int8_t type[8]; /* file system type */ + u_int8_t exDriveNumber; /* drive number */ + u_int8_t exReserved1; /* reserved */ + u_int8_t exBootSignature; /* extended boot signature */ + u_int8_t exVolumeID[4]; /* volume ID number */ + u_int8_t exVolumeLabel[11]; /* volume label */ + u_int8_t exFileSysType[8]; /* file system type */ }; struct de { - u_int8_t namext[11]; /* name and extension */ - u_int8_t attr; /* attributes */ + u_int8_t deName[11]; /* name and extension */ + u_int8_t deAttributes; /* attributes */ u_int8_t rsvd[10]; /* reserved */ - u_int8_t time[2]; /* creation time */ - u_int8_t date[2]; /* creation date */ - u_int8_t clus[2]; /* starting cluster */ - u_int8_t size[4]; /* size */ + u_int8_t deMTime[2]; /* creation time */ + u_int8_t deMDate[2]; /* creation date */ + u_int8_t deStartCluster[2]; /* starting cluster */ + u_int8_t deFileSize[4]; /* size */ }; struct bpb { - u_int bps; /* bytes per sector */ - u_int spc; /* sectors per cluster */ - u_int res; /* reserved sectors */ - u_int nft; /* number of FATs */ - u_int rde; /* root directory entries */ - u_int sec; /* total sectors */ - u_int mid; /* media descriptor */ - u_int spf; /* sectors per FAT */ - u_int spt; /* sectors per track */ - u_int hds; /* drive heads */ - u_int hid; /* hidden sectors */ - u_int bsec; /* big total sectors */ - u_int bspf; /* big sectors per FAT */ - u_int rdcl; /* root directory start cluster */ - u_int infs; /* file system info sector */ - u_int bkbs; /* backup boot sector */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* reserved sectors */ + u_int bpbFATs; /* number of FATs */ + u_int bpbRootDirEnts; /* root directory entries */ + u_int bpbSectors; /* total sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsecs; /* sectors per FAT */ + u_int bpbSecPerTrack; /* sectors per track */ + u_int bpbHeads; /* drive heads */ + u_int bpbHiddenSecs; /* hidden sectors */ + u_int bpbHugeSectors; /* big total sectors */ + u_int bpbBigFATsecs; /* big sectors per FAT */ + u_int bpbRootClust; /* root directory start cluster */ + u_int bpbFSInfo; /* file system info sector */ + u_int bpbBackup; /* backup boot sector */ }; #define BPBGAP 0, 0, 0, 0, 0, 0 #define INIT(a, b, c, d, e, f, g, h, i, j) \ - { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ - .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } + { .bpbBytesPerSec = a, .bpbSecPerClust = b, .bpbResSectors = c, .bpbFATs = d, .bpbRootDirEnts = e, \ + .bpbSectors = f, .bpbMedia = g, .bpbFATsecs = h, .bpbSecPerTrack = i, .bpbHeads = j, } static struct { const char *name; struct bpb bpb; @@ -384,49 +384,49 @@ main(int argc, char *argv[]) memset(&bpb, 0, sizeof(bpb)); if (opt_f) { getstdfmt(opt_f, &bpb); - bpb.bsec = bpb.sec; - bpb.sec = 0; - bpb.bspf = bpb.spf; - bpb.spf = 0; + bpb.bpbHugeSectors = bpb.bpbSectors; + bpb.bpbSectors = 0; + bpb.bpbBigFATsecs = bpb.bpbFATsecs; + bpb.bpbFATsecs = 0; } if (opt_h) - bpb.hds = opt_h; + bpb.bpbHeads = opt_h; if (opt_u) - bpb.spt = opt_u; + bpb.bpbSecPerTrack = opt_u; if (opt_S) - bpb.bps = opt_S; + bpb.bpbBytesPerSec = opt_S; if (opt_s) - bpb.bsec = opt_s; + bpb.bpbHugeSectors = opt_s; if (oflag) - bpb.hid = opt_o; + bpb.bpbHiddenSecs = opt_o; if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { off_t delta; getdiskinfo(fd, fname, dtype, oflag, &bpb); - bpb.bsec -= (opt_ofs / bpb.bps); - delta = bpb.bsec % bpb.spt; + bpb.bpbHugeSectors -= (opt_ofs / bpb.bpbBytesPerSec); + delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; if (delta != 0) { warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.spt); - bpb.bsec -= delta; + (int)delta, bpb.bpbSecPerTrack); + bpb.bpbHugeSectors -= delta; } - if (bpb.spc == 0) { /* set defaults */ - if (bpb.bsec <= 6000) /* about 3MB -> 512 bytes */ - bpb.spc = 1; - else if (bpb.bsec <= (1<<17)) /* 64M -> 4k */ - bpb.spc = 8; - else if (bpb.bsec <= (1<<19)) /* 256M -> 8k */ - bpb.spc = 16; - else if (bpb.bsec <= (1<<21)) /* 1G -> 16k */ - bpb.spc = 32; + if (bpb.bpbSecPerClust == 0) { /* set defaults */ + if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */ + bpb.bpbSecPerClust = 1; + else if (bpb.bpbHugeSectors <= (1<<17)) /* 64M -> 4k */ + bpb.bpbSecPerClust = 8; + else if (bpb.bpbHugeSectors <= (1<<19)) /* 256M -> 8k */ + bpb.bpbSecPerClust = 16; + else if (bpb.bpbHugeSectors <= (1<<21)) /* 1G -> 16k */ + bpb.bpbSecPerClust = 32; else - bpb.spc = 64; /* otherwise 32k */ + bpb.bpbSecPerClust = 64; /* otherwise 32k */ } } - if (!powerof2(bpb.bps)) - errx(1, "bytes/sector (%u) is not a power of 2", bpb.bps); - if (bpb.bps < MINBPS) + if (!powerof2(bpb.bpbBytesPerSec)) + errx(1, "bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + if (bpb.bpbBytesPerSec < MINBPS) errx(1, "bytes/sector (%u) is too small; minimum is %u", - bpb.bps, MINBPS); + bpb.bpbBytesPerSec, MINBPS); if (!(fat = opt_F)) { if (opt_f) fat = 12; @@ -438,44 +438,44 @@ main(int argc, char *argv[]) fat == 32 ? 'e' : opt_i ? 'i' : 'k', fat == 32 ? "32" : "12/16"); if (opt_f && fat == 32) - bpb.rde = 0; + bpb.bpbRootDirEnts = 0; if (opt_b) { if (!powerof2(opt_b)) errx(1, "block size (%u) is not a power of 2", opt_b); - if (opt_b < bpb.bps) + if (opt_b < bpb.bpbBytesPerSec) errx(1, "block size (%u) is too small; minimum is %u", - opt_b, bpb.bps); - if (opt_b > bpb.bps * MAXSPC) + opt_b, bpb.bpbBytesPerSec); + if (opt_b > bpb.bpbBytesPerSec * MAXSPC) errx(1, "block size (%u) is too large; maximum is %u", - opt_b, bpb.bps * MAXSPC); - bpb.spc = opt_b / bpb.bps; + opt_b, bpb.bpbBytesPerSec * MAXSPC); + bpb.bpbSecPerClust = opt_b / bpb.bpbBytesPerSec; } if (opt_c) { if (!powerof2(opt_c)) errx(1, "sectors/cluster (%u) is not a power of 2", opt_c); - bpb.spc = opt_c; + bpb.bpbSecPerClust = opt_c; } if (opt_r) - bpb.res = opt_r; + bpb.bpbResSectors = opt_r; if (opt_n) { if (opt_n > MAXNFT) errx(1, "number of FATs (%u) is too large; maximum is %u", opt_n, MAXNFT); - bpb.nft = opt_n; + bpb.bpbFATs = opt_n; } if (opt_e) - bpb.rde = opt_e; + bpb.bpbRootDirEnts = opt_e; if (mflag) { if (opt_m < 0xf0) errx(1, "illegal media descriptor (%#x)", opt_m); - bpb.mid = opt_m; + bpb.bpbMedia = opt_m; } if (opt_a) - bpb.bspf = opt_a; + bpb.bpbBigFATsecs = opt_a; if (opt_i) - bpb.infs = opt_i; + bpb.bpbFSInfo = opt_i; if (opt_k) - bpb.bkbs = opt_k; + bpb.bpbBackup = opt_k; bss = 1; bname = NULL; fd1 = -1; @@ -488,87 +488,87 @@ main(int argc, char *argv[]) } if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) err(1, "%s", bname); - if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bps || - sb.st_size < bpb.bps || sb.st_size > bpb.bps * MAXU16) + if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || + sb.st_size < bpb.bpbBytesPerSec || sb.st_size > bpb.bpbBytesPerSec * MAXU16) errx(1, "%s: inappropriate file type or format", bname); - bss = sb.st_size / bpb.bps; + bss = sb.st_size / bpb.bpbBytesPerSec; } - if (!bpb.nft) - bpb.nft = 2; + if (!bpb.bpbFATs) + bpb.bpbFATs = 2; if (!fat) { - if (bpb.bsec < (bpb.res ? bpb.res : bss) + - howmany((RESFTE + (bpb.spc ? MINCLS16 : MAXCLS12 + 1)) * - ((bpb.spc ? 16 : 12) / BPN), bpb.bps * NPB) * - bpb.nft + - howmany(bpb.rde ? bpb.rde : DEFRDE, - bpb.bps / sizeof(struct de)) + - (bpb.spc ? MINCLS16 : MAXCLS12 + 1) * - (bpb.spc ? bpb.spc : howmany(DEFBLK, bpb.bps))) + if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) * + ((bpb.bpbSecPerClust ? 16 : 12) / BPN), bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + + howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE, + bpb.bpbBytesPerSec / sizeof(struct de)) + + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) * + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(DEFBLK, bpb.bpbBytesPerSec))) fat = 12; - else if (bpb.rde || bpb.bsec < - (bpb.res ? bpb.res : bss) + - howmany((RESFTE + MAXCLS16) * 2, bpb.bps) * bpb.nft + - howmany(DEFRDE, bpb.bps / sizeof(struct de)) + + else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors < + (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * bpb.bpbFATs + + howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + (MAXCLS16 + 1) * - (bpb.spc ? bpb.spc : howmany(8192, bpb.bps))) + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(8192, bpb.bpbBytesPerSec))) fat = 16; else fat = 32; } x = bss; if (fat == 32) { - if (!bpb.infs) { - if (x == MAXU16 || x == bpb.bkbs) + if (!bpb.bpbFSInfo) { + if (x == MAXU16 || x == bpb.bpbBackup) errx(1, "no room for info sector"); - bpb.infs = x; + bpb.bpbFSInfo = x; } - if (bpb.infs != MAXU16 && x <= bpb.infs) - x = bpb.infs + 1; - if (!bpb.bkbs) { + if (bpb.bpbFSInfo != MAXU16 && x <= bpb.bpbFSInfo) + x = bpb.bpbFSInfo + 1; + if (!bpb.bpbBackup) { if (x == MAXU16) errx(1, "no room for backup sector"); - bpb.bkbs = x; - } else if (bpb.bkbs != MAXU16 && bpb.bkbs == bpb.infs) + bpb.bpbBackup = x; + } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) errx(1, "backup sector would overwrite info sector"); - if (bpb.bkbs != MAXU16 && x <= bpb.bkbs) - x = bpb.bkbs + 1; + if (bpb.bpbBackup != MAXU16 && x <= bpb.bpbBackup) + x = bpb.bpbBackup + 1; } - if (!bpb.res) - bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; - else if (bpb.res < x) - errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); - if (fat != 32 && !bpb.rde) - bpb.rde = DEFRDE; - rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); - if (!bpb.spc) - for (bpb.spc = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bps); - bpb.spc < MAXSPC && - bpb.res + + if (!bpb.bpbResSectors) + bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; + else if (bpb.bpbResSectors < x) + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors); + if (fat != 32 && !bpb.bpbRootDirEnts) + bpb.bpbRootDirEnts = DEFRDE; + rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); + if (!bpb.bpbSecPerClust) + for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bpbBytesPerSec); + bpb.bpbSecPerClust < MAXSPC && + bpb.bpbResSectors + howmany((RESFTE + maxcls(fat)) * (fat / BPN), - bpb.bps * NPB) * bpb.nft + + bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs + rds + - (u_int64_t)(maxcls(fat) + 1) * bpb.spc <= bpb.bsec; - bpb.spc <<= 1); - if (fat != 32 && bpb.bspf > MAXU16) + (u_int64_t)(maxcls(fat) + 1) * bpb.bpbSecPerClust <= bpb.bpbHugeSectors; + bpb.bpbSecPerClust <<= 1); + if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) errx(1, "too many sectors/FAT for FAT12/16"); - x1 = bpb.res + rds; - x = bpb.bspf ? bpb.bspf : 1; - if (x1 + (u_int64_t)x * bpb.nft > bpb.bsec) + x1 = bpb.bpbResSectors + rds; + x = bpb.bpbBigFATsecs ? bpb.bpbBigFATsecs : 1; + if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) errx(1, "meta data exceeds file system size"); - x1 += x * bpb.nft; - x = (u_int64_t)(bpb.bsec - x1) * bpb.bps * NPB / - (bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft); + x1 += x * bpb.bpbFATs; + x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / + (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / BPN * bpb.bpbFATs); x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), - bpb.bps * NPB); - if (!bpb.bspf) { - bpb.bspf = x2; - x1 += (bpb.bspf - 1) * bpb.nft; + bpb.bpbBytesPerSec * NPB); + if (!bpb.bpbBigFATsecs) { + bpb.bpbBigFATsecs = x2; + x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; } - cls = (bpb.bsec - x1) / bpb.spc; - x = (u_int64_t)bpb.bspf * bpb.bps * NPB / (fat / BPN) - RESFTE; + cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust; + x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - RESFTE; if (cls > x) cls = x; - if (bpb.bspf < x2) + if (bpb.bpbBigFATsecs < x2) warnx("warning: sectors/FAT limits file system to %u clusters", cls); if (cls < mincls(fat)) @@ -576,79 +576,79 @@ main(int argc, char *argv[]) mincls(fat)); if (cls > maxcls(fat)) { cls = maxcls(fat); - bpb.bsec = x1 + (cls + 1) * bpb.spc - 1; + bpb.bpbHugeSectors = x1 + (cls + 1) * bpb.bpbSecPerClust - 1; warnx("warning: FAT type limits file system to %u sectors", - bpb.bsec); + bpb.bpbHugeSectors); } printf("%s: %u sector%s in %u FAT%u cluster%s " - "(%u bytes/cluster)\n", fname, cls * bpb.spc, - cls * bpb.spc == 1 ? "" : "s", cls, fat, - cls == 1 ? "" : "s", bpb.bps * bpb.spc); - if (!bpb.mid) - bpb.mid = !bpb.hid ? 0xf0 : 0xf8; + "(%u bytes/cluster)\n", fname, cls * bpb.bpbSecPerClust, + cls * bpb.bpbSecPerClust == 1 ? "" : "s", cls, fat, + cls == 1 ? "" : "s", bpb.bpbBytesPerSec * bpb.bpbSecPerClust); + if (!bpb.bpbMedia) + bpb.bpbMedia = !bpb.bpbHiddenSecs ? 0xf0 : 0xf8; if (fat == 32) - bpb.rdcl = RESFTE; - if (bpb.hid + bpb.bsec <= MAXU16) { - bpb.sec = bpb.bsec; - bpb.bsec = 0; + bpb.bpbRootClust = RESFTE; + if (bpb.bpbHiddenSecs + bpb.bpbHugeSectors <= MAXU16) { + bpb.bpbSectors = bpb.bpbHugeSectors; + bpb.bpbHugeSectors = 0; } if (fat != 32) { - bpb.spf = bpb.bspf; - bpb.bspf = 0; + bpb.bpbFATsecs = bpb.bpbBigFATsecs; + bpb.bpbBigFATsecs = 0; } print_bpb(&bpb); if (!opt_N) { gettimeofday(&tv, NULL); now = tv.tv_sec; tm = localtime(&now); - if (!(img = malloc(bpb.bps))) + if (!(img = malloc(bpb.bpbBytesPerSec))) err(1, NULL); - dir = bpb.res + (bpb.spf ? bpb.spf : bpb.bspf) * bpb.nft; - for (lsn = 0; lsn < dir + (fat == 32 ? bpb.spc : rds); lsn++) { + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; + for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { x = lsn; if (opt_B && - fat == 32 && bpb.bkbs != MAXU16 && - bss <= bpb.bkbs && x >= bpb.bkbs) { - x -= bpb.bkbs; + fat == 32 && bpb.bpbBackup != MAXU16 && + bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { + x -= bpb.bpbBackup; if (!x && lseek(fd1, opt_ofs, SEEK_SET)) err(1, "%s", bname); } if (opt_B && x < bss) { - if ((n = read(fd1, img, bpb.bps)) == -1) + if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", bname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't read sector %u", bname, x); } else - memset(img, 0, bpb.bps); + memset(img, 0, bpb.bpbBytesPerSec); if (!lsn || - (fat == 32 && bpb.bkbs != MAXU16 && lsn == bpb.bkbs)) { + (fat == 32 && bpb.bpbBackup != MAXU16 && lsn == bpb.bpbBackup)) { x1 = sizeof(struct bs); bsbpb = (struct bsbpb *)(img + x1); - mk2(bsbpb->bps, bpb.bps); - mk1(bsbpb->spc, bpb.spc); - mk2(bsbpb->res, bpb.res); - mk1(bsbpb->nft, bpb.nft); - mk2(bsbpb->rde, bpb.rde); - mk2(bsbpb->sec, bpb.sec); - mk1(bsbpb->mid, bpb.mid); - mk2(bsbpb->spf, bpb.spf); - mk2(bsbpb->spt, bpb.spt); - mk2(bsbpb->hds, bpb.hds); - mk4(bsbpb->hid, bpb.hid); - mk4(bsbpb->bsec, bpb.bsec); + mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec); + mk1(bsbpb->bpbSecPerClust, bpb.bpbSecPerClust); + mk2(bsbpb->bpbResSectors, bpb.bpbResSectors); + mk1(bsbpb->bpbFATs, bpb.bpbFATs); + mk2(bsbpb->bpbRootDirEnts, bpb.bpbRootDirEnts); + mk2(bsbpb->bpbSectors, bpb.bpbSectors); + mk1(bsbpb->bpbMedia, bpb.bpbMedia); + mk2(bsbpb->bpbFATsecs, bpb.bpbFATsecs); + mk2(bsbpb->bpbSecPerTrack, bpb.bpbSecPerTrack); + mk2(bsbpb->bpbHeads, bpb.bpbHeads); + mk4(bsbpb->bpbHiddenSecs, bpb.bpbHiddenSecs); + mk4(bsbpb->bpbHugeSectors, bpb.bpbHugeSectors); x1 += sizeof(struct bsbpb); if (fat == 32) { bsxbpb = (struct bsxbpb *)(img + x1); - mk4(bsxbpb->bspf, bpb.bspf); - mk2(bsxbpb->xflg, 0); - mk2(bsxbpb->vers, 0); - mk4(bsxbpb->rdcl, bpb.rdcl); - mk2(bsxbpb->infs, bpb.infs); - mk2(bsxbpb->bkbs, bpb.bkbs); + mk4(bsxbpb->bpbBigFATsecs, bpb.bpbBigFATsecs); + mk2(bsxbpb->bpbExtFlags, 0); + mk2(bsxbpb->bpbFSVers, 0); + mk4(bsxbpb->bpbRootClust, bpb.bpbRootClust); + mk2(bsxbpb->bpbFSInfo, bpb.bpbFSInfo); + mk2(bsxbpb->bpbBackup, bpb.bpbBackup); x1 += sizeof(struct bsxbpb); } bsx = (struct bsx *)(img + x1); - mk1(bsx->sig, 0x29); + mk1(bsx->exBootSignature, 0x29); if (Iflag) x = opt_I; else @@ -659,52 +659,52 @@ main(int argc, char *argv[]) ((u_int)(1900 + tm->tm_year) + ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); - mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); + mk4(bsx->exVolumeID, x); + mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); - setstr(bsx->type, buf, sizeof(bsx->type)); + setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); if (!opt_B) { x1 += sizeof(struct bsx); bs = (struct bs *)img; - mk1(bs->jmp[0], 0xeb); - mk1(bs->jmp[1], x1 - 2); - mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", - sizeof(bs->oem)); + mk1(bs->bsJump[0], 0xeb); + mk1(bs->bsJump[1], x1 - 2); + mk1(bs->bsJump[2], 0x90); + setstr(bs->bsOemName, opt_O ? opt_O : "BSD4.4 ", + sizeof(bs->bsOemName)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); } - } else if (fat == 32 && bpb.infs != MAXU16 && - (lsn == bpb.infs || - (bpb.bkbs != MAXU16 && - lsn == bpb.bkbs + bpb.infs))) { + } else if (fat == 32 && bpb.bpbFSInfo != MAXU16 && + (lsn == bpb.bpbFSInfo || + (bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup + bpb.bpbFSInfo))) { mk4(img, 0x41615252); mk4(img + MINBPS - 28, 0x61417272); mk4(img + MINBPS - 24, 0xffffffff); - mk4(img + MINBPS - 20, bpb.rdcl); + mk4(img + MINBPS - 20, bpb.bpbRootClust); mk2(img + MINBPS - 2, DOSMAGIC); - } else if (lsn >= bpb.res && lsn < dir && - !((lsn - bpb.res) % - (bpb.spf ? bpb.spf : bpb.bspf))) { - mk1(img[0], bpb.mid); + } else if (lsn >= bpb.bpbResSectors && lsn < dir && + !((lsn - bpb.bpbResSectors) % + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs))) { + mk1(img[0], bpb.bpbMedia); for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); } else if (lsn == dir && opt_L) { de = (struct de *)img; - mklabel(de->namext, opt_L); - mk1(de->attr, 050); + mklabel(de->deName, opt_L); + mk1(de->deAttributes, 050); x = (u_int)tm->tm_hour << 11 | (u_int)tm->tm_min << 5 | (u_int)tm->tm_sec >> 1; - mk2(de->time, x); + mk2(de->deMTime, x); x = (u_int)(tm->tm_year - 80) << 9 | (u_int)(tm->tm_mon + 1) << 5 | (u_int)tm->tm_mday; - mk2(de->date, x); + mk2(de->deMDate, x); } - if ((n = write(fd, img, bpb.bps)) == -1) + if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", fname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't write sector %u", fname, lsn); } } @@ -797,18 +797,19 @@ getdiskinfo(int fd, const char *fname, c /* Maybe it's a fixed drive */ if (lp == NULL) { + if (bpb->bpbBytesPerSec) + dlp.d_secsize = bpb->bpbBytesPerSec; if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { - if (bpb->bps == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) errx(1, "Cannot get sector size, %s", strerror(errno)); - /* XXX Should we use bpb->bps if it's set? */ dlp.d_secperunit = ms / dlp.d_secsize; - if (bpb->spt == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { warnx("Cannot get number of sectors per track, %s", strerror(errno)); dlp.d_nsectors = 63; } - if (bpb->hds == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { warnx("Cannot get number of heads, %s", strerror(errno)); if (dlp.d_secperunit <= 63*1*1024) dlp.d_ntracks = 1; @@ -823,16 +824,16 @@ getdiskinfo(int fd, const char *fname, c lp = &dlp; } - if (bpb->bps == 0) - bpb->bps = ckgeom(fname, lp->d_secsize, "bytes/sector"); - if (bpb->spt == 0) - bpb->spt = ckgeom(fname, lp->d_nsectors, "sectors/track"); - if (bpb->hds == 0) - bpb->hds = ckgeom(fname, lp->d_ntracks, "drive heads"); - if (bpb->bsec == 0) - bpb->bsec = lp->d_secperunit; - if (bpb->hid == 0) - bpb->hid = hs; + if (bpb->bpbBytesPerSec == 0) + bpb->bpbBytesPerSec = ckgeom(fname, lp->d_secsize, "bytes/sector"); + if (bpb->bpbSecPerTrack == 0) + bpb->bpbSecPerTrack = ckgeom(fname, lp->d_nsectors, "sectors/track"); + if (bpb->bpbHeads == 0) + bpb->bpbHeads = ckgeom(fname, lp->d_ntracks, "drive heads"); + if (bpb->bpbHugeSectors == 0) + bpb->bpbHugeSectors = lp->d_secperunit; + if (bpb->bpbHiddenSecs == 0) + bpb->bpbHiddenSecs = hs; } /* @@ -841,24 +842,24 @@ getdiskinfo(int fd, const char *fname, c static void print_bpb(struct bpb *bpb) { - printf("bps=%u spc=%u res=%u nft=%u", bpb->bps, bpb->spc, bpb->res, - bpb->nft); - if (bpb->rde) - printf(" rde=%u", bpb->rde); - if (bpb->sec) - printf(" sec=%u", bpb->sec); - printf(" mid=%#x", bpb->mid); - if (bpb->spf) - printf(" spf=%u", bpb->spf); - printf(" spt=%u hds=%u hid=%u", bpb->spt, bpb->hds, bpb->hid); - if (bpb->bsec) - printf(" bsec=%u", bpb->bsec); - if (!bpb->spf) { - printf(" bspf=%u rdcl=%u", bpb->bspf, bpb->rdcl); - printf(" infs="); - printf(bpb->infs == MAXU16 ? "%#x" : "%u", bpb->infs); - printf(" bkbs="); - printf(bpb->bkbs == MAXU16 ? "%#x" : "%u", bpb->bkbs); + printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, + bpb->bpbFATs); + if (bpb->bpbRootDirEnts) + printf(" RootDirEnts=%u", bpb->bpbRootDirEnts); + if (bpb->bpbSectors) + printf(" Sectors=%u", bpb->bpbSectors); + printf(" Media=%#x", bpb->bpbMedia); + if (bpb->bpbFATsecs) + printf(" FATsecs=%u", bpb->bpbFATsecs); + printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, bpb->bpbHeads, bpb->bpbHiddenSecs); + if (bpb->bpbHugeSectors) + printf(" HugeSectors=%u", bpb->bpbHugeSectors); + if (!bpb->bpbFATsecs) { + printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, bpb->bpbRootClust); + printf(" FSInfo="); + printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo); + printf(" Backup="); + printf(bpb->bpbBackup == MAXU16 ? "%#x" : "%u", bpb->bpbBackup); } printf("\n"); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:27:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD653106566C; Sun, 14 Feb 2010 12:27:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD60C8FC12; Sun, 14 Feb 2010 12:27:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECRptW069957; Sun, 14 Feb 2010 12:27:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECRo06069955; Sun, 14 Feb 2010 12:27:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141227.o1ECRo06069955@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203870 - head/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:27:51 -0000 Author: mav Date: Sun Feb 14 12:27:49 2010 New Revision: 203870 URL: http://svn.freebsd.org/changeset/base/203870 Log: MFp4: After last running command completed, give commands in timeout state second time. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sun Feb 14 12:25:39 2010 (r203869) +++ head/sys/dev/siis/siis.c Sun Feb 14 12:27:49 2010 (r203870) @@ -1074,6 +1074,28 @@ siis_process_timeout(device_t dev) } } +/* Must be called with channel locked. */ +static void +siis_rearm_timeout(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + struct siis_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < SIIS_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 1000, + (timeout_t*)siis_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void siis_timeout(struct siis_slot *slot) @@ -1235,8 +1257,9 @@ siis_end_transaction(struct siis_slot *s siis_issue_read_log(dev); } /* If all the reset of commands are in timeout - abort them. */ - } else if ((ch->rslots & ~ch->toslots) == 0) - siis_process_timeout(dev); + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != SIIS_ERR_TIMEOUT) + siis_rearm_timeout(dev); } static void From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:28:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC069106566B; Sun, 14 Feb 2010 12:28:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CACEC8FC12; Sun, 14 Feb 2010 12:28:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECShV7070195; Sun, 14 Feb 2010 12:28:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECShML070187; Sun, 14 Feb 2010 12:28:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141228.o1ECShML070187@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203871 - head/sbin/fsck_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:28:44 -0000 Author: kib Date: Sun Feb 14 12:28:43 2010 New Revision: 203871 URL: http://svn.freebsd.org/changeset/base/203871 Log: License changes from NetBSD. Move to 2 clause license, approved by Wolfgang Solfrank. Submitted by: Pedro F. Giffuni MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c head/sbin/fsck_msdosfs/check.c head/sbin/fsck_msdosfs/dir.c head/sbin/fsck_msdosfs/dosfs.h head/sbin/fsck_msdosfs/ext.h head/sbin/fsck_msdosfs/fat.c head/sbin/fsck_msdosfs/fsck_msdosfs.8 head/sbin/fsck_msdosfs/main.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:28:43 2010 (r203871) @@ -10,13 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/check.c ============================================================================== --- head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:28:43 2010 (r203871) @@ -10,13 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:28:43 2010 (r203871) @@ -12,13 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:28:43 2010 (r203871) @@ -12,13 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/ext.h ============================================================================== --- head/sbin/fsck_msdosfs/ext.h Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/ext.h Sun Feb 14 12:28:43 2010 (r203871) @@ -10,13 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/fat.c ============================================================================== --- head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:28:43 2010 (r203871) @@ -10,13 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/fsck_msdosfs.8 ============================================================================== --- head/sbin/fsck_msdosfs/fsck_msdosfs.8 Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/fsck_msdosfs.8 Sun Feb 14 12:28:43 2010 (r203871) @@ -11,13 +11,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Martin Husemann -.\" and Wolfgang Solfrank. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: head/sbin/fsck_msdosfs/main.c ============================================================================== --- head/sbin/fsck_msdosfs/main.c Sun Feb 14 12:27:49 2010 (r203870) +++ head/sbin/fsck_msdosfs/main.c Sun Feb 14 12:28:43 2010 (r203871) @@ -10,13 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:30:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DA37106566B; Sun, 14 Feb 2010 12:30:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5758FC0C; Sun, 14 Feb 2010 12:30:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECUVKN070634; Sun, 14 Feb 2010 12:30:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECUVPt070627; Sun, 14 Feb 2010 12:30:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141230.o1ECUVPt070627@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203872 - head/sbin/fsck_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:30:31 -0000 Author: kib Date: Sun Feb 14 12:30:30 2010 New Revision: 203872 URL: http://svn.freebsd.org/changeset/base/203872 Log: Bug fixes from NetBSD - fix sign-compare issues. - ANSIfy a couple of functions. - Remove more duplicate #includes. - Memory leak found by Coverity on NetBSD. Submitted by: Pedro F. Giffuni Reviewed by: bde MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c head/sbin/fsck_msdosfs/check.c head/sbin/fsck_msdosfs/dir.c head/sbin/fsck_msdosfs/dosfs.h head/sbin/fsck_msdosfs/ext.h head/sbin/fsck_msdosfs/fat.c head/sbin/fsck_msdosfs/main.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:30:30 2010 (r203872) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include @@ -41,16 +40,15 @@ static const char rcsid[] = #include "fsutil.h" int -readboot(dosfs, boot) - int dosfs; - struct bootblock *boot; +readboot(int dosfs, struct bootblock *boot) { u_char block[DOSBOOTBLOCKSIZE]; u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; + int i; - if (read(dosfs, block, sizeof block) < sizeof block) { + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perror("could not read boot block"); return FSFATAL; } @@ -154,12 +152,22 @@ readboot(dosfs, boot) } backup[65] = block[65]; /* XXX */ if (memcmp(block + 11, backup + 11, 79)) { - /* Correct? XXX */ - pfatal("backup doesn't compare to primary bootblock"); - if (alwaysno) - pfatal("\n"); - else - return FSFATAL; + /* + * XXX We require a reference that explains + * that these bytes need to match, or should + * drop the check. gdt@NetBSD has observed + * filesystems that work fine under Windows XP + * and NetBSD that do not match, so the + * requirement is suspect. For now, just + * print out useful information and continue. + */ + pfatal("backup (block %d) mismatch with primary bootblock:\n", + boot->Backup); + for (i = 11; i < 11 + 90; i++) { + if (block[i] != backup[i]) + pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", + i, block[i], backup[i]); + } } /* Check backup FSInfo? XXX */ } @@ -223,9 +231,7 @@ readboot(dosfs, boot) } int -writefsinfo(dosfs, boot) - int dosfs; - struct bootblock *boot; +writefsinfo(int dosfs, struct bootblock *boot) { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; Modified: head/sbin/fsck_msdosfs/check.c ============================================================================== --- head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:30:30 2010 (r203872) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include @@ -47,7 +46,8 @@ checkfilesys(const char *fname) int dosfs; struct bootblock boot; struct fatEntry *fat = NULL; - int i, finish_dosdirsection=0; + int finish_dosdirsection=0; + u_int i; int mod = 0; int ret = 8; Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:30:30 2010 (r203872) @@ -37,7 +37,6 @@ static const char rcsid[] = #include #include #include -#include #include #include @@ -223,12 +222,24 @@ resetDosDirSection(struct bootblock *boo b1 = boot->RootDirEnts * 32; b2 = boot->SecPerClust * boot->BytesPerSec; - if (!(buffer = malloc(b1 > b2 ? b1 : b2)) - || !(delbuf = malloc(b2)) - || !(rootDir = newDosDirEntry())) { - perror("No space for directory"); + if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { + perror("No space for directory buffer"); return FSFATAL; } + + if ((delbuf = malloc(b2)) == NULL) { + free(buffer); + perror("No space for directory delbuf"); + return FSFATAL; + } + + if ((rootDir = newDosDirEntry()) == NULL) { + free(buffer); + free(delbuf); + perror("No space for directory entry"); + return FSFATAL; + } + memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { @@ -360,7 +371,8 @@ removede(int f, struct bootblock *boot, return FSFATAL; start = buffer; } - if (endcl == curcl) + /* startcl is < CLUST_FIRST for !fat32 root */ + if ((endcl == curcl) || (startcl < CLUST_FIRST)) for (; start < end; start += 32) *start = SLOT_DELETED; return FSDIRMOD; @@ -378,7 +390,7 @@ checksize(struct bootblock *boot, struct /* * Check size on ordinary files */ - int32_t physicalSize; + u_int32_t physicalSize; if (dir->head == CLUST_FREE) physicalSize = 0; @@ -637,7 +649,8 @@ readDosDirSection(int f, struct bootbloc dirent.head |= (p[20] << 16) | (p[21] << 24); dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); if (vallfn) { - strcpy(dirent.lname, longName); + strlcpy(dirent.lname, longName, + sizeof(dirent.lname)); longName[0] = '\0'; shortSum = -1; } @@ -825,6 +838,10 @@ readDosDirSection(int f, struct bootbloc } boot->NumFiles++; } + + if (!(boot->flags & FAT32) && !dir->parent) + break; + if (mod & THISMOD) { last *= 32; if (lseek(f, off, SEEK_SET) != off @@ -840,6 +857,19 @@ readDosDirSection(int f, struct bootbloc invlfn ? invlfn : vallfn, p, invlfn ? invcl : valcl, -1, 0, fullpath(dir), 1); + + /* The root directory of non fat32 filesystems is in a special + * area and may have been modified above without being written out. + */ + if ((mod & FSDIRMOD) && !(boot->flags & FAT32) && !dir->parent) { + last *= 32; + if (lseek(f, off, SEEK_SET) != off + || write(f, buffer, last) != last) { + perror("Unable to write directory"); + return FSFATAL; + } + mod &= ~THISMOD; + } return mod & ~THISMOD; } @@ -929,7 +959,7 @@ reconnect(int dosfs, struct bootblock *b lfoff = lfcl * boot->ClusterSize + boot->ClusterOffset * boot->BytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); return FSFATAL; } @@ -959,7 +989,7 @@ reconnect(int dosfs, struct bootblock *b p[31] = (u_char)(d.size >> 24); fat[head].flags |= FAT_USED; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not write LOST.DIR"); return FSFATAL; } Modified: head/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:30:30 2010 (r203872) @@ -48,8 +48,13 @@ struct bootblock { u_int FATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ u_int Heads; /* number of heads */ - u_int32_t Sectors; /* total number of sectors */ u_int32_t HiddenSecs; /* # of hidden sectors */ + u_int32_t Sectors; /* total number of sectors */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ u_int FSInfo; /* FSInfo sector */ u_int Backup; /* Backup of Bootblocks */ @@ -59,11 +64,6 @@ struct bootblock { /* and some more calculated values */ u_int flags; /* some flags: */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: head/sbin/fsck_msdosfs/ext.h ============================================================================== --- head/sbin/fsck_msdosfs/ext.h Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/ext.h Sun Feb 14 12:30:30 2010 (r203872) @@ -70,12 +70,12 @@ int checkfilesys(const char *); #define FSDIRMOD 2 /* Some directory was modified */ #define FSFATMOD 4 /* The FAT was modified */ #define FSERROR 8 /* Some unrecovered error remains */ -#define FSFATAL 16 /* Some unrecoverable error occured */ +#define FSFATAL 16 /* Some unrecoverable error occurred */ #define FSDIRTY 32 /* File system is dirty */ #define FSFIXFAT 64 /* Fix file system FAT */ /* - * read a boot block in a machine independend fashion and translate + * read a boot block in a machine independent fashion and translate * it into our struct bootblock. */ int readboot(int, struct bootblock *); @@ -89,13 +89,13 @@ int writefsinfo(int, struct bootblock *) * Read one of the FAT copies and return a pointer to the new * allocated array holding our description of it. */ -int readfat(int, struct bootblock *, int, struct fatEntry **); +int readfat(int, struct bootblock *, u_int, struct fatEntry **); /* * Check two FAT copies for consistency and merge changes into the - * first if neccessary. + * first if necessary. */ -int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, int); +int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, u_int); /* * Check a FAT Modified: head/sbin/fsck_msdosfs/fat.c ============================================================================== --- head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:30:30 2010 (r203872) @@ -40,10 +40,10 @@ static const char rcsid[] = #include "ext.h" #include "fsutil.h" -static int checkclnum(struct bootblock *, int, cl_t, cl_t *); -static int clustdiffer(cl_t, cl_t *, cl_t *, int); +static int checkclnum(struct bootblock *, u_int, cl_t, cl_t *); +static int clustdiffer(cl_t, cl_t *, cl_t *, u_int); static int tryclear(struct bootblock *, struct fatEntry *, cl_t, cl_t *); -static int _readfat(int, struct bootblock *, int, u_char **); +static int _readfat(int, struct bootblock *, u_int, u_char **); /*- * The first 2 FAT entries contain pseudo-cluster numbers with the following @@ -128,7 +128,7 @@ err: * Check a cluster number for valid value */ static int -checkclnum(struct bootblock *boot, int fat, cl_t cl, cl_t *next) +checkclnum(struct bootblock *boot, u_int fat, cl_t cl, cl_t *next) { if (*next >= (CLUST_RSRVD&boot->ClustMask)) *next |= ~boot->ClustMask; @@ -159,7 +159,7 @@ checkclnum(struct bootblock *boot, int f * Read a FAT from disk. Returns 1 if successful, 0 otherwise. */ static int -_readfat(int fs, struct bootblock *boot, int no, u_char **buffer) +_readfat(int fs, struct bootblock *boot, u_int no, u_char **buffer) { off_t off; @@ -177,7 +177,7 @@ _readfat(int fs, struct bootblock *boot, goto err; } - if (read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) != boot->FATsecs * boot->BytesPerSec) { perror("Unable to read FAT"); goto err; @@ -194,24 +194,26 @@ _readfat(int fs, struct bootblock *boot, * Read a FAT and decode it into internal format */ int -readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) +readfat(int fs, struct bootblock *boot, u_int no, struct fatEntry **fp) { struct fatEntry *fat; u_char *buffer, *p; cl_t cl; int ret = FSOK; + size_t len; boot->NumFree = boot->NumBad = 0; if (!_readfat(fs, boot, no, &buffer)) return FSFATAL; - fat = calloc(boot->NumClusters, sizeof(struct fatEntry)); + fat = malloc(len = boot->NumClusters * sizeof(struct fatEntry)); if (fat == NULL) { perror("No space for FAT"); free(buffer); return FSFATAL; } + (void)memset(fat, 0, len); if (buffer[0] != boot->Media || buffer[1] != 0xff || buffer[2] != 0xff @@ -304,7 +306,11 @@ readfat(int fs, struct bootblock *boot, } free(buffer); - *fp = fat; + if (ret & FSFATAL) { + free(fat); + *fp = NULL; + } else + *fp = fat; return ret; } @@ -324,7 +330,7 @@ rsrvdcltype(cl_t cl) } static int -clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, int fatnum) +clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, u_int fatnum) { if (*cp1 == CLUST_FREE || *cp1 >= CLUST_RSRVD) { if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { @@ -339,13 +345,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSFATAL; } - pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %d\n", + pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %u\n", cl, rsrvdcltype(*cp1), rsrvdcltype(*cp2), fatnum); if (ask(0, "Use FAT 0's entry")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use FAT %d's entry", fatnum)) { + if (ask(0, "Use FAT %u's entry", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -353,7 +359,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } pwarn("Cluster %u is marked %s in FAT 0, but continues with cluster %u in FAT %d\n", cl, rsrvdcltype(*cp1), *cp2, fatnum); - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -364,7 +370,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp return FSFATAL; } if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { - pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %u\n", cl, *cp1, rsrvdcltype(*cp2), fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; @@ -376,13 +382,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSERROR; } - pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %u\n", cl, *cp1, *cp2, fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -394,8 +400,8 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp * into the first one. */ int -comparefat(struct bootblock *boot, struct fatEntry *first, - struct fatEntry *second, int fatnum) +comparefat(struct bootblock *boot, struct fatEntry *first, + struct fatEntry *second, u_int fatnum) { cl_t cl; int ret = FSOK; @@ -535,8 +541,8 @@ writefat(int fs, struct bootblock *boot, { u_char *buffer, *p; cl_t cl; - int i; - u_int32_t fatsz; + u_int i; + size_t fatsz; off_t off; int ret = FSOK; @@ -626,7 +632,7 @@ writefat(int fs, struct bootblock *boot, off = boot->ResSectors + i * boot->FATsecs; off *= boot->BytesPerSec; if (lseek(fs, off, SEEK_SET) != off - || write(fs, buffer, fatsz) != fatsz) { + || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); ret = FSFATAL; /* Return immediately? XXX */ } @@ -676,17 +682,6 @@ checklost(int dosfs, struct bootblock *b ret = 1; } } - if (boot->NumFree && fat[boot->FSNext].next != CLUST_FREE) { - pwarn("Next free cluster in FSInfo block (%u) not free\n", - boot->FSNext); - if (ask(1, "Fix")) - for (head = CLUST_FIRST; head < boot->NumClusters; head++) - if (fat[head].next == CLUST_FREE) { - boot->FSNext = head; - ret = 1; - break; - } - } if (ret) mod |= writefsinfo(dosfs, boot); } Modified: head/sbin/fsck_msdosfs/main.c ============================================================================== --- head/sbin/fsck_msdosfs/main.c Sun Feb 14 12:28:43 2010 (r203871) +++ head/sbin/fsck_msdosfs/main.c Sun Feb 14 12:30:30 2010 (r203872) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:30:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5331065670; Sun, 14 Feb 2010 12:30:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD2B8FC15; Sun, 14 Feb 2010 12:30:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECUauI070703; Sun, 14 Feb 2010 12:30:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECUa2f070700; Sun, 14 Feb 2010 12:30:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141230.o1ECUa2f070700@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 12:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203873 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:30:36 -0000 Author: mav Date: Sun Feb 14 12:30:35 2010 New Revision: 203873 URL: http://svn.freebsd.org/changeset/base/203873 Log: MFp4: With FBS enabled, we have no idea what command caused timeout. Implement same logic as in siis(4) - wait for other commands complete or timeout and then give some more time. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Feb 14 12:30:30 2010 (r203872) +++ head/sys/dev/ahci/ahci.c Sun Feb 14 12:30:35 2010 (r203873) @@ -1663,6 +1663,45 @@ ahci_execute_transaction(struct ahci_slo return; } +/* Must be called with channel locked. */ +static void +ahci_process_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_TIMEOUT); + } +} + +/* Must be called with channel locked. */ +static void +ahci_rearm_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < ch->numslots; i++) { + struct ahci_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < AHCI_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 2000, + (timeout_t*)ahci_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void ahci_timeout(struct ahci_slot *slot) @@ -1699,7 +1738,6 @@ ahci_timeout(struct ahci_slot *slot) ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR)); - ch->fatalerr = 1; /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; @@ -1711,14 +1749,28 @@ ahci_timeout(struct ahci_slot *slot) } xpt_done(fccb); } - /* Handle command with timeout. */ - ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); - /* Handle the rest of commands. */ - for (i = 0; i < ch->numslots; i++) { - /* Do we have a running request on slot? */ - if (ch->slot[i].state < AHCI_SLOT_RUNNING) - continue; - ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + if (!ch->fbs_enabled) { + /* Without FBS we know real timeout source. */ + ch->fatalerr = 1; + /* Handle command with timeout. */ + ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + } + } else { + /* With FBS we wait for other commands timeout and pray. */ + if (ch->toslots == 0) + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); + if ((ch->rslots & ~ch->toslots) == 0) + ahci_process_timeout(dev); + else + device_printf(dev, " ... waiting for slots %08x\n", + ch->rslots & ~ch->toslots); } } @@ -1815,10 +1867,6 @@ ahci_end_transaction(struct ahci_slot *s ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case AHCI_ERR_TIMEOUT: - /* Do no treat soft-reset timeout as fatal here. */ - if (ccb->ccb_h.func_code != XPT_ATA_IO || - !(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) - ch->fatalerr = 1; if (!ch->readlog) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; @@ -1834,6 +1882,11 @@ ahci_end_transaction(struct ahci_slot *s ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); + if (et != AHCI_ERR_TIMEOUT) { + if (ch->toslots == (1 << slot->slot)) + xpt_release_simq(ch->sim, TRUE); + ch->toslots &= ~(1 << slot->slot); + } slot->state = AHCI_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1873,7 +1926,7 @@ ahci_end_transaction(struct ahci_slot *s /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there was fatal error - reset port. */ - if (ch->fatalerr) { + if (ch->toslots != 0 || ch->fatalerr) { ahci_reset(dev); } else { /* if we have slots in error, we can reinit port. */ @@ -1885,7 +1938,10 @@ ahci_end_transaction(struct ahci_slot *s if (!ch->readlog && ch->numhslots) ahci_issue_read_log(dev); } - } + /* If all the rest of commands are in timeout - give them chance. */ + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != AHCI_ERR_TIMEOUT) + ahci_rearm_timeout(dev); /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3) { callout_schedule(&ch->pm_timer, @@ -2149,7 +2205,10 @@ ahci_reset(device_t dev) ch->hold[i] = NULL; ch->numhslots--; } + if (ch->toslots != 0) + xpt_release_simq(ch->sim, TRUE); ch->eslots = 0; + ch->toslots = 0; ch->fatalerr = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sun Feb 14 12:30:30 2010 (r203872) +++ head/sys/dev/ahci/ahci.h Sun Feb 14 12:30:35 2010 (r203873) @@ -401,6 +401,7 @@ struct ahci_channel { uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ uint32_t eslots; /* Slots in error */ + uint32_t toslots; /* Slots in timeout */ int numrslots; /* Number of running slots */ int numrslotspd[16];/* Number of running slots per dev */ int numtslots; /* Number of tagged slots */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 12:31:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02EFF10656A8; Sun, 14 Feb 2010 12:31:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E58EE8FC32; Sun, 14 Feb 2010 12:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ECVSp9070911; Sun, 14 Feb 2010 12:31:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ECVSdR070905; Sun, 14 Feb 2010 12:31:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141231.o1ECVSdR070905@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 12:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203874 - head/sbin/fsck_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 12:31:29 -0000 Author: kib Date: Sun Feb 14 12:31:28 2010 New Revision: 203874 URL: http://svn.freebsd.org/changeset/base/203874 Log: Rename fields to match better the msdosfs headers. This work is still incomplete as some info doesn't really belong to the structs where it is defined. Submitted by: Pedro F. Giffuni Reviewed by: bde MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c head/sbin/fsck_msdosfs/check.c head/sbin/fsck_msdosfs/dir.c head/sbin/fsck_msdosfs/dosfs.h head/sbin/fsck_msdosfs/fat.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:30:35 2010 (r203873) +++ head/sbin/fsck_msdosfs/boot.c Sun Feb 14 12:31:28 2010 (r203874) @@ -62,22 +62,22 @@ readboot(int dosfs, struct bootblock *bo boot->ValidFat = -1; /* decode bios parameter block */ - boot->BytesPerSec = block[11] + (block[12] << 8); - boot->SecPerClust = block[13]; - boot->ResSectors = block[14] + (block[15] << 8); - boot->FATs = block[16]; - boot->RootDirEnts = block[17] + (block[18] << 8); - boot->Sectors = block[19] + (block[20] << 8); - boot->Media = block[21]; - boot->FATsmall = block[22] + (block[23] << 8); + boot->bpbBytesPerSec = block[11] + (block[12] << 8); + boot->bpbSecPerClust = block[13]; + boot->bpbResSectors = block[14] + (block[15] << 8); + boot->bpbFATs = block[16]; + boot->bpbRootDirEnts = block[17] + (block[18] << 8); + boot->bpbSectors = block[19] + (block[20] << 8); + boot->bpbMedia = block[21]; + boot->bpbFATsmall = block[22] + (block[23] << 8); boot->SecPerTrack = block[24] + (block[25] << 8); - boot->Heads = block[26] + (block[27] << 8); - boot->HiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); - boot->HugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + boot->bpbHeads = block[26] + (block[27] << 8); + boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); + boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); - boot->FATsecs = boot->FATsmall; + boot->FATsecs = boot->bpbFATsmall; - if (!boot->RootDirEnts) + if (!boot->bpbRootDirEnts) boot->flags |= FAT32; if (boot->flags & FAT32) { boot->FATsecs = block[36] + (block[37] << 8) @@ -92,13 +92,13 @@ readboot(int dosfs, struct bootblock *bo block[43], block[42]); return FSFATAL; } - boot->RootCl = block[44] + (block[45] << 8) + boot->bpbRootClust = block[44] + (block[45] << 8) + (block[46] << 16) + (block[47] << 24); - boot->FSInfo = block[48] + (block[49] << 8); - boot->Backup = block[50] + (block[51] << 8); + boot->bpbFSInfo = block[48] + (block[49] << 8); + boot->bpbBackup = block[50] + (block[51] << 8); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); @@ -124,18 +124,18 @@ readboot(int dosfs, struct bootblock *bo fsinfo[0x3fc] = fsinfo[0x3fd] = 0; fsinfo[0x3fe] = 0x55; fsinfo[0x3ff] = 0xaa; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } ret = FSBOOTMOD; } else - boot->FSInfo = 0; + boot->bpbFSInfo = 0; } - if (boot->FSInfo) { + if (boot->bpbFSInfo) { boot->FSFree = fsinfo[0x1e8] + (fsinfo[0x1e9] << 8) + (fsinfo[0x1ea] << 16) + (fsinfo[0x1eb] << 24); @@ -144,8 +144,8 @@ readboot(int dosfs, struct bootblock *bo + (fsinfo[0x1ef] << 24); } - if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET) - != boot->Backup * boot->BytesPerSec + if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { perror("could not read backup bootblock"); return FSFATAL; @@ -162,36 +162,36 @@ readboot(int dosfs, struct bootblock *bo * print out useful information and continue. */ pfatal("backup (block %d) mismatch with primary bootblock:\n", - boot->Backup); + boot->bpbBackup); for (i = 11; i < 11 + 90; i++) { if (block[i] != backup[i]) pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", i, block[i], backup[i]); } } - /* Check backup FSInfo? XXX */ + /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->RootDirEnts * 32 + boot->BytesPerSec - 1) - / boot->BytesPerSec - + boot->ResSectors - + boot->FATs * boot->FATsecs - - CLUST_FIRST * boot->SecPerClust; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) + / boot->bpbBytesPerSec + + boot->bpbResSectors + + boot->bpbFATs * boot->FATsecs + - CLUST_FIRST * boot->bpbSecPerClust; - if (boot->BytesPerSec % DOSBOOTBLOCKSIZE != 0) { - pfatal("Invalid sector size: %u", boot->BytesPerSec); + if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE != 0) { + pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); return FSFATAL; } - if (boot->SecPerClust == 0) { - pfatal("Invalid cluster size: %u", boot->SecPerClust); + if (boot->bpbSecPerClust == 0) { + pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); return FSFATAL; } - if (boot->Sectors) { - boot->HugeSectors = 0; - boot->NumSectors = boot->Sectors; + if (boot->bpbSectors) { + boot->bpbHugeSectors = 0; + boot->NumSectors = boot->bpbSectors; } else - boot->NumSectors = boot->HugeSectors; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->SecPerClust; + boot->NumSectors = boot->bpbHugeSectors; + boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; if (boot->flags&FAT32) boot->ClustMask = CLUST32_MASK; @@ -207,13 +207,13 @@ readboot(int dosfs, struct bootblock *bo switch (boot->ClustMask) { case CLUST32_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 4; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 4; break; case CLUST16_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 2; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 2; break; default: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec * 2) / 3; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec * 2) / 3; break; } @@ -222,7 +222,7 @@ readboot(int dosfs, struct bootblock *bo boot->NumClusters, boot->FATsecs); return FSFATAL; } - boot->ClusterSize = boot->BytesPerSec * boot->SecPerClust; + boot->ClusterSize = boot->bpbBytesPerSec * boot->bpbSecPerClust; boot->NumFiles = 1; boot->NumFree = 0; @@ -235,8 +235,8 @@ writefsinfo(int dosfs, struct bootblock { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); return FSFATAL; @@ -249,11 +249,11 @@ writefsinfo(int dosfs, struct bootblock fsinfo[0x1ed] = (u_char)(boot->FSNext >> 8); fsinfo[0x1ee] = (u_char)(boot->FSNext >> 16); fsinfo[0x1ef] = (u_char)(boot->FSNext >> 24); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } /* Modified: head/sbin/fsck_msdosfs/check.c ============================================================================== --- head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:30:35 2010 (r203873) +++ head/sbin/fsck_msdosfs/check.c Sun Feb 14 12:31:28 2010 (r203874) @@ -98,7 +98,7 @@ checkfilesys(const char *fname) } if (boot.ValidFat < 0) - for (i = 1; i < (int)boot.FATs; i++) { + for (i = 1; i < (int)boot.bpbFATs; i++) { struct fatEntry *currentFat; mod |= readfat(dosfs, &boot, i, ¤tFat); Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:30:35 2010 (r203873) +++ head/sbin/fsck_msdosfs/dir.c Sun Feb 14 12:31:28 2010 (r203874) @@ -219,8 +219,8 @@ resetDosDirSection(struct bootblock *boo cl_t cl; int ret = FSOK; - b1 = boot->RootDirEnts * 32; - b2 = boot->SecPerClust * boot->BytesPerSec; + b1 = boot->bpbRootDirEnts * 32; + b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec; if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { perror("No space for directory buffer"); @@ -242,15 +242,15 @@ resetDosDirSection(struct bootblock *boo memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", - boot->RootCl); + boot->bpbRootClust); return FSFATAL; } - cl = fat[boot->RootCl].next; + cl = fat[boot->bpbRootClust].next; if (cl < CLUST_FIRST || (cl >= CLUST_RSRVD && cl< CLUST_EOFS) - || fat[boot->RootCl].head != boot->RootCl) { + || fat[boot->bpbRootClust].head != boot->bpbRootClust) { if (cl == CLUST_FREE) pwarn("Root directory starts with free cluster\n"); else if (cl >= CLUST_RSRVD) @@ -261,14 +261,14 @@ resetDosDirSection(struct bootblock *boo return FSFATAL; } if (ask(1, "Fix")) { - fat[boot->RootCl].next = CLUST_FREE; + fat[boot->bpbRootClust].next = CLUST_FREE; ret = FSFATMOD; } else ret = FSFATAL; } - fat[boot->RootCl].flags |= FAT_USED; - rootDir->head = boot->RootCl; + fat[boot->bpbRootClust].flags |= FAT_USED; + rootDir->head = boot->bpbRootClust; } return ret; @@ -313,7 +313,7 @@ delete(int f, struct bootblock *boot, st { u_char *s, *e; off_t off; - int clsz = boot->SecPerClust * boot->BytesPerSec; + int clsz = boot->bpbSecPerClust * boot->bpbBytesPerSec; s = delbuf + startoff; e = delbuf + clsz; @@ -323,8 +323,8 @@ delete(int f, struct bootblock *boot, st break; e = delbuf + endoff; } - off = startcl * boot->SecPerClust + boot->ClusterOffset; - off *= boot->BytesPerSec; + off = startcl * boot->bpbSecPerClust + boot->ClusterOffset; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, delbuf, clsz) != clsz) { perror("Unable to read directory"); @@ -461,14 +461,14 @@ readDosDirSection(int f, struct bootbloc vallfn = invlfn = empty = NULL; do { if (!(boot->flags & FAT32) && !dir->parent) { - last = boot->RootDirEnts * 32; - off = boot->ResSectors + boot->FATs * boot->FATsecs; + last = boot->bpbRootDirEnts * 32; + off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; } else { - last = boot->SecPerClust * boot->BytesPerSec; - off = cl * boot->SecPerClust + boot->ClusterOffset; + last = boot->bpbSecPerClust * boot->bpbBytesPerSec; + off = cl * boot->bpbSecPerClust + boot->ClusterOffset; } - off *= boot->BytesPerSec; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, buffer, last) != last) { perror("Unable to read directory"); @@ -957,7 +957,7 @@ reconnect(int dosfs, struct bootblock *b return FSERROR; } lfoff = lfcl * boot->ClusterSize - + boot->ClusterOffset * boot->BytesPerSec; + + boot->ClusterOffset * boot->bpbBytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); Modified: head/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:30:35 2010 (r203873) +++ head/sbin/fsck_msdosfs/dosfs.h Sun Feb 14 12:31:28 2010 (r203874) @@ -39,31 +39,31 @@ typedef u_int32_t cl_t; /* type holding * FAT boot block. */ struct bootblock { - u_int BytesPerSec; /* bytes per sector */ - u_int SecPerClust; /* sectors per cluster */ - u_int ResSectors; /* number of reserved sectors */ - u_int FATs; /* number of FATs */ - u_int RootDirEnts; /* number of root directory entries */ - u_int Media; /* media descriptor */ - u_int FATsmall; /* number of sectors per FAT */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* number of reserved sectors */ + u_int bpbFATs; /* number of bpbFATs */ + u_int bpbRootDirEnts; /* number of root directory entries */ + u_int32_t bpbSectors; /* total number of sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ - u_int Heads; /* number of heads */ - u_int32_t HiddenSecs; /* # of hidden sectors */ - u_int32_t Sectors; /* total number of sectors */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ - u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ - u_int FSInfo; /* FSInfo sector */ - u_int Backup; /* Backup of Bootblocks */ - cl_t RootCl; /* Start of Root Directory */ + u_int bpbHeads; /* number of heads */ + u_int32_t bpbHiddenSecs; /* # of hidden sectors */ + u_int32_t bpbHugeSectors; /* # of sectors if bpbbpbSectors == 0 */ + cl_t bpbRootClust; /* Start of Root Directory */ + u_int bpbFSInfo; /* FSInfo sector */ + u_int bpbBackup; /* Backup of Bootblocks */ cl_t FSFree; /* Number of free clusters acc. FSInfo */ cl_t FSNext; /* Next free cluster acc. FSInfo */ /* and some more calculated values */ u_int flags; /* some flags: */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: head/sbin/fsck_msdosfs/fat.c ============================================================================== --- head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:30:35 2010 (r203873) +++ head/sbin/fsck_msdosfs/fat.c Sun Feb 14 12:31:28 2010 (r203874) @@ -73,10 +73,10 @@ checkdirty(int fs, struct bootblock *boo if (boot->ClustMask != CLUST16_MASK && boot->ClustMask != CLUST32_MASK) return 0; - off = boot->ResSectors; - off *= boot->BytesPerSec; + off = boot->bpbResSectors; + off *= boot->bpbBytesPerSec; - buffer = malloc(boot->BytesPerSec); + buffer = malloc(boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return 1; @@ -87,7 +87,7 @@ checkdirty(int fs, struct bootblock *boo goto err; } - if (read(fs, buffer, boot->BytesPerSec) != boot->BytesPerSec) { + if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -96,7 +96,7 @@ checkdirty(int fs, struct bootblock *boo * If we don't understand the FAT, then the file system must be * assumed to be unclean. */ - if (buffer[0] != boot->Media || buffer[1] != 0xff) + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff) goto err; if (boot->ClustMask == CLUST16_MASK) { if ((buffer[2] & 0xf8) != 0xf8 || (buffer[3] & 0x3f) != 0x3f) @@ -163,22 +163,22 @@ _readfat(int fs, struct bootblock *boot, { off_t off; - *buffer = malloc(boot->FATsecs * boot->BytesPerSec); + *buffer = malloc(boot->FATsecs * boot->bpbBytesPerSec); if (*buffer == NULL) { perror("No space for FAT"); return 0; } - off = boot->ResSectors + no * boot->FATsecs; - off *= boot->BytesPerSec; + off = boot->bpbResSectors + no * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off) { perror("Unable to read FAT"); goto err; } - if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) - != boot->FATsecs * boot->BytesPerSec) { + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->bpbBytesPerSec) + != boot->FATsecs * boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -215,7 +215,7 @@ readfat(int fs, struct bootblock *boot, } (void)memset(fat, 0, len); - if (buffer[0] != boot->Media + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff || buffer[2] != 0xff || (boot->ClustMask == CLUST16_MASK && buffer[3] != 0xff) || (boot->ClustMask == CLUST32_MASK @@ -229,7 +229,7 @@ readfat(int fs, struct bootblock *boot, * file system is dirty if it doesn't reboot cleanly. * Check this special condition before errorring out. */ - if (buffer[0] == boot->Media && buffer[1] == 0xff + if (buffer[0] == boot->bpbMedia && buffer[1] == 0xff && buffer[2] == 0xff && ((boot->ClustMask == CLUST16_MASK && buffer[3] == 0x7f) || (boot->ClustMask == CLUST32_MASK @@ -546,7 +546,7 @@ writefat(int fs, struct bootblock *boot, off_t off; int ret = FSOK; - buffer = malloc(fatsz = boot->FATsecs * boot->BytesPerSec); + buffer = malloc(fatsz = boot->FATsecs * boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return FSFATAL; @@ -555,7 +555,7 @@ writefat(int fs, struct bootblock *boot, boot->NumFree = 0; p = buffer; if (correct_fat) { - *p++ = (u_char)boot->Media; + *p++ = (u_char)boot->bpbMedia; *p++ = 0xff; *p++ = 0xff; switch (boot->ClustMask) { @@ -628,9 +628,9 @@ writefat(int fs, struct bootblock *boot, break; } } - for (i = 0; i < boot->FATs; i++) { - off = boot->ResSectors + i * boot->FATsecs; - off *= boot->BytesPerSec; + for (i = 0; i < boot->bpbFATs; i++) { + off = boot->bpbResSectors + i * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); @@ -672,7 +672,7 @@ checklost(int dosfs, struct bootblock *b } finishlf(); - if (boot->FSInfo) { + if (boot->bpbFSInfo) { ret = 0; if (boot->FSFree != boot->NumFree) { pwarn("Free space in FSInfo block (%d) not correct (%d)\n", From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 13:59:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC9C106566C; Sun, 14 Feb 2010 13:59:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA39C8FC13; Sun, 14 Feb 2010 13:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EDx13d090186; Sun, 14 Feb 2010 13:59:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EDx16a090185; Sun, 14 Feb 2010 13:59:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002141359.o1EDx16a090185@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Feb 2010 13:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203875 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 13:59:01 -0000 Author: kib Date: Sun Feb 14 13:59:01 2010 New Revision: 203875 URL: http://svn.freebsd.org/changeset/base/203875 Log: Do not leak process lock when current thread is not allowed to see target. Bumped into by: ed MFC after: 3 days Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Feb 14 12:31:28 2010 (r203874) +++ head/sys/kern/kern_event.c Sun Feb 14 13:59:01 2010 (r203875) @@ -349,8 +349,10 @@ filt_procattach(struct knote *kn) if (p == NULL) return (ESRCH); - if ((error = p_cansee(curthread, p))) + if ((error = p_cansee(curthread, p))) { + PROC_UNLOCK(p); return (error); + } kn->kn_ptr.p_proc = p; kn->kn_flags |= EV_CLEAR; /* automatically set */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 15:51:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA276106566C; Sun, 14 Feb 2010 15:51:36 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EC768FC0A; Sun, 14 Feb 2010 15:51:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EFpasq014964; Sun, 14 Feb 2010 15:51:36 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EFpa18014962; Sun, 14 Feb 2010 15:51:36 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002141551.o1EFpa18014962@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 14 Feb 2010 15:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203876 - head/release/picobsd/tinyware/login X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 15:51:36 -0000 Author: luigi Date: Sun Feb 14 15:51:36 2010 New Revision: 203876 URL: http://svn.freebsd.org/changeset/base/203876 Log: a minimal set of changes to adapt to the utmp->utmpx changes. lastlog still not implemented, i am hoping that Ed or someone has some idea on how to fix this, but it is really not important. Modified: head/release/picobsd/tinyware/login/pico-login.c Modified: head/release/picobsd/tinyware/login/pico-login.c ============================================================================== --- head/release/picobsd/tinyware/login/pico-login.c Sun Feb 14 13:59:01 2010 (r203875) +++ head/release/picobsd/tinyware/login/pico-login.c Sun Feb 14 15:51:36 2010 (r203876) @@ -76,7 +76,7 @@ static const char rcsid[] = #include #include #include -#include +#include #ifdef USE_PAM #include @@ -119,7 +119,6 @@ static char **environ_pam; #endif static int auth_traditional(void); -extern void login(struct utmp *); static void usage(void); #define TTYGRPNAME "tty" /* name of group to own ttys */ @@ -152,7 +151,7 @@ main(argc, argv) struct group *gr; struct stat st; struct timeval tp; - struct utmp utmp; + struct utmpx utmp; int rootok, retries, backoff; int ask, ch, cnt, fflag, hflag, pflag, quietlog, rootlogin, rval; int changepass; @@ -164,6 +163,8 @@ main(argc, argv) char tname[sizeof(_PATH_TTY) + 10]; const char *shell = NULL; login_cap_t *lc = NULL; + int UT_HOSTSIZE = sizeof(utmp.ut_host); + int UT_NAMESIZE = sizeof(utmp.ut_user); #ifdef USE_PAM pid_t pid; int e; @@ -508,14 +509,18 @@ main(argc, argv) refused("Permission denied", "ACCESS", 1); #endif /* LOGIN_ACCESS */ +#if 1 + ulog_login(tty, username, hostname); +#else /* Nothing else left to fail -- really log in. */ memset((void *)&utmp, 0, sizeof(utmp)); - (void)time(&utmp.ut_time); - (void)strncpy(utmp.ut_name, username, sizeof(utmp.ut_name)); + (void)gettimeofday(&utmp.ut_tv, NULL); + (void)strncpy(utmp.ut_user, username, sizeof(utmp.ut_user)); if (hostname) (void)strncpy(utmp.ut_host, hostname, sizeof(utmp.ut_host)); (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line)); login(&utmp); +#endif dolastlog(quietlog); @@ -903,7 +908,7 @@ usage() * Allow for authentication style and/or kerberos instance */ -#define NBUFSIZ UT_NAMESIZE + 64 +#define NBUFSIZ 128 // XXX was UT_NAMESIZE + 64 void getloginname() @@ -985,6 +990,7 @@ void dolastlog(quiet) int quiet; { +#if 0 /* XXX not implemented after utmp->utmpx change */ struct lastlog ll; int fd; @@ -1016,6 +1022,7 @@ dolastlog(quiet) } else { syslog(LOG_ERR, "cannot open %s: %m", _PATH_LASTLOG); } +#endif } void From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 15:55:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D7A01065670; Sun, 14 Feb 2010 15:55:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56D538FC12; Sun, 14 Feb 2010 15:55:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EFtUZs015868; Sun, 14 Feb 2010 15:55:30 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EFtUEx015866; Sun, 14 Feb 2010 15:55:30 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002141555.o1EFtUEx015866@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 14 Feb 2010 15:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203877 - head/release/picobsd/build X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 15:55:30 -0000 Author: luigi Date: Sun Feb 14 15:55:30 2010 New Revision: 203877 URL: http://svn.freebsd.org/changeset/base/203877 Log: use log instead of logverbose in three places so the build won't need input to run to completion MFC after: 3 days Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Sun Feb 14 15:51:36 2010 (r203876) +++ head/release/picobsd/build/picobsd Sun Feb 14 15:55:30 2010 (r203877) @@ -889,7 +889,7 @@ fill_floppy_image() { if [ ${mfs_start} -gt 0 -a ${mfs_size} -ge ${imgsize} ] ; then mfs_ofs=$((${mfs_start} + 8192)) log "Preload kernel with file ${c_fs} at ${mfs_ofs}" - logverbose "`ls -l ${c_fs}` to fit in ${mfs_size}" + log "`ls -l ${c_fs}` to fit in ${mfs_size}" dd if=${c_fs} ibs=8192 iseek=1 of=kernel obs=${mfs_ofs} \ oseek=1 conv=notrunc # 2> /dev/null else @@ -944,7 +944,7 @@ fill_floppy_image() { ls -l ${c_img} ${c_label} -f `pwd`/${c_img} - logverbose "after disklabel" + log "after disklabel" ) echo "BUILDDIR ${BUILDDIR}" @@ -958,7 +958,7 @@ fill_floppy_image() { dd if=${b2} iseek=1 ibs=276 2> /dev/null | \ dd of=${BUILDDIR}/${c_img} oseek=1 obs=788 conv=notrunc 2>/dev/null - logverbose "done floppy image" + log "done disk image" # XXX (log "Fixing permissions"; cd ${dst}; chown -R root *) rm -rf ${BUILDDIR}/floppy.tree || true # cleanup # df -ik ${dst} | colrm 70 > .build.reply From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 16:26:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61EDD106566B; Sun, 14 Feb 2010 16:26:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7E08FC16; Sun, 14 Feb 2010 16:26:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EGQWtc022949; Sun, 14 Feb 2010 16:26:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EGQWcf022941; Sun, 14 Feb 2010 16:26:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002141626.o1EGQWcf022941@svn.freebsd.org> From: Rui Paulo Date: Sun, 14 Feb 2010 16:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203882 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 16:26:32 -0000 Author: rpaulo Date: Sun Feb 14 16:26:32 2010 New Revision: 203882 URL: http://svn.freebsd.org/changeset/base/203882 Log: Revert part of the 9285 support because it breaks the 9280 support. I'll try to do the 9285 support without interfering with any other chipset revisions support. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c head/sys/dev/ath/ath_hal/ar5416/ar9280.c head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Feb 14 16:26:32 2010 (r203882) @@ -352,7 +352,7 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s } ar5416AniSetup(ah); /* Anti Noise Immunity */ - ar5416InitNfHistBuff(ah, AH5416(ah)->ah_cal.nfCalHist); + ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist); HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Feb 14 16:26:32 2010 (r203882) @@ -172,53 +172,8 @@ ar5416InitCal(struct ath_hal *ah, const ichan = ath_hal_checkchannel(ah, chan); HALASSERT(ichan != AH_NULL); - if (AR_SREV_KITE_12_OR_LATER(ah)) { - OS_REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE); - if (IEEE80211_IS_CHAN_HT20(chan)) { - OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, - AR_PHY_CL_CAL_ENABLE); - OS_REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, - AR_PHY_PARALLEL_CAL_ENABLE); - OS_REG_SET_BIT(ah, AR_PHY_TURBO, AR_PHY_FC_DYN2040_EN); - OS_REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_FLTR_CAL); - OS_REG_CLR_BIT(ah, AR_PHY_TPCRG1, - AR_PHY_TPCRG1_PD_CAL_ENABLE); - OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_CAL); - /* Poll for offset calibration complete */ - if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_CAL, 0)) { - HALDEBUG(ah, HAL_DEBUG_ANY, - "%s: HT offset calibration failed to " - "complete in 1ms; noisy environment?\n", - __func__); - return AH_FALSE; - } - OS_REG_CLR_BIT(ah, AR_PHY_TURBO, AR_PHY_FC_DYN2040_EN); - OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, - AR_PHY_PARALLEL_CAL_ENABLE); - } - OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE); - OS_REG_CLR_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC); - OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_FLTR_CAL); - OS_REG_SET_BIT(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_CAL_ENABLE); - OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); - /* Poll for offset calibration complete */ - if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_CAL, 0)) { - HALDEBUG(ah, HAL_DEBUG_ANY, - "%s: offset calibration did not complete in 1ms; " - "noisy environment?\n", __func__); - return AH_FALSE; - } - OS_REG_SET_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC); - OS_REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE); - OS_REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_FLTR_CAL); - } else if (AR_SREV_MERLIN_10_OR_LATER(ah)) { + if (AR_SREV_MERLIN_10_OR_LATER(ah)) { /* Enable Rx Filter Cal */ OS_REG_CLR_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC); OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, @@ -251,10 +206,9 @@ ar5416InitCal(struct ath_hal *ah, const OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); /* Poll for offset calibration complete */ - if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL, - AR_PHY_AGC_CONTROL_CAL, 0)) { + if (!ath_hal_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, 0)) { HALDEBUG(ah, HAL_DEBUG_ANY, - "%s: AGC offset calibration did not complete in 1ms; " + "%s: offset calibration did not complete in 1ms; " "noisy environment?\n", __func__); return AH_FALSE; } @@ -612,15 +566,9 @@ ar5416LoadNF(struct ath_hal *ah, const s } void -ar5416InitNfHistBuff(struct ath_hal *ah, struct ar5212NfCalHist *h) +ar5416InitNfHistBuff(struct ar5212NfCalHist *h) { int i, j; - int16_t privNF; - - if (AR_SREV_KITE(ah)) - privNF = AR9285_CCA_MAX_GOOD_VALUE; - else - privNF = AR5416_CCA_MAX_GOOD_VALUE; for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) { h[i].currIndex = 0; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Sun Feb 14 16:26:32 2010 (r203882) @@ -116,5 +116,5 @@ void ar5416AdcGainCalCollect(struct ath_ void ar5416AdcGainCalibration(struct ath_hal *ah, uint8_t numChains); void ar5416AdcDcCalCollect(struct ath_hal *ah); void ar5416AdcDcCalibration(struct ath_hal *ah, uint8_t numChains); -void ar5416InitNfHistBuff(struct ath_hal *ah, struct ar5212NfCalHist *h); +void ar5416InitNfHistBuff(struct ar5212NfCalHist *h); #endif /* _ATH_AR5416_CAL_H_ */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Feb 14 16:26:32 2010 (r203882) @@ -23,7 +23,6 @@ #include "ah_devid.h" #include "ah_eeprom_v14.h" -#include "ah_eeprom_v4k.h" #include "ar5416/ar5416.h" #include "ar5416/ar5416reg.h" @@ -60,17 +59,15 @@ static void ar5416InitPLL(struct ath_hal static HAL_BOOL ar5416SetBoardValues(struct ath_hal *, const struct ieee80211_channel *); static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, - struct ar5416eeprom_4k *pEepData4k, const struct ieee80211_channel *chan, int16_t *ratesArray, uint16_t cfgCtl, uint16_t AntennaReduction, uint16_t twiceMaxRegulatoryPower, uint16_t powerLimit); static HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, - struct ar5416eeprom_4k *pEepData4k, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset); -static uint16_t ar5416GetMaxEdgePower(struct ath_hal *ah, uint16_t freq, +static uint16_t ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz); static void ar5416GetTargetPowers(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_TARGET_POWER_HT *powInfo, @@ -86,7 +83,6 @@ static int16_t interpolate(uint16_t targ static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan); static void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet, - CAL_DATA_PER_FREQ_4K *pRawDataSet4k, uint8_t * bChans, uint16_t availPiers, uint16_t tPdGainOverlap, int16_t *pMinCalPower, uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues, @@ -481,12 +477,7 @@ ar5416InitDMA(struct ath_hal *ah) * reduce the number of usable entries in PCU TXBUF to avoid * wrap around. */ - if (AR_SREV_KITE(ah)) - OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL, - AR_9285_PCU_TXBUF_CTRL_USABLE_SIZE); - else - OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL, - AR_PCU_TXBUF_CTRL_USABLE_SIZE); + OS_REG_WRITE(ah, AR_PCU_TXBUF_CTRL, AR_PCU_TXBUF_CTRL_USABLE_SIZE); } static void @@ -810,7 +801,6 @@ ar5416SetTransmitPower(struct ath_hal *a #define N(a) (sizeof (a) / sizeof (a[0])) MODAL_EEP_HEADER *pModal; - MODAL_EEP4K_HEADER *pModal4k; struct ath_hal_5212 *ahp = AH5212(ah); int16_t ratesArray[Ar5416RateSize]; int16_t txPowerIndexOffset = 0; @@ -822,10 +812,8 @@ ar5416SetTransmitPower(struct ath_hal *a uint16_t twiceAntennaReduction; uint16_t twiceMaxRegulatoryPower; int16_t maxPower; - HAL_EEPROM_v14 *ee; - HAL_EEPROM_v4k *ee4k; - struct ar5416eeprom *pEepData; - struct ar5416eeprom_4k *pEepData4k; + HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom; + struct ar5416eeprom *pEepData = &ee->ee_base; HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); @@ -835,32 +823,15 @@ ar5416SetTransmitPower(struct ath_hal *a powerLimit = chan->ic_maxregpower * 2; twiceAntennaReduction = chan->ic_maxantgain; twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)->ah_powerLimit); - if (AR_SREV_KITE(ah)) { - ee4k = AH_PRIVATE(ah)->ah_eeprom; - pEepData4k = &ee4k->ee_base; - pModal4k = &pEepData4k->modalHeader; - ee = NULL; - pEepData = NULL; - pModal = NULL; - } else { - ee = AH_PRIVATE(ah)->ah_eeprom; - pEepData = &ee->ee_base; - pModal = &pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)]; - ee4k = NULL; - pEepData4k = NULL; - pModal4k = NULL; - } + pModal = &pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)]; HALDEBUG(ah, HAL_DEBUG_RESET, "%s Channel=%u CfgCtl=%u\n", __func__,chan->ic_freq, cfgCtl ); if (IS_EEP_MINOR_V2(ah)) { - if (pModal) - ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; - else - ht40PowerIncForPdadc = pModal4k->ht40PowerIncForPdadc; + ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; } - - if (!ar5416SetPowerPerRateTable(ah, pEepData, pEepData4k, chan, + + if (!ar5416SetPowerPerRateTable(ah, pEepData, chan, &ratesArray[0],cfgCtl, twiceAntennaReduction, twiceMaxRegulatoryPower, powerLimit)) { @@ -869,8 +840,7 @@ ar5416SetTransmitPower(struct ath_hal *a return AH_FALSE; } - if (!ar5416SetPowerCalTable(ah, pEepData, pEepData4k, chan, - &txPowerIndexOffset)) { + if (!ar5416SetPowerCalTable(ah, pEepData, chan, &txPowerIndexOffset)) { HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unable to set power table\n", __func__); return AH_FALSE; @@ -898,8 +868,6 @@ ar5416SetTransmitPower(struct ath_hal *a ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); if (ratesArray[i] > AR5416_MAX_RATE_POWER) ratesArray[i] = AR5416_MAX_RATE_POWER; - if (AR_SREV_MERLIN_10_OR_LATER(ah)) - ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2; } #ifdef AH_EEPROM_DUMP @@ -979,11 +947,10 @@ ar5416SetTransmitPower(struct ath_hal *a } /* Write the Power subtraction for dynamic chain changing, for per-packet powertx */ - if (pModal) - OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB, - POW_SM(pModal->pwrDecreaseFor3Chain, 6) - | POW_SM(pModal->pwrDecreaseFor2Chain, 0) - ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB, + POW_SM(pModal->pwrDecreaseFor3Chain, 6) + | POW_SM(pModal->pwrDecreaseFor2Chain, 0) + ); return AH_TRUE; #undef POW_SM #undef N @@ -1221,43 +1188,24 @@ ar5416InitPLL(struct ath_hal *ah, const static HAL_BOOL ar5416SetBoardValues(struct ath_hal *ah, const struct ieee80211_channel *chan) { - const HAL_EEPROM_v14 *ee; - const HAL_EEPROM_v4k *ee4k; - const struct ar5416eeprom *eep; - const struct ar5416eeprom_4k *eep4k; + const HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom; + const struct ar5416eeprom *eep = &ee->ee_base; const MODAL_EEP_HEADER *pModal; - const MODAL_EEP4K_HEADER *pModal4k; - int i, regChainOffset = 0; + int i, regChainOffset; uint8_t txRxAttenLocal; /* workaround for eeprom versions <= 14.2 */ HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); - - if (AR_SREV_KITE(ah)) { - ee4k = AH_PRIVATE(ah)->ah_eeprom; - eep4k = &ee4k->ee_base; - pModal4k = &eep4k->modalHeader; - ee = NULL; - eep = NULL; - pModal = NULL; - } else { - ee = AH_PRIVATE(ah)->ah_eeprom; - eep = &ee->ee_base; - pModal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)]; - ee4k = NULL; - eep4k = NULL; - pModal4k = NULL; - } + pModal = &eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)]; /* NB: workaround for eeprom versions <= 14.2 */ txRxAttenLocal = IEEE80211_IS_CHAN_2GHZ(chan) ? 23 : 44; - OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, - (pModal) ? pModal->antCtrlCommon : - pModal4k->antCtrlCommon); + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon); for (i = 0; i < AR5416_MAX_CHAINS; i++) { -// if (AR_SREV_KITE(ah) && i >= 2) break; - if (AR_SREV_MERLIN(ah) && i >= 2) break; - if (AR_SREV_OWL_20_OR_LATER(ah) && + if (AR_SREV_MERLIN(ah)) { + if (i >= 2) break; + } + if (AR_SREV_OWL_20_OR_LATER(ah) && (AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5) && i != 0) { /* Regs are swapped from chain 2 to 1 for 5416 2_0 with @@ -1268,15 +1216,12 @@ ar5416SetBoardValues(struct ath_hal *ah, regChainOffset = i * 0x1000; } - OS_REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, - (pModal) ? pModal->antCtrlChain[i] : pModal4k->antCtrlChain[i]); + OS_REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, pModal->antCtrlChain[i]); OS_REG_WRITE(ah, AR_PHY_TIMING_CTRL4 + regChainOffset, (OS_REG_READ(ah, AR_PHY_TIMING_CTRL4 + regChainOffset) & ~(AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF | AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF)) | - SM((pModal) ? pModal->iqCalICh[i] : pModal4k->iqCalICh[i], - AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) | - SM((pModal) ? pModal->iqCalQCh[i] : pModal4k->iqCalQCh[i], - AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF)); + SM(pModal->iqCalICh[i], AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) | + SM(pModal->iqCalQCh[i], AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF)); /* * Large signal upgrade. @@ -1284,82 +1229,54 @@ ar5416SetBoardValues(struct ath_hal *ah, */ if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) { - int txRxAtten; - if (IS_EEP_MINOR_V3(ah)) { - if (pModal) txRxAtten = pModal->txRxAttenCh[i]; - else txRxAtten = pModal4k->txRxAttenCh[i]; - } else - txRxAtten = txRxAttenLocal; - - if (AR_SREV_MERLIN_10_OR_LATER(ah)) { - OS_REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset, - AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAtten); - OS_REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset, - AR9280_PHY_RXGAIN_TXRX_MARGIN, - (pModal) ? pModal->rxTxMarginCh[i] : pModal4k->rxTxMarginCh[i]); - } else { - OS_REG_WRITE(ah, AR_PHY_RXGAIN + regChainOffset, - (OS_REG_READ(ah, AR_PHY_RXGAIN + regChainOffset) & ~AR_PHY_RXGAIN_TXRX_ATTEN) | - SM(txRxAtten, AR_PHY_RXGAIN_TXRX_ATTEN)); - - OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & ~AR_PHY_GAIN_2GHZ_RXTX_MARGIN) | - SM((pModal) ? pModal->rxTxMarginCh[i]: - pModal4k->rxTxMarginCh[i], - AR_PHY_GAIN_2GHZ_RXTX_MARGIN)); - } + OS_REG_WRITE(ah, AR_PHY_RXGAIN + regChainOffset, + (OS_REG_READ(ah, AR_PHY_RXGAIN + regChainOffset) & ~AR_PHY_RXGAIN_TXRX_ATTEN) | + SM(IS_EEP_MINOR_V3(ah) ? pModal->txRxAttenCh[i] : txRxAttenLocal, + AR_PHY_RXGAIN_TXRX_ATTEN)); + + OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset, + (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & ~AR_PHY_GAIN_2GHZ_RXTX_MARGIN) | + SM(pModal->rxTxMarginCh[i], AR_PHY_GAIN_2GHZ_RXTX_MARGIN)); } } - OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, - (pModal) ? pModal->switchSettling : pModal4k->switchSettling); - OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, - (pModal) ? pModal->adcDesiredSize : pModal4k->adcDesiredSize); - OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_PGA, - (pModal) ? pModal->pgaDesiredSize : pModal4k->pgaDesiredSize); + OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, pModal->switchSettling); + OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, pModal->adcDesiredSize); + OS_REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_PGA, pModal->pgaDesiredSize); OS_REG_WRITE(ah, AR_PHY_RF_CTL4, - SM((pModal) ? pModal->txEndToXpaOff : pModal4k->txEndToXpaOff, - AR_PHY_RF_CTL4_TX_END_XPAA_OFF) - | SM((pModal) ? pModal->txEndToXpaOff : pModal4k->txEndToXpaOff, - AR_PHY_RF_CTL4_TX_END_XPAB_OFF) - | SM((pModal) ? pModal->txFrameToXpaOn : pModal4k->txFrameToXpaOn, - AR_PHY_RF_CTL4_FRAME_XPAA_ON) - | SM((pModal) ? pModal->txFrameToXpaOn : pModal4k->txFrameToXpaOn, - AR_PHY_RF_CTL4_FRAME_XPAB_ON)); + SM(pModal->txEndToXpaOff, AR_PHY_RF_CTL4_TX_END_XPAA_OFF) + | SM(pModal->txEndToXpaOff, AR_PHY_RF_CTL4_TX_END_XPAB_OFF) + | SM(pModal->txFrameToXpaOn, AR_PHY_RF_CTL4_FRAME_XPAA_ON) + | SM(pModal->txFrameToXpaOn, AR_PHY_RF_CTL4_FRAME_XPAB_ON)); - OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_A2_RX_ON, - (pModal) ? pModal->txEndToRxOn : pModal4k->txEndToRxOn); + OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_A2_RX_ON, pModal->txEndToRxOn); if (AR_SREV_MERLIN_10_OR_LATER(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_CCA, AR9280_PHY_CCA_THRESH62, - (pModal) ? pModal->thresh62 : pModal4k->thresh62); + pModal->thresh62); OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, - (pModal) ? pModal->thresh62 : pModal4k->thresh62); + pModal->thresh62); } else { OS_REG_RMW_FIELD(ah, AR_PHY_CCA, AR_PHY_CCA_THRESH62, - (pModal) ? pModal->thresh62 : pModal4k->thresh62); + pModal->thresh62); OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA_THRESH62, - (pModal) ? pModal->thresh62 : pModal4k->thresh62); + pModal->thresh62); } /* Minor Version Specific application */ if (IS_EEP_MINOR_V2(ah)) { - OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_FRAME_TO_DATA_START, - (pModal) ? pModal->txFrameToDataStart : pModal4k->txFrameToDataStart); - OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_FRAME_TO_PA_ON, - (pModal) ? pModal->txFrameToPaOn : pModal4k->txFrameToPaOn); + OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_FRAME_TO_DATA_START, pModal->txFrameToDataStart); + OS_REG_RMW_FIELD(ah, AR_PHY_RF_CTL2, AR_PHY_TX_FRAME_TO_PA_ON, pModal->txFrameToPaOn); } if (IS_EEP_MINOR_V3(ah)) { if (IEEE80211_IS_CHAN_HT40(chan)) { /* Overwrite switch settling with HT40 value */ - OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, - (pModal) ? pModal->swSettleHt40 : pModal4k->swSettleHt40); + OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, pModal->swSettleHt40); } if ((AR_SREV_OWL_20_OR_LATER(ah)) && ( AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5)){ - /* NB: no v4k EEPROM */ /* Reg Offsets are swapped for logical mapping */ OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) | SM(pModal->bswMargin[2], AR_PHY_GAIN_2GHZ_BSW_MARGIN)); @@ -1370,38 +1287,17 @@ ar5416SetBoardValues(struct ath_hal *ah, OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x2000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x2000) & ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) | SM(pModal->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN)); } else { - if (AR_SREV_MERLIN_10_OR_LATER(ah)) { - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, - (pModal) ? pModal->bswMargin[i] : pModal4k->bswMargin[i]); - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - AR_PHY_GAIN_2GHZ_XATTEN1_DB, - (pModal) ? pModal->bswAtten[i] : pModal4k->bswAtten[i]); - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN, - (pModal) ? pModal->xatten2Margin[i] : pModal4k->xatten2Margin[i]); - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - AR_PHY_GAIN_2GHZ_XATTEN2_DB, - (pModal) ? pModal->xatten2Db[i] : pModal4k->xatten2Db[i]); - } else { OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) | - SM((pModal) ? pModal->bswMargin[1] : - pModal4k->bswMargin[1], AR_PHY_GAIN_2GHZ_BSW_MARGIN)); + SM(pModal->bswMargin[1], AR_PHY_GAIN_2GHZ_BSW_MARGIN)); OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x1000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x1000) & ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) | - SM((pModal) ? pModal->bswAtten[1] : - pModal4k->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN)); + SM(pModal->bswAtten[1], AR_PHY_GAIN_2GHZ_BSW_ATTEN)); OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x2000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x2000) & ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) | - SM((pModal) ? pModal->bswMargin[2] : - pModal4k->bswMargin[2], AR_PHY_GAIN_2GHZ_BSW_MARGIN)); + SM(pModal->bswMargin[2],AR_PHY_GAIN_2GHZ_BSW_MARGIN)); OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + 0x2000, (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + 0x2000) & ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) | - SM((pModal) ? pModal->bswAtten[2] : - pModal4k->bswAtten[2], AR_PHY_GAIN_2GHZ_BSW_ATTEN)); - } - } - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_MARGIN, - (pModal) ? pModal->bswMargin[0] : pModal4k->bswMargin[0]); - OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN, - (pModal) ? pModal->bswAtten[0] : pModal4k->bswAtten[0]); + SM(pModal->bswAtten[2], AR_PHY_GAIN_2GHZ_BSW_ATTEN)); + } + OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_MARGIN, pModal->bswMargin[0]); + OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN, pModal->bswAtten[0]); } return AH_TRUE; } @@ -1416,9 +1312,8 @@ ar5416SetBoardValues(struct ath_hal *ah, * Sets the transmit power in the baseband for the given * operating channel and mode. */ -HAL_BOOL +static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, - struct ar5416eeprom_4k *pEepData4k, const struct ieee80211_channel *chan, int16_t *ratesArray, uint16_t cfgCtl, uint16_t AntennaReduction, @@ -1436,7 +1331,6 @@ ar5416SetPowerPerRateTable(struct ath_ha int i; int16_t twiceLargestAntenna; CAL_CTL_DATA *rep; - CAL_CTL_DATA_4K *rep4k; CAL_TARGET_POWER_LEG targetPowerOfdm, targetPowerCck = {0, {0, 0, 0, 0}}; CAL_TARGET_POWER_LEG targetPowerOfdmExt = {0, {0, 0, 0, 0}}, targetPowerCckExt = {0, {0, 0, 0, 0}}; CAL_TARGET_POWER_HT targetPowerHt20, targetPowerHt40 = {0, {0, 0, 0, 0}}; @@ -1453,19 +1347,15 @@ ar5416SetPowerPerRateTable(struct ath_ha const uint16_t *pCtlMode; uint16_t numCtlModes, ctlMode, freq; CHAN_CENTERS centers; - int n2gcck, n2g20, n2g40, numctls; ar5416GetChannelCenters(ah, chan, ¢ers); /* Compute TxPower reduction due to Antenna Gain */ - if (pEepData) - twiceLargestAntenna = AH_MAX(AH_MAX( - pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[0], - pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[1]), - pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[2]); - else - twiceLargestAntenna = pEepData4k->modalHeader.antennaGainCh[0]; + twiceLargestAntenna = AH_MAX(AH_MAX( + pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[0], + pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[1]), + pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].antennaGainCh[2]); #if 0 /* Turn it back on if we need to calculate per chain antenna gain reduction */ /* Use only if the expected gain > 6dbi */ @@ -1500,12 +1390,10 @@ ar5416SetPowerPerRateTable(struct ath_ha case 1: break; case 2: - if (pEepData) - scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor2Chain; + scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor2Chain; break; case 3: - if (pEepData) - scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor3Chain; + scaledPower -= pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pwrDecreaseFor3Chain; break; default: return AH_FALSE; /* Unsupported number of chains */ @@ -1513,56 +1401,36 @@ ar5416SetPowerPerRateTable(struct ath_ha scaledPower = AH_MAX(0, scaledPower); - n2gcck = (pEepData) ? AR5416_NUM_2G_CCK_TARGET_POWERS : - AR5416_4K_NUM_2G_CCK_TARGET_POWERS; - n2g20 = (pEepData) ? AR5416_NUM_2G_20_TARGET_POWERS : - AR5416_4K_NUM_2G_20_TARGET_POWERS; - n2g40 = (pEepData) ? AR5416_NUM_2G_40_TARGET_POWERS : - AR5416_4K_NUM_2G_40_TARGET_POWERS; - /* Get target powers from EEPROM - our baseline for TX Power */ if (IEEE80211_IS_CHAN_2GHZ(chan)) { /* Setup for CTL modes */ numCtlModes = N(ctlModesFor11g) - SUB_NUM_CTL_MODES_AT_2G_40; /* CTL_11B, CTL_11G, CTL_2GHT20 */ pCtlMode = ctlModesFor11g; - ar5416GetTargetPowersLeg(ah, chan, - (pEepData) ? pEepData->calTargetPowerCck : - pEepData4k->calTargetPowerCck, - n2gcck, &targetPowerCck, 4, AH_FALSE); - ar5416GetTargetPowersLeg(ah, chan, - (pEepData) ? pEepData->calTargetPower2G : - pEepData4k->calTargetPower2G, - n2g20, &targetPowerOfdm, 4, AH_FALSE); - ar5416GetTargetPowers(ah, chan, - (pEepData) ? pEepData->calTargetPower2GHT20 : - pEepData4k->calTargetPower2GHT20, - n2g20, &targetPowerHt20, 8, AH_FALSE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPowerCck, + AR5416_NUM_2G_CCK_TARGET_POWERS, &targetPowerCck, 4, AH_FALSE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower2G, + AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerOfdm, 4, AH_FALSE); + ar5416GetTargetPowers(ah, chan, pEepData->calTargetPower2GHT20, + AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerHt20, 8, AH_FALSE); if (IEEE80211_IS_CHAN_HT40(chan)) { numCtlModes = N(ctlModesFor11g); /* All 2G CTL's */ - ar5416GetTargetPowers(ah, chan, - (pEepData) ? pEepData->calTargetPower2GHT40 : - pEepData4k->calTargetPower2GHT40, - n2g40, &targetPowerHt40, 8, AH_TRUE); + ar5416GetTargetPowers(ah, chan, pEepData->calTargetPower2GHT40, + AR5416_NUM_2G_40_TARGET_POWERS, &targetPowerHt40, 8, AH_TRUE); /* Get target powers for extension channels */ - ar5416GetTargetPowersLeg(ah, chan, - (pEepData) ? pEepData->calTargetPowerCck : - pEepData4k->calTargetPowerCck, - n2gcck, &targetPowerCckExt, 4, AH_TRUE); - ar5416GetTargetPowersLeg(ah, chan, - (pEepData) ? pEepData->calTargetPower2G : - pEepData4k->calTargetPower2G, - n2g20, &targetPowerOfdmExt, 4, AH_TRUE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPowerCck, + AR5416_NUM_2G_CCK_TARGET_POWERS, &targetPowerCckExt, 4, AH_TRUE); + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower2G, + AR5416_NUM_2G_20_TARGET_POWERS, &targetPowerOfdmExt, 4, AH_TRUE); } } else { /* Setup for CTL modes */ numCtlModes = N(ctlModesFor11a) - SUB_NUM_CTL_MODES_AT_5G_40; /* CTL_11A, CTL_5GHT20 */ pCtlMode = ctlModesFor11a; - /* NB: v4k EEPROM has no 5Ghz info */ - ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower5G, + ar5416GetTargetPowersLeg(ah, chan, pEepData->calTargetPower5G, AR5416_NUM_5G_20_TARGET_POWERS, &targetPowerOfdm, 4, AH_FALSE); ar5416GetTargetPowers(ah, chan, pEepData->calTargetPower5GHT20, AR5416_NUM_5G_20_TARGET_POWERS, &targetPowerHt20, 8, AH_FALSE); @@ -1586,9 +1454,7 @@ ar5416SetPowerPerRateTable(struct ath_ha * The ctl value is encoded as [7:4] == test group, [3:0] == test mode. * */ - numctls = (pEepData) ? AR5416_NUM_CTLS : AR5416_4K_NUM_CTLS; for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) { - int ctlIndex; HAL_BOOL isHt40CtlMode = (pCtlMode[ctlMode] == CTL_5GHT40) || (pCtlMode[ctlMode] == CTL_2GHT40); if (isHt40CtlMode) { @@ -1600,33 +1466,17 @@ ar5416SetPowerPerRateTable(struct ath_ha } /* walk through each CTL index stored in EEPROM */ - for (i = 0; i < numctls; i++) { + for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) { uint16_t twiceMinEdgePower; - CAL_CTL_EDGES *ctlEdge; - - ctlIndex = (pEepData) ? pEepData->ctlIndex[i] : - pEepData4k->ctlIndex[i]; - if (!ctlIndex) - break; /* compare test group from regulatory channel list with test mode from pCtlMode list */ - if ((((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == ctlIndex) || + if ((((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == pEepData->ctlIndex[i]) || (((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == - ((ctlIndex & CTL_MODE_M) | SD_NO_CTL))) { - if (pEepData) { - rep = &(pEepData->ctlData[i]); - ctlEdge = rep->ctlEdges[ - owl_get_ntxchains( - AH5416(ah)->ah_tx_chainmask) - 1]; - } else { - rep4k = &(pEepData4k->ctlData[i]); - ctlEdge = rep4k->ctlEdges[ - owl_get_ntxchains( - AH5416(ah)->ah_tx_chainmask) - 1]; - } - twiceMinEdgePower = ar5416GetMaxEdgePower(ah, - freq, ctlEdge, - IEEE80211_IS_CHAN_2GHZ(chan)); + ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))) { + rep = &(pEepData->ctlData[i]); + twiceMinEdgePower = ar5416GetMaxEdgePower(freq, + rep->ctlEdges[owl_get_ntxchains(AH5416(ah)->ah_tx_chainmask) - 1], + IEEE80211_IS_CHAN_2GHZ(chan)); if ((cfgCtl & ~CTL_MODE_M) == SD_NO_CTL) { /* Find the minimum of all CTL edge powers that apply to this channel */ twiceMaxEdgePower = AH_MIN(twiceMaxEdgePower, twiceMinEdgePower); @@ -1740,19 +1590,13 @@ fbin2freq(uint8_t fbin, HAL_BOOL is2GHz) * Find the maximum conformance test limit for the given channel and CTL info */ static uint16_t -ar5416GetMaxEdgePower(struct ath_hal *ah, - uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz) +ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz) { uint16_t twiceMaxEdgePower = AR5416_MAX_RATE_POWER; - int i, numBand; - - if (AR_SREV_KITE(ah)) - numBand = AR5416_4K_NUM_BAND_EDGES; - else - numBand = AR5416_NUM_BAND_EDGES; + int i; /* Get the edge power */ - for (i = 0; (i < numBand) && (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED) ; i++) { + for (i = 0; (i < AR5416_NUM_BAND_EDGES) && (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED) ; i++) { /* * If there's an exact channel match or an inband flag set * on the lower channel use the given rdEdgePower @@ -1899,13 +1743,11 @@ ar5416GetTargetPowersLeg(struct ath_hal * points as well as from the nearest pier(s) to get a power detector * linear voltage to power level table. */ -HAL_BOOL +static HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, - struct ar5416eeprom_4k *pEepData4k, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset) { - CAL_DATA_PER_FREQ *pRawDataset = NULL; - CAL_DATA_PER_FREQ_4K *pRawDataset4k = NULL; + CAL_DATA_PER_FREQ *pRawDataset; uint8_t *pCalBChans = AH_NULL; uint16_t pdGainOverlap_t2; static uint8_t pdadcValues[AR5416_NUM_PDADC_VALUES]; @@ -1918,28 +1760,17 @@ ar5416SetPowerCalTable(struct ath_hal *a OS_MEMZERO(xpdGainValues, sizeof(xpdGainValues)); - if (pEepData) - xpdMask = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].xpdGain; - else - xpdMask = pEepData4k->modalHeader.xpdGain; + xpdMask = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].xpdGain; if (IS_EEP_MINOR_V2(ah)) { - if (pEepData) - pdGainOverlap_t2 = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pdGainOverlap; - else - pdGainOverlap_t2 = pEepData4k->modalHeader.pdGainOverlap; + pdGainOverlap_t2 = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].pdGainOverlap; } else { pdGainOverlap_t2 = (uint16_t)(MS(OS_REG_READ(ah, AR_PHY_TPCRG5), AR_PHY_TPCRG5_PD_GAIN_OVERLAP)); } if (IEEE80211_IS_CHAN_2GHZ(chan)) { - if (pEepData) { - pCalBChans = pEepData->calFreqPier2G; - numPiers = AR5416_NUM_2G_CAL_PIERS; - } else { - pCalBChans = pEepData4k->calFreqPier2G; - numPiers = AR5416_4K_NUM_2G_CAL_PIERS; - } + pCalBChans = pEepData->calFreqPier2G; + numPiers = AR5416_NUM_2G_CAL_PIERS; } else { pCalBChans = pEepData->calFreqPier5G; numPiers = AR5416_NUM_5G_CAL_PIERS; @@ -1965,7 +1796,7 @@ ar5416SetPowerCalTable(struct ath_hal *a SM(xpdGainValues[1], AR_PHY_TPCRG1_PD_GAIN_2) | SM(xpdGainValues[2], AR_PHY_TPCRG1_PD_GAIN_3)); for (i = 0; i < AR5416_MAX_CHAINS; i++) { -// if (AR_SREV_KITE(ah) && i >= AR5416_4K_MAX_CHAINS) break; + if (AR_SREV_OWL_20_OR_LATER(ah) && ( AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5) && (i != 0)) { /* Regs are swapped from chain 2 to 1 for 5416 2_0 with @@ -1976,22 +1807,14 @@ ar5416SetPowerCalTable(struct ath_hal *a regChainOffset = i * 0x1000; } - int txMask; - txMask = (pEepData) ? pEepData->baseEepHeader.txMask : - pEepData4k->baseEepHeader.txMask; - - if (txMask & (1 << i)) { + if (pEepData->baseEepHeader.txMask & (1 << i)) { if (IEEE80211_IS_CHAN_2GHZ(chan)) { - if (pEepData) - pRawDataset = pEepData->calPierData2G[i]; - else - pRawDataset4k = pEepData4k->calPierData2G[i]; + pRawDataset = pEepData->calPierData2G[i]; } else { pRawDataset = pEepData->calPierData5G[i]; } - ar5416GetGainBoundariesAndPdadcs(ah, chan, pRawDataset, - pRawDataset4k, + ar5416GetGainBoundariesAndPdadcs(ah, chan, pRawDataset, pCalBChans, numPiers, pdGainOverlap_t2, &tMinCalPower, gainBoundaries, @@ -2003,6 +1826,7 @@ ar5416SetPowerCalTable(struct ath_hal *a * negative or greater than 0. Need to offset the power * values by the amount of minPower for griffin */ + OS_REG_WRITE(ah, AR_PHY_TPCRG5 + regChainOffset, SM(pdGainOverlap_t2, AR_PHY_TPCRG5_PD_GAIN_OVERLAP) | SM(gainBoundaries[0], AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1) | @@ -2048,10 +1872,8 @@ static void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet, - CAL_DATA_PER_FREQ_4K *pRawDataSet4k, uint8_t * bChans, uint16_t availPiers, - uint16_t tPdGainOverlap, int16_t *pMinCalPower, - uint16_t * pPdGainBoundaries, + uint16_t tPdGainOverlap, int16_t *pMinCalPower, uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues, uint16_t numXpdGains) { @@ -2094,35 +1916,17 @@ ar5416GetGainBoundariesAndPdadcs(struct if (match) { /* Directly fill both vpd tables from the matching index */ for (i = 0; i < numXpdGains; i++) { - if (pRawDataSet) { - minPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][0]; - maxPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][4]; - ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i], - pRawDataSet[idxL].pwrPdg[i], - pRawDataSet[idxL].vpdPdg[i], - AR5416_PD_GAIN_ICEPTS, vpdTableI[i]); - } else { - minPwrT4[i] = pRawDataSet4k[idxL].pwrPdg[i][0]; - maxPwrT4[i] = pRawDataSet4k[idxL].pwrPdg[i][4]; - ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i], - pRawDataSet4k[idxL].pwrPdg[i], - pRawDataSet4k[idxL].vpdPdg[i], - AR5416_PD_GAIN_ICEPTS, vpdTableI[i]); - } + minPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][0]; + maxPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][4]; + ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i], pRawDataSet[idxL].pwrPdg[i], + pRawDataSet[idxL].vpdPdg[i], AR5416_PD_GAIN_ICEPTS, vpdTableI[i]); } } else { for (i = 0; i < numXpdGains; i++) { - if (pRawDataSet) { - pVpdL = pRawDataSet[idxL].vpdPdg[i]; - pPwrL = pRawDataSet[idxL].pwrPdg[i]; - pVpdR = pRawDataSet[idxR].vpdPdg[i]; - pPwrR = pRawDataSet[idxR].pwrPdg[i]; - } else { - pVpdL = pRawDataSet4k[idxL].vpdPdg[i]; - pPwrL = pRawDataSet4k[idxL].pwrPdg[i]; - pVpdR = pRawDataSet4k[idxR].vpdPdg[i]; - pPwrR = pRawDataSet4k[idxR].pwrPdg[i]; - } + pVpdL = pRawDataSet[idxL].vpdPdg[i]; + pPwrL = pRawDataSet[idxL].pwrPdg[i]; + pVpdR = pRawDataSet[idxR].vpdPdg[i]; + pPwrR = pRawDataSet[idxR].pwrPdg[i]; /* Start Vpd interpolation from the max of the minimum powers */ minPwrT4[i] = AH_MAX(pPwrL[0], pPwrR[0]); @@ -2170,10 +1974,7 @@ ar5416GetGainBoundariesAndPdadcs(struct /* Find starting index for this pdGain */ if (i == 0) { - if (AR_SREV_MERLIN_10_OR_LATER(ah)) - ss = (int16_t)(0 - (minPwrT4[i] / 2)); - else - ss = 0; /* for the first pdGain, start from index 0 */ + ss = 0; /* for the first pdGain, start from index 0 */ } else { /* need overlap entries extrapolated below. */ ss = (int16_t)((pPdGainBoundaries[i-1] - (minPwrT4[i] / 2)) - tPdGainOverlap + 1 + minDelta); @@ -2189,7 +1990,7 @@ ar5416GetGainBoundariesAndPdadcs(struct ss++; } - sizeCurrVpdTable = (uint8_t)((maxPwrT4[i] - minPwrT4[i]) / 2 + 1); + sizeCurrVpdTable = (uint8_t)((maxPwrT4[i] - minPwrT4[i]) / 2 +1); tgtIndex = (uint8_t)(pPdGainBoundaries[i] + tPdGainOverlap - (minPwrT4[i] / 2)); maxIndex = (tgtIndex < sizeCurrVpdTable) ? tgtIndex : sizeCurrVpdTable; @@ -2338,20 +2139,13 @@ ar5416Set11nRegs(struct ath_hal *ah, con { uint32_t phymode; HAL_HT_MACMODE macmode; /* MAC - 20/40 mode */ - uint32_t dacFifo; if (!IEEE80211_IS_CHAN_HT(chan)) return; - if (AR_SREV_KITE_10_OR_LATER(ah)) - dacFifo = OS_REG_READ(ah, AR_PHY_TURBO) - & AR_PHY_FC_ENABLE_DAC_FIFO; - else - dacFifo = 0; - /* Enable 11n HT, 20 MHz */ phymode = AR_PHY_FC_HT_EN | AR_PHY_FC_SHORT_GI_40 - | AR_PHY_FC_SINGLE_HT_LTF1 | AR_PHY_FC_WALSH | dacFifo; + | AR_PHY_FC_SINGLE_HT_LTF1 | AR_PHY_FC_WALSH; /* Configure baseband for dynamic 20/40 operation */ if (IEEE80211_IS_CHAN_HT40(chan)) { Modified: head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Sun Feb 14 16:26:32 2010 (r203882) @@ -249,7 +249,7 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode); ar9160AniSetup(ah); /* Anti Noise Immunity */ - ar5416InitNfHistBuff(ah, AH5416(ah)->ah_cal.nfCalHist); + ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist); HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__); Modified: head/sys/dev/ath/ath_hal/ar5416/ar9280.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9280.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar9280.c Sun Feb 14 16:26:32 2010 (r203882) @@ -277,15 +277,12 @@ ar9280GetNoiseFloor(struct ath_hal *ah, "NF calibrated [ctl] [chain 0] is %d\n", nf); nfarray[0] = nf; - if (!AR_SREV_KITE(ah)) { - nf = MS(OS_REG_READ(ah, AR_PHY_CH1_CCA), - AR9280_PHY_CH1_MINCCA_PWR); - if (nf & 0x100) - nf = 0 - ((nf ^ 0x1ff) + 1); - HALDEBUG(ah, HAL_DEBUG_NFCAL, - "NF calibrated [ctl] [chain 1] is %d\n", nf); - nfarray[1] = nf; - } + nf = MS(OS_REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ctl] [chain 1] is %d\n", nf); + nfarray[1] = nf; nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR); if (nf & 0x100) @@ -294,15 +291,12 @@ ar9280GetNoiseFloor(struct ath_hal *ah, "NF calibrated [ext] [chain 0] is %d\n", nf); nfarray[3] = nf; - if (AR_SREV_KITE(ah)) { - nf = MS(OS_REG_READ(ah, AR_PHY_CH1_EXT_CCA), - AR9280_PHY_CH1_EXT_MINCCA_PWR); - if (nf & 0x100) + nf = MS(OS_REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR); + if (nf & 0x100) nf = 0 - ((nf ^ 0x1ff) + 1); - HALDEBUG(ah, HAL_DEBUG_NFCAL, - "NF calibrated [ext] [chain 1] is %d\n", nf); - nfarray[4] = nf; - } + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ext] [chain 1] is %d\n", nf); + nfarray[4] = nf; } /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Sun Feb 14 16:24:10 2010 (r203881) +++ head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Sun Feb 14 16:26:32 2010 (r203882) @@ -23,7 +23,6 @@ #include "ah_devid.h" #include "ah_eeprom_v14.h" /* XXX for tx/rx gain */ -#include "ah_eeprom_v4k.h" #include "ar5416/ar9280.h" #include "ar5416/ar5416reg.h" @@ -31,9 +30,6 @@ #include "ar5416/ar9280v1.ini" #include "ar5416/ar9280v2.ini" -#include "ar5416/ar9285.ini" -#include "ar5416/ar9285v2.ini" - static const HAL_PERCAL_DATA ar9280_iq_cal = { /* single sample */ .calName = "IQ", .calType = IQ_MISMATCH_CAL, @@ -123,10 +119,6 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s AH5416(ah)->ah_writeIni = ar9280WriteIni; AH5416(ah)->ah_rx_chainmask = AR9280_DEFAULT_RXCHAINMASK; AH5416(ah)->ah_tx_chainmask = AR9280_DEFAULT_TXCHAINMASK; - if (AR_SREV_KITE(ah)) { - AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; - AH5416(ah)->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; - } if (!ar5416SetResetReg(ah, HAL_RESET_POWER_ON)) { /* reset chip */ @@ -155,18 +147,7 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s AH_PRIVATE(ah)->ah_ispcie = (val & AR_XSREV_TYPE_HOST_MODE) == 0; /* setup common ini data; rf backends handle remainder */ - /* XXX power consumption higer if clkreq is on */ - if (AR_SREV_KITE_12_OR_LATER(ah)) { - HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes_v2, 6); - HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common_v2, 2); - HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, - ar9285PciePhy_clkreq_always_on_L1_v2, 2); - } else if (AR_SREV_KITE_10_OR_LATER(ah)) { - HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes, 6); - HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common, 2); - HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, - ar9285PciePhy_clkreq_always_on_L1, 2); - } else if (AR_SREV_MERLIN_20_OR_LATER(ah)) { + if (AR_SREV_MERLIN_20_OR_LATER(ah)) { HAL_INI_INIT(&ahp->ah_ini_modes, ar9280Modes_v2, 6); HAL_INI_INIT(&ahp->ah_ini_common, ar9280Common_v2, 2); HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, @@ -181,10 +162,7 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s } ar5416AttachPCIE(ah); - if (devid == AR9285_DEVID_PCIE) - ecode = ath_hal_v4kEepromAttach(ah); - else - ecode = ath_hal_v14EepromAttach(ah); + ecode = ath_hal_v14EepromAttach(ah); if (ecode != HAL_OK) goto bad; @@ -257,19 +235,7 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s goto bad; /* XXX ? try to continue */ } } - - if (AR_SREV_KITE_12_OR_LATER(ah)) { - switch (ath_hal_eepromGet(ah, AR_EEP_TXGAIN_TYPE, AH_NULL)) { - case AR5416_EEP_TXGAIN_HIGH_POWER: - HAL_INI_INIT(&ahp9280->ah_ini_txgain, - ar9285Modes_high_power_tx_gain_v2, 6); - break; - default: - HAL_INI_INIT(&ahp9280->ah_ini_txgain, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 16:56:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDD6F106566B; Sun, 14 Feb 2010 16:56:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AACAD8FC13; Sun, 14 Feb 2010 16:56:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EGuOg5029528; Sun, 14 Feb 2010 16:56:24 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EGuOpw029514; Sun, 14 Feb 2010 16:56:24 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002141656.o1EGuOpw029514@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 14 Feb 2010 16:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203883 - in head/sys/ia64: acpica ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 16:56:24 -0000 Author: marcel Date: Sun Feb 14 16:56:24 2010 New Revision: 203883 URL: http://svn.freebsd.org/changeset/base/203883 Log: Some code churn: o Eliminate IA64_PHYS_TO_RR6 and change all places where the macro is used by calling either bus_space_map() or pmap_mapdev(). o Implement bus_space_map() in terms of pmap_mapdev() and implement bus_space_unmap() in terms of pmap_unmapdev(). o Have ia64_pib hold the uncached virtual address of the processor interrupt block throughout the kernel's life and access the elements of the PIB through this structure pointer. This is a non-functional change with the exception of using ia64_ld1() and ia64_st8() to write to the PIB. We were still using assignments, for which the compiler generates semaphore reads -- which cause undefined behaviour for uncacheable memory. Note also that the memory barriers in ipi_send() are critical for proper functioning. With all the mapping of uncached memory done by pmap_mapdev(), we can keep track of the translations and wire them in the CPU. This then eliminates the need to reserve a whole region for uncached I/O and it eliminates translation traps for device I/O accesses. Modified: head/sys/ia64/acpica/madt.c head/sys/ia64/ia64/bus_machdep.c head/sys/ia64/ia64/efi.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/ia64/pmap.c head/sys/ia64/ia64/sapic.c head/sys/ia64/include/bus.h head/sys/ia64/include/intr.h head/sys/ia64/include/md_var.h head/sys/ia64/include/pmap.h head/sys/ia64/include/vmparam.h Modified: head/sys/ia64/acpica/madt.c ============================================================================== --- head/sys/ia64/acpica/madt.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/acpica/madt.c Sun Feb 14 16:56:24 2010 (r203883) @@ -31,8 +31,6 @@ #include -extern u_int64_t ia64_lapic_address; - struct sapic *sapic_create(int, int, u_int64_t); static void @@ -150,7 +148,7 @@ ia64_probe_sapics(void) /* Save the address of the processor interrupt block. */ if (bootverbose) printf("\tLocal APIC address=0x%x\n", table->Address); - ia64_lapic_address = table->Address; + ia64_lapic_addr = table->Address; end = (char *)table + table->Header.Length; p = (char *)(table + 1); @@ -172,7 +170,7 @@ ia64_probe_sapics(void) case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: { ACPI_MADT_LOCAL_APIC_OVERRIDE *lapic = (ACPI_MADT_LOCAL_APIC_OVERRIDE *)entry; - ia64_lapic_address = lapic->Address; + ia64_lapic_addr = lapic->Address; break; } Modified: head/sys/ia64/ia64/bus_machdep.c ============================================================================== --- head/sys/ia64/ia64/bus_machdep.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/bus_machdep.c Sun Feb 14 16:56:24 2010 (r203883) @@ -29,12 +29,33 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include extern u_long ia64_port_base; #define __PIO_ADDR(port) \ (void *)(ia64_port_base | (((port) & 0xfffc) << 10) | ((port) & 0xFFF)) +int +bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size, + int flags __unused, bus_space_handle_t *bshp) +{ + + *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? addr : (uintptr_t)pmap_mapdev(addr, size); + return (0); +} + + +void +bus_space_unmap(bus_space_tag_t bst __unused, bus_space_handle_t bsh, + bus_size_t size) +{ + + pmap_unmapdev(bsh, size); +} + uint8_t bus_space_read_io_1(u_long port) { Modified: head/sys/ia64/ia64/efi.c ============================================================================== --- head/sys/ia64/ia64/efi.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/efi.c Sun Feb 14 16:56:24 2010 (r203883) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include extern uint64_t ia64_call_efi_physical(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); @@ -123,8 +125,8 @@ efi_boot_minimal(uint64_t systbl) md->md_virt = (void *)IA64_PHYS_TO_RR7(md->md_phys); else if (md->md_attr & EFI_MD_ATTR_UC) - md->md_virt = - (void *)IA64_PHYS_TO_RR6(md->md_phys); + md->md_virt = pmap_mapdev(md->md_phys, + md->md_pages * EFI_PAGE_SIZE); } md = efi_md_next(md); } Modified: head/sys/ia64/ia64/interrupt.c ============================================================================== --- head/sys/ia64/ia64/interrupt.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/interrupt.c Sun Feb 14 16:56:24 2010 (r203883) @@ -106,7 +106,6 @@ void interrupt(struct trapframe *tf) { struct thread *td; - volatile struct ia64_interrupt_block *ib = IA64_INTERRUPT_BLOCK; uint64_t adj, clk, itc; int64_t delta; u_int vector; @@ -128,7 +127,7 @@ interrupt(struct trapframe *tf) */ if (vector == 0) { PCPU_INC(md.stats.pcs_nextints); - inta = ib->ib_inta; + inta = ia64_ld1(&ia64_pib->ib_inta); if (inta == 15) { PCPU_INC(md.stats.pcs_nstrays); __asm __volatile("mov cr.eoi = r0;; srlz.d"); Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/machdep.c Sun Feb 14 16:56:24 2010 (r203883) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,10 @@ struct fpswa_iface *fpswa_iface; u_int64_t ia64_pal_base; u_int64_t ia64_port_base; +u_int64_t ia64_lapic_addr = PAL_PIB_DEFAULT_ADDR; + +struct ia64_pib *ia64_pib; + static int ia64_sync_icache_needed; char machine[] = MACHINE; @@ -308,6 +313,8 @@ cpu_startup(void *dummy) * information. */ ia64_probe_sapics(); + ia64_pib = pmap_mapdev(ia64_lapic_addr, sizeof(*ia64_pib)); + ia64_mca_init(); /* @@ -677,7 +684,8 @@ ia64_init(void) for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) { switch (md->md_type) { case EFI_MD_TYPE_IOPORT: - ia64_port_base = IA64_PHYS_TO_RR6(md->md_phys); + ia64_port_base = (uintptr_t)pmap_mapdev(md->md_phys, + md->md_pages * EFI_PAGE_SIZE); break; case EFI_MD_TYPE_PALCODE: ia64_pal_base = md->md_phys; Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/mp_machdep.c Sun Feb 14 16:56:24 2010 (r203883) @@ -68,8 +68,9 @@ MALLOC_DEFINE(M_SMP, "SMP", "SMP related void ia64_ap_startup(void); -#define LID_SAPIC_ID(x) ((int)((x) >> 24) & 0xff) -#define LID_SAPIC_EID(x) ((int)((x) >> 16) & 0xff) +#define LID_SAPIC(x) ((u_int)((x) >> 16)) +#define LID_SAPIC_ID(x) ((u_int)((x) >> 24) & 0xff) +#define LID_SAPIC_EID(x) ((u_int)((x) >> 16) & 0xff) #define LID_SAPIC_SET(id,eid) (((id & 0xff) << 8 | (eid & 0xff)) << 16); #define LID_SAPIC_MASK 0xffff0000UL @@ -114,7 +115,6 @@ ia64_store_mca_state(void* arg) void ia64_ap_startup(void) { - volatile struct ia64_interrupt_block *ib = IA64_INTERRUPT_BLOCK; uint64_t vhpt; int vector; @@ -153,7 +153,7 @@ ia64_ap_startup(void) while (vector != 15) { ia64_srlz_d(); if (vector == 0) - vector = (int)ib->ib_inta; + vector = (int)ia64_ld1(&ia64_pib->ib_inta); ia64_set_eoi(0); ia64_srlz_d(); vector = ia64_get_ivr(); @@ -363,16 +363,18 @@ ipi_all_but_self(int ipi) void ipi_send(struct pcpu *cpu, int ipi) { - volatile uint64_t *pipi; - uint64_t vector; + u_int lid; + uint8_t vector; - pipi = (void *)IA64_PHYS_TO_RR6(ia64_lapic_address | - ((cpu->pc_md.lid & LID_SAPIC_MASK) >> 12)); - vector = (uint64_t)(ipi_vector[ipi] & 0xff); + lid = LID_SAPIC(cpu->pc_md.lid); + vector = ipi_vector[ipi]; KASSERT(vector != 0, ("IPI %d is not assigned a vector", ipi)); - *pipi = vector; - CTR3(KTR_SMP, "ipi_send(%p, %ld), cpuid=%d", pipi, vector, - PCPU_GET(cpuid)); + + ia64_mf(); + ia64_st8(&(ia64_pib->ib_ipi[lid][0]), vector); + ia64_mf_a(); + CTR4(KTR_SMP, "ipi_send(%p, %ld): cpuid=%d, vector=%u", cpu, ipi, + PCPU_GET(cpuid), vector); } SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/pmap.c Sun Feb 14 16:56:24 2010 (r203883) @@ -2145,9 +2145,12 @@ pmap_remove_write(vm_page_t m) * NOT real memory. */ void * -pmap_mapdev(vm_offset_t pa, vm_size_t size) +pmap_mapdev(vm_paddr_t pa, vm_size_t size) { - return (void*) IA64_PHYS_TO_RR6(pa); + vm_offset_t va; + + va = pa | IA64_RR_BASE(6); + return ((void *)va); } /* @@ -2156,7 +2159,6 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - return; } /* Modified: head/sys/ia64/ia64/sapic.c ============================================================================== --- head/sys/ia64/ia64/sapic.c Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/ia64/sapic.c Sun Feb 14 16:56:24 2010 (r203883) @@ -42,6 +42,9 @@ #include #include +#include +#include + static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); static int sysctl_machdep_apic(SYSCTL_HANDLER_ARGS); @@ -52,8 +55,6 @@ SYSCTL_OID(_machdep, OID_AUTO, apic, CTL struct sapic *ia64_sapics[16]; /* XXX make this resizable */ int ia64_sapic_count; -u_int64_t ia64_lapic_address = PAL_PIB_DEFAULT_ADDR; - struct sapic_rte { u_int64_t rte_vector :8; u_int64_t rte_delivery_mode :3; @@ -165,7 +166,7 @@ sapic_create(u_int id, u_int base, u_int sa->sa_id = id; sa->sa_base = base; - sa->sa_registers = IA64_PHYS_TO_RR6(address); + sa->sa_registers = (uintptr_t)pmap_mapdev(address, 1048576); mtx_init(&sa->sa_mtx, "I/O SAPIC lock", NULL, MTX_SPIN); Modified: head/sys/ia64/include/bus.h ============================================================================== --- head/sys/ia64/include/bus.h Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/include/bus.h Sun Feb 14 16:56:24 2010 (r203883) @@ -132,28 +132,14 @@ /* - * Map a region of device bus space into CPU virtual address space. + * Map and unmap a region of device bus space into CPU virtual address space. */ -static __inline int -bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size __unused, - int flags __unused, bus_space_handle_t *bshp) -{ - - *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO)) - ? addr : IA64_PHYS_TO_RR6(addr); - return (0); -} - - -/* - * Unmap a region of device bus space. - */ -static __inline void -bus_space_unmap(bus_space_tag_t bst __unused, bus_space_handle_t bsh __unused, - bus_size_t size __unused) -{ -} +int +bus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, + bus_space_handle_t *); +void +bus_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t size); /* * Get a new handle for a subregion of an already-mapped area of bus space. Modified: head/sys/ia64/include/intr.h ============================================================================== --- head/sys/ia64/include/intr.h Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/include/intr.h Sun Feb 14 16:56:24 2010 (r203883) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2007-2010 Marcel Moolenaar * Copyright (c) 1998 Doug Rabson * All rights reserved. * @@ -27,26 +28,23 @@ */ #ifndef _MACHINE_INTR_H_ -#define _MACHINE_INTR_H_ +#define _MACHINE_INTR_H_ /* * Layout of the Processor Interrupt Block. */ -struct ia64_interrupt_block +struct ia64_pib { - u_int64_t ib_ipi[0x20000]; /* 1Mb of IPI interrupts */ - u_int8_t ib_reserved1[0xe0000]; - u_int8_t ib_inta; /* Generate INTA cycle */ - u_int8_t ib_reserved2[7]; - u_int8_t ib_xtp; /* XTP cycle */ - u_int8_t ib_reserved3[7]; - u_int8_t ib_reserved4[0x1fff0]; + uint64_t ib_ipi[65536][2]; /* 64K-way IPIs (1MB area). */ + uint8_t _rsvd1[0xe0000]; + uint8_t ib_inta; /* Generate INTA cycle. */ + uint8_t _rsvd2[7]; + uint8_t ib_xtp; /* External Task Priority. */ + uint8_t _rsvd3[7]; + uint8_t _rsvd4[0x1fff0]; }; -extern u_int64_t ia64_lapic_address; - -#define IA64_INTERRUPT_BLOCK \ - (struct ia64_interrupt_block *)IA64_PHYS_TO_RR6(ia64_lapic_address) +extern struct ia64_pib *ia64_pib; int ia64_setup_intr(const char *name, int irq, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/include/md_var.h Sun Feb 14 16:56:24 2010 (r203883) @@ -49,7 +49,7 @@ struct ia64_fdesc { #define IA64_CFM_RRB_FR(x) (((x) >> 25) & 0x7f) #define IA64_CFM_RRB_PR(x) (((x) >> 32) & 0x3f) -/* Concenience function (inline) to adjust backingstore pointers. */ +/* Convenience function (inline) to adjust backingstore pointers. */ static __inline uint64_t ia64_bsp_adjust(uint64_t bsp, int nslots) { @@ -60,22 +60,22 @@ ia64_bsp_adjust(uint64_t bsp, int nslots #ifdef _KERNEL -extern char sigcode[]; -extern char esigcode[]; -extern int szsigcode; -extern long Maxmem; - struct _special; -struct fpreg; -struct reg; struct thread; struct trapframe; +/* + * Return value from ia64_init. Describes stack to switch to. + */ struct ia64_init_return { uint64_t bspstore; uint64_t sp; }; +extern uint64_t ia64_lapic_addr; + +extern long Maxmem; + void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); void cpu_mp_add(u_int, u_int, u_int); Modified: head/sys/ia64/include/pmap.h ============================================================================== --- head/sys/ia64/include/pmap.h Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/include/pmap.h Sun Feb 14 16:56:24 2010 (r203883) @@ -132,7 +132,7 @@ vm_paddr_t pmap_kextract(vm_offset_t va) void pmap_kremove(vm_offset_t); void pmap_setdevram(unsigned long long basea, vm_offset_t sizea); int pmap_uses_prom_console(void); -void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); unsigned *pmap_pte(pmap_t, vm_offset_t) __pure2; void pmap_set_opt (unsigned *); Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Sun Feb 14 16:26:32 2010 (r203882) +++ head/sys/ia64/include/vmparam.h Sun Feb 14 16:56:24 2010 (r203883) @@ -132,7 +132,6 @@ #define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61) #define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1)) -#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) #define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 17:03:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E533106566B; Sun, 14 Feb 2010 17:03:20 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6B88FC0C; Sun, 14 Feb 2010 17:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EH3KkP031093; Sun, 14 Feb 2010 17:03:20 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EH3KFk031091; Sun, 14 Feb 2010 17:03:20 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002141703.o1EH3KFk031091@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 14 Feb 2010 17:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203884 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 17:03:20 -0000 Author: marcel Date: Sun Feb 14 17:03:20 2010 New Revision: 203884 URL: http://svn.freebsd.org/changeset/base/203884 Log: Some code cleanups: o s/u_int32_t/uint32_t/g o Add multiple-inclusion protection. o Break long lines. Modified: head/sys/ia64/include/pci_cfgreg.h Modified: head/sys/ia64/include/pci_cfgreg.h ============================================================================== --- head/sys/ia64/include/pci_cfgreg.h Sun Feb 14 16:56:24 2010 (r203883) +++ head/sys/ia64/include/pci_cfgreg.h Sun Feb 14 17:03:20 2010 (r203884) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2010 Marcel Moolenaar * Copyright (c) 1997, Stefan Esser * All rights reserved. * @@ -24,9 +25,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ - * */ -extern int pci_cfgregopen(void); -extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); -extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); +#ifndef _MACHINE_PCI_CFGREG_H_ +#define _MACHINE_PCI_CFGREG_H_ + +int pci_cfgregopen(void); +uint32_t pci_cfgregread(int bus, int slot, int func, int reg, int len); +void pci_cfgregwrite(int bus, int slot, int func, int reg, uint32_t data, + int bytes); + +#endif /* _MACHINE_PCI_CFGREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 17:14:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC071065670; Sun, 14 Feb 2010 17:14:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0A4B8FC15; Sun, 14 Feb 2010 17:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EHEBhQ033488; Sun, 14 Feb 2010 17:14:11 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EHEBlR033483; Sun, 14 Feb 2010 17:14:11 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201002141714.o1EHEBlR033483@svn.freebsd.org> From: Ed Maste Date: Sun, 14 Feb 2010 17:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203885 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 17:14:12 -0000 Author: emaste Date: Sun Feb 14 17:14:11 2010 New Revision: 203885 URL: http://svn.freebsd.org/changeset/base/203885 Log: Diff reduction with Adaptec's vendor driver. Driver version 2.1.9 chosen as that Adaptec version roughly corresponds with the current feature set merged to the in-tree driver. Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aac_cam.c head/sys/dev/aac/aacreg.h head/sys/dev/aac/aacvar.h Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Feb 14 17:03:20 2010 (r203884) +++ head/sys/dev/aac/aac.c Sun Feb 14 17:14:11 2010 (r203885) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. */ -#define AAC_DRIVER_VERSION 0x02000000 #define AAC_DRIVERNAME "aac" #include "opt_aac.h" @@ -2767,10 +2766,8 @@ aac_describe_controller(struct aac_softc } device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n", adapter_type, - AAC_DRIVER_VERSION >> 24, - (AAC_DRIVER_VERSION >> 16) & 0xFF, - AAC_DRIVER_VERSION & 0xFF, - AAC_DRIVER_BUILD); + AAC_DRIVER_MAJOR_VERSION, AAC_DRIVER_MINOR_VERSION, + AAC_DRIVER_BUGFIX_LEVEL, AAC_DRIVER_BUILD); aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); @@ -3255,10 +3252,16 @@ aac_rev_check(struct aac_softc *sc, cadd * Doctor up the response struct. */ rev_check_resp.possiblyCompatible = 1; - rev_check_resp.adapterSWRevision.external.ul = - sc->aac_revision.external.ul; + rev_check_resp.adapterSWRevision.external.comp.major = + AAC_DRIVER_MAJOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.minor = + AAC_DRIVER_MINOR_VERSION; + rev_check_resp.adapterSWRevision.external.comp.type = + AAC_DRIVER_TYPE; + rev_check_resp.adapterSWRevision.external.comp.dash = + AAC_DRIVER_BUGFIX_LEVEL; rev_check_resp.adapterSWRevision.buildNumber = - sc->aac_revision.buildNumber; + AAC_DRIVER_BUILD; return(copyout((caddr_t)&rev_check_resp, udata, sizeof(struct aac_rev_check_resp))); Modified: head/sys/dev/aac/aac_cam.c ============================================================================== --- head/sys/dev/aac/aac_cam.c Sun Feb 14 17:03:20 2010 (r203884) +++ head/sys/dev/aac/aac_cam.c Sun Feb 14 17:14:11 2010 (r203885) @@ -405,10 +405,10 @@ aac_cam_action(struct cam_sim *sim, unio if (ccb->ccb_h.flags & CAM_DATA_PHYS) { /* Send a 32bit command */ fib->Header.Command = ScsiPortCommand; - srb->sg_map32.SgCount = 1; - srb->sg_map32.SgEntry[0].SgAddress = + srb->sg_map.SgCount = 1; + srb->sg_map.SgEntry[0].SgAddress = (uint32_t)(uintptr_t)csio->data_ptr; - srb->sg_map32.SgEntry[0].SgByteCount = + srb->sg_map.SgEntry[0].SgByteCount = csio->dxfer_len; } else { /* @@ -417,15 +417,15 @@ aac_cam_action(struct cam_sim *sim, unio */ cm->cm_data = (void *)csio->data_ptr; cm->cm_datalen = csio->dxfer_len; - cm->cm_sgtable = &srb->sg_map32; + cm->cm_sgtable = &srb->sg_map; } } else { /* XXX Need to handle multiple s/g elements */ panic("aac_cam: multiple s/g elements"); } } else { - srb->sg_map32.SgCount = 0; - srb->sg_map32.SgEntry[0].SgByteCount = 0; + srb->sg_map.SgCount = 0; + srb->sg_map.SgEntry[0].SgByteCount = 0; srb->data_len = 0; } Modified: head/sys/dev/aac/aacreg.h ============================================================================== --- head/sys/dev/aac/aacreg.h Sun Feb 14 17:03:20 2010 (r203884) +++ head/sys/dev/aac/aacreg.h Sun Feb 14 17:14:11 2010 (r203885) @@ -1374,7 +1374,7 @@ struct aac_srb { u_int32_t retry_limit; u_int32_t cdb_len; u_int8_t cdb[16]; - struct aac_sg_table sg_map32; + struct aac_sg_table sg_map; }; enum { Modified: head/sys/dev/aac/aacvar.h ============================================================================== --- head/sys/dev/aac/aacvar.h Sun Feb 14 17:03:20 2010 (r203884) +++ head/sys/dev/aac/aacvar.h Sun Feb 14 17:14:11 2010 (r203885) @@ -37,6 +37,16 @@ #include #include +#define AAC_TYPE_DEVO 1 +#define AAC_TYPE_ALPHA 2 +#define AAC_TYPE_BETA 3 +#define AAC_TYPE_RELEASE 4 + +#define AAC_DRIVER_MAJOR_VERSION 2 +#define AAC_DRIVER_MINOR_VERSION 1 +#define AAC_DRIVER_BUGFIX_LEVEL 9 +#define AAC_DRIVER_TYPE AAC_TYPE_RELEASE + #ifndef AAC_DRIVER_BUILD # define AAC_DRIVER_BUILD 1 #endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:23:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7095D106566C; Sun, 14 Feb 2010 19:23:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F18E8FC14; Sun, 14 Feb 2010 19:23:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJN5qu061928; Sun, 14 Feb 2010 19:23:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJN5f8061926; Sun, 14 Feb 2010 19:23:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141923.o1EJN5f8061926@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:23:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203887 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:23:05 -0000 Author: mav Date: Sun Feb 14 19:23:05 2010 New Revision: 203887 URL: http://svn.freebsd.org/changeset/base/203887 Log: MFC r202699: Make ata_getrev() an optional method by implementing ata_null_getrev(). This fixes a bogus '???' boot message on Cambria boards with a CompactFlash card. Modified: stable/8/sys/dev/ata/ata_if.m Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ata/ata_if.m ============================================================================== --- stable/8/sys/dev/ata/ata_if.m Sun Feb 14 18:09:18 2010 (r203886) +++ stable/8/sys/dev/ata/ata_if.m Sun Feb 14 19:23:05 2010 (r203887) @@ -71,10 +71,17 @@ METHOD int setmode { int mode; } DEFAULT ata_null_setmode; +CODE { + static int ata_null_getrev(device_t dev, int target) + { + return (0); + } +}; + METHOD int getrev { device_t dev; int target; -}; +} DEFAULT ata_null_getrev; METHOD void reset { device_t channel; From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:28:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77D611065679; Sun, 14 Feb 2010 19:28:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63CB98FC13; Sun, 14 Feb 2010 19:28:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJSjH1063269; Sun, 14 Feb 2010 19:28:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJSj1A063264; Sun, 14 Feb 2010 19:28:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141928.o1EJSj1A063264@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203888 - in stable/8/sys/dev: ahci ata ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:28:45 -0000 Author: mav Date: Sun Feb 14 19:28:45 2010 New Revision: 203888 URL: http://svn.freebsd.org/changeset/base/203888 Log: MFC r203030: Add support for SATA part of Marvell 88SE912x controllers to ahci(4). Limit early revisions from 6Gb/s to 3Gb/s by default, or they negotiate only 1.5Gb/s, when 3Gb/s devices connected. Add dummy driver for PATA part of these controllers, preventing generic driver attach them. It causes system freeze when SATA controller used after PATA was touched. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-pci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-marvell.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:23:05 2010 (r203887) +++ stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:28:45 2010 (r203888) @@ -98,6 +98,7 @@ MALLOC_DEFINE(M_AHCI, "AHCI driver", "AH static struct { uint32_t id; + uint8_t rev; const char *name; int quirks; #define AHCI_Q_NOFORCE 1 @@ -107,135 +108,138 @@ static struct { #define AHCI_Q_2CH 16 #define AHCI_Q_4CH 32 #define AHCI_Q_EDGEIS 64 +#define AHCI_Q_SATA2 128 } ahci_ids[] = { - {0x43801002, "ATI IXP600", 0}, - {0x43901002, "ATI IXP700", 0}, - {0x43911002, "ATI IXP700", 0}, - {0x43921002, "ATI IXP700", 0}, - {0x43931002, "ATI IXP700", 0}, - {0x43941002, "ATI IXP800", 0}, - {0x43951002, "ATI IXP800", 0}, - {0x26528086, "Intel ICH6", AHCI_Q_NOFORCE}, - {0x26538086, "Intel ICH6M", AHCI_Q_NOFORCE}, - {0x26818086, "Intel ESB2", 0}, - {0x26828086, "Intel ESB2", 0}, - {0x26838086, "Intel ESB2", 0}, - {0x27c18086, "Intel ICH7", 0}, - {0x27c38086, "Intel ICH7", 0}, - {0x27c58086, "Intel ICH7M", 0}, - {0x27c68086, "Intel ICH7M", 0}, - {0x28218086, "Intel ICH8", 0}, - {0x28228086, "Intel ICH8", 0}, - {0x28248086, "Intel ICH8", 0}, - {0x28298086, "Intel ICH8M", 0}, - {0x282a8086, "Intel ICH8M", 0}, - {0x29228086, "Intel ICH9", 0}, - {0x29238086, "Intel ICH9", 0}, - {0x29248086, "Intel ICH9", 0}, - {0x29258086, "Intel ICH9", 0}, - {0x29278086, "Intel ICH9", 0}, - {0x29298086, "Intel ICH9M", 0}, - {0x292a8086, "Intel ICH9M", 0}, - {0x292b8086, "Intel ICH9M", 0}, - {0x292c8086, "Intel ICH9M", 0}, - {0x292f8086, "Intel ICH9M", 0}, - {0x294d8086, "Intel ICH9", 0}, - {0x294e8086, "Intel ICH9M", 0}, - {0x3a058086, "Intel ICH10", 0}, - {0x3a228086, "Intel ICH10", 0}, - {0x3a258086, "Intel ICH10", 0}, - {0x3b228086, "Intel PCH", 0}, - {0x3b238086, "Intel PCH", 0}, - {0x3b248086, "Intel PCH", 0}, - {0x3b258086, "Intel PCH", 0}, - {0x3b298086, "Intel PCH", 0}, - {0x3b2b8086, "Intel PCH", 0}, - {0x3b2c8086, "Intel PCH", 0}, - {0x3b2f8086, "Intel PCH", 0}, - {0x2361197b, "JMicron JMB361", AHCI_Q_NOFORCE}, - {0x2363197b, "JMicron JMB363", AHCI_Q_NOFORCE}, - {0x2365197b, "JMicron JMB365", AHCI_Q_NOFORCE}, - {0x2366197b, "JMicron JMB366", AHCI_Q_NOFORCE}, - {0x2368197b, "JMicron JMB368", AHCI_Q_NOFORCE}, - {0x611111ab, "Marvell 88SX6111", AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS}, - {0x612111ab, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS}, - {0x614111ab, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, - {0x614511ab, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, - {0x044c10de, "NVIDIA MCP65", 0}, - {0x044d10de, "NVIDIA MCP65", 0}, - {0x044e10de, "NVIDIA MCP65", 0}, - {0x044f10de, "NVIDIA MCP65", 0}, - {0x045c10de, "NVIDIA MCP65", 0}, - {0x045d10de, "NVIDIA MCP65", 0}, - {0x045e10de, "NVIDIA MCP65", 0}, - {0x045f10de, "NVIDIA MCP65", 0}, - {0x055010de, "NVIDIA MCP67", 0}, - {0x055110de, "NVIDIA MCP67", 0}, - {0x055210de, "NVIDIA MCP67", 0}, - {0x055310de, "NVIDIA MCP67", 0}, - {0x055410de, "NVIDIA MCP67", 0}, - {0x055510de, "NVIDIA MCP67", 0}, - {0x055610de, "NVIDIA MCP67", 0}, - {0x055710de, "NVIDIA MCP67", 0}, - {0x055810de, "NVIDIA MCP67", 0}, - {0x055910de, "NVIDIA MCP67", 0}, - {0x055A10de, "NVIDIA MCP67", 0}, - {0x055B10de, "NVIDIA MCP67", 0}, - {0x058410de, "NVIDIA MCP67", 0}, - {0x07f010de, "NVIDIA MCP73", 0}, - {0x07f110de, "NVIDIA MCP73", 0}, - {0x07f210de, "NVIDIA MCP73", 0}, - {0x07f310de, "NVIDIA MCP73", 0}, - {0x07f410de, "NVIDIA MCP73", 0}, - {0x07f510de, "NVIDIA MCP73", 0}, - {0x07f610de, "NVIDIA MCP73", 0}, - {0x07f710de, "NVIDIA MCP73", 0}, - {0x07f810de, "NVIDIA MCP73", 0}, - {0x07f910de, "NVIDIA MCP73", 0}, - {0x07fa10de, "NVIDIA MCP73", 0}, - {0x07fb10de, "NVIDIA MCP73", 0}, - {0x0ad010de, "NVIDIA MCP77", 0}, - {0x0ad110de, "NVIDIA MCP77", 0}, - {0x0ad210de, "NVIDIA MCP77", 0}, - {0x0ad310de, "NVIDIA MCP77", 0}, - {0x0ad410de, "NVIDIA MCP77", 0}, - {0x0ad510de, "NVIDIA MCP77", 0}, - {0x0ad610de, "NVIDIA MCP77", 0}, - {0x0ad710de, "NVIDIA MCP77", 0}, - {0x0ad810de, "NVIDIA MCP77", 0}, - {0x0ad910de, "NVIDIA MCP77", 0}, - {0x0ada10de, "NVIDIA MCP77", 0}, - {0x0adb10de, "NVIDIA MCP77", 0}, - {0x0ab410de, "NVIDIA MCP79", 0}, - {0x0ab510de, "NVIDIA MCP79", 0}, - {0x0ab610de, "NVIDIA MCP79", 0}, - {0x0ab710de, "NVIDIA MCP79", 0}, - {0x0ab810de, "NVIDIA MCP79", 0}, - {0x0ab910de, "NVIDIA MCP79", 0}, - {0x0aba10de, "NVIDIA MCP79", 0}, - {0x0abb10de, "NVIDIA MCP79", 0}, - {0x0abc10de, "NVIDIA MCP79", 0}, - {0x0abd10de, "NVIDIA MCP79", 0}, - {0x0abe10de, "NVIDIA MCP79", 0}, - {0x0abf10de, "NVIDIA MCP79", 0}, - {0x0d8410de, "NVIDIA MCP89", 0}, - {0x0d8510de, "NVIDIA MCP89", 0}, - {0x0d8610de, "NVIDIA MCP89", 0}, - {0x0d8710de, "NVIDIA MCP89", 0}, - {0x0d8810de, "NVIDIA MCP89", 0}, - {0x0d8910de, "NVIDIA MCP89", 0}, - {0x0d8a10de, "NVIDIA MCP89", 0}, - {0x0d8b10de, "NVIDIA MCP89", 0}, - {0x0d8c10de, "NVIDIA MCP89", 0}, - {0x0d8d10de, "NVIDIA MCP89", 0}, - {0x0d8e10de, "NVIDIA MCP89", 0}, - {0x0d8f10de, "NVIDIA MCP89", 0}, - {0x33491106, "VIA VT8251", 0}, - {0x62871106, "VIA VT8251", 0}, - {0x11841039, "SiS 966", 0}, - {0x11851039, "SiS 968", 0}, - {0x01861039, "SiS 968", 0}, - {0, NULL, 0} + {0x43801002, 0x00, "ATI IXP600", 0}, + {0x43901002, 0x00, "ATI IXP700", 0}, + {0x43911002, 0x00, "ATI IXP700", 0}, + {0x43921002, 0x00, "ATI IXP700", 0}, + {0x43931002, 0x00, "ATI IXP700", 0}, + {0x43941002, 0x00, "ATI IXP800", 0}, + {0x43951002, 0x00, "ATI IXP800", 0}, + {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, + {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, + {0x26818086, 0x00, "Intel ESB2", 0}, + {0x26828086, 0x00, "Intel ESB2", 0}, + {0x26838086, 0x00, "Intel ESB2", 0}, + {0x27c18086, 0x00, "Intel ICH7", 0}, + {0x27c38086, 0x00, "Intel ICH7", 0}, + {0x27c58086, 0x00, "Intel ICH7M", 0}, + {0x27c68086, 0x00, "Intel ICH7M", 0}, + {0x28218086, 0x00, "Intel ICH8", 0}, + {0x28228086, 0x00, "Intel ICH8", 0}, + {0x28248086, 0x00, "Intel ICH8", 0}, + {0x28298086, 0x00, "Intel ICH8M", 0}, + {0x282a8086, 0x00, "Intel ICH8M", 0}, + {0x29228086, 0x00, "Intel ICH9", 0}, + {0x29238086, 0x00, "Intel ICH9", 0}, + {0x29248086, 0x00, "Intel ICH9", 0}, + {0x29258086, 0x00, "Intel ICH9", 0}, + {0x29278086, 0x00, "Intel ICH9", 0}, + {0x29298086, 0x00, "Intel ICH9M", 0}, + {0x292a8086, 0x00, "Intel ICH9M", 0}, + {0x292b8086, 0x00, "Intel ICH9M", 0}, + {0x292c8086, 0x00, "Intel ICH9M", 0}, + {0x292f8086, 0x00, "Intel ICH9M", 0}, + {0x294d8086, 0x00, "Intel ICH9", 0}, + {0x294e8086, 0x00, "Intel ICH9M", 0}, + {0x3a058086, 0x00, "Intel ICH10", 0}, + {0x3a228086, 0x00, "Intel ICH10", 0}, + {0x3a258086, 0x00, "Intel ICH10", 0}, + {0x3b228086, 0x00, "Intel PCH", 0}, + {0x3b238086, 0x00, "Intel PCH", 0}, + {0x3b248086, 0x00, "Intel PCH", 0}, + {0x3b258086, 0x00, "Intel PCH", 0}, + {0x3b298086, 0x00, "Intel PCH", 0}, + {0x3b2b8086, 0x00, "Intel PCH", 0}, + {0x3b2c8086, 0x00, "Intel PCH", 0}, + {0x3b2f8086, 0x00, "Intel PCH", 0}, + {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, + {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, + {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, + {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, + {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, + {0x611111ab, 0x00, "Marvell 88SX6111", AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS}, + {0x612111ab, 0x00, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS}, + {0x614111ab, 0x00, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, + {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, + {0x91231b4b, 0x11, "Marvell 88SE912x", 0}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x044c10de, 0x00, "NVIDIA MCP65", 0}, + {0x044d10de, 0x00, "NVIDIA MCP65", 0}, + {0x044e10de, 0x00, "NVIDIA MCP65", 0}, + {0x044f10de, 0x00, "NVIDIA MCP65", 0}, + {0x045c10de, 0x00, "NVIDIA MCP65", 0}, + {0x045d10de, 0x00, "NVIDIA MCP65", 0}, + {0x045e10de, 0x00, "NVIDIA MCP65", 0}, + {0x045f10de, 0x00, "NVIDIA MCP65", 0}, + {0x055010de, 0x00, "NVIDIA MCP67", 0}, + {0x055110de, 0x00, "NVIDIA MCP67", 0}, + {0x055210de, 0x00, "NVIDIA MCP67", 0}, + {0x055310de, 0x00, "NVIDIA MCP67", 0}, + {0x055410de, 0x00, "NVIDIA MCP67", 0}, + {0x055510de, 0x00, "NVIDIA MCP67", 0}, + {0x055610de, 0x00, "NVIDIA MCP67", 0}, + {0x055710de, 0x00, "NVIDIA MCP67", 0}, + {0x055810de, 0x00, "NVIDIA MCP67", 0}, + {0x055910de, 0x00, "NVIDIA MCP67", 0}, + {0x055A10de, 0x00, "NVIDIA MCP67", 0}, + {0x055B10de, 0x00, "NVIDIA MCP67", 0}, + {0x058410de, 0x00, "NVIDIA MCP67", 0}, + {0x07f010de, 0x00, "NVIDIA MCP73", 0}, + {0x07f110de, 0x00, "NVIDIA MCP73", 0}, + {0x07f210de, 0x00, "NVIDIA MCP73", 0}, + {0x07f310de, 0x00, "NVIDIA MCP73", 0}, + {0x07f410de, 0x00, "NVIDIA MCP73", 0}, + {0x07f510de, 0x00, "NVIDIA MCP73", 0}, + {0x07f610de, 0x00, "NVIDIA MCP73", 0}, + {0x07f710de, 0x00, "NVIDIA MCP73", 0}, + {0x07f810de, 0x00, "NVIDIA MCP73", 0}, + {0x07f910de, 0x00, "NVIDIA MCP73", 0}, + {0x07fa10de, 0x00, "NVIDIA MCP73", 0}, + {0x07fb10de, 0x00, "NVIDIA MCP73", 0}, + {0x0ad010de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad110de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad210de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad310de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad410de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad510de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad610de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad710de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad810de, 0x00, "NVIDIA MCP77", 0}, + {0x0ad910de, 0x00, "NVIDIA MCP77", 0}, + {0x0ada10de, 0x00, "NVIDIA MCP77", 0}, + {0x0adb10de, 0x00, "NVIDIA MCP77", 0}, + {0x0ab410de, 0x00, "NVIDIA MCP79", 0}, + {0x0ab510de, 0x00, "NVIDIA MCP79", 0}, + {0x0ab610de, 0x00, "NVIDIA MCP79", 0}, + {0x0ab710de, 0x00, "NVIDIA MCP79", 0}, + {0x0ab810de, 0x00, "NVIDIA MCP79", 0}, + {0x0ab910de, 0x00, "NVIDIA MCP79", 0}, + {0x0aba10de, 0x00, "NVIDIA MCP79", 0}, + {0x0abb10de, 0x00, "NVIDIA MCP79", 0}, + {0x0abc10de, 0x00, "NVIDIA MCP79", 0}, + {0x0abd10de, 0x00, "NVIDIA MCP79", 0}, + {0x0abe10de, 0x00, "NVIDIA MCP79", 0}, + {0x0abf10de, 0x00, "NVIDIA MCP79", 0}, + {0x0d8410de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8510de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8610de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8710de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8810de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8910de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8a10de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8b10de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8c10de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8d10de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8e10de, 0x00, "NVIDIA MCP89", 0}, + {0x0d8f10de, 0x00, "NVIDIA MCP89", 0}, + {0x33491106, 0x00, "VIA VT8251", 0}, + {0x62871106, 0x00, "VIA VT8251", 0}, + {0x11841039, 0x00, "SiS 966", 0}, + {0x11851039, 0x00, "SiS 968", 0}, + {0x01861039, 0x00, "SiS 968", 0}, + {0x00000000, 0x00, NULL, 0} }; static int @@ -244,6 +248,7 @@ ahci_probe(device_t dev) char buf[64]; int i, valid = 0; uint32_t devid = pci_get_devid(dev); + uint8_t revid = pci_get_revid(dev); /* Is this a possible AHCI candidate? */ if (pci_get_class(dev) == PCIC_STORAGE && @@ -253,6 +258,7 @@ ahci_probe(device_t dev) /* Is this a known AHCI chip? */ for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && + ahci_ids[i].rev <= revid && (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { /* Do not attach JMicrons with single PCI function. */ if (pci_get_vendor(dev) == 0x197b && @@ -276,12 +282,14 @@ ahci_ata_probe(device_t dev) char buf[64]; int i; uint32_t devid = pci_get_devid(dev); + uint8_t revid = pci_get_revid(dev); if ((intptr_t)device_get_ivars(dev) >= 0) return (ENXIO); /* Is this a known AHCI chip? */ for (i = 0; ahci_ids[i].id != 0; i++) { - if (ahci_ids[i].id == devid) { + if (ahci_ids[i].id == devid && + ahci_ids[i].rev <= revid) { snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); @@ -299,11 +307,14 @@ ahci_attach(device_t dev) device_t child; int error, unit, speed, i; uint32_t devid = pci_get_devid(dev); + uint8_t revid = pci_get_revid(dev); u_int32_t version; ctlr->dev = dev; i = 0; - while (ahci_ids[i].id != 0 && ahci_ids[i].id != devid) + while (ahci_ids[i].id != 0 && + (ahci_ids[i].id != devid || + ahci_ids[i].rev > revid)) i++; ctlr->quirks = ahci_ids[i].quirks; resource_int_value(device_get_name(dev), @@ -800,6 +811,8 @@ ahci_ch_attach(device_t dev) pci_get_subdevice(ctlr->dev) == 0x81e4 && ch->unit == 0) sata_rev = 1; + if (ch->quirks & AHCI_Q_SATA2) + sata_rev = 2; resource_int_value(device_get_name(dev), device_get_unit(dev), "sata_rev", &sata_rev); for (i = 0; i < 16; i++) { Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Sun Feb 14 19:23:05 2010 (r203887) +++ stable/8/sys/dev/ata/ata-pci.c Sun Feb 14 19:28:45 2010 (r203888) @@ -877,6 +877,7 @@ ata_pcivendor2str(device_t dev) case ATA_ITE_ID: return "ITE"; case ATA_JMICRON_ID: return "JMicron"; case ATA_MARVELL_ID: return "Marvell"; + case ATA_MARVELL2_ID: return "Marvell"; case ATA_NATIONAL_ID: return "National"; case ATA_NETCELL_ID: return "Netcell"; case ATA_NVIDIA_ID: return "nVidia"; Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Sun Feb 14 19:23:05 2010 (r203887) +++ stable/8/sys/dev/ata/ata-pci.h Sun Feb 14 19:28:45 2010 (r203888) @@ -234,6 +234,7 @@ struct ata_pci_controller { #define ATA_M88SX6121 0x612111ab #define ATA_M88SX6141 0x614111ab #define ATA_M88SX6145 0x614511ab +#define ATA_MARVELL2_ID 0x1b4b #define ATA_MICRON_ID 0x1042 #define ATA_MICRON_RZ1000 0x10001042 Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Feb 14 19:23:05 2010 (r203887) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Feb 14 19:28:45 2010 (r203888) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); static int ata_marvell_chipinit(device_t dev); static int ata_marvell_ch_attach(device_t dev); static int ata_marvell_setmode(device_t dev, int target, int mode); +static int ata_marvell_dummy_chipinit(device_t dev); static int ata_marvell_edma_ch_attach(device_t dev); static int ata_marvell_edma_ch_detach(device_t dev); static int ata_marvell_edma_status(device_t dev); @@ -70,7 +71,7 @@ static void ata_marvell_edma_dmainit(dev #define MV_6042 62 #define MV_7042 72 #define MV_61XX 61 - +#define MV_91XX 91 /* * Marvell chipset support functions @@ -113,9 +114,11 @@ ata_marvell_probe(device_t dev) { ATA_M88SX6121, 0, 2, MV_61XX, ATA_UDMA6, "88SX6121" }, { ATA_M88SX6141, 0, 4, MV_61XX, ATA_UDMA6, "88SX6141" }, { ATA_M88SX6145, 0, 4, MV_61XX, ATA_UDMA6, "88SX6145" }, + { 0x91a41b4b, 0, 0, MV_91XX, ATA_UDMA6, "88SE912x" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_MARVELL_ID) + if (pci_get_vendor(dev) != ATA_MARVELL_ID && + pci_get_vendor(dev) != ATA_MARVELL2_ID) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -133,6 +136,9 @@ ata_marvell_probe(device_t dev) case MV_61XX: ctlr->chipinit = ata_marvell_chipinit; break; + case MV_91XX: + ctlr->chipinit = ata_marvell_dummy_chipinit; + break; } return (BUS_PROBE_DEFAULT); } @@ -190,6 +196,15 @@ ata_marvell_setmode(device_t dev, int ta return (mode); } +static int +ata_marvell_dummy_chipinit(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(dev); + + ctlr->channels = 0; + return (0); +} + int ata_marvell_edma_chipinit(device_t dev) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:38:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94882106568D; Sun, 14 Feb 2010 19:38:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F71D8FC15; Sun, 14 Feb 2010 19:38:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJcRJl065480; Sun, 14 Feb 2010 19:38:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJcRpx065470; Sun, 14 Feb 2010 19:38:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141938.o1EJcRpx065470@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:38:27 -0000 Author: mav Date: Sun Feb 14 19:38:27 2010 New Revision: 203889 URL: http://svn.freebsd.org/changeset/base/203889 Log: MFC r203108: Large set of CAM improvements: - Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs. Modified: stable/8/sys/cam/ata/ata_all.c stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam.c stable/8/sys/cam/cam.h stable/8/sys/cam/cam_ccb.h stable/8/sys/cam/cam_periph.c stable/8/sys/cam/cam_periph.h stable/8/sys/cam/cam_queue.h stable/8/sys/cam/cam_sim.c stable/8/sys/cam/cam_xpt.c stable/8/sys/cam/cam_xpt.h stable/8/sys/cam/cam_xpt_internal.h stable/8/sys/cam/cam_xpt_periph.h stable/8/sys/cam/cam_xpt_sim.h stable/8/sys/cam/scsi/scsi_all.c stable/8/sys/cam/scsi/scsi_cd.c stable/8/sys/cam/scsi/scsi_ch.c stable/8/sys/cam/scsi/scsi_da.c stable/8/sys/cam/scsi/scsi_low.c stable/8/sys/cam/scsi/scsi_pass.c stable/8/sys/cam/scsi/scsi_xpt.c stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h stable/8/sys/dev/asr/asr.c stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/atapi-cam.c stable/8/sys/dev/ciss/ciss.c stable/8/sys/dev/hptiop/hptiop.c stable/8/sys/dev/hptrr/hptrr_osm_bsd.c stable/8/sys/dev/hptrr/os_bsd.h stable/8/sys/dev/mly/mly.c stable/8/sys/dev/mpt/mpt_cam.h stable/8/sys/dev/mpt/mpt_raid.c stable/8/sys/dev/ppbus/vpo.c stable/8/sys/dev/siis/siis.c stable/8/sys/dev/trm/trm.c stable/8/sys/dev/twa/tw_osl_cam.c stable/8/sys/dev/usb/storage/umass.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/ata/ata_all.c ============================================================================== --- stable/8/sys/cam/ata/ata_all.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/ata/ata_all.c Sun Feb 14 19:38:27 2010 (r203889) @@ -198,7 +198,7 @@ ata_command_sbuf(struct ccb_ataio *ataio { char cmd_str[(12 * 3) + 1]; - sbuf_printf(sb, "CMD: %s: %s", + sbuf_printf(sb, "%s. ACB: %s", ata_op_string(&ataio->cmd), ata_cmd_string(&ataio->cmd, cmd_str, sizeof(cmd_str))); @@ -212,7 +212,7 @@ int ata_status_sbuf(struct ccb_ataio *ataio, struct sbuf *sb) { - sbuf_printf(sb, "ATA Status: %02x (%s%s%s%s%s%s%s%s)", + sbuf_printf(sb, "ATA status: %02x (%s%s%s%s%s%s%s%s)", ataio->res.status, (ataio->res.status & 0x80) ? "BSY " : "", (ataio->res.status & 0x40) ? "DRDY " : "", @@ -223,7 +223,7 @@ ata_status_sbuf(struct ccb_ataio *ataio, (ataio->res.status & 0x02) ? "IDX " : "", (ataio->res.status & 0x01) ? "ERR" : ""); if (ataio->res.status & 1) { - sbuf_printf(sb, ", Error: %02x (%s%s%s%s%s%s%s%s)", + sbuf_printf(sb, ", error: %02x (%s%s%s%s%s%s%s%s)", ataio->res.error, (ataio->res.error & 0x80) ? "ICRC " : "", (ataio->res.error & 0x40) ? "UNC " : "", Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/ata/ata_da.c Sun Feb 14 19:38:27 2010 (r203889) @@ -689,7 +689,7 @@ adaregister(struct cam_periph *periph, v /* Check if the SIM does not want queued commands */ bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); if (cpi.ccb_h.status != CAM_REQ_CMP || Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/ata/ata_pmp.c Sun Feb 14 19:38:27 2010 (r203889) @@ -98,6 +98,9 @@ struct pmp_softc { int reset; int frozen; int restart; + int events; +#define PMP_EV_RESET 1 +#define PMP_EV_RESCAN 2 union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; @@ -179,7 +182,8 @@ pmpfreeze(struct cam_periph *periph, int i, 0) == CAM_REQ_CMP) { softc->frozen |= (1 << i); xpt_acquire_device(dpath->device); - cam_freeze_devq(dpath); + cam_freeze_devq_arg(dpath, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_BUS + 1); xpt_free_path(dpath); } } @@ -200,7 +204,8 @@ pmprelease(struct cam_periph *periph, in xpt_path_path_id(periph->path), i, 0) == CAM_REQ_CMP) { softc->frozen &= ~(1 << i); - cam_release_devq(dpath, 0, 0, 0, FALSE); + cam_release_devq(dpath, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_BUS + 1, FALSE); xpt_release_device(dpath->device); xpt_free_path(dpath); } @@ -298,19 +303,20 @@ pmpasync(void *callback_arg, u_int32_t c case AC_BUS_RESET: softc = (struct pmp_softc *)periph->softc; cam_periph_async(periph, code, path, arg); - if (code == AC_SCSI_AEN && softc->state != PMP_STATE_NORMAL && - softc->state != PMP_STATE_SCAN) - break; - if (softc->state != PMP_STATE_SCAN) - pmpfreeze(periph, softc->found); + if (code == AC_SCSI_AEN) + softc->events |= PMP_EV_RESCAN; else - pmpfreeze(periph, softc->found & ~(1 << softc->pm_step)); + softc->events |= PMP_EV_RESET; + if (code == AC_SCSI_AEN && softc->state != PMP_STATE_NORMAL) + break; + xpt_hold_boot(); + pmpfreeze(periph, softc->found); if (code == AC_SENT_BDR || code == AC_BUS_RESET) softc->found = 0; /* We have to reset everything. */ if (softc->state == PMP_STATE_NORMAL) { - softc->state = PMP_STATE_PORTS; + softc->state = PMP_STATE_PRECONFIG; cam_periph_acquire(periph); - xpt_schedule(periph, CAM_PRIORITY_BUS); + xpt_schedule(periph, CAM_PRIORITY_DEV); } else softc->restart = 1; break; @@ -353,7 +359,6 @@ static cam_status pmpregister(struct cam_periph *periph, void *arg) { struct pmp_softc *softc; - struct ccb_pathinq cpi; struct ccb_getdev *cgd; cgd = (struct ccb_getdev *)arg; @@ -377,16 +382,8 @@ pmpregister(struct cam_periph *periph, v } periph->softc = softc; - softc->state = PMP_STATE_PORTS; softc->pm_pid = ((uint32_t *)&cgd->ident_data)[0]; softc->pm_prv = ((uint32_t *)&cgd->ident_data)[1]; - - /* Check if the SIM does not want queued commands */ - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); - TASK_INIT(&softc->sysctl_task, 0, pmpsysctlinit, periph); xpt_announce_periph(periph, NULL); @@ -408,7 +405,10 @@ pmpregister(struct cam_periph *periph, v * the end of probe. */ (void)cam_periph_acquire(periph); - xpt_schedule(periph, CAM_PRIORITY_BUS); + xpt_hold_boot(); + softc->state = PMP_STATE_PORTS; + softc->events = PMP_EV_RESCAN; + xpt_schedule(periph, CAM_PRIORITY_DEV); return(CAM_REQ_CMP); } @@ -416,17 +416,35 @@ pmpregister(struct cam_periph *periph, v static void pmpstart(struct cam_periph *periph, union ccb *start_ccb) { + struct ccb_trans_settings cts; struct ccb_ataio *ataio; struct pmp_softc *softc; + struct cam_path *dpath; + int revision = 0; softc = (struct pmp_softc *)periph->softc; ataio = &start_ccb->ataio; if (softc->restart) { softc->restart = 0; - softc->state = PMP_STATE_PORTS; + softc->state = min(softc->state, PMP_STATE_PRECONFIG); + } + /* Fetch user wanted device speed. */ + if (softc->state == PMP_STATE_RESET || + softc->state == PMP_STATE_CONNECT) { + if (xpt_create_path(&dpath, periph, + xpt_path_path_id(periph->path), + softc->pm_step, 0) == CAM_REQ_CMP) { + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_REVISION) + revision = cts.xport_specific.sata.revision; + xpt_free_path(dpath); + } } - switch (softc->state) { case PMP_STATE_PORTS: cam_fill_ataio(ataio, @@ -460,7 +478,8 @@ pmpstart(struct cam_periph *periph, unio /*dxfer_len*/0, pmp_default_timeout * 1000); ata_pm_write_cmd(ataio, 2, softc->pm_step, - (softc->found & (1 << softc->pm_step)) ? 0 : 1); + (revision << 4) | + ((softc->found & (1 << softc->pm_step)) ? 0 : 1)); break; case PMP_STATE_CONNECT: cam_fill_ataio(ataio, @@ -471,7 +490,8 @@ pmpstart(struct cam_periph *periph, unio /*data_ptr*/NULL, /*dxfer_len*/0, pmp_default_timeout * 1000); - ata_pm_write_cmd(ataio, 2, softc->pm_step, 0); + ata_pm_write_cmd(ataio, 2, softc->pm_step, + (revision << 4)); break; case PMP_STATE_CHECK: cam_fill_ataio(ataio, @@ -519,9 +539,9 @@ pmpdone(struct cam_periph *periph, union struct ccb_trans_settings cts; struct pmp_softc *softc; struct ccb_ataio *ataio; - union ccb *work_ccb; struct cam_path *path, *dpath; u_int32_t priority, res; + int i; softc = (struct pmp_softc *)periph->softc; ataio = &done_ccb->ataio; @@ -547,16 +567,8 @@ pmpdone(struct cam_periph *periph, union if (softc->restart) { softc->restart = 0; - if (softc->state == PMP_STATE_SCAN) { - pmpfreeze(periph, 1 << softc->pm_step); - work_ccb = done_ccb; - done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0; - /* Free the current request path- we're done with it. */ - xpt_free_path(work_ccb->ccb_h.path); - xpt_free_ccb(work_ccb); - } xpt_release_ccb(done_ccb); - softc->state = PMP_STATE_PORTS; + softc->state = min(softc->state, PMP_STATE_PRECONFIG); xpt_schedule(periph, priority); return; } @@ -645,7 +657,7 @@ pmpdone(struct cam_periph *periph, union xpt_path_path_id(periph->path), softc->pm_step, 0) == CAM_REQ_CMP) { bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, dpath, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.revision = (res & 0x0f0) >> 4; @@ -705,53 +717,43 @@ pmpdone(struct cam_periph *periph, union xpt_schedule(periph, priority); return; case PMP_STATE_CONFIG: - if (softc->found) { - softc->pm_step = 0; - softc->state = PMP_STATE_SCAN; - work_ccb = xpt_alloc_ccb_nowait(); - if (work_ccb != NULL) - goto do_scan; - xpt_release_ccb(done_ccb); + for (i = 0; i < softc->pm_ports; i++) { + union ccb *ccb; + + if ((softc->found & (1 << i)) == 0) + continue; + if (xpt_create_path(&dpath, periph, + xpt_path_path_id(periph->path), + i, 0) != CAM_REQ_CMP) { + printf("pmpdone: xpt_create_path failed" + ", bus scan halted\n"); + xpt_free_ccb(done_ccb); + goto done; + } + /* If we did hard reset to this device, inform XPT. */ + if ((softc->reset & softc->found & (1 << i)) != 0) + xpt_async(AC_SENT_BDR, dpath, NULL); + /* If rescan requested, scan this device. */ + if (softc->events & PMP_EV_RESCAN) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + xpt_free_path(dpath); + goto done; + } + xpt_setup_ccb(&ccb->ccb_h, dpath, CAM_PRIORITY_XPT); + xpt_rescan(ccb); + } else + xpt_free_path(dpath); } break; - case PMP_STATE_SCAN: - work_ccb = done_ccb; - done_ccb = (union ccb*)work_ccb->ccb_h.ppriv_ptr0; - /* Free the current request path- we're done with it. */ - xpt_free_path(work_ccb->ccb_h.path); - softc->pm_step++; -do_scan: - while (softc->pm_step < softc->pm_ports && - (softc->found & (1 << softc->pm_step)) == 0) { - softc->pm_step++; - } - if (softc->pm_step >= softc->pm_ports) { - xpt_free_ccb(work_ccb); - break; - } - if (xpt_create_path(&dpath, periph, - done_ccb->ccb_h.path_id, - softc->pm_step, 0) != CAM_REQ_CMP) { - printf("pmpdone: xpt_create_path failed" - ", bus scan halted\n"); - xpt_free_ccb(work_ccb); - break; - } - xpt_setup_ccb(&work_ccb->ccb_h, dpath, - done_ccb->ccb_h.pinfo.priority); - work_ccb->ccb_h.func_code = XPT_SCAN_LUN; - work_ccb->ccb_h.cbfcnp = pmpdone; - work_ccb->ccb_h.ppriv_ptr0 = done_ccb; - work_ccb->crcn.flags = done_ccb->crcn.flags; - xpt_action(work_ccb); - pmprelease(periph, 1 << softc->pm_step); - return; default: break; } done: xpt_release_ccb(done_ccb); softc->state = PMP_STATE_NORMAL; + softc->events = 0; + xpt_release_boot(); pmprelease(periph, -1); cam_periph_release_locked(periph); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:38:27 2010 (r203889) @@ -130,6 +130,7 @@ typedef struct { u_int8_t digest[16]; uint32_t pm_pid; uint32_t pm_prv; + int restart; struct cam_periph *periph; } probe_softc; @@ -231,15 +232,11 @@ proberegister(struct cam_periph *periph, if (status != CAM_REQ_CMP) { return (status); } - - /* - * Ensure we've waited at least a bus settle - * delay before attempting to probe the device. - * For HBAs that don't do bus resets, this won't make a difference. + * Ensure nobody slip in until probe finish. */ - cam_periph_freeze_after_event(periph, &periph->path->bus->last_reset, - scsi_delay); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_XPT + 1); probeschedule(periph); return(CAM_REQ_CMP); } @@ -247,17 +244,12 @@ proberegister(struct cam_periph *periph, static void probeschedule(struct cam_periph *periph) { - struct ccb_pathinq cpi; union ccb *ccb; probe_softc *softc; softc = (probe_softc *)periph->softc; ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) || periph->path->device->protocol == PROTO_SATAPM) PROBE_SET_ACTION(softc, PROBE_RESET); @@ -269,7 +261,7 @@ probeschedule(struct cam_periph *periph) else softc->flags &= ~PROBE_NO_ANNOUNCE; - xpt_schedule(periph, ccb->ccb_h.pinfo.priority); + xpt_schedule(periph, CAM_PRIORITY_XPT); } static void @@ -290,6 +282,14 @@ probestart(struct cam_periph *periph, un csio = &start_ccb->csio; ident_buf = &periph->path->device->ident_data; + if (softc->restart) { + softc->restart = 0; + if ((path->device->flags & CAM_DEV_UNCONFIGURED) || + path->device->protocol == PROTO_SATAPM) + softc->action = PROBE_RESET; + else + softc->action = PROBE_IDENTIFY; + } switch (softc->action) { case PROBE_RESET: cam_fill_ataio(ataio, @@ -299,7 +299,7 @@ probestart(struct cam_periph *periph, un 0, /*data_ptr*/NULL, /*dxfer_len*/0, - (start_ccb->ccb_h.target_id == 15 ? 3 : 15) * 1000); + 15 * 1000); ata_reset_cmd(ataio); break; case PROBE_IDENTIFY: @@ -339,7 +339,7 @@ probestart(struct cam_periph *periph, un mode = 0; /* Fetch user modes from SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); @@ -355,7 +355,7 @@ negotiate: wantmode = mode = ata_max_mode(ident_buf, mode); /* Report modes to SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; if (path->device->transport == XPORT_ATA) { @@ -368,7 +368,7 @@ negotiate: xpt_action((union ccb *)&cts); /* Fetch current modes from SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb *)&cts); @@ -400,7 +400,7 @@ negotiate: bytecount = 8192; /* SATA maximum */ /* Fetch user bytecount from SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); @@ -416,7 +416,7 @@ negotiate: bytecount / ata_logical_sector_size(ident_buf))); /* Report bytecount to SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; if (path->device->transport == XPORT_ATA) { @@ -431,7 +431,7 @@ negotiate: xpt_action((union ccb *)&cts); /* Fetch current bytecount from SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb *)&cts); @@ -462,7 +462,7 @@ negotiate: bytecount = 8192; /* SATA maximum */ /* Fetch user bytecount from SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); @@ -482,7 +482,7 @@ negotiate: } /* Report bytecount to SIM. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; if (path->device->transport == XPORT_ATA) { @@ -560,7 +560,7 @@ proberequestdefaultnegotiation(struct ca { struct ccb_trans_settings cts; - xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); @@ -582,7 +582,7 @@ proberequestbackoff(struct cam_periph *p struct ccb_trans_settings_spi *spi; memset(&cts, 0, sizeof (cts)); - xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb *)&cts); @@ -739,7 +739,7 @@ noerror: done_ccb->ccb_h.target_id == 15) { /* Report SIM that PM is present. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.pm_present = 1; @@ -836,7 +836,7 @@ noerror: path->bus->sim->max_tagged_dev_openings != 0) { /* Report SIM which tags are allowed. */ bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.tags = path->device->maxtags; @@ -957,18 +957,23 @@ noerror: break; } done: - xpt_release_ccb(done_ccb); - done_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs); - TAILQ_REMOVE(&softc->request_ccbs, &done_ccb->ccb_h, periph_links.tqe); - done_ccb->ccb_h.status = CAM_REQ_CMP; - done_ccb->ccb_h.ppriv_field1 = found; - xpt_done(done_ccb); - if (TAILQ_FIRST(&softc->request_ccbs) == NULL) { - cam_periph_invalidate(periph); - cam_periph_release_locked(periph); - } else { + if (softc->restart) { + softc->restart = 0; + xpt_release_ccb(done_ccb); probeschedule(periph); + return; } + xpt_release_ccb(done_ccb); + while ((done_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs))) { + TAILQ_REMOVE(&softc->request_ccbs, + &done_ccb->ccb_h, periph_links.tqe); + done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR; + xpt_done(done_ccb); + } + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE); + cam_periph_invalidate(periph); + cam_periph_release_locked(periph); } static void @@ -1013,7 +1018,7 @@ ata_scan_bus(struct cam_periph *periph, { struct cam_path *path; ata_scan_bus_info *scan_info; - union ccb *work_ccb; + union ccb *work_ccb, *reset_ccb; cam_status status; CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, @@ -1038,6 +1043,26 @@ ata_scan_bus(struct cam_periph *periph, return; } + /* We may need to reset bus first, if we haven't done it yet. */ + if ((work_ccb->cpi.hba_inquiry & + (PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE)) && + !(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) && + !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) { + reset_ccb = xpt_alloc_ccb_nowait(); + xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path, + CAM_PRIORITY_NONE); + reset_ccb->ccb_h.func_code = XPT_RESET_BUS; + xpt_action(reset_ccb); + if (reset_ccb->ccb_h.status != CAM_REQ_CMP) { + request_ccb->ccb_h.status = reset_ccb->ccb_h.status; + xpt_free_ccb(reset_ccb); + xpt_free_ccb(work_ccb); + xpt_done(request_ccb); + return; + } + xpt_free_ccb(reset_ccb); + } + /* Save some state for use while we probe for devices */ scan_info = (ata_scan_bus_info *) malloc(sizeof(ata_scan_bus_info), M_CAMXPT, M_NOWAIT); @@ -1071,7 +1096,7 @@ ata_scan_bus(struct cam_periph *periph, /* If there is PMP... */ if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && (scan_info->counter == scan_info->cpi->max_target)) { - if (work_ccb->ccb_h.ppriv_field1 != 0) { + if (work_ccb->ccb_h.status == CAM_REQ_CMP) { /* everything else willbe probed by it */ goto done; } else { @@ -1141,10 +1166,9 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *new_path; struct cam_periph *old_periph; - CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, - ("xpt_scan_lun\n")); + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_scan_lun\n")); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); @@ -1182,7 +1206,7 @@ ata_scan_lun(struct cam_periph *periph, free(new_path, M_CAMXPT); return; } - xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT); request_ccb->ccb_h.cbfcnp = xptscandone; request_ccb->ccb_h.func_code = XPT_SCAN_LUN; request_ccb->crcn.flags = flags; @@ -1194,6 +1218,7 @@ ata_scan_lun(struct cam_periph *periph, softc = (probe_softc *)old_periph->softc; TAILQ_INSERT_TAIL(&softc->request_ccbs, &request_ccb->ccb_h, periph_links.tqe); + softc->restart = 1; } else { status = cam_periph_alloc(proberegister, NULL, probecleanup, probestart, "aprobe", @@ -1281,7 +1306,7 @@ ata_device_transport(struct cam_path *pa struct ata_params *ident_buf = NULL; /* Get transport information from the SIM */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); @@ -1301,7 +1326,7 @@ ata_device_transport(struct cam_path *pa ata_version(ident_buf->version_major) : cpi.transport_version; /* Tell the controller what we think */ - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.transport = path->device->transport; @@ -1429,7 +1454,7 @@ ata_set_transfer_settings(struct ccb_tra inq_data = &device->inq_data; scsi = &cts->proto_specific.scsi; - xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); @@ -1450,7 +1475,7 @@ ata_set_transfer_settings(struct ccb_tra * Perform sanity checking against what the * controller and device can do. */ - xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL); + xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE); cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cur_cts.type = cts->type; xpt_action((union ccb *)&cur_cts); @@ -1550,6 +1575,10 @@ ata_dev_async(u_int32_t async_code, stru */ ata_scan_lun(newpath.periph, &newpath, CAM_EXPECT_INQ_CHANGE, NULL); + } else { + /* We need to reinitialize device after reset. */ + ata_scan_lun(newpath.periph, &newpath, + 0, NULL); } xpt_release_path(&newpath); } else if (async_code == AC_LOST_DEVICE && Modified: stable/8/sys/cam/cam.c ============================================================================== --- stable/8/sys/cam/cam.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/cam.c Sun Feb 14 19:38:27 2010 (r203889) @@ -305,10 +305,10 @@ cam_error_string(struct cam_device *devi entry = cam_fetch_status_entry(status); if (entry == NULL) - sbuf_printf(&sb, "CAM Status: Unknown (%#x)\n", + sbuf_printf(&sb, "CAM status: Unknown (%#x)\n", ccb->ccb_h.status); else - sbuf_printf(&sb, "CAM Status: %s\n", + sbuf_printf(&sb, "CAM status: %s\n", entry->status_text); } @@ -338,7 +338,7 @@ cam_error_string(struct cam_device *devi if (proto_flags & CAM_ESF_PRINT_STATUS) { sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "SCSI Status: %s\n", + sbuf_printf(&sb, "SCSI status: %s\n", scsi_status_string(&ccb->csio)); } Modified: stable/8/sys/cam/cam.h ============================================================================== --- stable/8/sys/cam/cam.h Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/cam.h Sun Feb 14 19:38:27 2010 (r203889) @@ -60,16 +60,29 @@ typedef u_int lun_id_t; struct cam_periph; /* - * Priority information for a CAM structure. The generation number is - * incremented everytime a new entry is entered into the queue giving round - * robin per priority level scheduling. + * Priority information for a CAM structure. + */ +typedef enum { + CAM_RL_HOST, + CAM_RL_BUS, + CAM_RL_XPT, + CAM_RL_DEV, + CAM_RL_NORMAL, + CAM_RL_VALUES +} cam_rl; +/* + * The generation number is incremented everytime a new entry is entered into + * the queue giving round robin per priority level scheduling. */ typedef struct { u_int32_t priority; -#define CAM_PRIORITY_BUS 0 -#define CAM_PRIORITY_DEV 0 -#define CAM_PRIORITY_NORMAL 1 +#define CAM_PRIORITY_HOST ((CAM_RL_HOST << 8) + 0x80) +#define CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80) +#define CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80) +#define CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80) +#define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) #define CAM_PRIORITY_NONE (u_int32_t)-1 +#define CAM_PRIORITY_TO_RL(x) ((x) >> 8) u_int32_t generation; int index; #define CAM_UNQUEUED_INDEX -1 Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/cam_ccb.h Sun Feb 14 19:38:27 2010 (r203889) @@ -126,7 +126,7 @@ typedef enum { XPT_PATH_INQ = 0x04, /* Path routing inquiry */ XPT_REL_SIMQ = 0x05, - /* Release a frozen SIM queue */ + /* Release a frozen device queue */ XPT_SASYNC_CB = 0x06, /* Set Asynchronous Callback Parameters */ XPT_SDEV_TYPE = 0x07, @@ -142,6 +142,8 @@ typedef enum { /* Path statistics (error counts, etc.) */ XPT_GDEV_STATS = 0x0c, /* Device statistics (error counts, etc.) */ + XPT_FREEZE_QUEUE = 0x0d, + /* Freeze device queue */ /* SCSI Control Functions: 0x10->0x1F */ XPT_ABORT = 0x10, /* Abort the specified CCB */ @@ -685,8 +687,9 @@ struct ccb_relsim { #define RELSIM_RELEASE_AFTER_TIMEOUT 0x02 #define RELSIM_RELEASE_AFTER_CMDCMPLT 0x04 #define RELSIM_RELEASE_AFTER_QEMPTY 0x08 +#define RELSIM_RELEASE_RUNLEVEL 0x10 u_int32_t openings; - u_int32_t release_timeout; + u_int32_t release_timeout; /* Abstract argument. */ u_int32_t qfrozen_cnt; }; Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Sun Feb 14 19:28:45 2010 (r203888) +++ stable/8/sys/cam/cam_periph.c Sun Feb 14 19:38:27 2010 (r203889) @@ -71,19 +71,20 @@ static void camperiphfree(struct cam_p static int camperiphscsistatuserror(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags, - union ccb *save_ccb, int *openings, u_int32_t *relsim_flags, - u_int32_t *timeout); + u_int32_t *timeout, + const char **action_string); static int camperiphscsisenseerror(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags, - union ccb *save_ccb, int *openings, u_int32_t *relsim_flags, - u_int32_t *timeout); + u_int32_t *timeout, + const char **action_string); static int nperiph_drivers; +static int initialized = 0; struct periph_driver **periph_drivers; MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers"); @@ -99,6 +100,7 @@ TUNABLE_INT("kern.cam.periph_busy_delay" void periphdriver_register(void *data) { + struct periph_driver *drv = (struct periph_driver *)data; struct periph_driver **newdrivers, **old; int ndrivers; @@ -108,13 +110,30 @@ periphdriver_register(void *data) if (periph_drivers) bcopy(periph_drivers, newdrivers, sizeof(*newdrivers) * nperiph_drivers); - newdrivers[nperiph_drivers] = (struct periph_driver *)data; + newdrivers[nperiph_drivers] = drv; newdrivers[nperiph_drivers + 1] = NULL; old = periph_drivers; periph_drivers = newdrivers; if (old) free(old, M_CAMPERIPH); nperiph_drivers++; + /* If driver marked as early or it is late now, initialize it. */ + if (((drv->flags & CAM_PERIPH_DRV_EARLY) != 0 && initialized > 0) || + initialized > 1) + (*drv->init)(); +} + +void +periphdriver_init(int level) +{ + int i, early; + + initialized = max(initialized, level); + for (i = 0; periph_drivers[i] != NULL; i++) { + early = (periph_drivers[i]->flags & CAM_PERIPH_DRV_EARLY) ? 1 : 2; + if (early == initialized) + (*periph_drivers[i]->init)(); + } } cam_status @@ -915,12 +934,14 @@ cam_periph_runccb(union ccb *ccb, } while (error == ERESTART); - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(ccb->ccb_h.path, /* relsim_flags */0, /* openings */0, /* timeout */0, /* getcount_only */ FALSE); + ccb->ccb_h.status &= ~CAM_DEV_QFRZN; + } if (ds != NULL) { if (ccb->ccb_h.func_code == XPT_SCSI_IO) { @@ -950,17 +971,26 @@ cam_periph_runccb(union ccb *ccb, void cam_freeze_devq(struct cam_path *path) { - struct ccb_hdr ccb_h; - xpt_setup_ccb(&ccb_h, path, CAM_PRIORITY_NORMAL); - ccb_h.func_code = XPT_NOOP; - ccb_h.flags = CAM_DEV_QFREEZE; - xpt_action((union ccb *)&ccb_h); + cam_freeze_devq_arg(path, 0, 0); +} + +void +cam_freeze_devq_arg(struct cam_path *path, uint32_t flags, uint32_t arg) +{ + struct ccb_relsim crs; + + xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NONE); + crs.ccb_h.func_code = XPT_FREEZE_QUEUE; + crs.release_flags = flags; + crs.openings = arg; + crs.release_timeout = arg; + xpt_action((union ccb *)&crs); } u_int32_t cam_release_devq(struct cam_path *path, u_int32_t relsim_flags, - u_int32_t openings, u_int32_t timeout, + u_int32_t openings, u_int32_t arg, int getcount_only) { struct ccb_relsim crs; @@ -970,22 +1000,92 @@ cam_release_devq(struct cam_path *path, crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0; crs.release_flags = relsim_flags; crs.openings = openings; - crs.release_timeout = timeout; + crs.release_timeout = arg; xpt_action((union ccb *)&crs); return (crs.qfrozen_cnt); } #define saved_ccb_ptr ppriv_ptr0 +#define recovery_depth ppriv_field1 +static void +camperiphsensedone(struct cam_periph *periph, union ccb *done_ccb) +{ + union ccb *saved_ccb = (union ccb *)done_ccb->ccb_h.saved_ccb_ptr; + cam_status status; + int frozen = 0; + u_int sense_key; + int depth = done_ccb->ccb_h.recovery_depth; + + status = done_ccb->ccb_h.status; + if (status & CAM_DEV_QFRZN) { + frozen = 1; + /* + * Clear freeze flag now for case of retry, + * freeze will be dropped later. + */ + done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN; + } + status &= CAM_STATUS_MASK; + switch (status) { + case CAM_REQ_CMP: + { + /* + * If we manually retrieved sense into a CCB and got + * something other than "NO SENSE" send the updated CCB + * back to the client via xpt_done() to be processed via + * the error recovery code again. + */ + sense_key = saved_ccb->csio.sense_data.flags; + sense_key &= SSD_KEY; + if (sense_key != SSD_KEY_NO_SENSE) { + saved_ccb->ccb_h.status |= + CAM_AUTOSNS_VALID; + } else { + saved_ccb->ccb_h.status &= + ~CAM_STATUS_MASK; + saved_ccb->ccb_h.status |= + CAM_AUTOSENSE_FAIL; + } + bcopy(saved_ccb, done_ccb, sizeof(union ccb)); + xpt_free_ccb(saved_ccb); + break; + } + default: + bcopy(saved_ccb, done_ccb, sizeof(union ccb)); + xpt_free_ccb(saved_ccb); + done_ccb->ccb_h.status &= ~CAM_STATUS_MASK; + done_ccb->ccb_h.status |= CAM_AUTOSENSE_FAIL; + break; + } + periph->flags &= ~CAM_PERIPH_SENSE_INPROG; + /* + * If it is the end of recovery, drop freeze, taken due to + * CAM_DEV_QFREEZE flag, set on recovery request. + */ + if (depth == 0) { + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*openings*/0, + /*timeout*/0, + /*getcount_only*/0); + } + /* + * Copy frozen flag from recovery request if it is set there + * for some reason. + */ + if (frozen != 0) + done_ccb->ccb_h.status |= CAM_DEV_QFRZN; + (*done_ccb->ccb_h.cbfcnp)(periph, done_ccb); +} + static void camperiphdone(struct cam_periph *periph, union ccb *done_ccb) { - union ccb *saved_ccb; + union ccb *saved_ccb, *save_ccb; cam_status status; int frozen = 0; - int sense; struct scsi_start_stop_unit *scsi_cmd; u_int32_t relsim_flags, timeout; - int xpt_done_ccb = FALSE; status = done_ccb->ccb_h.status; if (status & CAM_DEV_QFRZN) { @@ -996,14 +1096,12 @@ camperiphdone(struct cam_periph *periph, */ done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN; } - sense = (status & CAM_AUTOSNS_VALID) != 0; - status &= CAM_STATUS_MASK; timeout = 0; relsim_flags = 0; saved_ccb = (union ccb *)done_ccb->ccb_h.saved_ccb_ptr; - switch (status) { + switch (status & CAM_STATUS_MASK) { case CAM_REQ_CMP: { /* @@ -1012,57 +1110,19 @@ camperiphdone(struct cam_periph *periph, * the inquiry information. Many devices (mostly disks) * don't properly report their inquiry information unless * they are spun up. - * - * If we manually retrieved sense into a CCB and got - * something other than "NO SENSE" send the updated CCB - * back to the client via xpt_done() to be processed via - * the error recovery code again. */ - if (done_ccb->ccb_h.func_code == XPT_SCSI_IO) { - scsi_cmd = (struct scsi_start_stop_unit *) - &done_ccb->csio.cdb_io.cdb_bytes; - - if (scsi_cmd->opcode == START_STOP_UNIT) - xpt_async(AC_INQ_CHANGED, - done_ccb->ccb_h.path, NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:44:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D818106566B; Sun, 14 Feb 2010 19:44:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18BA78FC13; Sun, 14 Feb 2010 19:44:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJinHr066982; Sun, 14 Feb 2010 19:44:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJimcD066971; Sun, 14 Feb 2010 19:44:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141944.o1EJimcD066971@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203890 - in stable/8: . contrib/top lib/libusb sbin/camcontrol sys/cam sys/cam/ata sys/dev/ahci sys/dev/ata sys/dev/siis tools/regression/lib/msun tools/regression/usr.bin/pkill tools/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:44:49 -0000 Author: mav Date: Sun Feb 14 19:44:48 2010 New Revision: 203890 URL: http://svn.freebsd.org/changeset/base/203890 Log: MFC r203376, r203384: - Give ATA/SATA SIMs info about ATAPI packet size, supported by device. - Make ATA XPT to reject longer SCSI CDBs then supported by device, or any SCSI CDBs, if device doesn't support ATAPI. Modified: stable/8/sbin/camcontrol/camcontrol.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam_ccb.h stable/8/sys/cam/cam_xpt.c stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/ (props changed) stable/8/Makefile.inc1 (props changed) stable/8/ObsoleteFiles.inc (props changed) stable/8/UPDATING (props changed) stable/8/bin/ (props changed) stable/8/bin/chmod/ (props changed) stable/8/bin/cp/ (props changed) stable/8/bin/csh/ (props changed) stable/8/bin/getfacl/ (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/setfacl/ (props changed) stable/8/bin/sh/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/cddl/lib/libnvpair/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/cpio/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/crypto/heimdal/ (props changed) stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssl/ (props changed) stable/8/etc/ (props changed) stable/8/games/factor/ (props changed) stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/patch/ (props changed) stable/8/include/ (props changed) stable/8/kerberos5/lib/libgssapi_krb5/ (props changed) stable/8/kerberos5/lib/libgssapi_spnego/ (props changed) stable/8/kerberos5/usr.bin/kdestroy/ (props changed) stable/8/kerberos5/usr.bin/kpasswd/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libutil/ (props changed) stable/8/libexec/rtld-elf/ (props changed) stable/8/release/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/secure/usr.bin/bdes/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/share/mk/ (props changed) stable/8/share/timedef/ (props changed) stable/8/share/zoneinfo/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/bin/sh/ (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/lib/msun/test-conj.t (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/vimage/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sbin/camcontrol/camcontrol.c Sun Feb 14 19:44:48 2010 (r203890) @@ -1010,8 +1010,10 @@ camxferrate(struct cam_device *device) printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } else if (ccb->cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = @@ -1022,8 +1024,10 @@ camxferrate(struct cam_device *device) printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_SATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } @@ -2800,6 +2804,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(ata->mode)); } + if ((ata->valid & CTS_ATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + ata->atapi); + } if ((ata->valid & CTS_ATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, ata->bytecount); @@ -2817,6 +2825,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sATA mode: %s\n", pathstr, ata_mode2string(sata->mode)); } + if ((sata->valid & CTS_SATA_VALID_ATAPI) != 0) { + fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, + sata->atapi); + } if ((sata->valid & CTS_SATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", pathstr, sata->bytecount); Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:44:48 2010 (r203890) @@ -1334,7 +1334,20 @@ ata_device_transport(struct cam_path *pa cts.protocol = path->device->protocol; cts.protocol_version = path->device->protocol_version; cts.proto_specific.valid = 0; - cts.xport_specific.valid = 0; + if (ident_buf) { + if (path->device->transport == XPORT_ATA) { + cts.xport_specific.ata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.ata.valid = CTS_ATA_VALID_ATAPI; + } else { + cts.xport_specific.sata.atapi = + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) ? 16 : + ((ident_buf->config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) ? 12 : 0; + cts.xport_specific.sata.valid = CTS_SATA_VALID_ATAPI; + } + } else + cts.xport_specific.valid = 0; xpt_action((union ccb *)&cts); } @@ -1366,6 +1379,27 @@ ata_action(union ccb *start_ccb) (*(sim->sim_action))(sim, start_ccb); break; } + case XPT_SCSI_IO: + { + struct cam_ed *device; + u_int maxlen = 0; + + device = start_ccb->ccb_h.path->device; + if (device->protocol == PROTO_SCSI && + (device->flags & CAM_DEV_IDENTIFY_DATA_VALID)) { + uint16_t p = + device->ident_data.config & ATA_PROTO_MASK; + + maxlen = (p == ATA_PROTO_ATAPI_16) ? 16 : + (p == ATA_PROTO_ATAPI_12) ? 12 : 0; + } + if (start_ccb->csio.cdb_len > maxlen) { + start_ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(start_ccb); + break; + } + /* FALLTHROUGH */ + } default: xpt_action_default(start_ccb); break; Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/cam/cam_ccb.h Sun Feb 14 19:44:48 2010 (r203890) @@ -823,8 +823,10 @@ struct ccb_trans_settings_ata { u_int valid; /* Which fields to honor */ #define CTS_ATA_VALID_MODE 0x01 #define CTS_ATA_VALID_BYTECOUNT 0x02 +#define CTS_ATA_VALID_ATAPI 0x20 int mode; /* Mode */ u_int bytecount; /* Length of PIO transaction */ + u_int atapi; /* Length of ATAPI CDB */ }; struct ccb_trans_settings_sata { @@ -834,11 +836,13 @@ struct ccb_trans_settings_sata { #define CTS_SATA_VALID_REVISION 0x04 #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 +#define CTS_SATA_VALID_ATAPI 0x20 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ + u_int atapi; /* Length of ATAPI CDB */ }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/cam/cam_xpt.c Sun Feb 14 19:44:48 2010 (r203890) @@ -1201,8 +1201,10 @@ xpt_announce_periph(struct cam_periph *p printf(" ("); if (ata->valid & CTS_ATA_VALID_MODE) printf("%s, ", ata_mode2string(ata->mode)); + if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) + printf("ATAPI %dbytes, ", ata->atapi); if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", ata->bytecount); + printf("PIO %dbytes", ata->bytecount); printf(")"); } if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { @@ -1214,8 +1216,10 @@ xpt_announce_periph(struct cam_periph *p printf("SATA %d.x, ", sata->revision); if (sata->valid & CTS_SATA_VALID_MODE) printf("%s, ", ata_mode2string(sata->mode)); + if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0) + printf("ATAPI %dbytes, ", sata->atapi); if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO size %dbytes", sata->bytecount); + printf("PIO %dbytes", sata->bytecount); printf(")"); } if (path->device->inq_flags & SID_CmdQue Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:44:48 2010 (r203890) @@ -2213,6 +2213,8 @@ ahciaction(struct cam_sim *sim, union cc d->tags = min(ch->numslots, cts->xport_specific.sata.tags); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_PM) ch->pm_present = cts->xport_specific.sata.pm_present; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -2256,6 +2258,8 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/ahci/ahci.h Sun Feb 14 19:44:48 2010 (r203890) @@ -358,6 +358,7 @@ struct ahci_device { int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/ata/ata-all.c Sun Feb 14 19:44:48 2010 (r203890) @@ -1348,6 +1348,8 @@ ata_cam_begin_transaction(device_t dev, ccb->csio.cdb_io.cdb_ptr : ccb->csio.cdb_io.cdb_bytes, request->u.atapi.ccb, ccb->csio.cdb_len); request->flags |= ATA_R_ATAPI; + if (ch->curr[ccb->ccb_h.target_id].atapi == 16) + request->flags |= ATA_R_ATAPI16; if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && ch->curr[ccb->ccb_h.target_id].mode >= ATA_DMA) request->flags |= ATA_R_DMA; @@ -1358,7 +1360,6 @@ ata_cam_begin_transaction(device_t dev, } request->transfersize = min(request->bytecount, ch->curr[ccb->ccb_h.target_id].bytecount); -// request->callback = ad_done; request->retries = 0; request->timeout = (ccb->ccb_h.timeout + 999) / 1000; callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); @@ -1491,7 +1492,7 @@ ataaction(struct cam_sim *sim, union ccb if (ch->flags & ATA_SATA) { if (cts->xport_specific.sata.valid & CTS_SATA_VALID_REVISION) d->revision = cts->xport_specific.sata.revision; - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_MODE) { + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { d->mode = ATA_SETMODE(ch->dev, ccb->ccb_h.target_id, @@ -1499,8 +1500,10 @@ ataaction(struct cam_sim *sim, union ccb } else d->mode = cts->xport_specific.sata.mode; } - if (cts->xport_specific.ata.valid & CTS_SATA_VALID_BYTECOUNT) + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_BYTECOUNT) d->bytecount = min(8192, cts->xport_specific.sata.bytecount); + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) + d->atapi = cts->xport_specific.sata.atapi; } else { if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { @@ -1512,6 +1515,8 @@ ataaction(struct cam_sim *sim, union ccb } if (cts->xport_specific.ata.valid & CTS_ATA_VALID_BYTECOUNT) d->bytecount = cts->xport_specific.ata.bytecount; + if (cts->xport_specific.ata.valid & CTS_ATA_VALID_ATAPI) + d->atapi = cts->xport_specific.ata.atapi; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -1541,6 +1546,8 @@ ataaction(struct cam_sim *sim, union ccb } else cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; } else { cts->transport = XPORT_ATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; @@ -1548,6 +1555,8 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.ata.valid |= CTS_ATA_VALID_MODE; cts->xport_specific.ata.bytecount = d->bytecount; cts->xport_specific.ata.valid |= CTS_ATA_VALID_BYTECOUNT; + cts->xport_specific.ata.atapi = d->atapi; + cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/ata/ata-all.h Sun Feb 14 19:44:48 2010 (r203890) @@ -539,6 +539,7 @@ struct ata_cam_device { u_int revision; int mode; u_int bytecount; + u_int atapi; }; #endif Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/siis/siis.c Sun Feb 14 19:44:48 2010 (r203890) @@ -1671,6 +1671,8 @@ siisaction(struct cam_sim *sim, union cc else ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); } + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) + d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -1714,6 +1716,8 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_PM; cts->xport_specific.sata.tags = d->tags; cts->xport_specific.sata.valid |= CTS_SATA_VALID_TAGS; + cts->xport_specific.sata.atapi = d->atapi; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Sun Feb 14 19:38:27 2010 (r203889) +++ stable/8/sys/dev/siis/siis.h Sun Feb 14 19:44:48 2010 (r203890) @@ -356,6 +356,7 @@ struct siis_device { int revision; int mode; u_int bytecount; + u_int atapi; u_int tags; }; From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:46:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8E73106566B; Sun, 14 Feb 2010 19:46:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D74238FC14; Sun, 14 Feb 2010 19:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJksjD067491; Sun, 14 Feb 2010 19:46:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJksAg067487; Sun, 14 Feb 2010 19:46:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141946.o1EJksAg067487@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203891 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:46:55 -0000 Author: mav Date: Sun Feb 14 19:46:54 2010 New Revision: 203891 URL: http://svn.freebsd.org/changeset/base/203891 Log: MFC r203385: - Use separate buffer for identify data fetching. We can't use main buffer here if device already running, as data need to be formatted before use. - Remove some saved_ccb variables. They are unused now. Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sun Feb 14 19:44:48 2010 (r203890) +++ stable/8/sys/cam/ata/ata_da.c Sun Feb 14 19:46:54 2010 (r203891) @@ -123,7 +123,6 @@ struct ada_softc { int trim_running; struct disk_params params; struct disk *disk; - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -1098,8 +1097,7 @@ adaerror(union ccb *ccb, u_int32_t cam_f periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct ada_softc *)periph->softc; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } static void Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sun Feb 14 19:44:48 2010 (r203890) +++ stable/8/sys/cam/ata/ata_pmp.c Sun Feb 14 19:46:54 2010 (r203891) @@ -101,7 +101,6 @@ struct pmp_softc { int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 - union ccb saved_ccb; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -552,8 +551,7 @@ pmpdone(struct cam_periph *periph, union priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { + if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(done_ccb->ccb_h.path, Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:44:48 2010 (r203890) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:46:54 2010 (r203891) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -124,10 +123,9 @@ typedef enum { typedef struct { TAILQ_HEAD(, ccb_hdr) request_ccbs; + struct ata_params ident_data; probe_action action; - union ccb saved_ccb; probe_flags flags; - u_int8_t digest[16]; uint32_t pm_pid; uint32_t pm_prv; int restart; @@ -303,29 +301,13 @@ probestart(struct cam_periph *periph, un ata_reset_cmd(ataio); break; case PROBE_IDENTIFY: - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { - /* Prepare check that it is the same device. */ - MD5_CTX context; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(softc->digest, &context); - } cam_fill_ataio(ataio, 1, probedone, /*flags*/CAM_DIR_IN, 0, - /*data_ptr*/(u_int8_t *)ident_buf, - /*dxfer_len*/sizeof(struct ata_params), + /*data_ptr*/(u_int8_t *)&softc->ident_data, + /*dxfer_len*/sizeof(softc->ident_data), 30 * 1000); if (periph->path->device->protocol == PROTO_ATA) ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); @@ -695,8 +677,7 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if (cam_periph_error(done_ccb, 0, 0, - &softc->saved_ccb) == ERESTART) { +device_fail: if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -724,6 +705,8 @@ device_fail: if (cam_periph_error(done_c goto done; } noerror: + if (softc->restart) + goto done; switch (softc->action) { case PROBE_RESET: { @@ -766,6 +749,7 @@ noerror: { int16_t *ptr; + ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { *ptr = le16toh(*ptr); @@ -784,28 +768,22 @@ noerror: ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + ident_buf = &path->device->ident_data; if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ - MD5_CTX context; - u_int8_t digest[16]; - - MD5Init(&context); - MD5Update(&context, - (unsigned char *)ident_buf->model, - sizeof(ident_buf->model)); - MD5Update(&context, - (unsigned char *)ident_buf->revision, - sizeof(ident_buf->revision)); - MD5Update(&context, - (unsigned char *)ident_buf->serial, - sizeof(ident_buf->serial)); - MD5Final(digest, &context); - if (bcmp(digest, softc->digest, sizeof(digest))) { + if (bcmp(softc->ident_data.model, ident_buf->model, + sizeof(ident_buf->model)) || + bcmp(softc->ident_data.revision, ident_buf->revision, + sizeof(ident_buf->revision)) || + bcmp(softc->ident_data.serial, ident_buf->serial, + sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } + } else + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); } else { + bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) { free(path->device->serial_num, M_CAMXPT); From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:48:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5959106566B; Sun, 14 Feb 2010 19:48:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7178FC13; Sun, 14 Feb 2010 19:48:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJmrSn067960; Sun, 14 Feb 2010 19:48:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJmrYo067958; Sun, 14 Feb 2010 19:48:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141948.o1EJmrYo067958@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203892 - stable/8/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:48:53 -0000 Author: mav Date: Sun Feb 14 19:48:53 2010 New Revision: 203892 URL: http://svn.freebsd.org/changeset/base/203892 Log: MFC r203386: Change the way in which fake async events generated. Do not use taskqueue for lock decoupling, as it causes unwanted races. Modified: stable/8/sys/cam/cam_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Sun Feb 14 19:46:54 2010 (r203891) +++ stable/8/sys/cam/cam_xpt.c Sun Feb 14 19:48:53 2010 (r203892) @@ -2392,9 +2392,7 @@ xptsetasyncfunc(struct cam_ed *device, v { struct cam_path path; struct ccb_getdev cgd; - struct async_node *cur_entry; - - cur_entry = (struct async_node *)arg; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; /* * Don't report unconfigured devices (Wildcard devs, @@ -2413,7 +2411,7 @@ xptsetasyncfunc(struct cam_ed *device, v xpt_setup_ccb(&cgd.ccb_h, &path, CAM_PRIORITY_NORMAL); cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_FOUND_DEVICE, &path, &cgd); xpt_release_path(&path); @@ -2426,9 +2424,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, v { struct cam_path path; struct ccb_pathinq cpi; - struct async_node *cur_entry; - - cur_entry = (struct async_node *)arg; + struct ccb_setasync *csa = (struct ccb_setasync *)arg; xpt_compile_path(&path, /*periph*/NULL, bus->sim->path_id, @@ -2437,7 +2433,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, v xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - cur_entry->callback(cur_entry->callback_arg, + csa->callback(csa->callback_arg, AC_PATH_REGISTERED, &path, &cpi); xpt_release_path(&path); @@ -2445,35 +2441,6 @@ xptsetasyncbusfunc(struct cam_eb *bus, v return(1); } -static void -xpt_action_sasync_cb(void *context, int pending) -{ - struct async_node *cur_entry; - struct xpt_task *task; - uint32_t added; - - task = (struct xpt_task *)context; - cur_entry = (struct async_node *)task->data1; - added = task->data2; - - if ((added & AC_FOUND_DEVICE) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing devices. - */ - xpt_for_all_devices(xptsetasyncfunc, cur_entry); - } - if ((added & AC_PATH_REGISTERED) != 0) { - /* - * Get this peripheral up to date with all - * the currently existing busses. - */ - xpt_for_all_busses(xptsetasyncbusfunc, cur_entry); - } - - free(task, M_CAMXPT); -} - void xpt_action(union ccb *start_ccb) { @@ -2885,11 +2852,12 @@ xpt_action_default(union ccb *start_ccb) if (csa->event_enable == 0) { SLIST_REMOVE(async_head, cur_entry, async_node, links); - csa->ccb_h.path->device->refcount--; + xpt_release_device(csa->ccb_h.path->device); free(cur_entry, M_CAMXPT); } else { cur_entry->event_enable = csa->event_enable; } + csa->event_enable = added; } else { cur_entry = malloc(sizeof(*cur_entry), M_CAMXPT, M_NOWAIT); @@ -2901,29 +2869,8 @@ xpt_action_default(union ccb *start_ccb) cur_entry->callback_arg = csa->callback_arg; cur_entry->callback = csa->callback; SLIST_INSERT_HEAD(async_head, cur_entry, links); - csa->ccb_h.path->device->refcount++; + xpt_acquire_device(csa->ccb_h.path->device); } - - /* - * Need to decouple this operation via a taqskqueue so that - * the locking doesn't become a mess. - */ - if ((added & (AC_FOUND_DEVICE | AC_PATH_REGISTERED)) != 0) { - struct xpt_task *task; - - task = malloc(sizeof(struct xpt_task), M_CAMXPT, - M_NOWAIT); - if (task == NULL) { - csa->ccb_h.status = CAM_RESRC_UNAVAIL; - break; - } - - TASK_INIT(&task->task, 0, xpt_action_sasync_cb, task); - task->data1 = cur_entry; - task->data2 = added; - taskqueue_enqueue(taskqueue_thread, &task->task); - } - start_ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -4823,6 +4770,23 @@ xpt_register_async(int event, ac_callbac if (xptpath) { xpt_free_path(path); mtx_unlock(&xsoftc.xpt_lock); + + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_FOUND_DEVICE)) { + /* + * Get this peripheral up to date with all + * the currently existing devices. + */ + xpt_for_all_devices(xptsetasyncfunc, &csa); + } + if ((status == CAM_REQ_CMP) && + (csa.event_enable & AC_PATH_REGISTERED)) { + /* + * Get this peripheral up to date with all + * the currently existing busses. + */ + xpt_for_all_busses(xptsetasyncbusfunc, &csa); + } } return (status); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:50:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81DB11065672; Sun, 14 Feb 2010 19:50:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 704F98FC14; Sun, 14 Feb 2010 19:50:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJoX3u068377; Sun, 14 Feb 2010 19:50:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJoXj9068373; Sun, 14 Feb 2010 19:50:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141950.o1EJoXj9068373@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203893 - in stable/8/sys: cam/ata sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:50:33 -0000 Author: mav Date: Sun Feb 14 19:50:33 2010 New Revision: 203893 URL: http://svn.freebsd.org/changeset/base/203893 Log: MFC r203421: Add Power Up In Stand-by feature support. Device with PUIS enabled require explicit command to do initial spin-up. Mark that command with CAM_HIGH_POWER flag, to allow CAM manage staggered spin-up. Modified: stable/8/sys/cam/ata/ata_all.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/sys/ata.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/ata/ata_all.c ============================================================================== --- stable/8/sys/cam/ata/ata_all.c Sun Feb 14 19:48:53 2010 (r203892) +++ stable/8/sys/cam/ata/ata_all.c Sun Feb 14 19:50:33 2010 (r203893) @@ -146,6 +146,9 @@ ata_op_string(struct ata_cmd *cmd) case 0x03: return ("SETFEATURES SET TRANSFER MODE"); case 0x02: return ("SETFEATURES ENABLE WCACHE"); case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0x06: return ("SETFEATURES ENABLE PUIS"); + case 0x86: return ("SETFEATURES DISABLE PUIS"); + case 0x07: return ("SETFEATURES SPIN-UP"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:48:53 2010 (r203892) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:50:33 2010 (r203893) @@ -86,6 +86,7 @@ PERIPHDRIVER_DECLARE(aprobe, probe_drive typedef enum { PROBE_RESET, PROBE_IDENTIFY, + PROBE_SPINUP, PROBE_SETMODE, PROBE_SET_MULTI, PROBE_INQUIRY, @@ -98,6 +99,7 @@ typedef enum { static char *probe_action_text[] = { "PROBE_RESET", "PROBE_IDENTIFY", + "PROBE_SPINUP", "PROBE_SETMODE", "PROBE_SET_MULTI", "PROBE_INQUIRY", @@ -129,6 +131,7 @@ typedef struct { uint32_t pm_pid; uint32_t pm_prv; int restart; + int spinup; struct cam_periph *periph; } probe_softc; @@ -212,7 +215,7 @@ proberegister(struct cam_periph *periph, return(CAM_REQ_CMP_ERR); } - softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT); + softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_ZERO | M_NOWAIT); if (softc == NULL) { printf("proberegister: Unable to probe new device. " @@ -314,6 +317,19 @@ probestart(struct cam_periph *periph, un else ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); break; + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spinning up device\n"); + cam_fill_ataio(ataio, + 1, + probedone, + /*flags*/CAM_DIR_NONE | CAM_HIGH_POWER, + 0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + 30 * 1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_PUIS_SPINUP, 0, 0); + break; case PROBE_SETMODE: { int mode, wantmode; @@ -768,8 +784,18 @@ noerror: ata_bpack(ident_buf->revision, ident_buf->revision, sizeof(ident_buf->revision)); ata_btrim(ident_buf->serial, sizeof(ident_buf->serial)); ata_bpack(ident_buf->serial, ident_buf->serial, sizeof(ident_buf->serial)); + /* Device may need spin-up before IDENTIFY become valid. */ + if ((ident_buf->config & ATA_RESP_INCOMPLETE) || + ((ident_buf->support.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->enabled.command2 & ATA_SUPPORT_STANDBY) && + (ident_buf->support.command2 & ATA_SUPPORT_SPINUP) && + softc->spinup == 0)) { + PROBE_SET_ACTION(softc, PROBE_SPINUP); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } ident_buf = &path->device->ident_data; - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { /* Check that it is the same device. */ if (bcmp(softc->ident_data.model, ident_buf->model, @@ -829,6 +855,14 @@ noerror: xpt_schedule(periph, priority); return; } + case PROBE_SPINUP: + if (bootverbose) + xpt_print(path, "Spin-up done\n"); + softc->spinup = 1; + PROBE_SET_ACTION(softc, PROBE_IDENTIFY); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; case PROBE_SETMODE: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); Modified: stable/8/sys/sys/ata.h ============================================================================== --- stable/8/sys/sys/ata.h Sun Feb 14 19:48:53 2010 (r203892) +++ stable/8/sys/sys/ata.h Sun Feb 14 19:50:33 2010 (r203893) @@ -48,6 +48,7 @@ struct ata_params { #define ATA_DRQ_SLOW 0x0000 /* cpu 3 ms delay */ #define ATA_DRQ_INTR 0x0020 /* interrupt 10 ms delay */ #define ATA_DRQ_FAST 0x0040 /* accel 50 us delay */ +#define ATA_RESP_INCOMPLETE 0x0004 /*001*/ u_int16_t cylinders; /* # of cylinders */ u_int16_t reserved2; @@ -345,6 +346,9 @@ struct ata_params { #define ATA_SF_SETXFER 0x03 /* set transfer mode */ #define ATA_SF_ENAB_WCACHE 0x02 /* enable write cache */ #define ATA_SF_DIS_WCACHE 0x82 /* disable write cache */ +#define ATA_SF_ENAB_PUIS 0x06 /* enable PUIS */ +#define ATA_SF_DIS_PUIS 0x86 /* disable PUIS */ +#define ATA_SF_PUIS_SPINUP 0x07 /* PUIS spin-up */ #define ATA_SF_ENAB_RCACHE 0xaa /* enable readahead cache */ #define ATA_SF_DIS_RCACHE 0x55 /* disable readahead cache */ #define ATA_SF_ENAB_RELIRQ 0x5d /* enable release interrupt */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:51:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D6A71065672; Sun, 14 Feb 2010 19:51:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC8D8FC1D; Sun, 14 Feb 2010 19:51:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJpdYa068654; Sun, 14 Feb 2010 19:51:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJpd10068652; Sun, 14 Feb 2010 19:51:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141951.o1EJpd10068652@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203894 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:51:39 -0000 Author: mav Date: Sun Feb 14 19:51:39 2010 New Revision: 203894 URL: http://svn.freebsd.org/changeset/base/203894 Log: MFC r203499: On probe error, if restart requested, skip any retries and recovery. Just restart probe from the beginning immediately. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:50:33 2010 (r203893) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Feb 14 19:51:39 2010 (r203894) @@ -693,7 +693,8 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { +device_fail: if ((!softc->restart) && + cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:53:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D6011065670; Sun, 14 Feb 2010 19:53:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8E08FC22; Sun, 14 Feb 2010 19:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJr96R069034; Sun, 14 Feb 2010 19:53:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJr9pd069032; Sun, 14 Feb 2010 19:53:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141953.o1EJr9pd069032@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203895 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:53:09 -0000 Author: mav Date: Sun Feb 14 19:53:09 2010 New Revision: 203895 URL: http://svn.freebsd.org/changeset/base/203895 Log: MFC r203445: Report to CAM unit number of underlying ataX bus device, instead of this atapicamX. It is more apropriate and useful together with "ata" name. Modified: stable/8/sys/dev/ata/atapi-cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ata/atapi-cam.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cam.c Sun Feb 14 19:51:39 2010 (r203894) +++ stable/8/sys/dev/ata/atapi-cam.c Sun Feb 14 19:53:09 2010 (r203895) @@ -201,7 +201,7 @@ atapi_cam_attach(device_t dev) scp->parent = device_get_parent(dev); scp->ata_ch = device_get_softc(scp->parent); TAILQ_INIT(&scp->pending_hcbs); - unit = device_get_unit(dev); + unit = device_get_unit(device_get_parent(dev)); if ((devq = cam_simq_alloc(16)) == NULL) { error = ENOMEM; From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:53:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F0610656A5; Sun, 14 Feb 2010 19:53:45 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73AED8FC1B; Sun, 14 Feb 2010 19:53:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJrjOV069214; Sun, 14 Feb 2010 19:53:45 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJrjRO069212; Sun, 14 Feb 2010 19:53:45 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002141953.o1EJrjRO069212@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 19:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203896 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:53:45 -0000 Author: thompsa Date: Sun Feb 14 19:53:45 2010 New Revision: 203896 URL: http://svn.freebsd.org/changeset/base/203896 Log: Detect when we are polling from kernel via cngetc() in the boot process and reserve the keypresses so they do not get passed to syscons. Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Feb 14 19:53:09 2010 (r203895) +++ head/sys/dev/usb/input/ukbd.c Sun Feb 14 19:53:45 2010 (r203896) @@ -151,6 +151,7 @@ struct ukbd_softc { struct ukbd_data sc_ndata; struct ukbd_data sc_odata; + struct thread *sc_poll_thread; struct usb_device *sc_udev; struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; @@ -174,9 +175,10 @@ struct ukbd_softc { #define UKBD_FLAG_APPLE_SWAP 0x0100 #define UKBD_FLAG_TIMER_RUNNING 0x0200 - int32_t sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ - int32_t sc_state; /* shift/lock key state */ - int32_t sc_accents; /* accent key index (> 0) */ + int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ + int sc_state; /* shift/lock key state */ + int sc_accents; /* accent key index (> 0) */ + int sc_poll_tick_last; uint16_t sc_inputs; uint16_t sc_inputhead; @@ -187,6 +189,7 @@ struct ukbd_softc { uint8_t sc_iface_no; uint8_t sc_kbd_id; uint8_t sc_led_id; + uint8_t sc_poll_detected; }; #define KEY_ERROR 0x01 @@ -281,6 +284,9 @@ static int ukbd_ioctl(keyboard_t *, u_lo static int ukbd_enable(keyboard_t *); static int ukbd_disable(keyboard_t *); static void ukbd_interrupt(struct ukbd_softc *); +static int ukbd_is_polling(struct ukbd_softc *); +static int ukbd_polls_other_thread(struct ukbd_softc *); +static void ukbd_event_keyinput(struct ukbd_softc *); static device_probe_t ukbd_probe; static device_attach_t ukbd_attach; @@ -331,8 +337,21 @@ ukbd_do_poll(struct ukbd_softc *sc, uint { DPRINTFN(2, "polling\n"); - if (kdb_active == 0) + /* update stats about last polling event */ + sc->sc_poll_tick_last = ticks; + sc->sc_poll_detected = 1; + + if (kdb_active == 0) { + while (sc->sc_inputs == 0) { + /* make sure the USB code gets a chance to run */ + pause("UKBD", 1); + + /* check if we should wait */ + if (!wait) + break; + } return; /* Only poll if KDB is active */ + } while (sc->sc_inputs == 0) { @@ -366,9 +385,13 @@ ukbd_get_key(struct ukbd_softc *sc, uint /* start transfer, if not already started */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); } - if (sc->sc_flags & UKBD_FLAG_POLLING) { + + if (ukbd_polls_other_thread(sc)) + return (-1); + + if (sc->sc_flags & UKBD_FLAG_POLLING) ukbd_do_poll(sc, wait); - } + if (sc->sc_inputs == 0) { c = -1; } else { @@ -389,14 +412,13 @@ ukbd_interrupt(struct ukbd_softc *sc) uint32_t o_mod; uint32_t now = sc->sc_time_ms; uint32_t dtime; - uint32_t c; uint8_t key; uint8_t i; uint8_t j; - if (sc->sc_ndata.keycode[0] == KEY_ERROR) { - goto done; - } + if (sc->sc_ndata.keycode[0] == KEY_ERROR) + return; + n_mod = sc->sc_ndata.modifiers; o_mod = sc->sc_odata.modifiers; if (n_mod != o_mod) { @@ -469,14 +491,22 @@ pfound: ; sc->sc_odata = sc->sc_ndata; - bcopy(sc->sc_ntime, sc->sc_otime, sizeof(sc->sc_otime)); + memcpy(sc->sc_otime, sc->sc_ntime, sizeof(sc->sc_otime)); + + ukbd_event_keyinput(sc); +} + +static void +ukbd_event_keyinput(struct ukbd_softc *sc) +{ + int c; + + if (ukbd_is_polling(sc)) + return; + + if (sc->sc_inputs == 0) + return; - if (sc->sc_inputs == 0) { - goto done; - } - if (sc->sc_flags & UKBD_FLAG_POLLING) { - goto done; - } if (KBD_IS_ACTIVE(&sc->sc_kbd) && KBD_IS_BUSY(&sc->sc_kbd)) { /* let the callback function process the input */ @@ -488,8 +518,6 @@ pfound: ; c = ukbd_read_char(&sc->sc_kbd, 0); } while (c != NOKEY); } -done: - return; } static void @@ -499,12 +527,14 @@ ukbd_timeout(void *arg) mtx_assert(&Giant, MA_OWNED); - if (!(sc->sc_flags & UKBD_FLAG_POLLING)) { - sc->sc_time_ms += 25; /* milliseconds */ - } + sc->sc_time_ms += 25; /* milliseconds */ + ukbd_interrupt(sc); - if (ukbd_any_key_pressed(sc)) { + /* Make sure any leftover key events gets read out */ + ukbd_event_keyinput(sc); + + if (ukbd_any_key_pressed(sc) || (sc->sc_inputs != 0)) { ukbd_start_timer(sc); } else { sc->sc_flags &= ~UKBD_FLAG_TIMER_RUNNING; @@ -837,6 +867,18 @@ ukbd_attach(device_t dev) */ KBD_PROBE_DONE(kbd); + /* + * Set boot protocol if we need the quirk. + */ + if (usb_test_quirk(uaa, UQ_KBD_BOOTPROTO)) { + err = usbd_req_set_protocol(sc->sc_udev, NULL, + sc->sc_iface_index, 0); + if (err != USB_ERR_NORMAL_COMPLETION) { + DPRINTF("set protocol error=%s\n", usbd_errstr(err)); + goto detach; + } + } + /* figure out if there is an ID byte in the data */ err = usbd_req_get_hid_desc(uaa->device, NULL, &hid_ptr, &hid_len, M_TEMP, uaa->info.bIfaceIndex); @@ -880,10 +922,14 @@ ukbd_attach(device_t dev) /* ignore if SETIDLE fails, hence it is not crucial */ err = usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0); + mtx_lock(&Giant); + ukbd_ioctl(kbd, KDSETLED, (caddr_t)&sc->sc_state); KBD_INIT_DONE(kbd); + mtx_unlock(&Giant); + if (kbd_register(kbd) < 0) { goto detach; } @@ -925,9 +971,8 @@ ukbd_detach(device_t dev) DPRINTF("\n"); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - panic("cannot detach polled keyboard\n"); - } + mtx_lock(&Giant); + sc->sc_flags |= UKBD_FLAG_GONE; usb_callout_stop(&sc->sc_callout); @@ -954,6 +999,8 @@ ukbd_detach(device_t dev) } sc->sc_kbd.kb_flags = 0; + mtx_unlock(&Giant); + usbd_transfer_unsetup(sc->sc_xfer, UKBD_N_TRANSFER); usb_callout_drain(&sc->sc_callout); @@ -969,8 +1016,12 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); + mtx_lock(&Giant); + ukbd_clear_state(&sc->sc_kbd); + mtx_unlock(&Giant); + return (0); } @@ -1076,13 +1127,19 @@ ukbd_check(keyboard_t *kbd) mtx_unlock(&Giant); return (retval); } - ukbd_do_poll(sc, 0); } else { /* XXX the keyboard layer requires Giant */ if (!mtx_owned(&Giant)) return (0); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (0); + + if (sc->sc_flags & UKBD_FLAG_POLLING) + ukbd_do_poll(sc, 0); + #ifdef UKBD_EMULATE_ATSCANCODE if (sc->sc_buffered_char[0]) { return (1); @@ -1118,6 +1175,10 @@ ukbd_check_char(keyboard_t *kbd) return (0); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (0); + if ((sc->sc_composed_char > 0) && (!(sc->sc_flags & UKBD_FLAG_COMPOSE))) { return (1); @@ -1156,6 +1217,10 @@ ukbd_read(keyboard_t *kbd, int wait) return (-1); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (-1); + #ifdef UKBD_EMULATE_ATSCANCODE if (sc->sc_buffered_char[0]) { scancode = sc->sc_buffered_char[0]; @@ -1220,6 +1285,10 @@ ukbd_read_char(keyboard_t *kbd, int wait return (NOKEY); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (NOKEY); + next_code: /* do we have a composed char to return ? */ @@ -1419,7 +1488,17 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, * keyboard system must get out of "Giant" first, before the * CPU can proceed here ... */ - return (EINVAL); + switch (cmd) { + case KDGKBMODE: + case KDSKBMODE: + /* workaround for Geli */ + mtx_lock(&Giant); + i = ukbd_ioctl(kbd, cmd, arg); + mtx_unlock(&Giant); + return (i); + default: + return (EINVAL); + } } switch (cmd) { @@ -1445,7 +1524,8 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, case K_RAW: case K_CODE: if (sc->sc_mode != *(int *)arg) { - ukbd_clear_state(kbd); + if (ukbd_is_polling(sc) == 0) + ukbd_clear_state(kbd); sc->sc_mode = *(int *)arg; } break; @@ -1552,7 +1632,11 @@ ukbd_clear_state(keyboard_t *kbd) struct ukbd_softc *sc = kbd->kb_data; if (!mtx_owned(&Giant)) { - return; /* XXX */ + /* XXX cludge */ + mtx_lock(&Giant); + ukbd_clear_state(kbd); + mtx_unlock(&Giant); + return; } sc->sc_flags &= ~(UKBD_FLAG_COMPOSE | UKBD_FLAG_POLLING); @@ -1563,10 +1647,10 @@ ukbd_clear_state(keyboard_t *kbd) sc->sc_buffered_char[0] = 0; sc->sc_buffered_char[1] = 0; #endif - bzero(&sc->sc_ndata, sizeof(sc->sc_ndata)); - bzero(&sc->sc_odata, sizeof(sc->sc_odata)); - bzero(&sc->sc_ntime, sizeof(sc->sc_ntime)); - bzero(&sc->sc_otime, sizeof(sc->sc_otime)); + memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); + memset(&sc->sc_odata, 0, sizeof(sc->sc_odata)); + memset(&sc->sc_ntime, 0, sizeof(sc->sc_ntime)); + memset(&sc->sc_otime, 0, sizeof(sc->sc_otime)); } /* save the internal state, not used */ @@ -1584,6 +1668,30 @@ ukbd_set_state(keyboard_t *kbd, void *bu } static int +ukbd_is_polling(struct ukbd_softc *sc) +{ + int delta; + + if (sc->sc_flags & UKBD_FLAG_POLLING) + return (1); /* polling */ + + delta = ticks - sc->sc_poll_tick_last; + if ((delta < 0) || (delta >= hz)) { + sc->sc_poll_detected = 0; + return (0); /* not polling */ + } + + return (sc->sc_poll_detected); +} + +static int +ukbd_polls_other_thread(struct ukbd_softc *sc) +{ + return (ukbd_is_polling(sc) && + (sc->sc_poll_thread != curthread)); +} + +static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd->kb_data; @@ -1599,8 +1707,10 @@ ukbd_poll(keyboard_t *kbd, int on) if (on) { sc->sc_flags |= UKBD_FLAG_POLLING; + sc->sc_poll_thread = curthread; } else { sc->sc_flags &= ~UKBD_FLAG_POLLING; + ukbd_start_timer(sc); /* start timer */ } return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:54:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAB4210656A3; Sun, 14 Feb 2010 19:54:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9990A8FC21; Sun, 14 Feb 2010 19:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJsGh8069351; Sun, 14 Feb 2010 19:54:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJsGj9069349; Sun, 14 Feb 2010 19:54:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141954.o1EJsGj9069349@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203897 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:54:16 -0000 Author: mav Date: Sun Feb 14 19:54:16 2010 New Revision: 203897 URL: http://svn.freebsd.org/changeset/base/203897 Log: MFC r203525: Report SATA300 chips also as SATA. Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Feb 14 19:53:45 2010 (r203896) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Feb 14 19:54:16 2010 (r203897) @@ -471,7 +471,8 @@ ata_siiprb_ch_attach(device_t dev) ch->hw.softreset = ata_siiprb_softreset; ch->hw.pm_read = ata_siiprb_pm_read; ch->hw.pm_write = ata_siiprb_pm_write; - + ch->flags |= ATA_NO_SLAVE; + ch->flags |= ATA_SATA; return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:55:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 973A7106566C; Sun, 14 Feb 2010 19:55:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 867098FC27; Sun, 14 Feb 2010 19:55:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJtf7g069754; Sun, 14 Feb 2010 19:55:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJtfpa069752; Sun, 14 Feb 2010 19:55:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141955.o1EJtfpa069752@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203898 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:55:41 -0000 Author: mav Date: Sun Feb 14 19:55:41 2010 New Revision: 203898 URL: http://svn.freebsd.org/changeset/base/203898 Log: MFC r203347: NetCell is a PCI hardware RAID without cable and mode setting. Modified: stable/8/sys/dev/ata/chipsets/ata-netcell.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-netcell.c Sun Feb 14 19:54:16 2010 (r203897) +++ stable/8/sys/dev/ata/chipsets/ata-netcell.c Sun Feb 14 19:55:41 2010 (r203898) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_netcell_chipinit(device_t dev); static int ata_netcell_ch_attach(device_t dev); +static int ata_netcell_setmode(device_t dev, int target, int mode); /* * NetCell chipset support functions @@ -80,7 +81,7 @@ ata_netcell_chipinit(device_t dev) return ENXIO; ctlr->ch_attach = ata_netcell_ch_attach; - ctlr->setmode = ata_generic_setmode; + ctlr->setmode = ata_netcell_setmode; return 0; } @@ -95,7 +96,16 @@ ata_netcell_ch_attach(device_t dev) /* the NetCell only supports 16 bit PIO transfers */ ch->flags |= ATA_USE_16BIT; + /* It is a hardware RAID without cable. */ + ch->flags |= ATA_CHECKS_CABLE; return 0; } +static int +ata_netcell_setmode(device_t dev, int target, int mode) +{ + + return (min(mode, ATA_UDMA6)); +} + ATA_DECLARE_DRIVER(ata_netcell); From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:56:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B091065692; Sun, 14 Feb 2010 19:56:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 924758FC1D; Sun, 14 Feb 2010 19:56:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJu5k2069896; Sun, 14 Feb 2010 19:56:05 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJu5DU069893; Sun, 14 Feb 2010 19:56:05 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002141956.o1EJu5DU069893@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 19:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203899 - head/sys/dev/usb/quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:56:05 -0000 Author: thompsa Date: Sun Feb 14 19:56:05 2010 New Revision: 203899 URL: http://svn.freebsd.org/changeset/base/203899 Log: Add UQ_KBD_BOOTPROTO quirk needed in r203896 Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/quirk/usb_quirk.h Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Sun Feb 14 19:55:41 2010 (r203898) +++ head/sys/dev/usb/quirk/usb_quirk.c Sun Feb 14 19:56:05 2010 (r203899) @@ -459,6 +459,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BUS_POWERED] = "UQ_BUS_POWERED", [UQ_HID_IGNORE] = "UQ_HID_IGNORE", [UQ_KBD_IGNORE] = "UQ_KBD_IGNORE", + [UQ_KBD_BOOTPROTO] = "UQ_KBD_BOOTPROTO", [UQ_MS_BAD_CLASS] = "UQ_MS_BAD_CLASS", [UQ_MS_LEADING_BYTE] = "UQ_MS_LEADING_BYTE", [UQ_MS_REVZ] = "UQ_MS_REVZ", Modified: head/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.h Sun Feb 14 19:55:41 2010 (r203898) +++ head/sys/dev/usb/quirk/usb_quirk.h Sun Feb 14 19:56:05 2010 (r203899) @@ -45,6 +45,7 @@ enum { /* keep in sync with usb_quirk_st UQ_BUS_POWERED, /* device is bus powered, despite claim */ UQ_HID_IGNORE, /* device should be ignored by hid class */ UQ_KBD_IGNORE, /* device should be ignored by kbd class */ + UQ_KBD_BOOTPROTO, /* device should set the boot protocol */ UQ_MS_BAD_CLASS, /* doesn't identify properly */ UQ_MS_LEADING_BYTE, /* mouse sends an unknown leading byte */ UQ_MS_REVZ, /* mouse has Z-axis reversed */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:56:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 487FA106568F; Sun, 14 Feb 2010 19:56:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37E0A8FC19; Sun, 14 Feb 2010 19:56:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJuhp9070072; Sun, 14 Feb 2010 19:56:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJuh5X070070; Sun, 14 Feb 2010 19:56:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141956.o1EJuh5X070070@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203900 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:56:43 -0000 Author: mav Date: Sun Feb 14 19:56:42 2010 New Revision: 203900 URL: http://svn.freebsd.org/changeset/base/203900 Log: MFC r203449: Implement poll method for atapicam. It is not perfect, but better then nothing. Modified: stable/8/sys/dev/ata/atapi-cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ata/atapi-cam.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cam.c Sun Feb 14 19:56:05 2010 (r203899) +++ stable/8/sys/dev/ata/atapi-cam.c Sun Feb 14 19:56:42 2010 (r203900) @@ -682,8 +682,12 @@ action_invalid: static void atapi_poll(struct cam_sim *sim) { - /* do nothing - we do not actually service any interrupts */ - printf("atapi_poll called!\n"); + struct atapi_xpt_softc *softc = + (struct atapi_xpt_softc*)cam_sim_softc(sim); + + mtx_unlock(&softc->state_lock); + ata_interrupt(softc->ata_ch); + mtx_lock(&softc->state_lock); } static void From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:57:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85AAC1065670; Sun, 14 Feb 2010 19:57:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7374C8FC13; Sun, 14 Feb 2010 19:57:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJvs3F070385; Sun, 14 Feb 2010 19:57:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJvsBX070382; Sun, 14 Feb 2010 19:57:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141957.o1EJvsBX070382@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203901 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:57:54 -0000 Author: mav Date: Sun Feb 14 19:57:54 2010 New Revision: 203901 URL: http://svn.freebsd.org/changeset/base/203901 Log: MFC r203123: Add FIS-based switching support. If controller supports FBS, it allows several devices beyond Port Multiplier to work simultaneously, substantially increasing performance. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:56:42 2010 (r203900) +++ stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:57:54 2010 (r203901) @@ -78,7 +78,7 @@ static void ahci_dmafini(device_t dev); static void ahci_slotsalloc(device_t dev); static void ahci_slotsfree(device_t dev); static void ahci_reset(device_t dev); -static void ahci_start(device_t dev); +static void ahci_start(device_t dev, int fbs); static void ahci_stop(device_t dev); static void ahci_clo(device_t dev); static void ahci_start_fr(device_t dev); @@ -86,6 +86,7 @@ static void ahci_stop_fr(device_t dev); static int ahci_sata_connect(struct ahci_channel *ch); static int ahci_sata_phy_reset(device_t dev); +static int ahci_wait_ready(device_t dev, int t); static void ahci_issue_read_log(device_t dev); static void ahci_process_read_log(device_t dev, union ccb *ccb); @@ -108,6 +109,7 @@ static struct { #define AHCI_Q_4CH 32 #define AHCI_Q_EDGEIS 64 #define AHCI_Q_SATA2 128 +#define AHCI_Q_NOBSYRES 256 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -162,8 +164,8 @@ static struct { {0x612111ab, 0x00, "Marvell 88SX6121", AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS}, {0x614111ab, 0x00, "Marvell 88SX6141", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, - {0x91231b4b, 0x11, "Marvell 88SE912x", 0}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x044c10de, 0x00, "NVIDIA MCP65", 0}, {0x044d10de, 0x00, "NVIDIA MCP65", 0}, {0x044e10de, 0x00, "NVIDIA MCP65", 0}, @@ -379,14 +381,16 @@ ahci_attach(device_t dev) /* Announce HW capabilities. */ speed = (ctlr->caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; device_printf(dev, - "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n", + "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s%s\n", ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f), ((version >> 4) & 0xf0) + (version & 0x0f), (ctlr->caps & AHCI_CAP_NPMASK) + 1, ((speed == 1) ? "1.5":((speed == 2) ? "3": ((speed == 3) ? "6":"?"))), (ctlr->caps & AHCI_CAP_SPM) ? - "supported" : "not supported"); + "supported" : "not supported", + (ctlr->caps & AHCI_CAP_FBSS) ? + " with FBS" : ""); if (bootverbose) { device_printf(dev, "Caps:%s%s%s%s%s%s%s%s %sGbps", (ctlr->caps & AHCI_CAP_64BIT) ? " 64bit":"", @@ -419,7 +423,7 @@ ahci_attach(device_t dev) (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":""); } if (bootverbose && (ctlr->caps & AHCI_CAP_EMS)) { - device_printf(dev, "EM Caps: %s%s%s%s%s%s%s%s\n", + device_printf(dev, "EM Caps:%s%s%s%s%s%s%s%s\n", (ctlr->capsem & AHCI_EM_PM) ? " PM":"", (ctlr->capsem & AHCI_EM_ALHD) ? " ALHD":"", (ctlr->capsem & AHCI_EM_XMT) ? " XMT":"", @@ -804,6 +808,7 @@ ahci_ch_attach(device_t dev) struct ahci_channel *ch = device_get_softc(dev); struct cam_devq *devq; int rid, error, i, sata_rev = 0; + u_int32_t version; ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); @@ -855,6 +860,18 @@ ahci_ch_attach(device_t dev) error = ENXIO; goto err1; } + ch->chcaps = ATA_INL(ch->r_mem, AHCI_P_CMD); + version = ATA_INL(ctlr->r_mem, AHCI_VS); + if (version < 0x00010020 && (ctlr->caps & AHCI_CAP_FBSS)) + ch->chcaps |= AHCI_P_CMD_FBSCP; + if (bootverbose) { + device_printf(dev, "Caps:%s%s%s%s%s\n", + (ch->chcaps & AHCI_P_CMD_HPCP) ? " HPCP":"", + (ch->chcaps & AHCI_P_CMD_MPSP) ? " MPSP":"", + (ch->chcaps & AHCI_P_CMD_CPD) ? " CPD":"", + (ch->chcaps & AHCI_P_CMD_ESP) ? " ESP":"", + (ch->chcaps & AHCI_P_CMD_FBSCP) ? " FBSCP":""); + } /* Create the device queue for our SIM. */ devq = cam_simq_alloc(ch->numslots); if (devq == NULL) { @@ -971,7 +988,7 @@ ahci_ch_resume(device_t dev) ((ch->pm_level == 2 || ch->pm_level == 3) ? AHCI_P_CMD_ALPE : 0) | ((ch->pm_level > 2) ? AHCI_P_CMD_ASP : 0 ))); ahci_start_fr(dev); - ahci_start(dev); + ahci_start(dev, 1); return (0); } @@ -1001,6 +1018,7 @@ ahci_dmainit(device_t dev) { struct ahci_channel *ch = device_get_softc(dev); struct ahci_dc_cb_args dcba; + size_t rfsize; if (ch->caps & AHCI_CAP_64BIT) ch->dma.max_address = BUS_SPACE_MAXADDR; @@ -1022,16 +1040,20 @@ ahci_dmainit(device_t dev) } ch->dma.work_bus = dcba.maddr; /* FIS receive area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 4096, 0, + if (ch->chcaps & AHCI_P_CMD_FBSCP) + rfsize = 4096; + else + rfsize = 256; + if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, ch->dma.max_address, BUS_SPACE_MAXADDR, - NULL, NULL, 4096, 1, 4096, + NULL, NULL, rfsize, 1, rfsize, 0, NULL, NULL, &ch->dma.rfis_tag)) goto error; if (bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, &ch->dma.rfis_map)) goto error; if (bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, - 4096, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + rfsize, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map); goto error; } @@ -1219,7 +1241,7 @@ ahci_ch_intr(void *data) struct ahci_channel *ch = device_get_softc(dev); uint32_t istatus, sstatus, cstatus, serr = 0, sntf = 0, ok, err; enum ahci_err_type et; - int i, ccs, ncq_err = 0; + int i, ccs, port; /* Read and clear interrupt statuses. */ istatus = ATA_INL(ch->r_mem, AHCI_P_IS); @@ -1232,7 +1254,17 @@ ahci_ch_intr(void *data) if (istatus & AHCI_P_IX_SDB) { if (ch->caps & AHCI_CAP_SSNTF) sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF); - else { + else if (ch->fbs_enabled) { + u_int8_t *fis = ch->dma.rfis + 0x58; + + for (i = 0; i < 16; i++) { + if (fis[1] & 0x80) { + fis[1] &= 0x7f; + sntf |= 1 << i; + } + fis += 256; + } + } else { u_int8_t *fis = ch->dma.rfis + 0x58; if (fis[1] & 0x80) @@ -1251,18 +1283,35 @@ ahci_ch_intr(void *data) /* Process command errors */ if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) { -//device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n", -// __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), -// serr); ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; +//device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x fbs %08x ccs %d\n", +// __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), +// serr, ATA_INL(ch->r_mem, AHCI_P_FBS), ccs); + port = -1; + if (ch->fbs_enabled) { + uint32_t fbs = ATA_INL(ch->r_mem, AHCI_P_FBS); + if (fbs & AHCI_P_FBS_SDE) { + port = (fbs & AHCI_P_FBS_DWE) + >> AHCI_P_FBS_DWE_SHIFT; + } else { + for (i = 0; i < 16; i++) { + if (ch->numrslotspd[i] == 0) + continue; + if (port == -1) + port = i; + else if (port != i) { + port = -2; + break; + } + } + } + } err = ch->rslots & (cstatus | sstatus); - /* Kick controller into sane state */ - ahci_stop(dev); - ahci_start(dev); } else { ccs = 0; err = 0; + port = -1; } /* Complete all successfull commands. */ ok = ch->rslots & ~(cstatus | sstatus); @@ -1286,9 +1335,14 @@ ahci_ch_intr(void *data) /* XXX: reqests in loading state. */ if (((err >> i) & 1) == 0) continue; + if (port >= 0 && + ch->slot[i].ccb->ccb_h.target_id != port) + continue; if (istatus & AHCI_P_IX_TFE) { + if (port != -2) { /* Task File Error */ - if (ch->numtslots == 0) { + if (ch->numtslotspd[ + ch->slot[i].ccb->ccb_h.target_id] == 0) { /* Untagged operation. */ if (i == ccs) et = AHCI_ERR_TFE; @@ -1297,10 +1351,13 @@ ahci_ch_intr(void *data) } else { /* Tagged operation. */ et = AHCI_ERR_NCQ; - ncq_err = 1; } + } else { + et = AHCI_ERR_TFE; + ch->fatalerr = 1; + } } else if (istatus & AHCI_P_IX_IF) { - if (ch->numtslots == 0 && i != ccs) + if (ch->numtslots == 0 && i != ccs && port != -2) et = AHCI_ERR_INNOCENT; else et = AHCI_ERR_SATA; @@ -1308,8 +1365,12 @@ ahci_ch_intr(void *data) et = AHCI_ERR_INVALID; ahci_end_transaction(&ch->slot[i], et); } - if (ncq_err) - ahci_issue_read_log(dev); + /* + * We can't reinit port if there are some other + * commands active, use resume to complete them. + */ + if (ch->rslots != 0) + ATA_OUTL(ch->r_mem, AHCI_P_FBS, AHCI_P_FBS_EN | AHCI_P_FBS_DEC); } /* Process NOTIFY events */ if (sntf) @@ -1321,24 +1382,39 @@ static int ahci_check_collision(device_t dev, union ccb *ccb) { struct ahci_channel *ch = device_get_softc(dev); + int t = ccb->ccb_h.target_id; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { - /* Tagged command while untagged are active. */ - if (ch->numrslots != 0 && ch->numtslots == 0) - return (1); - /* Tagged command while tagged to other target is active. */ - if (ch->numtslots != 0 && - ch->taggedtarget != ccb->ccb_h.target_id) - return (1); /* Tagged command while we have no supported tag free. */ if (((~ch->oslots) & (0xffffffff >> (32 - - ch->curr[ccb->ccb_h.target_id].tags))) == 0) + ch->curr[t].tags))) == 0) return (1); + /* If we have FBS */ + if (ch->fbs_enabled) { + /* Tagged command while untagged are active. */ + if (ch->numrslotspd[t] != 0 && ch->numtslotspd[t] == 0) + return (1); + } else { + /* Tagged command while untagged are active. */ + if (ch->numrslots != 0 && ch->numtslots == 0) + return (1); + /* Tagged command while tagged to other target is active. */ + if (ch->numtslots != 0 && + ch->taggedtarget != ccb->ccb_h.target_id) + return (1); + } } else { - /* Untagged command while tagged are active. */ - if (ch->numrslots != 0 && ch->numtslots != 0) - return (1); + /* If we have FBS */ + if (ch->fbs_enabled) { + /* Untagged command while tagged are active. */ + if (ch->numrslotspd[t] != 0 && ch->numtslotspd[t] != 0) + return (1); + } else { + /* Untagged command while tagged are active. */ + if (ch->numrslots != 0 && ch->numtslots != 0) + return (1); + } } if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & (CAM_ATAIO_CONTROL | CAM_ATAIO_NEEDRESULT))) { @@ -1383,9 +1459,11 @@ ahci_begin_transaction(device_t dev, uni /* Update channel stats. */ ch->oslots |= (1 << slot->slot); ch->numrslots++; + ch->numrslotspd[ccb->ccb_h.target_id]++; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { ch->numtslots++; + ch->numtslotspd[ccb->ccb_h.target_id]++; ch->taggedtarget = ccb->ccb_h.target_id; } if ((ccb->ccb_h.func_code == XPT_ATA_IO) && @@ -1453,7 +1531,9 @@ ahci_execute_transaction(struct ahci_slo struct ahci_cmd_list *clp; union ccb *ccb = slot->ccb; int port = ccb->ccb_h.target_id & 0x0f; - int fis_size; + int fis_size, i; + uint8_t *fis = ch->dma.rfis + 0x40; + uint8_t val; /* Get a piece of the workspace for this request */ ctp = (struct ahci_cmd_tab *) @@ -1475,13 +1555,18 @@ ahci_execute_transaction(struct ahci_slo (port << 12); /* Special handling for Soft Reset command. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && - (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && - (ccb->ataio.cmd.control & ATA_A_RESET)) { - /* Kick controller into sane state */ - ahci_stop(dev); - ahci_clo(dev); - ahci_start(dev); - clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) { + if (ccb->ataio.cmd.control & ATA_A_RESET) { + /* Kick controller into sane state */ + ahci_stop(dev); + ahci_clo(dev); + ahci_start(dev, 0); + clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; + } else { + /* Prepare FIS receive area for check. */ + for (i = 0; i < 20; i++) + fis[i] = 0xff; + } } clp->bytecount = 0; clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET + @@ -1495,6 +1580,11 @@ ahci_execute_transaction(struct ahci_slo (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { ATA_OUTL(ch->r_mem, AHCI_P_SACT, 1 << slot->slot); } + /* If FBS is enabled, set PMP port. */ + if (ch->fbs_enabled) { + ATA_OUTL(ch->r_mem, AHCI_P_FBS, AHCI_P_FBS_EN | + (port << AHCI_P_FBS_DEV_SHIFT)); + } /* Issue command to the controller. */ slot->state = AHCI_SLOT_RUNNING; ch->rslots |= (1 << slot->slot); @@ -1537,12 +1627,30 @@ ahci_execute_transaction(struct ahci_slo ATA_INL(ch->r_mem, AHCI_P_SERR)); et = AHCI_ERR_TIMEOUT; } - if (et != AHCI_ERR_NONE) { - /* Kick controller into sane state */ - ahci_stop(ch->dev); - ahci_start(ch->dev); + /* Marvell controllers do not wait for readyness. */ + if ((ch->quirks & AHCI_Q_NOBSYRES) && + (ccb->ccb_h.func_code == XPT_ATA_IO) && + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && + (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { + while ((val = fis[2]) & (ATA_S_BUSY | ATA_S_DRQ)) { + DELAY(1000); + if (count++ >= timeout) { + device_printf(dev, "device is not " + "ready after soft-reset: " + "tfd = %08x\n", val); + et = AHCI_ERR_TIMEOUT; + break; + } + } } ahci_end_transaction(slot, et); + /* Kick controller into sane state and enable FBS. */ + if ((ccb->ccb_h.func_code == XPT_ATA_IO) && + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && + (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { + ahci_stop(ch->dev); + ahci_start(ch->dev, 1); + } return; } /* Start command execution timeout */ @@ -1571,7 +1679,8 @@ ahci_timeout(struct ahci_slot *slot) sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT); ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; - if ((sstatus & (1 << slot->slot)) != 0 || ccs == slot->slot) + if ((sstatus & (1 << slot->slot)) != 0 || ccs == slot->slot || + ch->fbs_enabled) slot->state = AHCI_SLOT_EXECUTING; callout_reset(&slot->timeout, @@ -1629,12 +1738,19 @@ ahci_end_transaction(struct ahci_slot *s if ((et == AHCI_ERR_TFE) || (ccb->ataio.cmd.flags & CAM_ATAIO_NEEDRESULT)) { u_int8_t *fis = ch->dma.rfis + 0x40; - uint16_t tfd = ATA_INL(ch->r_mem, AHCI_P_TFD); bus_dmamap_sync(ch->dma.rfis_tag, ch->dma.rfis_map, BUS_DMASYNC_POSTREAD); - res->status = tfd; - res->error = tfd >> 8; + if (ch->fbs_enabled) { + fis += ccb->ccb_h.target_id * 256; + res->status = fis[2]; + res->error = fis[3]; + } else { + uint16_t tfd = ATA_INL(ch->r_mem, AHCI_P_TFD); + + res->status = tfd; + res->error = tfd >> 8; + } res->lba_low = fis[4]; res->lba_mid = fis[5]; res->lba_high = fis[6]; @@ -1653,6 +1769,8 @@ ahci_end_transaction(struct ahci_slot *s BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(ch->dma.data_tag, slot->dma.data_map); } + if (et != AHCI_ERR_NONE) + ch->eslots |= (1 << slot->slot); /* In case of error, freeze device for proper recovery. */ if ((et != AHCI_ERR_NONE) && (!ch->readlog) && !(ccb->ccb_h.status & CAM_DEV_QFRZN)) { @@ -1716,9 +1834,11 @@ ahci_end_transaction(struct ahci_slot *s slot->ccb = NULL; /* Update channel stats. */ ch->numrslots--; + ch->numrslotspd[ccb->ccb_h.target_id]--; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) { ch->numtslots--; + ch->numtslotspd[ccb->ccb_h.target_id]--; } /* If it was first request of reset sequence and there is no error, * proceed to second request. */ @@ -1736,6 +1856,7 @@ ahci_end_transaction(struct ahci_slot *s /* If it was NCQ command error, put result on hold. */ } else if (et == AHCI_ERR_NCQ) { ch->hold[slot->slot] = ccb; + ch->numhslots++; } else xpt_done(ccb); /* Unfreeze frozen command. */ @@ -1750,6 +1871,15 @@ ahci_end_transaction(struct ahci_slot *s /* if there was fatal error - reset port. */ if (ch->fatalerr) { ahci_reset(dev); + } else { + /* if we have slots in error, we can reinit port. */ + if (ch->eslots != 0) { + ahci_stop(dev); + ahci_start(dev, 1); + } + /* if there commands on hold, we can do READ LOG. */ + if (!ch->readlog && ch->numhslots) + ahci_issue_read_log(dev); } } /* Start PM timer. */ @@ -1837,6 +1967,7 @@ ahci_process_read_log(device_t dev, unio } xpt_done(ch->hold[i]); ch->hold[i] = NULL; + ch->numhslots--; } } else { if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) @@ -1849,6 +1980,7 @@ ahci_process_read_log(device_t dev, unio continue; xpt_done(ch->hold[i]); ch->hold[i] = NULL; + ch->numhslots--; } } free(ccb->ataio.data_ptr, M_AHCI); @@ -1857,7 +1989,7 @@ ahci_process_read_log(device_t dev, unio } static void -ahci_start(device_t dev) +ahci_start(device_t dev, int fbs) { struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; @@ -1866,6 +1998,12 @@ ahci_start(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_SERR, 0xFFFFFFFF); /* Clear any interrupts pending on this channel */ ATA_OUTL(ch->r_mem, AHCI_P_IS, 0xFFFFFFFF); + /* Configure FIS-based switching if supported. */ + if (ch->chcaps & AHCI_P_CMD_FBSCP) { + ch->fbs_enabled = (fbs && ch->pm_present) ? 1 : 0; + ATA_OUTL(ch->r_mem, AHCI_P_FBS, + ch->fbs_enabled ? AHCI_P_FBS_EN : 0); + } /* Start operations on this channel */ cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_ST | @@ -1891,6 +2029,7 @@ ahci_stop(device_t dev) break; } } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CR); + ch->eslots = 0; } static void @@ -2004,7 +2143,9 @@ ahci_reset(device_t dev) continue; xpt_done(ch->hold[i]); ch->hold[i] = NULL; + ch->numhslots--; } + ch->eslots = 0; ch->fatalerr = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); @@ -2025,7 +2166,7 @@ ahci_reset(device_t dev) /* Wait for clearing busy status. */ if (ahci_wait_ready(dev, 15000)) ahci_clo(dev); - ahci_start(dev); + ahci_start(dev, 1); ch->devices = 1; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Sun Feb 14 19:56:42 2010 (r203900) +++ stable/8/sys/dev/ahci/ahci.h Sun Feb 14 19:57:54 2010 (r203901) @@ -247,8 +247,11 @@ #define AHCI_P_CMD_CPS 0x00010000 #define AHCI_P_CMD_PMA 0x00020000 #define AHCI_P_CMD_HPCP 0x00040000 -#define AHCI_P_CMD_ISP 0x00080000 +#define AHCI_P_CMD_MPSP 0x00080000 #define AHCI_P_CMD_CPD 0x00100000 +#define AHCI_P_CMD_ESP 0x00200000 +#define AHCI_P_CMD_FBSCP 0x00400000 +#define AHCI_P_CMD_APSTE 0x00800000 #define AHCI_P_CMD_ATAPI 0x01000000 #define AHCI_P_CMD_DLAE 0x02000000 #define AHCI_P_CMD_ALPE 0x04000000 @@ -268,6 +271,15 @@ #define AHCI_P_CI 0x38 #define AHCI_P_SNTF 0x3C #define AHCI_P_FBS 0x40 +#define AHCI_P_FBS_EN 0x00000001 +#define AHCI_P_FBS_DEC 0x00000002 +#define AHCI_P_FBS_SDE 0x00000004 +#define AHCI_P_FBS_DEV 0x00000f00 +#define AHCI_P_FBS_DEV_SHIFT 8 +#define AHCI_P_FBS_ADO 0x0000f000 +#define AHCI_P_FBS_ADO_SHIFT 12 +#define AHCI_P_FBS_DWE 0x000f0000 +#define AHCI_P_FBS_DWE_SHIFT 16 /* Just to be sure, if building as module. */ #if MAXPHYS < 512 * 1024 @@ -374,6 +386,7 @@ struct ahci_channel { struct cam_path *path; uint32_t caps; /* Controller capabilities */ uint32_t caps2; /* Controller capabilities */ + uint32_t chcaps; /* Channel capabilities */ int quirks; int numslots; /* Number of present slots */ int pm_level; /* power management level */ @@ -383,11 +396,16 @@ struct ahci_channel { struct mtx mtx; /* state lock */ int devices; /* What is present */ int pm_present; /* PM presence reported */ + int fbs_enabled; /* FIS-based switching enabled */ uint32_t oslots; /* Occupied slots */ uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ + uint32_t eslots; /* Slots in error */ int numrslots; /* Number of running slots */ + int numrslotspd[16];/* Number of running slots per dev */ int numtslots; /* Number of tagged slots */ + int numtslotspd[16];/* Number of tagged slots per dev */ + int numhslots; /* Number of holden slots */ int readlog; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:59:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34DB7106566B; Sun, 14 Feb 2010 19:59:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A6D38FC08; Sun, 14 Feb 2010 19:59:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJx6H9070695; Sun, 14 Feb 2010 19:59:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJx6tM070692; Sun, 14 Feb 2010 19:59:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002141959.o1EJx6tM070692@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 19:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203902 - in stable/8/sys/dev: ahci siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:59:07 -0000 Author: mav Date: Sun Feb 14 19:59:06 2010 New Revision: 203902 URL: http://svn.freebsd.org/changeset/base/203902 Log: MFC r203165: Reset port on disconnect event, to abort any running requests. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:57:54 2010 (r203901) +++ stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:59:06 2010 (r203902) @@ -1161,17 +1161,15 @@ ahci_phy_check_events(device_t dev, u_in u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS); union ccb *ccb; - if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && - ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && - ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { - if (bootverbose) + if (bootverbose) { + if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && + ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && + ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { device_printf(dev, "CONNECT requested\n"); - ahci_reset(dev); - } else { - if (bootverbose) + } else device_printf(dev, "DISCONNECT requested\n"); - ch->devices = 0; } + ahci_reset(dev); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun Feb 14 19:57:54 2010 (r203901) +++ stable/8/sys/dev/siis/siis.c Sun Feb 14 19:59:06 2010 (r203902) @@ -728,17 +728,15 @@ siis_phy_check_events(device_t dev) u_int32_t status = ATA_INL(ch->r_mem, SIIS_P_SSTS); union ccb *ccb; - if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && - ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && - ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { - if (bootverbose) + if (bootverbose) { + if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && + ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && + ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { device_printf(dev, "CONNECT requested\n"); - siis_reset(dev); - } else { - if (bootverbose) + } else device_printf(dev, "DISCONNECT requested\n"); - ch->devices = 0; } + siis_reset(dev); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 19:59:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F8910656D9; Sun, 14 Feb 2010 19:59:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 049C08FC12; Sun, 14 Feb 2010 19:59:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EJxJvO070764; Sun, 14 Feb 2010 19:59:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EJxJxQ070762; Sun, 14 Feb 2010 19:59:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002141959.o1EJxJxQ070762@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 19:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203903 - head/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 19:59:20 -0000 Author: thompsa Date: Sun Feb 14 19:59:19 2010 New Revision: 203903 URL: http://svn.freebsd.org/changeset/base/203903 Log: Make umodem more tolerant for devices which modem descriptors are misplaced. Reported by: Erick Wales Submitted by: Hans Petter Selasky Modified: head/sys/dev/usb/serial/umodem.c Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Sun Feb 14 19:59:06 2010 (r203902) +++ head/sys/dev/usb/serial/umodem.c Sun Feb 14 19:59:19 2010 (r203903) @@ -312,11 +312,16 @@ umodem_attach(device_t dev) 0 - 1, UDESCSUB_CDC_UNION, 0 - 1); if ((cud == NULL) || (cud->bLength < sizeof(*cud))) { - device_printf(dev, "no CM or union descriptor\n"); - goto detach; + device_printf(dev, "Missing descriptor. " + "Assuming data interface is next.\n"); + if (sc->sc_ctrl_iface_no == 0xFF) + goto detach; + else + sc->sc_data_iface_no = + sc->sc_ctrl_iface_no + 1; + } else { + sc->sc_data_iface_no = cud->bSlaveInterface[0]; } - - sc->sc_data_iface_no = cud->bSlaveInterface[0]; } else { sc->sc_data_iface_no = cmd->bDataInterface; } From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 20:00:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D48E9106568D; Sun, 14 Feb 2010 20:00:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3FDB8FC16; Sun, 14 Feb 2010 20:00:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EK0LjP071073; Sun, 14 Feb 2010 20:00:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EK0L0Q071071; Sun, 14 Feb 2010 20:00:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002142000.o1EK0L0Q071071@svn.freebsd.org> From: Alexander Motin Date: Sun, 14 Feb 2010 20:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203904 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 20:00:21 -0000 Author: mav Date: Sun Feb 14 20:00:21 2010 New Revision: 203904 URL: http://svn.freebsd.org/changeset/base/203904 Log: MFC r203426: Disable PHY of unconnected ports when interface power management enabled. It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M). Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sun Feb 14 19:59:19 2010 (r203903) +++ stable/8/sys/dev/ahci/ahci.c Sun Feb 14 20:00:21 2010 (r203904) @@ -2291,7 +2291,12 @@ ahci_sata_phy_reset(device_t dev) ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); DELAY(5000); - return (ahci_sata_connect(ch)); + if (!ahci_sata_connect(ch)) { + if (ch->pm_level > 0) + ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE); + return (0); + } + return (1); } static void From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 20:05:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 780F11065696; Sun, 14 Feb 2010 20:05:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 676E68FC16; Sun, 14 Feb 2010 20:05:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EK5C8J072256; Sun, 14 Feb 2010 20:05:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EK5Ctj072251; Sun, 14 Feb 2010 20:05:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002142005.o1EK5Ctj072251@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 20:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203905 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 20:05:12 -0000 Author: thompsa Date: Sun Feb 14 20:05:12 2010 New Revision: 203905 URL: http://svn.freebsd.org/changeset/base/203905 Log: Add support for the E1752 3G modem and the required eject command. Submitted by: Milan Obuch Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_msctest.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/serial/u3g.c Sun Feb 14 20:05:12 2010 (r203905) @@ -92,6 +92,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GINIT_CMOTECH 6 /* Requires CMOTECH SCSI command */ #define U3GINIT_WAIT 7 /* Device reappears after a delay */ #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ +#define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ enum { U3G_BULK_WR, @@ -281,6 +282,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(MERLIN, V620, 0), @@ -649,6 +651,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_HUAWEI: error = u3g_huawei_init(udev); break; + case U3GINIT_HUAWEISCSI: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usb_msctest.c Sun Feb 14 20:05:12 2010 (r203905) @@ -94,6 +94,9 @@ static uint8_t scsi_ztestor_eject[] = 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, 0x48, 0x47 }; +static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -611,6 +614,11 @@ usb_msc_eject(struct usb_device *udev, u &scsi_cmotech_eject, sizeof(scsi_cmotech_eject), USB_MS_HZ); break; + case MSC_EJECT_HUAWEI: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_huawei_eject, sizeof(scsi_huawei_eject), + USB_MS_HZ); + break; default: printf("usb_msc_eject: unknown eject method (%d)\n", method); break; Modified: head/sys/dev/usb/usb_msctest.h ============================================================================== --- head/sys/dev/usb/usb_msctest.h Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usb_msctest.h Sun Feb 14 20:05:12 2010 (r203905) @@ -31,7 +31,8 @@ enum { MSC_EJECT_STOPUNIT, MSC_EJECT_REZERO, MSC_EJECT_ZTESTOR, - MSC_EJECT_CMOTECH + MSC_EJECT_CMOTECH, + MSC_EJECT_HUAWEI, }; int usb_iface_is_cdrom(struct usb_device *udev, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usbdevs Sun Feb 14 20:05:12 2010 (r203905) @@ -1723,6 +1723,7 @@ product HUAWEI E143C 0x143c 3G modem product HUAWEI E143D 0x143d 3G modem product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem +product HUAWEI E1752 0x1446 3G modem product HUAWEI E14AC 0x14ac 3G modem /* HUAWEI 3com products */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 20:10:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28A261065695; Sun, 14 Feb 2010 20:10:42 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 180148FC1B; Sun, 14 Feb 2010 20:10:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EKAfkt073534; Sun, 14 Feb 2010 20:10:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EKAfhN073531; Sun, 14 Feb 2010 20:10:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002142010.o1EKAfhN073531@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 20:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203906 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 20:10:42 -0000 Author: thompsa Date: Sun Feb 14 20:10:41 2010 New Revision: 203906 URL: http://svn.freebsd.org/changeset/base/203906 Log: Add device ID for the FTDI 4232H. PR: usb/143832 Submitted by: UEMURA Tetsuya Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sun Feb 14 20:05:12 2010 (r203905) +++ head/sys/dev/usb/serial/uftdi.c Sun Feb 14 20:10:41 2010 (r203906) @@ -224,6 +224,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(FTDI, SERIAL_8U100AX, SIO), UFTDI_DEV(FTDI, SERIAL_2232C, 8U232AM), UFTDI_DEV(FTDI, SERIAL_2232D, 8U232AM), + UFTDI_DEV(FTDI, SERIAL_4232H, 8U232AM), UFTDI_DEV(FTDI, SERIAL_8U232AM, 8U232AM), UFTDI_DEV(FTDI, SERIAL_8U232AM4, 8U232AM), UFTDI_DEV(FTDI, SEMC_DSS20, 8U232AM), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Feb 14 20:05:12 2010 (r203905) +++ head/sys/dev/usb/usbdevs Sun Feb 14 20:10:41 2010 (r203906) @@ -1472,6 +1472,7 @@ product FTDI SERIAL_8U232AM 0x6001 8U232 product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial product FTDI SERIAL_2232C 0x6010 FT2232C Dual port Serial product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial +product FTDI SERIAL_4232H 0x6011 FT4232H Quad port Serial /* Gude Analog- und Digitalsysteme products also uses FTDI's id: */ product FTDI TACTRIX_OPENPORT_13M 0xcc48 OpenPort 1.3 Mitsubishi product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 09:19:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF331106566C; Mon, 15 Feb 2010 09:19:07 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5FF98FC14; Mon, 15 Feb 2010 09:19:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1F9J7av055190; Mon, 15 Feb 2010 09:19:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1F9J7Ud055189; Mon, 15 Feb 2010 09:19:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002150919.o1F9J7Ud055189@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 15 Feb 2010 09:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203913 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 09:19:08 -0000 Author: pjd Date: Mon Feb 15 09:19:07 2010 New Revision: 203913 URL: http://svn.freebsd.org/changeset/base/203913 Log: Mark various sysctls also as tunables. Reviewed by: rwatson MFC after: 1 week Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Mon Feb 15 07:41:16 2010 (r203912) +++ head/sys/net/netisr.c Mon Feb 15 09:19:07 2010 (r203913) @@ -156,13 +156,13 @@ SYSCTL_INT(_net_isr, OID_AUTO, direct, C */ static int netisr_maxthreads = -1; /* Max number of threads. */ TUNABLE_INT("net.isr.maxthreads", &netisr_maxthreads); -SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RD, +SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RDTUN, &netisr_maxthreads, 0, "Use at most this many CPUs for netisr processing"); static int netisr_bindthreads = 0; /* Bind threads to CPUs. */ TUNABLE_INT("net.isr.bindthreads", &netisr_bindthreads); -SYSCTL_INT(_net_isr, OID_AUTO, bindthreads, CTLFLAG_RD, +SYSCTL_INT(_net_isr, OID_AUTO, bindthreads, CTLFLAG_RDTUN, &netisr_bindthreads, 0, "Bind netisr threads to CPUs."); /* @@ -173,7 +173,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, bindthrea #define NETISR_DEFAULT_MAXQLIMIT 10240 static u_int netisr_maxqlimit = NETISR_DEFAULT_MAXQLIMIT; TUNABLE_INT("net.isr.maxqlimit", &netisr_maxqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RD, +SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RDTUN, &netisr_maxqlimit, 0, "Maximum netisr per-protocol, per-CPU queue depth."); @@ -185,7 +185,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit #define NETISR_DEFAULT_DEFAULTQLIMIT 256 static u_int netisr_defaultqlimit = NETISR_DEFAULT_DEFAULTQLIMIT; TUNABLE_INT("net.isr.defaultqlimit", &netisr_defaultqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RD, +SYSCTL_INT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RDTUN, &netisr_defaultqlimit, 0, "Default netisr per-protocol, per-CPU queue limit if not set by protocol"); From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 11:29:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1B02106566B; Mon, 15 Feb 2010 11:29:27 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75CA88FC08; Mon, 15 Feb 2010 11:29:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FBTR3u085571; Mon, 15 Feb 2010 11:29:27 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FBTReE085569; Mon, 15 Feb 2010 11:29:27 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002151129.o1FBTReE085569@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 15 Feb 2010 11:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203914 - in stable/8/tools: . regression/lib/msun regression/usr.bin/pkill tools/ath/common tools/termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 11:29:27 -0000 Author: ru Date: Mon Feb 15 11:29:27 2010 New Revision: 203914 URL: http://svn.freebsd.org/changeset/base/203914 Log: MFC: r202969: Actualize. Modified: stable/8/tools/make_libdeps.sh Directory Properties: stable/8/tools/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/bin/sh/ (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/lib/msun/test-conj.t (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/tools/make_libdeps.sh ============================================================================== --- stable/8/tools/make_libdeps.sh Mon Feb 15 09:19:07 2010 (r203913) +++ stable/8/tools/make_libdeps.sh Mon Feb 15 11:29:27 2010 (r203914) @@ -47,9 +47,12 @@ sed -E -e's; ;! ;g' -e's;$;!;' -e's;-lbsdxml!;lib/libexpat;g' + -e's;-lpthread!;lib/libthr;g' -e's;-lm!;lib/msun;g' - -e's;-l(supc\+\+)!;gnu/lib/lib\1;g' - -e's;-l(asn1|krb5|roken)!;kerberos5/lib/lib\1;g' + -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' + -e's;-l(gcc)!;gnu/lib/lib\1;g' + -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' + -e's;-l(asn1|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g' -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' -e's;-l([^!]+)!;lib/lib\1;g' " From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 12:17:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CDCC106566B; Mon, 15 Feb 2010 12:17:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52F128FC17; Mon, 15 Feb 2010 12:17:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FCHLFj096133; Mon, 15 Feb 2010 12:17:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FCHL9L096131; Mon, 15 Feb 2010 12:17:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002151217.o1FCHL9L096131@svn.freebsd.org> From: Ed Schouten Date: Mon, 15 Feb 2010 12:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203915 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 12:17:21 -0000 Author: ed Date: Mon Feb 15 12:17:20 2010 New Revision: 203915 URL: http://svn.freebsd.org/changeset/base/203915 Log: Dibs on uqs! Approved by: philip Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Feb 15 11:29:27 2010 (r203914) +++ svnadmin/conf/mentors Mon Feb 15 12:17:20 2010 (r203915) @@ -23,7 +23,7 @@ rdivacky ed sbruno scottl snb dwmalone sson gnn -uqs philip +uqs philip Co-mentor: ed versus dds will ken zml dfr From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:07:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7009A106566C; Mon, 15 Feb 2010 14:07:41 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9D28FC15; Mon, 15 Feb 2010 14:07:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FE7elk021303; Mon, 15 Feb 2010 14:07:41 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FE7e1m021298; Mon, 15 Feb 2010 14:07:40 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151407.o1FE7e1m021298@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203916 - in head: bin/rmail sbin/devd sbin/devfs sbin/ffsinfo sbin/gbde sbin/mknod sbin/mount_std sbin/sunlabel X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:07:41 -0000 Author: uqs Date: Mon Feb 15 14:07:40 2010 New Revision: 203916 URL: http://svn.freebsd.org/changeset/base/203916 Log: Bump WARNS where possible. Checked by: make universe Approved by: ed (co-mentor) Modified: head/bin/rmail/Makefile head/sbin/devd/Makefile head/sbin/devfs/Makefile head/sbin/ffsinfo/Makefile head/sbin/gbde/Makefile head/sbin/mknod/Makefile head/sbin/mount_std/Makefile head/sbin/sunlabel/Makefile Modified: head/bin/rmail/Makefile ============================================================================== --- head/bin/rmail/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/bin/rmail/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -11,7 +11,7 @@ PROG= rmail SRCS= rmail.c MAN= rmail.8 -WARNS?= 0 +WARNS?= 2 CFLAGS+=-I${SENDMAIL_DIR}/include -I. LIBSMDIR= ${.OBJDIR}/../../lib/libsm Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/devd/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -4,8 +4,7 @@ PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 -WARNS= 0 -#WARNS?= 4 +WARNS?= 3 NO_SHARED?=YES Modified: head/sbin/devfs/Makefile ============================================================================== --- head/sbin/devfs/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/devfs/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -3,6 +3,5 @@ PROG= devfs SRCS= devfs.c rule.c MAN= devfs.8 -WARNS?= 5 .include Modified: head/sbin/ffsinfo/Makefile ============================================================================== --- head/sbin/ffsinfo/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/ffsinfo/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -11,7 +11,7 @@ PROG= ffsinfo SRCS= ffsinfo.c debug.c MAN= ffsinfo.8 -WARNS?= 0 +WARNS?= 1 CFLAGS+=-DFS_DEBUG -I${GROWFS} DPADD= ${LIBUFS} LDADD= -lufs Modified: head/sbin/gbde/Makefile ============================================================================== --- head/sbin/gbde/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/gbde/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -9,9 +9,7 @@ SRCS+= g_bde_lock.c # rijndael-fst.c does evil casting things which results in warnings on # 64 bit machines, the test-vectors check out however, so it works right. -.if ${MACHINE_ARCH} == "i386" -WARNS?= 5 -.else +.if ${MACHINE_ARCH} != "i386" WARNS?= 3 .endif Modified: head/sbin/mknod/Makefile ============================================================================== --- head/sbin/mknod/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/mknod/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= mknod -WARNS?= 0 MAN= mknod.8 .include Modified: head/sbin/mount_std/Makefile ============================================================================== --- head/sbin/mount_std/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/mount_std/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -11,7 +11,7 @@ MLINKS= mount_std.8 mount_devfs.8 \ MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} -WARNS?= 0 +WARNS?= 3 .PATH: ${MOUNT} Modified: head/sbin/sunlabel/Makefile ============================================================================== --- head/sbin/sunlabel/Makefile Mon Feb 15 12:17:20 2010 (r203915) +++ head/sbin/sunlabel/Makefile Mon Feb 15 14:07:40 2010 (r203916) @@ -11,8 +11,6 @@ LINKS= ${BINDIR}/sunlabel ${BINDIR}/disk MLINKS= sunlabel.8 disklabel.8 .endif -WARNS?= 5 - DPADD= ${LIBGEOM} LDADD= -lgeom From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:08:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8780106568F; Mon, 15 Feb 2010 14:08:06 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68F18FC16; Mon, 15 Feb 2010 14:08:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FE869Z021439; Mon, 15 Feb 2010 14:08:06 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FE862c021436; Mon, 15 Feb 2010 14:08:06 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151408.o1FE862c021436@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203917 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:08:06 -0000 Author: uqs Date: Mon Feb 15 14:08:06 2010 New Revision: 203917 URL: http://svn.freebsd.org/changeset/base/203917 Log: sysctl(8): make WARNS=3 clean Fixes inspired by work done in DragonflyBSD. PR: bin/140016 Approved by: ed (Co-mentor) Modified: head/sbin/sysctl/Makefile head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/Makefile ============================================================================== --- head/sbin/sysctl/Makefile Mon Feb 15 14:07:40 2010 (r203916) +++ head/sbin/sysctl/Makefile Mon Feb 15 14:08:06 2010 (r203917) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= sysctl -WARNS?= 0 +WARNS?= 3 MAN= sysctl.8 .include Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Mon Feb 15 14:07:40 2010 (r203916) +++ head/sbin/sysctl/sysctl.c Mon Feb 15 14:08:06 2010 (r203917) @@ -279,7 +279,10 @@ parse(char *string) case CTLTYPE_STRING: break; case CTLTYPE_QUAD: - sscanf(newval, "%qd", &quadval); + quadval = strtoq(newval, &endptr, 0); + if (endptr == newval || *endptr != '\0') + errx(1, "invalid quad integer" + " '%s'", (char *)newval); newval = &quadval; newsize = sizeof(quadval); break; @@ -334,7 +337,7 @@ S_clockinfo(int l2, void *p) struct clockinfo *ci = (struct clockinfo*)p; if (l2 != sizeof(*ci)) { - warnx("S_clockinfo %d != %d", l2, sizeof(*ci)); + warnx("S_clockinfo %d != %zu", l2, sizeof(*ci)); return (1); } printf(hflag ? "{ hz = %'d, tick = %'d, profhz = %'d, stathz = %'d }" : @@ -349,7 +352,7 @@ S_loadavg(int l2, void *p) struct loadavg *tv = (struct loadavg*)p; if (l2 != sizeof(*tv)) { - warnx("S_loadavg %d != %d", l2, sizeof(*tv)); + warnx("S_loadavg %d != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ %'.2f %'.2f %'.2f }" : "{ %.2f %.2f %.2f }", @@ -367,7 +370,7 @@ S_timeval(int l2, void *p) char *p1, *p2; if (l2 != sizeof(*tv)) { - warnx("S_timeval %d != %d", l2, sizeof(*tv)); + warnx("S_timeval %d != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ sec = %'jd, usec = %'ld } " : @@ -389,7 +392,7 @@ S_vmtotal(int l2, void *p) int pageKilo = getpagesize() / 1024; if (l2 != sizeof(*v)) { - warnx("S_vmtotal %d != %d", l2, sizeof(*v)); + warnx("S_vmtotal %d != %zu", l2, sizeof(*v)); return (1); } @@ -421,7 +424,7 @@ T_dev_t(int l2, void *p) dev_t *d = (dev_t *)p; if (l2 != sizeof(*d)) { - warnx("T_dev_T %d != %d", l2, sizeof(*d)); + warnx("T_dev_T %d != %zu", l2, sizeof(*d)); return (1); } printf("%s", devname(*d, S_IFCHR)); @@ -518,7 +521,7 @@ oidfmt(int *oid, int len, char *fmt, u_i j = sizeof(buf); i = sysctl(qoid, len + 2, buf, &j, 0, 0); if (i) - err(1, "sysctl fmt %d %d %d", i, j, errno); + err(1, "sysctl fmt %d %zu %d", i, j, errno); if (kind) *kind = *(u_int *)buf; @@ -551,6 +554,9 @@ show_var(int *oid, int nlen) u_int kind; int (*func)(int, void *); + /* Silence GCC. */ + umv = mv = intlen = 0; + bzero(buf, BUFSIZ); bzero(name, BUFSIZ); qoid[0] = 0; @@ -560,7 +566,7 @@ show_var(int *oid, int nlen) j = sizeof(name); i = sysctl(qoid, nlen + 2, name, &j, 0, 0); if (i || !j) - err(1, "sysctl name %d %d %d", i, j, errno); + err(1, "sysctl name %d %zu %d", i, j, errno); if (Nflag) { printf("%s", name); @@ -611,7 +617,7 @@ show_var(int *oid, int nlen) case 'A': if (!nflag) printf("%s%s", name, sep); - printf("%.*s", len, p); + printf("%.*s", (int)len, p); free(oval); return (0); @@ -698,7 +704,7 @@ show_var(int *oid, int nlen) } if (!nflag) printf("%s%s", name, sep); - printf("Format:%s Length:%d Dump:0x", fmt, len); + printf("Format:%s Length:%zu Dump:0x", fmt, len); while (len-- && (xflag || p < val + 16)) printf("%02x", *p++); if (!xflag && len > 16) @@ -734,7 +740,7 @@ sysctl_all(int *oid, int len) if (errno == ENOENT) return (0); else - err(1, "sysctl(getnext) %d %d", j, l2); + err(1, "sysctl(getnext) %d %zu", j, l2); } l2 /= sizeof(int); From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:14:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD231065693; Mon, 15 Feb 2010 14:14:14 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1810E8FC16; Mon, 15 Feb 2010 14:14:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEEDJV022836; Mon, 15 Feb 2010 14:14:13 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEEDoT022833; Mon, 15 Feb 2010 14:14:13 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002151414.o1FEEDoT022833@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 15 Feb 2010 14:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203918 - in head/lib: libc_r libkse X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:14:14 -0000 Author: ru Date: Mon Feb 15 14:14:13 2010 New Revision: 203918 URL: http://svn.freebsd.org/changeset/base/203918 Log: Though these libraries are disconnected from the build and don't currently build, they should be kept. [1] Unbreak their makefiles by removing the support for the long gone DEFAULT_THREAD_LIB knob. (Allows the tools/make_libdeps.sh script to succeed.) According to: davidxu and deischen [1] MFC after: 3 days Modified: head/lib/libc_r/Makefile head/lib/libkse/Makefile Modified: head/lib/libc_r/Makefile ============================================================================== --- head/lib/libc_r/Makefile Mon Feb 15 14:08:06 2010 (r203917) +++ head/lib/libc_r/Makefile Mon Feb 15 14:14:13 2010 (r203918) @@ -10,10 +10,6 @@ .include -.if ${DEFAULT_THREAD_LIB} == "libc_r" && ${SHLIBDIR} == "/usr/lib" -SHLIBDIR= /lib -.endif - LIB=c_r SHLIB_MAJOR= 7 CFLAGS+=-DPTHREAD_KERNEL @@ -32,16 +28,4 @@ PRECIOUSLIB= .include "${.CURDIR}/uthread/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libc_r" -.if ${MK_INSTALLLIB} != "no" -SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a -.endif -.if !defined(NO_PIC) -SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so -.endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif -.endif - .include Modified: head/lib/libkse/Makefile ============================================================================== --- head/lib/libkse/Makefile Mon Feb 15 14:08:06 2010 (r203917) +++ head/lib/libkse/Makefile Mon Feb 15 14:14:13 2010 (r203918) @@ -10,15 +10,7 @@ .include -.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no" -LIB=kse -.if ${SHLIBDIR} == "/usr/lib" -SHLIBDIR= /lib -.endif -.else SHLIB=kse -.endif - SHLIB_MAJOR= 4 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ @@ -51,16 +43,4 @@ PRECIOUSLIB= .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no" -.if ${MK_INSTALLLIB} != "no" -SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a -.endif -.if !defined(NO_PIC) -SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so -.endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif -.endif - .include From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:29:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E003106568F; Mon, 15 Feb 2010 14:29:17 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0008FC13; Mon, 15 Feb 2010 14:29:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FETHX0026202; Mon, 15 Feb 2010 14:29:17 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FETHov026200; Mon, 15 Feb 2010 14:29:17 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002151429.o1FETHov026200@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 15 Feb 2010 14:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203919 - head/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:29:17 -0000 Author: ru Date: Mon Feb 15 14:29:17 2010 New Revision: 203919 URL: http://svn.freebsd.org/changeset/base/203919 Log: Show when an ARP entry expires. MFC after: 1 week Modified: head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Mon Feb 15 14:14:13 2010 (r203918) +++ head/usr.sbin/arp/arp.c Mon Feb 15 14:29:17 2010 (r203919) @@ -101,7 +101,8 @@ static int valid_type(int type); static int nflag; /* no reverse dns lookups */ static char *rifname; -static int expire_time, flags, doing_proxy, proxy_only; +static time_t expire_time; +static int flags, doing_proxy, proxy_only; /* which function we're supposed to do */ #define F_GET 1 @@ -594,6 +595,15 @@ print_entry(struct sockaddr_dl *sdl, printf(" on %s", ifname); if (rtm->rtm_rmx.rmx_expire == 0) printf(" permanent"); + else { + static struct timeval tv; + if (tv.tv_sec == 0) + gettimeofday(&tv, 0); + if ((expire_time = rtm->rtm_rmx.rmx_expire - tv.tv_sec) > 0) + printf(" expires in %d seconds", (int)expire_time); + else + printf(" expired"); + } if (addr->sin_other & SIN_PROXY) printf(" published (proxy only)"); if (rtm->rtm_flags & RTF_ANNOUNCE) From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:30:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FBDE1065679; Mon, 15 Feb 2010 14:30:37 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F57C8FC0A; Mon, 15 Feb 2010 14:30:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEUbOH026515; Mon, 15 Feb 2010 14:30:37 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEUbfE026512; Mon, 15 Feb 2010 14:30:37 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151430.o1FEUbfE026512@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203920 - head/games/grdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:30:37 -0000 Author: uqs Date: Mon Feb 15 14:30:37 2010 New Revision: 203920 URL: http://svn.freebsd.org/changeset/base/203920 Log: grdc(6) make WARNS=6 clean and bump accordingly Approved by: ed (Co-mentor) Modified: head/games/grdc/Makefile head/games/grdc/grdc.c Modified: head/games/grdc/Makefile ============================================================================== --- head/games/grdc/Makefile Mon Feb 15 14:29:17 2010 (r203919) +++ head/games/grdc/Makefile Mon Feb 15 14:30:37 2010 (r203920) @@ -1,9 +1,9 @@ # $FreeBSD$ -PROG= grdc -WARNS?= 2 -MAN= grdc.6 -DPADD= ${LIBNCURSES} -LDADD= -lncurses +PROG= grdc +MAN= grdc.6 +WARNS?= 6 +DPADD= ${LIBNCURSES} +LDADD= -lncurses .include Modified: head/games/grdc/grdc.c ============================================================================== --- head/games/grdc/grdc.c Mon Feb 15 14:29:17 2010 (r203919) +++ head/games/grdc/grdc.c Mon Feb 15 14:30:37 2010 (r203920) @@ -48,24 +48,22 @@ void movto(int, int); void sighndl(int); void usage(void); -void sighndl(signo) -int signo; +void +sighndl(int signo) { sigtermed=signo; } int -main(argc, argv) -int argc; -char **argv; -{ -struct timespec ts; -long t, a; -int i, j, s, k; -int n; -int ch; -int scrol; -int t12; +main(int argc, char *argv[]) +{ + struct timespec ts; + long t, a; + int i, j, s, k; + int n; + int ch; + int scrol; + int t12; t12 = scrol = 0; @@ -225,7 +223,7 @@ int t12; void set(int t, int n) { -int i, m; + int i, m; m = 7< Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24DDB1065694; Mon, 15 Feb 2010 14:31:06 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1430C8FC0A; Mon, 15 Feb 2010 14:31:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEV59J026679; Mon, 15 Feb 2010 14:31:05 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEV56B026677; Mon, 15 Feb 2010 14:31:05 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151431.o1FEV56B026677@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203921 - head/games/morse X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:31:06 -0000 Author: uqs Date: Mon Feb 15 14:31:05 2010 New Revision: 203921 URL: http://svn.freebsd.org/changeset/base/203921 Log: morse(6) make WARNS=6 clean Approved by: ed (Co-mentor) Modified: head/games/morse/morse.c Modified: head/games/morse/morse.c ============================================================================== --- head/games/morse/morse.c Mon Feb 15 14:30:37 2010 (r203920) +++ head/games/morse/morse.c Mon Feb 15 14:31:05 2010 (r203921) @@ -71,8 +71,8 @@ static const char rcsid[] = #endif struct morsetab { - char inchar; - char *morse; + const char inchar; + const char *morse; }; static const struct morsetab mtab[] = { From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:31:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C4A2106566B; Mon, 15 Feb 2010 14:31:31 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2BC8FC19; Mon, 15 Feb 2010 14:31:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEVV7a026780; Mon, 15 Feb 2010 14:31:31 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEVV87026778; Mon, 15 Feb 2010 14:31:31 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151431.o1FEVV87026778@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203922 - head/games/fortune/fortune X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:31:31 -0000 Author: uqs Date: Mon Feb 15 14:31:30 2010 New Revision: 203922 URL: http://svn.freebsd.org/changeset/base/203922 Log: fortune(6) make WARNS=6 clean Fixes taken mostly from DragonflyBSD. Approved by: ed (Co-mentor) Modified: head/games/fortune/fortune/fortune.c Modified: head/games/fortune/fortune/fortune.c ============================================================================== --- head/games/fortune/fortune/fortune.c Mon Feb 15 14:31:05 2010 (r203921) +++ head/games/fortune/fortune/fortune.c Mon Feb 15 14:31:30 2010 (r203922) @@ -89,8 +89,8 @@ typedef struct fd { int fd, datfd; uint32_t pos; FILE *inf; - char *name; - char *path; + const char *name; + const char *path; char *datfile, *posfile; bool read_tbl; bool was_pos_file; @@ -126,14 +126,14 @@ FILEDESC *Fortfile; /* Fortune file to STRFILE Noprob_tbl; /* sum of data for all no prob files */ -char *Fortune_path; +const char *Fortune_path; char **Fortune_path_arr; int add_dir(FILEDESC *); -int add_file __P((int, - char *, char *, FILEDESC **, FILEDESC **, FILEDESC *)); +int add_file(int, const char *, const char *, FILEDESC **, FILEDESC **, + FILEDESC *); void all_forts(FILEDESC *, char *); -char *copy(char *, u_int); +char *copy(const char *, u_int); void display(FILEDESC *); void do_free(void *); void *do_malloc(u_int); @@ -145,13 +145,13 @@ void get_tbl(FILEDESC *); void getargs(int, char *[]); void getpath(void); void init_prob(void); -int is_dir(char *); -int is_fortfile(char *, char **, char **, int); -int is_off_name(char *); +int is_dir(const char *); +int is_fortfile(const char *, char **, char **, int); +int is_off_name(const char *); int max(int, int); FILEDESC * new_fp(void); -char *off_name(char *); +char *off_name(const char *); void open_dat(FILEDESC *); void open_fp(FILEDESC *); FILEDESC * @@ -171,9 +171,7 @@ int maxlen_in_list(FILEDESC *); static regex_t Re_pat; int -main(ac, av) -int ac; -char *av[]; +main(int argc, char *argv[]) { #ifdef OK_TO_WRITE_DISK int fd; @@ -182,7 +180,7 @@ char *av[]; (void) setlocale(LC_ALL, ""); getpath(); - getargs(ac, av); + getargs(argc, argv); if (Match) exit(find_matches() != 0); @@ -225,8 +223,7 @@ char *av[]; } void -display(fp) -FILEDESC *fp; +display(FILEDESC *fp) { char *p; unsigned char ch; @@ -259,7 +256,7 @@ FILEDESC *fp; * Return the length of the fortune. */ int -fortlen() +fortlen(void) { int nchar; char line[BUFSIZ]; @@ -282,14 +279,10 @@ fortlen() * This routine evaluates the arguments on the command line */ void -getargs(argc, argv) -int argc; -char **argv; +getargs(int argc, char *argv[]) { int ignore_case; char *pat; - extern char *optarg; - extern int optind; int ch; ignore_case = FALSE; @@ -372,9 +365,7 @@ char **argv; * Form the file list from the file specifications. */ int -form_file_list(files, file_cnt) -char **files; -int file_cnt; +form_file_list(char **files, int file_cnt) { int i, percent; char *sp; @@ -467,31 +458,30 @@ int file_cnt; * Add a file to the file list. */ int -add_file(percent, file, dir, head, tail, parent) -int percent; -char *file; -char *dir; -FILEDESC **head, **tail; -FILEDESC *parent; +add_file(int percent, const char *file, const char *dir, FILEDESC **head, + FILEDESC **tail, FILEDESC *parent) { FILEDESC *fp; int fd; - char *path, *offensive; + const char *path; + char *tpath, *offensive; bool was_malloc; bool isdir; if (dir == NULL) { path = file; + tpath = NULL; was_malloc = FALSE; } else { - path = do_malloc((unsigned int) (strlen(dir) + strlen(file) + 2)); - (void) strcat(strcat(strcpy(path, dir), "/"), file); + tpath = do_malloc((unsigned int)(strlen(dir) + strlen(file) + 2)); + strcat(strcat(strcpy(tpath, dir), "/"), file); + path = tpath; was_malloc = TRUE; } if ((isdir = is_dir(path)) && parent != NULL) { if (was_malloc) - free(path); + free(tpath); return FALSE; /* don't recurse */ } offensive = NULL; @@ -500,7 +490,7 @@ FILEDESC *parent; offensive = off_name(path); if (Offend) { if (was_malloc) - free(path); + free(tpath); path = offensive; offensive = NULL; was_malloc = TRUE; @@ -522,7 +512,7 @@ over: */ if (All_forts && offensive != NULL) { if (was_malloc) - free(path); + free(tpath); path = offensive; offensive = NULL; was_malloc = TRUE; @@ -549,7 +539,7 @@ over: perror(path); */ if (was_malloc) - free(path); + free(tpath); return FALSE; } @@ -571,7 +561,7 @@ over: "fortune:%s not a fortune file or directory\n", path); if (was_malloc) - free(path); + free(tpath); do_free(fp->datfile); do_free(fp->posfile); free((char *) fp); @@ -610,7 +600,7 @@ over: * Return a pointer to an initialized new FILEDESC. */ FILEDESC * -new_fp() +new_fp(void) { FILEDESC *fp; @@ -635,8 +625,7 @@ new_fp() * Return a pointer to the offensive version of a file of this name. */ char * -off_name(file) -char *file; +off_name(const char *file) { char *new; @@ -649,8 +638,7 @@ char *file; * Is the file an offensive-style name? */ int -is_off_name(file) -char *file; +is_off_name(const char *file) { int len; @@ -664,9 +652,7 @@ char *file; * there are two children to be a parent of. */ void -all_forts(fp, offensive) -FILEDESC *fp; -char *offensive; +all_forts(FILEDESC *fp, char *offensive) { char *sp; FILEDESC *scene, *obscene; @@ -714,8 +700,7 @@ char *offensive; * Add the contents of an entire directory. */ int -add_dir(fp) -FILEDESC *fp; +add_dir(FILEDESC *fp) { DIR *dir; struct dirent *dirent; @@ -753,8 +738,7 @@ FILEDESC *fp; * Return TRUE if the file is a directory, FALSE otherwise. */ int -is_dir(file) -char *file; +is_dir(const char *file) { auto struct stat sbuf; @@ -772,19 +756,18 @@ char *file; */ /* ARGSUSED */ int -is_fortfile(file, datp, posp, check_for_offend) -char *file, **datp, **posp; -int check_for_offend; +is_fortfile(const char *file, char **datp, char **posp, int check_for_offend) { int i; - char *sp; + const char *sp; char *datfile; - static char *suflist[] = { /* list of "illegal" suffixes" */ - "dat", "pos", "c", "h", "p", "i", "f", - "pas", "ftn", "ins.c", "ins,pas", - "ins.ftn", "sml", - NULL - }; + static const char *suflist[] = { + /* list of "illegal" suffixes" */ + "dat", "pos", "c", "h", "p", "i", "f", + "pas", "ftn", "ins.c", "ins,pas", + "ins.ftn", "sml", + NULL + }; DPRINTF(2, (stderr, "is_fortfile(%s) returns ", file)); @@ -853,9 +836,7 @@ int check_for_offend; * Return a malloc()'ed copy of the string */ char * -copy(str, len) -char *str; -unsigned int len; +copy(const char *str, unsigned int len) { char *new, *sp; @@ -872,8 +853,7 @@ unsigned int len; * Do a malloc, checking for NULL return. */ void * -do_malloc(size) -unsigned int size; +do_malloc(unsigned int size) { void *new; @@ -889,8 +869,7 @@ unsigned int size; * Free malloc'ed space, if any. */ void -do_free(ptr) -void *ptr; +do_free(void *ptr) { if (ptr != NULL) free(ptr); @@ -901,7 +880,7 @@ void *ptr; * Initialize the fortune probabilities. */ void -init_prob() +init_prob(void) { FILEDESC *fp, *last = NULL; int percent, num_noprob, frac; @@ -955,8 +934,8 @@ init_prob() last->percent = percent; DPRINTF(1, (stderr, ", residual = %d%%", percent)); } - else - DPRINTF(1, (stderr, + else + DPRINTF(1, (stderr, ", %d%% distributed over remaining fortunes\n", percent)); } @@ -973,7 +952,7 @@ init_prob() * Get the fortune data file's seek pointer for the next fortune. */ void -get_fort() +get_fort(void) { FILEDESC *fp; int choice; @@ -1004,7 +983,7 @@ get_fort() choice = arc4random_uniform(Noprob_tbl.str_numstr); DPRINTF(1, (stderr, "choice = %d (of %u) \n", choice, Noprob_tbl.str_numstr)); - while (choice >= fp->tbl.str_numstr) { + while ((unsigned int)choice >= fp->tbl.str_numstr) { choice -= fp->tbl.str_numstr; fp = fp->next; DPRINTF(1, (stderr, @@ -1036,8 +1015,7 @@ get_fort() * Pick a child from a chosen parent. */ FILEDESC * -pick_child(parent) -FILEDESC *parent; +pick_child(FILEDESC *parent) { FILEDESC *fp; int choice; @@ -1056,7 +1034,7 @@ FILEDESC *parent; choice = arc4random_uniform(parent->tbl.str_numstr); DPRINTF(1, (stderr, " choice = %d (of %u)\n", choice, parent->tbl.str_numstr)); - for (fp = parent->child; choice >= fp->tbl.str_numstr; + for (fp = parent->child; (unsigned)choice >= fp->tbl.str_numstr; fp = fp->next) { choice -= fp->tbl.str_numstr; DPRINTF(1, (stderr, "\tskip %s, %u (choice = %d)\n", @@ -1073,8 +1051,7 @@ FILEDESC *parent; * Sum up all the noprob probabilities, starting with fp. */ void -sum_noprobs(fp) -FILEDESC *fp; +sum_noprobs(FILEDESC *fp) { static bool did_noprobs = FALSE; @@ -1090,8 +1067,7 @@ FILEDESC *fp; } int -max(i, j) -int i, j; +max(int i, int j) { return (i >= j ? i : j); } @@ -1101,8 +1077,7 @@ int i, j; * Assocatiate a FILE * with the given FILEDESC. */ void -open_fp(fp) -FILEDESC *fp; +open_fp(FILEDESC *fp) { if (fp->inf == NULL && (fp->inf = fdopen(fp->fd, "r")) == NULL) { perror(fp->path); @@ -1115,8 +1090,7 @@ FILEDESC *fp; * Open up the dat file if we need to. */ void -open_dat(fp) -FILEDESC *fp; +open_dat(FILEDESC *fp) { if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, 0)) < 0) { perror(fp->datfile); @@ -1130,8 +1104,7 @@ FILEDESC *fp; * return a random number. */ void -get_pos(fp) -FILEDESC *fp; +get_pos(FILEDESC *fp) { #ifdef OK_TO_WRITE_DISK int fd; @@ -1161,8 +1134,7 @@ FILEDESC *fp; * Get the tbl data file the datfile. */ void -get_tbl(fp) -FILEDESC *fp; +get_tbl(FILEDESC *fp) { auto int fd; FILEDESC *child; @@ -1201,8 +1173,7 @@ FILEDESC *fp; * Zero out the fields we care about in a tbl structure. */ void -zero_tbl(tp) -STRFILE *tp; +zero_tbl(STRFILE *tp) { tp->str_numstr = 0; tp->str_longlen = 0; @@ -1214,8 +1185,7 @@ STRFILE *tp; * Merge the tbl data of t2 into t1. */ void -sum_tbl(t1, t2) -STRFILE *t1, *t2; +sum_tbl(STRFILE *t1, STRFILE *t2) { t1->str_numstr += t2->str_numstr; if (t1->str_longlen < t2->str_longlen) @@ -1231,7 +1201,7 @@ STRFILE *t1, *t2; * Print out the file list */ void -print_file_list() +print_file_list(void) { print_list(File_list, 0); } @@ -1241,9 +1211,7 @@ print_file_list() * Print out the actual list, recursively. */ void -print_list(list, lev) -FILEDESC *list; -int lev; +print_list(FILEDESC *list, int lev) { while (list != NULL) { fprintf(stderr, "%*s", lev * 4, ""); @@ -1266,8 +1234,7 @@ int lev; * Convert the pattern to an ignore-case equivalent. */ char * -conv_pat(orig) -char *orig; +conv_pat(char *orig) { char *sp; unsigned int cnt; @@ -1309,7 +1276,7 @@ char *orig; * Find all the fortunes which match the pattern we've been given. */ int -find_matches() +find_matches(void) { Fort_len = maxlen_in_list(File_list); DPRINTF(2, (stderr, "Maximum length is %d\n", Fort_len)); @@ -1327,8 +1294,7 @@ find_matches() * Return the maximum fortune len in the file list. */ int -maxlen_in_list(list) -FILEDESC *list; +maxlen_in_list(FILEDESC *list) { FILEDESC *fp; int len, maxlen; @@ -1341,7 +1307,7 @@ FILEDESC *list; } else { get_tbl(fp); - if (fp->tbl.str_longlen > maxlen) + if (fp->tbl.str_longlen > (unsigned)maxlen) maxlen = fp->tbl.str_longlen; } } @@ -1353,8 +1319,7 @@ FILEDESC *list; * Print out the matches from the files in the list. */ void -matches_in_list(list) -FILEDESC *list; +matches_in_list(FILEDESC *list) { char *sp, *p; FILEDESC *fp; @@ -1405,7 +1370,7 @@ FILEDESC *list; } void -usage() +usage(void) { (void) fprintf(stderr, "fortune [-a"); #ifdef DEBUG @@ -1462,6 +1427,6 @@ getpath(void) exit(1); } free(path); - Fortune_path_arr[0] = FORTDIR; + Fortune_path_arr[0] = strdup(FORTDIR); } } From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:32:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E58A71065676; Mon, 15 Feb 2010 14:32:02 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D39CA8FC20; Mon, 15 Feb 2010 14:32:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEW2Ui026954; Mon, 15 Feb 2010 14:32:02 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEW01S026940; Mon, 15 Feb 2010 14:32:00 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151432.o1FEW01S026940@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 14:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203923 - in head/games: . bcd caesar fortune/fortune fortune/strfile fortune/unstr grdc number pom ppt random X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:32:03 -0000 Author: uqs Date: Mon Feb 15 14:32:00 2010 New Revision: 203923 URL: http://svn.freebsd.org/changeset/base/203923 Log: games: make WARNS=6 the default, remove overrides This also bumps factor, fortune, primes, and random to WARNS=6. Approved by: ed (Co-mentor) Modified: head/games/Makefile.inc head/games/bcd/Makefile head/games/caesar/Makefile head/games/fortune/fortune/Makefile head/games/fortune/strfile/Makefile head/games/fortune/unstr/Makefile head/games/grdc/Makefile head/games/number/Makefile head/games/pom/Makefile head/games/ppt/Makefile head/games/random/Makefile Modified: head/games/Makefile.inc ============================================================================== --- head/games/Makefile.inc Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/Makefile.inc Mon Feb 15 14:32:00 2010 (r203923) @@ -3,3 +3,4 @@ BINDIR?= /usr/games FILESDIR?= ${SHAREDIR}/games +WARNS?= 6 Modified: head/games/bcd/Makefile ============================================================================== --- head/games/bcd/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/bcd/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= bcd -WARNS?= 6 MAN= bcd.6 MLINKS= bcd.6 ppt.6 Modified: head/games/caesar/Makefile ============================================================================== --- head/games/caesar/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/caesar/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -8,6 +8,4 @@ SCRIPTS=rot13.sh MAN= caesar.6 MLINKS= caesar.6 rot13.6 -WARNS?= 6 - .include Modified: head/games/fortune/fortune/Makefile ============================================================================== --- head/games/fortune/fortune/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/fortune/fortune/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -3,7 +3,6 @@ PROG= fortune MAN= fortune.6 -WARNS?= 2 CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile .include Modified: head/games/fortune/strfile/Makefile ============================================================================== --- head/games/fortune/strfile/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/fortune/strfile/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -4,6 +4,5 @@ PROG= strfile MAN= strfile.8 MLINKS= strfile.8 unstr.8 -WARNS?= 6 .include Modified: head/games/fortune/unstr/Makefile ============================================================================== --- head/games/fortune/unstr/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/fortune/unstr/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -3,7 +3,6 @@ PROG= unstr NO_MAN= -WARNS?= 6 CFLAGS+= -I${.CURDIR}/../strfile .include Modified: head/games/grdc/Makefile ============================================================================== --- head/games/grdc/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/grdc/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -2,7 +2,6 @@ PROG= grdc MAN= grdc.6 -WARNS?= 6 DPADD= ${LIBNCURSES} LDADD= -lncurses Modified: head/games/number/Makefile ============================================================================== --- head/games/number/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/number/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -4,6 +4,4 @@ PROG= number MAN= number.6 -WARNS?= 6 - .include Modified: head/games/pom/Makefile ============================================================================== --- head/games/pom/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/pom/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -6,6 +6,4 @@ MAN= pom.6 DPADD= ${LIBM} LDADD= -lm -WARNS?= 6 - .include Modified: head/games/ppt/Makefile ============================================================================== --- head/games/ppt/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/ppt/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -4,7 +4,5 @@ PROG= ppt NO_MAN= -WARNS?= 6 - .include Modified: head/games/random/Makefile ============================================================================== --- head/games/random/Makefile Mon Feb 15 14:31:30 2010 (r203922) +++ head/games/random/Makefile Mon Feb 15 14:32:00 2010 (r203923) @@ -4,6 +4,5 @@ PROG= random MAN= random.6 SRCS= random.c randomize_fd.c -WARNS?= 5 .include From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 14:38:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDD101065672; Mon, 15 Feb 2010 14:38:30 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD2B38FC1B; Mon, 15 Feb 2010 14:38:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FEcUXo028467; Mon, 15 Feb 2010 14:38:30 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FEcUxq028465; Mon, 15 Feb 2010 14:38:30 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002151438.o1FEcUxq028465@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 15 Feb 2010 14:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203924 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 14:38:31 -0000 Author: raj Date: Mon Feb 15 14:38:30 2010 New Revision: 203924 URL: http://svn.freebsd.org/changeset/base/203924 Log: Call the proper linkup routine in PowerPC Book-E machdep. Submitted by: attilio MFC after: 1 week Modified: head/sys/powerpc/booke/machdep.c Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Feb 15 14:32:00 2010 (r203923) +++ head/sys/powerpc/booke/machdep.c Mon Feb 15 14:38:30 2010 (r203924) @@ -384,7 +384,7 @@ e500_init(u_int32_t startkernel, u_int32 init_param1(); /* Start initializing proc0 and thread0. */ - proc_linkup(&proc0, &thread0); + proc_linkup0(&proc0, &thread0); thread0.td_frame = &frame0; /* Set up per-cpu data and store the pointer in SPR general 0. */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 15:00:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26366106568B; Mon, 15 Feb 2010 15:00:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13C778FC0A; Mon, 15 Feb 2010 15:00:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FF0eoi033486; Mon, 15 Feb 2010 15:00:40 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FF0eMo033484; Mon, 15 Feb 2010 15:00:40 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002151500.o1FF0eMo033484@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 15 Feb 2010 15:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203925 - stable/8/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 15:00:41 -0000 Author: raj Date: Mon Feb 15 15:00:40 2010 New Revision: 203925 URL: http://svn.freebsd.org/changeset/base/203925 Log: MFC r203637: Improve checking whether an ARM VA has a valid mapping before performing cache sync. VIPT/PIPT caches need valid VA-PA mapping in PTE for a cache operation to succeed (unlike VIVT). Prior to this fix pmap was using l2pte_valid() for that check, but this is not sufficient as the function merely checks if a PTE exists (there can be existing but _invalid_ entries in the table). A new pmap_has_valid_mapping() routine is introduced to do this job right by checking proper PTE flags. Among other potential problems this cures coherency issues with L2 caches on MV-78100. Submitted by: Grzegorz Bernacki, Piotr Ziecik Reviewed, tested by: marcel Obtained from: Semihalf Modified: stable/8/sys/arm/arm/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/arm/arm/pmap.c ============================================================================== --- stable/8/sys/arm/arm/pmap.c Mon Feb 15 14:38:30 2010 (r203924) +++ stable/8/sys/arm/arm/pmap.c Mon Feb 15 15:00:40 2010 (r203925) @@ -1199,79 +1199,38 @@ pmap_tlb_flushD(pmap_t pm) cpu_tlb_flushD(); } -static PMAP_INLINE void -pmap_l2cache_wbinv_range(pmap_t pm, vm_offset_t va, vm_size_t len) +static int +pmap_has_valid_mapping(pmap_t pm, vm_offset_t va) { - vm_size_t rest; pd_entry_t *pde; pt_entry_t *ptep; - rest = MIN(PAGE_SIZE - (va & PAGE_MASK), len); - - while (len > 0) { - CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " - "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); - if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wbinv_range(va, rest); - - len -= rest; - va += rest; + if (pmap_get_pde_pte(pm, va, &pde, &ptep) && + ptep && ((*ptep & L2_TYPE_MASK) != L2_TYPE_INV)) + return (1); - rest = MIN(PAGE_SIZE, len); - } + return (0); } static PMAP_INLINE void pmap_idcache_wbinv_range(pmap_t pm, vm_offset_t va, vm_size_t len) { - - if (pmap_is_current(pm)) { - cpu_idcache_wbinv_range(va, len); - pmap_l2cache_wbinv_range(pm, va, len); - } -} - -static PMAP_INLINE void -pmap_l2cache_wb_range(pmap_t pm, vm_offset_t va, vm_size_t len) -{ - vm_size_t rest; - pd_entry_t *pde; - pt_entry_t *ptep; - - rest = MIN(PAGE_SIZE - (va & PAGE_MASK), len); - - while (len > 0) { - CTR4(KTR_PMAP, "pmap_l2cache_wb_range: pmap %p is_kernel %d " - "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); - if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); - - len -= rest; - va += rest; - - rest = MIN(PAGE_SIZE, len); - } -} - -static PMAP_INLINE void -pmap_l2cache_inv_range(pmap_t pm, vm_offset_t va, vm_size_t len) -{ vm_size_t rest; - pd_entry_t *pde; - pt_entry_t *ptep; - - rest = MIN(PAGE_SIZE - (va & PAGE_MASK), len); - while (len > 0) { - CTR4(KTR_PMAP, "pmap_l2cache_wb_range: pmap %p is_kernel %d " - "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); - if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_inv_range(va, rest); + CTR4(KTR_PMAP, "pmap_dcache_wbinv_range: pmap %p is_kernel %d va 0x%08x" + " len 0x%x ", pm, pm == pmap_kernel(), va, len); - len -= rest; - va += rest; - - rest = MIN(PAGE_SIZE, len); + if (pmap_is_current(pm) || pm == pmap_kernel()) { + rest = MIN(PAGE_SIZE - (va & PAGE_MASK), len); + while (len > 0) { + if (pmap_has_valid_mapping(pm, va)) { + cpu_idcache_wbinv_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); + } + len -= rest; + va += rest; + rest = MIN(PAGE_SIZE, len); + } } } @@ -1279,24 +1238,31 @@ static PMAP_INLINE void pmap_dcache_wb_range(pmap_t pm, vm_offset_t va, vm_size_t len, boolean_t do_inv, boolean_t rd_only) { + vm_size_t rest; CTR4(KTR_PMAP, "pmap_dcache_wb_range: pmap %p is_kernel %d va 0x%08x " "len 0x%x ", pm, pm == pmap_kernel(), va, len); CTR2(KTR_PMAP, " do_inv %d rd_only %d", do_inv, rd_only); if (pmap_is_current(pm)) { - if (do_inv) { - if (rd_only) { - cpu_dcache_inv_range(va, len); - pmap_l2cache_inv_range(pm, va, len); - } - else { - cpu_dcache_wbinv_range(va, len); - pmap_l2cache_wbinv_range(pm, va, len); - } - } else if (!rd_only) { - cpu_dcache_wb_range(va, len); - pmap_l2cache_wb_range(pm, va, len); + rest = MIN(PAGE_SIZE - (va & PAGE_MASK), len); + while (len > 0) { + if (pmap_has_valid_mapping(pm, va)) { + if (do_inv && rd_only) { + cpu_dcache_inv_range(va, rest); + cpu_l2cache_inv_range(va, rest); + } else if (do_inv) { + cpu_dcache_wbinv_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); + } else if (!rd_only) { + cpu_dcache_wb_range(va, rest); + cpu_l2cache_wb_range(va, rest); + } + } + len -= rest; + va += rest; + + rest = MIN(PAGE_SIZE, len); } } } @@ -3225,7 +3191,8 @@ pmap_remove_all(vm_page_t m) */ if (pmap_is_current(pv->pv_pmap)) { cpu_dcache_inv_range(pv->pv_va, PAGE_SIZE); - cpu_l2cache_inv_range(pv->pv_va, PAGE_SIZE); + if (pmap_has_valid_mapping(pv->pv_pmap, pv->pv_va)) + cpu_l2cache_inv_range(pv->pv_va, PAGE_SIZE); } if (pv->pv_flags & PVF_UNMAN) { @@ -3512,9 +3479,10 @@ do_l2b_alloc: if (pmap_is_current(pmap) && (oflags & PVF_NC) == 0 && (opte & L2_S_PROT_W) != 0 && - (prot & VM_PROT_WRITE) == 0) { + (prot & VM_PROT_WRITE) == 0 && + (opte & L2_TYPE_MASK) != L2_TYPE_INV) { cpu_dcache_wb_range(va, PAGE_SIZE); - pmap_l2cache_wb_range(pmap, va, PAGE_SIZE); + cpu_l2cache_wb_range(va, PAGE_SIZE); } } else { /* From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 15:10:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F47E106566C; Mon, 15 Feb 2010 15:10:22 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8908FC1B; Mon, 15 Feb 2010 15:10:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FFAMOI035658; Mon, 15 Feb 2010 15:10:22 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FFAMgv035651; Mon, 15 Feb 2010 15:10:22 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002151510.o1FFAMgv035651@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 15 Feb 2010 15:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203926 - in head/games/fortune: fortune strfile unstr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 15:10:22 -0000 Author: uqs Date: Mon Feb 15 15:10:21 2010 New Revision: 203926 URL: http://svn.freebsd.org/changeset/base/203926 Log: fortune(6) switch to 3-clause BSDL; style(9) This reduces the diff to other *BSD and makes it possible to actually see the code differences. Approved by: ed (Co-mentor) Modified: head/games/fortune/fortune/fortune.6 head/games/fortune/fortune/fortune.c head/games/fortune/fortune/pathnames.h head/games/fortune/strfile/strfile.8 head/games/fortune/strfile/strfile.c head/games/fortune/strfile/strfile.h head/games/fortune/unstr/unstr.c Modified: head/games/fortune/fortune/fortune.6 ============================================================================== --- head/games/fortune/fortune/fortune.6 Mon Feb 15 15:00:40 2010 (r203925) +++ head/games/fortune/fortune/fortune.6 Mon Feb 15 15:10:21 2010 (r203926) @@ -12,11 +12,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: head/games/fortune/fortune/fortune.c ============================================================================== --- head/games/fortune/fortune/fortune.c Mon Feb 15 15:00:40 2010 (r203925) +++ head/games/fortune/fortune/fortune.c Mon Feb 15 15:10:21 2010 (r203926) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -48,41 +44,42 @@ static const char sccsid[] = "@(#)fortun #include __FBSDID("$FreeBSD$"); -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include "strfile.h" -# include "pathnames.h" - -# define TRUE 1 -# define FALSE 0 -# define bool short - -# define MINW 6 /* minimum wait if desired */ -# define CPERS 20 /* # of chars for each sec */ -# define SLEN 160 /* # of chars in short fortune */ - -# define POS_UNKNOWN ((uint32_t) -1) /* pos for file unknown */ -# define NO_PROB (-1) /* no prob specified for file */ - -# ifdef DEBUG -# define DPRINTF(l,x) { if (Debug >= l) fprintf x; } -# undef NDEBUG -# else -# define DPRINTF(l,x) -# define NDEBUG 1 -# endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "strfile.h" +#include "pathnames.h" + +#define TRUE 1 +#define FALSE 0 +#define bool short + +#define MINW 6 /* minimum wait if desired */ +#define CPERS 20 /* # of chars for each sec */ +#define SLEN 160 /* # of chars in short fortune */ + +#define POS_UNKNOWN ((uint32_t) -1) /* pos for file unknown */ +#define NO_PROB (-1) /* no prob specified for file */ + +#ifdef DEBUG +#define DPRINTF(l,x) { if (Debug >= l) fprintf x; } +#undef NDEBUG +#else +#define DPRINTF(l,x) +#define NDEBUG 1 +#endif typedef struct fd { int percent; @@ -102,7 +99,7 @@ typedef struct fd { bool Found_one; /* did we find a match? */ bool Find_files = FALSE; /* just find a list of proper fortune files */ -bool Fortunes_only = FALSE; /* check only "fortunes" files */ +bool Fortunes_only = FALSE; /* check only "fortunes" files */ bool Wait = FALSE; /* wait desired after fortune */ bool Short_only = FALSE; /* short fortune desired */ bool Long_only = FALSE; /* long fortune desired */ @@ -173,9 +170,9 @@ static regex_t Re_pat; int main(int argc, char *argv[]) { -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK int fd; -#endif /* OK_TO_WRITE_DISK */ +#endif /* OK_TO_WRITE_DISK */ (void) setlocale(LC_ALL, ""); @@ -193,33 +190,33 @@ main(int argc, char *argv[]) display(Fortfile); -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK if ((fd = creat(Fortfile->posfile, 0666)) < 0) { perror(Fortfile->posfile); exit(1); } -#ifdef LOCK_EX +#ifdef LOCK_EX /* * if we can, we exclusive lock, but since it isn't very * important, we just punt if we don't have easy locking * available. */ (void) flock(fd, LOCK_EX); -#endif /* LOCK_EX */ +#endif /* LOCK_EX */ write(fd, (char *) &Fortfile->pos, sizeof Fortfile->pos); if (!Fortfile->was_pos_file) (void) chmod(Fortfile->path, 0666); -#ifdef LOCK_EX +#ifdef LOCK_EX (void) flock(fd, LOCK_UN); -#endif /* LOCK_EX */ -#endif /* OK_TO_WRITE_DISK */ +#endif /* LOCK_EX */ +#endif /* OK_TO_WRITE_DISK */ if (Wait) { if (Fort_len == 0) (void) fortlen(); sleep((unsigned int) max(Fort_len / CPERS, MINW)); } - exit(0); - /* NOTREACHED */ + + return (0); } void @@ -230,7 +227,7 @@ display(FILEDESC *fp) char line[BUFSIZ]; open_fp(fp); - (void) fseeko(fp->inf, Seekpts[0], 0); + fseeko(fp->inf, Seekpts[0], SEEK_SET); for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && !STR_ENDSTRING(line, fp->tbl); Fort_len++) { if (fp->tbl.str_flags & STR_ROTATED) @@ -265,14 +262,15 @@ fortlen(void) nchar = (int)(Seekpts[1] - Seekpts[0]); else { open_fp(Fortfile); - (void) fseeko(Fortfile->inf, Seekpts[0], 0); + fseeko(Fortfile->inf, Seekpts[0], SEEK_SET); nchar = 0; while (fgets(line, sizeof line, Fortfile->inf) != NULL && !STR_ENDSTRING(line, Fortfile->tbl)) nchar += strlen(line); } Fort_len = nchar; - return nchar; + + return (nchar); } /* @@ -288,7 +286,7 @@ getargs(int argc, char *argv[]) ignore_case = FALSE; pat = NULL; -# ifdef DEBUG +#ifdef DEBUG while ((ch = getopt(argc, argv, "aDefilm:osw")) != -1) #else while ((ch = getopt(argc, argv, "aefilm:osw")) != -1) @@ -297,11 +295,11 @@ getargs(int argc, char *argv[]) case 'a': /* any fortune */ All_forts++; break; -# ifdef DEBUG +#ifdef DEBUG case 'D': Debug++; break; -# endif /* DEBUG */ +#endif /* DEBUG */ case 'e': Equal_probs++; /* scatter un-allocted prob equally */ break; @@ -355,7 +353,7 @@ getargs(int argc, char *argv[]) error = regcomp(&Re_pat, pat, REG_BASIC); if (error) { fprintf(stderr, "regcomp(%s) fails\n", pat); - exit (1); + exit(1); } } } @@ -377,7 +375,7 @@ form_file_list(char **files, int file_cn pstr = Fortune_path_arr; i = 0; while (*pstr) { - i += add_file(NO_PROB, *pstr++, NULL, + i += add_file(NO_PROB, *pstr++, NULL, &File_list, &File_tail, NULL); } Fortunes_only = FALSE; @@ -385,7 +383,7 @@ form_file_list(char **files, int file_cn fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); } - return i != 0; + return (i != 0); } else { pstr = Fortune_path_arr; i = 0; @@ -397,7 +395,7 @@ form_file_list(char **files, int file_cn fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); } - return i != 0; + return (i != 0); } } for (i = 0; i < file_cnt; i++) { @@ -410,11 +408,11 @@ form_file_list(char **files, int file_cn percent = percent * 10 + *sp - '0'; if (percent > 100) { fprintf(stderr, "percentages must be <= 100\n"); - return FALSE; + return (FALSE); } if (*sp == '.') { fprintf(stderr, "percentages must be integers\n"); - return FALSE; + return (FALSE); } /* * If the number isn't followed by a '%', then @@ -428,7 +426,7 @@ form_file_list(char **files, int file_cn else if (*++sp == '\0') { if (++i >= file_cnt) { fprintf(stderr, "percentages must precede files\n"); - return FALSE; + return (FALSE); } sp = files[i]; } @@ -437,20 +435,21 @@ form_file_list(char **files, int file_cn pstr = Fortune_path_arr; i = 0; while (*pstr) { - i += add_file(NO_PROB, *pstr++, NULL, + i += add_file(NO_PROB, *pstr++, NULL, &File_list, &File_tail, NULL); } if (!i) { fprintf(stderr, "No fortunes found in %s.\n", Fortune_path); - return FALSE; + return (FALSE); } - } else if (!add_file(percent, sp, NULL, &File_list, + } else if (!add_file(percent, sp, NULL, &File_list, &File_tail, NULL)) { - return FALSE; + return (FALSE); } } - return TRUE; + + return (TRUE); } /* @@ -482,7 +481,7 @@ add_file(int percent, const char *file, if ((isdir = is_dir(path)) && parent != NULL) { if (was_malloc) free(tpath); - return FALSE; /* don't recurse */ + return (FALSE); /* don't recurse */ } offensive = NULL; if (!isdir && parent == NULL && (All_forts || Offend) && @@ -501,7 +500,7 @@ add_file(int percent, const char *file, DPRINTF(1, (stderr, "adding file \"%s\"\n", path)); over: - if ((fd = open(path, 0)) < 0) { + if ((fd = open(path, O_RDONLY)) < 0) { /* * This is a sneak. If the user said -a, and if the * file we're given isn't a file, we check to see if @@ -525,14 +524,14 @@ over: char **pstr = Fortune_path_arr; while (*pstr) { - i += add_file(percent, file, *pstr++, + i += add_file(percent, file, *pstr++, head, tail, parent); } if (!i) { fprintf(stderr, "No '%s' found in %s.\n", file, Fortune_path); } - return i != 0; + return (i != 0); } /* if (parent == NULL) @@ -540,7 +539,7 @@ over: */ if (was_malloc) free(tpath); - return FALSE; + return (FALSE); } DPRINTF(2, (stderr, "path = \"%s\"\n", path)); @@ -564,9 +563,9 @@ over: free(tpath); do_free(fp->datfile); do_free(fp->posfile); - free((char *) fp); + free(fp); do_free(offensive); - return FALSE; + return (FALSE); } /* * If the user said -a, we need to make this node a pointer to @@ -588,11 +587,11 @@ over: fp->next = *head; *head = fp; } -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK fp->was_pos_file = (access(fp->posfile, W_OK) >= 0); -#endif /* OK_TO_WRITE_DISK */ +#endif /* OK_TO_WRITE_DISK */ - return TRUE; + return (TRUE); } /* @@ -604,7 +603,7 @@ new_fp(void) { FILEDESC *fp; - fp = (FILEDESC *) do_malloc(sizeof *fp); + fp = do_malloc(sizeof(*fp)); fp->datfd = -1; fp->pos = POS_UNKNOWN; fp->inf = NULL; @@ -617,7 +616,8 @@ new_fp(void) fp->parent = NULL; fp->datfile = NULL; fp->posfile = NULL; - return fp; + + return (fp); } /* @@ -630,7 +630,8 @@ off_name(const char *file) char *new; new = copy(file, (unsigned int) (strlen(file) + 2)); - return strcat(new, "-o"); + + return (strcat(new, "-o")); } /* @@ -643,6 +644,7 @@ is_off_name(const char *file) int len; len = strlen(file); + return (len >= 3 && file[len - 2] == '-' && file[len - 1] == 'o'); } @@ -657,13 +659,13 @@ all_forts(FILEDESC *fp, char *offensive) char *sp; FILEDESC *scene, *obscene; int fd; - auto char *datfile, *posfile; + char *datfile, *posfile; if (fp->child != NULL) /* this is a directory, not a file */ return; if (!is_fortfile(offensive, &datfile, &posfile, FALSE)) return; - if ((fd = open(offensive, 0)) < 0) + if ((fd = open(offensive, O_RDONLY)) < 0) return; DPRINTF(1, (stderr, "adding \"%s\" because of -a\n", offensive)); scene = new_fp(); @@ -690,9 +692,9 @@ all_forts(FILEDESC *fp, char *offensive) obscene->datfile = datfile; obscene->posfile = posfile; obscene->read_tbl = FALSE; -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK obscene->was_pos_file = (access(obscene->posfile, W_OK) >= 0); -#endif /* OK_TO_WRITE_DISK */ +#endif /* OK_TO_WRITE_DISK */ } /* @@ -704,14 +706,14 @@ add_dir(FILEDESC *fp) { DIR *dir; struct dirent *dirent; - auto FILEDESC *tailp; - auto char *name; + FILEDESC *tailp; + char *name; (void) close(fp->fd); fp->fd = -1; if ((dir = opendir(fp->path)) == NULL) { perror(fp->path); - return FALSE; + return (FALSE); } tailp = NULL; DPRINTF(1, (stderr, "adding dir \"%s\"\n", fp->path)); @@ -728,9 +730,10 @@ add_dir(FILEDESC *fp) if (fp->num_children == 0) { (void) fprintf(stderr, "fortune: %s: No fortune files in directory.\n", fp->path); - return FALSE; + return (FALSE); } - return TRUE; + + return (TRUE); } /* @@ -740,10 +743,11 @@ add_dir(FILEDESC *fp) int is_dir(const char *file) { - auto struct stat sbuf; + struct stat sbuf; if (stat(file, &sbuf) < 0) - return FALSE; + return (FALSE); + return (sbuf.st_mode & S_IFDIR); } @@ -779,7 +783,7 @@ is_fortfile(const char *file, char **dat i = strlen(file); if (Offend ^ (file[i - 2] == '-' && file[i - 1] == 'o')) { DPRINTF(2, (stderr, "FALSE (offending file)\n")); - return FALSE; + return (FALSE); } } @@ -789,18 +793,18 @@ is_fortfile(const char *file, char **dat sp++; if (*sp == '.') { DPRINTF(2, (stderr, "FALSE (file starts with '.')\n")); - return FALSE; + return (FALSE); } if (Fortunes_only && strncmp(sp, "fortunes", 8) != 0) { DPRINTF(2, (stderr, "FALSE (check fortunes only)\n")); - return FALSE; + return (FALSE); } if ((sp = rindex(sp, '.')) != NULL) { sp++; for (i = 0; suflist[i] != NULL; i++) if (strcmp(sp, suflist[i]) == 0) { DPRINTF(2, (stderr, "FALSE (file has suffix \".%s\")\n", sp)); - return FALSE; + return (FALSE); } } @@ -813,22 +817,23 @@ is_fortfile(const char *file, char **dat DPRINTF(0, (stderr, "Warning: file \"%s\" unreadable\n", datfile)); #endif free(datfile); - return FALSE; + return (FALSE); } if (datp != NULL) *datp = datfile; else free(datfile); if (posp != NULL) { -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK *posp = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */ (void) strcat(*posp, ".pos"); #else *posp = NULL; -#endif /* OK_TO_WRITE_DISK */ +#endif /* OK_TO_WRITE_DISK */ } DPRINTF(2, (stderr, "TRUE\n")); - return TRUE; + + return (TRUE); } /* @@ -838,14 +843,15 @@ is_fortfile(const char *file, char **dat char * copy(const char *str, unsigned int len) { - char *new, *sp; + char *new, *sp; new = do_malloc(len + 1); sp = new; do { *sp++ = *str; } while (*str++); - return new; + + return (new); } /* @@ -855,13 +861,14 @@ copy(const char *str, unsigned int len) void * do_malloc(unsigned int size) { - void *new; + void *new; if ((new = malloc(size)) == NULL) { (void) fprintf(stderr, "fortune: out of memory.\n"); exit(1); } - return new; + + return (new); } /* @@ -898,8 +905,7 @@ init_prob(void) num_noprob++; if (Equal_probs) last = fp; - } - else + } else percent += fp->percent; DPRINTF(1, (stderr, "summing probabilities:%d%% with %d NO_PROB's", percent, num_noprob)); @@ -907,14 +913,12 @@ init_prob(void) (void) fprintf(stderr, "fortune: probabilities sum to %d%% > 100%%!\n", percent); exit(1); - } - else if (percent < 100 && num_noprob == 0) { + } else if (percent < 100 && num_noprob == 0) { (void) fprintf(stderr, "fortune: no place to put residual probability (%d%% < 100%%)\n", percent); exit(1); - } - else if (percent == 100 && num_noprob != 0) { + } else if (percent == 100 && num_noprob != 0) { (void) fprintf(stderr, "fortune: no probability left to put in residual files (100%%)\n"); exit(1); @@ -935,7 +939,7 @@ init_prob(void) DPRINTF(1, (stderr, ", residual = %d%%", percent)); } else - DPRINTF(1, (stderr, + DPRINTF(1, (stderr, ", %d%% distributed over remaining fortunes\n", percent)); } @@ -1003,8 +1007,8 @@ get_fort(void) Fortfile = fp; get_pos(fp); open_dat(fp); - (void) lseek(fp->datfd, - (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), 0); + lseek(fp->datfd, + (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), SEEK_SET); read(fp->datfd, Seekpts, sizeof Seekpts); Seekpts[0] = be64toh(Seekpts[0]); Seekpts[1] = be64toh(Seekpts[1]); @@ -1027,7 +1031,7 @@ pick_child(FILEDESC *parent) for (fp = parent->child; choice--; fp = fp->next) continue; DPRINTF(1, (stderr, " using %s\n", fp->name)); - return fp; + return (fp); } else { get_tbl(parent); @@ -1042,7 +1046,7 @@ pick_child(FILEDESC *parent) } DPRINTF(1, (stderr, " using %s, %u\n", fp->name, fp->tbl.str_numstr)); - return fp; + return (fp); } } @@ -1092,7 +1096,7 @@ open_fp(FILEDESC *fp) void open_dat(FILEDESC *fp) { - if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, 0)) < 0) { + if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0) { perror(fp->datfile); exit(1); } @@ -1106,14 +1110,14 @@ open_dat(FILEDESC *fp) void get_pos(FILEDESC *fp) { -#ifdef OK_TO_WRITE_DISK +#ifdef OK_TO_WRITE_DISK int fd; #endif /* OK_TO_WRITE_DISK */ assert(fp->read_tbl); if (fp->pos == POS_UNKNOWN) { -#ifdef OK_TO_WRITE_DISK - if ((fd = open(fp->posfile, 0)) < 0 || +#ifdef OK_TO_WRITE_DISK + if ((fd = open(fp->posfile, O_RDONLY)) < 0 || read(fd, &fp->pos, sizeof fp->pos) != sizeof fp->pos) fp->pos = arc4random_uniform(fp->tbl.str_numstr); else if (fp->pos >= fp->tbl.str_numstr) @@ -1136,13 +1140,13 @@ get_pos(FILEDESC *fp) void get_tbl(FILEDESC *fp) { - auto int fd; + int fd; FILEDESC *child; if (fp->read_tbl) return; if (fp->child == NULL) { - if ((fd = open(fp->datfile, 0)) < 0) { + if ((fd = open(fp->datfile, O_RDONLY)) < 0) { perror(fp->datfile); exit(1); } @@ -1268,7 +1272,8 @@ conv_pat(char *orig) *sp++ = *orig; } *sp = '\0'; - return new; + + return (new); } /* @@ -1285,8 +1290,8 @@ find_matches(void) Found_one = FALSE; matches_in_list(File_list); - return Found_one; - /* NOTREACHED */ + + return (Found_one); } /* @@ -1307,11 +1312,12 @@ maxlen_in_list(FILEDESC *list) } else { get_tbl(fp); - if (fp->tbl.str_longlen > (unsigned)maxlen) + if (fp->tbl.str_longlen > (unsigned int)maxlen) maxlen = fp->tbl.str_longlen; } } - return maxlen; + + return (maxlen); } /* @@ -1323,8 +1329,8 @@ matches_in_list(FILEDESC *list) { char *sp, *p; FILEDESC *fp; - int in_file; - unsigned char ch; + int in_file; + unsigned char ch; for (fp = list; fp != NULL; fp = fp->next) { if (fp->child != NULL) { Modified: head/games/fortune/fortune/pathnames.h ============================================================================== --- head/games/fortune/fortune/pathnames.h Mon Feb 15 15:00:40 2010 (r203925) +++ head/games/fortune/fortune/pathnames.h Mon Feb 15 15:10:21 2010 (r203926) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,7 @@ * SUCH DAMAGE. * * @(#)pathnames.h 8.1 (Berkeley) 5/31/93 + * $FreeBSD$ */ #define FORTDIR "/usr/share/games/fortune" Modified: head/games/fortune/strfile/strfile.8 ============================================================================== --- head/games/fortune/strfile/strfile.8 Mon Feb 15 15:00:40 2010 (r203925) +++ head/games/fortune/strfile/strfile.8 Mon Feb 15 15:10:21 2010 (r203926) @@ -13,11 +13,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: head/games/fortune/strfile/strfile.c ============================================================================== --- head/games/fortune/strfile/strfile.c Mon Feb 15 15:00:40 2010 (r203925) +++ head/games/fortune/strfile/strfile.c Mon Feb 15 15:10:21 2010 (r203926) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -48,16 +44,18 @@ static const char sccsid[] = "@(#)strfil #include __FBSDID("$FreeBSD$"); -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include "strfile.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "strfile.h" /* * This program takes a file composed of strings separated by @@ -83,26 +81,19 @@ __FBSDID("$FreeBSD$"); * Added ordering options. */ -# define TRUE 1 -# define FALSE 0 - -# define STORING_PTRS (Oflag || Rflag) -# define CHUNKSIZE 512 +#define STORING_PTRS (Oflag || Rflag) +#define CHUNKSIZE 512 -# define ALLOC(ptr,sz) { \ +#define ALLOC(ptr, sz) do { \ if (ptr == NULL) \ - ptr = malloc(CHUNKSIZE * sizeof *ptr); \ + ptr = malloc(CHUNKSIZE * sizeof(*ptr)); \ else if (((sz) + 1) % CHUNKSIZE == 0) \ - ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \ + ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof(*ptr)); \ if (ptr == NULL) { \ fprintf(stderr, "out of space\n"); \ exit(1); \ } \ - } - -#ifdef NO_VOID -# define void char -#endif + } while (0) typedef struct { int first; @@ -113,12 +104,12 @@ static char *Infile = NULL, /* input f Outfile[MAXPATHLEN] = "", /* output file name */ Delimch = '%'; /* delimiting character */ -static int Cflag = FALSE; /* embedded comments */ -static int Sflag = FALSE; /* silent run flag */ -static int Oflag = FALSE; /* ordering flag */ -static int Iflag = FALSE; /* ignore case flag */ -static int Rflag = FALSE; /* randomize order flag */ -static int Xflag = FALSE; /* set rotated bit */ +static int Cflag = false; /* embedded comments */ +static int Sflag = false; /* silent run flag */ +static int Oflag = false; /* ordering flag */ +static int Iflag = false; /* ignore case flag */ +static int Rflag = false; /* randomize order flag */ +static int Xflag = false; /* set rotated bit */ static uint32_t Num_pts = 0; /* number of pointers/strings */ static off_t *Seekpts; @@ -129,13 +120,13 @@ static STRFILE Tbl; /* statistics tab static STR *Firstch; /* first chars of each string */ -static void add_offset(FILE *, off_t); -static int cmp_str(const void *, const void *); -static int stable_collate_range_cmp(int, int); -static void do_order(void); -static void getargs(int, char **); -static void randomize(void); -static void usage(void); +static void add_offset(FILE *, off_t); +static int cmp_str(const void *, const void *); +static int stable_collate_range_cmp(int, int); +static void do_order(void); +static void getargs(int, char **); +static void randomize(void); +static void usage(void); /* * main: @@ -149,17 +140,16 @@ static void usage(void); int main(int ac, char *av[]) { - char *sp, dc; - FILE *inf, *outf; - off_t last_off, pos, *p; - size_t length; - int first; - uint32_t cnt; - char *nsp; - STR *fp; - static char string[257]; + char *sp, *nsp, dc; + FILE *inf, *outf; + off_t last_off, pos, *p; + size_t length; + int first; + uint32_t cnt; + STR *fp; + static char string[257]; - (void) setlocale(LC_ALL, ""); + setlocale(LC_ALL, ""); getargs(ac, av); /* evalute arguments */ dc = Delimch; @@ -173,7 +163,7 @@ main(int ac, char *av[]) exit(1); } if (!STORING_PTRS) - (void) fseek(outf, (long) sizeof Tbl, 0); + fseek(outf, (long)sizeof(Tbl), SEEK_SET); /* * Write the strings onto the file @@ -212,7 +202,7 @@ main(int ac, char *av[]) else fp->first = *nsp; fp->pos = Seekpts[Num_pts - 1]; - first = FALSE; + first = false; } } while (sp != NULL); @@ -220,7 +210,7 @@ main(int ac, char *av[]) * write the tables in */ - (void) fclose(inf); + fclose(inf); Tbl.str_numstr = Num_pts - 1; if (Cflag) @@ -252,13 +242,13 @@ main(int ac, char *av[]) Tbl.str_longlen = htobe32(Tbl.str_longlen); Tbl.str_shortlen = htobe32(Tbl.str_shortlen); Tbl.str_flags = htobe32(Tbl.str_flags); - (void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf); + fwrite((char *)&Tbl, sizeof(Tbl), 1, outf); if (STORING_PTRS) { for (p = Seekpts, cnt = Num_pts; cnt--; ++p) *p = htobe64(*p); - (void) fwrite(Seekpts, sizeof *Seekpts, (size_t) Num_pts, outf); + fwrite(Seekpts, sizeof(*Seekpts), (size_t)Num_pts, outf); } - (void) fclose(outf); + fclose(outf); exit(0); } @@ -268,7 +258,7 @@ main(int ac, char *av[]) void getargs(int argc, char **argv) { - int ch; + int ch; while ((ch = getopt(argc, argv, "Cc:iorsx")) != -1) switch(ch) { @@ -306,22 +296,22 @@ getargs(int argc, char **argv) if (*argv) { Infile = *argv; if (*++argv) - (void) strcpy(Outfile, *argv); + strcpy(Outfile, *argv); } if (!Infile) { puts("No input file name"); usage(); } if (*Outfile == '\0') { - (void) strcpy(Outfile, Infile); - (void) strcat(Outfile, ".dat"); + strcpy(Outfile, Infile); + strcat(Outfile, ".dat"); } } void usage(void) { - (void) fprintf(stderr, + fprintf(stderr, "strfile [-Ciorsx] [-c char] source_file [output_file]\n"); exit(1); } @@ -337,7 +327,7 @@ add_offset(FILE *fp, off_t off) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 16:41:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B357F1065676; Mon, 15 Feb 2010 16:41:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97FA58FC08; Mon, 15 Feb 2010 16:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FGfURj055803; Mon, 15 Feb 2010 16:41:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FGfURF055801; Mon, 15 Feb 2010 16:41:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002151641.o1FGfURF055801@svn.freebsd.org> From: Alexander Motin Date: Mon, 15 Feb 2010 16:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203928 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 16:41:30 -0000 Author: mav Date: Mon Feb 15 16:41:30 2010 New Revision: 203928 URL: http://svn.freebsd.org/changeset/base/203928 Log: MFC r203124: Note added FIS-based switching support. Modified: stable/8/share/man/man4/ahci.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ahci.4 ============================================================================== --- stable/8/share/man/man4/ahci.4 Mon Feb 15 15:19:15 2010 (r203927) +++ stable/8/share/man/man4/ahci.4 Mon Feb 15 16:41:30 2010 (r203928) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2009 +.Dd January 28, 2010 .Dt AHCI 4 .Os .Sh NAME @@ -114,14 +114,11 @@ ATAPI devices are handled by the SCSI pr etc. .Pp Driver features include support for Serial ATA and ATAPI devices, -Port Multipliers, hardware command queues (up to 32 commands per port), +Port Multipliers (including FIS-based switching, when supported), +hardware command queues (up to 32 commands per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. .Pp -The Port Multiplier FIS Based Switching feature added in the AHCI 1.2 -specification, which is required for effective parallel operation of devices -behind Port Multipliers, is not yet supported. -.Pp AHCI hardware is also supported by ataahci driver from .Xr ata 4 subsystem. If both drivers are loaded at the same time, this one will be @@ -131,6 +128,10 @@ The .Nm driver supports AHCI compatible controllers having PCI class 1 (mass storage), subclass 6 (SATA) and programming interface 1 (AHCI). +.Pp +Also, in cooperation with atamarvell and atajmicron drivers of ata(4), +it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers, +such as JMicron JMB36x and Marvell 88SX61xx. .Sh SEE ALSO .Xr ada 4 , .Xr cd 4 , From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 17:41:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A169B1065676; Mon, 15 Feb 2010 17:41:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90FD68FC18; Mon, 15 Feb 2010 17:41:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FHfxDP069144; Mon, 15 Feb 2010 17:41:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FHfxsI069142; Mon, 15 Feb 2010 17:41:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201002151741.o1FHfxsI069142@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 15 Feb 2010 17:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203929 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 17:41:59 -0000 Author: trasz Date: Mon Feb 15 17:41:59 2010 New Revision: 203929 URL: http://svn.freebsd.org/changeset/base/203929 Log: Some rewording and language fixes. PR: docs/136918, docs/134074 Submitted by: Ben Kaduk , Haven Hash Modified: head/share/man/man9/locking.9 Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Mon Feb 15 16:41:30 2010 (r203928) +++ head/share/man/man9/locking.9 Mon Feb 15 17:41:59 2010 (r203929) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2010 +.Dd February 15, 2010 .Dt LOCKING 9 .Os .Sh NAME @@ -106,7 +106,7 @@ Mostly reader locks are similar to locks but optimized for very infrequent write locking. .Em Read-mostly locks implement full priority propagation by tracking shared owners -using a lock user supplied +using a caller-supplied .Em tracker data structure. .Pp @@ -272,24 +272,18 @@ holding mutex, or to try to allocate mem read-write lock. .Pp As a special case, it is possible to call -.Fn sleep 9 +.Fn sleep or -.Fn mtx_sleep 9 -while holding a mutex. -It will atomically drop the mutex and reacquire it -as part of waking up. -This is often however a bad -idea because it generally relies on you having -such a good knowledge of all the call graph above you -and what assumptions it is making that there are a lot -of ways to make hard-to-find mistakes. -For example you must re-test all the assumptions you made before, -all the way up the call graph to where you got the lock. -You can not just assume that mtx_sleep can be inserted anywhere. -If any caller above you has any mutex or -rwlock, your sleep, will cause a panic. -If the sleep only happens rarely it may be years before the -bad code path is found. +.Fn mtx_sleep +while holding a single mutex. +It will atomically drop that mutex and reacquire it as part of waking up. +This is often a bad idea because it generally relies on the programmer having +good knowledge of all of the call graph above the place where +.Fn mtx_sleep +is being called and assumptions the calling code has made. +Because the lock gets dropped during sleep, one one must re-test all +the assumptions that were made before, all the way up the call graph to the +place where the lock was acquired. .Pp It is an error to do any operation that could result in any kind of sleep when running inside an interrupt filter. @@ -315,11 +309,11 @@ Recursion is defined per lock. Lock order is important. .Pp .Em *2 -readers can recurse though writers can not. +Readers can recurse though writers can not. Lock order is important. .Pp .Em *3 -There are calls atomically release this primitive when going to sleep +There are calls that atomically release this primitive when going to sleep and reacquire it on wakeup (e.g. .Fn mtx_sleep , .Fn rw_sleep @@ -330,7 +324,7 @@ and .Em *4 Though one can sleep holding an sx lock, one can also use .Fn sx_sleep -which atomically release this primitive when going to sleep and +which will atomically release this primitive when going to sleep and reacquire it on wakeup. .Ss Context mode table The next table shows what can be used in different contexts. @@ -345,6 +339,7 @@ At this time this is a rather easy to re .It syscall: Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&ok .El .Sh SEE ALSO +.Xr witness 4 , .Xr condvar 9 , .Xr lock 9 , .Xr mtx_pool 9 , @@ -354,7 +349,6 @@ At this time this is a rather easy to re .Xr sema 9 , .Xr sleep 9 , .Xr sx 9 , -.Xr witness 9 , .Xr LOCK_PROFILING 9 .Sh HISTORY These From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 17:49:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946931065672; Mon, 15 Feb 2010 17:49:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 825EE8FC0C; Mon, 15 Feb 2010 17:49:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FHnnMs070901; Mon, 15 Feb 2010 17:49:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FHnnjS070890; Mon, 15 Feb 2010 17:49:49 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002151749.o1FHnnjS070890@svn.freebsd.org> From: Rui Paulo Date: Mon, 15 Feb 2010 17:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203930 - in head/sys: conf dev/ath/ath_hal dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 17:49:49 -0000 Author: rpaulo Date: Mon Feb 15 17:49:49 2010 New Revision: 203930 URL: http://svn.freebsd.org/changeset/base/203930 Log: Bring back AR9285 support. This fixes most of the issues and should be pretty usable. MFC after: 1 month Added: head/sys/dev/ath/ath_hal/ar5416/ar9285.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5416/ar9285.h (contents, props changed) head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar9280.h head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/conf/files Mon Feb 15 17:49:49 2010 (r203930) @@ -555,7 +555,7 @@ dev/ath/ath_hal/ah_eeprom_v14.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v4k.c \ - optional ath_hal | ath_ar9280 | ath_ar9285 \ + optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" @@ -713,9 +713,14 @@ dev/ath/ath_hal/ar5416/ar5416_xmit.c \ # ar9160 (depends on ar5416) dev/ath/ath_hal/ar5416/ar9160_attach.c optional ath_hal | ath_ar9160 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" -# ar9280/ar9285 (depends on ar5416) +# ar9280 (depends on ar5416) dev/ath/ath_hal/ar5416/ar9280_attach.c optional ath_hal | ath_ar9280 | \ - ath_ar9285 \ + ath_ar9285 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +# ar9285 (depends on ar5416 and ar9280) +dev/ath/ath_hal/ar5416/ar9285_attach.c optional ath_hal | ath_ar9285 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar5416/ar9285_reset.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # rf backends dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \ @@ -736,6 +741,8 @@ dev/ath/ath_hal/ar5416/ar2133.c optional compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar9280.c optional ath_hal | ath_ar9280 | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" +dev/ath/ath_hal/ar5416/ar9285.c optional ath_hal | ath_ar9285 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ath rate control algorithms dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \ compile-with "${NORMAL_C} -I$S/dev/ath" Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ah.h Mon Feb 15 17:49:49 2010 (r203930) @@ -638,7 +638,11 @@ struct ath_hal { HAL_BOOL longCal, HAL_BOOL *isCalDone); HAL_BOOL __ahdecl(*ah_resetCalValid)(struct ath_hal *, const struct ieee80211_channel *); + HAL_BOOL __ahdecl(*ah_setTxPower)(struct ath_hal *, + const struct ieee80211_channel *, uint16_t *); HAL_BOOL __ahdecl(*ah_setTxPowerLimit)(struct ath_hal *, uint32_t); + HAL_BOOL __ahdecl(*ah_setBoardValues)(struct ath_hal *, + const struct ieee80211_channel *); /* Transmit functions */ HAL_BOOL __ahdecl(*ah_updateTxTrigLevel)(struct ath_hal*, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Mon Feb 15 17:49:49 2010 (r203930) @@ -21,6 +21,7 @@ #include "ar5212/ar5212.h" #include "ar5416_cal.h" +#include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ #define AR5416_MAGIC 0x20065416 @@ -179,12 +180,27 @@ extern HAL_RFGAIN ar5416GetRfgain(struct extern HAL_BOOL ar5416Disable(struct ath_hal *ah); extern HAL_BOOL ar5416ChipReset(struct ath_hal *ah, const struct ieee80211_channel *); +extern HAL_BOOL ar5416SetBoardValues(struct ath_hal *, + const struct ieee80211_channel *); extern HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type); extern HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit); +extern HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, + const struct ieee80211_channel *, uint16_t *); extern HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan); extern void ar5416GetChannelCenters(struct ath_hal *, const struct ieee80211_channel *chan, CHAN_CENTERS *centers); +extern void ar5416GetTargetPowers(struct ath_hal *ah, + const struct ieee80211_channel *chan, + CAL_TARGET_POWER_HT *powInfo, + uint16_t numChannels, CAL_TARGET_POWER_HT *pNewPower, + uint16_t numRates, HAL_BOOL isHt40Target); +extern void ar5416GetTargetPowersLeg(struct ath_hal *ah, + const struct ieee80211_channel *chan, + CAL_TARGET_POWER_LEG *powInfo, + uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, + uint16_t numRates, HAL_BOOL isExtTarget); + extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Feb 15 17:49:49 2010 (r203930) @@ -89,6 +89,8 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_perCalibrationN = ar5416PerCalibrationN, ah->ah_resetCalValid = ar5416ResetCalValid, ah->ah_setTxPowerLimit = ar5416SetTxPowerLimit; + ah->ah_setTxPower = ar5416SetTransmitPower; + ah->ah_setBoardValues = ar5416SetBoardValues; /* Transmit functions */ ah->ah_stopTxDma = ar5416StopTxDma; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Feb 15 17:49:49 2010 (r203930) @@ -45,9 +45,6 @@ static void ar5416InitIMR(struct ath_hal static void ar5416InitQoS(struct ath_hal *ah); static void ar5416InitUserSettings(struct ath_hal *ah); -static HAL_BOOL ar5416SetTransmitPower(struct ath_hal *ah, - const struct ieee80211_channel *chan, uint16_t *rfXpdGain); - #if 0 static HAL_BOOL ar5416ChannelChange(struct ath_hal *, const struct ieee80211_channel *); #endif @@ -56,7 +53,6 @@ static void ar5416SetDeltaSlope(struct a static HAL_BOOL ar5416SetResetPowerOn(struct ath_hal *ah); static HAL_BOOL ar5416SetReset(struct ath_hal *ah, int type); static void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan); -static HAL_BOOL ar5416SetBoardValues(struct ath_hal *, const struct ieee80211_channel *); static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *ratesArray, @@ -69,14 +65,6 @@ static HAL_BOOL ar5416SetPowerCalTable(s int16_t *pTxPowerIndexOffset); static uint16_t ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz); -static void ar5416GetTargetPowers(struct ath_hal *ah, - const struct ieee80211_channel *chan, CAL_TARGET_POWER_HT *powInfo, - uint16_t numChannels, CAL_TARGET_POWER_HT *pNewPower, - uint16_t numRates, HAL_BOOL isHt40Target); -static void ar5416GetTargetPowersLeg(struct ath_hal *ah, - const struct ieee80211_channel *chan, CAL_TARGET_POWER_LEG *powInfo, - uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, - uint16_t numRates, HAL_BOOL isExtTarget); static int16_t interpolate(uint16_t target, uint16_t srcLeft, uint16_t srcRight, int16_t targetLeft, int16_t targetRight); @@ -224,7 +212,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO OS_REG_WRITE(ah, AR_SELFGEN_MASK, AH5416(ah)->ah_tx_chainmask); /* Setup the transmit power values. */ - if (!ar5416SetTransmitPower(ah, chan, rfXpdGain)) { + if (!ah->ah_setTxPower(ah, chan, rfXpdGain)) { HALDEBUG(ah, HAL_DEBUG_ANY, "%s: error init'ing transmit power\n", __func__); FAIL(HAL_EIO); @@ -245,7 +233,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO AH5416(ah)->ah_spurMitigate(ah, chan); /* Setup board specific options for EEPROM version 3 */ - if (!ar5416SetBoardValues(ah, chan)) { + if (!ah->ah_setBoardValues(ah, chan)) { HALDEBUG(ah, HAL_DEBUG_ANY, "%s: error setting board options\n", __func__); FAIL(HAL_EIO); @@ -793,7 +781,7 @@ typedef enum Ar5416_Rates { * Set the transmit power in the baseband for the given * operating channel and mode. */ -static HAL_BOOL +HAL_BOOL ar5416SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) { @@ -1185,7 +1173,7 @@ ar5416InitPLL(struct ath_hal *ah, const * Read EEPROM header info and program the device for correct operation * given the channel value. */ -static HAL_BOOL +HAL_BOOL ar5416SetBoardValues(struct ath_hal *ah, const struct ieee80211_channel *chan) { const HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom; @@ -1622,7 +1610,7 @@ ar5416GetMaxEdgePower(uint16_t freq, CAL * Return the rates of target power for the given target power table * channel, and number of channels */ -static void +void ar5416GetTargetPowers(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_TARGET_POWER_HT *powInfo, uint16_t numChannels, CAL_TARGET_POWER_HT *pNewPower, uint16_t numRates, @@ -1681,7 +1669,7 @@ ar5416GetTargetPowers(struct ath_hal *ah * Return the four rates of target power for the given target power table * channel, and number of channels */ -static void +void ar5416GetTargetPowersLeg(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_TARGET_POWER_LEG *powInfo, uint16_t numChannels, Modified: head/sys/dev/ath/ath_hal/ar5416/ar9280.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9280.h Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ar5416/ar9280.h Mon Feb 15 17:49:49 2010 (r203930) @@ -39,4 +39,7 @@ HAL_BOOL ar9280RfAttach(struct ath_hal * struct ath_hal; HAL_BOOL ar9280SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); +void ar9280SpurMitigate(struct ath_hal *, + const struct ieee80211_channel *); + #endif /* _ATH_AR9280_H_ */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Mon Feb 15 17:41:59 2010 (r203929) +++ head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c Mon Feb 15 17:49:49 2010 (r203930) @@ -64,8 +64,6 @@ static void ar9280ConfigPCIE(struct ath_ static HAL_BOOL ar9280FillCapabilityInfo(struct ath_hal *ah); static void ar9280WriteIni(struct ath_hal *ah, const struct ieee80211_channel *chan); -static void ar9280SpurMitigate(struct ath_hal *ah, - const struct ieee80211_channel *chan); static void ar9280AniSetup(struct ath_hal *ah) @@ -360,7 +358,7 @@ ar9280WriteIni(struct ath_hal *ah, const #define AR_SPUR_FEEQ_BOUND_HT40 19 #define AR_SPUR_FEEQ_BOUND_HT20 10 -static void +void ar9280SpurMitigate(struct ath_hal *ah, const struct ieee80211_channel *chan) { static const int pilot_mask_reg[4] = { AR_PHY_TIMING7, AR_PHY_TIMING8, Added: head/sys/dev/ath/ath_hal/ar5416/ar9285.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285.c Mon Feb 15 17:49:49 2010 (r203930) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting + * Copyright (c) 2008 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" + +#include "ah_eeprom_v14.h" + +#include "ar5416/ar9280.h" +#include "ar5416/ar9285.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" + +static void +ar9285GetNoiseFloor(struct ath_hal *ah, int16_t nfarray[]) +{ + int16_t nf; + + nf = MS(OS_REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ctl] [chain 0] is %d\n", nf); + nfarray[0] = nf; + + nfarray[1] = 0; + + nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR); + if (nf & 0x100) + nf = 0 - ((nf ^ 0x1ff) + 1); + HALDEBUG(ah, HAL_DEBUG_NFCAL, + "NF calibrated [ext] [chain 0] is %d\n", nf); + nfarray[3] = nf; + + nfarray[4] = 0; +} + +HAL_BOOL +ar9285RfAttach(struct ath_hal *ah, HAL_STATUS *status) +{ + if (ar9280RfAttach(ah, status) == AH_FALSE) + return AH_FALSE; + + AH_PRIVATE(ah)->ah_getNoiseFloor = ar9285GetNoiseFloor; + + return AH_TRUE; +} Added: head/sys/dev/ath/ath_hal/ar5416/ar9285.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285.h Mon Feb 15 17:49:49 2010 (r203930) @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#ifndef _ATH_AR9285_H_ +#define _ATH_AR9285_H_ + +#include "ar5416/ar5416.h" + +struct ath_hal_9285 { + struct ath_hal_5416 ah_5416; + + HAL_INI_ARRAY ah_ini_txgain; + HAL_INI_ARRAY ah_ini_rxgain; +}; +#define AH9285(_ah) ((struct ath_hal_9285 *)(_ah)) + +#define AR9285_DEFAULT_RXCHAINMASK 1 +#define AR9285_DEFAULT_TXCHAINMASK 1 + + +HAL_BOOL ar9285SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); +HAL_BOOL ar9285RfAttach(struct ath_hal *, HAL_STATUS *); + +extern HAL_BOOL ar9285SetTransmitPower(struct ath_hal *, + const struct ieee80211_channel *, uint16_t *); +extern HAL_BOOL ar9285SetBoardValues(struct ath_hal *, + const struct ieee80211_channel *); + +#endif /* _ATH_AR9285_H_ */ Added: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Mon Feb 15 17:49:49 2010 (r203930) @@ -0,0 +1,395 @@ +/* + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting + * Copyright (c) 2008 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_devid.h" + +#include "ah_eeprom_v4k.h" /* XXX for tx/rx gain */ + +#include "ar5416/ar9280.h" +#include "ar5416/ar9285.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" + +#include "ar5416/ar9285.ini" +#include "ar5416/ar9285v2.ini" +#include "ar5416/ar9280v2.ini" /* XXX ini for tx/rx gain */ + +static const HAL_PERCAL_DATA ar9280_iq_cal = { /* single sample */ + .calName = "IQ", .calType = IQ_MISMATCH_CAL, + .calNumSamples = MIN_CAL_SAMPLES, + .calCountMax = PER_MAX_LOG_COUNT, + .calCollect = ar5416IQCalCollect, + .calPostProc = ar5416IQCalibration +}; +static const HAL_PERCAL_DATA ar9280_adc_gain_cal = { /* single sample */ + .calName = "ADC Gain", .calType = ADC_GAIN_CAL, + .calNumSamples = MIN_CAL_SAMPLES, + .calCountMax = PER_MIN_LOG_COUNT, + .calCollect = ar5416AdcGainCalCollect, + .calPostProc = ar5416AdcGainCalibration +}; +static const HAL_PERCAL_DATA ar9280_adc_dc_cal = { /* single sample */ + .calName = "ADC DC", .calType = ADC_DC_CAL, + .calNumSamples = MIN_CAL_SAMPLES, + .calCountMax = PER_MIN_LOG_COUNT, + .calCollect = ar5416AdcDcCalCollect, + .calPostProc = ar5416AdcDcCalibration +}; +static const HAL_PERCAL_DATA ar9280_adc_init_dc_cal = { + .calName = "ADC Init DC", .calType = ADC_DC_INIT_CAL, + .calNumSamples = MIN_CAL_SAMPLES, + .calCountMax = INIT_LOG_COUNT, + .calCollect = ar5416AdcDcCalCollect, + .calPostProc = ar5416AdcDcCalibration +}; + +static void ar9285ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); +static HAL_BOOL ar9285FillCapabilityInfo(struct ath_hal *ah); +static void ar9285WriteIni(struct ath_hal *ah, + const struct ieee80211_channel *chan); + +static void +ar9285AniSetup(struct ath_hal *ah) +{ + /* NB: disable ANI for reliable RIFS rx */ + ar5212AniAttach(ah, AH_NULL, AH_NULL, AH_FALSE); +} + +/* + * Attach for an AR9285 part. + */ +static struct ath_hal * +ar9285Attach(uint16_t devid, HAL_SOFTC sc, + HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status) +{ + struct ath_hal_9285 *ahp9285; + struct ath_hal_5212 *ahp; + struct ath_hal *ah; + uint32_t val; + HAL_STATUS ecode; + HAL_BOOL rfStatus; + + HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n", + __func__, sc, (void*) st, (void*) sh); + + /* NB: memory is returned zero'd */ + ahp9285 = ath_hal_malloc(sizeof (struct ath_hal_9285)); + if (ahp9285 == AH_NULL) { + HALDEBUG(AH_NULL, HAL_DEBUG_ANY, + "%s: cannot allocate memory for state block\n", __func__); + *status = HAL_ENOMEM; + return AH_NULL; + } + ahp = AH5212(ahp9285); + ah = &ahp->ah_priv.h; + + ar5416InitState(AH5416(ah), devid, sc, st, sh, status); + + /* XXX override with 9285 specific state */ + /* override 5416 methods for our needs */ + ah->ah_setAntennaSwitch = ar9285SetAntennaSwitch; + ah->ah_configPCIE = ar9285ConfigPCIE; + ah->ah_setTxPower = ar9285SetTransmitPower; + ah->ah_setBoardValues = ar9285SetBoardValues; + + AH5416(ah)->ah_cal.iqCalData.calData = &ar9280_iq_cal; + AH5416(ah)->ah_cal.adcGainCalData.calData = &ar9280_adc_gain_cal; + AH5416(ah)->ah_cal.adcDcCalData.calData = &ar9280_adc_dc_cal; + AH5416(ah)->ah_cal.adcDcCalInitData.calData = &ar9280_adc_init_dc_cal; + AH5416(ah)->ah_cal.suppCals = ADC_GAIN_CAL | ADC_DC_CAL | IQ_MISMATCH_CAL; + + AH5416(ah)->ah_spurMitigate = ar9280SpurMitigate; + AH5416(ah)->ah_writeIni = ar9285WriteIni; + AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; + AH5416(ah)->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; + + if (!ar5416SetResetReg(ah, HAL_RESET_POWER_ON)) { + /* reset chip */ + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: couldn't reset chip\n", + __func__); + ecode = HAL_EIO; + goto bad; + } + + if (!ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE)) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: couldn't wakeup chip\n", + __func__); + ecode = HAL_EIO; + goto bad; + } + /* Read Revisions from Chips before taking out of reset */ + val = OS_REG_READ(ah, AR_SREV); + HALDEBUG(ah, HAL_DEBUG_ATTACH, + "%s: ID 0x%x VERSION 0x%x TYPE 0x%x REVISION 0x%x\n", + __func__, MS(val, AR_XSREV_ID), MS(val, AR_XSREV_VERSION), + MS(val, AR_XSREV_TYPE), MS(val, AR_XSREV_REVISION)); + /* NB: include chip type to differentiate from pre-Sowl versions */ + AH_PRIVATE(ah)->ah_macVersion = + (val & AR_XSREV_VERSION) >> AR_XSREV_TYPE_S; + AH_PRIVATE(ah)->ah_macRev = MS(val, AR_XSREV_REVISION); + AH_PRIVATE(ah)->ah_ispcie = (val & AR_XSREV_TYPE_HOST_MODE) == 0; + + /* setup common ini data; rf backends handle remainder */ + if (AR_SREV_KITE_12_OR_LATER(ah)) { + HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes_v2, 6); + HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common_v2, 2); + HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, + ar9285PciePhy_clkreq_always_on_L1_v2, 2); + } else { + HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes, 6); + HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common, 2); + HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, + ar9285PciePhy_clkreq_always_on_L1, 2); + } + ar5416AttachPCIE(ah); + + ecode = ath_hal_v4kEepromAttach(ah); + if (ecode != HAL_OK) + goto bad; + + if (!ar5416ChipReset(ah, AH_NULL)) { /* reset chip */ + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", + __func__); + ecode = HAL_EIO; + goto bad; + } + + AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID); + + if (!ar5212ChipTest(ah)) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: hardware self-test failed\n", + __func__); + ecode = HAL_ESELFTEST; + goto bad; + } + + /* + * Set correct Baseband to analog shift + * setting to access analog chips. + */ + OS_REG_WRITE(ah, AR_PHY(0), 0x00000007); + + /* Read Radio Chip Rev Extract */ + AH_PRIVATE(ah)->ah_analog5GhzRev = ar5416GetRadioRev(ah); + switch (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) { + case AR_RAD2133_SREV_MAJOR: /* Sowl: 2G/3x3 */ + case AR_RAD5133_SREV_MAJOR: /* Sowl: 2+5G/3x3 */ + break; + default: + if (AH_PRIVATE(ah)->ah_analog5GhzRev == 0) { + AH_PRIVATE(ah)->ah_analog5GhzRev = + AR_RAD5133_SREV_MAJOR; + break; + } +#ifdef AH_DEBUG + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: 5G Radio Chip Rev 0x%02X is not supported by " + "this driver\n", __func__, + AH_PRIVATE(ah)->ah_analog5GhzRev); + ecode = HAL_ENOTSUPP; + goto bad; +#endif + } + rfStatus = ar9285RfAttach(ah, &ecode); + if (!rfStatus) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: RF setup failed, status %u\n", + __func__, ecode); + goto bad; + } + + HAL_INI_INIT(&ahp9285->ah_ini_rxgain, ar9280Modes_original_rxgain_v2, + 6); + /* setup txgain table */ + switch (ath_hal_eepromGet(ah, AR_EEP_TXGAIN_TYPE, AH_NULL)) { + case AR5416_EEP_TXGAIN_HIGH_POWER: + HAL_INI_INIT(&ahp9285->ah_ini_txgain, + ar9285Modes_high_power_tx_gain_v2, 6); + break; + case AR5416_EEP_TXGAIN_ORIG: + HAL_INI_INIT(&ahp9285->ah_ini_txgain, + ar9285Modes_original_tx_gain_v2, 6); + break; + default: + HALASSERT(AH_FALSE); + goto bad; /* XXX ? try to continue */ + } + + /* + * Got everything we need now to setup the capabilities. + */ + if (!ar9285FillCapabilityInfo(ah)) { + ecode = HAL_EEREAD; + goto bad; + } + + ecode = ath_hal_eepromGet(ah, AR_EEP_MACADDR, ahp->ah_macaddr); + if (ecode != HAL_OK) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: error getting mac address from EEPROM\n", __func__); + goto bad; + } + /* XXX How about the serial number ? */ + /* Read Reg Domain */ + AH_PRIVATE(ah)->ah_currentRD = + ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + + /* + * ah_miscMode is populated by ar5416FillCapabilityInfo() + * starting from griffin. Set here to make sure that + * AR_MISC_MODE_MIC_NEW_LOC_ENABLE is set before a GTK is + * placed into hardware. + */ + if (ahp->ah_miscMode != 0) + OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode); + + ar9285AniSetup(ah); /* Anti Noise Immunity */ + ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist); + + HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__); + + return ah; +bad: + if (ah != AH_NULL) + ah->ah_detach(ah); + if (status) + *status = ecode; + return AH_NULL; +} + +static void +ar9285ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore) +{ + if (AH_PRIVATE(ah)->ah_ispcie && !restore) { + ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_pcieserdes, 1, 0); + OS_DELAY(1000); + OS_REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); + OS_REG_WRITE(ah, AR_WA, AR9285_WA_DEFAULT); + } +} + +static void +ar9285WriteIni(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + u_int modesIndex, freqIndex; + int regWrites = 0; + + /* Setup the indices for the next set of register array writes */ + /* XXX Ignore 11n dynamic mode on the AR5416 for the moment */ + freqIndex = 2; + if (IEEE80211_IS_CHAN_HT40(chan)) + modesIndex = 3; + else if (IEEE80211_IS_CHAN_108G(chan)) + modesIndex = 5; + else + modesIndex = 4; + + /* Set correct Baseband to analog shift setting to access analog chips. */ + OS_REG_WRITE(ah, AR_PHY(0), 0x00000007); + OS_REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); + regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_modes, + modesIndex, regWrites); + if (AR_SREV_KITE_12_OR_LATER(ah)) { + regWrites = ath_hal_ini_write(ah, &AH9285(ah)->ah_ini_txgain, + modesIndex, regWrites); + } + regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common, + 1, regWrites); + +} + +/* + * Fill all software cached or static hardware state information. + * Return failure if capabilities are to come from EEPROM and + * cannot be read. + */ +static HAL_BOOL +ar9285FillCapabilityInfo(struct ath_hal *ah) +{ + HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; + + if (!ar5416FillCapabilityInfo(ah)) + return AH_FALSE; + pCap->halNumGpioPins = 12; + pCap->halWowSupport = AH_TRUE; + pCap->halWowMatchPatternExact = AH_TRUE; +#if 0 + pCap->halWowMatchPatternDword = AH_TRUE; +#endif + pCap->halCSTSupport = AH_TRUE; + pCap->halRifsRxSupport = AH_TRUE; + pCap->halRifsTxSupport = AH_TRUE; + pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ + pCap->halExtChanDfsSupport = AH_TRUE; +#if 0 + /* XXX bluetooth */ + pCap->halBtCoexSupport = AH_TRUE; +#endif + pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ +#if 0 + pCap->hal4kbSplitTransSupport = AH_FALSE; +#endif + pCap->halRxStbcSupport = 1; + pCap->halTxStbcSupport = 1; + + return AH_TRUE; +} + +HAL_BOOL +ar9285SetAntennaSwitch(struct ath_hal *ah, HAL_ANT_SETTING settings) +{ +#define ANTENNA0_CHAINMASK 0x1 +#define ANTENNA1_CHAINMASK 0x2 + struct ath_hal_5416 *ahp = AH5416(ah); + + /* Antenna selection is done by setting the tx/rx chainmasks approp. */ + switch (settings) { + case HAL_ANT_FIXED_A: + /* Enable first antenna only */ + ahp->ah_tx_chainmask = ANTENNA0_CHAINMASK; + ahp->ah_rx_chainmask = ANTENNA0_CHAINMASK; + break; + case HAL_ANT_FIXED_B: + /* Enable second antenna only, after checking capability */ + if (AH_PRIVATE(ah)->ah_caps.halTxChainMask > ANTENNA1_CHAINMASK) + ahp->ah_tx_chainmask = ANTENNA1_CHAINMASK; + ahp->ah_rx_chainmask = ANTENNA1_CHAINMASK; + break; + case HAL_ANT_VARIABLE: + /* Restore original chainmask settings */ + /* XXX */ + ahp->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; + ahp->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK; + break; + } + return AH_TRUE; +#undef ANTENNA0_CHAINMASK +#undef ANTENNA1_CHAINMASK +} + +static const char* +ar9285Probe(uint16_t vendorid, uint16_t devid) +{ + if (vendorid == ATHEROS_VENDOR_ID && devid == AR9285_DEVID_PCIE) + return "Atheros 9285"; + return AH_NULL; +} +AH_CHIP(AR9285, ar9285Probe, ar9285Attach); Added: head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c Mon Feb 15 17:49:49 2010 (r203930) @@ -0,0 +1,951 @@ +/* + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +/* + * This is almost the same as ar5416_reset.c but uses the v4k EEPROM and + * supports only 2Ghz operation. + */ + +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_devid.h" + +#include "ah_eeprom_v14.h" +#include "ah_eeprom_v4k.h" + +#include "ar5416/ar9285.h" +#include "ar5416/ar5416.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" + +/* Eeprom versioning macros. Returns true if the version is equal or newer than the ver specified */ +#define EEP_MINOR(_ah) \ + (AH_PRIVATE(_ah)->ah_eeversion & AR5416_EEP_VER_MINOR_MASK) +#define IS_EEP_MINOR_V2(_ah) (EEP_MINOR(_ah) >= AR5416_EEP_MINOR_VER_2) +#define IS_EEP_MINOR_V3(_ah) (EEP_MINOR(_ah) >= AR5416_EEP_MINOR_VER_3) + +/* Additional Time delay to wait after activiting the Base band */ +#define BASE_ACTIVATE_DELAY 100 /* 100 usec */ +#define PLL_SETTLE_DELAY 300 /* 300 usec */ +#define RTC_PLL_SETTLE_DELAY 1000 /* 1 ms */ + +static HAL_BOOL ar9285SetPowerPerRateTable(struct ath_hal *ah, + struct ar5416eeprom_4k *pEepData, + const struct ieee80211_channel *chan, int16_t *ratesArray, + uint16_t cfgCtl, uint16_t AntennaReduction, + uint16_t twiceMaxRegulatoryPower, + uint16_t powerLimit); +static HAL_BOOL ar9285SetPowerCalTable(struct ath_hal *ah, + struct ar5416eeprom_4k *pEepData, + const struct ieee80211_channel *chan, + int16_t *pTxPowerIndexOffset); +static int16_t interpolate(uint16_t target, uint16_t srcLeft, + uint16_t srcRight, int16_t targetLeft, int16_t targetRight); +static HAL_BOOL ar9285FillVpdTable(uint8_t, uint8_t, uint8_t *, uint8_t *, + uint16_t, uint8_t *); +static void ar9285GetGainBoundariesAndPdadcs(struct ath_hal *ah, + const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ_4K *pRawDataSet, + uint8_t * bChans, uint16_t availPiers, + uint16_t tPdGainOverlap, int16_t *pMinCalPower, + uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues, + uint16_t numXpdGains); +static HAL_BOOL getLowerUpperIndex(uint8_t target, uint8_t *pList, + uint16_t listSize, uint16_t *indexL, uint16_t *indexR); +static uint16_t ar9285GetMaxEdgePower(uint16_t, CAL_CTL_EDGES *); + +/* XXX gag, this is sick */ +typedef enum Ar5416_Rates { + rate6mb, rate9mb, rate12mb, rate18mb, + rate24mb, rate36mb, rate48mb, rate54mb, + rate1l, rate2l, rate2s, rate5_5l, + rate5_5s, rate11l, rate11s, rateXr, + rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3, + rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7, + rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3, + rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7, + rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, + Ar5416RateSize +} AR5416_RATES; + +HAL_BOOL +ar9285SetTransmitPower(struct ath_hal *ah, + const struct ieee80211_channel *chan, uint16_t *rfXpdGain) +{ +#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) +#define N(a) (sizeof (a) / sizeof (a[0])) + + MODAL_EEP4K_HEADER *pModal; + struct ath_hal_5212 *ahp = AH5212(ah); + int16_t ratesArray[Ar5416RateSize]; + int16_t txPowerIndexOffset = 0; + uint8_t ht40PowerIncForPdadc = 2; + int i; + + uint16_t cfgCtl; + uint16_t powerLimit; + uint16_t twiceAntennaReduction; + uint16_t twiceMaxRegulatoryPower; + int16_t maxPower; + HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom; + struct ar5416eeprom_4k *pEepData = &ee->ee_base; + + HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); + + /* Setup info for the actual eeprom */ + OS_MEMZERO(ratesArray, sizeof(ratesArray)); + cfgCtl = ath_hal_getctl(ah, chan); + powerLimit = chan->ic_maxregpower * 2; + twiceAntennaReduction = chan->ic_maxantgain; + twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)->ah_powerLimit); + pModal = &pEepData->modalHeader; + HALDEBUG(ah, HAL_DEBUG_RESET, "%s Channel=%u CfgCtl=%u\n", + __func__,chan->ic_freq, cfgCtl ); + + if (IS_EEP_MINOR_V2(ah)) { + ht40PowerIncForPdadc = pModal->ht40PowerIncForPdadc; + } + + if (!ar9285SetPowerPerRateTable(ah, pEepData, chan, + &ratesArray[0],cfgCtl, + twiceAntennaReduction, + twiceMaxRegulatoryPower, powerLimit)) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: unable to set tx power per rate table\n", __func__); + return AH_FALSE; + } + + if (!ar9285SetPowerCalTable(ah, pEepData, chan, &txPowerIndexOffset)) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unable to set power table\n", + __func__); + return AH_FALSE; + } + + maxPower = AH_MAX(ratesArray[rate6mb], ratesArray[rateHt20_0]); + maxPower = AH_MAX(maxPower, ratesArray[rate1l]); + + if (IEEE80211_IS_CHAN_HT40(chan)) { + maxPower = AH_MAX(maxPower, ratesArray[rateHt40_0]); + } + + ahp->ah_tx6PowerInHalfDbm = maxPower; + AH_PRIVATE(ah)->ah_maxPowerLevel = maxPower; + ahp->ah_txPowerIndexOffset = txPowerIndexOffset; + + /* + * txPowerIndexOffset is set by the SetPowerTable() call - + * adjust the rate table (0 offset if rates EEPROM not loaded) + */ + for (i = 0; i < N(ratesArray); i++) { + ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); + if (ratesArray[i] > AR5416_MAX_RATE_POWER) + ratesArray[i] = AR5416_MAX_RATE_POWER; + ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2; + } + +#ifdef AH_EEPROM_DUMP + ar5416PrintPowerPerRate(ah, ratesArray); +#endif + + /* Write the OFDM power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, + POW_SM(ratesArray[rate18mb], 24) + | POW_SM(ratesArray[rate12mb], 16) + | POW_SM(ratesArray[rate9mb], 8) + | POW_SM(ratesArray[rate6mb], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, + POW_SM(ratesArray[rate54mb], 24) + | POW_SM(ratesArray[rate48mb], 16) + | POW_SM(ratesArray[rate36mb], 8) + | POW_SM(ratesArray[rate24mb], 0) + ); + + /* Write the CCK power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, + POW_SM(ratesArray[rate2s], 24) + | POW_SM(ratesArray[rate2l], 16) + | POW_SM(ratesArray[rateXr], 8) /* XR target power */ + | POW_SM(ratesArray[rate1l], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, + POW_SM(ratesArray[rate11s], 24) + | POW_SM(ratesArray[rate11l], 16) + | POW_SM(ratesArray[rate5_5s], 8) + | POW_SM(ratesArray[rate5_5l], 0) + ); + HALDEBUG(ah, HAL_DEBUG_RESET, + "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", + __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), + OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); + + /* Write the HT20 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, + POW_SM(ratesArray[rateHt20_3], 24) + | POW_SM(ratesArray[rateHt20_2], 16) + | POW_SM(ratesArray[rateHt20_1], 8) + | POW_SM(ratesArray[rateHt20_0], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, + POW_SM(ratesArray[rateHt20_7], 24) + | POW_SM(ratesArray[rateHt20_6], 16) + | POW_SM(ratesArray[rateHt20_5], 8) + | POW_SM(ratesArray[rateHt20_4], 0) + ); + + if (IEEE80211_IS_CHAN_HT40(chan)) { + /* Write the HT40 power per rate set */ + /* Correct PAR difference between HT40 and HT20/LEGACY */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, + POW_SM(ratesArray[rateHt40_3] + ht40PowerIncForPdadc, 24) + | POW_SM(ratesArray[rateHt40_2] + ht40PowerIncForPdadc, 16) + | POW_SM(ratesArray[rateHt40_1] + ht40PowerIncForPdadc, 8) + | POW_SM(ratesArray[rateHt40_0] + ht40PowerIncForPdadc, 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, + POW_SM(ratesArray[rateHt40_7] + ht40PowerIncForPdadc, 24) + | POW_SM(ratesArray[rateHt40_6] + ht40PowerIncForPdadc, 16) + | POW_SM(ratesArray[rateHt40_5] + ht40PowerIncForPdadc, 8) + | POW_SM(ratesArray[rateHt40_4] + ht40PowerIncForPdadc, 0) + ); + /* Write the Dup/Ext 40 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, + POW_SM(ratesArray[rateExtOfdm], 24) + | POW_SM(ratesArray[rateExtCck], 16) + | POW_SM(ratesArray[rateDupOfdm], 8) + | POW_SM(ratesArray[rateDupCck], 0) + ); + } + + return AH_TRUE; +#undef POW_SM +#undef N +} + +HAL_BOOL +ar9285SetBoardValues(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + const HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom; + const struct ar5416eeprom_4k *eep = &ee->ee_base; + const MODAL_EEP4K_HEADER *pModal; + int i, regChainOffset; + uint8_t txRxAttenLocal; /* workaround for eeprom versions <= 14.2 */ + + HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); + pModal = &eep->modalHeader; + + /* NB: workaround for eeprom versions <= 14.2 */ + txRxAttenLocal = 23; + + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon); + for (i = 0; i < AR5416_4K_MAX_CHAINS; i++) { + if (AR_SREV_MERLIN(ah)) { + if (i >= 2) break; + } + if (AR_SREV_OWL_20_OR_LATER(ah) && + (AH5416(ah)->ah_rx_chainmask == 0x5 || + AH5416(ah)->ah_tx_chainmask == 0x5) && i != 0) { + /* Regs are swapped from chain 2 to 1 for 5416 2_0 with + * only chains 0 and 2 populated + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 18:14:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2AB61065670; Mon, 15 Feb 2010 18:14:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 928AC8FC15; Mon, 15 Feb 2010 18:14:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FIEpB1076417; Mon, 15 Feb 2010 18:14:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FIEpXP076415; Mon, 15 Feb 2010 18:14:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002151814.o1FIEpXP076415@svn.freebsd.org> From: Alexander Motin Date: Mon, 15 Feb 2010 18:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203931 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 18:14:51 -0000 Author: mav Date: Mon Feb 15 18:14:51 2010 New Revision: 203931 URL: http://svn.freebsd.org/changeset/base/203931 Log: Make CD driver a bit more robust and predictable to unreported errors. Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Mon Feb 15 17:49:49 2010 (r203930) +++ head/sys/cam/scsi/scsi_cd.c Mon Feb 15 18:14:51 2010 (r203931) @@ -638,15 +638,14 @@ cdregister(struct cam_periph *periph, vo return(CAM_REQ_CMP_ERR); } - softc = (struct cd_softc *)malloc(sizeof(*softc),M_DEVBUF,M_NOWAIT); - + softc = (struct cd_softc *)malloc(sizeof(*softc),M_DEVBUF, + M_NOWAIT | M_ZERO); if (softc == NULL) { printf("cdregister: Unable to probe new device. " "Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } - bzero(softc, sizeof(*softc)); LIST_INIT(&softc->pending_ccbs); STAILQ_INIT(&softc->mode_queue); softc->state = CD_STATE_PROBE; @@ -861,8 +860,7 @@ cdregister(struct cam_periph *periph, vo */ else { nchanger = malloc(sizeof(struct cdchanger), - M_DEVBUF, M_NOWAIT); - + M_DEVBUF, M_NOWAIT | M_ZERO); if (nchanger == NULL) { softc->flags &= ~CD_FLAG_CHANGER; printf("cdregister: unable to malloc " @@ -875,10 +873,6 @@ cdregister(struct cam_periph *periph, vo */ goto cdregisterexit; } - - /* zero the structure */ - bzero(nchanger, sizeof(struct cdchanger)); - if (camq_init(&nchanger->devq, 1) != 0) { softc->flags &= ~CD_FLAG_CHANGER; printf("cdregister: changer support " @@ -1506,8 +1500,7 @@ cdstart(struct cam_periph *periph, union { rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap), - M_SCSICD, - M_NOWAIT); + M_SCSICD, M_NOWAIT | M_ZERO); if (rcap == NULL) { xpt_print(periph->path, "cdstart: Couldn't malloc read_capacity data\n"); @@ -2073,7 +2066,7 @@ cdioctl(struct disk *dp, u_long cmd, voi u_int32_t len = args->data_len; data = malloc(sizeof(struct cd_sub_channel_info), - M_SCSICD, M_WAITOK); + M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2125,7 +2118,7 @@ cdioctl(struct disk *dp, u_long cmd, voi struct ioc_toc_header *th; th = malloc(sizeof(struct ioc_toc_header), M_SCSICD, - M_WAITOK); + M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2162,8 +2155,8 @@ cdioctl(struct disk *dp, u_long cmd, voi u_int32_t len, readlen, idx, num; u_int32_t starting_track = te->starting_track; - data = malloc(sizeof(*data), M_SCSICD, M_WAITOK); - lead = malloc(sizeof(*lead), M_SCSICD, M_WAITOK); + data = malloc(sizeof(*data), M_SCSICD, M_WAITOK | M_ZERO); + lead = malloc(sizeof(*lead), M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2291,7 +2284,7 @@ cdioctl(struct disk *dp, u_long cmd, voi struct ioc_toc_header *th; u_int32_t track; - data = malloc(sizeof(*data), M_SCSICD, M_WAITOK); + data = malloc(sizeof(*data), M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2906,7 +2899,7 @@ cdsize(struct cam_periph *periph, u_int3 /* XXX Should be M_WAITOK */ rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), - M_SCSICD, M_NOWAIT); + M_SCSICD, M_NOWAIT | M_ZERO); if (rcap_buf == NULL) return (ENOMEM); @@ -2925,6 +2918,9 @@ cdsize(struct cam_periph *periph, u_int3 softc->params.disksize = scsi_4btoul(rcap_buf->addr) + 1; softc->params.blksize = scsi_4btoul(rcap_buf->length); + /* Make sure we got at least some block size. */ + if (error == 0 && softc->params.blksize == 0) + error = EIO; /* * SCSI-3 mandates that the reported blocksize shall be 2048. * Older drives sometimes report funny values, trim it down to From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 18:46:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92B891065694; Mon, 15 Feb 2010 18:46:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80CEC8FC1E; Mon, 15 Feb 2010 18:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FIk3wp083411; Mon, 15 Feb 2010 18:46:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FIk3G3083404; Mon, 15 Feb 2010 18:46:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002151846.o1FIk3G3083404@svn.freebsd.org> From: Warner Losh Date: Mon, 15 Feb 2010 18:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203932 - in head/games: bcd caesar morse number pom ppt primes random X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 18:46:03 -0000 Author: imp Date: Mon Feb 15 18:46:02 2010 New Revision: 203932 URL: http://svn.freebsd.org/changeset/base/203932 Log: Remove the third clause for the Berkeley parts of games, per the letter in /COPYRIGHT. Modified: head/games/bcd/bcd.c head/games/caesar/caesar.c head/games/morse/morse.c head/games/number/number.c head/games/pom/pom.c head/games/ppt/ppt.c head/games/primes/pattern.c head/games/primes/pr_tbl.c head/games/primes/primes.c head/games/primes/primes.h head/games/random/random.c Modified: head/games/bcd/bcd.c ============================================================================== --- head/games/bcd/bcd.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/bcd/bcd.c Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/caesar/caesar.c ============================================================================== --- head/games/caesar/caesar.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/caesar/caesar.c Mon Feb 15 18:46:02 2010 (r203932) @@ -18,11 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/morse/morse.c ============================================================================== --- head/games/morse/morse.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/morse/morse.c Mon Feb 15 18:46:02 2010 (r203932) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/number/number.c ============================================================================== --- head/games/number/number.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/number/number.c Mon Feb 15 18:46:02 2010 (r203932) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/pom/pom.c ============================================================================== --- head/games/pom/pom.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/pom/pom.c Mon Feb 15 18:46:02 2010 (r203932) @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/ppt/ppt.c ============================================================================== --- head/games/ppt/ppt.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/ppt/ppt.c Mon Feb 15 18:46:02 2010 (r203932) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/primes/pattern.c ============================================================================== --- head/games/primes/pattern.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/primes/pattern.c Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/primes/pr_tbl.c ============================================================================== --- head/games/primes/pr_tbl.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/primes/pr_tbl.c Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/primes/primes.c ============================================================================== --- head/games/primes/primes.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/primes/primes.c Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/primes/primes.h ============================================================================== --- head/games/primes/primes.h Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/primes/primes.h Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/games/random/random.c ============================================================================== --- head/games/random/random.c Mon Feb 15 18:14:51 2010 (r203931) +++ head/games/random/random.c Mon Feb 15 18:46:02 2010 (r203932) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 18:47:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2985A1065750; Mon, 15 Feb 2010 18:47:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 198438FC15; Mon, 15 Feb 2010 18:47:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FIlgVD083807; Mon, 15 Feb 2010 18:47:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FIlg38083805; Mon, 15 Feb 2010 18:47:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002151847.o1FIlg38083805@svn.freebsd.org> From: Rui Paulo Date: Mon, 15 Feb 2010 18:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203933 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 18:47:43 -0000 Author: rpaulo Date: Mon Feb 15 18:47:42 2010 New Revision: 203933 URL: http://svn.freebsd.org/changeset/base/203933 Log: Fix KITE version check. Obtained from: //depot/user/rpaulo/80211n/... Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:46:02 2010 (r203932) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:47:42 2010 (r203933) @@ -613,12 +613,12 @@ (AR_SREV_KITE(ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_11) #define AR_SREV_KITE_11_OR_LATER(_ah) \ - (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_KITE || \ + (AR_SREV_KITE_11(_ah) || \ AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_11) #define AR_SREV_KITE_12(_ah) \ (AR_SREV_KITE(ah) && \ - AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_12) + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) #define AR_SREV_KITE_12_OR_LATER(_ah) \ - (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_KITE || \ + (AR_SREV_KITE_12(_ah) || \ AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) #endif /* _DEV_ATH_AR5416REG_H */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 19:18:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39F6106566C; Mon, 15 Feb 2010 19:18:46 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C37728FC0C; Mon, 15 Feb 2010 19:18:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FJIkvv090661; Mon, 15 Feb 2010 19:18:46 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FJIkFS090659; Mon, 15 Feb 2010 19:18:46 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201002151918.o1FJIkFS090659@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 15 Feb 2010 19:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203934 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 19:18:46 -0000 Author: bschmidt Date: Mon Feb 15 19:18:46 2010 New Revision: 203934 URL: http://svn.freebsd.org/changeset/base/203934 Log: Fix for the Intel WiFi Link 1000. The EEPROM image is in the OTPROM block before the last block, not in the last block itself. Approved by: rpaulo (mentor) Obtained from: OpenBSD MFC after: 3 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Feb 15 18:47:42 2010 (r203933) +++ head/sys/dev/iwn/if_iwn.c Mon Feb 15 19:18:46 2010 (r203934) @@ -972,8 +972,7 @@ iwn_eeprom_unlock(struct iwn_softc *sc) int iwn_init_otprom(struct iwn_softc *sc) { - uint32_t base; - uint16_t next; + uint16_t prev, base, next; int count, error; /* Wait for clock stabilization before accessing prph. */ @@ -1000,25 +999,26 @@ iwn_init_otprom(struct iwn_softc *sc) IWN_OTP_GP_ECC_CORR_STTS | IWN_OTP_GP_ECC_UNCORR_STTS); /* - * Find last valid OTP block (contains the EEPROM image) for HW - * without OTP shadow RAM. + * Find the block before last block (contains the EEPROM image) + * for HW without OTP shadow RAM. */ if (sc->hw_type == IWN_HW_REV_TYPE_1000) { /* Switch to absolute addressing mode. */ IWN_CLRBITS(sc, IWN_OTP_GP, IWN_OTP_GP_RELATIVE_ACCESS); - base = 0; + base = prev = 0; for (count = 0; count < IWN1000_OTP_NBLOCKS; count++) { error = iwn_read_prom_data(sc, base, &next, 2); if (error != 0) return error; if (next == 0) /* End of linked-list. */ break; + prev = base; base = le16toh(next); } - if (base == 0 || count == IWN1000_OTP_NBLOCKS) + if (count == 0 || count == IWN1000_OTP_NBLOCKS) return EIO; /* Skip "next" word. */ - sc->prom_base = base + 1; + sc->prom_base = prev + 1; } return 0; } From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 19:30:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25F7F106566B; Mon, 15 Feb 2010 19:30:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15D698FC0A; Mon, 15 Feb 2010 19:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FJUSP1093257; Mon, 15 Feb 2010 19:30:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FJUSkR093255; Mon, 15 Feb 2010 19:30:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002151930.o1FJUSkR093255@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Feb 2010 19:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203935 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 19:30:29 -0000 Author: jkim Date: Mon Feb 15 19:30:28 2010 New Revision: 203935 URL: http://svn.freebsd.org/changeset/base/203935 Log: Add support for `cycle' and `zero' events for LCD brightness control. Submitted by: Daniel Walter (d dot walter at 0x90 dot at) (intial version) Modified: head/sys/dev/acpica/acpi_video.c Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Mon Feb 15 19:18:46 2010 (r203934) +++ head/sys/dev/acpica/acpi_video.c Mon Feb 15 19:30:28 2010 (r203935) @@ -103,8 +103,10 @@ static void vo_set_device_state(ACPI_HAN /* events */ #define VID_NOTIFY_SWITCHED 0x80 #define VID_NOTIFY_REPROBE 0x81 +#define VID_NOTIFY_CYC_BRN 0x85 #define VID_NOTIFY_INC_BRN 0x86 #define VID_NOTIFY_DEC_BRN 0x87 +#define VID_NOTIFY_ZRO_BRN 0x88 /* _DOS (Enable/Disable Output Switching) argument bits */ #define DOS_SWITCH_MASK 3 @@ -645,20 +647,41 @@ acpi_video_vo_notify_handler(ACPI_HANDLE vo = context; ACPI_SERIAL_BEGIN(video_output); - if (vo->handle != handle) { - ACPI_SERIAL_END(video_output); - return; - } + if (vo->handle != handle) + goto out; switch (notify) { + case VID_NOTIFY_CYC_BRN: + if (vo->vo_numlevels <= 3) + goto out; + /* FALLTHROUGH */ case VID_NOTIFY_INC_BRN: case VID_NOTIFY_DEC_BRN: + case VID_NOTIFY_ZRO_BRN: if (vo->vo_levels == NULL) - break; + goto out; level = vo_get_brightness(handle); if (level < 0) - break; - new_level = level; + goto out; + break; + default: + printf("unknown notify event 0x%x from %s\n", + notify, acpi_name(handle)); + goto out; + } + + new_level = level; + switch (notify) { + case VID_NOTIFY_CYC_BRN: + for (i = 2; i < vo->vo_numlevels; i++) + if (vo->vo_levels[i] == level) { + new_level = vo->vo_numlevels > i + 1 ? + vo->vo_levels[i + 1] : vo->vo_levels[2]; + break; + } + break; + case VID_NOTIFY_INC_BRN: + case VID_NOTIFY_DEC_BRN: for (i = 0; i < vo->vo_numlevels; i++) { j = vo->vo_levels[i]; if (notify == VID_NOTIFY_INC_BRN) { @@ -671,15 +694,21 @@ acpi_video_vo_notify_handler(ACPI_HANDLE new_level = j; } } - if (new_level != level) { - vo_set_brightness(handle, new_level); - vo->vo_brightness = new_level; - } break; - default: - printf("unknown notify event 0x%x from %s\n", - notify, acpi_name(handle)); + case VID_NOTIFY_ZRO_BRN: + for (i = 0; i < vo->vo_numlevels; i++) + if (vo->vo_levels[i] == 0) { + new_level = 0; + break; + } + break; } + if (new_level != level) { + vo_set_brightness(handle, new_level); + vo->vo_brightness = new_level; + } + +out: ACPI_SERIAL_END(video_output); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 20:46:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F26031065696; Mon, 15 Feb 2010 20:46:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E166E8FC41; Mon, 15 Feb 2010 20:46:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FKk1lA009982; Mon, 15 Feb 2010 20:46:01 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FKk1qa009980; Mon, 15 Feb 2010 20:46:01 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002152046.o1FKk1qa009980@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Feb 2010 20:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203936 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 20:46:02 -0000 Author: jkim Date: Mon Feb 15 20:46:01 2010 New Revision: 203936 URL: http://svn.freebsd.org/changeset/base/203936 Log: Rename some macros to clarify their intentions and fix style nits. Modified: head/sys/dev/acpica/acpi_video.c Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Mon Feb 15 19:30:28 2010 (r203935) +++ head/sys/dev/acpica/acpi_video.c Mon Feb 15 20:46:01 2010 (r203936) @@ -101,54 +101,54 @@ static UINT32 vo_get_graphics_state(ACPI static void vo_set_device_state(ACPI_HANDLE, UINT32); /* events */ -#define VID_NOTIFY_SWITCHED 0x80 -#define VID_NOTIFY_REPROBE 0x81 -#define VID_NOTIFY_CYC_BRN 0x85 +#define VID_NOTIFY_SWITCHED 0x80 +#define VID_NOTIFY_REPROBE 0x81 +#define VID_NOTIFY_CYCLE_BRN 0x85 #define VID_NOTIFY_INC_BRN 0x86 #define VID_NOTIFY_DEC_BRN 0x87 -#define VID_NOTIFY_ZRO_BRN 0x88 +#define VID_NOTIFY_ZERO_BRN 0x88 /* _DOS (Enable/Disable Output Switching) argument bits */ -#define DOS_SWITCH_MASK 3 -#define DOS_SWITCH_BY_OSPM 0 -#define DOS_SWITCH_BY_BIOS 1 -#define DOS_SWITCH_LOCKED 2 -#define DOS_BRIGHTNESS_BY_BIOS (1 << 2) +#define DOS_SWITCH_MASK 3 +#define DOS_SWITCH_BY_OSPM 0 +#define DOS_SWITCH_BY_BIOS 1 +#define DOS_SWITCH_LOCKED 2 +#define DOS_BRIGHTNESS_BY_OSPM (1 << 2) /* _DOD and subdev's _ADR */ -#define DOD_DEVID_MASK 0x0f00 -#define DOD_DEVID_MASK_FULL 0xffff -#define DOD_DEVID_MASK_DISPIDX 0x000f -#define DOD_DEVID_MASK_DISPPORT 0x00f0 -#define DOD_DEVID_MONITOR 0x0100 -#define DOD_DEVID_LCD 0x0110 -#define DOD_DEVID_TV 0x0200 -#define DOD_DEVID_EXT 0x0300 -#define DOD_DEVID_INTDFP 0x0400 -#define DOD_BIOS (1 << 16) -#define DOD_NONVGA (1 << 17) -#define DOD_HEAD_ID_SHIFT 18 -#define DOD_HEAD_ID_BITS 3 -#define DOD_HEAD_ID_MASK \ +#define DOD_DEVID_MASK 0x0f00 +#define DOD_DEVID_MASK_FULL 0xffff +#define DOD_DEVID_MASK_DISPIDX 0x000f +#define DOD_DEVID_MASK_DISPPORT 0x00f0 +#define DOD_DEVID_MONITOR 0x0100 +#define DOD_DEVID_LCD 0x0110 +#define DOD_DEVID_TV 0x0200 +#define DOD_DEVID_EXT 0x0300 +#define DOD_DEVID_INTDFP 0x0400 +#define DOD_BIOS (1 << 16) +#define DOD_NONVGA (1 << 17) +#define DOD_HEAD_ID_SHIFT 18 +#define DOD_HEAD_ID_BITS 3 +#define DOD_HEAD_ID_MASK \ (((1 << DOD_HEAD_ID_BITS) - 1) << DOD_HEAD_ID_SHIFT) -#define DOD_DEVID_SCHEME_STD (1 << 31) +#define DOD_DEVID_SCHEME_STD (1 << 31) /* _BCL related constants */ -#define BCL_FULLPOWER 0 -#define BCL_ECONOMY 1 +#define BCL_FULLPOWER 0 +#define BCL_ECONOMY 1 /* _DCS (Device Currrent Status) value bits and masks. */ -#define DCS_EXISTS (1 << 0) -#define DCS_ACTIVE (1 << 1) -#define DCS_READY (1 << 2) -#define DCS_FUNCTIONAL (1 << 3) -#define DCS_ATTACHED (1 << 4) +#define DCS_EXISTS (1 << 0) +#define DCS_ACTIVE (1 << 1) +#define DCS_READY (1 << 2) +#define DCS_FUNCTIONAL (1 << 3) +#define DCS_ATTACHED (1 << 4) /* _DSS (Device Set Status) argument bits and masks. */ -#define DSS_INACTIVE 0 -#define DSS_ACTIVE (1 << 0) -#define DSS_SETNEXT (1 << 30) -#define DSS_COMMIT (1 << 31) +#define DSS_INACTIVE 0 +#define DSS_ACTIVE (1 << 0) +#define DSS_SETNEXT (1 << 30) +#define DSS_COMMIT (1 << 31) static device_method_t acpi_video_methods[] = { DEVMETHOD(device_identify, acpi_video_identify), @@ -275,7 +275,7 @@ acpi_video_attach(device_t dev) * brightness levels. */ vid_set_switch_policy(sc->handle, DOS_SWITCH_BY_OSPM | - DOS_BRIGHTNESS_BY_BIOS); + DOS_BRIGHTNESS_BY_OSPM); acpi_video_power_profile(sc); @@ -651,13 +651,13 @@ acpi_video_vo_notify_handler(ACPI_HANDLE goto out; switch (notify) { - case VID_NOTIFY_CYC_BRN: + case VID_NOTIFY_CYCLE_BRN: if (vo->vo_numlevels <= 3) goto out; /* FALLTHROUGH */ case VID_NOTIFY_INC_BRN: case VID_NOTIFY_DEC_BRN: - case VID_NOTIFY_ZRO_BRN: + case VID_NOTIFY_ZERO_BRN: if (vo->vo_levels == NULL) goto out; level = vo_get_brightness(handle); @@ -672,7 +672,7 @@ acpi_video_vo_notify_handler(ACPI_HANDLE new_level = level; switch (notify) { - case VID_NOTIFY_CYC_BRN: + case VID_NOTIFY_CYCLE_BRN: for (i = 2; i < vo->vo_numlevels; i++) if (vo->vo_levels[i] == level) { new_level = vo->vo_numlevels > i + 1 ? @@ -695,7 +695,7 @@ acpi_video_vo_notify_handler(ACPI_HANDLE } } break; - case VID_NOTIFY_ZRO_BRN: + case VID_NOTIFY_ZERO_BRN: for (i = 0; i < vo->vo_numlevels; i++) if (vo->vo_levels[i] == 0) { new_level = 0; From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 22:11:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 705531065679; Mon, 15 Feb 2010 22:11:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f175.google.com (mail-iw0-f175.google.com [209.85.223.175]) by mx1.freebsd.org (Postfix) with ESMTP id 07C9E8FC12; Mon, 15 Feb 2010 22:11:39 +0000 (UTC) Received: by iwn5 with SMTP id 5so2194403iwn.9 for ; Mon, 15 Feb 2010 14:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=0uRgVz4PeJr6t30j3xNvd0T8SCD46aKJIKCyQH902F8=; b=Ae1kisffBkiLL3VC+OpLpWK0qNCZutyaf13ISRmLgMwmoNd4bEuhA2M8KAznqjTz+A LWagQPSl5X7yZ2pxfWyQrxHSZ3IJwGWvHEuEUe45vRNkt5SYrxyoHmWHlAZRz/No1LKz dh2w8z6nSMOwgR01wQXopjvgO+wRWxGhdUD7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=nC91AXYspfxmCVruwoL+xoZnSf0OEvuKg8TJrfWC+SAXxZLYbb2su4wzZo8nX8BOl4 +is9Q7APmplRBMAdtlODdRwUziWe9TWZquoJp1PFAyVK0aP3jTUg1Kt2DqRV9qkcyWpw ziiMtdpwfi4XPsc8Z6aNOAD4BFjF27wkH/Zi4= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.167.65 with SMTP id p1mr821296iby.20.1266271899366; Mon, 15 Feb 2010 14:11:39 -0800 (PST) In-Reply-To: <20100210203519.GA44831@FreeBSD.org> References: <201002101630.o1AGU4kn043737@svn.freebsd.org> <20100210203519.GA44831@FreeBSD.org> Date: Mon, 15 Feb 2010 23:11:39 +0100 X-Google-Sender-Auth: edefc3aac781870a Message-ID: <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> From: Attilio Rao To: Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 22:11:40 -0000 2010/2/10 Alexey Dokuchaev : > On Wed, Feb 10, 2010 at 04:30:04PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Wed Feb 10 16:30:04 2010 >> New Revision: 203758 >> URL: http://svn.freebsd.org/changeset/base/203758 >> >> Log: >> =C2=A0 Add the options DEADLKRES (introducing the deadlock resolver thre= ad) in >> =C2=A0 the 'debugging' section of any HEAD kernel and enable for the mai= nstream >> =C2=A0 ones, excluding the embedded architectures. >> =C2=A0 It may, of course, enabled on a case-by-case basis. >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> =C2=A0 Requested by: =C2=A0 =C2=A0 =C2=A0 emaste >> =C2=A0 Discussed with: =C2=A0 =C2=A0 kib >> >> @@ -72,6 +72,7 @@ options =C2=A0 =C2=A0 INCLUDE_CONFIG_FILE =C2=A0 =C2= =A0 # Inclu >> =C2=A0options =C2=A0 =C2=A0 =C2=A0KDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable kernel debugger support. >> =C2=A0options =C2=A0 =C2=A0 =C2=A0DDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Support DDB. >> =C2=A0options =C2=A0 =C2=A0 =C2=A0GDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Support remote GDB. >> +options =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEADLKRES =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable the deadlock resolve= r >> =C2=A0options =C2=A0 =C2=A0 =C2=A0INVARIANTS =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0# Enable calls of extra sanity checking > > Garbled indentation suggests you've put after "options" instead of > space. =C2=A0If you decide to fix it, you can take care of the similar er= ror > with FLOWTABLE option at least in amd64/conf/GENERIC. I'm sorry but it seems that all the other (at least for debugging) are as 'optionsMACRO' which is what I did here, or I made something wrong? Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 22:45:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43831106568D; Mon, 15 Feb 2010 22:45:29 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A39C98FC1C; Mon, 15 Feb 2010 22:45:27 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA05377; Tue, 16 Feb 2010 00:45:25 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Nh9gz-000OJh-9I; Tue, 16 Feb 2010 00:45:25 +0200 Message-ID: <4B79CE84.3060901@freebsd.org> Date: Tue, 16 Feb 2010 00:45:24 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20100211) MIME-Version: 1.0 To: Attilio Rao References: <201002101630.o1AGU4kn043737@svn.freebsd.org> <20100210203519.GA44831@FreeBSD.org> <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> In-Reply-To: <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 22:45:29 -0000 on 16/02/2010 00:11 Attilio Rao said the following: > 2010/2/10 Alexey Dokuchaev : >> On Wed, Feb 10, 2010 at 04:30:04PM +0000, Attilio Rao wrote: >>> Author: attilio >>> Date: Wed Feb 10 16:30:04 2010 >>> New Revision: 203758 >>> URL: http://svn.freebsd.org/changeset/base/203758 >>> >>> Log: >>> Add the options DEADLKRES (introducing the deadlock resolver thread) in >>> the 'debugging' section of any HEAD kernel and enable for the mainstream >>> ones, excluding the embedded architectures. >>> It may, of course, enabled on a case-by-case basis. >>> >>> Sponsored by: Sandvine Incorporated >>> Requested by: emaste >>> Discussed with: kib >>> >>> @@ -72,6 +72,7 @@ options INCLUDE_CONFIG_FILE # Inclu >>> options KDB # Enable kernel debugger support. >>> options DDB # Support DDB. >>> options GDB # Support remote GDB. >>> +options DEADLKRES # Enable the deadlock resolver >>> options INVARIANTS # Enable calls of extra sanity checking >> Garbled indentation suggests you've put after "options" instead of >> space. If you decide to fix it, you can take care of the similar error >> with FLOWTABLE option at least in amd64/conf/GENERIC. > > I'm sorry but it seems that all the other (at least for debugging) are > as 'optionsMACRO' which is what I did here, or I made something > wrong? At least in the i386/amd64 kernel config files typically we have: optionsOPTION And it is the case for the quoted above amd64 context. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 22:48:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E90D106566B; Mon, 15 Feb 2010 22:48:45 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-iw0-f175.google.com (mail-iw0-f175.google.com [209.85.223.175]) by mx1.freebsd.org (Postfix) with ESMTP id 9AE518FC13; Mon, 15 Feb 2010 22:48:44 +0000 (UTC) Received: by iwn5 with SMTP id 5so2220782iwn.9 for ; Mon, 15 Feb 2010 14:48:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ZZoGyZF8hyjS6oMCejeZaxedQREyTgpgMkZHRLtSa5Q=; b=HqPvTJfd9GxugEWHbOhL3obfAKTfbW2DwibA+/yN6RJWSBi4tTNmgAsRj+BBnaVMz1 I+jhtlv1Fk463LBKJYp305M67V749gpL1jidouwQ94F6zbefJyi0vdsfcWoLhJ/+lqkj 52a8nY7AvuWtuDujHKNTTW/blkqVm7Vv28Tvw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=reRli6nu8VolFgvOtUvOSt8VmHoWP313tdGRzWqZQKBx8s4bO1tvO+4hqqbYOjDq7R UNKrTBJJ2zC98dseW5GpvhJao+OMBQ2KwEQCux6cGeANx6NDjIMs03lux5v6CbbQcMDH coetXGpYjqJvCBHMljswoWsP1Lm1DwtUM10zE= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.148.134 with SMTP id p6mr5863655ibv.96.1266274123991; Mon, 15 Feb 2010 14:48:43 -0800 (PST) In-Reply-To: <4B79CE84.3060901@freebsd.org> References: <201002101630.o1AGU4kn043737@svn.freebsd.org> <20100210203519.GA44831@FreeBSD.org> <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> <4B79CE84.3060901@freebsd.org> Date: Mon, 15 Feb 2010 23:48:43 +0100 X-Google-Sender-Auth: ffc284d068b42dbf Message-ID: <3bbf2fe11002151448t6ca9a519s65fda66af3927086@mail.gmail.com> From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 22:48:45 -0000 2010/2/15 Andriy Gapon : > on 16/02/2010 00:11 Attilio Rao said the following: >> 2010/2/10 Alexey Dokuchaev : >>> On Wed, Feb 10, 2010 at 04:30:04PM +0000, Attilio Rao wrote: >>>> Author: attilio >>>> Date: Wed Feb 10 16:30:04 2010 >>>> New Revision: 203758 >>>> URL: http://svn.freebsd.org/changeset/base/203758 >>>> >>>> Log: >>>> =C2=A0 Add the options DEADLKRES (introducing the deadlock resolver th= read) in >>>> =C2=A0 the 'debugging' section of any HEAD kernel and enable for the m= ainstream >>>> =C2=A0 ones, excluding the embedded architectures. >>>> =C2=A0 It may, of course, enabled on a case-by-case basis. >>>> >>>> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >>>> =C2=A0 Requested by: =C2=A0 =C2=A0 =C2=A0 emaste >>>> =C2=A0 Discussed with: =C2=A0 =C2=A0 kib >>>> >>>> @@ -72,6 +72,7 @@ options =C2=A0 =C2=A0 INCLUDE_CONFIG_FILE =C2=A0 =C2= =A0 # Inclu >>>> =C2=A0options =C2=A0 =C2=A0 =C2=A0KDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable kernel debugger support. >>>> =C2=A0options =C2=A0 =C2=A0 =C2=A0DDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Support DDB. >>>> =C2=A0options =C2=A0 =C2=A0 =C2=A0GDB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Support remote GDB. >>>> +options =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEADLKRES =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable the deadlock resolve= r >>>> =C2=A0options =C2=A0 =C2=A0 =C2=A0INVARIANTS =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0# Enable calls of extra sanity checking >>> Garbled indentation suggests you've put after "options" instead o= f >>> space. =C2=A0If you decide to fix it, you can take care of the similar = error >>> with FLOWTABLE option at least in amd64/conf/GENERIC. >> >> I'm sorry but it seems that all the other (at least for debugging) are >> as 'optionsMACRO' which is what I did here, or I made something >> wrong? > > At least in the i386/amd64 kernel config files typically we have: > optionsOPTION > And it is the case for the quoted above amd64 context. Oh, I see now, I did opposed to . Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 23:17:45 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02B4E1065676; Mon, 15 Feb 2010 23:17:45 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id C74E28FC18; Mon, 15 Feb 2010 23:17:44 +0000 (UTC) Received: from ice.local ([10.0.0.115]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o1FNHhRY085760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Feb 2010 15:17:44 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <4B79D617.2010009@errno.com> Date: Mon, 15 Feb 2010 15:17:43 -0800 From: Sam Leffler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Rui Paulo References: <201002151847.o1FIlg38083805@svn.freebsd.org> In-Reply-To: <201002151847.o1FIlg38083805@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r203933 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 23:17:45 -0000 Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 15 18:47:42 2010 > New Revision: 203933 > URL: http://svn.freebsd.org/changeset/base/203933 > > Log: > Fix KITE version check. > > Obtained from: //depot/user/rpaulo/80211n/... > > Modified: > head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h > > Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h > ============================================================================== > --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:46:02 2010 (r203932) > +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Mon Feb 15 18:47:42 2010 (r203933) > @@ -613,12 +613,12 @@ > (AR_SREV_KITE(ah) && \ > AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_11) > #define AR_SREV_KITE_11_OR_LATER(_ah) \ > - (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_KITE || \ > + (AR_SREV_KITE_11(_ah) || \ > AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_11) > #define AR_SREV_KITE_12(_ah) \ > (AR_SREV_KITE(ah) && \ > - AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_12) > + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) Should this be named AR_SREV_KITE_12_OR_LATER? or is the change wrong? > #define AR_SREV_KITE_12_OR_LATER(_ah) \ > - (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_KITE || \ > + (AR_SREV_KITE_12(_ah) || \ > AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) > #endif /* _DEV_ATH_AR5416REG_H */ > > From owner-svn-src-all@FreeBSD.ORG Mon Feb 15 23:44:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 685A71065676; Mon, 15 Feb 2010 23:44:49 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 557A68FC1A; Mon, 15 Feb 2010 23:44:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FNimiv049281; Mon, 15 Feb 2010 23:44:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1FNimLB049245; Mon, 15 Feb 2010 23:44:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201002152344.o1FNimLB049245@svn.freebsd.org> From: Attilio Rao Date: Mon, 15 Feb 2010 23:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203938 - in head/sys: amd64/conf arm/conf conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 23:44:49 -0000 Author: attilio Date: Mon Feb 15 23:44:48 2010 New Revision: 203938 URL: http://svn.freebsd.org/changeset/base/203938 Log: Adjust style (following the already existing rules) for the newly introduced option DEADLKRES. Reported by: danfe, julian, avg Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/XENHVM head/sys/arm/conf/AVILA head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/EP80219 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/NSLU head/sys/arm/conf/SKYEYE head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/i386/conf/XEN head/sys/ia64/conf/GENERIC head/sys/mips/conf/ADM5120 head/sys/mips/conf/ALCHEMY head/sys/mips/conf/IDT head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 head/sys/mips/conf/OCTEON1-32 head/sys/mips/conf/QEMU head/sys/mips/conf/SENTRY5 head/sys/mips/conf/SWARM head/sys/mips/conf/XLR head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/MPC85XX head/sys/sun4v/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/amd64/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -72,7 +72,7 @@ options INCLUDE_CONFIG_FILE # Inclu options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/amd64/conf/XENHVM Mon Feb 15 23:44:48 2010 (r203938) @@ -70,7 +70,7 @@ options NO_ADAPTIVE_RWLOCKS options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/AVILA Mon Feb 15 23:44:48 2010 (r203938) @@ -39,7 +39,7 @@ options DEVICE_POLLING options KDB #options GDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/BWCT Mon Feb 15 23:44:48 2010 (r203938) @@ -79,7 +79,7 @@ device mii device rlswitch # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/CAMBRIA Mon Feb 15 23:44:48 2010 (r203938) @@ -39,7 +39,7 @@ options DEVICE_POLLING options KDB #options GDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/CNS11XXNAS Mon Feb 15 23:44:48 2010 (r203938) @@ -39,7 +39,7 @@ options DEVICE_POLLING options KDB #options GDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/CRB Mon Feb 15 23:44:48 2010 (r203938) @@ -93,7 +93,7 @@ device pty # Debugging for use in -current options KDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/DB-88F5XXX Mon Feb 15 23:44:48 2010 (r203938) @@ -39,7 +39,7 @@ options NO_SWAPPING # Debugging options ALT_BREAK_TO_DEBUGGER options DDB -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options DIAGNOSTIC #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/DB-88F6XXX Mon Feb 15 23:44:48 2010 (r203938) @@ -39,7 +39,7 @@ options NO_SWAPPING # Debugging options ALT_BREAK_TO_DEBUGGER options DDB -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options DIAGNOSTIC #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/EP80219 Mon Feb 15 23:44:48 2010 (r203938) @@ -89,7 +89,7 @@ device dma # I80321 DMA Controller # Debugging for use in -current options KDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/GUMSTIX Mon Feb 15 23:44:48 2010 (r203938) @@ -80,7 +80,7 @@ device pty # Debugging for use in -current options KDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/HL200 Mon Feb 15 23:44:48 2010 (r203938) @@ -74,7 +74,7 @@ device mii device lxtphy # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/IQ31244 Mon Feb 15 23:44:48 2010 (r203938) @@ -94,7 +94,7 @@ device "iq31244_7seg" # IQ31244 7 seg # Debugging for use in -current options KDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/KB920X Mon Feb 15 23:44:48 2010 (r203938) @@ -75,7 +75,7 @@ device mii device lxtphy # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/NSLU Mon Feb 15 23:44:48 2010 (r203938) @@ -44,7 +44,7 @@ options DEVICE_POLLING options KDB #options GDB options DDB #Enable the kernel debugger -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/SKYEYE ============================================================================== --- head/sys/arm/conf/SKYEYE Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/arm/conf/SKYEYE Mon Feb 15 23:44:48 2010 (r203938) @@ -68,7 +68,7 @@ device uart # output. Adds ~215k to driver. # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/conf/NOTES Mon Feb 15 23:44:48 2010 (r203938) @@ -2547,7 +2547,7 @@ options SW_WATCHDOG # # Add the software deadlock resolver thread. # -options DEADLKRES +options DEADLKRES # # Disable swapping of stack pages. This option removes all Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/i386/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -72,7 +72,7 @@ options INCLUDE_CONFIG_FILE # Inclu options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/i386/conf/XEN ============================================================================== --- head/sys/i386/conf/XEN Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/i386/conf/XEN Mon Feb 15 23:44:48 2010 (r203938) @@ -49,7 +49,7 @@ options AUDIT # Security event auditi options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/ia64/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -31,7 +31,7 @@ options COMPAT_43TTY # BSD 4.3 TTY comp options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options DDB # Support DDB -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options FFS # Berkeley Fast Filesystem options GDB # Support remote GDB options GEOM_LABEL # Provides labelization Modified: head/sys/mips/conf/ADM5120 ============================================================================== --- head/sys/mips/conf/ADM5120 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/ADM5120 Mon Feb 15 23:44:48 2010 (r203938) @@ -55,7 +55,7 @@ options BOOTP_COMPAT options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt/bsd\" # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/ALCHEMY ============================================================================== --- head/sys/mips/conf/ALCHEMY Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/ALCHEMY Mon Feb 15 23:44:48 2010 (r203938) @@ -55,7 +55,7 @@ options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/IDT ============================================================================== --- head/sys/mips/conf/IDT Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/IDT Mon Feb 15 23:44:48 2010 (r203938) @@ -27,7 +27,7 @@ options BOOTP_WIRED_TO=kr0 options BOOTP_COMPAT # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/MALTA Mon Feb 15 23:44:48 2010 (r203938) @@ -58,7 +58,7 @@ options ROOTDEVNAME=\"ufs:ad0s1a\" # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/MALTA64 Mon Feb 15 23:44:48 2010 (r203938) @@ -59,7 +59,7 @@ options ROOTDEVNAME=\"ufs:ad0s1a\" # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/OCTEON1 Mon Feb 15 23:44:48 2010 (r203938) @@ -67,7 +67,7 @@ options UFS_DIRHASH # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/OCTEON1-32 Mon Feb 15 23:44:48 2010 (r203938) @@ -56,7 +56,7 @@ options UFS_DIRHASH # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/QEMU ============================================================================== --- head/sys/mips/conf/QEMU Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/QEMU Mon Feb 15 23:44:48 2010 (r203938) @@ -43,7 +43,7 @@ options PSEUDOFS #Pseudo-filesystem fr options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions # Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/mips/conf/SENTRY5 ============================================================================== --- head/sys/mips/conf/SENTRY5 Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/SENTRY5 Mon Feb 15 23:44:48 2010 (r203938) @@ -56,7 +56,7 @@ options PSEUDOFS #Pseudo-filesystem fr options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions # Debugging for use in -current -#options DEADLKRES +#options DEADLKRES options INVARIANTS options INVARIANT_SUPPORT Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/SWARM Mon Feb 15 23:44:48 2010 (r203938) @@ -47,7 +47,7 @@ options PSEUDOFS #Pseudo-filesystem fr options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions # Debugging for use in -current -#options DEADLKRES +#options DEADLKRES options INVARIANTS options INVARIANT_SUPPORT options WITNESS Modified: head/sys/mips/conf/XLR ============================================================================== --- head/sys/mips/conf/XLR Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/mips/conf/XLR Mon Feb 15 23:44:48 2010 (r203938) @@ -96,7 +96,7 @@ options DDB options KDB options GDB options ALT_BREAK_TO_DEBUGGER -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/pc98/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -72,7 +72,7 @@ options INCLUDE_CONFIG_FILE # Inclu options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver +options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/powerpc/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -68,7 +68,7 @@ options INCLUDE_CONFIG_FILE # Inclu # Debugging for use in -current options KDB #Enable the kernel debugger options DDB #Support DDB -#options DEADLKRES #Enable the deadlock resolver +#options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS options WITNESS #Enable checks to detect deadlocks and cycles Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/powerpc/conf/MPC85XX Mon Feb 15 23:44:48 2010 (r203938) @@ -22,7 +22,7 @@ options BOOTP_WIRED_TO=tsec0 options CD9660 options COMPAT_43 options DDB -#options DEADLKRES +#options DEADLKRES options DEVICE_POLLING options HZ=1000 #options DIAGNOSTIC Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Mon Feb 15 21:40:25 2010 (r203937) +++ head/sys/sun4v/conf/GENERIC Mon Feb 15 23:44:48 2010 (r203938) @@ -75,7 +75,7 @@ options DDB # Support DDB. #options TRAP_TRACING # Enable trap tracing. #options TRAP_TRACE_ENTRIES=256 # Trap trace buffer entries. #options GDB # Support remote GDB. -#options DEADLKRES # Enable the deadlock resolver +#options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 00:08:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97A12106566C; Tue, 16 Feb 2010 00:08:42 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86F368FC14; Tue, 16 Feb 2010 00:08:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G08go7055147; Tue, 16 Feb 2010 00:08:42 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G08gZm055145; Tue, 16 Feb 2010 00:08:42 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201002160008.o1G08gZm055145@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 16 Feb 2010 00:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203940 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 00:08:42 -0000 Author: gonzo Date: Tue Feb 16 00:08:42 2010 New Revision: 203940 URL: http://svn.freebsd.org/changeset/base/203940 Log: - Clean-up output of memory banks info Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Tue Feb 16 00:05:53 2010 (r203939) +++ head/sys/mips/cavium/octeon_machdep.c Tue Feb 16 00:08:42 2010 (r203940) @@ -715,10 +715,10 @@ octeon_memory_init(void) } realmem = physmem; - printf("\nTotal DRAM Size 0x%X", (uint32_t) octeon_dram); - printf("\nBank 0 = 0x%8X -> 0x%8X", phys_avail[0], phys_avail[1]); - printf("\nBank 1 = 0x%8X -> 0x%8X\n", phys_avail[2], phys_avail[3]); - printf("\nphysmem: 0x%lx", physmem); + printf("Total DRAM Size %#X\n", (uint32_t) octeon_dram); + printf("Bank 0 = %#08X -> %#08X\n", phys_avail[0], phys_avail[1]); + printf("Bank 1 = %#08X -> %#08X\n", phys_avail[2], phys_avail[3]); + printf("physmem: %#lx\n", physmem); Maxmem = physmem; From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 00:22:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C05BB106566B; Tue, 16 Feb 2010 00:22:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 668798FC1B; Tue, 16 Feb 2010 00:22:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1G0EDNN021255; Mon, 15 Feb 2010 17:14:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 15 Feb 2010 17:14:25 -0700 (MST) Message-Id: <20100215.171425.646090028373155752.imp@bsdimp.com> To: avg@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B79CE84.3060901@freebsd.org> References: <20100210203519.GA44831@FreeBSD.org> <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> <4B79CE84.3060901@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: attilio@FreeBSD.org, svn-src-head@FreeBSD.org, danfe@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 00:22:05 -0000 In message: <4B79CE84.3060901@freebsd.org> Andriy Gapon writes: : At least in the i386/amd64 kernel config files typically we have: : optionsOPTION : And it is the case for the quoted above amd64 context. That's the standard way to add options in all kernel config files, although there's pockets here and there which don't quite comply. Warner From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 01:07:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAD9106566C; Tue, 16 Feb 2010 01:07:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD618FC14; Tue, 16 Feb 2010 01:07:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G177Cv068082; Tue, 16 Feb 2010 01:07:07 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G177SE068080; Tue, 16 Feb 2010 01:07:07 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002160107.o1G177SE068080@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Feb 2010 01:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203943 - head/etc/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 01:07:07 -0000 Author: jkim Date: Tue Feb 16 01:07:06 2010 New Revision: 203943 URL: http://svn.freebsd.org/changeset/base/203943 Log: Remove COMPILATIONDATE from the default section. This string is no longer being substituted since r162063. PR: bin/143976 MFC after: 1 month Modified: head/etc/ppp/ppp.conf Modified: head/etc/ppp/ppp.conf ============================================================================== --- head/etc/ppp/ppp.conf Tue Feb 16 00:23:22 2010 (r203942) +++ head/etc/ppp/ppp.conf Tue Feb 16 01:07:06 2010 (r203943) @@ -10,7 +10,7 @@ default: set log Phase Chat LCP IPCP CCP tun command - ident user-ppp VERSION (built COMPILATIONDATE) + ident user-ppp VERSION # Ensure that "device" references the correct serial port # for your modem. (cuau0 = COM1, cuau1 = COM2) From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 01:22:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB41B106566C; Tue, 16 Feb 2010 01:22:33 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA2D18FC15; Tue, 16 Feb 2010 01:22:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G1MXVH071495; Tue, 16 Feb 2010 01:22:33 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G1MXvg071491; Tue, 16 Feb 2010 01:22:33 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201002160122.o1G1MXvg071491@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 16 Feb 2010 01:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203944 - head/sys/dev/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 01:22:33 -0000 Author: weongyo Date: Tue Feb 16 01:22:33 2010 New Revision: 203944 URL: http://svn.freebsd.org/changeset/base/203944 Log: supports SPROM rev8 informations properly which are used to support low-power PHY of bwn(4) and LDO voltage adjustments. Modified: head/sys/dev/siba/siba_core.c head/sys/dev/siba/sibareg.h head/sys/dev/siba/sibavar.h Modified: head/sys/dev/siba/siba_core.c ============================================================================== --- head/sys/dev/siba/siba_core.c Tue Feb 16 01:07:06 2010 (r203943) +++ head/sys/dev/siba/siba_core.c Tue Feb 16 01:22:33 2010 (r203944) @@ -1457,6 +1457,9 @@ siba_crc8(uint8_t crc, uint8_t data) (((__x) & (__mask)) / SIBA_LOWEST_SET_BIT(__mask)) #define SIBA_SHIFTOUT(_var, _offset, _mask) \ out->_var = SIBA_SHIFTOUT_SUB(in[SIBA_OFFSET(_offset)], (_mask)) +#define SIBA_SHIFTOUT_4(_var, _offset, _mask, _shift) \ + out->_var = ((((uint32_t)in[SIBA_OFFSET((_offset)+2)] << 16 | \ + in[SIBA_OFFSET(_offset)]) & (_mask)) >> (_shift)) static void siba_sprom_r123(struct siba_sprom *out, const uint16_t *in) @@ -1511,6 +1514,7 @@ siba_sprom_r123(struct siba_sprom *out, SIBA_SHIFTOUT(gpio1, SIBA_SPROM1_GPIOA, SIBA_SPROM1_GPIOA_P1); SIBA_SHIFTOUT(gpio2, SIBA_SPROM1_GPIOB, SIBA_SPROM1_GPIOB_P2); SIBA_SHIFTOUT(gpio3, SIBA_SPROM1_GPIOB, SIBA_SPROM1_GPIOB_P3); + SIBA_SHIFTOUT(maxpwr_a, SIBA_SPROM1_MAXPWR, SIBA_SPROM1_MAXPWR_A); SIBA_SHIFTOUT(maxpwr_bg, SIBA_SPROM1_MAXPWR, SIBA_SPROM1_MAXPWR_BG); SIBA_SHIFTOUT(tssi_a, SIBA_SPROM1_TSSI, SIBA_SPROM1_TSSI_A); @@ -1587,22 +1591,61 @@ siba_sprom_r8(struct siba_sprom *out, co uint16_t v; for (i = 0; i < 3; i++) { - v = in[SIBA_OFFSET(SIBA_SPROM1_MAC_80211BG) + i]; + v = in[SIBA_OFFSET(SIBA_SPROM8_MAC_80211BG) + i]; *(((uint16_t *)out->mac_80211bg) + i) = htobe16(v); } SIBA_SHIFTOUT(ccode, SIBA_SPROM8_CCODE, 0xffff); SIBA_SHIFTOUT(bf_lo, SIBA_SPROM8_BFLOW, 0xffff); SIBA_SHIFTOUT(bf_hi, SIBA_SPROM8_BFHIGH, 0xffff); + SIBA_SHIFTOUT(bf2_lo, SIBA_SPROM8_BFL2LO, 0xffff); + SIBA_SHIFTOUT(bf2_hi, SIBA_SPROM8_BFL2HI, 0xffff); SIBA_SHIFTOUT(ant_a, SIBA_SPROM8_ANTAVAIL, SIBA_SPROM8_ANTAVAIL_A); SIBA_SHIFTOUT(ant_bg, SIBA_SPROM8_ANTAVAIL, SIBA_SPROM8_ANTAVAIL_BG); SIBA_SHIFTOUT(maxpwr_bg, SIBA_SPROM8_MAXP_BG, SIBA_SPROM8_MAXP_BG_MASK); SIBA_SHIFTOUT(tssi_bg, SIBA_SPROM8_MAXP_BG, SIBA_SPROM8_TSSI_BG); SIBA_SHIFTOUT(maxpwr_a, SIBA_SPROM8_MAXP_A, SIBA_SPROM8_MAXP_A_MASK); SIBA_SHIFTOUT(tssi_a, SIBA_SPROM8_MAXP_A, SIBA_SPROM8_TSSI_A); + SIBA_SHIFTOUT(maxpwr_ah, SIBA_SPROM8_MAXP_AHL, + SIBA_SPROM8_MAXP_AH_MASK); + SIBA_SHIFTOUT(maxpwr_al, SIBA_SPROM8_MAXP_AHL, + SIBA_SPROM8_MAXP_AL_MASK); SIBA_SHIFTOUT(gpio0, SIBA_SPROM8_GPIOA, SIBA_SPROM8_GPIOA_P0); SIBA_SHIFTOUT(gpio1, SIBA_SPROM8_GPIOA, SIBA_SPROM8_GPIOA_P1); SIBA_SHIFTOUT(gpio2, SIBA_SPROM8_GPIOB, SIBA_SPROM8_GPIOB_P2); SIBA_SHIFTOUT(gpio3, SIBA_SPROM8_GPIOB, SIBA_SPROM8_GPIOB_P3); + SIBA_SHIFTOUT(tri2g, SIBA_SPROM8_TRI25G, SIBA_SPROM8_TRI2G); + SIBA_SHIFTOUT(tri5g, SIBA_SPROM8_TRI25G, SIBA_SPROM8_TRI5G); + SIBA_SHIFTOUT(tri5gl, SIBA_SPROM8_TRI5GHL, SIBA_SPROM8_TRI5GL); + SIBA_SHIFTOUT(tri5gh, SIBA_SPROM8_TRI5GHL, SIBA_SPROM8_TRI5GH); + SIBA_SHIFTOUT(rxpo2g, SIBA_SPROM8_RXPO, SIBA_SPROM8_RXPO2G); + SIBA_SHIFTOUT(rxpo5g, SIBA_SPROM8_RXPO, SIBA_SPROM8_RXPO5G); + SIBA_SHIFTOUT(rssismf2g, SIBA_SPROM8_RSSIPARM2G, SIBA_SPROM8_RSSISMF2G); + SIBA_SHIFTOUT(rssismc2g, SIBA_SPROM8_RSSIPARM2G, SIBA_SPROM8_RSSISMC2G); + SIBA_SHIFTOUT(rssisav2g, SIBA_SPROM8_RSSIPARM2G, SIBA_SPROM8_RSSISAV2G); + SIBA_SHIFTOUT(bxa2g, SIBA_SPROM8_RSSIPARM2G, SIBA_SPROM8_BXA2G); + SIBA_SHIFTOUT(rssismf5g, SIBA_SPROM8_RSSIPARM5G, SIBA_SPROM8_RSSISMF5G); + SIBA_SHIFTOUT(rssismc5g, SIBA_SPROM8_RSSIPARM5G, SIBA_SPROM8_RSSISMC5G); + SIBA_SHIFTOUT(rssisav5g, SIBA_SPROM8_RSSIPARM5G, SIBA_SPROM8_RSSISAV5G); + SIBA_SHIFTOUT(bxa5g, SIBA_SPROM8_RSSIPARM5G, SIBA_SPROM8_BXA5G); + + SIBA_SHIFTOUT(pa0b0, SIBA_SPROM8_PA0B0, 0xffff); + SIBA_SHIFTOUT(pa0b1, SIBA_SPROM8_PA0B1, 0xffff); + SIBA_SHIFTOUT(pa0b2, SIBA_SPROM8_PA0B2, 0xffff); + SIBA_SHIFTOUT(pa1b0, SIBA_SPROM8_PA1B0, 0xffff); + SIBA_SHIFTOUT(pa1b1, SIBA_SPROM8_PA1B1, 0xffff); + SIBA_SHIFTOUT(pa1b2, SIBA_SPROM8_PA1B2, 0xffff); + SIBA_SHIFTOUT(pa1lob0, SIBA_SPROM8_PA1LOB0, 0xffff); + SIBA_SHIFTOUT(pa1lob1, SIBA_SPROM8_PA1LOB1, 0xffff); + SIBA_SHIFTOUT(pa1lob2, SIBA_SPROM8_PA1LOB2, 0xffff); + SIBA_SHIFTOUT(pa1hib0, SIBA_SPROM8_PA1HIB0, 0xffff); + SIBA_SHIFTOUT(pa1hib1, SIBA_SPROM8_PA1HIB1, 0xffff); + SIBA_SHIFTOUT(pa1hib2, SIBA_SPROM8_PA1HIB2, 0xffff); + SIBA_SHIFTOUT(cck2gpo, SIBA_SPROM8_CCK2GPO, 0xffff); + + SIBA_SHIFTOUT_4(ofdm2gpo, SIBA_SPROM8_OFDM2GPO, 0xffffffff, 0); + SIBA_SHIFTOUT_4(ofdm5glpo, SIBA_SPROM8_OFDM5GLPO, 0xffffffff, 0); + SIBA_SHIFTOUT_4(ofdm5gpo, SIBA_SPROM8_OFDM5GPO, 0xffffffff, 0); + SIBA_SHIFTOUT_4(ofdm5ghpo, SIBA_SPROM8_OFDM5GHPO, 0xffffffff, 0); /* antenna gain */ SIBA_SHIFTOUT(again.ghz24.a0, SIBA_SPROM8_AGAIN01, SIBA_SPROM8_AGAIN0); @@ -2005,3 +2048,79 @@ siba_core_resume(struct siba_softc *siba return (0); } + +static void +siba_cc_regctl_setmask(struct siba_cc *cc, uint32_t offset, uint32_t mask, + uint32_t set) +{ + + SIBA_CC_READ32(cc, SIBA_CC_REGCTL_ADDR); + SIBA_CC_WRITE32(cc, SIBA_CC_REGCTL_ADDR, offset); + SIBA_CC_READ32(cc, SIBA_CC_REGCTL_ADDR); + SIBA_CC_WRITE32(cc, SIBA_CC_REGCTL_DATA, + (SIBA_CC_READ32(cc, SIBA_CC_REGCTL_DATA) & mask) | set); + SIBA_CC_READ32(cc, SIBA_CC_REGCTL_DATA); +} + +void +siba_cc_pmu_set_ldovolt(struct siba_cc *scc, int id, uint32_t volt) +{ + struct siba_softc *siba = scc->scc_dev->sd_bus; + uint32_t *p = NULL, info[5][3] = { + { 2, 25, 0xf }, + { 3, 1, 0xf }, + { 3, 9, 0xf }, + { 3, 17, 0x3f }, + { 0, 21, 0x3f } + }; + + if (siba->siba_chipid == 0x4312) { + if (id != SIBA_LDO_PAREF) + return; + p = info[4]; + siba_cc_regctl_setmask(scc, p[0], ~(p[2] << p[1]), + (volt & p[2]) << p[1]); + return; + } + if (siba->siba_chipid == 0x4328 || siba->siba_chipid == 0x5354) { + switch (id) { + case SIBA_LDO_PAREF: + p = info[3]; + break; + case SIBA_LDO_VOLT1: + p = info[0]; + break; + case SIBA_LDO_VOLT2: + p = info[1]; + break; + case SIBA_LDO_VOLT3: + p = info[2]; + break; + default: + KASSERT(0 == 1, + ("%s: unsupported voltage ID %#x", __func__, id)); + return; + } + siba_cc_regctl_setmask(scc, p[0], ~(p[2] << p[1]), + (volt & p[2]) << p[1]); + } +} + +void +siba_cc_pmu_set_ldoparef(struct siba_cc *scc, uint8_t on) +{ + struct siba_softc *siba = scc->scc_dev->sd_bus; + int ldo; + + ldo = ((siba->siba_chipid == 0x4312) ? SIBA_CC_PMU_4312_PA_REF : + ((siba->siba_chipid == 0x4328) ? SIBA_CC_PMU_4328_PA_REF : + ((siba->siba_chipid == 0x5354) ? SIBA_CC_PMU_5354_PA_REF : -1))); + if (ldo == -1) + return; + + if (on) + SIBA_CC_SET32(scc, SIBA_CC_PMU_MINRES, 1 << ldo); + else + SIBA_CC_MASK32(scc, SIBA_CC_PMU_MINRES, ~(1 << ldo)); + SIBA_CC_READ32(scc, SIBA_CC_PMU_MINRES); +} Modified: head/sys/dev/siba/sibareg.h ============================================================================== --- head/sys/dev/siba/sibareg.h Tue Feb 16 01:07:06 2010 (r203943) +++ head/sys/dev/siba/sibareg.h Tue Feb 16 01:22:33 2010 (r203944) @@ -32,7 +32,7 @@ */ #ifndef _SIBA_SIBAREG_H_ -#define _SIBA_SIBAREG_H_ +#define _SIBA_SIBAREG_H_ #define PCI_DEVICE_ID_BCM4401 0x4401 #define PCI_DEVICE_ID_BCM4401B0 0x4402 @@ -92,6 +92,8 @@ #define SIBA_CC_PMU_TABSEL 0x0620 #define SIBA_CC_PMU_DEPMSK 0x0624 #define SIBA_CC_PMU_UPDNTM 0x0628 +#define SIBA_CC_REGCTL_ADDR 0x0658 +#define SIBA_CC_REGCTL_DATA 0x065c #define SIBA_CC_PLLCTL_ADDR 0x0660 #define SIBA_CC_PLLCTL_DATA 0x0664 @@ -148,6 +150,7 @@ { 38400, 13, 45, 873813, }, { 40000, 14, 45, 0, }, \ } +#define SIBA_CC_PMU_4312_PA_REF 2 #define SIBA_CC_PMU_4325_BURST 1 #define SIBA_CC_PMU_4325_CLBURST 3 #define SIBA_CC_PMU_4325_LN 10 @@ -178,6 +181,7 @@ #define SIBA_CC_PMU_4328_BB_PLL_FILTBYP 17 #define SIBA_CC_PMU_4328_RF_PLL_FILTBYP 18 #define SIBA_CC_PMU_4328_BB_PLL_PU 19 +#define SIBA_CC_PMU_5354_PA_REF 8 #define SIBA_CC_PMU_5354_BB_PLL_PU 19 #define SIBA_CC_PMU_4325_RES_UPDOWN \ @@ -237,9 +241,9 @@ #define SIBA_REGWIN(x) \ (SIBA_ENUM_START + ((x) * SIBA_CORE_LEN)) -#define SIBA_CORE_LEN 0x00001000 /* Size of cfg per core */ -#define SIBA_CFG_END 0x00010000 /* Upper bound of cfg space */ -#define SIBA_MAX_CORES (SIBA_CFG_END/SIBA_CORE_LEN) /* #max cores */ +#define SIBA_CORE_LEN 0x00001000 /* Size of cfg per core */ +#define SIBA_CFG_END 0x00010000 /* Upper bound of cfg space */ +#define SIBA_MAX_CORES (SIBA_CFG_END/SIBA_CORE_LEN) /* #max cores */ #define SIBA_ENUM_START 0x18000000U #define SIBA_ENUM_END 0x18010000U @@ -372,6 +376,9 @@ #define SIBA_SPROM5_GPIOB_P3 0xff00 #define SIBA_SPROM8_BFLOW 0x1084 #define SIBA_SPROM8_BFHIGH 0x1086 +#define SIBA_SPROM8_BFL2LO 0x1088 +#define SIBA_SPROM8_BFL2HI 0x108a +#define SIBA_SPROM8_MAC_80211BG 0x108c #define SIBA_SPROM8_CCODE 0x1092 #define SIBA_SPROM8_ANTAVAIL 0x109c #define SIBA_SPROM8_ANTAVAIL_A 0xff00 @@ -379,21 +386,60 @@ #define SIBA_SPROM8_AGAIN01 0x109e #define SIBA_SPROM8_AGAIN0 0x00ff #define SIBA_SPROM8_AGAIN1 0xff00 -#define SIBA_SPROM8_AGAIN23 0x10a0 -#define SIBA_SPROM8_AGAIN2 0x00ff -#define SIBA_SPROM8_AGAIN3 0xff00 #define SIBA_SPROM8_GPIOA 0x1096 #define SIBA_SPROM8_GPIOA_P0 0x00ff #define SIBA_SPROM8_GPIOA_P1 0xff00 #define SIBA_SPROM8_GPIOB 0x1098 #define SIBA_SPROM8_GPIOB_P2 0x00ff #define SIBA_SPROM8_GPIOB_P3 0xff00 +#define SIBA_SPROM8_AGAIN23 0x10a0 +#define SIBA_SPROM8_AGAIN2 0x00ff +#define SIBA_SPROM8_AGAIN3 0xff00 +#define SIBA_SPROM8_RSSIPARM2G 0x10a4 +#define SIBA_SPROM8_RSSISMF2G 0x000f +#define SIBA_SPROM8_RSSISMC2G 0x00f0 +#define SIBA_SPROM8_RSSISAV2G 0x0700 /* BITMASK */ +#define SIBA_SPROM8_BXA2G 0x1800 /* BITMASK */ +#define SIBA_SPROM8_RSSIPARM5G 0x10a6 +#define SIBA_SPROM8_RSSISMF5G 0x000f +#define SIBA_SPROM8_RSSISMC5G 0x00f0 +#define SIBA_SPROM8_RSSISAV5G 0x0700 /* BITMASK */ +#define SIBA_SPROM8_BXA5G 0x1800 /* BITMASK */ +#define SIBA_SPROM8_TRI25G 0x10a8 +#define SIBA_SPROM8_TRI2G 0x00ff +#define SIBA_SPROM8_TRI5G 0xff00 +#define SIBA_SPROM8_TRI5GHL 0x10aa +#define SIBA_SPROM8_TRI5GL 0x00ff +#define SIBA_SPROM8_TRI5GH 0xff00 +#define SIBA_SPROM8_RXPO 0x10ac +#define SIBA_SPROM8_RXPO2G 0x00ff +#define SIBA_SPROM8_RXPO5G 0xff00 #define SIBA_SPROM8_MAXP_BG 0x10c0 #define SIBA_SPROM8_MAXP_BG_MASK 0x00ff #define SIBA_SPROM8_TSSI_BG 0xff00 +#define SIBA_SPROM8_PA0B0 0x10c2 +#define SIBA_SPROM8_PA0B1 0x10c4 +#define SIBA_SPROM8_PA0B2 0x10c6 #define SIBA_SPROM8_MAXP_A 0x10c8 #define SIBA_SPROM8_MAXP_A_MASK 0x00ff #define SIBA_SPROM8_TSSI_A 0xff00 +#define SIBA_SPROM8_MAXP_AHL 0x10ca +#define SIBA_SPROM8_MAXP_AH_MASK 0x00ff +#define SIBA_SPROM8_MAXP_AL_MASK 0xff00 +#define SIBA_SPROM8_PA1B0 0x10cc +#define SIBA_SPROM8_PA1B1 0x10ce +#define SIBA_SPROM8_PA1B2 0x10d0 +#define SIBA_SPROM8_PA1LOB0 0x10d2 +#define SIBA_SPROM8_PA1LOB1 0x10d4 +#define SIBA_SPROM8_PA1LOB2 0x10d6 +#define SIBA_SPROM8_PA1HIB0 0x10d8 +#define SIBA_SPROM8_PA1HIB1 0x10da +#define SIBA_SPROM8_PA1HIB2 0x10dc +#define SIBA_SPROM8_CCK2GPO 0x1140 +#define SIBA_SPROM8_OFDM2GPO 0x1142 +#define SIBA_SPROM8_OFDM5GPO 0x1146 +#define SIBA_SPROM8_OFDM5GLPO 0x114a +#define SIBA_SPROM8_OFDM5GHPO 0x114e #define SIBA_BOARDVENDOR_DELL 0x1028 #define SIBA_BOARDVENDOR_BCM 0x14e4 @@ -413,4 +459,6 @@ #define SIBA_PCICORE_SBTOPCI_BURST 0x00000008 #define SIBA_PCICORE_SBTOPCI_MRM 0x00000020 +#define SIBA_CHIPPACK_BCM4712S 1 /* Small 200pin 4712 */ + #endif /* _SIBA_SIBAREG_H_ */ Modified: head/sys/dev/siba/sibavar.h ============================================================================== --- head/sys/dev/siba/sibavar.h Tue Feb 16 01:07:06 2010 (r203943) +++ head/sys/dev/siba/sibavar.h Tue Feb 16 01:22:33 2010 (r203944) @@ -214,16 +214,46 @@ struct siba_sprom { uint16_t pa1b0; uint16_t pa1b1; uint16_t pa1b2; + uint16_t pa1lob0; + uint16_t pa1lob1; + uint16_t pa1lob2; + uint16_t pa1hib0; + uint16_t pa1hib1; + uint16_t pa1hib2; uint8_t gpio0; uint8_t gpio1; uint8_t gpio2; uint8_t gpio3; + uint16_t maxpwr_al; uint16_t maxpwr_a; /* A-PHY Max Power */ + uint16_t maxpwr_ah; uint16_t maxpwr_bg; /* BG-PHY Max Power */ + uint8_t rxpo2g; + uint8_t rxpo5g; uint8_t tssi_a; /* Idle TSSI */ uint8_t tssi_bg; /* Idle TSSI */ + uint8_t tri2g; + uint8_t tri5gl; + uint8_t tri5g; + uint8_t tri5gh; + uint8_t rssisav2g; + uint8_t rssismc2g; + uint8_t rssismf2g; + uint8_t bxa2g; + uint8_t rssisav5g; + uint8_t rssismc5g; + uint8_t rssismf5g; + uint8_t bxa5g; + uint16_t cck2gpo; + uint32_t ofdm2gpo; + uint32_t ofdm5glpo; + uint32_t ofdm5gpo; + uint32_t ofdm5ghpo; uint16_t bf_lo; /* boardflags */ uint16_t bf_hi; /* boardflags */ + uint16_t bf2_lo; + uint16_t bf2_hi; + struct { struct { int8_t a0, a1, a2, a3; @@ -234,6 +264,11 @@ struct siba_sprom { } again; /* antenna gain */ }; +#define SIBA_LDO_PAREF 0 +#define SIBA_LDO_VOLT1 1 +#define SIBA_LDO_VOLT2 2 +#define SIBA_LDO_VOLT3 3 + struct siba_cc_pmu { uint8_t rev; /* PMU rev */ uint32_t freq; /* crystal freq in kHz */ @@ -367,5 +402,7 @@ void siba_write_multi_2(struct siba_dev void siba_write_multi_4(struct siba_dev_softc *, const void *, size_t, uint16_t); void siba_barrier(struct siba_dev_softc *, int); +void siba_cc_pmu_set_ldovolt(struct siba_cc *, int, uint32_t); +void siba_cc_pmu_set_ldoparef(struct siba_cc *, uint8_t); #endif /* _SIBA_SIBAVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 01:44:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79F311065676; Tue, 16 Feb 2010 01:44:14 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6784B8FC0C; Tue, 16 Feb 2010 01:44:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G1iEsb076300; Tue, 16 Feb 2010 01:44:14 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G1iEur076296; Tue, 16 Feb 2010 01:44:14 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201002160144.o1G1iEur076296@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 16 Feb 2010 01:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203945 - in head: share/man/man4 sys/dev/bwn sys/modules/bwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 01:44:14 -0000 Author: weongyo Date: Tue Feb 16 01:44:14 2010 New Revision: 203945 URL: http://svn.freebsd.org/changeset/base/203945 Log: adds bwn(4) driver for supporting Broadcom BCM43xx chipsets. o uses v4 firmware instead of v3. A port will be committed to create the bwn firmware module. o supports B/G and LP(low power) PHYs. o supports 32 / 64 bits DMA operations. o tested on big / little endian machines so should work on all architectures. It'd not connected to the build until the firmware port is committed. Added: head/share/man/man4/bwn.4 (contents, props changed) head/sys/dev/bwn/ head/sys/dev/bwn/if_bwn.c (contents, props changed) head/sys/dev/bwn/if_bwnreg.h (contents, props changed) head/sys/dev/bwn/if_bwnvar.h (contents, props changed) head/sys/modules/bwn/ head/sys/modules/bwn/Makefile (contents, props changed) Added: head/share/man/man4/bwn.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bwn.4 Tue Feb 16 01:44:14 2010 (r203945) @@ -0,0 +1,134 @@ +.\" Copyright (c) 2009 Christian Brueffer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2010 +.Dt BWN 4 +.Os +.Sh NAME +.Nm bwn +.Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device siba_bwn" +.Cd "device bwn" +.Cd "device wlan" +.Cd "device wlan_amrr" +.Cd "device firmware" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bwn_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Broadcom BCM43xx based +PCI/CardBus network adapters. +.Pp +It supports +.Cm station +and +.Cm monitor +mode operation. +Only one virtual interface may be configured at any time. +For more information on configuring this device, see +.Xr ifconfig 8 . +.Pp +This driver requires firmware to be loaded before it will work. +The +.Pa ports/net/bwn-firmware-kmod +port needs to be installed before +.Xr ifconfig 8 +will work. +.Sh HARDWARE +The +.Nm +driver supports Broadcom BCM43xx based wireless devices, including: +.Pp +.Bl -column -compact "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n +.It Em "Card Chip Bus Standard" +.It "Apple Airport Extreme BCM4306 PCI b/g" +.It "Apple Airport Extreme BCM4318 PCI b/g" +.It "ASUS WL-138g BCM4318 PCI b/g" +.It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g" +.It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g" +.It "Compaq R4035 onboard BCM4306 PCI b/g" +.It "Dell Wireless 1470 BCM4318 Mini PCI b/g" +.It "Dell Truemobile 1400 BCM4309 Mini PCI b/g" +.It "HP nx6125 BCM4319 PCI b/g" +.It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g" +.It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g" +.It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g" +.It "US Robotics 5411 BCM4318 CardBus b/g" +.El +.Sh EXAMPLES +Join an existing BSS network (i.e., connect to an access point): +.Pp +.Bd -literal -offset indent +ifconfig wlan create wlandev bwn0 inet 192.168.0.20 \e + netmask 0xffffff00 +.Ed +.Pp +Join a specific BSS network with network name +.Dq Li my_net : +.Pp +.Dl "ifconfig wlan create wlandev bwn0 ssid my_net up" +.Pp +Join a specific BSS network with 64-bit WEP encryption: +.Bd -literal -offset indent +ifconfig wlan create wlandev bwn0 ssid my_net \e + wepmode on wepkey 0x1234567890 weptxkey 1 up +.Ed +.Sh SEE ALSO +.Xr arp 4 , +.Xr cardbus 4 , +.Xr intro 4 , +.Xr pci 4 , +.Xr wlan 4 , +.Xr wlan_amrr 4 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Weongyo Jeong +.Aq weongyo@FreeBSD.org . +.\".Sh BUGS +.\"Some card based on the BCM4306 and BCM4309 chips do not work properly +.\"on channel 1, 2 and 3. Added: head/sys/dev/bwn/if_bwn.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bwn/if_bwn.c Tue Feb 16 01:44:14 2010 (r203945) @@ -0,0 +1,14317 @@ +/*- + * Copyright (c) 2009-2010 Weongyo Jeong + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * The Broadcom Wireless LAN controller driver. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +SYSCTL_NODE(_hw, OID_AUTO, bwn, CTLFLAG_RD, 0, "Broadcom driver parameters"); + +/* + * Tunable & sysctl variables. + */ + +#ifdef BWN_DEBUG +static int bwn_debug = 0; +SYSCTL_INT(_hw_bwn, OID_AUTO, debug, CTLFLAG_RW, &bwn_debug, 0, + "Broadcom debugging printfs"); +TUNABLE_INT("hw.bwn.debug", &bwn_debug); +enum { + BWN_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ + BWN_DEBUG_RECV = 0x00000002, /* basic recv operation */ + BWN_DEBUG_STATE = 0x00000004, /* 802.11 state transitions */ + BWN_DEBUG_TXPOW = 0x00000008, /* tx power processing */ + BWN_DEBUG_RESET = 0x00000010, /* reset processing */ + BWN_DEBUG_OPS = 0x00000020, /* bwn_ops processing */ + BWN_DEBUG_BEACON = 0x00000040, /* beacon handling */ + BWN_DEBUG_WATCHDOG = 0x00000080, /* watchdog timeout */ + BWN_DEBUG_INTR = 0x00000100, /* ISR */ + BWN_DEBUG_CALIBRATE = 0x00000200, /* periodic calibration */ + BWN_DEBUG_NODE = 0x00000400, /* node management */ + BWN_DEBUG_LED = 0x00000800, /* led management */ + BWN_DEBUG_CMD = 0x00001000, /* cmd submission */ + BWN_DEBUG_LO = 0x00002000, /* LO */ + BWN_DEBUG_FW = 0x00004000, /* firmware */ + BWN_DEBUG_WME = 0x00008000, /* WME */ + BWN_DEBUG_RF = 0x00010000, /* RF */ + BWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ + BWN_DEBUG_ANY = 0xffffffff +}; +#define DPRINTF(sc, m, fmt, ...) do { \ + if (sc->sc_debug & (m)) \ + printf(fmt, __VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(sc, m, fmt, ...) do { (void) sc; } while (0) +#endif + +static int bwn_bfp = 0; /* use "Bad Frames Preemption" */ +SYSCTL_INT(_hw_bwn, OID_AUTO, bfp, CTLFLAG_RW, &bwn_bfp, 0, + "uses Bad Frames Preemption"); +static int bwn_bluetooth = 1; +SYSCTL_INT(_hw_bwn, OID_AUTO, bluetooth, CTLFLAG_RW, &bwn_bluetooth, 0, + "turns on Bluetooth Coexistence"); +static int bwn_hwpctl = 0; +SYSCTL_INT(_hw_bwn, OID_AUTO, hwpctl, CTLFLAG_RW, &bwn_hwpctl, 0, + "uses H/W power control"); +static int bwn_msi_disable = 0; /* MSI disabled */ +TUNABLE_INT("hw.bwn.msi_disable", &bwn_msi_disable); +static int bwn_usedma = 1; +SYSCTL_INT(_hw_bwn, OID_AUTO, usedma, CTLFLAG_RD, &bwn_usedma, 0, + "uses DMA"); +TUNABLE_INT("hw.bwn.usedma", &bwn_usedma); +static int bwn_wme = 1; +SYSCTL_INT(_hw_bwn, OID_AUTO, wme, CTLFLAG_RW, &bwn_wme, 0, + "uses WME support"); + +static int bwn_attach_pre(struct bwn_softc *); +static int bwn_attach_post(struct bwn_softc *); +static void bwn_sprom_bugfixes(struct siba_softc *); +static void bwn_init(void *); +static int bwn_init_locked(struct bwn_softc *); +static int bwn_ioctl(struct ifnet *, u_long, caddr_t); +static void bwn_start(struct ifnet *); +static int bwn_attach_core(struct bwn_mac *); +static void bwn_reset_core(struct bwn_mac *, uint32_t); +static int bwn_phy_getinfo(struct bwn_mac *, int); +static int bwn_chiptest(struct bwn_mac *); +static int bwn_setup_channels(struct bwn_mac *, int, int); +static int bwn_phy_g_attach(struct bwn_mac *); +static void bwn_phy_g_detach(struct bwn_mac *); +static void bwn_phy_g_init_pre(struct bwn_mac *); +static int bwn_phy_g_prepare_hw(struct bwn_mac *); +static int bwn_phy_g_init(struct bwn_mac *); +static void bwn_phy_g_exit(struct bwn_mac *); +static uint16_t bwn_phy_g_read(struct bwn_mac *, uint16_t); +static void bwn_phy_g_write(struct bwn_mac *, uint16_t, + uint16_t); +static uint16_t bwn_phy_g_rf_read(struct bwn_mac *, uint16_t); +static void bwn_phy_g_rf_write(struct bwn_mac *, uint16_t, + uint16_t); +static int bwn_phy_g_hwpctl(struct bwn_mac *); +static void bwn_phy_g_rf_onoff(struct bwn_mac *, int); +static int bwn_phy_g_switch_channel(struct bwn_mac *, uint32_t); +static uint32_t bwn_phy_g_get_default_chan(struct bwn_mac *); +static void bwn_phy_g_set_antenna(struct bwn_mac *, int); +static int bwn_phy_g_im(struct bwn_mac *, int); +static int bwn_phy_g_recalc_txpwr(struct bwn_mac *, int); +static void bwn_phy_g_set_txpwr(struct bwn_mac *); +static void bwn_phy_g_task_15s(struct bwn_mac *); +static void bwn_phy_g_task_60s(struct bwn_mac *); +static uint16_t bwn_phy_g_txctl(struct bwn_mac *); +static void bwn_phy_switch_analog(struct bwn_mac *, int); +static uint16_t bwn_shm_read_2(struct bwn_mac *, uint16_t, uint16_t); +static void bwn_shm_write_2(struct bwn_mac *, uint16_t, uint16_t, + uint16_t); +static uint32_t bwn_shm_read_4(struct bwn_mac *, uint16_t, uint16_t); +static void bwn_shm_write_4(struct bwn_mac *, uint16_t, uint16_t, + uint32_t); +static void bwn_shm_ctlword(struct bwn_mac *, uint16_t, + uint16_t); +static void bwn_addchannels(struct ieee80211_channel [], int, int *, + const struct bwn_channelinfo *, int); +static int bwn_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static void bwn_newassoc(struct ieee80211_node *, int); +static void bwn_updateslot(struct ifnet *); +static void bwn_update_promisc(struct ifnet *); +static void bwn_wme_init(struct bwn_mac *); +static int bwn_wme_update(struct ieee80211com *); +static struct ieee80211_node *bwn_node_alloc(struct ieee80211vap *, + const uint8_t [IEEE80211_ADDR_LEN]); +static void bwn_wme_clear(struct bwn_softc *); +static void bwn_wme_load(struct bwn_mac *); +static void bwn_wme_loadparams(struct bwn_mac *, + const struct wmeParams *, uint16_t); +static void bwn_node_cleanup(struct ieee80211_node *); +static void bwn_scan_start(struct ieee80211com *); +static void bwn_scan_end(struct ieee80211com *); +static void bwn_set_channel(struct ieee80211com *); +static struct ieee80211vap *bwn_vap_create(struct ieee80211com *, + const char [IFNAMSIZ], int, int, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); +static void bwn_vap_delete(struct ieee80211vap *); +static void bwn_stop(struct bwn_softc *, int); +static void bwn_stop_locked(struct bwn_softc *, int); +static int bwn_core_init(struct bwn_mac *); +static void bwn_core_start(struct bwn_mac *); +static void bwn_core_exit(struct bwn_mac *); +static void bwn_fix_imcfglobug(struct bwn_mac *); +static void bwn_bt_disable(struct bwn_mac *); +static int bwn_chip_init(struct bwn_mac *); +static uint64_t bwn_hf_read(struct bwn_mac *); +static void bwn_hf_write(struct bwn_mac *, uint64_t); +static void bwn_set_txretry(struct bwn_mac *, int, int); +static void bwn_rate_init(struct bwn_mac *); +static void bwn_set_phytxctl(struct bwn_mac *); +static void bwn_spu_setdelay(struct bwn_mac *, int); +static void bwn_bt_enable(struct bwn_mac *); +static void bwn_set_macaddr(struct bwn_mac *); +static void bwn_crypt_init(struct bwn_mac *); +static void bwn_chip_exit(struct bwn_mac *); +static int bwn_fw_fillinfo(struct bwn_mac *); +static int bwn_fw_loaducode(struct bwn_mac *); +static int bwn_gpio_init(struct bwn_mac *); +static int bwn_fw_loadinitvals(struct bwn_mac *); +static int bwn_phy_init(struct bwn_mac *); +static void bwn_set_txantenna(struct bwn_mac *, int); +static void bwn_set_opmode(struct bwn_mac *); +static void bwn_gpio_cleanup(struct bwn_mac *); +static void bwn_rate_write(struct bwn_mac *, uint16_t, int); +static uint8_t bwn_plcp_getcck(const uint8_t); +static uint8_t bwn_plcp_getofdm(const uint8_t); +static void bwn_pio_init(struct bwn_mac *); +static uint16_t bwn_pio_idx2base(struct bwn_mac *, int); +static void bwn_pio_set_txqueue(struct bwn_mac *, struct bwn_pio_txqueue *, + int); +static void bwn_pio_setupqueue_rx(struct bwn_mac *, + struct bwn_pio_rxqueue *, int); +static void bwn_destroy_queue_tx(struct bwn_pio_txqueue *); +static uint16_t bwn_pio_read_2(struct bwn_mac *, struct bwn_pio_txqueue *, + uint16_t); +static void bwn_pio_cancel_tx_packets(struct bwn_pio_txqueue *); +static int bwn_pio_rx(struct bwn_pio_rxqueue *); +static uint8_t bwn_pio_rxeof(struct bwn_pio_rxqueue *); +static void bwn_pio_handle_txeof(struct bwn_mac *, + const struct bwn_txstatus *); +static uint16_t bwn_pio_rx_read_2(struct bwn_pio_rxqueue *, uint16_t); +static uint32_t bwn_pio_rx_read_4(struct bwn_pio_rxqueue *, uint16_t); +static void bwn_pio_rx_write_2(struct bwn_pio_rxqueue *, uint16_t, + uint16_t); +static void bwn_pio_rx_write_4(struct bwn_pio_rxqueue *, uint16_t, + uint32_t); +static int bwn_pio_tx_start(struct bwn_mac *, struct ieee80211_node *, + struct mbuf *); +static struct bwn_pio_txqueue *bwn_pio_select(struct bwn_mac *, uint8_t); +static uint32_t bwn_pio_write_multi_4(struct bwn_mac *, + struct bwn_pio_txqueue *, uint32_t, const void *, int); +static void bwn_pio_write_4(struct bwn_mac *, struct bwn_pio_txqueue *, + uint16_t, uint32_t); +static uint16_t bwn_pio_write_multi_2(struct bwn_mac *, + struct bwn_pio_txqueue *, uint16_t, const void *, int); +static uint16_t bwn_pio_write_mbuf_2(struct bwn_mac *, + struct bwn_pio_txqueue *, uint16_t, struct mbuf *); +static struct bwn_pio_txqueue *bwn_pio_parse_cookie(struct bwn_mac *, + uint16_t, struct bwn_pio_txpkt **); +static void bwn_dma_init(struct bwn_mac *); +static void bwn_dma_rxdirectfifo(struct bwn_mac *, int, uint8_t); +static int bwn_dma_mask2type(uint64_t); +static uint64_t bwn_dma_mask(struct bwn_mac *); +static uint16_t bwn_dma_base(int, int); +static void bwn_dma_ringfree(struct bwn_dma_ring **); +static void bwn_dma_32_getdesc(struct bwn_dma_ring *, + int, struct bwn_dmadesc_generic **, + struct bwn_dmadesc_meta **); +static void bwn_dma_32_setdesc(struct bwn_dma_ring *, + struct bwn_dmadesc_generic *, bus_addr_t, uint16_t, int, + int, int); +static void bwn_dma_32_start_transfer(struct bwn_dma_ring *, int); +static void bwn_dma_32_suspend(struct bwn_dma_ring *); +static void bwn_dma_32_resume(struct bwn_dma_ring *); +static int bwn_dma_32_get_curslot(struct bwn_dma_ring *); +static void bwn_dma_32_set_curslot(struct bwn_dma_ring *, int); +static void bwn_dma_64_getdesc(struct bwn_dma_ring *, + int, struct bwn_dmadesc_generic **, + struct bwn_dmadesc_meta **); +static void bwn_dma_64_setdesc(struct bwn_dma_ring *, + struct bwn_dmadesc_generic *, bus_addr_t, uint16_t, int, + int, int); +static void bwn_dma_64_start_transfer(struct bwn_dma_ring *, int); +static void bwn_dma_64_suspend(struct bwn_dma_ring *); +static void bwn_dma_64_resume(struct bwn_dma_ring *); +static int bwn_dma_64_get_curslot(struct bwn_dma_ring *); +static void bwn_dma_64_set_curslot(struct bwn_dma_ring *, int); +static int bwn_dma_allocringmemory(struct bwn_dma_ring *); +static void bwn_dma_setup(struct bwn_dma_ring *); +static void bwn_dma_free_ringmemory(struct bwn_dma_ring *); +static void bwn_dma_cleanup(struct bwn_dma_ring *); +static void bwn_dma_free_descbufs(struct bwn_dma_ring *); +static int bwn_dma_tx_reset(struct bwn_mac *, uint16_t, int); +static void bwn_dma_rx(struct bwn_dma_ring *); +static int bwn_dma_rx_reset(struct bwn_mac *, uint16_t, int); +static void bwn_dma_free_descbuf(struct bwn_dma_ring *, + struct bwn_dmadesc_meta *); +static void bwn_dma_set_redzone(struct bwn_dma_ring *, struct mbuf *); +static int bwn_dma_gettype(struct bwn_mac *); +static void bwn_dma_ring_addr(void *, bus_dma_segment_t *, int, int); +static int bwn_dma_freeslot(struct bwn_dma_ring *); +static int bwn_dma_nextslot(struct bwn_dma_ring *, int); +static void bwn_dma_rxeof(struct bwn_dma_ring *, int *); +static int bwn_dma_newbuf(struct bwn_dma_ring *, + struct bwn_dmadesc_generic *, struct bwn_dmadesc_meta *, + int); +static void bwn_dma_buf_addr(void *, bus_dma_segment_t *, int, + bus_size_t, int); +static uint8_t bwn_dma_check_redzone(struct bwn_dma_ring *, struct mbuf *); +static void bwn_dma_handle_txeof(struct bwn_mac *, + const struct bwn_txstatus *); +static int bwn_dma_tx_start(struct bwn_mac *, struct ieee80211_node *, + struct mbuf *); +static int bwn_dma_getslot(struct bwn_dma_ring *); +static struct bwn_dma_ring *bwn_dma_select(struct bwn_mac *, + uint8_t); +static int bwn_dma_attach(struct bwn_mac *); +static struct bwn_dma_ring *bwn_dma_ringsetup(struct bwn_mac *, + int, int, int); +static struct bwn_dma_ring *bwn_dma_parse_cookie(struct bwn_mac *, + const struct bwn_txstatus *, uint16_t, int *); +static void bwn_dma_free(struct bwn_mac *); +static void bwn_phy_g_init_sub(struct bwn_mac *); +static uint8_t bwn_has_hwpctl(struct bwn_mac *); +static void bwn_phy_init_b5(struct bwn_mac *); +static void bwn_phy_init_b6(struct bwn_mac *); +static void bwn_phy_init_a(struct bwn_mac *); +static void bwn_loopback_calcgain(struct bwn_mac *); +static uint16_t bwn_rf_init_bcm2050(struct bwn_mac *); +static void bwn_lo_g_init(struct bwn_mac *); +static void bwn_lo_g_adjust(struct bwn_mac *); +static void bwn_lo_get_powervector(struct bwn_mac *); +static struct bwn_lo_calib *bwn_lo_calibset(struct bwn_mac *, + const struct bwn_bbatt *, const struct bwn_rfatt *); +static void bwn_lo_write(struct bwn_mac *, struct bwn_loctl *); +static void bwn_phy_hwpctl_init(struct bwn_mac *); +static void bwn_phy_g_switch_chan(struct bwn_mac *, int, uint8_t); +static void bwn_phy_g_set_txpwr_sub(struct bwn_mac *, + const struct bwn_bbatt *, const struct bwn_rfatt *, + uint8_t); +static void bwn_phy_g_set_bbatt(struct bwn_mac *, uint16_t); +static uint16_t bwn_rf_2050_rfoverval(struct bwn_mac *, uint16_t, uint32_t); +static void bwn_spu_workaround(struct bwn_mac *, uint8_t); +static void bwn_wa_init(struct bwn_mac *); +static void bwn_ofdmtab_write_2(struct bwn_mac *, uint16_t, uint16_t, + uint16_t); +static void bwn_dummy_transmission(struct bwn_mac *, int, int); +static void bwn_ofdmtab_write_4(struct bwn_mac *, uint16_t, uint16_t, + uint32_t); +static void bwn_gtab_write(struct bwn_mac *, uint16_t, uint16_t, + uint16_t); +static void bwn_ram_write(struct bwn_mac *, uint16_t, uint32_t); +static void bwn_mac_suspend(struct bwn_mac *); +static void bwn_mac_enable(struct bwn_mac *); +static void bwn_psctl(struct bwn_mac *, uint32_t); +static int16_t bwn_nrssi_read(struct bwn_mac *, uint16_t); +static void bwn_nrssi_offset(struct bwn_mac *); +static void bwn_nrssi_threshold(struct bwn_mac *); +static void bwn_nrssi_slope_11g(struct bwn_mac *); +static void bwn_set_all_gains(struct bwn_mac *, int16_t, int16_t, + int16_t); +static void bwn_set_original_gains(struct bwn_mac *); +static void bwn_hwpctl_early_init(struct bwn_mac *); +static void bwn_hwpctl_init_gphy(struct bwn_mac *); +static uint16_t bwn_phy_g_chan2freq(uint8_t); +static int bwn_fw_gets(struct bwn_mac *, enum bwn_fwtype); +static int bwn_fw_get(struct bwn_mac *, enum bwn_fwtype, + const char *, struct bwn_fwfile *); +static void bwn_release_firmware(struct bwn_mac *); +static void bwn_do_release_fw(struct bwn_fwfile *); +static uint16_t bwn_fwcaps_read(struct bwn_mac *); +static int bwn_fwinitvals_write(struct bwn_mac *, + const struct bwn_fwinitvals *, size_t, size_t); +static int bwn_switch_channel(struct bwn_mac *, int); +static uint16_t bwn_ant2phy(int); +static void bwn_mac_write_bssid(struct bwn_mac *); +static void bwn_mac_setfilter(struct bwn_mac *, uint16_t, + const uint8_t *); +static void bwn_key_dowrite(struct bwn_mac *, uint8_t, uint8_t, + const uint8_t *, size_t, const uint8_t *); +static void bwn_key_macwrite(struct bwn_mac *, uint8_t, + const uint8_t *); +static void bwn_key_write(struct bwn_mac *, uint8_t, uint8_t, + const uint8_t *); +static void bwn_phy_exit(struct bwn_mac *); +static void bwn_core_stop(struct bwn_mac *); +static int bwn_switch_band(struct bwn_softc *, + struct ieee80211_channel *); +static void bwn_phy_reset(struct bwn_mac *); +static int bwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); +static void bwn_set_pretbtt(struct bwn_mac *); +static int bwn_intr(void *); +static void bwn_intrtask(void *, int); +static void bwn_restart(struct bwn_mac *, const char *); +static void bwn_intr_ucode_debug(struct bwn_mac *); +static void bwn_intr_tbtt_indication(struct bwn_mac *); +static void bwn_intr_atim_end(struct bwn_mac *); +static void bwn_intr_beacon(struct bwn_mac *); +static void bwn_intr_pmq(struct bwn_mac *); +static void bwn_intr_noise(struct bwn_mac *); +static void bwn_intr_txeof(struct bwn_mac *); +static void bwn_hwreset(void *, int); +static void bwn_handle_fwpanic(struct bwn_mac *); +static void bwn_load_beacon0(struct bwn_mac *); +static void bwn_load_beacon1(struct bwn_mac *); +static uint32_t bwn_jssi_read(struct bwn_mac *); +static void bwn_noise_gensample(struct bwn_mac *); +static void bwn_handle_txeof(struct bwn_mac *, + const struct bwn_txstatus *); +static void bwn_rxeof(struct bwn_mac *, struct mbuf *, const void *); +static void bwn_phy_txpower_check(struct bwn_mac *, uint32_t); +static void bwn_start_locked(struct ifnet *); +static int bwn_tx_start(struct bwn_softc *, struct ieee80211_node *, + struct mbuf *); +static int bwn_tx_isfull(struct bwn_softc *, struct mbuf *); +static int bwn_set_txhdr(struct bwn_mac *, + struct ieee80211_node *, struct mbuf *, struct bwn_txhdr *, + uint16_t); +static void bwn_plcp_genhdr(struct bwn_plcp4 *, const uint16_t, + const uint8_t); +static uint8_t bwn_antenna_sanitize(struct bwn_mac *, uint8_t); +static uint8_t bwn_get_fbrate(uint8_t); +static int bwn_phy_shm_tssi_read(struct bwn_mac *, uint16_t); +static void bwn_phy_g_setatt(struct bwn_mac *, int *, int *); +static void bwn_phy_lock(struct bwn_mac *); +static void bwn_phy_unlock(struct bwn_mac *); +static void bwn_rf_lock(struct bwn_mac *); +static void bwn_rf_unlock(struct bwn_mac *); +static void bwn_txpwr(void *, int); +static void bwn_tasks(void *); +static void bwn_task_15s(struct bwn_mac *); +static void bwn_task_30s(struct bwn_mac *); +static void bwn_task_60s(struct bwn_mac *); +static int bwn_plcp_get_ofdmrate(struct bwn_mac *, struct bwn_plcp6 *, + uint8_t); +static int bwn_plcp_get_cckrate(struct bwn_mac *, struct bwn_plcp6 *); +static void bwn_rx_radiotap(struct bwn_mac *, struct mbuf *, + const struct bwn_rxhdr4 *, struct bwn_plcp6 *, int, + int, int); +static void bwn_tsf_read(struct bwn_mac *, uint64_t *); +static void bwn_phy_g_dc_lookup_init(struct bwn_mac *, uint8_t); +static void bwn_set_slot_time(struct bwn_mac *, uint16_t); +static void bwn_watchdog(void *); +static void bwn_dma_stop(struct bwn_mac *); +static void bwn_pio_stop(struct bwn_mac *); +static void bwn_dma_ringstop(struct bwn_dma_ring **); +static void bwn_led_attach(struct bwn_mac *); +static void bwn_led_newstate(struct bwn_mac *, enum ieee80211_state); +static void bwn_led_event(struct bwn_mac *, int); +static void bwn_led_blink_start(struct bwn_mac *, int, int); +static void bwn_led_blink_next(void *); +static void bwn_led_blink_end(void *); +static void bwn_rfswitch(void *); +static void bwn_rf_turnon(struct bwn_mac *); +static void bwn_rf_turnoff(struct bwn_mac *); +static void bwn_phy_lp_init_pre(struct bwn_mac *); +static int bwn_phy_lp_init(struct bwn_mac *); +static uint16_t bwn_phy_lp_read(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_write(struct bwn_mac *, uint16_t, uint16_t); +static void bwn_phy_lp_maskset(struct bwn_mac *, uint16_t, uint16_t, + uint16_t); +static uint16_t bwn_phy_lp_rf_read(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_rf_write(struct bwn_mac *, uint16_t, uint16_t); +static void bwn_phy_lp_rf_onoff(struct bwn_mac *, int); +static int bwn_phy_lp_switch_channel(struct bwn_mac *, uint32_t); +static uint32_t bwn_phy_lp_get_default_chan(struct bwn_mac *); +static void bwn_phy_lp_set_antenna(struct bwn_mac *, int); +static void bwn_phy_lp_task_60s(struct bwn_mac *); +static void bwn_phy_lp_readsprom(struct bwn_mac *); +static void bwn_phy_lp_bbinit(struct bwn_mac *); +static void bwn_phy_lp_txpctl_init(struct bwn_mac *); +static void bwn_phy_lp_calib(struct bwn_mac *); +static void bwn_phy_lp_switch_analog(struct bwn_mac *, int); +static int bwn_phy_lp_b2062_switch_channel(struct bwn_mac *, uint8_t); +static int bwn_phy_lp_b2063_switch_channel(struct bwn_mac *, uint8_t); +static void bwn_phy_lp_set_anafilter(struct bwn_mac *, uint8_t); +static void bwn_phy_lp_set_gaintbl(struct bwn_mac *, uint32_t); +static void bwn_phy_lp_digflt_save(struct bwn_mac *); +static void bwn_phy_lp_get_txpctlmode(struct bwn_mac *); +static void bwn_phy_lp_set_txpctlmode(struct bwn_mac *, uint8_t); +static void bwn_phy_lp_bugfix(struct bwn_mac *); +static void bwn_phy_lp_digflt_restore(struct bwn_mac *); +static void bwn_phy_lp_tblinit(struct bwn_mac *); +static void bwn_phy_lp_bbinit_r2(struct bwn_mac *); +static void bwn_phy_lp_bbinit_r01(struct bwn_mac *); +static void bwn_phy_lp_b2062_init(struct bwn_mac *); +static void bwn_phy_lp_b2063_init(struct bwn_mac *); +static void bwn_phy_lp_rxcal_r2(struct bwn_mac *); +static void bwn_phy_lp_rccal_r12(struct bwn_mac *); +static void bwn_phy_lp_set_rccap(struct bwn_mac *); +static uint32_t bwn_phy_lp_roundup(uint32_t, uint32_t, uint8_t); +static void bwn_phy_lp_b2062_reset_pllbias(struct bwn_mac *); +static void bwn_phy_lp_b2062_vco_calib(struct bwn_mac *); +static void bwn_tab_write_multi(struct bwn_mac *, uint32_t, int, + const void *); +static void bwn_tab_read_multi(struct bwn_mac *, uint32_t, int, void *); +static struct bwn_txgain + bwn_phy_lp_get_txgain(struct bwn_mac *); +static uint8_t bwn_phy_lp_get_bbmult(struct bwn_mac *); +static void bwn_phy_lp_set_txgain(struct bwn_mac *, struct bwn_txgain *); +static void bwn_phy_lp_set_bbmult(struct bwn_mac *, uint8_t); +static void bwn_phy_lp_set_trsw_over(struct bwn_mac *, uint8_t, uint8_t); +static void bwn_phy_lp_set_rxgain(struct bwn_mac *, uint32_t); +static void bwn_phy_lp_set_deaf(struct bwn_mac *, uint8_t); +static int bwn_phy_lp_calc_rx_iq_comp(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_clear_deaf(struct bwn_mac *, uint8_t); +static void bwn_phy_lp_tblinit_r01(struct bwn_mac *); +static void bwn_phy_lp_tblinit_r2(struct bwn_mac *); +static void bwn_phy_lp_tblinit_txgain(struct bwn_mac *); +static void bwn_tab_write(struct bwn_mac *, uint32_t, uint32_t); +static void bwn_phy_lp_b2062_tblinit(struct bwn_mac *); +static void bwn_phy_lp_b2063_tblinit(struct bwn_mac *); +static int bwn_phy_lp_loopback(struct bwn_mac *); +static void bwn_phy_lp_set_rxgain_idx(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_ddfs_turnon(struct bwn_mac *, int, int, int, int, + int); +static uint8_t bwn_phy_lp_rx_iq_est(struct bwn_mac *, uint16_t, uint8_t, + struct bwn_phy_lp_iq_est *); +static void bwn_phy_lp_ddfs_turnoff(struct bwn_mac *); +static uint32_t bwn_tab_read(struct bwn_mac *, uint32_t); +static void bwn_phy_lp_set_txgain_dac(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_set_txgain_pa(struct bwn_mac *, uint16_t); +static void bwn_phy_lp_set_txgain_override(struct bwn_mac *); +static uint16_t bwn_phy_lp_get_pa_gain(struct bwn_mac *); +static uint8_t bwn_nbits(int32_t); +static void bwn_phy_lp_gaintbl_write_multi(struct bwn_mac *, int, int, + struct bwn_txgain_entry *); +static void bwn_phy_lp_gaintbl_write(struct bwn_mac *, int, + struct bwn_txgain_entry); +static void bwn_phy_lp_gaintbl_write_r2(struct bwn_mac *, int, + struct bwn_txgain_entry); +static void bwn_phy_lp_gaintbl_write_r01(struct bwn_mac *, int, + struct bwn_txgain_entry); + +static struct resource_spec bwn_res_spec_legacy[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0, 0 } +}; + +static struct resource_spec bwn_res_spec_msi[] = { + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static const struct bwn_channelinfo bwn_chantable_bg = { + .channels = { + { 2412, 1, 30 }, { 2417, 2, 30 }, { 2422, 3, 30 }, + { 2427, 4, 30 }, { 2432, 5, 30 }, { 2437, 6, 30 }, + { 2442, 7, 30 }, { 2447, 8, 30 }, { 2452, 9, 30 }, + { 2457, 10, 30 }, { 2462, 11, 30 }, { 2467, 12, 30 }, + { 2472, 13, 30 }, { 2484, 14, 30 } }, + .nchannels = 14 +}; + +static const struct bwn_channelinfo bwn_chantable_a = { + .channels = { + { 5170, 34, 30 }, { 5180, 36, 30 }, { 5190, 38, 30 }, + { 5200, 40, 30 }, { 5210, 42, 30 }, { 5220, 44, 30 }, + { 5230, 46, 30 }, { 5240, 48, 30 }, { 5260, 52, 30 }, + { 5280, 56, 30 }, { 5300, 60, 30 }, { 5320, 64, 30 }, + { 5500, 100, 30 }, { 5520, 104, 30 }, { 5540, 108, 30 }, + { 5560, 112, 30 }, { 5580, 116, 30 }, { 5600, 120, 30 }, + { 5620, 124, 30 }, { 5640, 128, 30 }, { 5660, 132, 30 }, + { 5680, 136, 30 }, { 5700, 140, 30 }, { 5745, 149, 30 }, + { 5765, 153, 30 }, { 5785, 157, 30 }, { 5805, 161, 30 }, + { 5825, 165, 30 }, { 5920, 184, 30 }, { 5940, 188, 30 }, + { 5960, 192, 30 }, { 5980, 196, 30 }, { 6000, 200, 30 }, + { 6020, 204, 30 }, { 6040, 208, 30 }, { 6060, 212, 30 }, + { 6080, 216, 30 } }, + .nchannels = 37 +}; + +static const struct bwn_channelinfo bwn_chantable_n = { + .channels = { + { 5160, 32, 30 }, { 5170, 34, 30 }, { 5180, 36, 30 }, + { 5190, 38, 30 }, { 5200, 40, 30 }, { 5210, 42, 30 }, + { 5220, 44, 30 }, { 5230, 46, 30 }, { 5240, 48, 30 }, + { 5250, 50, 30 }, { 5260, 52, 30 }, { 5270, 54, 30 }, + { 5280, 56, 30 }, { 5290, 58, 30 }, { 5300, 60, 30 }, + { 5310, 62, 30 }, { 5320, 64, 30 }, { 5330, 66, 30 }, + { 5340, 68, 30 }, { 5350, 70, 30 }, { 5360, 72, 30 }, + { 5370, 74, 30 }, { 5380, 76, 30 }, { 5390, 78, 30 }, + { 5400, 80, 30 }, { 5410, 82, 30 }, { 5420, 84, 30 }, + { 5430, 86, 30 }, { 5440, 88, 30 }, { 5450, 90, 30 }, + { 5460, 92, 30 }, { 5470, 94, 30 }, { 5480, 96, 30 }, + { 5490, 98, 30 }, { 5500, 100, 30 }, { 5510, 102, 30 }, + { 5520, 104, 30 }, { 5530, 106, 30 }, { 5540, 108, 30 }, + { 5550, 110, 30 }, { 5560, 112, 30 }, { 5570, 114, 30 }, + { 5580, 116, 30 }, { 5590, 118, 30 }, { 5600, 120, 30 }, + { 5610, 122, 30 }, { 5620, 124, 30 }, { 5630, 126, 30 }, + { 5640, 128, 30 }, { 5650, 130, 30 }, { 5660, 132, 30 }, + { 5670, 134, 30 }, { 5680, 136, 30 }, { 5690, 138, 30 }, + { 5700, 140, 30 }, { 5710, 142, 30 }, { 5720, 144, 30 }, + { 5725, 145, 30 }, { 5730, 146, 30 }, { 5735, 147, 30 }, + { 5740, 148, 30 }, { 5745, 149, 30 }, { 5750, 150, 30 }, + { 5755, 151, 30 }, { 5760, 152, 30 }, { 5765, 153, 30 }, + { 5770, 154, 30 }, { 5775, 155, 30 }, { 5780, 156, 30 }, + { 5785, 157, 30 }, { 5790, 158, 30 }, { 5795, 159, 30 }, + { 5800, 160, 30 }, { 5805, 161, 30 }, { 5810, 162, 30 }, + { 5815, 163, 30 }, { 5820, 164, 30 }, { 5825, 165, 30 }, + { 5830, 166, 30 }, { 5840, 168, 30 }, { 5850, 170, 30 }, + { 5860, 172, 30 }, { 5870, 174, 30 }, { 5880, 176, 30 }, + { 5890, 178, 30 }, { 5900, 180, 30 }, { 5910, 182, 30 }, + { 5920, 184, 30 }, { 5930, 186, 30 }, { 5940, 188, 30 }, + { 5950, 190, 30 }, { 5960, 192, 30 }, { 5970, 194, 30 }, + { 5980, 196, 30 }, { 5990, 198, 30 }, { 6000, 200, 30 }, + { 6010, 202, 30 }, { 6020, 204, 30 }, { 6030, 206, 30 }, + { 6040, 208, 30 }, { 6050, 210, 30 }, { 6060, 212, 30 }, + { 6070, 214, 30 }, { 6080, 216, 30 }, { 6090, 218, 30 }, + { 6100, 220, 30 }, { 6110, 222, 30 }, { 6120, 224, 30 }, + { 6130, 226, 30 }, { 6140, 228, 30 } }, + .nchannels = 110 +}; + +static const uint8_t bwn_b2063_chantable_data[33][12] = { + { 0x6f, 0x3c, 0x3c, 0x4, 0x5, 0x5, 0x5, 0x5, 0x77, 0x80, 0x80, 0x70 }, + { 0x6f, 0x2c, 0x2c, 0x4, 0x5, 0x5, 0x5, 0x5, 0x77, 0x80, 0x80, 0x70 }, + { 0x6f, 0x1c, 0x1c, 0x4, 0x5, 0x5, 0x5, 0x5, 0x77, 0x80, 0x80, 0x70 }, + { 0x6e, 0x1c, 0x1c, 0x4, 0x5, 0x5, 0x5, 0x5, 0x77, 0x80, 0x80, 0x70 }, + { 0x6e, 0xc, 0xc, 0x4, 0x5, 0x5, 0x5, 0x5, 0x77, 0x80, 0x80, 0x70 }, + { 0x6a, 0xc, 0xc, 0, 0x2, 0x5, 0xd, 0xd, 0x77, 0x80, 0x20, 0 }, + { 0x6a, 0xc, 0xc, 0, 0x1, 0x5, 0xd, 0xc, 0x77, 0x80, 0x20, 0 }, + { 0x6a, 0xc, 0xc, 0, 0x1, 0x4, 0xc, 0xc, 0x77, 0x80, 0x20, 0 }, + { 0x69, 0xc, 0xc, 0, 0x1, 0x4, 0xc, 0xc, 0x77, 0x70, 0x20, 0 }, + { 0x69, 0xc, 0xc, 0, 0x1, 0x4, 0xb, 0xc, 0x77, 0x70, 0x20, 0 }, + { 0x69, 0xc, 0xc, 0, 0, 0x4, 0xb, 0xb, 0x77, 0x60, 0x20, 0 }, + { 0x69, 0xc, 0xc, 0, 0, 0x3, 0xa, 0xb, 0x77, 0x60, 0x20, 0 }, + { 0x69, 0xc, 0xc, 0, 0, 0x3, 0xa, 0xa, 0x77, 0x60, 0x20, 0 }, + { 0x68, 0xc, 0xc, 0, 0, 0x2, 0x9, 0x9, 0x77, 0x60, 0x20, 0 }, + { 0x68, 0xc, 0xc, 0, 0, 0x1, 0x8, 0x8, 0x77, 0x50, 0x10, 0 }, + { 0x67, 0xc, 0xc, 0, 0, 0, 0x8, 0x8, 0x77, 0x50, 0x10, 0 }, + { 0x64, 0xc, 0xc, 0, 0, 0, 0x2, 0x1, 0x77, 0x20, 0, 0 }, + { 0x64, 0xc, 0xc, 0, 0, 0, 0x1, 0x1, 0x77, 0x20, 0, 0 }, + { 0x63, 0xc, 0xc, 0, 0, 0, 0x1, 0, 0x77, 0x10, 0, 0 }, + { 0x63, 0xc, 0xc, 0, 0, 0, 0, 0, 0x77, 0x10, 0, 0 }, + { 0x62, 0xc, 0xc, 0, 0, 0, 0, 0, 0x77, 0x10, 0, 0 }, + { 0x62, 0xc, 0xc, 0, 0, 0, 0, 0, 0x77, 0, 0, 0 }, + { 0x61, 0xc, 0xc, 0, 0, 0, 0, 0, 0x77, 0, 0, 0 }, + { 0x60, 0xc, 0xc, 0, 0, 0, 0, 0, 0x77, 0, 0, 0 }, + { 0x6e, 0xc, 0xc, 0, 0x9, 0xe, 0xf, 0xf, 0x77, 0xc0, 0x50, 0 }, + { 0x6e, 0xc, 0xc, 0, 0x9, 0xd, 0xf, 0xf, 0x77, 0xb0, 0x50, 0 }, + { 0x6e, 0xc, 0xc, 0, 0x8, 0xc, 0xf, 0xf, 0x77, 0xb0, 0x50, 0 }, + { 0x6d, 0xc, 0xc, 0, 0x8, 0xc, 0xf, 0xf, 0x77, 0xa0, 0x40, 0 }, + { 0x6d, 0xc, 0xc, 0, 0x8, 0xb, 0xf, 0xf, 0x77, 0xa0, 0x40, 0 }, + { 0x6d, 0xc, 0xc, 0, 0x8, 0xa, 0xf, 0xf, 0x77, 0xa0, 0x40, 0 }, + { 0x6c, 0xc, 0xc, 0, 0x7, 0x9, 0xf, 0xf, 0x77, 0x90, 0x40, 0 }, + { 0x6c, 0xc, 0xc, 0, 0x6, 0x8, 0xf, 0xf, 0x77, 0x90, 0x40, 0 }, + { 0x6c, 0xc, 0xc, 0, 0x5, 0x8, 0xf, 0xf, 0x77, 0x90, 0x40, 0 } +}; + +static const struct bwn_b206x_chan bwn_b2063_chantable[] = { + { 1, 2412, bwn_b2063_chantable_data[0] }, + { 2, 2417, bwn_b2063_chantable_data[0] }, + { 3, 2422, bwn_b2063_chantable_data[0] }, + { 4, 2427, bwn_b2063_chantable_data[1] }, + { 5, 2432, bwn_b2063_chantable_data[1] }, + { 6, 2437, bwn_b2063_chantable_data[1] }, + { 7, 2442, bwn_b2063_chantable_data[1] }, + { 8, 2447, bwn_b2063_chantable_data[1] }, + { 9, 2452, bwn_b2063_chantable_data[2] }, + { 10, 2457, bwn_b2063_chantable_data[2] }, + { 11, 2462, bwn_b2063_chantable_data[3] }, + { 12, 2467, bwn_b2063_chantable_data[3] }, + { 13, 2472, bwn_b2063_chantable_data[3] }, + { 14, 2484, bwn_b2063_chantable_data[4] }, + { 34, 5170, bwn_b2063_chantable_data[5] }, + { 36, 5180, bwn_b2063_chantable_data[6] }, + { 38, 5190, bwn_b2063_chantable_data[7] }, + { 40, 5200, bwn_b2063_chantable_data[8] }, + { 42, 5210, bwn_b2063_chantable_data[9] }, + { 44, 5220, bwn_b2063_chantable_data[10] }, + { 46, 5230, bwn_b2063_chantable_data[11] }, + { 48, 5240, bwn_b2063_chantable_data[12] }, + { 52, 5260, bwn_b2063_chantable_data[13] }, + { 56, 5280, bwn_b2063_chantable_data[14] }, + { 60, 5300, bwn_b2063_chantable_data[14] }, + { 64, 5320, bwn_b2063_chantable_data[15] }, + { 100, 5500, bwn_b2063_chantable_data[16] }, + { 104, 5520, bwn_b2063_chantable_data[17] }, + { 108, 5540, bwn_b2063_chantable_data[18] }, + { 112, 5560, bwn_b2063_chantable_data[19] }, + { 116, 5580, bwn_b2063_chantable_data[20] }, + { 120, 5600, bwn_b2063_chantable_data[21] }, + { 124, 5620, bwn_b2063_chantable_data[21] }, + { 128, 5640, bwn_b2063_chantable_data[22] }, + { 132, 5660, bwn_b2063_chantable_data[22] }, + { 136, 5680, bwn_b2063_chantable_data[22] }, + { 140, 5700, bwn_b2063_chantable_data[23] }, + { 149, 5745, bwn_b2063_chantable_data[23] }, + { 153, 5765, bwn_b2063_chantable_data[23] }, + { 157, 5785, bwn_b2063_chantable_data[23] }, + { 161, 5805, bwn_b2063_chantable_data[23] }, + { 165, 5825, bwn_b2063_chantable_data[23] }, + { 184, 4920, bwn_b2063_chantable_data[24] }, + { 188, 4940, bwn_b2063_chantable_data[25] }, + { 192, 4960, bwn_b2063_chantable_data[26] }, + { 196, 4980, bwn_b2063_chantable_data[27] }, + { 200, 5000, bwn_b2063_chantable_data[28] }, + { 204, 5020, bwn_b2063_chantable_data[29] }, + { 208, 5040, bwn_b2063_chantable_data[30] }, + { 212, 5060, bwn_b2063_chantable_data[31] }, + { 216, 5080, bwn_b2063_chantable_data[32] } +}; + +static const uint8_t bwn_b2062_chantable_data[22][12] = { + { 0xff, 0xff, 0xb5, 0x1b, 0x24, 0x32, 0x32, 0x88, 0x88, 0, 0, 0 }, + { 0, 0x22, 0x20, 0x84, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0x11, 0x10, 0x83, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x83, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0x11, 0x20, 0x83, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0x11, 0x10, 0x84, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0x11, 0, 0x83, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x63, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x62, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x30, 0x3c, 0x77, 0x37, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x20, 0x3c, 0x77, 0x37, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0x10, 0x3c, 0x77, 0x37, 0xff, 0x88, 0, 0, 0 }, + { 0, 0, 0, 0, 0x3c, 0x77, 0x37, 0xff, 0x88, 0, 0, 0 }, + { 0x55, 0x77, 0x90, 0xf7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x44, 0x77, 0x80, 0xe7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x44, 0x66, 0x80, 0xe7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x33, 0x66, 0x70, 0xc7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x22, 0x55, 0x60, 0xd7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x22, 0x55, 0x60, 0xc7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x22, 0x44, 0x50, 0xc7, 0x3c, 0x77, 0x35, 0xff, 0xff, 0, 0, 0 }, + { 0x11, 0x44, 0x50, 0xa5, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 }, + { 0, 0x44, 0x40, 0xb6, 0x3c, 0x77, 0x35, 0xff, 0x88, 0, 0, 0 } +}; + +static const struct bwn_b206x_chan bwn_b2062_chantable[] = { + { 1, 2412, bwn_b2062_chantable_data[0] }, + { 2, 2417, bwn_b2062_chantable_data[0] }, + { 3, 2422, bwn_b2062_chantable_data[0] }, + { 4, 2427, bwn_b2062_chantable_data[0] }, + { 5, 2432, bwn_b2062_chantable_data[0] }, + { 6, 2437, bwn_b2062_chantable_data[0] }, + { 7, 2442, bwn_b2062_chantable_data[0] }, + { 8, 2447, bwn_b2062_chantable_data[0] }, + { 9, 2452, bwn_b2062_chantable_data[0] }, + { 10, 2457, bwn_b2062_chantable_data[0] }, + { 11, 2462, bwn_b2062_chantable_data[0] }, + { 12, 2467, bwn_b2062_chantable_data[0] }, + { 13, 2472, bwn_b2062_chantable_data[0] }, + { 14, 2484, bwn_b2062_chantable_data[0] }, + { 34, 5170, bwn_b2062_chantable_data[1] }, + { 38, 5190, bwn_b2062_chantable_data[2] }, + { 42, 5210, bwn_b2062_chantable_data[2] }, + { 46, 5230, bwn_b2062_chantable_data[3] }, + { 36, 5180, bwn_b2062_chantable_data[4] }, + { 40, 5200, bwn_b2062_chantable_data[5] }, + { 44, 5220, bwn_b2062_chantable_data[6] }, + { 48, 5240, bwn_b2062_chantable_data[3] }, + { 52, 5260, bwn_b2062_chantable_data[3] }, + { 56, 5280, bwn_b2062_chantable_data[3] }, + { 60, 5300, bwn_b2062_chantable_data[7] }, + { 64, 5320, bwn_b2062_chantable_data[8] }, + { 100, 5500, bwn_b2062_chantable_data[9] }, + { 104, 5520, bwn_b2062_chantable_data[10] }, + { 108, 5540, bwn_b2062_chantable_data[10] }, + { 112, 5560, bwn_b2062_chantable_data[10] }, + { 116, 5580, bwn_b2062_chantable_data[11] }, + { 120, 5600, bwn_b2062_chantable_data[12] }, + { 124, 5620, bwn_b2062_chantable_data[12] }, + { 128, 5640, bwn_b2062_chantable_data[12] }, + { 132, 5660, bwn_b2062_chantable_data[12] }, + { 136, 5680, bwn_b2062_chantable_data[12] }, + { 140, 5700, bwn_b2062_chantable_data[12] }, + { 149, 5745, bwn_b2062_chantable_data[12] }, + { 153, 5765, bwn_b2062_chantable_data[12] }, + { 157, 5785, bwn_b2062_chantable_data[12] }, + { 161, 5805, bwn_b2062_chantable_data[12] }, + { 165, 5825, bwn_b2062_chantable_data[12] }, + { 184, 4920, bwn_b2062_chantable_data[13] }, + { 188, 4940, bwn_b2062_chantable_data[14] }, + { 192, 4960, bwn_b2062_chantable_data[15] }, + { 196, 4980, bwn_b2062_chantable_data[16] }, + { 200, 5000, bwn_b2062_chantable_data[17] }, + { 204, 5020, bwn_b2062_chantable_data[18] }, + { 208, 5040, bwn_b2062_chantable_data[19] }, + { 212, 5060, bwn_b2062_chantable_data[20] }, + { 216, 5080, bwn_b2062_chantable_data[21] } +}; + +/* for LP PHY */ +static const struct bwn_rxcompco bwn_rxcompco_5354[] = { + { 1, -66, 15 }, { 2, -66, 15 }, { 3, -66, 15 }, { 4, -66, 15 }, + { 5, -66, 15 }, { 6, -66, 15 }, { 7, -66, 14 }, { 8, -66, 14 }, + { 9, -66, 14 }, { 10, -66, 14 }, { 11, -66, 14 }, { 12, -66, 13 }, + { 13, -66, 13 }, { 14, -66, 13 }, +}; + +/* for LP PHY */ +static const struct bwn_rxcompco bwn_rxcompco_r12[] = { + { 1, -64, 13 }, { 2, -64, 13 }, { 3, -64, 13 }, { 4, -64, 13 }, + { 5, -64, 12 }, { 6, -64, 12 }, { 7, -64, 12 }, { 8, -64, 12 }, + { 9, -64, 12 }, { 10, -64, 11 }, { 11, -64, 11 }, { 12, -64, 11 }, + { 13, -64, 11 }, { 14, -64, 10 }, { 34, -62, 24 }, { 38, -62, 24 }, + { 42, -62, 24 }, { 46, -62, 23 }, { 36, -62, 24 }, { 40, -62, 24 }, + { 44, -62, 23 }, { 48, -62, 23 }, { 52, -62, 23 }, { 56, -62, 22 }, + { 60, -62, 22 }, { 64, -62, 22 }, { 100, -62, 16 }, { 104, -62, 16 }, + { 108, -62, 15 }, { 112, -62, 14 }, { 116, -62, 14 }, { 120, -62, 13 }, + { 124, -62, 12 }, { 128, -62, 12 }, { 132, -62, 12 }, { 136, -62, 11 }, + { 140, -62, 10 }, { 149, -61, 9 }, { 153, -61, 9 }, { 157, -61, 9 }, + { 161, -61, 8 }, { 165, -61, 8 }, { 184, -62, 25 }, { 188, -62, 25 }, + { 192, -62, 25 }, { 196, -62, 25 }, { 200, -62, 25 }, { 204, -62, 25 }, + { 208, -62, 25 }, { 212, -62, 25 }, { 216, -62, 26 }, +}; + +static const struct bwn_rxcompco bwn_rxcompco_r2 = { 0, -64, 0 }; + +static const uint8_t bwn_tab_sigsq_tbl[] = { + 0xde, 0xdc, 0xda, 0xd8, 0xd6, 0xd4, 0xd2, 0xcf, 0xcd, + 0xca, 0xc7, 0xc4, 0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, + 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x00, + 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, + 0xbe, 0xbe, 0xbe, 0xbe, 0xc1, 0xc4, 0xc7, 0xca, 0xcd, + 0xcf, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, +}; + +static const uint8_t bwn_tab_pllfrac_tbl[] = { + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +}; + +static const uint16_t bwn_tabl_iqlocal_tbl[] = { + 0x0200, 0x0300, 0x0400, 0x0600, 0x0800, 0x0b00, 0x1000, 0x1001, 0x1002, + 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1707, 0x2007, 0x2d07, 0x4007, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x0300, 0x0400, 0x0600, + 0x0800, 0x0b00, 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, + 0x1007, 0x1707, 0x2007, 0x2d07, 0x4007, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +}; + +static const uint16_t bwn_tab_noise_g1[] = BWN_TAB_NOISE_G1; +static const uint16_t bwn_tab_noise_g2[] = BWN_TAB_NOISE_G2; +static const uint16_t bwn_tab_noisescale_g1[] = BWN_TAB_NOISESCALE_G1; +static const uint16_t bwn_tab_noisescale_g2[] = BWN_TAB_NOISESCALE_G2; +static const uint16_t bwn_tab_noisescale_g3[] = BWN_TAB_NOISESCALE_G3; +const uint8_t bwn_bitrev_table[256] = BWN_BITREV_TABLE; + +#define VENDOR_LED_ACT(vendor) \ +{ \ + .vid = PCI_VENDOR_##vendor, \ + .led_act = { BWN_VENDOR_LED_ACT_##vendor } \ +} + +static const struct { + uint16_t vid; + uint8_t led_act[BWN_LED_MAX]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 02:22:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59D91065694; Tue, 16 Feb 2010 02:22:59 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95FDB8FC14; Tue, 16 Feb 2010 02:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G2MxSg084982; Tue, 16 Feb 2010 02:22:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G2MxVh084980; Tue, 16 Feb 2010 02:22:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002160222.o1G2MxVh084980@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 02:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203946 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 02:22:59 -0000 Author: marcel Date: Tue Feb 16 02:22:59 2010 New Revision: 203946 URL: http://svn.freebsd.org/changeset/base/203946 Log: The static TLS size as given by tls_static_space includes TLS_TCB_SIZE bytes of TCB in variant I. Modified: head/lib/libc/gen/tls.c Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Tue Feb 16 01:44:14 2010 (r203945) +++ head/lib/libc/gen/tls.c Tue Feb 16 02:22:59 2010 (r203946) @@ -137,11 +137,11 @@ __libc_allocate_tls(void *oldtcb, size_t if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); - tcb = calloc(1, tls_static_space + tcbsize); + tcb = calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); if (oldtcb != NULL) { - memcpy(tls, oldtcb, tls_static_space + TLS_TCB_SIZE); + memcpy(tls, oldtcb, tls_static_space); free(oldtcb); /* Adjust the DTV. */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 02:48:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993C81065670; Tue, 16 Feb 2010 02:48:11 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89A998FC19; Tue, 16 Feb 2010 02:48:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G2mBJ3090588; Tue, 16 Feb 2010 02:48:11 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G2mBDG090586; Tue, 16 Feb 2010 02:48:11 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002160248.o1G2mBDG090586@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 02:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203947 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 02:48:11 -0000 Author: marcel Date: Tue Feb 16 02:48:11 2010 New Revision: 203947 URL: http://svn.freebsd.org/changeset/base/203947 Log: Improve TLS variant I: o Use obj->tlsinitsize to determine whether there's initialized data. o If obj->tlssize > obj->tlsinitsize, then bzero uninitialized data. o Don't exclude variant I from the work-around in free_tls_offset(). Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Feb 16 02:22:59 2010 (r203946) +++ head/libexec/rtld-elf/rtld.c Tue Feb 16 02:48:11 2010 (r203947) @@ -3151,13 +3151,13 @@ allocate_tls(Obj_Entry *objs, void *oldt dtv[1] = tls_max_index; for (obj = objs; obj; obj = obj->next) { - if (obj->tlsoffset) { + if (obj->tlsoffset > 0) { addr = (Elf_Addr)tls + obj->tlsoffset; - memset((void*) (addr + obj->tlsinitsize), - 0, obj->tlssize - obj->tlsinitsize); - if (obj->tlsinit) - memcpy((void*) addr, obj->tlsinit, - obj->tlsinitsize); + if (obj->tlsinitsize > 0) + memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize); + if (obj->tlssize > obj->tlsinitsize) + memset((void*) (addr + obj->tlsinitsize), 0, + obj->tlssize - obj->tlsinitsize); dtv[obj->tlsindex + 1] = addr; } } @@ -3357,21 +3357,18 @@ allocate_tls_offset(Obj_Entry *obj) void free_tls_offset(Obj_Entry *obj) { -#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \ - defined(__arm__) || defined(__mips__) + /* * If we were the last thing to allocate out of the static TLS * block, we give our space back to the 'allocator'. This is a * simplistic workaround to allow libGL.so.1 to be loaded and - * unloaded multiple times. We only handle the Variant II - * mechanism for now - this really needs a proper allocator. + * unloaded multiple times. */ if (calculate_tls_end(obj->tlsoffset, obj->tlssize) == calculate_tls_end(tls_last_offset, tls_last_size)) { tls_last_offset -= obj->tlssize; tls_last_size = 0; } -#endif } void * From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 05:14:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99C6E1065670; Tue, 16 Feb 2010 05:14:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 834558FC08; Tue, 16 Feb 2010 05:14:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G5Eqbt023479; Tue, 16 Feb 2010 05:14:52 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G5Eq20023463; Tue, 16 Feb 2010 05:14:52 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201002160514.o1G5Eq20023463@svn.freebsd.org> From: Doug Barton Date: Tue, 16 Feb 2010 05:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203948 - in stable/7: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named contrib/bind9/bin/n... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 05:14:52 -0000 Author: dougb Date: Tue Feb 16 05:14:51 2010 New Revision: 203948 URL: http://svn.freebsd.org/changeset/base/203948 Log: Upgrade to BIND 9.4-ESV. This version incorporates all bug and security fixes since the release of 9.4.3, including the most recent -P5 security fix detailed below. From the README: BIND 9.4-ESV will be supported until December 31, 2010, at which time you will need to upgrade to the current release of BIND. This versions address the following vulnerabilities: BIND 9 Cache Update from Additional Section https://www.isc.org/advisories/CVE-2009-4022v6 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022 A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated records to its cache that are received during the resolution of a recursive client query BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses https://www.isc.org/advisories/CVE-2010-0097 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097 There was an error in the DNSSEC NSEC/NSEC3 validation code that could cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records proven by NSEC or NSEC3 to exist) to be cached as if they had validated correctly These issues only affect systems with DNSSEC validation enabled. Approved by: re (kensmith) Added: stable/7/contrib/bind9/doc/draft/draft-ietf-6man-text-addr-representation-01.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-6man-text-addr-representation-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-behave-dns64-01.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-behave-dns64-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dns-tcp-requirements-02.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dns-tcp-requirements-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-09.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-09.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2671bis-edns0-02.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc2671bis-edns0-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2672bis-dname-18.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc2672bis-dname-18.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-md5-deprecated-03.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsext-tsig-md5-deprecated-03.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-default-local-zones-09.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-default-local-zones-09.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-name-server-management-reqs-02.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-name-server-management-reqs-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-respsize-06.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/draft/draft-ietf-dnsop-respsize-06.txt stable/7/contrib/bind9/doc/rfc/rfc1912.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc1912.txt stable/7/contrib/bind9/doc/rfc/rfc3755.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc3755.txt stable/7/contrib/bind9/doc/rfc/rfc4294.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4294.txt stable/7/contrib/bind9/doc/rfc/rfc4339.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4339.txt stable/7/contrib/bind9/doc/rfc/rfc4471.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4471.txt stable/7/contrib/bind9/doc/rfc/rfc4472.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4472.txt stable/7/contrib/bind9/doc/rfc/rfc4509.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4509.txt stable/7/contrib/bind9/doc/rfc/rfc4635.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4635.txt stable/7/contrib/bind9/doc/rfc/rfc4697.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4697.txt stable/7/contrib/bind9/doc/rfc/rfc4892.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4892.txt stable/7/contrib/bind9/doc/rfc/rfc4955.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4955.txt stable/7/contrib/bind9/doc/rfc/rfc4956.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc4956.txt stable/7/contrib/bind9/doc/rfc/rfc5001.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5001.txt stable/7/contrib/bind9/doc/rfc/rfc5011.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5011.txt stable/7/contrib/bind9/doc/rfc/rfc5205.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5205.txt stable/7/contrib/bind9/doc/rfc/rfc5452.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5452.txt stable/7/contrib/bind9/doc/rfc/rfc5507.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5507.txt stable/7/contrib/bind9/doc/rfc/rfc5625.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5625.txt stable/7/contrib/bind9/doc/rfc/rfc5702.txt - copied unchanged from r203851, vendor/bind9/dist-9.4/doc/rfc/rfc5702.txt Deleted: stable/7/contrib/bind9/doc/draft/draft-baba-dnsext-acl-reqts-01.txt stable/7/contrib/bind9/doc/draft/draft-daigle-napstr-04.txt stable/7/contrib/bind9/doc/draft/draft-danisch-dns-rr-smtp-03.txt stable/7/contrib/bind9/doc/draft/draft-dnsext-opcode-discover-02.txt stable/7/contrib/bind9/doc/draft/draft-durand-dnsop-dynreverse-00.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-2929bis-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dhcid-rr-12.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dns-name-p-s-00.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-experiments-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-online-signing-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-opt-in-07.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-rsasha256-00.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-trans-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-ds-sha256-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-12.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-mdns-43.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-nsec3-04.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-nsid-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2536bis-dsa-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2538bis-04.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2539bis-dhk-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-signed-nonexistence-requirements-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-tkey-renewal-mode-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-threshold-00.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-timers-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-sha-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-wcard-clarify-10.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-08.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-dns-configuration-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-dns-issues-11.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-transport-guidelines-01.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-key-rollover-requirements-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-respsize-02.txt stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-serverid-06.txt stable/7/contrib/bind9/doc/draft/draft-ietf-enum-e164-gstn-np-05.txt stable/7/contrib/bind9/doc/draft/draft-ietf-ipv6-node-requirements-08.txt stable/7/contrib/bind9/doc/draft/draft-ietf-secsh-dns-05.txt stable/7/contrib/bind9/doc/draft/draft-ihren-dnsext-threshold-validation-00.txt stable/7/contrib/bind9/doc/draft/draft-park-ipv6-extensions-dns-pnp-00.txt Modified: stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/COPYRIGHT stable/7/contrib/bind9/FAQ stable/7/contrib/bind9/FAQ.xml stable/7/contrib/bind9/Makefile.in stable/7/contrib/bind9/README stable/7/contrib/bind9/README.idnkit stable/7/contrib/bind9/acconfig.h stable/7/contrib/bind9/bin/check/check-tool.c stable/7/contrib/bind9/bin/check/named-checkconf.8 stable/7/contrib/bind9/bin/check/named-checkconf.c stable/7/contrib/bind9/bin/check/named-checkconf.html stable/7/contrib/bind9/bin/check/named-checkzone.8 stable/7/contrib/bind9/bin/check/named-checkzone.c stable/7/contrib/bind9/bin/check/named-checkzone.docbook stable/7/contrib/bind9/bin/check/named-checkzone.html stable/7/contrib/bind9/bin/dig/dig.1 stable/7/contrib/bind9/bin/dig/dig.c stable/7/contrib/bind9/bin/dig/dig.docbook stable/7/contrib/bind9/bin/dig/dig.html stable/7/contrib/bind9/bin/dig/dighost.c stable/7/contrib/bind9/bin/dig/host.1 stable/7/contrib/bind9/bin/dig/host.c stable/7/contrib/bind9/bin/dig/host.docbook stable/7/contrib/bind9/bin/dig/host.html stable/7/contrib/bind9/bin/dig/include/dig/dig.h stable/7/contrib/bind9/bin/dig/nslookup.1 stable/7/contrib/bind9/bin/dig/nslookup.c stable/7/contrib/bind9/bin/dig/nslookup.html stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/7/contrib/bind9/bin/named/client.c stable/7/contrib/bind9/bin/named/control.c stable/7/contrib/bind9/bin/named/include/named/client.h stable/7/contrib/bind9/bin/named/include/named/log.h stable/7/contrib/bind9/bin/named/include/named/lwdclient.h stable/7/contrib/bind9/bin/named/include/named/notify.h stable/7/contrib/bind9/bin/named/include/named/server.h stable/7/contrib/bind9/bin/named/interfacemgr.c stable/7/contrib/bind9/bin/named/log.c stable/7/contrib/bind9/bin/named/lwresd.8 stable/7/contrib/bind9/bin/named/lwresd.docbook stable/7/contrib/bind9/bin/named/lwresd.html stable/7/contrib/bind9/bin/named/main.c stable/7/contrib/bind9/bin/named/named.8 stable/7/contrib/bind9/bin/named/named.conf.5 stable/7/contrib/bind9/bin/named/named.conf.html stable/7/contrib/bind9/bin/named/named.html stable/7/contrib/bind9/bin/named/query.c stable/7/contrib/bind9/bin/named/server.c stable/7/contrib/bind9/bin/named/unix/os.c stable/7/contrib/bind9/bin/named/update.c stable/7/contrib/bind9/bin/named/xfrout.c stable/7/contrib/bind9/bin/nsupdate/nsupdate.1 stable/7/contrib/bind9/bin/nsupdate/nsupdate.c stable/7/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/7/contrib/bind9/bin/nsupdate/nsupdate.html stable/7/contrib/bind9/bin/rndc/include/rndc/os.h stable/7/contrib/bind9/bin/rndc/rndc-confgen.8 stable/7/contrib/bind9/bin/rndc/rndc-confgen.html stable/7/contrib/bind9/bin/rndc/rndc.8 stable/7/contrib/bind9/bin/rndc/rndc.c stable/7/contrib/bind9/bin/rndc/rndc.conf.5 stable/7/contrib/bind9/bin/rndc/rndc.conf.html stable/7/contrib/bind9/bin/rndc/rndc.html stable/7/contrib/bind9/config.guess stable/7/contrib/bind9/config.h.in stable/7/contrib/bind9/configure.in stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/7/contrib/bind9/doc/arm/Bv9ARM.html stable/7/contrib/bind9/doc/arm/Bv9ARM.pdf stable/7/contrib/bind9/doc/arm/Makefile.in stable/7/contrib/bind9/doc/arm/man.dig.html stable/7/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/7/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/7/contrib/bind9/doc/arm/man.host.html stable/7/contrib/bind9/doc/arm/man.named-checkconf.html stable/7/contrib/bind9/doc/arm/man.named-checkzone.html stable/7/contrib/bind9/doc/arm/man.named.html stable/7/contrib/bind9/doc/arm/man.rndc-confgen.html stable/7/contrib/bind9/doc/arm/man.rndc.conf.html stable/7/contrib/bind9/doc/arm/man.rndc.html stable/7/contrib/bind9/doc/misc/Makefile.in stable/7/contrib/bind9/doc/rfc/index stable/7/contrib/bind9/lib/bind/configure.in stable/7/contrib/bind9/lib/bind9/api stable/7/contrib/bind9/lib/bind9/check.c stable/7/contrib/bind9/lib/bind9/include/bind9/getaddresses.h stable/7/contrib/bind9/lib/dns/adb.c stable/7/contrib/bind9/lib/dns/cache.c stable/7/contrib/bind9/lib/dns/db.c stable/7/contrib/bind9/lib/dns/diff.c stable/7/contrib/bind9/lib/dns/dispatch.c stable/7/contrib/bind9/lib/dns/dlz.c stable/7/contrib/bind9/lib/dns/dnssec.c stable/7/contrib/bind9/lib/dns/dst_api.c stable/7/contrib/bind9/lib/dns/dst_parse.c stable/7/contrib/bind9/lib/dns/gen-unix.h stable/7/contrib/bind9/lib/dns/include/dns/Makefile.in stable/7/contrib/bind9/lib/dns/include/dns/acl.h stable/7/contrib/bind9/lib/dns/include/dns/compress.h stable/7/contrib/bind9/lib/dns/include/dns/db.h stable/7/contrib/bind9/lib/dns/include/dns/diff.h stable/7/contrib/bind9/lib/dns/include/dns/dlz.h stable/7/contrib/bind9/lib/dns/include/dns/journal.h stable/7/contrib/bind9/lib/dns/include/dns/log.h stable/7/contrib/bind9/lib/dns/include/dns/lookup.h stable/7/contrib/bind9/lib/dns/include/dns/message.h stable/7/contrib/bind9/lib/dns/include/dns/name.h stable/7/contrib/bind9/lib/dns/include/dns/peer.h stable/7/contrib/bind9/lib/dns/include/dns/rbt.h stable/7/contrib/bind9/lib/dns/include/dns/rdata.h stable/7/contrib/bind9/lib/dns/include/dns/rdataset.h stable/7/contrib/bind9/lib/dns/include/dns/request.h stable/7/contrib/bind9/lib/dns/include/dns/resolver.h stable/7/contrib/bind9/lib/dns/include/dns/sdb.h stable/7/contrib/bind9/lib/dns/include/dns/sdlz.h stable/7/contrib/bind9/lib/dns/include/dns/tkey.h stable/7/contrib/bind9/lib/dns/include/dns/types.h stable/7/contrib/bind9/lib/dns/include/dns/validator.h stable/7/contrib/bind9/lib/dns/include/dns/view.h stable/7/contrib/bind9/lib/dns/include/dns/xfrin.h stable/7/contrib/bind9/lib/dns/include/dns/zone.h stable/7/contrib/bind9/lib/dns/journal.c stable/7/contrib/bind9/lib/dns/master.c stable/7/contrib/bind9/lib/dns/masterdump.c stable/7/contrib/bind9/lib/dns/message.c stable/7/contrib/bind9/lib/dns/nsec.c stable/7/contrib/bind9/lib/dns/openssl_link.c stable/7/contrib/bind9/lib/dns/openssldsa_link.c stable/7/contrib/bind9/lib/dns/opensslrsa_link.c stable/7/contrib/bind9/lib/dns/rbt.c stable/7/contrib/bind9/lib/dns/rbtdb.c stable/7/contrib/bind9/lib/dns/rdata.c stable/7/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/7/contrib/bind9/lib/dns/rdata/generic/loc_29.c stable/7/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/7/contrib/bind9/lib/dns/rdata/in_1/wks_11.c stable/7/contrib/bind9/lib/dns/rdataset.c stable/7/contrib/bind9/lib/dns/rdataslab.c stable/7/contrib/bind9/lib/dns/request.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/sdb.c stable/7/contrib/bind9/lib/dns/sdlz.c stable/7/contrib/bind9/lib/dns/time.c stable/7/contrib/bind9/lib/dns/validator.c stable/7/contrib/bind9/lib/dns/zone.c stable/7/contrib/bind9/lib/isc/Makefile.in stable/7/contrib/bind9/lib/isc/alpha/include/isc/atomic.h stable/7/contrib/bind9/lib/isc/api stable/7/contrib/bind9/lib/isc/entropy.c stable/7/contrib/bind9/lib/isc/ia64/include/isc/atomic.h stable/7/contrib/bind9/lib/isc/include/isc/entropy.h stable/7/contrib/bind9/lib/isc/include/isc/file.h stable/7/contrib/bind9/lib/isc/include/isc/fsaccess.h stable/7/contrib/bind9/lib/isc/include/isc/hash.h stable/7/contrib/bind9/lib/isc/include/isc/heap.h stable/7/contrib/bind9/lib/isc/include/isc/log.h stable/7/contrib/bind9/lib/isc/include/isc/mem.h stable/7/contrib/bind9/lib/isc/include/isc/netaddr.h stable/7/contrib/bind9/lib/isc/include/isc/netscope.h stable/7/contrib/bind9/lib/isc/include/isc/platform.h.in stable/7/contrib/bind9/lib/isc/include/isc/portset.h stable/7/contrib/bind9/lib/isc/include/isc/random.h stable/7/contrib/bind9/lib/isc/include/isc/ratelimiter.h stable/7/contrib/bind9/lib/isc/include/isc/serial.h stable/7/contrib/bind9/lib/isc/include/isc/sockaddr.h stable/7/contrib/bind9/lib/isc/include/isc/socket.h stable/7/contrib/bind9/lib/isc/include/isc/symtab.h stable/7/contrib/bind9/lib/isc/include/isc/task.h stable/7/contrib/bind9/lib/isc/inet_aton.c stable/7/contrib/bind9/lib/isc/inet_ntop.c stable/7/contrib/bind9/lib/isc/log.c stable/7/contrib/bind9/lib/isc/mem.c stable/7/contrib/bind9/lib/isc/random.c stable/7/contrib/bind9/lib/isc/rwlock.c stable/7/contrib/bind9/lib/isc/sha2.c stable/7/contrib/bind9/lib/isc/timer.c stable/7/contrib/bind9/lib/isc/unix/dir.c stable/7/contrib/bind9/lib/isc/unix/entropy.c stable/7/contrib/bind9/lib/isc/unix/file.c stable/7/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c stable/7/contrib/bind9/lib/isc/unix/ifiter_ioctl.c stable/7/contrib/bind9/lib/isc/unix/include/isc/net.h stable/7/contrib/bind9/lib/isc/unix/include/isc/offset.h stable/7/contrib/bind9/lib/isc/unix/include/isc/strerror.h stable/7/contrib/bind9/lib/isc/unix/include/isc/time.h stable/7/contrib/bind9/lib/isc/unix/resource.c stable/7/contrib/bind9/lib/isc/unix/socket.c stable/7/contrib/bind9/lib/isc/unix/strerror.c stable/7/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h stable/7/contrib/bind9/lib/isccfg/include/isccfg/log.h stable/7/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h stable/7/contrib/bind9/lib/lwres/api stable/7/contrib/bind9/lib/lwres/context.c stable/7/contrib/bind9/lib/lwres/context_p.h stable/7/contrib/bind9/lib/lwres/getaddrinfo.c stable/7/contrib/bind9/lib/lwres/getipnode.c stable/7/contrib/bind9/lib/lwres/include/lwres/context.h stable/7/contrib/bind9/lib/lwres/include/lwres/netdb.h.in stable/7/contrib/bind9/lib/lwres/lwconfig.c stable/7/contrib/bind9/lib/lwres/man/lwres.3 stable/7/contrib/bind9/lib/lwres/man/lwres.html stable/7/contrib/bind9/lib/lwres/man/lwres_buffer.3 stable/7/contrib/bind9/lib/lwres/man/lwres_buffer.html stable/7/contrib/bind9/lib/lwres/man/lwres_config.3 stable/7/contrib/bind9/lib/lwres/man/lwres_config.html stable/7/contrib/bind9/lib/lwres/man/lwres_context.3 stable/7/contrib/bind9/lib/lwres/man/lwres_context.html stable/7/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/7/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/7/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/7/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/7/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/7/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/7/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/7/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/7/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/7/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/7/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/7/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/7/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/7/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/7/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/7/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/7/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/7/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/7/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/7/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/7/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/7/contrib/bind9/lib/lwres/man/lwres_noop.html stable/7/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/7/contrib/bind9/lib/lwres/man/lwres_packet.html stable/7/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/7/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/7/contrib/bind9/libtool.m4 stable/7/contrib/bind9/ltmain.sh stable/7/contrib/bind9/make/rules.in stable/7/contrib/bind9/version stable/7/lib/bind/config.h stable/7/lib/bind/dns/Makefile stable/7/lib/bind/dns/code.h stable/7/lib/bind/dns/dns/enumclass.h stable/7/lib/bind/dns/dns/enumtype.h stable/7/lib/bind/dns/dns/rdatastruct.h stable/7/lib/bind/isc/Makefile stable/7/lib/bind/isc/isc/platform.h stable/7/lib/bind/lwres/lwres/netdb.h Directory Properties: stable/7/contrib/bind9/ (props changed) Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/CHANGES Tue Feb 16 05:14:51 2010 (r203948) @@ -1,28 +1,295 @@ - --- 9.4.3-P4 released --- + --- 9.4-ESV released --- + +2831. [security] Do not attempt to validate or cache + out-of-bailiwick data returned with a secure + answer; it must be re-fetched from its original + source and validated in that context. [RT #20819] + +2828. [security] Cached CNAME or DNAME RR could be returned to clients + without DNSSEC validation. [RT #20737] + +2827. [security] Bogus NXDOMAIN could be cached as if valid. [RT #20712] + +2797. [bug] Don't decrement the dispatch manager's maxbuffers. + [RT #20613] + +2790. [bug] Handle DS queries to stub zones. [RT #20440] 2772. [security] When validating, track whether pending data was from the additional section or not and only return it if validates as secure. [RT #20438] - --- 9.4.3-P3 released --- + --- 9.4-ESVb1 released --- + +2698. [cleanup] configure --enable-libbind is deprecated. [RT #20090] + +2697. [port] win32: ensure that S_IFMT, S_IFDIR, S_IFCHR and + S_IFREG are defined after including . + [RT #20309] + +2690. [bug] win32: fix isc_thread_key_getspecific() prototype. + [RT #20315] + +2689. [bug] Correctly handle snprintf result. [RT #20306] + +2688. [bug] Use INTERFACE_F_POINTTOPOINT, not IFF_POINTOPOINT, + to decide to fetch the destination address. [RT #20305] + +2681. [bug] IPSECKEY RR of gateway type 3 was not correctly + decoded. [RT #20269] + +2672. [bug] Don't enable searching in 'host' when doing reverse + lookups. [RT #20218] + +2525. [experimental] New logging category "query-errors" to provide detailed + internal information about query failures, especially + about server failures. (backported as a special + exception to the general policy) [RT #19027] + +2670. [bug] Unexpected connect failures failed to log enough + information to be useful. [RT #20205] + +2649. [bug] Set the domain for forward only zones. [RT #19944] + +2648. [port] win32: isc_time_seconds() was broken. [RT #19900] + +2646. [bug] Incorrect cleanup on error in socket.c. [RT #19987] + +2642. [bug] nsupdate could dump core on solaris when reading + improperly formatted key files. [RT #20015] 2640. [security] A specially crafted update packet will cause named to exit. [RT #20000] - --- 9.4.3-P2 released --- +2637. [func] Rationalize dnssec-signzone's signwithkey() calling. + [RT #19959] + +2635. [bug] isc_inet_ntop() incorrectly handled 0.0/16 addresses. + [RT #19716] + +2633. [bug] Handle 15 bit rand() functions. [RT #19783] + +2632. [func] util/kit.sh: warn if documentation appears to be out of + date. [RT #19922] + +2623. [bug] Named started seaches for DS non-optimally. [RT #19915] + +2621. [doc] Made copyright boilterplate consistent. [RT #19833] + +2920. [bug] Delay thawing the zone until the reload of it has + completed successfully. [RT #19750] + +2618. [bug] The sdb and sdlz db_interator_seek() methods could + loop infinitely. [RT #19847] + +2617. [bug] ifconfig.sh failed to emit an error message when + run from the wrong location. [RT #19375] + +2616. [bug] 'host' used the nameservers from resolv.conf even + when a explicit nameserver was specified. [RT #19852] + +2615. [bug] "__attribute__((unused))" was in the wrong place + for ia64 gcc builds. [RT #19854] + +2614. [port] win32: 'named -v' should automatically be executed + in the foreground. [RT #19844] + +2610. [port] sunos: Change #2363 was not complete. [RT #19796] + +2606. [bug] "delegation-only" was not being accepted in + delegation-only type zones. [RT #19717] + +2605. [bug] Accept DS responses from delegation only zones. + [RT # 19296] + +2603. [port] win32: handle .exe extension of named-checkzone and + named-comilezone argv[0] names under windows. + [RT #19767] + +2602. [port] win32: fix debugging command line build of libisccfg. + [RT #19767] + +2599. [bug] Address rapid memory growth when validation fails. + [RT #19654] + +2595. [bug] Fix unknown extended rcodes in dig. [RT #19625] + +2592. [bug] Treat "any" as a type in nsupdate. [RT #19455] + +2591. [bug] named could die when processing a update in + removed_orphaned_ds(). [RT #19507] + +2589. [bug] dns_db_unregister() failed to clear '*dbimp'. + [RT #19626] + +2586. [bug] Missing cleanup of SIG rdataset in searching a DLZ DB + or SDB. [RT #19577] + +2584. [bug] alpha: gcc optimization could break atomic operations. + [RT #19227] + +2583. [port] netbsd: provide a control to not add the compile + date to the version string, -DNO_VERSION_DATE. + +2582. [bug] Don't emit warning log message when we attempt to + remove non-existant journal. [RT #19516] + +2581. [contrib] dlz/mysql set MYSQL_OPT_RECONNECT option on connection. + Requires MySQL 5.0.19 or later. [RT #19084] 2579. [bug] DNSSEC lookaside validation failed to handle unknown algorithms. [RT #19479] - --- 9.4.3-P1 released --- +2573. [bug] Replacing a non-CNAME record with a CNAME record in a + single transaction in a signed zone failed. [RT #19397] + +2568. [bug] Report when the write to indicate a otherwise + successful start fails. [RT #19360] + +2567. [bug] dst__privstruct_writefile() could miss write errors. + write_public_key() could miss write errors. + [RT #19360] + +2564. [bug] Only take EDNS fallback steps when processing timeouts. + [RT #19405] + +2563. [bug] Dig could leak a socket causing it to wait forever + to exit. [RT #19359] + +2562. [doc] ARM: miscellaneous improvements, reorganization, + and some new content. + +2561. [doc] Add isc-config.sh(1) man page. [RT #16378] + +2557. [cleanup] PCI compliance: + * new libisc log module file + * isc_dir_chroot() now also changes the working + directory to "/". + * additional INSISTs + * additional logging when files can't be removed. + +2553. [bug] Reference leak on DNSSEC validation errors. [RT #19291] + +2552. [bug] zero-no-soa-ttl-cache was not being honoured. + [RT #19340] + +2551. [bug] Potential Reference leak on return. [RT #19341] + +2550. [bug] Check --with-openssl= finds . + [RT #19343] + +2549. [port] linux: define NR_OPEN if not currently defined. + [RT #19344] + +2547. [bug] openssl_link.c:mem_realloc() could reference an + out-of-range area of the source buffer. New public + function isc_mem_reallocate() was introduced to address + this bug. [RT #19313] + +2545. [doc] ARM: Legal hostname checking (check-names) is + for SRV RDATA too. [RT #19304] + +2544. [cleanup] Removed unused structure members in adb.c. [RT #19225] + +2542. [doc] Update the description of dig +adflag. [RT #19290] + +2539. [security] Update the interaction between recursion, allow-query, + allow-query-cache and allow-recursion. [RT #19198] + +2536. [cleanup] Silence some warnings when -Werror=format-security is + specified. [RT #19083] + +2535. [bug] dig +showsearch and +trace interacted badly. [RT #19091] + +2532. [bug] dig: check the question section of the response to + see if it matches the asked question. [RT #18495] + +2531. [bug] Change #2207 was incomplete. [RT #19098] + +2529. [cleanup] Upgrade libtool to silence complaints from recent + version of autoconf. [RT #18657] + +2528. [cleanup] Silence spurious configure warning about + --datarootdir [RT #19096] + +2527. [bug] named could reuse cache on reload with + enabling/disabling validation. [RT #19119] + +2523. [bug] Random type rdata freed by dns_nsec_typepresent(). + [RT #19112] 2522. [security] Handle -1 from DSA_do_verify(). +2521. [bug] Improve epoll cross compilation support. [RT #19047] + +2519. [bug] dig/host with -4 or -6 didn't work if more than two + nameserver addresses of the excluded address family + preceded in resolv.conf. [RT #19081] + +2517. [bug] dig +trace with -4 or -6 failed when it chose a + nameserver address of the excluded address type. + [RT #18843] + +2516. [bug] glue sort for responses was performed even when not + needed. [RT #19039] + +2514. [bug] dig/host failed with -4 or -6 when resolv.conf contains + a nameserver of the excluded address family. + [RT #18848] + +2511. [cleanup] dns_rdata_tofmttext() add const to linebreak. + [RT #18885] + +2510. [bug] "dig +sigchase" could trigger REQUIRE failures. + [RT #19033] + +2509. [bug] Specifying a fixed query source port was broken. + [RT #19051] + +2506. [port] solaris: Check at configure time if + hack_shutup_pthreadonceinit is needed. [RT #19037] + +2505. [port] Treat amd64 similarly to x86_64 when determining + atomic operation support. [RT #19031] + +2504. [bug] Address race condition in the socket code. [RT #18899] + +2503. [port] linux: improve compatibility with Linux Standard + Base. [RT #18793] + +2500. [contrib] contrib/sdb/pgsql/zonetodb.c called non-existent + function. [RT #18582] + +2499. [port] solaris: lib/lwres/getaddrinfo.c namespace clash. + [RT #18837] + 2498. [bug] Removed a bogus function argument used with ISC_SOCKET_USE_POLLWATCH: it could cause compiler warning or crash named with the debug 1 level of logging. [RT #18917] +2495. [bug] Tighten RRSIG checks. [RT #18795] + +2494. [bug] dns/sdlz.h and dns/dlz.h were not being installed. + [RT #18826] + +2487. [bug] Give TCP connections longer to complete. [RT #18675] + +2485. [bug] Change update's the handling of obscured RRSIG + records. Not all orphand DS records were being + removed. [RT #18828] + +2479. [bug] xfrout:covers was not properly initalized. [RT #18801] + +2478. [bug] 'addresses' could be used uninitalized in + configure_forward(). [RT #18800] + +2476. [doc] ARM: improve documentation for max-journal-size and + ixfr-from-differences. [RT #15909] [RT #18541] + +2400. [bug] Log if kqueue()/epoll_create()/open(/dev/poll) fails. + [RT #18297] + --- 9.4.3 released --- 2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO @@ -38,7 +305,7 @@ 2473. [port] linux: raise the limit on open files to the possible maximum value before spawning threads; 'files' - specified in named.conf doesn't seem to work with + specified in named.conf doesn't seem to work with threads as expected. [RT #18784] 2472. [port] linux: check the number of available cpu's before @@ -61,10 +328,11 @@ 2465. [bug] Adb's handling of lame addresses was different for IPv4 and IPv6. [RT #18738] -2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket API and glibc hides parts of the IPv6 Advanced Socket API as a result. This is stupid as it breaks how the - two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + two halves (Basic and Advanced) of the IPv6 Socket API + were designed to be used but we have to live with it. Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API. [RT #18388] @@ -170,6 +438,10 @@ for select(). To enable this, set ISC_SOCKET_MAXSOCKETS at compilation time. [RT #18433] + Note: with changes #2469 and #2421 above, there is no + need to tweak ISC_SOCKET_MAXSOCKETS at compilation time + any more. + 2410. [bug] Correctly delete m_versionInfo. [RT #18432] 2408. [bug] A duplicate TCP dispatch event could be sent, which @@ -241,7 +513,7 @@ 2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET proofs which, in turn, caused validation failures for insecure zones immediately below a secure zone - the server was authoritative for. [RT #18112] + the server was authoritative for. [RT #18112] 2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant TLDs and supported RRs with TTLs [RT #17972] Modified: stable/7/contrib/bind9/COPYRIGHT ============================================================================== --- stable/7/contrib/bind9/COPYRIGHT Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/COPYRIGHT Tue Feb 16 05:14:51 2010 (r203948) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.9.18.5 2008/01/02 23:46:02 tbox Exp $ +$Id: COPYRIGHT,v 1.9.18.7 2010/01/07 23:46:07 tbox Exp $ Portions Copyright (C) 1996-2001 Nominum, Inc. Modified: stable/7/contrib/bind9/FAQ ============================================================================== --- stable/7/contrib/bind9/FAQ Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/FAQ Tue Feb 16 05:14:51 2010 (r203948) @@ -1,6 +1,6 @@ Frequently Asked Questions about BIND 9 -Copyright © 2004-2008 Internet Systems Consortium, Inc. ("ISC") +Copyright © 2004-2009 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. @@ -153,24 +153,29 @@ A: BIND 9.3 and later: Use TSIG to selec Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -220,13 +225,13 @@ A: You choose one view to be master and Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -600,7 +605,7 @@ Q: Why do queries for NSEC3 records fail A: NSEC3 records are strictly meta data and can only be returned in the authority section. This is done so that signing the zone using NSEC3 - records does not bring names into existance that do not exist in the + records does not bring names into existence that do not exist in the unsigned version of the zone. 5. Operating-System Specific Questions @@ -825,7 +830,6 @@ A: /dev/random is not configured. Use rn use certain interrupts as a source of random events. You can make this permanent by setting rand_irqs in /etc/rc.conf. - /etc/rc.conf rand_irqs="3 14 15" See also . Modified: stable/7/contrib/bind9/FAQ.xml ============================================================================== --- stable/7/contrib/bind9/FAQ.xml Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/FAQ.xml Tue Feb 16 05:14:51 2010 (r203948) @@ -1,7 +1,7 @@ - +
Frequently Asked Questions about BIND 9 @@ -28,6 +28,7 @@ 2006 2007 2008 + 2009 Internet Systems Consortium, Inc. ("ISC") @@ -318,24 +319,29 @@ Slave: 10.0.1.3 (internal), 10.0.1.4 (ex Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -423,13 +429,13 @@ named-checkzone example.com tmp Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -1067,7 +1073,7 @@ empty: NSEC3 records are strictly meta data and can only be returned in the authority section. This is done so that signing the zone using NSEC3 records does not bring names - into existance that do not exist in the unsigned version + into existence that do not exist in the unsigned version of the zone. @@ -1470,7 +1476,6 @@ options { -/etc/rc.conf rand_irqs="3 14 15" Modified: stable/7/contrib/bind9/Makefile.in ============================================================================== --- stable/7/contrib/bind9/Makefile.in Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/Makefile.in Tue Feb 16 05:14:51 2010 (r203948) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.43.18.6 2007/09/03 23:46:21 tbox Exp $ +# $Id: Makefile.in,v 1.43.18.8 2009/02/20 23:46:01 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -24,6 +24,12 @@ top_srcdir = @top_srcdir@ SUBDIRS = make lib bin doc @LIBBIND@ TARGETS = +MANPAGES = isc-config.sh.1 + +HTMLPAGES = isc-config.sh.html + +MANOBJS = ${MANPAGES} ${HTMLPAGES} + @BIND9_MAKE_RULES@ distclean:: @@ -43,12 +49,19 @@ distclean:: maintainer-clean:: rm -f configure +docclean manclean maintainer-clean:: + rm -f ${MANOBJS} + +doc man:: ${MANOBJS} + installdirs: $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \ ${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir} + $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 install:: isc-config.sh installdirs ${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir} + ${INSTALL_DATA} ${srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1 tags: rm -f TAGS Modified: stable/7/contrib/bind9/README ============================================================================== --- stable/7/contrib/bind9/README Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/README Tue Feb 16 05:14:51 2010 (r203948) @@ -27,8 +27,8 @@ BIND 9 - Improved Portability Architecture - BIND version 9 development has been underwritten by the following - organizations: + BIND version 9 development has been under written by the following + organisations: Sun Microsystems, Inc. Hewlett Packard @@ -42,6 +42,16 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. +BIND 9.4-ESV (Extended Support Version) + + BIND 9.4-ESV is the Extended Support Version of BIND 9.4 + and incorporates the final maintenance release fixing bugs + in BIND 9.4.3. + + BIND 9.4-ESV will be supported until December 31, 2010, at + which time you will need to upgrade to the current release + of BIND. + BIND 9.4.3 BIND 9.4.3 is a maintenance release, fixing bugs in 9.4.2. @@ -67,7 +77,7 @@ BIND 9.4.0 Implemented "additional section caching" (or "acache"), an internal cache framework for additional section content to improve response performance. Several configuration options - were provided to control the behavior. + were provided to control the behaviour. New notify type 'master-only'. Enable notify for master zones only. @@ -76,13 +86,14 @@ BIND 9.4.0 rndc now allows addresses to be set in the server clauses. - New option "allow-query-cache". This lets allow-query be - used to specify the default zone access level rather than - having to have every zone override the global value. - allow-query-cache can be set at both the options and view - levels. If allow-query-cache is not set then allow-recursion - is used if set, otherwise allow-query is used if set, otherwise - the default (localhost; localnets;) is used. + New option "allow-query-cache". This lets "allow-query" + be used to specify the default zone access level rather + than having to have every zone override the global value. + "allow-query-cache" can be set at both the options and view + levels. If "allow-query-cache" is not set then "allow-recursion" + is used if set, otherwise "allow-query" is used if set + unless "recursion no;" is set in which case "none;" is used, + otherwise the default (localhost; localnets;) is used. rndc: the source address can now be specified. @@ -150,12 +161,12 @@ BIND 9.4.0 options for dnssec-signzone specify the input and output formats. - dnssec-signzone can now randomize signature end times + dnssec-signzone can now randomise signature end times (dnssec-signzone -j jitter). Add support for CH A record. - Add additional zone data consistancy checks. named-checkzone + Add additional zone data consistency checks. named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. New zone options: check-mx and integrity-check. Modified: stable/7/contrib/bind9/README.idnkit ============================================================================== --- stable/7/contrib/bind9/README.idnkit Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/README.idnkit Tue Feb 16 05:14:51 2010 (r203948) @@ -55,7 +55,7 @@ at least specify `--with-idn' option to `--with-libiconv' assumes that your C compiler has `-R' option, and that the option adds the specified run-time path - to an exacutable binary. If `-R' option of your compiler has + to an executable binary. If `-R' option of your compiler has different meaning, or your compiler lacks the option, you should use `--with-iconv' option instead. Binary command without run-time path information might be unexecutable. @@ -68,7 +68,7 @@ at least specify `--with-idn' option to specified, `--with-iconv' is prior to `--with-libiconv'. --with-iconv=ICONV_LIBSPEC - If your libc doens't provide iconv(), you need to specify the + If your libc doesn't provide iconv(), you need to specify the library containing iconv() with this option. `ICONV_LIBSPEC' is the argument(s) to `cc' or `ld' to link the library, for example, `--with-iconv="-L/usr/local/lib -liconv"'. @@ -82,7 +82,7 @@ at least specify `--with-idn' option to this option is not specified, `-L${PREFIX}/lib -lidnkit' is assumed, where ${PREFIX} is the installation prefix specified with `--with-idn' option above. You may need to use this - option to specify extra argments, for example, + option to specify extra arguments, for example, `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'. Please consult `README' for other configuration options. @@ -109,4 +109,4 @@ about idnkit and this patch. Bug reports and comments on this kit should be sent to mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -; $Id: README.idnkit,v 1.2.2.2 2005/09/12 02:12:08 marka Exp $ +; $Id: README.idnkit,v 1.2.2.3 2009/01/19 00:36:25 marka Exp $ Modified: stable/7/contrib/bind9/acconfig.h ============================================================================== --- stable/7/contrib/bind9/acconfig.h Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/acconfig.h Tue Feb 16 05:14:51 2010 (r203948) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.44.18.5 2005/04/29 00:15:20 marka Exp $ */ +/* $Id: acconfig.h,v 1.44.18.7 2008/12/01 23:45:56 tbox Exp $ */ /*! \file */ @@ -25,9 +25,6 @@ ***/ @TOP@ -/** define to `int' if doesn't define. */ -#undef ssize_t - /** define on DEC OSF to enable 4.4BSD style sa_len support */ #undef _SOCKADDR_LEN @@ -61,9 +58,6 @@ /** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */ #undef HAVE_IFLIST_SYSCTL -/** define if chroot() is available */ -#undef HAVE_CHROOT - /** define if tzset() is available */ #undef HAVE_TZSET @@ -115,7 +109,7 @@ int sigwait(const unsigned int *set, int * The silly continuation line is to keep configure from * commenting out the #undef. */ - + #undef \ va_start #define va_start(ap, last) \ Modified: stable/7/contrib/bind9/bin/check/check-tool.c ============================================================================== --- stable/7/contrib/bind9/bin/check/check-tool.c Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/check-tool.c Tue Feb 16 05:14:51 2010 (r203948) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.c,v 1.10.18.20 2008/10/24 01:43:17 tbox Exp $ */ +/* $Id: check-tool.c,v 1.10.18.23 2009/09/24 21:38:50 jinmei Exp $ */ /*! \file */ @@ -105,6 +105,7 @@ static isc_logcategory_t categories[] = { "queries", 0 }, { "unmatched", 0 }, { "update-security", 0 }, + { "query-errors", 0 }, { NULL, 0 } }; @@ -156,7 +157,7 @@ checkns(dns_zone_t *zone, dns_name_t *na cur->ai_next != NULL) cur = cur->ai_next; if (cur != NULL && cur->ai_canonname != NULL && - strcasecmp(ai->ai_canonname, namebuf) != 0) { + strcasecmp(cur->ai_canonname, namebuf) != 0) { dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' (out of zone) " "is a CNAME (illegal)", Modified: stable/7/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- stable/7/contrib/bind9/bin/check/named-checkconf.8 Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/named-checkconf.8 Tue Feb 16 05:14:51 2010 (r203948) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.16.18.13 2007/06/20 02:26:58 marka Exp $ +.\" $Id: named-checkconf.8,v 1.16.18.14 2009/07/11 01:31:43 tbox Exp $ .\" .hy 0 .ad l Modified: stable/7/contrib/bind9/bin/check/named-checkconf.c ============================================================================== --- stable/7/contrib/bind9/bin/check/named-checkconf.c Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/named-checkconf.c Tue Feb 16 05:14:51 2010 (r203948) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkconf.c,v 1.28.18.16 2007/11/26 23:46:18 tbox Exp $ */ +/* $Id: named-checkconf.c,v 1.28.18.18 2009/02/16 23:46:03 tbox Exp $ */ /*! \file */ @@ -59,9 +59,9 @@ isc_log_t *logc = NULL; /*% usage */ static void usage(void) { - fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] " + fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] " "[named.conf]\n"); - exit(1); + exit(1); } /*% directory callback */ @@ -171,9 +171,9 @@ configure_zone(const char *vclass, const zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name")); classobj = cfg_tuple_get(zconfig, "class"); - if (!cfg_obj_isstring(classobj)) - zclass = vclass; - else + if (!cfg_obj_isstring(classobj)) + zclass = vclass; + else zclass = cfg_obj_asstring(classobj); zoptions = cfg_tuple_get(zconfig, "options"); @@ -192,9 +192,9 @@ configure_zone(const char *vclass, const return (ISC_R_FAILURE); if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) return (ISC_R_SUCCESS); - cfg_map_get(zoptions, "database", &dbobj); - if (dbobj != NULL) - return (ISC_R_SUCCESS); + cfg_map_get(zoptions, "database", &dbobj); + if (dbobj != NULL) + return (ISC_R_SUCCESS); cfg_map_get(zoptions, "file", &fileobj); if (fileobj == NULL) return (ISC_R_FAILURE); @@ -285,8 +285,8 @@ configure_zone(const char *vclass, const } else INSIST(0); } else { - zone_options |= DNS_ZONEOPT_CHECKNAMES; - zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL; + zone_options |= DNS_ZONEOPT_CHECKNAMES; + zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL; } masterformat = dns_masterformat_text; @@ -397,7 +397,7 @@ main(int argc, char **argv) { int exit_status = 0; isc_entropy_t *ectx = NULL; isc_boolean_t load_zones = ISC_FALSE; - + while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) { switch (c) { case 'd': @@ -415,12 +415,6 @@ main(int argc, char **argv) { isc_result_totext(result)); exit(1); } - result = isc_dir_chdir("/"); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "isc_dir_chdir: %s\n", - isc_result_totext(result)); - exit(1); - } break; case 'v': Modified: stable/7/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- stable/7/contrib/bind9/bin/check/named-checkconf.html Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/named-checkconf.html Tue Feb 16 05:14:51 2010 (r203948) @@ -2,7 +2,7 @@ - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - - Permission to use, copy, modify, and distribute this software for any + - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/7/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- stable/7/contrib/bind9/bin/check/named-checkzone.8 Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/named-checkzone.8 Tue Feb 16 05:14:51 2010 (r203948) @@ -1,7 +1,7 @@ -.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.18.18.23 2007/06/20 02:26:58 marka Exp $ +.\" $Id: named-checkzone.8,v 1.18.18.25 2009/07/11 01:31:43 tbox Exp $ .\" .hy 0 .ad l @@ -77,7 +77,7 @@ When loading the zone file read the jour .PP \-c \fIclass\fR .RS 4 -Specify the class of the zone. If not specified "IN" is assumed. +Specify the class of the zone. If not specified, "IN" is assumed. .RE .PP \-i \fImode\fR @@ -263,7 +263,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004\-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br Modified: stable/7/contrib/bind9/bin/check/named-checkzone.c ============================================================================== --- stable/7/contrib/bind9/bin/check/named-checkzone.c Tue Feb 16 02:48:11 2010 (r203947) +++ stable/7/contrib/bind9/bin/check/named-checkzone.c Tue Feb 16 05:14:51 2010 (r203948) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.29.18.21 2008/10/24 01:43:17 tbox Exp $ */ +/* $Id: named-checkzone.c,v 1.29.18.24 2009/05/29 02:19:20 marka Exp $ */ /*! \file */ @@ -122,9 +122,13 @@ main(int argc, char **argv) { */ if (strncmp(prog_name, "lt-", 3) == 0) prog_name += 3; - if (strcmp(prog_name, "named-checkzone") == 0) + +#define PROGCMP(X) \ + (strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0) + + if (PROGCMP("named-checkzone")) progmode = progmode_check; - else if (strcmp(prog_name, "named-compilezone") == 0) + else if (PROGCMP("named-compilezone")) progmode = progmode_compile; else INSIST(0); @@ -265,12 +269,6 @@ main(int argc, char **argv) { isc_result_totext(result)); exit(1); } - result = isc_dir_chdir("/"); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "isc_dir_chdir: %s\n", - isc_result_totext(result)); - exit(1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 06:34:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B6D10656A5; Tue, 16 Feb 2010 06:34:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 304158FC24; Tue, 16 Feb 2010 06:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G6YjSU041022; Tue, 16 Feb 2010 06:34:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G6YjSP041020; Tue, 16 Feb 2010 06:34:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002160634.o1G6YjSP041020@svn.freebsd.org> From: Xin LI Date: Tue, 16 Feb 2010 06:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203949 - stable/8/sys/geom/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 06:34:45 -0000 Author: delphij Date: Tue Feb 16 06:34:44 2010 New Revision: 203949 URL: http://svn.freebsd.org/changeset/base/203949 Log: MFC r203408: Prevent NULL deference by checking return value of gctl_get_asciiparam. Modified: stable/8/sys/geom/virstor/g_virstor.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/8/sys/geom/virstor/g_virstor.c Tue Feb 16 05:14:51 2010 (r203948) +++ stable/8/sys/geom/virstor/g_virstor.c Tue Feb 16 06:34:44 2010 (r203949) @@ -311,6 +311,11 @@ virstor_ctl_add(struct gctl_req *req, st snprintf(aname, sizeof aname, "arg%d", i); prov_name = gctl_get_asciiparam(req, aname); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", aname); + g_topology_unlock(); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); @@ -565,6 +570,10 @@ virstor_ctl_remove(struct gctl_req *req, sprintf(param, "arg%d", i); prov_name = gctl_get_asciiparam(req, param); + if (prov_name == NULL) { + gctl_error(req, "Error fetching argument '%s'", param); + return; + } if (strncmp(prov_name, _PATH_DEV, strlen(_PATH_DEV)) == 0) prov_name += strlen(_PATH_DEV); From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 06:47:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5865B106566B; Tue, 16 Feb 2010 06:47:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E55F8FC08; Tue, 16 Feb 2010 06:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G6l1vX043766; Tue, 16 Feb 2010 06:47:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G6l1uL043765; Tue, 16 Feb 2010 06:47:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002160647.o1G6l1uL043765@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 06:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203950 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 06:47:01 -0000 Author: marcel Date: Tue Feb 16 06:47:00 2010 New Revision: 203950 URL: http://svn.freebsd.org/changeset/base/203950 Log: Unbreak ia64: tls_model("initial-exec") is invalid, because it assumes the static TLS model, which is fundamentally different from the dynamic TLS model. The consequence was data corruption. Limit the attribute to i386 and amd64. Modified: head/lib/libc/stdlib/malloc.c Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Tue Feb 16 06:34:44 2010 (r203949) +++ head/lib/libc/stdlib/malloc.c Tue Feb 16 06:47:00 2010 (r203950) @@ -215,10 +215,12 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 2 # define CPU_SPINWAIT __asm__ volatile("pause") +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __ia64__ # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 3 +# define TLS_MODEL /* default */ #endif #ifdef __alpha__ # define LG_QUANTUM 4 @@ -234,6 +236,7 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 3 # define CPU_SPINWAIT __asm__ volatile("pause") +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __arm__ # define LG_QUANTUM 3 @@ -1090,14 +1093,12 @@ static pthread_mutex_t arenas_lock; /* P * Map of _pthread_self() --> arenas[???], used for selecting an arena to use * for allocations. */ -static __thread arena_t *arenas_map - __attribute__((tls_model("initial-exec"))); +static __thread arena_t *arenas_map TLS_MODEL; #endif #ifdef MALLOC_TCACHE /* Map of thread-specific caches. */ -static __thread tcache_t *tcache_tls - __attribute__((tls_model("initial-exec"))); +static __thread tcache_t *tcache_tls TLS_MODEL; /* * Number of cache slots for each bin in the thread cache, or 0 if tcache is @@ -1115,15 +1116,12 @@ unsigned tcache_gc_incr; * since the state of mmap_unaligned only affects performance, rather than * correct function. */ -static #ifndef NO_TLS - __thread -#endif - bool mmap_unaligned -#ifndef NO_TLS - __attribute__((tls_model("initial-exec"))) +static __thread bool mmap_unaligned TLS_MODEL; +#else +static bool mmap_unaligned; #endif - ; + #ifdef MALLOC_STATS static malloc_mutex_t chunks_mtx; /* Chunk statistics. */ From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 08:19:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 717B6106566C; Tue, 16 Feb 2010 08:19:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 610898FC12; Tue, 16 Feb 2010 08:19:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G8JSVN064042; Tue, 16 Feb 2010 08:19:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G8JSuZ064040; Tue, 16 Feb 2010 08:19:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002160819.o1G8JSuZ064040@svn.freebsd.org> From: Xin LI Date: Tue, 16 Feb 2010 08:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203951 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 08:19:28 -0000 Author: delphij Date: Tue Feb 16 08:19:28 2010 New Revision: 203951 URL: http://svn.freebsd.org/changeset/base/203951 Log: Remove clause 3 from my license. Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Tue Feb 16 06:47:00 2010 (r203950) +++ head/share/man/man5/tmpfs.5 Tue Feb 16 08:19:28 2010 (r203951) @@ -10,8 +10,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission .\" .\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 09:10:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9311106566C; Tue, 16 Feb 2010 09:10:21 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DDE48FC13; Tue, 16 Feb 2010 09:10:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G9ALj6075201; Tue, 16 Feb 2010 09:10:21 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G9ALip075195; Tue, 16 Feb 2010 09:10:21 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002160910.o1G9ALip075195@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 16 Feb 2010 09:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203952 - in head: lib/libarchive share/syscons/keymaps tools/regression/usr.bin/env usr.sbin/cxgbtool usr.sbin/ftp-proxy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 09:10:21 -0000 Author: uqs Date: Tue Feb 16 09:10:21 2010 New Revision: 203952 URL: http://svn.freebsd.org/changeset/base/203952 Log: Add missing newline in last line of file. Uncovered via: fromcvs vs. svn Approved by: ed (co-mentor) Modified: head/lib/libarchive/archive_write_disk.3 head/share/syscons/keymaps/fr.dvorak.acc.kbd head/tools/regression/usr.bin/env/Makefile head/usr.sbin/cxgbtool/Makefile head/usr.sbin/ftp-proxy/Makefile.inc Modified: head/lib/libarchive/archive_write_disk.3 ============================================================================== --- head/lib/libarchive/archive_write_disk.3 Tue Feb 16 08:19:28 2010 (r203951) +++ head/lib/libarchive/archive_write_disk.3 Tue Feb 16 09:10:21 2010 (r203952) @@ -372,4 +372,4 @@ compact implementation when appropriate. There should be a corresponding .Nm archive_read_disk interface that walks a directory heirarchy and returns archive -entry objects. \ No newline at end of file +entry objects. Modified: head/share/syscons/keymaps/fr.dvorak.acc.kbd ============================================================================== --- head/share/syscons/keymaps/fr.dvorak.acc.kbd Tue Feb 16 08:19:28 2010 (r203951) +++ head/share/syscons/keymaps/fr.dvorak.acc.kbd Tue Feb 16 09:10:21 2010 (r203952) @@ -146,4 +146,4 @@ ( 'y' 255 ) ( 'Y' 190 ) dacu '´' ( 'a' 'á' ) ( 'e' 'é' ) ( 'i' 237 ) ( 'o' 'ó') ( 'u' 'ú' ) ( 'A' 'Á' ) ( 'E' 'É' ) ( 'I' 'Í' ) ( 'O' 'Ó' ) ( 'U' 'Ú' ) - ( 'Y' 221 ) ( 'y' 253 ) \ No newline at end of file + ( 'Y' 221 ) ( 'y' 253 ) Modified: head/tools/regression/usr.bin/env/Makefile ============================================================================== --- head/tools/regression/usr.bin/env/Makefile Tue Feb 16 08:19:28 2010 (r203951) +++ head/tools/regression/usr.bin/env/Makefile Tue Feb 16 09:10:21 2010 (r203952) @@ -14,4 +14,4 @@ all: # This will probably need a bit more thought... testenv: @ruby regress-sb.rb --rgdata=${.CURDIR}/regress-env.rgdata \ - --testpgm=${TESTPGM} \ No newline at end of file + --testpgm=${TESTPGM} Modified: head/usr.sbin/cxgbtool/Makefile ============================================================================== --- head/usr.sbin/cxgbtool/Makefile Tue Feb 16 08:19:28 2010 (r203951) +++ head/usr.sbin/cxgbtool/Makefile Tue Feb 16 09:10:21 2010 (r203952) @@ -8,4 +8,4 @@ CFLAGS+= -DCONFIG_T3_REGS -DCHELSIO_INTE install: -.include \ No newline at end of file +.include Modified: head/usr.sbin/ftp-proxy/Makefile.inc ============================================================================== --- head/usr.sbin/ftp-proxy/Makefile.inc Tue Feb 16 08:19:28 2010 (r203951) +++ head/usr.sbin/ftp-proxy/Makefile.inc Tue Feb 16 09:10:21 2010 (r203952) @@ -2,4 +2,4 @@ LIBEVENT= ${.OBJDIR}/../libevent/libevent.a -.include "../Makefile.inc" \ No newline at end of file +.include "../Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 09:10:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2E241065780; Tue, 16 Feb 2010 09:10:48 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C99DF8FC12; Tue, 16 Feb 2010 09:10:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G9AmHF075335; Tue, 16 Feb 2010 09:10:48 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G9Am5Y075333; Tue, 16 Feb 2010 09:10:48 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002160910.o1G9Am5Y075333@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 16 Feb 2010 09:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203953 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 09:10:49 -0000 Author: uqs Date: Tue Feb 16 09:10:48 2010 New Revision: 203953 URL: http://svn.freebsd.org/changeset/base/203953 Log: Document co-mentorship by ed. Approved by: ed (co-mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Feb 16 09:10:21 2010 (r203952) +++ head/share/misc/committers-src.dot Tue Feb 16 09:10:48 2010 (r203953) @@ -264,6 +264,7 @@ dwmalone -> snb ed -> gavin ed -> jilles ed -> rdivacky +ed -> uqs eivind -> des eivind -> rwatson From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 09:30:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BCD41065676; Tue, 16 Feb 2010 09:30:25 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E40E98FC16; Tue, 16 Feb 2010 09:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G9UOM7079648; Tue, 16 Feb 2010 09:30:24 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G9UOFm079639; Tue, 16 Feb 2010 09:30:24 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201002160930.o1G9UOFm079639@svn.freebsd.org> From: Roman Divacky Date: Tue, 16 Feb 2010 09:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203954 - in vendor/llvm/dist: . autoconf autoconf/m4 bindings/ocaml/llvm docs docs/CommandGuide docs/tutorial examples examples/BrainF examples/ExceptionDemo examples/Fibonacci example... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 09:30:25 -0000 Author: rdivacky Date: Tue Feb 16 09:30:23 2010 New Revision: 203954 URL: http://svn.freebsd.org/changeset/base/203954 Log: Update LLVM to r96341. Added: vendor/llvm/dist/examples/ExceptionDemo/ vendor/llvm/dist/examples/ExceptionDemo/CMakeLists.txt vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/examples/ExceptionDemo/Makefile vendor/llvm/dist/include/llvm-c/EnhancedDisassembly.h vendor/llvm/dist/include/llvm/ADT/ImmutableIntervalMap.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/GVMaterializer.h vendor/llvm/dist/include/llvm/MC/MCFixup.h vendor/llvm/dist/include/llvm/Support/MachO.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.h vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PBQP/Graph.h vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicBase.h vendor/llvm/dist/lib/CodeGen/PBQP/Math.h vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/Target/X86/X86FixupKinds.h vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86MCTargetExpr.cpp vendor/llvm/dist/lib/Target/X86/X86MCTargetExpr.h vendor/llvm/dist/lib/VMCore/GVMaterializer.cpp vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count9.ll vendor/llvm/dist/test/Assembler/2010-01-06-UnionType.ll vendor/llvm/dist/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll vendor/llvm/dist/test/Bitcode/flags.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-12-saveCR.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll vendor/llvm/dist/test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll vendor/llvm/dist/test/CodeGen/X86/2007-02-23-DAGCombine-Miscompile.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-03-DualUndef.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-04-SchedulerBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-15-ImplicitDefBug.ll vendor/llvm/dist/test/CodeGen/X86/SwitchLowering.ll vendor/llvm/dist/test/CodeGen/X86/add.ll vendor/llvm/dist/test/CodeGen/X86/codegen-dce.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse-trunc.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse.ll vendor/llvm/dist/test/CodeGen/X86/phi-immediate-factoring.ll vendor/llvm/dist/test/CodeGen/X86/sext-i1.ll vendor/llvm/dist/test/CodeGen/X86/stdcall.ll vendor/llvm/dist/test/CodeGen/X86/switch-crit-edge-constant.ll vendor/llvm/dist/test/CodeGen/X86/tailcall2.ll vendor/llvm/dist/test/CodeGen/X86/vsplit-and.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-2.ll vendor/llvm/dist/test/CodeGen/X86/zext-trunc.ll vendor/llvm/dist/test/DebugInfo/2010-01-18-DbgValue.ll vendor/llvm/dist/test/DebugInfo/2010-02-01-DbgValueCrash.ll vendor/llvm/dist/test/Feature/unions.ll vendor/llvm/dist/test/FrontendC++/2010-02-08-NamespaceVar.cpp vendor/llvm/dist/test/FrontendC/2010-02-10-PointerName.c vendor/llvm/dist/test/FrontendObjC/2010-02-01-utf16-with-null.m vendor/llvm/dist/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit_cat.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-new-encoder.s vendor/llvm/dist/test/MC/MachO/Darwin/ vendor/llvm/dist/test/MC/MachO/Darwin/dg.exp vendor/llvm/dist/test/MC/MachO/Darwin/x86_32_diff_as.s vendor/llvm/dist/test/MC/MachO/section-flags.s vendor/llvm/dist/test/Other/constant-fold-gep.ll vendor/llvm/dist/test/Transforms/ConstantMerge/dont-merge.ll vendor/llvm/dist/test/Transforms/GVN/load-pre-align.ll vendor/llvm/dist/test/Transforms/InstCombine/2010-01-28-NegativeSRem.ll vendor/llvm/dist/test/Transforms/InstCombine/load-select.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/JumpThreading/or-undef.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/crash.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/MagicPointer.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/strcpy_chk.ll vendor/llvm/dist/tools/edis/ vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/edis/EDDisassembler.h vendor/llvm/dist/tools/edis/EDInst.cpp vendor/llvm/dist/tools/edis/EDInst.h vendor/llvm/dist/tools/edis/EDMain.cpp vendor/llvm/dist/tools/edis/EDOperand.cpp vendor/llvm/dist/tools/edis/EDOperand.h vendor/llvm/dist/tools/edis/EDToken.cpp vendor/llvm/dist/tools/edis/EDToken.h vendor/llvm/dist/tools/edis/EnhancedDisassembly.exports vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/unittests/ExecutionEngine/JIT/MultiJITTest.cpp vendor/llvm/dist/unittests/VMCore/VerifierTest.cpp vendor/llvm/dist/utils/TableGen/AsmWriterInst.cpp vendor/llvm/dist/utils/TableGen/AsmWriterInst.h vendor/llvm/dist/utils/TableGen/DAGISelMatcher.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.h Deleted: vendor/llvm/dist/include/llvm/CodeGen/FileWriters.h vendor/llvm/dist/include/llvm/ModuleProvider.h vendor/llvm/dist/include/llvm/Target/TargetMachOWriterInfo.h vendor/llvm/dist/lib/CodeGen/MachOWriter.cpp vendor/llvm/dist/lib/CodeGen/MachOWriter.h vendor/llvm/dist/lib/CodeGen/PBQP/AnnotatedGraph.h vendor/llvm/dist/lib/CodeGen/PBQP/ExhaustiveSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/GraphBase.h vendor/llvm/dist/lib/CodeGen/PBQP/PBQPMath.h vendor/llvm/dist/lib/CodeGen/PBQP/SimpleGraph.h vendor/llvm/dist/lib/CodeGen/PBQP/Solver.h vendor/llvm/dist/lib/Target/PowerPC/PPCMachOWriterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMachOWriterInfo.h vendor/llvm/dist/lib/Target/TargetMachOWriterInfo.cpp vendor/llvm/dist/lib/VMCore/ModuleProvider.cpp vendor/llvm/dist/test/CodeGen/ARM/remat-2.ll vendor/llvm/dist/test/CodeGen/Generic/2006-04-11-vecload.ll vendor/llvm/dist/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll vendor/llvm/dist/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll vendor/llvm/dist/test/CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll vendor/llvm/dist/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll vendor/llvm/dist/test/CodeGen/Generic/2007-04-27-BitTestsBadMask.ll vendor/llvm/dist/test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.ll vendor/llvm/dist/test/CodeGen/Generic/SwitchLowering.ll vendor/llvm/dist/test/CodeGen/Generic/addc-fold2.ll vendor/llvm/dist/test/CodeGen/Generic/phi-immediate-factoring.ll vendor/llvm/dist/test/CodeGen/Generic/switch-crit-edge-constant.ll vendor/llvm/dist/test/CodeGen/Generic/switch-lower-feature-2.ll vendor/llvm/dist/test/CodeGen/X86/2007-11-30-TestLoadFolding.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-07-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/add-trick32.ll vendor/llvm/dist/test/CodeGen/X86/add-trick64.ll vendor/llvm/dist/test/CodeGen/X86/add-with-overflow.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-delete.ll vendor/llvm/dist/test/Transforms/CondProp/ vendor/llvm/dist/test/Transforms/ConstantMerge/2006-03-07-DontMergeDiffSections.ll vendor/llvm/dist/test/Transforms/InstCombine/2007-03-27-PR1280.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll vendor/llvm/dist/test/Transforms/PredicateSimplifier/ vendor/llvm/dist/test/Transforms/RaiseAllocations/ vendor/llvm/dist/tools/llvm-mc/AsmCond.h vendor/llvm/dist/tools/llvm-mc/AsmLexer.cpp vendor/llvm/dist/tools/llvm-mc/AsmLexer.h vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp vendor/llvm/dist/tools/llvm-mc/AsmParser.h vendor/llvm/dist/tools/llvm-mc/HexDisassembler.cpp vendor/llvm/dist/tools/llvm-mc/HexDisassembler.h Modified: vendor/llvm/dist/Makefile.rules vendor/llvm/dist/README.txt vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/autoconf/m4/path_tclsh.m4 vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/configure vendor/llvm/dist/docs/CommandGuide/lit.pod vendor/llvm/dist/docs/CommandGuide/llvm-extract.pod vendor/llvm/dist/docs/ExceptionHandling.html vendor/llvm/dist/docs/GettingStarted.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/WritingAnLLVMBackend.html vendor/llvm/dist/docs/index.html vendor/llvm/dist/docs/tutorial/LangImpl1.html vendor/llvm/dist/docs/tutorial/LangImpl2.html vendor/llvm/dist/docs/tutorial/LangImpl3.html vendor/llvm/dist/docs/tutorial/LangImpl4.html vendor/llvm/dist/docs/tutorial/LangImpl5.html vendor/llvm/dist/docs/tutorial/LangImpl6.html vendor/llvm/dist/docs/tutorial/LangImpl7.html vendor/llvm/dist/docs/tutorial/LangImpl8.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl1.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl2.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl3.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl4.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl5.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp vendor/llvm/dist/examples/CMakeLists.txt vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter4/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter4/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter5/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter5/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter6/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter7/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp vendor/llvm/dist/examples/Makefile vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/DenseSet.h vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/ConstantFolding.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/MemoryBuiltins.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Assembly/AsmAnnotationWriter.h vendor/llvm/dist/include/llvm/Attributes.h vendor/llvm/dist/include/llvm/Bitcode/Archive.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/Bitcode/ReaderWriter.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/DAGISelHeader.h vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineJumpTableInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfoImpls.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineRelocation.h vendor/llvm/dist/include/llvm/CodeGen/ObjectCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Constant.h vendor/llvm/dist/include/llvm/Constants.h vendor/llvm/dist/include/llvm/DerivedTypes.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/GlobalValue.h vendor/llvm/dist/include/llvm/InlineAsm.h vendor/llvm/dist/include/llvm/InstrTypes.h vendor/llvm/dist/include/llvm/Instruction.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/Intrinsics.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/Linker.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCCodeEmitter.h vendor/llvm/dist/include/llvm/MC/MCDirectives.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassManager.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/ConstantFolder.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/FormattedStream.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/IRReader.h vendor/llvm/dist/include/llvm/Support/NoFolder.h vendor/llvm/dist/include/llvm/Support/PatternMatch.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/TargetFolder.h vendor/llvm/dist/include/llvm/Support/TypeBuilder.h vendor/llvm/dist/include/llvm/System/DynamicLibrary.h vendor/llvm/dist/include/llvm/System/Path.h vendor/llvm/dist/include/llvm/System/Program.h vendor/llvm/dist/include/llvm/Target/Mangler.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmLexer.h vendor/llvm/dist/include/llvm/Target/TargetData.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Transforms/IPO/InlinerPass.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/include/llvm/ValueSymbolTable.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/IPA/Makefile vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LiveValues.cpp vendor/llvm/dist/lib/Analysis/Makefile vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Archive/Archive.cpp vendor/llvm/dist/lib/Archive/ArchiveInternals.h vendor/llvm/dist/lib/Archive/ArchiveReader.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/Archive/Makefile vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/LLToken.h vendor/llvm/dist/lib/AsmParser/Makefile vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h vendor/llvm/dist/lib/Bitcode/Reader/Makefile vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/Makefile vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/Makefile vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/LowerSubregs.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfoImpls.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/Makefile vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/Heuristics/Briggs.h vendor/llvm/dist/lib/CodeGen/PBQP/Solution.h vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.h vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/Makefile vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/StrongPHIElimination.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CompilerDriver/CompilationGraph.cpp vendor/llvm/dist/lib/CompilerDriver/Makefile vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngineBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.h vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Makefile vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/Makefile vendor/llvm/dist/lib/ExecutionEngine/JIT/TargetSelect.cpp vendor/llvm/dist/lib/ExecutionEngine/Makefile vendor/llvm/dist/lib/Linker/LinkArchives.cpp vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/Linker/Makefile vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCCodeEmitter.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInstPrinter.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/Makefile vendor/llvm/dist/lib/MC/Makefile vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/ConstantRange.cpp vendor/llvm/dist/lib/Support/FileUtilities.cpp vendor/llvm/dist/lib/Support/FormattedStream.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/Makefile vendor/llvm/dist/lib/System/Unix/Program.inc vendor/llvm/dist/lib/System/Unix/Signals.inc vendor/llvm/dist/lib/System/Win32/Program.inc vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.h vendor/llvm/dist/lib/Target/ARM/AsmParser/Makefile vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/TargetInfo/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/Alpha.h vendor/llvm/dist/lib/Target/Alpha/AlphaCodeEmitter.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.h vendor/llvm/dist/lib/Target/Alpha/AlphaMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.h vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Alpha/Makefile vendor/llvm/dist/lib/Target/Alpha/TargetInfo/Makefile vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/Makefile vendor/llvm/dist/lib/Target/Blackfin/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CBackend/Makefile vendor/llvm/dist/lib/Target/CBackend/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/Makefile vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.h vendor/llvm/dist/lib/Target/CellSPU/SPUMCAsmInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/CppBackend/Makefile vendor/llvm/dist/lib/Target/CppBackend/TargetInfo/Makefile vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSIL/Makefile vendor/llvm/dist/lib/Target/MSIL/TargetInfo/Makefile vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430MCAsmInfo.cpp vendor/llvm/dist/lib/Target/MSP430/Makefile vendor/llvm/dist/lib/Target/MSP430/TargetInfo/Makefile vendor/llvm/dist/lib/Target/Makefile vendor/llvm/dist/lib/Target/Mips/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/Makefile vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h vendor/llvm/dist/lib/Target/Mips/TargetInfo/Makefile vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PIC16/Makefile vendor/llvm/dist/lib/Target/PIC16/PIC16.h vendor/llvm/dist/lib/Target/PIC16/PIC16ABINames.h vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h vendor/llvm/dist/lib/Target/PIC16/PIC16MCAsmInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16MemSelOpt.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/Makefile vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.h vendor/llvm/dist/lib/Target/PIC16/TargetInfo/Makefile vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/Makefile vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.td vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCHazardRecognizers.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/README.txt vendor/llvm/dist/lib/Target/PowerPC/TargetInfo/Makefile vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/Makefile vendor/llvm/dist/lib/Target/Sparc/Sparc.h vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcSubtarget.cpp vendor/llvm/dist/lib/Target/Sparc/SparcSubtarget.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.h vendor/llvm/dist/lib/Target/Sparc/TargetInfo/Makefile vendor/llvm/dist/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp vendor/llvm/dist/lib/Target/SubtargetFeature.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/SystemZ/Makefile vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.h vendor/llvm/dist/lib/Target/SystemZ/TargetInfo/Makefile vendor/llvm/dist/lib/Target/TargetAsmLexer.cpp vendor/llvm/dist/lib/Target/TargetData.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/TargetRegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/Makefile vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmLexer.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.h vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/Makefile vendor/llvm/dist/lib/Target/X86/Makefile vendor/llvm/dist/lib/Target/X86/README-SSE.txt vendor/llvm/dist/lib/Target/X86/README-UNIMPLEMENTED.txt vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/TargetInfo/Makefile vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.cpp vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.h vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPointRegKill.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.h vendor/llvm/dist/lib/Target/X86/X86MachineFunctionInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/XCore/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/Makefile vendor/llvm/dist/lib/Target/XCore/TargetInfo/Makefile vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetObjectFile.h vendor/llvm/dist/lib/Transforms/Hello/Makefile vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/ConstantMerge.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadTypeElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Makefile vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineVectorOps.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/InstCombine/Makefile vendor/llvm/dist/lib/Transforms/Instrumentation/Makefile vendor/llvm/dist/lib/Transforms/Instrumentation/ProfilingUtils.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/Makefile vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/Makefile vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/Attributes.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/ConstantFold.h vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/ConstantsContext.h vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Globals.cpp vendor/llvm/dist/lib/VMCore/IRBuilder.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Makefile vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/TypesContext.h vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/ValueTypes.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/projects/CMakeLists.txt vendor/llvm/dist/projects/sample/autoconf/configure.ac vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/alias.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/siv-strong.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/siv-weak-crossing.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/siv-weak-zero.ll vendor/llvm/dist/test/Analysis/LoopDependenceAnalysis/ziv.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-02-15-UMax.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-29-SGTTripCount.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-08-04-IVOverflow.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-15-CubicOOM.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-11-SMaxOverflow.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/and-xor.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/avoid-infinite-recursion-0.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/avoid-smax-0.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/div-overflow.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/do-loop.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/max-trip-count.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw-offset.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/pointer-sign-bits.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-inreg.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-0.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/smax.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count3.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count4.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count5.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count6.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count7.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count8.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/xor-and.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/zext-wrap.ll vendor/llvm/dist/test/Archive/MacOSX.a vendor/llvm/dist/test/Archive/MacOSX.toc vendor/llvm/dist/test/Assembler/functionlocal-metadata.ll vendor/llvm/dist/test/CodeGen/ARM/2009-10-30.ll vendor/llvm/dist/test/CodeGen/ARM/aliases.ll vendor/llvm/dist/test/CodeGen/ARM/align.ll vendor/llvm/dist/test/CodeGen/ARM/arm-negative-stride.ll vendor/llvm/dist/test/CodeGen/ARM/iabs.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-code-insertion.ll vendor/llvm/dist/test/CodeGen/ARM/remat.ll vendor/llvm/dist/test/CodeGen/ARM/unaligned_load_store.ll vendor/llvm/dist/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll vendor/llvm/dist/test/CodeGen/Generic/2007-05-05-Personality.ll vendor/llvm/dist/test/CodeGen/Generic/fpowi-promote.ll vendor/llvm/dist/test/CodeGen/Generic/switch-lower-feature.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/PowerPC/align.ll vendor/llvm/dist/test/CodeGen/SPARC/ctpop.ll vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll vendor/llvm/dist/test/CodeGen/Thumb2/lsr-deficiency.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt1.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-spill-q.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-11-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll vendor/llvm/dist/test/CodeGen/X86/2007-10-05-3AddrConvert.ll vendor/llvm/dist/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll vendor/llvm/dist/test/CodeGen/X86/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/X86/2008-07-11-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll vendor/llvm/dist/test/CodeGen/X86/2009-09-07-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll vendor/llvm/dist/test/CodeGen/X86/addr-label-difference.ll vendor/llvm/dist/test/CodeGen/X86/aliases.ll vendor/llvm/dist/test/CodeGen/X86/aligned-comm.ll vendor/llvm/dist/test/CodeGen/X86/call-push.ll vendor/llvm/dist/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll vendor/llvm/dist/test/CodeGen/X86/fastcall-correct-mangling.ll vendor/llvm/dist/test/CodeGen/X86/full-lsr.ll vendor/llvm/dist/test/CodeGen/X86/ins_subreg_coalesce-3.ll vendor/llvm/dist/test/CodeGen/X86/iv-users-in-other-loops.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce-2.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce-3.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce8.ll vendor/llvm/dist/test/CodeGen/X86/masked-iv-safe.ll vendor/llvm/dist/test/CodeGen/X86/nancvt.ll vendor/llvm/dist/test/CodeGen/X86/personality.ll vendor/llvm/dist/test/CodeGen/X86/phys-reg-local-regalloc.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pr1505b.ll vendor/llvm/dist/test/CodeGen/X86/pr3495.ll vendor/llvm/dist/test/CodeGen/X86/pre-split8.ll vendor/llvm/dist/test/CodeGen/X86/pre-split9.ll vendor/llvm/dist/test/CodeGen/X86/ptrtoint-constexpr.ll vendor/llvm/dist/test/CodeGen/X86/scalar_widen_div.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/stack-color-with-reg.ll vendor/llvm/dist/test/CodeGen/X86/tailcall1.ll vendor/llvm/dist/test/CodeGen/X86/tailcallfp2.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-coalesce.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-1.ll vendor/llvm/dist/test/CodeGen/XCore/ashr.ll vendor/llvm/dist/test/Feature/alignment.ll vendor/llvm/dist/test/FrontendC++/2006-11-06-StackTrace.cpp vendor/llvm/dist/test/FrontendC++/2006-11-30-Pubnames.cpp vendor/llvm/dist/test/FrontendC/2003-12-14-ExternInlineSupport.c vendor/llvm/dist/test/FrontendC/2007-02-16-WritableStrings.c vendor/llvm/dist/test/FrontendC/2009-02-17-BitField-dbg.c vendor/llvm/dist/test/FrontendC/2010-01-13-MemBarrier.c vendor/llvm/dist/test/LLVMC/MultiplePluginPriorities.td vendor/llvm/dist/test/MC/AsmParser/X86/dg.exp vendor/llvm/dist/test/MC/AsmParser/X86/x86_instructions.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_operands.s vendor/llvm/dist/test/MC/AsmParser/conditional_asm.s vendor/llvm/dist/test/MC/AsmParser/directive_file.s vendor/llvm/dist/test/MC/AsmParser/exprs.s vendor/llvm/dist/test/MC/AsmParser/labels.s vendor/llvm/dist/test/MC/Disassembler/simple-tests.txt vendor/llvm/dist/test/Other/2007-06-05-PassID.ll vendor/llvm/dist/test/Other/2007-06-28-PassManager.ll vendor/llvm/dist/test/Transforms/ConstProp/basictest.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/crash.ll vendor/llvm/dist/test/Transforms/GVN/crash.ll vendor/llvm/dist/test/Transforms/GVN/rle-nonlocal.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/addrec-gep.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/shrunk-constant.ll vendor/llvm/dist/test/Transforms/InstCombine/and2.ll vendor/llvm/dist/test/Transforms/InstCombine/call.ll vendor/llvm/dist/test/Transforms/InstCombine/crash.ll vendor/llvm/dist/test/Transforms/InstCombine/getelementptr.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll vendor/llvm/dist/test/Transforms/InstCombine/or.ll vendor/llvm/dist/test/Transforms/InstCombine/signext.ll vendor/llvm/dist/test/Transforms/InstCombine/sub.ll vendor/llvm/dist/test/Transforms/InstCombine/vector-casts.ll vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2008-08-06-CmpStride.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/count-to-zero.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/invariant_value_first.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/ops_after_indvar.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr3086.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/remove_indvar.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo.ll vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll vendor/llvm/dist/test/lib/llvm.exp vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/ExtractFunction.cpp vendor/llvm/dist/tools/gold/Makefile vendor/llvm/dist/tools/llc/Makefile vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/Makefile vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-ar/Makefile vendor/llvm/dist/tools/llvm-as/Makefile vendor/llvm/dist/tools/llvm-config/Makefile vendor/llvm/dist/tools/llvm-config/find-cycles.pl vendor/llvm/dist/tools/llvm-dis/Makefile vendor/llvm/dist/tools/llvm-extract/Makefile vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-ld/Makefile vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-link/Makefile vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Makefile vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/Makefile vendor/llvm/dist/tools/llvm-prof/Makefile vendor/llvm/dist/tools/llvmc/Makefile vendor/llvm/dist/tools/llvmc/example/mcc16/driver/Main.cpp vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/opt/Makefile vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/APFloatTest.cpp vendor/llvm/dist/unittests/ADT/BitVectorTest.cpp vendor/llvm/dist/unittests/ADT/Makefile vendor/llvm/dist/unittests/ADT/SmallBitVectorTest.cpp vendor/llvm/dist/unittests/ADT/StringMapTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp vendor/llvm/dist/unittests/Makefile.unittest vendor/llvm/dist/unittests/Support/TypeBuilderTest.cpp vendor/llvm/dist/unittests/VMCore/DerivedTypesTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/GenLibDeps.pl vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.h vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/UpdateCMakeLists.pl vendor/llvm/dist/utils/lit/lit/ShUtil.py vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/lit/lit/Util.py vendor/llvm/dist/utils/llvm.grm vendor/llvm/dist/utils/unittest/UnitTestMain/Makefile vendor/llvm/dist/utils/unittest/googletest/Makefile vendor/llvm/dist/utils/vim/llvm.vim Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Tue Feb 16 09:10:48 2010 (r203953) +++ vendor/llvm/dist/Makefile.rules Tue Feb 16 09:30:23 2010 (r203954) @@ -365,9 +365,18 @@ endif # CXX.Flags += -fvisibility-inlines-hidden #endif +ifdef ENABLE_EXPENSIVE_CHECKS + # GNU libstdc++ uses RTTI if you define _GLIBCXX_DEBUG, which we did above. + # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40160 + REQUIRES_RTTI := 1 +endif + # IF REQUIRES_EH=1 is specified then don't disable exceptions ifndef REQUIRES_EH CXX.Flags += -fno-exceptions +else + # If the library requires EH, it also requires RTTI. + REQUIRES_RTTI := 1 endif ifdef REQUIRES_FRAME_POINTER @@ -377,9 +386,9 @@ ifdef REQUIRES_FRAME_POINTER endif # If REQUIRES_RTTI=1 is specified then don't disable run-time type id. -ifeq ($(REQUIRES_RTTI), 1) - CXX.Flags := $(filter-out -fno-rtti,$(CXX.Flags)) - CXXFLAGS := $(filter-out -fno-rtti,$(CXXFLAGS)) +ifneq ($(REQUIRES_RTTI), 1) + CXX.Flags += -fno-rtti + CXXFLAGS += -fno-rtti endif ifdef ENABLE_COVERAGE @@ -468,13 +477,6 @@ ifeq ($(ARCH),Alpha) LD.Flags += -Wl,--no-relax endif -ifdef ENABLE_EXPENSIVE_CHECKS - # GNU libstdc++ uses RTTI if you define _GLIBCXX_DEBUG, which we did above. - # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40160 - CXX.Flags := $(filter-out -fno-rtti,$(CXX.Flags)) - CXXFLAGS := $(filter-out -fno-rtti,$(CXXFLAGS)) -endif - #-------------------------------------------------------------------- # Directory locations #-------------------------------------------------------------------- @@ -1572,6 +1574,11 @@ $(ObjDir)/%GenDisassemblerTables.inc.tmp $(Echo) "Building $( llcontext = "llvm_create_context" -external dispose_context : unit -> llcontext = "llvm_dispose_context" +external dispose_context : llcontext -> unit = "llvm_dispose_context" external global_context : unit -> llcontext = "llvm_global_context" (*===-- Modules -----------------------------------------------------------===*) Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Tue Feb 16 09:10:48 2010 (r203953) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Tue Feb 16 09:30:23 2010 (r203954) @@ -143,6 +143,7 @@ module Attribute : sig | Noredzone | Noimplicitfloat | Naked + | Inlinehint end (** The predicate for an integer comparison ([icmp]) instruction. @@ -214,7 +215,7 @@ external create_context : unit -> llcont (** [destroy_context ()] destroys a context. See the destructor [llvm::LLVMContext::~LLVMContext]. *) -external dispose_context : unit -> llcontext = "llvm_dispose_context" +external dispose_context : llcontext -> unit = "llvm_dispose_context" (** See the function [llvm::getGlobalContext]. *) external global_context : unit -> llcontext = "llvm_global_context" @@ -1419,13 +1420,13 @@ external build_aggregate_ret : llvalue a = "llvm_build_aggregate_ret" (** [build_br bb b] creates a - [b %bb] + [br %bb] instruction at the position specified by the instruction builder [b]. See the method [llvm::LLVMBuilder::CreateBr]. *) external build_br : llbasicblock -> llbuilder -> llvalue = "llvm_build_br" (** [build_cond_br cond tbb fbb b] creates a - [b %cond, %tbb, %fbb] + [br %cond, %tbb, %fbb] instruction at the position specified by the instruction builder [b]. See the method [llvm::LLVMBuilder::CreateCondBr]. *) external build_cond_br : llvalue -> llbasicblock -> llbasicblock -> llbuilder -> @@ -1475,7 +1476,7 @@ external build_unreachable : llbuilder - external build_add : llvalue -> llvalue -> string -> llbuilder -> llvalue = "llvm_build_add" -(** [build_nswadd x y name b] creates a +(** [build_nsw_add x y name b] creates a [%name = nsw add %x, %y] instruction at the position specified by the instruction builder [b]. See the method [llvm::LLVMBuilder::CreateNSWAdd]. *) Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Tue Feb 16 09:10:48 2010 (r203953) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Tue Feb 16 09:30:23 2010 (r203954) @@ -1031,8 +1031,8 @@ CAMLprim LLVMValueRef llvm_build_switch( return LLVMBuildSwitch(Builder_val(B), Of, Else, Int_val(EstimatedCount)); } -CAMLprim value llvm_add_case(LLVMValueRef Switch, - LLVMValueRef OnVal, +/* llvalue -> llvalue -> llbasicblock -> unit */ +CAMLprim value llvm_add_case(LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest) { LLVMAddCase(Switch, OnVal, Dest); return Val_unit; @@ -1263,11 +1263,10 @@ CAMLprim LLVMValueRef llvm_build_in_boun /* llvalue -> int -> string -> llbuilder -> llvalue */ CAMLprim LLVMValueRef llvm_build_struct_gep(LLVMValueRef Pointer, - value Indices, value Name, + value Index, value Name, value B) { - return LLVMBuildInBoundsGEP(Builder_val(B), Pointer, - (LLVMValueRef *) Op_val(Indices), - Wosize_val(Indices), String_val(Name)); + return LLVMBuildStructGEP(Builder_val(B), Pointer, + Int_val(Index), String_val(Name)); } /* string -> string -> llbuilder -> llvalue */ Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Tue Feb 16 09:10:48 2010 (r203953) +++ vendor/llvm/dist/configure Tue Feb 16 09:30:23 2010 (r203954) @@ -538,160 +538,6 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - exec 7<&0 &1 # Name of the host. @@ -867,6 +713,7 @@ FIND MKDIR MV RANLIB +AR RM SED TAR @@ -903,14 +750,6 @@ INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL -ECHO -AR -STRIP -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL LLVMGCCCOMMAND LLVMGXXCOMMAND LLVMGCC @@ -921,7 +760,6 @@ USE_UDIS86 USE_OPROFILE HAVE_PTHREAD HUGE_VAL_SANITY -ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS @@ -960,10 +798,7 @@ CPPFLAGS CPP CXX CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' +CCC' ac_subdirs_all='projects/sample projects/privbracket projects/llvm-stacker @@ -1575,20 +1410,12 @@ Optional Features: %a (default is YES) --enable-bindings Build specific language bindings: all,auto,none,{binding-name} (default=auto) - --enable-libffi Check for the presence of libffi (default is YES) + --enable-libffi Check for the presence of libffi (default is NO) --enable-llvmc-dynamic Link LLVMC dynamically (default is NO, unless on Win32) --enable-llvmc-dynamic-plugins Enable dynamic LLVMC plugins (default is YES) --enable-ltdl-install install libltdl - --enable-shared[=PKGS] build shared libraries - [default=yes] - --enable-static[=PKGS] build static libraries - [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation - [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1615,10 +1442,6 @@ Optional Packages: --with-binutils-include Specify path to binutils/include/ containing plugin-api.h file for gold plugin. --with-tclinclude directory where tcl headers are - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] include additional configurations [automatic] --with-udis86= Use udis86 external x86 disassembler library --with-oprofile= Tell OProfile >= 0.9.4 how to symbolize JIT output @@ -1633,9 +1456,6 @@ Some influential environment variables: CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -5383,18 +5203,17 @@ fi # Check whether --enable-libffi was given. if test "${enable_libffi+set}" = set; then - enableval=$enable_libffi; + enableval=$enable_libffi; case "$enableval" in + yes) llvm_cv_enable_libffi="yes" ;; + no) llvm_cv_enable_libffi="no" ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; + esac else - enableval=yes + llvm_cv_enable_libffi=no fi -case "$enableval" in - yes) llvm_cv_enable_libffi="yes" ;; - no) llvm_cv_enable_libffi="no" ;; - *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&5 -echo "$as_me: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&2;} - { (exit 1); exit 1; }; } ;; -esac if test "$llvm_cv_os_type" = "Win32" ; then llvmc_dynamic="yes" @@ -7164,6 +6983,102 @@ else RANLIB="$ac_cv_prog_RANLIB" fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -8238,6 +8153,8 @@ echo "$as_me: error: ${with_tclinclude} { (exit 1); exit 1; }; } fi fi +fi + if test x"${ac_cv_path_tclsh}" = x ; then { echo "$as_me:$LINENO: result: none" >&5 @@ -8299,8 +8216,6 @@ echo "${ECHO_T}${ac_cv_path_tclsh}" >&6; fi -fi - # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -11120,7 +11035,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then + # Extract the first word of "$LLVMGCC", so it can be a program name with args. +set dummy $LLVMGCC; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_LLVMGCC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $LLVMGCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_LLVMGCC="$LLVMGCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LLVMGCC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done done +done +IFS=$as_save_IFS + ;; +esac fi - -SED=$lt_cv_path_SED -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +LLVMGCC=$ac_cv_path_LLVMGCC +if test -n "$LLVMGCC"; then + { echo "$as_me:$LINENO: result: $LLVMGCC" >&5 +echo "${ECHO_T}$LLVMGCC" >&6; } else - with_gnu_ld=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then + + # Extract the first word of "$LLVMGXX", so it can be a program name with args. +set dummy $LLVMGXX; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_LLVMGXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r $compiler_flags -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 09:31:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C4B106568B; Tue, 16 Feb 2010 09:31:37 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90C9A8FC19; Tue, 16 Feb 2010 09:31:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G9VbtG079956; Tue, 16 Feb 2010 09:31:37 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G9Vb1h079950; Tue, 16 Feb 2010 09:31:37 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201002160931.o1G9Vb1h079950@svn.freebsd.org> From: Roman Divacky Date: Tue, 16 Feb 2010 09:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203955 - in vendor/clang/dist: bindings bindings/python bindings/python/clang bindings/python/examples bindings/python/examples/cindex bindings/python/tests bindings/python/tests/cinde... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 09:31:37 -0000 Author: rdivacky Date: Tue Feb 16 09:31:36 2010 New Revision: 203955 URL: http://svn.freebsd.org/changeset/base/203955 Log: Update clang to r96341. Added: vendor/clang/dist/bindings/ vendor/clang/dist/bindings/python/ vendor/clang/dist/bindings/python/README.txt vendor/clang/dist/bindings/python/clang/ vendor/clang/dist/bindings/python/clang/__init__.py vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/bindings/python/examples/ vendor/clang/dist/bindings/python/examples/cindex/ vendor/clang/dist/bindings/python/examples/cindex/cindex-dump.py vendor/clang/dist/bindings/python/examples/cindex/cindex-includes.py vendor/clang/dist/bindings/python/tests/ vendor/clang/dist/bindings/python/tests/__init__.py vendor/clang/dist/bindings/python/tests/cindex/ vendor/clang/dist/bindings/python/tests/cindex/INPUTS/ vendor/clang/dist/bindings/python/tests/cindex/INPUTS/header1.h vendor/clang/dist/bindings/python/tests/cindex/INPUTS/header2.h vendor/clang/dist/bindings/python/tests/cindex/INPUTS/header3.h vendor/clang/dist/bindings/python/tests/cindex/INPUTS/hello.cpp vendor/clang/dist/bindings/python/tests/cindex/INPUTS/include.cpp vendor/clang/dist/bindings/python/tests/cindex/INPUTS/parse_arguments.c vendor/clang/dist/bindings/python/tests/cindex/__init__.py vendor/clang/dist/bindings/python/tests/cindex/test_cursor.py vendor/clang/dist/bindings/python/tests/cindex/test_cursor_kind.py vendor/clang/dist/bindings/python/tests/cindex/test_diagnostics.py vendor/clang/dist/bindings/python/tests/cindex/test_index.py vendor/clang/dist/bindings/python/tests/cindex/test_translation_unit.py vendor/clang/dist/include/clang/AST/ASTImporter.h vendor/clang/dist/include/clang/Analysis/Analyses/PrintfFormatString.h vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Basic/Linkage.h vendor/clang/dist/include/clang/Checker/ vendor/clang/dist/include/clang/Checker/BugReporter/ vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/BugReporter/BugType.h vendor/clang/dist/include/clang/Checker/BugReporter/PathDiagnostic.h vendor/clang/dist/include/clang/Checker/Checkers/ vendor/clang/dist/include/clang/Checker/Checkers/DereferenceChecker.h vendor/clang/dist/include/clang/Checker/Checkers/LocalCheckers.h vendor/clang/dist/include/clang/Checker/DomainSpecific/ vendor/clang/dist/include/clang/Checker/DomainSpecific/CocoaConventions.h vendor/clang/dist/include/clang/Checker/ManagerRegistry.h vendor/clang/dist/include/clang/Checker/PathSensitive/ vendor/clang/dist/include/clang/Checker/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/Checker/PathSensitive/Checker.h vendor/clang/dist/include/clang/Checker/PathSensitive/CheckerVisitor.def vendor/clang/dist/include/clang/Checker/PathSensitive/CheckerVisitor.h vendor/clang/dist/include/clang/Checker/PathSensitive/ConstraintManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/Environment.h vendor/clang/dist/include/clang/Checker/PathSensitive/ExplodedGraph.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRAuditor.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRBlockCounter.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngineBuilders.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSimpleAPICheck.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRState.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRStateTrait.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRTransferFuncs.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRWorkList.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/SVals.h vendor/clang/dist/include/clang/Checker/PathSensitive/SValuator.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/SummaryManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/ValueManager.h vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Checker/ vendor/clang/dist/lib/Checker/AdjustedReturnValueChecker.cpp vendor/clang/dist/lib/Checker/ArrayBoundChecker.cpp vendor/clang/dist/lib/Checker/AttrNonNullChecker.cpp vendor/clang/dist/lib/Checker/BasicConstraintManager.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.h vendor/clang/dist/lib/Checker/BasicStore.cpp vendor/clang/dist/lib/Checker/BasicValueFactory.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BugReporterVisitors.cpp vendor/clang/dist/lib/Checker/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CallAndMessageChecker.cpp vendor/clang/dist/lib/Checker/CallInliner.cpp vendor/clang/dist/lib/Checker/CastToStructChecker.cpp vendor/clang/dist/lib/Checker/CheckDeadStores.cpp vendor/clang/dist/lib/Checker/CheckObjCDealloc.cpp vendor/clang/dist/lib/Checker/CheckObjCInstMethSignature.cpp vendor/clang/dist/lib/Checker/CheckObjCUnusedIVars.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/CheckSizeofPointer.cpp vendor/clang/dist/lib/Checker/Checker.cpp vendor/clang/dist/lib/Checker/CocoaConventions.cpp vendor/clang/dist/lib/Checker/DereferenceChecker.cpp vendor/clang/dist/lib/Checker/DivZeroChecker.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/ExplodedGraph.cpp vendor/clang/dist/lib/Checker/FixedAddressChecker.cpp vendor/clang/dist/lib/Checker/FlatStore.cpp vendor/clang/dist/lib/Checker/GRBlockCounter.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.cpp vendor/clang/dist/lib/Checker/GRExprEngineExperimentalChecks.h vendor/clang/dist/lib/Checker/GRExprEngineInternalChecks.h vendor/clang/dist/lib/Checker/GRState.cpp vendor/clang/dist/lib/Checker/LLVMConventionsChecker.cpp vendor/clang/dist/lib/Checker/Makefile vendor/clang/dist/lib/Checker/MallocChecker.cpp vendor/clang/dist/lib/Checker/ManagerRegistry.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/Checker/NSErrorChecker.cpp vendor/clang/dist/lib/Checker/NoReturnFunctionChecker.cpp vendor/clang/dist/lib/Checker/OSAtomicChecker.cpp vendor/clang/dist/lib/Checker/PathDiagnostic.cpp vendor/clang/dist/lib/Checker/PointerArithChecker.cpp vendor/clang/dist/lib/Checker/PointerSubChecker.cpp vendor/clang/dist/lib/Checker/PthreadLockChecker.cpp vendor/clang/dist/lib/Checker/RangeConstraintManager.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Checker/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Checker/ReturnUndefChecker.cpp vendor/clang/dist/lib/Checker/SVals.cpp vendor/clang/dist/lib/Checker/SValuator.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.cpp vendor/clang/dist/lib/Checker/SimpleConstraintManager.h vendor/clang/dist/lib/Checker/SimpleSValuator.cpp vendor/clang/dist/lib/Checker/Store.cpp vendor/clang/dist/lib/Checker/SymbolManager.cpp vendor/clang/dist/lib/Checker/UndefBranchChecker.cpp vendor/clang/dist/lib/Checker/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/Checker/UndefResultChecker.cpp vendor/clang/dist/lib/Checker/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/Checker/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Checker/VLASizeChecker.cpp vendor/clang/dist/lib/Checker/ValueManager.cpp vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/test/ASTMerge/ vendor/clang/dist/test/ASTMerge/Inputs/ vendor/clang/dist/test/ASTMerge/Inputs/enum1.c vendor/clang/dist/test/ASTMerge/Inputs/enum2.c vendor/clang/dist/test/ASTMerge/Inputs/function1.c vendor/clang/dist/test/ASTMerge/Inputs/function2.c vendor/clang/dist/test/ASTMerge/Inputs/interface1.m vendor/clang/dist/test/ASTMerge/Inputs/interface2.m vendor/clang/dist/test/ASTMerge/Inputs/lit.local.cfg vendor/clang/dist/test/ASTMerge/Inputs/struct1.c vendor/clang/dist/test/ASTMerge/Inputs/struct2.c vendor/clang/dist/test/ASTMerge/Inputs/typedef1.c vendor/clang/dist/test/ASTMerge/Inputs/typedef2.c vendor/clang/dist/test/ASTMerge/Inputs/var1.c vendor/clang/dist/test/ASTMerge/Inputs/var1.h vendor/clang/dist/test/ASTMerge/Inputs/var2.c vendor/clang/dist/test/ASTMerge/enum.c vendor/clang/dist/test/ASTMerge/function.c vendor/clang/dist/test/ASTMerge/interface.m vendor/clang/dist/test/ASTMerge/struct.c vendor/clang/dist/test/ASTMerge/typedef.c vendor/clang/dist/test/ASTMerge/var.c vendor/clang/dist/test/Analysis/misc-ps-flat-store.c vendor/clang/dist/test/CXX/basic/basic.def.odr/p1-var.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/class.access/p6.cpp vendor/clang/dist/test/CXX/conv/conv.mem/p4.cpp vendor/clang/dist/test/CXX/conv/conv.qual/pr6089.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.enum/p5.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.link/p7.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/p6.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.name/p1.cpp vendor/clang/dist/test/CXX/lex/lex.literal/lex.ccon/p1.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp vendor/clang/dist/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp vendor/clang/dist/test/CXX/temp/temp.names/p4.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p1.cpp vendor/clang/dist/test/CodeGen/2010-02-09-DbgSelf.m vendor/clang/dist/test/CodeGen/2010-02-15-Dbg-MethodStart.m vendor/clang/dist/test/CodeGen/debug-info-crash.c vendor/clang/dist/test/CodeGenCXX/alloca-align.cpp vendor/clang/dist/test/CodeGenCXX/internal-linkage.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointer-calls.cpp vendor/clang/dist/test/CodeGenCXX/member-initializers.cpp vendor/clang/dist/test/CodeGenCXX/no-exceptions.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/threadsafe-statics.cpp vendor/clang/dist/test/CodeGenCXX/visibility.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/CodeGenCXX/vtable-pointer-initialization.cpp vendor/clang/dist/test/CodeGenCXX/x86_32-arguments.cpp vendor/clang/dist/test/CodeGenObjC/blocks-4.m vendor/clang/dist/test/CodeGenObjC/debug-info-crash.m vendor/clang/dist/test/CodeGenObjC/objc2-legacy-dispatch.m vendor/clang/dist/test/CodeGenObjC/objc2-weak-block-call.m vendor/clang/dist/test/CodeGenObjC/unwind-fn.m vendor/clang/dist/test/Driver/darwin-iphone-defaults.m vendor/clang/dist/test/Driver/rewrite-objc.m vendor/clang/dist/test/FixIt/typo-crash.m vendor/clang/dist/test/Index/annotate-tokens.c vendor/clang/dist/test/Index/cindex-test-inclusions.c vendor/clang/dist/test/Index/code-complete-errors.c vendor/clang/dist/test/Index/include_test.h vendor/clang/dist/test/Index/include_test_2.h vendor/clang/dist/test/Index/load-stmts.cpp vendor/clang/dist/test/Parser/altivec.c vendor/clang/dist/test/Parser/cxx-altivec.cpp vendor/clang/dist/test/Preprocessor/mi_opt2.c vendor/clang/dist/test/Preprocessor/mi_opt2.h vendor/clang/dist/test/Rewriter/blockcast3.mm vendor/clang/dist/test/Rewriter/rewrite-block-pointer.mm vendor/clang/dist/test/Rewriter/rewrite-cast-ivar-access.mm vendor/clang/dist/test/Rewriter/rewrite-category-property.mm vendor/clang/dist/test/Rewriter/rewrite-implementation.mm vendor/clang/dist/test/Rewriter/rewrite-message-expr.mm vendor/clang/dist/test/Rewriter/rewrite-nested-ivar.mm vendor/clang/dist/test/Rewriter/rewrite-protocol-qualified.mm vendor/clang/dist/test/Rewriter/rewrite-unique-block-api.mm vendor/clang/dist/test/Sema/Inputs/ vendor/clang/dist/test/Sema/Inputs/conversion.h vendor/clang/dist/test/Sema/arm-layout.c vendor/clang/dist/test/Sema/warn-unused-function.c vendor/clang/dist/test/Sema/x86-attr-force-align-arg-pointer.c vendor/clang/dist/test/SemaCXX/Inputs/ vendor/clang/dist/test/SemaCXX/Inputs/lit.local.cfg vendor/clang/dist/test/SemaCXX/Inputs/malloc.h vendor/clang/dist/test/SemaCXX/builtin-exception-spec.cpp vendor/clang/dist/test/SemaCXX/comma.cpp vendor/clang/dist/test/SemaCXX/explicit.cpp vendor/clang/dist/test/SemaCXX/new-delete-predefined-decl.cpp vendor/clang/dist/test/SemaCXX/templated-friend-decl.cpp vendor/clang/dist/test/SemaCXX/warn-missing-noreturn.cpp vendor/clang/dist/test/SemaCXX/warn-weak-vtables.cpp vendor/clang/dist/test/SemaObjC/default-synthesize.m vendor/clang/dist/test/SemaObjC/duplicate-property-class-extension.m vendor/clang/dist/test/SemaObjC/protocol-warn.m vendor/clang/dist/test/SemaObjCXX/reinterpret-cast-objc-pointertype.mm vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.h vendor/clang/dist/tools/CIndex/CIndexInclusionStack.cpp vendor/clang/dist/tools/CIndex/CXSourceLocation.h vendor/clang/dist/tools/scan-build/set-xcode-analyzer (contents, props changed) vendor/clang/dist/www/analyzer/dev_cxx.html vendor/clang/dist/www/analyzer/images/analyzer_html.png (contents, props changed) vendor/clang/dist/www/analyzer/images/analyzer_xcode.png (contents, props changed) vendor/clang/dist/www/analyzer/images/tree/ vendor/clang/dist/www/analyzer/images/tree/bullet.gif (contents, props changed) vendor/clang/dist/www/analyzer/images/tree/minus.gif (contents, props changed) vendor/clang/dist/www/analyzer/images/tree/plus.gif (contents, props changed) vendor/clang/dist/www/analyzer/menu.js vendor/clang/dist/www/analyzer/scripts/ vendor/clang/dist/www/analyzer/scripts/dbtree.js vendor/clang/dist/www/analyzer/scripts/menu.js Deleted: vendor/clang/dist/include/clang/Analysis/LocalCheckers.h vendor/clang/dist/include/clang/Analysis/ManagerRegistry.h vendor/clang/dist/include/clang/Analysis/PathDiagnostic.h vendor/clang/dist/include/clang/Analysis/PathSensitive/ vendor/clang/dist/lib/Analysis/ArrayBoundChecker.cpp vendor/clang/dist/lib/Analysis/AttrNonNullChecker.cpp vendor/clang/dist/lib/Analysis/BasicConstraintManager.cpp vendor/clang/dist/lib/Analysis/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Analysis/BasicObjCFoundationChecks.h vendor/clang/dist/lib/Analysis/BasicStore.cpp vendor/clang/dist/lib/Analysis/BasicValueFactory.cpp vendor/clang/dist/lib/Analysis/BugReporter.cpp vendor/clang/dist/lib/Analysis/BugReporterVisitors.cpp vendor/clang/dist/lib/Analysis/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CallAndMessageChecker.cpp vendor/clang/dist/lib/Analysis/CallInliner.cpp vendor/clang/dist/lib/Analysis/CastToStructChecker.cpp vendor/clang/dist/lib/Analysis/CheckDeadStores.cpp vendor/clang/dist/lib/Analysis/CheckObjCDealloc.cpp vendor/clang/dist/lib/Analysis/CheckObjCInstMethSignature.cpp vendor/clang/dist/lib/Analysis/CheckObjCUnusedIVars.cpp vendor/clang/dist/lib/Analysis/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Analysis/CheckSizeofPointer.cpp vendor/clang/dist/lib/Analysis/Checker.cpp vendor/clang/dist/lib/Analysis/DereferenceChecker.cpp vendor/clang/dist/lib/Analysis/DivZeroChecker.cpp vendor/clang/dist/lib/Analysis/Environment.cpp vendor/clang/dist/lib/Analysis/ExplodedGraph.cpp vendor/clang/dist/lib/Analysis/FixedAddressChecker.cpp vendor/clang/dist/lib/Analysis/GRBlockCounter.cpp vendor/clang/dist/lib/Analysis/GRCoreEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngineExperimentalChecks.cpp vendor/clang/dist/lib/Analysis/GRExprEngineExperimentalChecks.h vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.h vendor/clang/dist/lib/Analysis/GRState.cpp vendor/clang/dist/lib/Analysis/MallocChecker.cpp vendor/clang/dist/lib/Analysis/ManagerRegistry.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/Analysis/NSErrorChecker.cpp vendor/clang/dist/lib/Analysis/NoReturnFunctionChecker.cpp vendor/clang/dist/lib/Analysis/OSAtomicChecker.cpp vendor/clang/dist/lib/Analysis/PathDiagnostic.cpp vendor/clang/dist/lib/Analysis/PointerArithChecker.cpp vendor/clang/dist/lib/Analysis/PointerSubChecker.cpp vendor/clang/dist/lib/Analysis/PthreadLockChecker.cpp vendor/clang/dist/lib/Analysis/RangeConstraintManager.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Analysis/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Analysis/ReturnUndefChecker.cpp vendor/clang/dist/lib/Analysis/SVals.cpp vendor/clang/dist/lib/Analysis/SValuator.cpp vendor/clang/dist/lib/Analysis/SimpleConstraintManager.cpp vendor/clang/dist/lib/Analysis/SimpleConstraintManager.h vendor/clang/dist/lib/Analysis/SimpleSValuator.cpp vendor/clang/dist/lib/Analysis/Store.cpp vendor/clang/dist/lib/Analysis/SymbolManager.cpp vendor/clang/dist/lib/Analysis/UndefBranchChecker.cpp vendor/clang/dist/lib/Analysis/UndefResultChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/Analysis/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/Analysis/VLASizeChecker.cpp vendor/clang/dist/lib/Analysis/ValueManager.cpp vendor/clang/dist/test/CodeGenCXX/PR4890-debug-info-dtor.cpp vendor/clang/dist/test/CodeGenCXX/member-pointer-cast.cpp vendor/clang/dist/test/CodeGenCXX/member-pointers-zero-init.cpp vendor/clang/dist/test/CodeGenObjC/PR4541.m vendor/clang/dist/test/CodeGenObjC/PR4894-recursive-debug-crash.m Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/examples/PrintFunctionNames/Makefile vendor/clang/dist/examples/wpa/Makefile vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTDiagnostic.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtCXX.h vendor/clang/dist/include/clang/AST/StmtNodes.def vendor/clang/dist/include/clang/AST/StmtVisitor.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeNodes.def vendor/clang/dist/include/clang/AST/UnresolvedSet.h vendor/clang/dist/include/clang/Analysis/Analyses/UninitializedValues.h vendor/clang/dist/include/clang/Analysis/Support/Optional.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/Version.h vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/Tool.h vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.def vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/Analyses.def vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/AttrImpl.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/Makefile vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/Makefile vendor/clang/dist/lib/Analysis/UninitializedValues.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/Makefile vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.h vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/GlobalDecl.h vendor/clang/dist/lib/CodeGen/Makefile vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/Makefile vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/Backend.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/Makefile vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PlistDiagnostics.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Index/Makefile vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/Makefile vendor/clang/dist/lib/Lex/PPCaching.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/Makefile vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/Makefile vendor/clang/dist/lib/Sema/IdentifierResolver.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Makefile vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TargetAttributesSema.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/CFDateGC.m vendor/clang/dist/test/Analysis/CFNumber.c vendor/clang/dist/test/Analysis/CFRetainRelease_NSAssertionHandler.m vendor/clang/dist/test/Analysis/CGColorSpace.c vendor/clang/dist/test/Analysis/CheckNSError.m vendor/clang/dist/test/Analysis/MissingDealloc.m vendor/clang/dist/test/Analysis/NSPanel.m vendor/clang/dist/test/Analysis/NSString.m vendor/clang/dist/test/Analysis/NSWindow.m vendor/clang/dist/test/Analysis/NoReturn.m vendor/clang/dist/test/Analysis/ObjCProperties.m vendor/clang/dist/test/Analysis/ObjCRetSigs.m vendor/clang/dist/test/Analysis/PR2599.m vendor/clang/dist/test/Analysis/PR2978.m vendor/clang/dist/test/Analysis/PR3991.m vendor/clang/dist/test/Analysis/array-struct.c vendor/clang/dist/test/Analysis/blocks.m vendor/clang/dist/test/Analysis/casts.c vendor/clang/dist/test/Analysis/casts.m vendor/clang/dist/test/Analysis/cfref_PR2519.c vendor/clang/dist/test/Analysis/cfref_rdar6080742.c vendor/clang/dist/test/Analysis/complex.c vendor/clang/dist/test/Analysis/concrete-address.c vendor/clang/dist/test/Analysis/conditional-op-missing-lhs.c vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/dead-stores.cpp vendor/clang/dist/test/Analysis/dead-stores.m vendor/clang/dist/test/Analysis/delegates.m vendor/clang/dist/test/Analysis/elementtype.c vendor/clang/dist/test/Analysis/exercise-ps.c vendor/clang/dist/test/Analysis/fields.c vendor/clang/dist/test/Analysis/func.c vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/misc-ps-64.m vendor/clang/dist/test/Analysis/misc-ps-basic-store.m vendor/clang/dist/test/Analysis/misc-ps-eager-assume.m vendor/clang/dist/test/Analysis/misc-ps-ranges.m vendor/clang/dist/test/Analysis/misc-ps-region-store-i386.m vendor/clang/dist/test/Analysis/misc-ps-region-store-x86_64.m vendor/clang/dist/test/Analysis/misc-ps-region-store.cpp vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps-region-store.mm vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m vendor/clang/dist/test/Analysis/no-exit-cfg.c vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps-region.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/override-werror.c vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/pr4209.m vendor/clang/dist/test/Analysis/pr_2542_rdar_6793404.m vendor/clang/dist/test/Analysis/pr_4164.c vendor/clang/dist/test/Analysis/ptr-arith.c vendor/clang/dist/test/Analysis/rdar-6442306-1.m vendor/clang/dist/test/Analysis/rdar-6540084.m vendor/clang/dist/test/Analysis/rdar-6541136-region.c vendor/clang/dist/test/Analysis/rdar-6541136.c vendor/clang/dist/test/Analysis/rdar-6562655.m vendor/clang/dist/test/Analysis/rdar-6582778-basic-store.c vendor/clang/dist/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m vendor/clang/dist/test/Analysis/rdar-7168531.m vendor/clang/dist/test/Analysis/refcnt_naming.m vendor/clang/dist/test/Analysis/reference.cpp vendor/clang/dist/test/Analysis/region-1.m vendor/clang/dist/test/Analysis/retain-release-basic-store.m vendor/clang/dist/test/Analysis/retain-release-gc-only.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/security-syntax-checks-no-emit.c vendor/clang/dist/test/Analysis/security-syntax-checks.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/Analysis/uninit-msg-expr.m vendor/clang/dist/test/Analysis/uninit-ps-rdar6145427.m vendor/clang/dist/test/Analysis/uninit-vals-ps-region.c vendor/clang/dist/test/Analysis/uninit-vals-ps.c vendor/clang/dist/test/Analysis/uninit-vals.m vendor/clang/dist/test/Analysis/unions-region.m vendor/clang/dist/test/Analysis/unused-ivars.m vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p1.cpp vendor/clang/dist/test/CXX/class/class.local/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp vendor/clang/dist/test/CXX/expr/p8.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.mem/p5.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp vendor/clang/dist/test/CodeGen/address-space-field1.c vendor/clang/dist/test/CodeGen/arm-arguments.c vendor/clang/dist/test/CodeGen/attributes.c vendor/clang/dist/test/CodeGen/darwin-string-literals.c vendor/clang/dist/test/CodeGen/enum.c vendor/clang/dist/test/CodeGen/function-attributes.c vendor/clang/dist/test/CodeGen/stdcall-fastcall.c vendor/clang/dist/test/CodeGen/union.c vendor/clang/dist/test/CodeGenCXX/anonymous-namespaces.cpp vendor/clang/dist/test/CodeGenCXX/attr.cpp vendor/clang/dist/test/CodeGenCXX/condition.cpp vendor/clang/dist/test/CodeGenCXX/conditional-temporaries.cpp vendor/clang/dist/test/CodeGenCXX/const-global-linkage.cpp vendor/clang/dist/test/CodeGenCXX/const-init.cpp vendor/clang/dist/test/CodeGenCXX/conversion-function.cpp vendor/clang/dist/test/CodeGenCXX/debug-info.cpp vendor/clang/dist/test/CodeGenCXX/default-destructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/deferred-global-init.cpp vendor/clang/dist/test/CodeGenCXX/derived-to-base.cpp vendor/clang/dist/test/CodeGenCXX/dyncast.cpp vendor/clang/dist/test/CodeGenCXX/extern-c.cpp vendor/clang/dist/test/CodeGenCXX/global-init.cpp vendor/clang/dist/test/CodeGenCXX/global-llvm-constant.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/reference-init.cpp vendor/clang/dist/test/CodeGenCXX/references.cpp vendor/clang/dist/test/CodeGenCXX/static-data-member.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/temp-order.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/throw-expressions.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/virtual-bases.cpp vendor/clang/dist/test/CodeGenCXX/virtual-function-calls.cpp vendor/clang/dist/test/CodeGenObjC/id-isa-codegen.m vendor/clang/dist/test/CodeGenObjC/image-info.m vendor/clang/dist/test/Coverage/html-diagnostics.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/darwin-version.c vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/TestClassForwardDecl.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/c-index-getCursor-test.m vendor/clang/dist/test/Index/cindex-from-source.m vendor/clang/dist/test/Index/load-exprs.c vendor/clang/dist/test/Index/remap-cursor-at.c vendor/clang/dist/test/Index/remap-load.c vendor/clang/dist/test/Misc/caret-diags-macros.c vendor/clang/dist/test/PCH/cxx_exprs.cpp vendor/clang/dist/test/PCH/cxx_exprs.h vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/test/Parser/cxx-template-decl.cpp vendor/clang/dist/test/Parser/declarators.c vendor/clang/dist/test/Parser/objc-property-syntax.m vendor/clang/dist/test/Parser/statements.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Rewriter/rewrite-byref-vars.mm vendor/clang/dist/test/Rewriter/rewrite-typeof.mm vendor/clang/dist/test/Sema/asm.c vendor/clang/dist/test/Sema/attr-mode.c vendor/clang/dist/test/Sema/attr-noreturn.c vendor/clang/dist/test/Sema/block-args.c vendor/clang/dist/test/Sema/block-printf-attribute-1.c vendor/clang/dist/test/Sema/block-return.c vendor/clang/dist/test/Sema/builtin-unary-fp.c vendor/clang/dist/test/Sema/callingconv.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/conversion.c vendor/clang/dist/test/Sema/declspec.c vendor/clang/dist/test/Sema/enum.c vendor/clang/dist/test/Sema/format-string-percentm.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/function-redecl.c vendor/clang/dist/test/Sema/incomplete-decl.c vendor/clang/dist/test/Sema/indirect-goto.c vendor/clang/dist/test/Sema/return-noreturn.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/scope-check.c vendor/clang/dist/test/Sema/statements.c vendor/clang/dist/test/Sema/stdcall-fastcall.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/Sema/ucn-cstring.c vendor/clang/dist/test/Sema/unused-expr.c vendor/clang/dist/test/Sema/vla.c vendor/clang/dist/test/SemaCXX/access-base-class.cpp vendor/clang/dist/test/SemaCXX/access-control-check.cpp vendor/clang/dist/test/SemaCXX/aggregate-initialization.cpp vendor/clang/dist/test/SemaCXX/builtins.cpp vendor/clang/dist/test/SemaCXX/cast-conversion.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/copy-assignment.cpp vendor/clang/dist/test/SemaCXX/dcl_ambig_res.cpp vendor/clang/dist/test/SemaCXX/dcl_init_aggr.cpp vendor/clang/dist/test/SemaCXX/decl-init-ref.cpp vendor/clang/dist/test/SemaCXX/enum.cpp vendor/clang/dist/test/SemaCXX/i-c-e-cxx.cpp vendor/clang/dist/test/SemaCXX/illegal-member-initialization.cpp vendor/clang/dist/test/SemaCXX/namespace-alias.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/overload-call-copycon.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overload-member-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator-decl.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/references.cpp vendor/clang/dist/test/SemaCXX/reinterpret-cast.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/using-decl-1.cpp vendor/clang/dist/test/SemaCXX/virtual-override.cpp vendor/clang/dist/test/SemaCXX/warn-unused-variables.cpp vendor/clang/dist/test/SemaObjC/cocoa.m vendor/clang/dist/test/SemaObjC/exprs.m vendor/clang/dist/test/SemaObjC/format-strings-objc.m vendor/clang/dist/test/SemaObjC/method-arg-decay.m vendor/clang/dist/test/SemaObjC/property-13.m vendor/clang/dist/test/SemaObjC/property-not-lvalue.m vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp vendor/clang/dist/test/SemaTemplate/instantiate-decl-init.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref-ice.cpp vendor/clang/dist/test/SemaTemplate/instantiate-declref.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-local-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-initializers.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/member-function-template.cpp vendor/clang/dist/test/SemaTemplate/qualified-id.cpp vendor/clang/dist/test/SemaTemplate/recursive-template-instantiation.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/test/SemaTemplate/temp_class_spec.cpp vendor/clang/dist/test/SemaTemplate/template-id-expr.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier-4.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CIndexer.cpp vendor/clang/dist/tools/CIndex/CIndexer.h vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/CIndex/CXCursor.cpp vendor/clang/dist/tools/CIndex/CXCursor.h vendor/clang/dist/tools/CIndex/Makefile vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/utils/ABITest/ABITestGen.py vendor/clang/dist/utils/ABITest/TypeGen.py vendor/clang/dist/www/analyzer/annotations.html vendor/clang/dist/www/analyzer/available_checks.html vendor/clang/dist/www/analyzer/content.css vendor/clang/dist/www/analyzer/filing_bugs.html vendor/clang/dist/www/analyzer/index.html vendor/clang/dist/www/analyzer/installation.html vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/analyzer/menu.css vendor/clang/dist/www/analyzer/menu.html.incl vendor/clang/dist/www/analyzer/scan-build.html vendor/clang/dist/www/comparison.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/diagnostics.html vendor/clang/dist/www/index.html Added: vendor/clang/dist/bindings/python/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/README.txt Tue Feb 16 09:31:36 2010 (r203955) @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// Clang Python Bindings +//===----------------------------------------------------------------------===// + +This directory implements Python bindings for Clang. Currently, only bindings +for the CIndex C API exist. + +You may need to alter LD_LIBRARY_PATH so that the CIndex library can be +found. The unit tests are designed to be run with 'nosetests'. For example: +-- +$ env PYTHONPATH=$(echo ~/llvm/tools/clang/bindings/python/) \ + LD_LIBRARY_PATH=$(llvm-config --libdir) \ + nosetests -v +tests.cindex.test_index.test_create ... ok +... + +OK +-- Added: vendor/clang/dist/bindings/python/clang/__init__.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/clang/__init__.py Tue Feb 16 09:31:36 2010 (r203955) @@ -0,0 +1,24 @@ +#===- __init__.py - Clang Python Bindings --------------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +r""" +Clang Library Bindings +====================== + +This package provides access to the Clang compiler and libraries. + +The available modules are: + + cindex + + Bindings for the Clang indexing library. +""" + +__all__ = ['cindex'] + Added: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/clang/cindex.py Tue Feb 16 09:31:36 2010 (r203955) @@ -0,0 +1,933 @@ +#===- cindex.py - Python Indexing Library Bindings -----------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +r""" +Clang Indexing Library Bindings +=============================== + +This module provides an interface to the Clang indexing library. It is a +low-level interface to the indexing library which attempts to match the Clang +API directly while also being "pythonic". Notable differences from the C API +are: + + * string results are returned as Python strings, not CXString objects. + + * null cursors are translated to None. + + * access to child cursors is done via iteration, not visitation. + +The major indexing objects are: + + Index + + The top-level object which manages some global library state. + + TranslationUnit + + High-level object encapsulating the AST for a single translation unit. These + can be loaded from .ast files or parsed on the fly. + + Cursor + + Generic object for representing a node in the AST. + + SourceRange, SourceLocation, and File + + Objects representing information about the input source. + +Most object information is exposed using properties, when the underlying API +call is efficient. +""" + +# TODO +# ==== +# +# o API support for invalid translation units. Currently we can't even get the +# diagnostics on failure because they refer to locations in an object that +# will have been invalidated. +# +# o fix memory management issues (currently client must hold on to index and +# translation unit, or risk crashes). +# +# o expose code completion APIs. +# +# o cleanup ctypes wrapping, would be nice to separate the ctypes details more +# clearly, and hide from the external interface (i.e., help(cindex)). +# +# o implement additional SourceLocation, SourceRange, and File methods. + +from ctypes import * + +def get_cindex_library(): + # FIXME: It's probably not the case that the library is actually found in + # this location. We need a better system of identifying and loading the + # CIndex library. It could be on path or elsewhere, or versioned, etc. + import platform + name = platform.system() + if name == 'Darwin': + return cdll.LoadLibrary('libCIndex.dylib') + elif name == 'Windows': + return cdll.LoadLibrary('libCIndex.dll') + else: + return cdll.LoadLibrary('libCIndex.so') + +# ctypes doesn't implicitly convert c_void_p to the appropriate wrapper +# object. This is a problem, because it means that from_parameter will see an +# integer and pass the wrong value on platforms where int != void*. Work around +# this by marshalling object arguments as void**. +c_object_p = POINTER(c_void_p) + +lib = get_cindex_library() + +### Structures and Utility Classes ### + +class _CXString(Structure): + """Helper for transforming CXString results.""" + + _fields_ = [("spelling", c_char_p), ("free", c_int)] + + def __del__(self): + _CXString_dispose(self) + + @staticmethod + def from_result(res, fn, args): + assert isinstance(res, _CXString) + return _CXString_getCString(res) + +class SourceLocation(Structure): + """ + A SourceLocation represents a particular location within a source file. + """ + _fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)] + _data = None + + def _get_instantiation(self): + if self._data is None: + f, l, c, o = c_object_p(), c_uint(), c_uint(), c_uint() + SourceLocation_loc(self, byref(f), byref(l), byref(c), byref(o)) + f = File(f) if f else None + self._data = (f, int(l.value), int(c.value), int(c.value)) + return self._data + + @property + def file(self): + """Get the file represented by this source location.""" + return self._get_instantiation()[0] + + @property + def line(self): + """Get the line represented by this source location.""" + return self._get_instantiation()[1] + + @property + def column(self): + """Get the column represented by this source location.""" + return self._get_instantiation()[2] + + @property + def offset(self): + """Get the file offset represented by this source location.""" + return self._get_instantiation()[3] + + def __repr__(self): + return "" % ( + self.file.name if self.file else None, self.line, self.column) + +class SourceRange(Structure): + """ + A SourceRange describes a range of source locations within the source + code. + """ + _fields_ = [ + ("ptr_data", c_void_p * 2), + ("begin_int_data", c_uint), + ("end_int_data", c_uint)] + + # FIXME: Eliminate this and make normal constructor? Requires hiding ctypes + # object. + @staticmethod + def from_locations(start, end): + return SourceRange_getRange(start, end) + + @property + def start(self): + """ + Return a SourceLocation representing the first character within a + source range. + """ + return SourceRange_start(self) + + @property + def end(self): + """ + Return a SourceLocation representing the last character within a + source range. + """ + return SourceRange_end(self) + + def __repr__(self): + return "" % (self.start, self.end) + +class Diagnostic(object): + """ + A Diagnostic is a single instance of a Clang diagnostic. It includes the + diagnostic severity, the message, the location the diagnostic occurred, as + well as additional source ranges and associated fix-it hints. + """ + + Ignored = 0 + Note = 1 + Warning = 2 + Error = 3 + Fatal = 4 + + def __init__(self, severity, location, spelling, ranges, fixits): + self.severity = severity + self.location = location + self.spelling = spelling + self.ranges = ranges + self.fixits = fixits + + def __repr__(self): + return "" % ( + self.severity, self.location, self.spelling) + +class FixIt(object): + """ + A FixIt represents a transformation to be applied to the source to + "fix-it". The fix-it shouldbe applied by replacing the given source range + with the given value. + """ + + def __init__(self, range, value): + self.range = range + self.value = value + + def __repr__(self): + return "" % (self.range, self.value) + +### Cursor Kinds ### + +class CursorKind(object): + """ + A CursorKind describes the kind of entity that a cursor points to. + """ + + # The unique kind objects, indexed by id. + _kinds = [] + _name_map = None + + def __init__(self, value): + if value >= len(CursorKind._kinds): + CursorKind._kinds += [None] * (value - len(CursorKind._kinds) + 1) + if CursorKind._kinds[value] is not None: + raise ValueError,'CursorKind already loaded' + self.value = value + CursorKind._kinds[value] = self + CursorKind._name_map = None + + def from_param(self): + return self.value + + @property + def name(self): + """Get the enumeration name of this cursor kind.""" + if self._name_map is None: + self._name_map = {} + for key,value in CursorKind.__dict__.items(): + if isinstance(value,CursorKind): + self._name_map[value] = key + return self._name_map[self] + + @staticmethod + def from_id(id): + if id >= len(CursorKind._kinds) or CursorKind._kinds[id] is None: + raise ValueError,'Unknown cursor kind' + return CursorKind._kinds[id] + + @staticmethod + def get_all_kinds(): + """Return all CursorKind enumeration instances.""" + return filter(None, CursorKind._kinds) + + def is_declaration(self): + """Test if this is a declaration kind.""" + return CursorKind_is_decl(self) + + def is_reference(self): + """Test if this is a reference kind.""" + return CursorKind_is_ref(self) + + def is_expression(self): + """Test if this is an expression kind.""" + return CursorKind_is_expr(self) + + def is_statement(self): + """Test if this is a statement kind.""" + return CursorKind_is_stmt(self) + + def is_invalid(self): + """Test if this is an invalid kind.""" + return CursorKind_is_inv(self) + + def __repr__(self): + return 'CursorKind.%s' % (self.name,) + +# FIXME: Is there a nicer way to expose this enumeration? We could potentially +# represent the nested structure, or even build a class hierarchy. The main +# things we want for sure are (a) simple external access to kinds, (b) a place +# to hang a description and name, (c) easy to keep in sync with Index.h. + +### +# Declaration Kinds + +# A declaration whose specific kind is not exposed via this interface. +# +# Unexposed declarations have the same operations as any other kind of +# declaration; one can extract their location information, spelling, find their +# definitions, etc. However, the specific kind of the declaration is not +# reported. +CursorKind.UNEXPOSED_DECL = CursorKind(1) + +# A C or C++ struct. +CursorKind.STRUCT_DECL = CursorKind(2) + +# A C or C++ union. +CursorKind.UNION_DECL = CursorKind(3) + +# A C++ class. +CursorKind.CLASS_DECL = CursorKind(4) + +# An enumeration. +CursorKind.ENUM_DECL = CursorKind(5) + +# A field (in C) or non-static data member (in C++) in a struct, union, or C++ +# class. +CursorKind.FIELD_DECL = CursorKind(6) + +# An enumerator constant. +CursorKind.ENUM_CONSTANT_DECL = CursorKind(7) + +# A function. +CursorKind.FUNCTION_DECL = CursorKind(8) + +# A variable. +CursorKind.VAR_DECL = CursorKind(9) + +# A function or method parameter. +CursorKind.PARM_DECL = CursorKind(10) + +# An Objective-C @interface. +CursorKind.OBJC_INTERFACE_DECL = CursorKind(11) + +# An Objective-C @interface for a category. +CursorKind.OBJC_CATEGORY_DECL = CursorKind(12) + +# An Objective-C @protocol declaration. +CursorKind.OBJC_PROTOCOL_DECL = CursorKind(13) + +# An Objective-C @property declaration. +CursorKind.OBJC_PROPERTY_DECL = CursorKind(14) + +# An Objective-C instance variable. +CursorKind.OBJC_IVAR_DECL = CursorKind(15) + +# An Objective-C instance method. +CursorKind.OBJC_INSTANCE_METHOD_DECL = CursorKind(16) + +# An Objective-C class method. +CursorKind.OBJC_CLASS_METHOD_DECL = CursorKind(17) + +# An Objective-C @implementation. +CursorKind.OBJC_IMPLEMENTATION_DECL = CursorKind(18) + +# An Objective-C @implementation for a category. +CursorKind.OBJC_CATEGORY_IMPL_DECL = CursorKind(19) + +# A typedef. +CursorKind.TYPEDEF_DECL = CursorKind(20) + +### +# Reference Kinds + +CursorKind.OBJC_SUPER_CLASS_REF = CursorKind(40) +CursorKind.OBJC_PROTOCOL_REF = CursorKind(41) +CursorKind.OBJC_CLASS_REF = CursorKind(42) + +# A reference to a type declaration. +# +# A type reference occurs anywhere where a type is named but not +# declared. For example, given: +# typedef unsigned size_type; +# size_type size; +# +# The typedef is a declaration of size_type (CXCursor_TypedefDecl), +# while the type of the variable "size" is referenced. The cursor +# referenced by the type of size is the typedef for size_type. +CursorKind.TYPE_REF = CursorKind(43) + +### +# Invalid/Error Kinds + +CursorKind.INVALID_FILE = CursorKind(70) +CursorKind.NO_DECL_FOUND = CursorKind(71) +CursorKind.NOT_IMPLEMENTED = CursorKind(72) + +### +# Expression Kinds + +# An expression whose specific kind is not exposed via this interface. +# +# Unexposed expressions have the same operations as any other kind of +# expression; one can extract their location information, spelling, children, +# etc. However, the specific kind of the expression is not reported. +CursorKind.UNEXPOSED_EXPR = CursorKind(100) + +# An expression that refers to some value declaration, such as a function, +# varible, or enumerator. +CursorKind.DECL_REF_EXPR = CursorKind(101) + +# An expression that refers to a member of a struct, union, class, Objective-C +# class, etc. +CursorKind.MEMBER_REF_EXPR = CursorKind(102) + +# An expression that calls a function. +CursorKind.CALL_EXPR = CursorKind(103) + +# An expression that sends a message to an Objective-C object or class. +CursorKind.OBJC_MESSAGE_EXPR = CursorKind(104) + +# A statement whose specific kind is not exposed via this interface. +# +# Unexposed statements have the same operations as any other kind of statement; +# one can extract their location information, spelling, children, etc. However, +# the specific kind of the statement is not reported. +CursorKind.UNEXPOSED_STMT = CursorKind(200) + +### +# Other Kinds + +# Cursor that represents the translation unit itself. +# +# The translation unit cursor exists primarily to act as the root cursor for +# traversing the contents of a translation unit. +CursorKind.TRANSLATION_UNIT = CursorKind(300) + +### Cursors ### + +class Cursor(Structure): + """ + The Cursor class represents a reference to an element within the AST. It + acts as a kind of iterator. + """ + _fields_ = [("_kind_id", c_int), ("data", c_void_p * 3)] + + def __eq__(self, other): + return Cursor_eq(self, other) + + def __ne__(self, other): + return not Cursor_eq(self, other) + + def is_definition(self): + """ + Returns true if the declaration pointed at by the cursor is also a + definition of that entity. + """ + return Cursor_is_def(self) + + def get_definition(self): + """ + If the cursor is a reference to a declaration or a declaration of + some entity, return a cursor that points to the definition of that + entity. + """ + # TODO: Should probably check that this is either a reference or + # declaration prior to issuing the lookup. + return Cursor_def(self) + + def get_usr(self): + """Return the Unified Symbol Resultion (USR) for the entity referenced + by the given cursor (or None). + + A Unified Symbol Resolution (USR) is a string that identifies a + particular entity (function, class, variable, etc.) within a + program. USRs can be compared across translation units to determine, + e.g., when references in one translation refer to an entity defined in + another translation unit.""" + return Cursor_usr(self) + + @property + def kind(self): + """Return the kind of this cursor.""" + return CursorKind.from_id(self._kind_id) + + @property + def spelling(self): + """Return the spelling of the entity pointed at by the cursor.""" + if not self.kind.is_declaration(): + # FIXME: clang_getCursorSpelling should be fixed to not assert on + # this, for consistency with clang_getCursorUSR. + return None + return Cursor_spelling(self) + + @property + def location(self): + """ + Return the source location (the starting character) of the entity + pointed at by the cursor. + """ + return Cursor_loc(self) + + @property + def extent(self): + """ + Return the source range (the range of text) occupied by the entity + pointed at by the cursor. + """ + return Cursor_extent(self) + + def get_children(self): + """Return an iterator for accessing the children of this cursor.""" + + # FIXME: Expose iteration from CIndex, PR6125. + def visitor(child, parent, children): + # FIXME: Document this assertion in API. + # FIXME: There should just be an isNull method. + assert child != Cursor_null() + children.append(child) + return 1 # continue + children = [] + Cursor_visit(self, Cursor_visit_callback(visitor), children) + return iter(children) + + @staticmethod + def from_result(res, fn, args): + assert isinstance(res, Cursor) + # FIXME: There should just be an isNull method. + if res == Cursor_null(): + return None + return res + +## CIndex Objects ## + +# CIndex objects (derived from ClangObject) are essentially lightweight +# wrappers attached to some underlying object, which is exposed via CIndex as +# a void*. + +class ClangObject(object): + """ + A helper for Clang objects. This class helps act as an intermediary for + the ctypes library and the Clang CIndex library. + """ + def __init__(self, obj): + assert isinstance(obj, c_object_p) and obj + self.obj = self._as_parameter_ = obj + + def from_param(self): + return self._as_parameter_ + + +class _CXUnsavedFile(Structure): + """Helper for passing unsaved file arguments.""" + _fields_ = [("name", c_char_p), ("contents", c_char_p), ('length', c_ulong)] + +## Diagnostic Conversion ## + +# Diagnostic objects are temporary, we must extract all the information from the +# diagnostic object when it is passed to the callback. + +_clang_getDiagnosticSeverity = lib.clang_getDiagnosticSeverity +_clang_getDiagnosticSeverity.argtypes = [c_object_p] +_clang_getDiagnosticSeverity.restype = c_int + +_clang_getDiagnosticLocation = lib.clang_getDiagnosticLocation +_clang_getDiagnosticLocation.argtypes = [c_object_p] +_clang_getDiagnosticLocation.restype = SourceLocation + +_clang_getDiagnosticSpelling = lib.clang_getDiagnosticSpelling +_clang_getDiagnosticSpelling.argtypes = [c_object_p] +_clang_getDiagnosticSpelling.restype = _CXString +_clang_getDiagnosticSpelling.errcheck = _CXString.from_result + +_clang_getDiagnosticNumRanges = lib.clang_getDiagnosticNumRanges +_clang_getDiagnosticNumRanges.argtypes = [c_object_p] +_clang_getDiagnosticNumRanges.restype = c_uint + +_clang_getDiagnosticRange = lib.clang_getDiagnosticRange +_clang_getDiagnosticRange.argtypes = [c_object_p, c_uint] +_clang_getDiagnosticRange.restype = SourceRange + +_clang_getDiagnosticNumFixIts = lib.clang_getDiagnosticNumFixIts +_clang_getDiagnosticNumFixIts.argtypes = [c_object_p] +_clang_getDiagnosticNumFixIts.restype = c_uint + +_clang_getDiagnosticFixItKind = lib.clang_getDiagnosticFixItKind +_clang_getDiagnosticFixItKind.argtypes = [c_object_p, c_uint] +_clang_getDiagnosticFixItKind.restype = c_int + +_clang_getDiagnosticFixItInsertion = lib.clang_getDiagnosticFixItInsertion +_clang_getDiagnosticFixItInsertion.argtypes = [c_object_p, c_uint, + POINTER(SourceLocation)] +_clang_getDiagnosticFixItInsertion.restype = _CXString +_clang_getDiagnosticFixItInsertion.errcheck = _CXString.from_result + +_clang_getDiagnosticFixItRemoval = lib.clang_getDiagnosticFixItRemoval +_clang_getDiagnosticFixItRemoval.argtypes = [c_object_p, c_uint, + POINTER(SourceLocation)] +_clang_getDiagnosticFixItRemoval.restype = _CXString +_clang_getDiagnosticFixItRemoval.errcheck = _CXString.from_result + +_clang_getDiagnosticFixItReplacement = lib.clang_getDiagnosticFixItReplacement +_clang_getDiagnosticFixItReplacement.argtypes = [c_object_p, c_uint, + POINTER(SourceRange)] +_clang_getDiagnosticFixItReplacement.restype = _CXString +_clang_getDiagnosticFixItReplacement.errcheck = _CXString.from_result + +def _convert_fixit(diag_ptr, index): + # We normalize all the fix-its to a single representation, this is more + # convenient. + # + # FIXME: Push this back into API? It isn't exactly clear what the + # SourceRange semantics are, we should make sure we can represent an empty + # range. + kind = _clang_getDiagnosticFixItKind(diag_ptr, index) + range = None + value = None + if kind == 0: # insertion + location = SourceLocation() + value = _clang_getDiagnosticFixItInsertion(diag_ptr, index, + byref(location)) + range = SourceRange.from_locations(location, location) + elif kind == 1: # removal + range = _clang_getDiagnosticFixItRemoval(diag_ptr, index) + value = '' + else: # replacement + assert kind == 2 + range = SourceRange() + value = _clang_getDiagnosticFixItReplacement(diag_ptr, index, + byref(range)) + return FixIt(range, value) + +def _convert_diag(diag_ptr, diag_list): + severity = _clang_getDiagnosticSeverity(diag_ptr) + loc = _clang_getDiagnosticLocation(diag_ptr) + spelling = _clang_getDiagnosticSpelling(diag_ptr) + + # Diagnostic ranges. + num_ranges = _clang_getDiagnosticNumRanges(diag_ptr) + ranges = [_clang_getDiagnosticRange(diag_ptr, i) + for i in range(num_ranges)] + + fixits = [_convert_fixit(diag_ptr, i) + for i in range(_clang_getDiagnosticNumFixIts(diag_ptr))] + + diag_list.append(Diagnostic(severity, loc, spelling, ranges, fixits)) + +### + +class Index(ClangObject): + """ + The Index type provides the primary interface to the Clang CIndex library, + primarily by providing an interface for reading and parsing translation + units. + """ + + @staticmethod + def create(excludeDecls=False): + """ + Create a new Index. + Parameters: + excludeDecls -- Exclude local declarations from translation units. + """ + return Index(Index_create(excludeDecls)) + + def __del__(self): + Index_dispose(self) + + def read(self, path): + """Load the translation unit from the given AST file.""" + # FIXME: In theory, we could support streaming diagnostics. It's hard to + # integrate this into the API cleanly, however. Resolve. + diags = [] + ptr = TranslationUnit_read(self, path, + Diagnostic_callback(_convert_diag), diags) + return TranslationUnit(ptr) if ptr else None + + def parse(self, path, args = [], unsaved_files = []): + """ + Load the translation unit from the given source code file by running + clang and generating the AST before loading. Additional command line + parameters can be passed to clang via the args parameter. + + In-memory contents for files can be provided by passing a list of pairs + to as unsaved_files, the first item should be the filenames to be mapped + and the second should be the contents to be substituted for the + file. The contents may be passed as strings or file objects. + """ + arg_array = 0 + if len(args): + arg_array = (c_char_p * len(args))(* args) + unsaved_files_array = 0 + if len(unsaved_files): + unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))() + for i,(name,value) in enumerate(unsaved_files): + if not isinstance(value, str): + # FIXME: It would be great to support an efficient version + # of this, one day. + value = value.read() + print value + if not isinstance(value, str): + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value + unsaved_files_array[i].length = len(value) + # FIXME: In theory, we could support streaming diagnostics. It's hard to + # integrate this into the API cleanly, however. Resolve. + diags = [] + ptr = TranslationUnit_parse(self, path, len(args), arg_array, + len(unsaved_files), unsaved_files_array, + Diagnostic_callback(_convert_diag), diags) + return TranslationUnit(ptr, diags) if ptr else None + + +class TranslationUnit(ClangObject): + """ + The TranslationUnit class represents a source code translation unit and + provides read-only access to its top-level declarations. + """ + + def __init__(self, ptr, diagnostics): + ClangObject.__init__(self, ptr) + self.diagnostics = diagnostics + + def __del__(self): + TranslationUnit_dispose(self) + + @property + def cursor(self): + """Retrieve the cursor that represents the given translation unit.""" + return TranslationUnit_cursor(self) + + @property + def spelling(self): + """Get the original translation unit source file name.""" + return TranslationUnit_spelling(self) + + def get_includes(self): + """ + Return an iterable sequence of FileInclusion objects that describe the + sequence of inclusions in a translation unit. The first object in + this sequence is always the input file. Note that this method will not + recursively iterate over header files included through precompiled + headers. + """ + def visitor(fobj, lptr, depth, includes): + loc = lptr.contents + includes.append(FileInclusion(loc.file, File(fobj), loc, depth)) + + # Automatically adapt CIndex/ctype pointers to python objects + includes = [] + TranslationUnit_includes(self, + TranslationUnit_includes_callback(visitor), + includes) + return iter(includes) + +class File(ClangObject): + """ + The File class represents a particular source file that is part of a + translation unit. + """ + + @property + def name(self): + """Return the complete file and path name of the file.""" + return File_name(self) + + @property + def time(self): + """Return the last modification time of the file.""" + return File_time(self) + +class FileInclusion(object): + """ + The FileInclusion class represents the inclusion of one source file by + another via a '#include' directive or as the input file for the translation + unit. This class provides information about the included file, the including + file, the location of the '#include' directive and the depth of the included + file in the stack. Note that the input file has depth 0. + """ + + def __init__(self, src, tgt, loc, depth): + self.source = src + self.include = tgt + self.location = loc + self.depth = depth + + @property + def is_input_file(self): + """True if the included file is the input file.""" + return self.depth == 0 + +# Additional Functions and Types + +# String Functions +_CXString_dispose = lib.clang_disposeString +_CXString_dispose.argtypes = [_CXString] + +_CXString_getCString = lib.clang_getCString +_CXString_getCString.argtypes = [_CXString] +_CXString_getCString.restype = c_char_p + +# Source Location Functions +SourceLocation_loc = lib.clang_getInstantiationLocation +SourceLocation_loc.argtypes = [SourceLocation, POINTER(c_object_p), + POINTER(c_uint), POINTER(c_uint), + POINTER(c_uint)] + +# Source Range Functions +SourceRange_getRange = lib.clang_getRange +SourceRange_getRange.argtypes = [SourceLocation, SourceLocation] +SourceRange_getRange.restype = SourceRange + +SourceRange_start = lib.clang_getRangeStart +SourceRange_start.argtypes = [SourceRange] +SourceRange_start.restype = SourceLocation + +SourceRange_end = lib.clang_getRangeEnd +SourceRange_end.argtypes = [SourceRange] +SourceRange_end.restype = SourceLocation + +# CursorKind Functions +CursorKind_is_decl = lib.clang_isDeclaration +CursorKind_is_decl.argtypes = [CursorKind] +CursorKind_is_decl.restype = bool + +CursorKind_is_ref = lib.clang_isReference +CursorKind_is_ref.argtypes = [CursorKind] +CursorKind_is_ref.restype = bool + +CursorKind_is_expr = lib.clang_isExpression +CursorKind_is_expr.argtypes = [CursorKind] +CursorKind_is_expr.restype = bool + +CursorKind_is_stmt = lib.clang_isStatement +CursorKind_is_stmt.argtypes = [CursorKind] +CursorKind_is_stmt.restype = bool + +CursorKind_is_inv = lib.clang_isInvalid +CursorKind_is_inv.argtypes = [CursorKind] +CursorKind_is_inv.restype = bool + +# Cursor Functions +# TODO: Implement this function +Cursor_get = lib.clang_getCursor +Cursor_get.argtypes = [TranslationUnit, SourceLocation] +Cursor_get.restype = Cursor + +Cursor_null = lib.clang_getNullCursor +Cursor_null.restype = Cursor + +Cursor_usr = lib.clang_getCursorUSR +Cursor_usr.argtypes = [Cursor] +Cursor_usr.restype = _CXString +Cursor_usr.errcheck = _CXString.from_result + +Cursor_is_def = lib.clang_isCursorDefinition +Cursor_is_def.argtypes = [Cursor] +Cursor_is_def.restype = bool + +Cursor_def = lib.clang_getCursorDefinition +Cursor_def.argtypes = [Cursor] +Cursor_def.restype = Cursor +Cursor_def.errcheck = Cursor.from_result + +Cursor_eq = lib.clang_equalCursors +Cursor_eq.argtypes = [Cursor, Cursor] +Cursor_eq.restype = c_uint + +Cursor_spelling = lib.clang_getCursorSpelling +Cursor_spelling.argtypes = [Cursor] +Cursor_spelling.restype = _CXString +Cursor_spelling.errcheck = _CXString.from_result + +Cursor_loc = lib.clang_getCursorLocation +Cursor_loc.argtypes = [Cursor] +Cursor_loc.restype = SourceLocation + +Cursor_extent = lib.clang_getCursorExtent +Cursor_extent.argtypes = [Cursor] +Cursor_extent.restype = SourceRange + +Cursor_ref = lib.clang_getCursorReferenced +Cursor_ref.argtypes = [Cursor] +Cursor_ref.restype = Cursor +Cursor_ref.errcheck = Cursor.from_result + +Cursor_visit_callback = CFUNCTYPE(c_int, Cursor, Cursor, py_object) +Cursor_visit = lib.clang_visitChildren +Cursor_visit.argtypes = [Cursor, Cursor_visit_callback, py_object] +Cursor_visit.restype = c_uint + +# Index Functions +Index_create = lib.clang_createIndex +Index_create.argtypes = [c_int] +Index_create.restype = c_object_p + +Index_dispose = lib.clang_disposeIndex +Index_dispose.argtypes = [Index] + +# Translation Unit Functions +Diagnostic_callback = CFUNCTYPE(None, c_object_p, py_object) + +TranslationUnit_read = lib.clang_createTranslationUnit +TranslationUnit_read.argtypes = [Index, c_char_p, + Diagnostic_callback, py_object] +TranslationUnit_read.restype = c_object_p + +TranslationUnit_parse = lib.clang_createTranslationUnitFromSourceFile +TranslationUnit_parse.argtypes = [Index, c_char_p, c_int, c_void_p, + c_int, c_void_p, + Diagnostic_callback, py_object] +TranslationUnit_parse.restype = c_object_p + +TranslationUnit_cursor = lib.clang_getTranslationUnitCursor +TranslationUnit_cursor.argtypes = [TranslationUnit] +TranslationUnit_cursor.restype = Cursor +TranslationUnit_cursor.errcheck = Cursor.from_result + +TranslationUnit_spelling = lib.clang_getTranslationUnitSpelling +TranslationUnit_spelling.argtypes = [TranslationUnit] +TranslationUnit_spelling.restype = _CXString +TranslationUnit_spelling.errcheck = _CXString.from_result + +TranslationUnit_dispose = lib.clang_disposeTranslationUnit +TranslationUnit_dispose.argtypes = [TranslationUnit] + +TranslationUnit_includes_callback = CFUNCTYPE(None, + c_object_p, + POINTER(SourceLocation), + c_uint, py_object) +TranslationUnit_includes = lib.clang_getInclusions +TranslationUnit_includes.argtypes = [TranslationUnit, + TranslationUnit_includes_callback, + py_object] + +# File Functions +File_name = lib.clang_getFileName +File_name.argtypes = [File] +File_name.restype = c_char_p + +File_time = lib.clang_getFileTime +File_time.argtypes = [File] +File_time.restype = c_uint + +### + +__all__ = ['Index', 'TranslationUnit', 'Cursor', 'CursorKind', + 'Diagnostic', 'FixIt', 'SourceRange', 'SourceLocation', 'File'] Added: vendor/clang/dist/bindings/python/examples/cindex/cindex-dump.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/examples/cindex/cindex-dump.py Tue Feb 16 09:31:36 2010 (r203955) @@ -0,0 +1,87 @@ +#!/usr/bin/env python + +#===- cindex-dump.py - cindex/Python Source Dump -------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +""" +A simple command line tool for dumping a source file using the Clang Index *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 12:29:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319811065670; Tue, 16 Feb 2010 12:29:03 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 211498FC0C; Tue, 16 Feb 2010 12:29:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GCT3js020747; Tue, 16 Feb 2010 12:29:03 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GCT2DE020743; Tue, 16 Feb 2010 12:29:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002161229.o1GCT2DE020743@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 16 Feb 2010 12:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203958 - in head/lib: libc/stdio libc/stdtime libpam/modules/pam_echo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 12:29:03 -0000 Author: ru Date: Tue Feb 16 12:29:02 2010 New Revision: 203958 URL: http://svn.freebsd.org/changeset/base/203958 Log: %U was macroized in mdoc(7), escape. Modified: head/lib/libc/stdio/printf.3 head/lib/libc/stdtime/strptime.3 head/lib/libpam/modules/pam_echo/pam_echo.8 Modified: head/lib/libc/stdio/printf.3 ============================================================================== --- head/lib/libc/stdio/printf.3 Tue Feb 16 11:35:50 2010 (r203957) +++ head/lib/libc/stdio/printf.3 Tue Feb 16 12:29:02 2010 (r203958) @@ -812,7 +812,7 @@ available. The conversion formats .Cm \&%D , \&%O , and -.Cm %U +.Cm \&%U are not standard and are provided only for backward compatibility. The effect of padding the Modified: head/lib/libc/stdtime/strptime.3 ============================================================================== --- head/lib/libc/stdtime/strptime.3 Tue Feb 16 11:35:50 2010 (r203957) +++ head/lib/libc/stdtime/strptime.3 Tue Feb 16 12:29:02 2010 (r203958) @@ -149,7 +149,7 @@ and 12PM is taken as noon. .Pp The -.Fa %U +.Fa \&%U and .Fa %W format specifiers accept any value within the range 00 to 53 Modified: head/lib/libpam/modules/pam_echo/pam_echo.8 ============================================================================== --- head/lib/libpam/modules/pam_echo/pam_echo.8 Tue Feb 16 11:35:50 2010 (r203957) +++ head/lib/libpam/modules/pam_echo/pam_echo.8 Tue Feb 16 12:29:02 2010 (r203958) @@ -65,7 +65,7 @@ The current service name .It Cm %t The name of the controlling tty .Pq Dv PAM_TTY . -.It Cm %U +.It Cm \&%U The applicant's user name .Pq Dv PAM_RUSER . .It Cm %u From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 12:43:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEA5C106566C; Tue, 16 Feb 2010 12:43:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8718FC0C; Tue, 16 Feb 2010 12:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GChtkk024047; Tue, 16 Feb 2010 12:43:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GChtwE024045; Tue, 16 Feb 2010 12:43:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002161243.o1GChtwE024045@svn.freebsd.org> From: Rui Paulo Date: Tue, 16 Feb 2010 12:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203959 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 12:43:55 -0000 Author: rpaulo Date: Tue Feb 16 12:43:55 2010 New Revision: 203959 URL: http://svn.freebsd.org/changeset/base/203959 Log: Fix Kite and Merlin version check. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Tue Feb 16 12:29:02 2010 (r203958) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Tue Feb 16 12:43:55 2010 (r203959) @@ -600,7 +600,7 @@ (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) #define AR_SREV_MERLIN_20(_ah) \ (AR_SREV_MERLIN(_ah) && \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_MERLIN_20) + AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ (AR_SREV_MERLIN_20(_ah) || \ AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN) @@ -617,7 +617,7 @@ AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_11) #define AR_SREV_KITE_12(_ah) \ (AR_SREV_KITE(ah) && \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) + AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_12) #define AR_SREV_KITE_12_OR_LATER(_ah) \ (AR_SREV_KITE_12(_ah) || \ AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 14:09:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB1B1065676; Tue, 16 Feb 2010 14:09:12 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6988FC19; Tue, 16 Feb 2010 14:09:12 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o1GDUbmY034532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Feb 2010 14:30:38 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o1GDUXKQ084119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 14:30:33 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o1GDUXs2071275; Tue, 16 Feb 2010 14:30:33 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o1GDUWMg071274; Tue, 16 Feb 2010 14:30:32 +0100 (CET) (envelope-from ticso) Date: Tue, 16 Feb 2010 14:30:32 +0100 From: Bernd Walter To: "M. Warner Losh" Message-ID: <20100216133032.GH43625@cicely7.cicely.de> References: <20100210203519.GA44831@FreeBSD.org> <3bbf2fe11002151411u552a4749j847b3e10645293e7@mail.gmail.com> <4B79CE84.3060901@freebsd.org> <20100215.171425.646090028373155752.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100215.171425.646090028373155752.imp@bsdimp.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: danfe@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, avg@FreeBSD.org, attilio@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 14:09:13 -0000 On Mon, Feb 15, 2010 at 05:14:25PM -0700, M. Warner Losh wrote: > In message: <4B79CE84.3060901@freebsd.org> > Andriy Gapon writes: > : At least in the i386/amd64 kernel config files typically we have: > : optionsOPTION > : And it is the case for the quoted above amd64 context. > > That's the standard way to add options in all kernel config files, > although there's pockets here and there which don't quite comply. Interesting - I wasn't aware of this, but it surely makes sense. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 16:38:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4E861065692; Tue, 16 Feb 2010 16:38:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3C4B8FC14; Tue, 16 Feb 2010 16:38:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GGcvrP075560; Tue, 16 Feb 2010 16:38:57 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GGcv58075557; Tue, 16 Feb 2010 16:38:57 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002161638.o1GGcv58075557@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 16:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203960 - head/gnu/usr.bin/gdb/arch/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 16:38:58 -0000 Author: marcel Date: Tue Feb 16 16:38:57 2010 New Revision: 203960 URL: http://svn.freebsd.org/changeset/base/203960 Log: Compile fbsd-threads.c. Threading & TLS support is working just fine. Modified: head/gnu/usr.bin/gdb/arch/ia64/Makefile head/gnu/usr.bin/gdb/arch/ia64/init.c Modified: head/gnu/usr.bin/gdb/arch/ia64/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/arch/ia64/Makefile Tue Feb 16 12:43:55 2010 (r203959) +++ head/gnu/usr.bin/gdb/arch/ia64/Makefile Tue Feb 16 16:38:57 2010 (r203960) @@ -1,7 +1,7 @@ # $FreeBSD$ .if !defined(GDB_CROSS_DEBUGGER) -LIBSRCS+= fbsd-proc.c gcore.c +LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ia64-fbsd-nat.c .endif LIBSRCS+= solib.c solib-svr4.c Modified: head/gnu/usr.bin/gdb/arch/ia64/init.c ============================================================================== --- head/gnu/usr.bin/gdb/arch/ia64/init.c Tue Feb 16 12:43:55 2010 (r203959) +++ head/gnu/usr.bin/gdb/arch/ia64/init.c Tue Feb 16 16:38:57 2010 (r203960) @@ -15,6 +15,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_ser_tcp; extern initialize_file_ftype _initialize_fbsd_proc; extern initialize_file_ftype _initialize_gcore; +extern initialize_file_ftype _initialize_thread_db; extern initialize_file_ftype _initialize_ia64_fbsd_nat; extern initialize_file_ftype _initialize_kernel_u_addr; extern initialize_file_ftype _initialize_infptrace; @@ -127,6 +128,7 @@ initialize_all_files (void) #ifndef CROSS_DEBUGGER _initialize_fbsd_proc (); _initialize_gcore (); + _initialize_thread_db (); _initialize_ia64_fbsd_nat (); _initialize_kernel_u_addr (); _initialize_infptrace (); From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 18:10:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 384811065697; Tue, 16 Feb 2010 18:10:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210528FC12; Tue, 16 Feb 2010 18:10:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GIAaH7095924; Tue, 16 Feb 2010 18:10:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GIAZT7095908; Tue, 16 Feb 2010 18:10:35 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201002161810.o1GIAZT7095908@svn.freebsd.org> From: Doug Barton Date: Tue, 16 Feb 2010 18:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203961 - in releng/7.3: contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named contrib/bind9/bin... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 18:10:36 -0000 Author: dougb Date: Tue Feb 16 18:10:35 2010 New Revision: 203961 URL: http://svn.freebsd.org/changeset/base/203961 Log: Merge from stable/7, version 203948: Upgrade to BIND 9.4-ESV. This version incorporates all bug and security fixes since the release of 9.4.3, including the most recent -P5 security fix detailed below. From the README: BIND 9.4-ESV will be supported until December 31, 2010, at which time you will need to upgrade to the current release of BIND. This versions address the following vulnerabilities: BIND 9 Cache Update from Additional Section https://www.isc.org/advisories/CVE-2009-4022v6 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022 A nameserver with DNSSEC validation enabled may incorrectly add unauthenticated records to its cache that are received during the resolution of a recursive client query BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses https://www.isc.org/advisories/CVE-2010-0097 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097 There was an error in the DNSSEC NSEC/NSEC3 validation code that could cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records proven by NSEC or NSEC3 to exist) to be cached as if they had validated correctly These issues only affect systems with DNSSEC validation enabled. Approved by: re (kensmith) Added: releng/7.3/contrib/bind9/doc/draft/draft-ietf-6man-text-addr-representation-01.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-6man-text-addr-representation-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-behave-dns64-01.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-behave-dns64-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-12.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dns-tcp-requirements-02.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dns-tcp-requirements-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-09.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-09.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-gost-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2671bis-edns0-02.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2671bis-edns0-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2672bis-dname-18.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2672bis-dname-18.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc3597-bis-00.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-md5-deprecated-03.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-md5-deprecated-03.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-default-local-zones-09.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-default-local-zones-09.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-name-server-management-reqs-02.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-name-server-management-reqs-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-respsize-06.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/draft/draft-ietf-dnsop-respsize-06.txt releng/7.3/contrib/bind9/doc/rfc/rfc1912.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc1912.txt releng/7.3/contrib/bind9/doc/rfc/rfc3755.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc3755.txt releng/7.3/contrib/bind9/doc/rfc/rfc4294.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4294.txt releng/7.3/contrib/bind9/doc/rfc/rfc4339.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4339.txt releng/7.3/contrib/bind9/doc/rfc/rfc4471.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4471.txt releng/7.3/contrib/bind9/doc/rfc/rfc4472.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4472.txt releng/7.3/contrib/bind9/doc/rfc/rfc4509.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4509.txt releng/7.3/contrib/bind9/doc/rfc/rfc4635.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4635.txt releng/7.3/contrib/bind9/doc/rfc/rfc4697.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4697.txt releng/7.3/contrib/bind9/doc/rfc/rfc4892.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4892.txt releng/7.3/contrib/bind9/doc/rfc/rfc4955.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4955.txt releng/7.3/contrib/bind9/doc/rfc/rfc4956.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc4956.txt releng/7.3/contrib/bind9/doc/rfc/rfc5001.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5001.txt releng/7.3/contrib/bind9/doc/rfc/rfc5011.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5011.txt releng/7.3/contrib/bind9/doc/rfc/rfc5205.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5205.txt releng/7.3/contrib/bind9/doc/rfc/rfc5452.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5452.txt releng/7.3/contrib/bind9/doc/rfc/rfc5507.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5507.txt releng/7.3/contrib/bind9/doc/rfc/rfc5625.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5625.txt releng/7.3/contrib/bind9/doc/rfc/rfc5702.txt - copied unchanged from r203948, stable/7/contrib/bind9/doc/rfc/rfc5702.txt Deleted: releng/7.3/contrib/bind9/doc/draft/draft-baba-dnsext-acl-reqts-01.txt releng/7.3/contrib/bind9/doc/draft/draft-daigle-napstr-04.txt releng/7.3/contrib/bind9/doc/draft/draft-danisch-dns-rr-smtp-03.txt releng/7.3/contrib/bind9/doc/draft/draft-dnsext-opcode-discover-02.txt releng/7.3/contrib/bind9/doc/draft/draft-durand-dnsop-dynreverse-00.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-2929bis-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-axfr-clarify-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dhcid-rr-12.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dns-name-p-s-00.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-bis-updates-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-experiments-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-online-signing-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-opt-in-07.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-rsasha256-00.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-dnssec-trans-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-ds-sha256-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-12.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-mdns-43.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-nsec3-04.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-nsid-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2536bis-dsa-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2538bis-04.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2539bis-dhk-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-signed-nonexistence-requirements-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-tkey-renewal-mode-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-threshold-00.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-trustupdate-timers-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-tsig-sha-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsext-wcard-clarify-10.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-08.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-dns-configuration-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-dns-issues-11.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-ipv6-transport-guidelines-01.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-key-rollover-requirements-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-respsize-02.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-dnsop-serverid-06.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-enum-e164-gstn-np-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-ipv6-node-requirements-08.txt releng/7.3/contrib/bind9/doc/draft/draft-ietf-secsh-dns-05.txt releng/7.3/contrib/bind9/doc/draft/draft-ihren-dnsext-threshold-validation-00.txt releng/7.3/contrib/bind9/doc/draft/draft-park-ipv6-extensions-dns-pnp-00.txt Modified: releng/7.3/contrib/bind9/CHANGES releng/7.3/contrib/bind9/COPYRIGHT releng/7.3/contrib/bind9/FAQ releng/7.3/contrib/bind9/FAQ.xml releng/7.3/contrib/bind9/Makefile.in releng/7.3/contrib/bind9/README releng/7.3/contrib/bind9/README.idnkit releng/7.3/contrib/bind9/acconfig.h releng/7.3/contrib/bind9/bin/check/check-tool.c releng/7.3/contrib/bind9/bin/check/named-checkconf.8 releng/7.3/contrib/bind9/bin/check/named-checkconf.c releng/7.3/contrib/bind9/bin/check/named-checkconf.html releng/7.3/contrib/bind9/bin/check/named-checkzone.8 releng/7.3/contrib/bind9/bin/check/named-checkzone.c releng/7.3/contrib/bind9/bin/check/named-checkzone.docbook releng/7.3/contrib/bind9/bin/check/named-checkzone.html releng/7.3/contrib/bind9/bin/dig/dig.1 releng/7.3/contrib/bind9/bin/dig/dig.c releng/7.3/contrib/bind9/bin/dig/dig.docbook releng/7.3/contrib/bind9/bin/dig/dig.html releng/7.3/contrib/bind9/bin/dig/dighost.c releng/7.3/contrib/bind9/bin/dig/host.1 releng/7.3/contrib/bind9/bin/dig/host.c releng/7.3/contrib/bind9/bin/dig/host.docbook releng/7.3/contrib/bind9/bin/dig/host.html releng/7.3/contrib/bind9/bin/dig/include/dig/dig.h releng/7.3/contrib/bind9/bin/dig/nslookup.1 releng/7.3/contrib/bind9/bin/dig/nslookup.c releng/7.3/contrib/bind9/bin/dig/nslookup.html releng/7.3/contrib/bind9/bin/dnssec/dnssec-keygen.8 releng/7.3/contrib/bind9/bin/dnssec/dnssec-keygen.html releng/7.3/contrib/bind9/bin/dnssec/dnssec-signzone.8 releng/7.3/contrib/bind9/bin/dnssec/dnssec-signzone.c releng/7.3/contrib/bind9/bin/dnssec/dnssec-signzone.html releng/7.3/contrib/bind9/bin/named/client.c releng/7.3/contrib/bind9/bin/named/control.c releng/7.3/contrib/bind9/bin/named/include/named/client.h releng/7.3/contrib/bind9/bin/named/include/named/log.h releng/7.3/contrib/bind9/bin/named/include/named/lwdclient.h releng/7.3/contrib/bind9/bin/named/include/named/notify.h releng/7.3/contrib/bind9/bin/named/include/named/server.h releng/7.3/contrib/bind9/bin/named/interfacemgr.c releng/7.3/contrib/bind9/bin/named/log.c releng/7.3/contrib/bind9/bin/named/lwresd.8 releng/7.3/contrib/bind9/bin/named/lwresd.docbook releng/7.3/contrib/bind9/bin/named/lwresd.html releng/7.3/contrib/bind9/bin/named/main.c releng/7.3/contrib/bind9/bin/named/named.8 releng/7.3/contrib/bind9/bin/named/named.conf.5 releng/7.3/contrib/bind9/bin/named/named.conf.html releng/7.3/contrib/bind9/bin/named/named.html releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/bin/named/server.c releng/7.3/contrib/bind9/bin/named/unix/os.c releng/7.3/contrib/bind9/bin/named/update.c releng/7.3/contrib/bind9/bin/named/xfrout.c releng/7.3/contrib/bind9/bin/nsupdate/nsupdate.1 releng/7.3/contrib/bind9/bin/nsupdate/nsupdate.c releng/7.3/contrib/bind9/bin/nsupdate/nsupdate.docbook releng/7.3/contrib/bind9/bin/nsupdate/nsupdate.html releng/7.3/contrib/bind9/bin/rndc/include/rndc/os.h releng/7.3/contrib/bind9/bin/rndc/rndc-confgen.8 releng/7.3/contrib/bind9/bin/rndc/rndc-confgen.html releng/7.3/contrib/bind9/bin/rndc/rndc.8 releng/7.3/contrib/bind9/bin/rndc/rndc.c releng/7.3/contrib/bind9/bin/rndc/rndc.conf.5 releng/7.3/contrib/bind9/bin/rndc/rndc.conf.html releng/7.3/contrib/bind9/bin/rndc/rndc.html releng/7.3/contrib/bind9/config.guess releng/7.3/contrib/bind9/config.h.in releng/7.3/contrib/bind9/configure.in releng/7.3/contrib/bind9/doc/arm/Bv9ARM-book.xml releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch01.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch02.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch03.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch04.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch05.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch06.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch07.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch08.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch09.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.ch10.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.html releng/7.3/contrib/bind9/doc/arm/Bv9ARM.pdf releng/7.3/contrib/bind9/doc/arm/Makefile.in releng/7.3/contrib/bind9/doc/arm/man.dig.html releng/7.3/contrib/bind9/doc/arm/man.dnssec-keygen.html releng/7.3/contrib/bind9/doc/arm/man.dnssec-signzone.html releng/7.3/contrib/bind9/doc/arm/man.host.html releng/7.3/contrib/bind9/doc/arm/man.named-checkconf.html releng/7.3/contrib/bind9/doc/arm/man.named-checkzone.html releng/7.3/contrib/bind9/doc/arm/man.named.html releng/7.3/contrib/bind9/doc/arm/man.rndc-confgen.html releng/7.3/contrib/bind9/doc/arm/man.rndc.conf.html releng/7.3/contrib/bind9/doc/arm/man.rndc.html releng/7.3/contrib/bind9/doc/misc/Makefile.in releng/7.3/contrib/bind9/doc/rfc/index releng/7.3/contrib/bind9/lib/bind/configure.in releng/7.3/contrib/bind9/lib/bind9/api releng/7.3/contrib/bind9/lib/bind9/check.c releng/7.3/contrib/bind9/lib/bind9/include/bind9/getaddresses.h releng/7.3/contrib/bind9/lib/dns/adb.c releng/7.3/contrib/bind9/lib/dns/cache.c releng/7.3/contrib/bind9/lib/dns/db.c releng/7.3/contrib/bind9/lib/dns/diff.c releng/7.3/contrib/bind9/lib/dns/dispatch.c releng/7.3/contrib/bind9/lib/dns/dlz.c releng/7.3/contrib/bind9/lib/dns/dnssec.c releng/7.3/contrib/bind9/lib/dns/dst_api.c releng/7.3/contrib/bind9/lib/dns/dst_parse.c releng/7.3/contrib/bind9/lib/dns/gen-unix.h releng/7.3/contrib/bind9/lib/dns/include/dns/Makefile.in releng/7.3/contrib/bind9/lib/dns/include/dns/acl.h releng/7.3/contrib/bind9/lib/dns/include/dns/compress.h releng/7.3/contrib/bind9/lib/dns/include/dns/db.h releng/7.3/contrib/bind9/lib/dns/include/dns/diff.h releng/7.3/contrib/bind9/lib/dns/include/dns/dlz.h releng/7.3/contrib/bind9/lib/dns/include/dns/journal.h releng/7.3/contrib/bind9/lib/dns/include/dns/log.h releng/7.3/contrib/bind9/lib/dns/include/dns/lookup.h releng/7.3/contrib/bind9/lib/dns/include/dns/message.h releng/7.3/contrib/bind9/lib/dns/include/dns/name.h releng/7.3/contrib/bind9/lib/dns/include/dns/peer.h releng/7.3/contrib/bind9/lib/dns/include/dns/rbt.h releng/7.3/contrib/bind9/lib/dns/include/dns/rdata.h releng/7.3/contrib/bind9/lib/dns/include/dns/rdataset.h releng/7.3/contrib/bind9/lib/dns/include/dns/request.h releng/7.3/contrib/bind9/lib/dns/include/dns/resolver.h releng/7.3/contrib/bind9/lib/dns/include/dns/sdb.h releng/7.3/contrib/bind9/lib/dns/include/dns/sdlz.h releng/7.3/contrib/bind9/lib/dns/include/dns/tkey.h releng/7.3/contrib/bind9/lib/dns/include/dns/types.h releng/7.3/contrib/bind9/lib/dns/include/dns/validator.h releng/7.3/contrib/bind9/lib/dns/include/dns/view.h releng/7.3/contrib/bind9/lib/dns/include/dns/xfrin.h releng/7.3/contrib/bind9/lib/dns/include/dns/zone.h releng/7.3/contrib/bind9/lib/dns/journal.c releng/7.3/contrib/bind9/lib/dns/master.c releng/7.3/contrib/bind9/lib/dns/masterdump.c releng/7.3/contrib/bind9/lib/dns/message.c releng/7.3/contrib/bind9/lib/dns/nsec.c releng/7.3/contrib/bind9/lib/dns/openssl_link.c releng/7.3/contrib/bind9/lib/dns/openssldsa_link.c releng/7.3/contrib/bind9/lib/dns/opensslrsa_link.c releng/7.3/contrib/bind9/lib/dns/rbt.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/bind9/lib/dns/rdata.c releng/7.3/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c releng/7.3/contrib/bind9/lib/dns/rdata/generic/loc_29.c releng/7.3/contrib/bind9/lib/dns/rdata/generic/soa_6.c releng/7.3/contrib/bind9/lib/dns/rdata/in_1/wks_11.c releng/7.3/contrib/bind9/lib/dns/rdataset.c releng/7.3/contrib/bind9/lib/dns/rdataslab.c releng/7.3/contrib/bind9/lib/dns/request.c releng/7.3/contrib/bind9/lib/dns/resolver.c releng/7.3/contrib/bind9/lib/dns/sdb.c releng/7.3/contrib/bind9/lib/dns/sdlz.c releng/7.3/contrib/bind9/lib/dns/time.c releng/7.3/contrib/bind9/lib/dns/validator.c releng/7.3/contrib/bind9/lib/dns/zone.c releng/7.3/contrib/bind9/lib/isc/Makefile.in releng/7.3/contrib/bind9/lib/isc/alpha/include/isc/atomic.h releng/7.3/contrib/bind9/lib/isc/api releng/7.3/contrib/bind9/lib/isc/entropy.c releng/7.3/contrib/bind9/lib/isc/ia64/include/isc/atomic.h releng/7.3/contrib/bind9/lib/isc/include/isc/entropy.h releng/7.3/contrib/bind9/lib/isc/include/isc/file.h releng/7.3/contrib/bind9/lib/isc/include/isc/fsaccess.h releng/7.3/contrib/bind9/lib/isc/include/isc/hash.h releng/7.3/contrib/bind9/lib/isc/include/isc/heap.h releng/7.3/contrib/bind9/lib/isc/include/isc/log.h releng/7.3/contrib/bind9/lib/isc/include/isc/mem.h releng/7.3/contrib/bind9/lib/isc/include/isc/netaddr.h releng/7.3/contrib/bind9/lib/isc/include/isc/netscope.h releng/7.3/contrib/bind9/lib/isc/include/isc/platform.h.in releng/7.3/contrib/bind9/lib/isc/include/isc/portset.h releng/7.3/contrib/bind9/lib/isc/include/isc/random.h releng/7.3/contrib/bind9/lib/isc/include/isc/ratelimiter.h releng/7.3/contrib/bind9/lib/isc/include/isc/serial.h releng/7.3/contrib/bind9/lib/isc/include/isc/sockaddr.h releng/7.3/contrib/bind9/lib/isc/include/isc/socket.h releng/7.3/contrib/bind9/lib/isc/include/isc/symtab.h releng/7.3/contrib/bind9/lib/isc/include/isc/task.h releng/7.3/contrib/bind9/lib/isc/inet_aton.c releng/7.3/contrib/bind9/lib/isc/inet_ntop.c releng/7.3/contrib/bind9/lib/isc/log.c releng/7.3/contrib/bind9/lib/isc/mem.c releng/7.3/contrib/bind9/lib/isc/random.c releng/7.3/contrib/bind9/lib/isc/rwlock.c releng/7.3/contrib/bind9/lib/isc/sha2.c releng/7.3/contrib/bind9/lib/isc/timer.c releng/7.3/contrib/bind9/lib/isc/unix/dir.c releng/7.3/contrib/bind9/lib/isc/unix/entropy.c releng/7.3/contrib/bind9/lib/isc/unix/file.c releng/7.3/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c releng/7.3/contrib/bind9/lib/isc/unix/ifiter_ioctl.c releng/7.3/contrib/bind9/lib/isc/unix/include/isc/net.h releng/7.3/contrib/bind9/lib/isc/unix/include/isc/offset.h releng/7.3/contrib/bind9/lib/isc/unix/include/isc/strerror.h releng/7.3/contrib/bind9/lib/isc/unix/include/isc/time.h releng/7.3/contrib/bind9/lib/isc/unix/resource.c releng/7.3/contrib/bind9/lib/isc/unix/socket.c releng/7.3/contrib/bind9/lib/isc/unix/strerror.c releng/7.3/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h releng/7.3/contrib/bind9/lib/isccfg/include/isccfg/log.h releng/7.3/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h releng/7.3/contrib/bind9/lib/lwres/api releng/7.3/contrib/bind9/lib/lwres/context.c releng/7.3/contrib/bind9/lib/lwres/context_p.h releng/7.3/contrib/bind9/lib/lwres/getaddrinfo.c releng/7.3/contrib/bind9/lib/lwres/getipnode.c releng/7.3/contrib/bind9/lib/lwres/include/lwres/context.h releng/7.3/contrib/bind9/lib/lwres/include/lwres/netdb.h.in releng/7.3/contrib/bind9/lib/lwres/lwconfig.c releng/7.3/contrib/bind9/lib/lwres/man/lwres.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_buffer.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_buffer.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_config.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_config.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_context.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_context.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_gabn.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_gabn.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_gethostent.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_gethostent.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_getipnode.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_getipnode.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_gnba.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_gnba.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_hstrerror.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_inetntop.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_inetntop.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_noop.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_noop.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_packet.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_packet.html releng/7.3/contrib/bind9/lib/lwres/man/lwres_resutil.3 releng/7.3/contrib/bind9/lib/lwres/man/lwres_resutil.html releng/7.3/contrib/bind9/libtool.m4 releng/7.3/contrib/bind9/ltmain.sh releng/7.3/contrib/bind9/make/rules.in releng/7.3/contrib/bind9/version releng/7.3/lib/bind/config.h releng/7.3/lib/bind/dns/Makefile releng/7.3/lib/bind/dns/code.h releng/7.3/lib/bind/dns/dns/enumclass.h releng/7.3/lib/bind/dns/dns/enumtype.h releng/7.3/lib/bind/dns/dns/rdatastruct.h releng/7.3/lib/bind/isc/Makefile releng/7.3/lib/bind/isc/isc/platform.h releng/7.3/lib/bind/lwres/lwres/netdb.h Directory Properties: releng/7.3/contrib/bind9/ (props changed) releng/7.3/lib/bind/ (props changed) Modified: releng/7.3/contrib/bind9/CHANGES ============================================================================== --- releng/7.3/contrib/bind9/CHANGES Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/CHANGES Tue Feb 16 18:10:35 2010 (r203961) @@ -1,28 +1,295 @@ - --- 9.4.3-P4 released --- + --- 9.4-ESV released --- + +2831. [security] Do not attempt to validate or cache + out-of-bailiwick data returned with a secure + answer; it must be re-fetched from its original + source and validated in that context. [RT #20819] + +2828. [security] Cached CNAME or DNAME RR could be returned to clients + without DNSSEC validation. [RT #20737] + +2827. [security] Bogus NXDOMAIN could be cached as if valid. [RT #20712] + +2797. [bug] Don't decrement the dispatch manager's maxbuffers. + [RT #20613] + +2790. [bug] Handle DS queries to stub zones. [RT #20440] 2772. [security] When validating, track whether pending data was from the additional section or not and only return it if validates as secure. [RT #20438] - --- 9.4.3-P3 released --- + --- 9.4-ESVb1 released --- + +2698. [cleanup] configure --enable-libbind is deprecated. [RT #20090] + +2697. [port] win32: ensure that S_IFMT, S_IFDIR, S_IFCHR and + S_IFREG are defined after including . + [RT #20309] + +2690. [bug] win32: fix isc_thread_key_getspecific() prototype. + [RT #20315] + +2689. [bug] Correctly handle snprintf result. [RT #20306] + +2688. [bug] Use INTERFACE_F_POINTTOPOINT, not IFF_POINTOPOINT, + to decide to fetch the destination address. [RT #20305] + +2681. [bug] IPSECKEY RR of gateway type 3 was not correctly + decoded. [RT #20269] + +2672. [bug] Don't enable searching in 'host' when doing reverse + lookups. [RT #20218] + +2525. [experimental] New logging category "query-errors" to provide detailed + internal information about query failures, especially + about server failures. (backported as a special + exception to the general policy) [RT #19027] + +2670. [bug] Unexpected connect failures failed to log enough + information to be useful. [RT #20205] + +2649. [bug] Set the domain for forward only zones. [RT #19944] + +2648. [port] win32: isc_time_seconds() was broken. [RT #19900] + +2646. [bug] Incorrect cleanup on error in socket.c. [RT #19987] + +2642. [bug] nsupdate could dump core on solaris when reading + improperly formatted key files. [RT #20015] 2640. [security] A specially crafted update packet will cause named to exit. [RT #20000] - --- 9.4.3-P2 released --- +2637. [func] Rationalize dnssec-signzone's signwithkey() calling. + [RT #19959] + +2635. [bug] isc_inet_ntop() incorrectly handled 0.0/16 addresses. + [RT #19716] + +2633. [bug] Handle 15 bit rand() functions. [RT #19783] + +2632. [func] util/kit.sh: warn if documentation appears to be out of + date. [RT #19922] + +2623. [bug] Named started seaches for DS non-optimally. [RT #19915] + +2621. [doc] Made copyright boilterplate consistent. [RT #19833] + +2920. [bug] Delay thawing the zone until the reload of it has + completed successfully. [RT #19750] + +2618. [bug] The sdb and sdlz db_interator_seek() methods could + loop infinitely. [RT #19847] + +2617. [bug] ifconfig.sh failed to emit an error message when + run from the wrong location. [RT #19375] + +2616. [bug] 'host' used the nameservers from resolv.conf even + when a explicit nameserver was specified. [RT #19852] + +2615. [bug] "__attribute__((unused))" was in the wrong place + for ia64 gcc builds. [RT #19854] + +2614. [port] win32: 'named -v' should automatically be executed + in the foreground. [RT #19844] + +2610. [port] sunos: Change #2363 was not complete. [RT #19796] + +2606. [bug] "delegation-only" was not being accepted in + delegation-only type zones. [RT #19717] + +2605. [bug] Accept DS responses from delegation only zones. + [RT # 19296] + +2603. [port] win32: handle .exe extension of named-checkzone and + named-comilezone argv[0] names under windows. + [RT #19767] + +2602. [port] win32: fix debugging command line build of libisccfg. + [RT #19767] + +2599. [bug] Address rapid memory growth when validation fails. + [RT #19654] + +2595. [bug] Fix unknown extended rcodes in dig. [RT #19625] + +2592. [bug] Treat "any" as a type in nsupdate. [RT #19455] + +2591. [bug] named could die when processing a update in + removed_orphaned_ds(). [RT #19507] + +2589. [bug] dns_db_unregister() failed to clear '*dbimp'. + [RT #19626] + +2586. [bug] Missing cleanup of SIG rdataset in searching a DLZ DB + or SDB. [RT #19577] + +2584. [bug] alpha: gcc optimization could break atomic operations. + [RT #19227] + +2583. [port] netbsd: provide a control to not add the compile + date to the version string, -DNO_VERSION_DATE. + +2582. [bug] Don't emit warning log message when we attempt to + remove non-existant journal. [RT #19516] + +2581. [contrib] dlz/mysql set MYSQL_OPT_RECONNECT option on connection. + Requires MySQL 5.0.19 or later. [RT #19084] 2579. [bug] DNSSEC lookaside validation failed to handle unknown algorithms. [RT #19479] - --- 9.4.3-P1 released --- +2573. [bug] Replacing a non-CNAME record with a CNAME record in a + single transaction in a signed zone failed. [RT #19397] + +2568. [bug] Report when the write to indicate a otherwise + successful start fails. [RT #19360] + +2567. [bug] dst__privstruct_writefile() could miss write errors. + write_public_key() could miss write errors. + [RT #19360] + +2564. [bug] Only take EDNS fallback steps when processing timeouts. + [RT #19405] + +2563. [bug] Dig could leak a socket causing it to wait forever + to exit. [RT #19359] + +2562. [doc] ARM: miscellaneous improvements, reorganization, + and some new content. + +2561. [doc] Add isc-config.sh(1) man page. [RT #16378] + +2557. [cleanup] PCI compliance: + * new libisc log module file + * isc_dir_chroot() now also changes the working + directory to "/". + * additional INSISTs + * additional logging when files can't be removed. + +2553. [bug] Reference leak on DNSSEC validation errors. [RT #19291] + +2552. [bug] zero-no-soa-ttl-cache was not being honoured. + [RT #19340] + +2551. [bug] Potential Reference leak on return. [RT #19341] + +2550. [bug] Check --with-openssl= finds . + [RT #19343] + +2549. [port] linux: define NR_OPEN if not currently defined. + [RT #19344] + +2547. [bug] openssl_link.c:mem_realloc() could reference an + out-of-range area of the source buffer. New public + function isc_mem_reallocate() was introduced to address + this bug. [RT #19313] + +2545. [doc] ARM: Legal hostname checking (check-names) is + for SRV RDATA too. [RT #19304] + +2544. [cleanup] Removed unused structure members in adb.c. [RT #19225] + +2542. [doc] Update the description of dig +adflag. [RT #19290] + +2539. [security] Update the interaction between recursion, allow-query, + allow-query-cache and allow-recursion. [RT #19198] + +2536. [cleanup] Silence some warnings when -Werror=format-security is + specified. [RT #19083] + +2535. [bug] dig +showsearch and +trace interacted badly. [RT #19091] + +2532. [bug] dig: check the question section of the response to + see if it matches the asked question. [RT #18495] + +2531. [bug] Change #2207 was incomplete. [RT #19098] + +2529. [cleanup] Upgrade libtool to silence complaints from recent + version of autoconf. [RT #18657] + +2528. [cleanup] Silence spurious configure warning about + --datarootdir [RT #19096] + +2527. [bug] named could reuse cache on reload with + enabling/disabling validation. [RT #19119] + +2523. [bug] Random type rdata freed by dns_nsec_typepresent(). + [RT #19112] 2522. [security] Handle -1 from DSA_do_verify(). +2521. [bug] Improve epoll cross compilation support. [RT #19047] + +2519. [bug] dig/host with -4 or -6 didn't work if more than two + nameserver addresses of the excluded address family + preceded in resolv.conf. [RT #19081] + +2517. [bug] dig +trace with -4 or -6 failed when it chose a + nameserver address of the excluded address type. + [RT #18843] + +2516. [bug] glue sort for responses was performed even when not + needed. [RT #19039] + +2514. [bug] dig/host failed with -4 or -6 when resolv.conf contains + a nameserver of the excluded address family. + [RT #18848] + +2511. [cleanup] dns_rdata_tofmttext() add const to linebreak. + [RT #18885] + +2510. [bug] "dig +sigchase" could trigger REQUIRE failures. + [RT #19033] + +2509. [bug] Specifying a fixed query source port was broken. + [RT #19051] + +2506. [port] solaris: Check at configure time if + hack_shutup_pthreadonceinit is needed. [RT #19037] + +2505. [port] Treat amd64 similarly to x86_64 when determining + atomic operation support. [RT #19031] + +2504. [bug] Address race condition in the socket code. [RT #18899] + +2503. [port] linux: improve compatibility with Linux Standard + Base. [RT #18793] + +2500. [contrib] contrib/sdb/pgsql/zonetodb.c called non-existent + function. [RT #18582] + +2499. [port] solaris: lib/lwres/getaddrinfo.c namespace clash. + [RT #18837] + 2498. [bug] Removed a bogus function argument used with ISC_SOCKET_USE_POLLWATCH: it could cause compiler warning or crash named with the debug 1 level of logging. [RT #18917] +2495. [bug] Tighten RRSIG checks. [RT #18795] + +2494. [bug] dns/sdlz.h and dns/dlz.h were not being installed. + [RT #18826] + +2487. [bug] Give TCP connections longer to complete. [RT #18675] + +2485. [bug] Change update's the handling of obscured RRSIG + records. Not all orphand DS records were being + removed. [RT #18828] + +2479. [bug] xfrout:covers was not properly initalized. [RT #18801] + +2478. [bug] 'addresses' could be used uninitalized in + configure_forward(). [RT #18800] + +2476. [doc] ARM: improve documentation for max-journal-size and + ixfr-from-differences. [RT #15909] [RT #18541] + +2400. [bug] Log if kqueue()/epoll_create()/open(/dev/poll) fails. + [RT #18297] + --- 9.4.3 released --- 2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO @@ -38,7 +305,7 @@ 2473. [port] linux: raise the limit on open files to the possible maximum value before spawning threads; 'files' - specified in named.conf doesn't seem to work with + specified in named.conf doesn't seem to work with threads as expected. [RT #18784] 2472. [port] linux: check the number of available cpu's before @@ -61,10 +328,11 @@ 2465. [bug] Adb's handling of lame addresses was different for IPv4 and IPv6. [RT #18738] -2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket API and glibc hides parts of the IPv6 Advanced Socket API as a result. This is stupid as it breaks how the - two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + two halves (Basic and Advanced) of the IPv6 Socket API + were designed to be used but we have to live with it. Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API. [RT #18388] @@ -170,6 +438,10 @@ for select(). To enable this, set ISC_SOCKET_MAXSOCKETS at compilation time. [RT #18433] + Note: with changes #2469 and #2421 above, there is no + need to tweak ISC_SOCKET_MAXSOCKETS at compilation time + any more. + 2410. [bug] Correctly delete m_versionInfo. [RT #18432] 2408. [bug] A duplicate TCP dispatch event could be sent, which @@ -241,7 +513,7 @@ 2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET proofs which, in turn, caused validation failures for insecure zones immediately below a secure zone - the server was authoritative for. [RT #18112] + the server was authoritative for. [RT #18112] 2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant TLDs and supported RRs with TTLs [RT #17972] Modified: releng/7.3/contrib/bind9/COPYRIGHT ============================================================================== --- releng/7.3/contrib/bind9/COPYRIGHT Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/COPYRIGHT Tue Feb 16 18:10:35 2010 (r203961) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.9.18.5 2008/01/02 23:46:02 tbox Exp $ +$Id: COPYRIGHT,v 1.9.18.7 2010/01/07 23:46:07 tbox Exp $ Portions Copyright (C) 1996-2001 Nominum, Inc. Modified: releng/7.3/contrib/bind9/FAQ ============================================================================== --- releng/7.3/contrib/bind9/FAQ Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/FAQ Tue Feb 16 18:10:35 2010 (r203961) @@ -1,6 +1,6 @@ Frequently Asked Questions about BIND 9 -Copyright © 2004-2008 Internet Systems Consortium, Inc. ("ISC") +Copyright © 2004-2009 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. @@ -153,24 +153,29 @@ A: BIND 9.3 and later: Use TSIG to selec Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -220,13 +225,13 @@ A: You choose one view to be master and Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -600,7 +605,7 @@ Q: Why do queries for NSEC3 records fail A: NSEC3 records are strictly meta data and can only be returned in the authority section. This is done so that signing the zone using NSEC3 - records does not bring names into existance that do not exist in the + records does not bring names into existence that do not exist in the unsigned version of the zone. 5. Operating-System Specific Questions @@ -825,7 +830,6 @@ A: /dev/random is not configured. Use rn use certain interrupts as a source of random events. You can make this permanent by setting rand_irqs in /etc/rc.conf. - /etc/rc.conf rand_irqs="3 14 15" See also . Modified: releng/7.3/contrib/bind9/FAQ.xml ============================================================================== --- releng/7.3/contrib/bind9/FAQ.xml Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/FAQ.xml Tue Feb 16 18:10:35 2010 (r203961) @@ -1,7 +1,7 @@ - +
Frequently Asked Questions about BIND 9 @@ -28,6 +28,7 @@ 2006 2007 2008 + 2009 Internet Systems Consortium, Inc. ("ISC") @@ -318,24 +319,29 @@ Slave: 10.0.1.3 (internal), 10.0.1.4 (ex Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { - match-clients { !key external; 10.0.1/24; }; + match-clients { !key external; // reject message ment for the + // external view. + 10.0.1/24; }; // accept from these addresses. ... }; view "external" { match-clients { key external; any; }; - server 10.0.1.2 { keys external; }; + server 10.0.1.2 { keys external; }; // tag messages from the + // external view to the + // other servers for the + // view. recursion no; ... }; Slave 10.0.1.2: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; view "internal" { match-clients { !key external; 10.0.1/24; }; @@ -423,13 +429,13 @@ named-checkzone example.com tmp Master 10.0.1.1: key "external" { - algorithm hmac-md5; - secret "xxxxxxxx"; + algorithm hmac-sha256; + secret "xxxxxxxxxxxxxxxxxxxxxxxx"; }; key "mykey" { - algorithm hmac-md5; - secret "yyyyyyyy"; + algorithm hmac-sha256; + secret "yyyyyyyyyyyyyyyyyyyyyyyy"; }; view "internal" { @@ -1067,7 +1073,7 @@ empty: NSEC3 records are strictly meta data and can only be returned in the authority section. This is done so that signing the zone using NSEC3 records does not bring names - into existance that do not exist in the unsigned version + into existence that do not exist in the unsigned version of the zone. @@ -1470,7 +1476,6 @@ options { -/etc/rc.conf rand_irqs="3 14 15" Modified: releng/7.3/contrib/bind9/Makefile.in ============================================================================== --- releng/7.3/contrib/bind9/Makefile.in Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/Makefile.in Tue Feb 16 18:10:35 2010 (r203961) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.43.18.6 2007/09/03 23:46:21 tbox Exp $ +# $Id: Makefile.in,v 1.43.18.8 2009/02/20 23:46:01 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -24,6 +24,12 @@ top_srcdir = @top_srcdir@ SUBDIRS = make lib bin doc @LIBBIND@ TARGETS = +MANPAGES = isc-config.sh.1 + +HTMLPAGES = isc-config.sh.html + +MANOBJS = ${MANPAGES} ${HTMLPAGES} + @BIND9_MAKE_RULES@ distclean:: @@ -43,12 +49,19 @@ distclean:: maintainer-clean:: rm -f configure +docclean manclean maintainer-clean:: + rm -f ${MANOBJS} + +doc man:: ${MANOBJS} + installdirs: $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \ ${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir} + $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 install:: isc-config.sh installdirs ${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir} + ${INSTALL_DATA} ${srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1 tags: rm -f TAGS Modified: releng/7.3/contrib/bind9/README ============================================================================== --- releng/7.3/contrib/bind9/README Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/README Tue Feb 16 18:10:35 2010 (r203961) @@ -27,8 +27,8 @@ BIND 9 - Improved Portability Architecture - BIND version 9 development has been underwritten by the following - organizations: + BIND version 9 development has been under written by the following + organisations: Sun Microsystems, Inc. Hewlett Packard @@ -42,6 +42,16 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. +BIND 9.4-ESV (Extended Support Version) + + BIND 9.4-ESV is the Extended Support Version of BIND 9.4 + and incorporates the final maintenance release fixing bugs + in BIND 9.4.3. + + BIND 9.4-ESV will be supported until December 31, 2010, at + which time you will need to upgrade to the current release + of BIND. + BIND 9.4.3 BIND 9.4.3 is a maintenance release, fixing bugs in 9.4.2. @@ -67,7 +77,7 @@ BIND 9.4.0 Implemented "additional section caching" (or "acache"), an internal cache framework for additional section content to improve response performance. Several configuration options - were provided to control the behavior. + were provided to control the behaviour. New notify type 'master-only'. Enable notify for master zones only. @@ -76,13 +86,14 @@ BIND 9.4.0 rndc now allows addresses to be set in the server clauses. - New option "allow-query-cache". This lets allow-query be - used to specify the default zone access level rather than - having to have every zone override the global value. - allow-query-cache can be set at both the options and view - levels. If allow-query-cache is not set then allow-recursion - is used if set, otherwise allow-query is used if set, otherwise - the default (localhost; localnets;) is used. + New option "allow-query-cache". This lets "allow-query" + be used to specify the default zone access level rather + than having to have every zone override the global value. + "allow-query-cache" can be set at both the options and view + levels. If "allow-query-cache" is not set then "allow-recursion" + is used if set, otherwise "allow-query" is used if set + unless "recursion no;" is set in which case "none;" is used, + otherwise the default (localhost; localnets;) is used. rndc: the source address can now be specified. @@ -150,12 +161,12 @@ BIND 9.4.0 options for dnssec-signzone specify the input and output formats. - dnssec-signzone can now randomize signature end times + dnssec-signzone can now randomise signature end times (dnssec-signzone -j jitter). Add support for CH A record. - Add additional zone data consistancy checks. named-checkzone + Add additional zone data consistency checks. named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. New zone options: check-mx and integrity-check. Modified: releng/7.3/contrib/bind9/README.idnkit ============================================================================== --- releng/7.3/contrib/bind9/README.idnkit Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/README.idnkit Tue Feb 16 18:10:35 2010 (r203961) @@ -55,7 +55,7 @@ at least specify `--with-idn' option to `--with-libiconv' assumes that your C compiler has `-R' option, and that the option adds the specified run-time path - to an exacutable binary. If `-R' option of your compiler has + to an executable binary. If `-R' option of your compiler has different meaning, or your compiler lacks the option, you should use `--with-iconv' option instead. Binary command without run-time path information might be unexecutable. @@ -68,7 +68,7 @@ at least specify `--with-idn' option to specified, `--with-iconv' is prior to `--with-libiconv'. --with-iconv=ICONV_LIBSPEC - If your libc doens't provide iconv(), you need to specify the + If your libc doesn't provide iconv(), you need to specify the library containing iconv() with this option. `ICONV_LIBSPEC' is the argument(s) to `cc' or `ld' to link the library, for example, `--with-iconv="-L/usr/local/lib -liconv"'. @@ -82,7 +82,7 @@ at least specify `--with-idn' option to this option is not specified, `-L${PREFIX}/lib -lidnkit' is assumed, where ${PREFIX} is the installation prefix specified with `--with-idn' option above. You may need to use this - option to specify extra argments, for example, + option to specify extra arguments, for example, `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'. Please consult `README' for other configuration options. @@ -109,4 +109,4 @@ about idnkit and this patch. Bug reports and comments on this kit should be sent to mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -; $Id: README.idnkit,v 1.2.2.2 2005/09/12 02:12:08 marka Exp $ +; $Id: README.idnkit,v 1.2.2.3 2009/01/19 00:36:25 marka Exp $ Modified: releng/7.3/contrib/bind9/acconfig.h ============================================================================== --- releng/7.3/contrib/bind9/acconfig.h Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/acconfig.h Tue Feb 16 18:10:35 2010 (r203961) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.44.18.5 2005/04/29 00:15:20 marka Exp $ */ +/* $Id: acconfig.h,v 1.44.18.7 2008/12/01 23:45:56 tbox Exp $ */ /*! \file */ @@ -25,9 +25,6 @@ ***/ @TOP@ -/** define to `int' if doesn't define. */ -#undef ssize_t - /** define on DEC OSF to enable 4.4BSD style sa_len support */ #undef _SOCKADDR_LEN @@ -61,9 +58,6 @@ /** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */ #undef HAVE_IFLIST_SYSCTL -/** define if chroot() is available */ -#undef HAVE_CHROOT - /** define if tzset() is available */ #undef HAVE_TZSET @@ -115,7 +109,7 @@ int sigwait(const unsigned int *set, int * The silly continuation line is to keep configure from * commenting out the #undef. */ - + #undef \ va_start #define va_start(ap, last) \ Modified: releng/7.3/contrib/bind9/bin/check/check-tool.c ============================================================================== --- releng/7.3/contrib/bind9/bin/check/check-tool.c Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/check-tool.c Tue Feb 16 18:10:35 2010 (r203961) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.c,v 1.10.18.20 2008/10/24 01:43:17 tbox Exp $ */ +/* $Id: check-tool.c,v 1.10.18.23 2009/09/24 21:38:50 jinmei Exp $ */ /*! \file */ @@ -105,6 +105,7 @@ static isc_logcategory_t categories[] = { "queries", 0 }, { "unmatched", 0 }, { "update-security", 0 }, + { "query-errors", 0 }, { NULL, 0 } }; @@ -156,7 +157,7 @@ checkns(dns_zone_t *zone, dns_name_t *na cur->ai_next != NULL) cur = cur->ai_next; if (cur != NULL && cur->ai_canonname != NULL && - strcasecmp(ai->ai_canonname, namebuf) != 0) { + strcasecmp(cur->ai_canonname, namebuf) != 0) { dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' (out of zone) " "is a CNAME (illegal)", Modified: releng/7.3/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- releng/7.3/contrib/bind9/bin/check/named-checkconf.8 Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/named-checkconf.8 Tue Feb 16 18:10:35 2010 (r203961) @@ -1,7 +1,7 @@ .\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.16.18.13 2007/06/20 02:26:58 marka Exp $ +.\" $Id: named-checkconf.8,v 1.16.18.14 2009/07/11 01:31:43 tbox Exp $ .\" .hy 0 .ad l Modified: releng/7.3/contrib/bind9/bin/check/named-checkconf.c ============================================================================== --- releng/7.3/contrib/bind9/bin/check/named-checkconf.c Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/named-checkconf.c Tue Feb 16 18:10:35 2010 (r203961) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkconf.c,v 1.28.18.16 2007/11/26 23:46:18 tbox Exp $ */ +/* $Id: named-checkconf.c,v 1.28.18.18 2009/02/16 23:46:03 tbox Exp $ */ /*! \file */ @@ -59,9 +59,9 @@ isc_log_t *logc = NULL; /*% usage */ static void usage(void) { - fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] " + fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] " "[named.conf]\n"); - exit(1); + exit(1); } /*% directory callback */ @@ -171,9 +171,9 @@ configure_zone(const char *vclass, const zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name")); classobj = cfg_tuple_get(zconfig, "class"); - if (!cfg_obj_isstring(classobj)) - zclass = vclass; - else + if (!cfg_obj_isstring(classobj)) + zclass = vclass; + else zclass = cfg_obj_asstring(classobj); zoptions = cfg_tuple_get(zconfig, "options"); @@ -192,9 +192,9 @@ configure_zone(const char *vclass, const return (ISC_R_FAILURE); if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) return (ISC_R_SUCCESS); - cfg_map_get(zoptions, "database", &dbobj); - if (dbobj != NULL) - return (ISC_R_SUCCESS); + cfg_map_get(zoptions, "database", &dbobj); + if (dbobj != NULL) + return (ISC_R_SUCCESS); cfg_map_get(zoptions, "file", &fileobj); if (fileobj == NULL) return (ISC_R_FAILURE); @@ -285,8 +285,8 @@ configure_zone(const char *vclass, const } else INSIST(0); } else { - zone_options |= DNS_ZONEOPT_CHECKNAMES; - zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL; + zone_options |= DNS_ZONEOPT_CHECKNAMES; + zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL; } masterformat = dns_masterformat_text; @@ -397,7 +397,7 @@ main(int argc, char **argv) { int exit_status = 0; isc_entropy_t *ectx = NULL; isc_boolean_t load_zones = ISC_FALSE; - + while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) { switch (c) { case 'd': @@ -415,12 +415,6 @@ main(int argc, char **argv) { isc_result_totext(result)); exit(1); } - result = isc_dir_chdir("/"); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "isc_dir_chdir: %s\n", - isc_result_totext(result)); - exit(1); - } break; case 'v': Modified: releng/7.3/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- releng/7.3/contrib/bind9/bin/check/named-checkconf.html Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/named-checkconf.html Tue Feb 16 18:10:35 2010 (r203961) @@ -2,7 +2,7 @@ - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - - Permission to use, copy, modify, and distribute this software for any + - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: releng/7.3/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- releng/7.3/contrib/bind9/bin/check/named-checkzone.8 Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/named-checkzone.8 Tue Feb 16 18:10:35 2010 (r203961) @@ -1,7 +1,7 @@ -.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" -.\" Permission to use, copy, modify, and distribute this software for any +.\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.18.18.23 2007/06/20 02:26:58 marka Exp $ +.\" $Id: named-checkzone.8,v 1.18.18.25 2009/07/11 01:31:43 tbox Exp $ .\" .hy 0 .ad l @@ -77,7 +77,7 @@ When loading the zone file read the jour .PP \-c \fIclass\fR .RS 4 -Specify the class of the zone. If not specified "IN" is assumed. +Specify the class of the zone. If not specified, "IN" is assumed. .RE .PP \-i \fImode\fR @@ -263,7 +263,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004\-2007, 2009 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br Modified: releng/7.3/contrib/bind9/bin/check/named-checkzone.c ============================================================================== --- releng/7.3/contrib/bind9/bin/check/named-checkzone.c Tue Feb 16 16:38:57 2010 (r203960) +++ releng/7.3/contrib/bind9/bin/check/named-checkzone.c Tue Feb 16 18:10:35 2010 (r203961) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.29.18.21 2008/10/24 01:43:17 tbox Exp $ */ +/* $Id: named-checkzone.c,v 1.29.18.24 2009/05/29 02:19:20 marka Exp $ */ /*! \file */ @@ -122,9 +122,13 @@ main(int argc, char **argv) { */ if (strncmp(prog_name, "lt-", 3) == 0) prog_name += 3; - if (strcmp(prog_name, "named-checkzone") == 0) + +#define PROGCMP(X) \ + (strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0) + + if (PROGCMP("named-checkzone")) progmode = progmode_check; - else if (strcmp(prog_name, "named-compilezone") == 0) + else if (PROGCMP("named-compilezone")) progmode = progmode_compile; else INSIST(0); @@ -265,12 +269,6 @@ main(int argc, char **argv) { isc_result_totext(result)); exit(1); } - result = isc_dir_chdir("/"); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "isc_dir_chdir: %s\n", - isc_result_totext(result)); - exit(1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 19:00:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6200C1065693; Tue, 16 Feb 2010 19:00:48 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3548FC1D; Tue, 16 Feb 2010 19:00:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GJ0mih007373; Tue, 16 Feb 2010 19:00:48 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GJ0mV3007369; Tue, 16 Feb 2010 19:00:48 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201002161900.o1GJ0mV3007369@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 16 Feb 2010 19:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203962 - in stable/8: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:00:48 -0000 Author: emax Date: Tue Feb 16 19:00:47 2010 New Revision: 203962 URL: http://svn.freebsd.org/changeset/base/203962 Log: MFC: r203676 Introduce new rc.conf variable firewall_coscripts. It can be used to specify list of executables and/or rc scripts that should be executed after firewall starts/stops. Submitted by: Yuri Kurenkov Reviewed by: rhodes, rc@ Modified: stable/8/etc/defaults/rc.conf stable/8/etc/rc.d/ipfw stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/etc/ (props changed) stable/8/share/man/man5/ (props changed) Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Tue Feb 16 18:10:35 2010 (r203961) +++ stable/8/etc/defaults/rc.conf Tue Feb 16 19:00:47 2010 (r203962) @@ -118,6 +118,8 @@ firewall_type="UNKNOWN" # Firewall type firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging firewall_flags="" # Flags passed to ipfw when type is a file +firewall_coscripts="" # List of executables/scripts to run after + # firewall starts/stops firewall_client_net="192.0.2.0/24" # Network address for "client" firewall. firewall_simple_iif="ed1" # Inside network interface for "simple" # firewall. Modified: stable/8/etc/rc.d/ipfw ============================================================================== --- stable/8/etc/rc.d/ipfw Tue Feb 16 18:10:35 2010 (r203961) +++ stable/8/etc/rc.d/ipfw Tue Feb 16 19:00:47 2010 (r203962) @@ -14,6 +14,7 @@ name="ipfw" rcvar="firewall_enable" start_cmd="ipfw_start" start_precmd="ipfw_prestart" +start_postcmd="ipfw_poststart" stop_cmd="ipfw_stop" required_modules="ipfw" @@ -40,9 +41,6 @@ ipfw_start() [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall if [ -r "${firewall_script}" ]; then - if [ -f /etc/rc.d/natd ] ; then - /etc/rc.d/natd quietstart - fi /bin/sh "${firewall_script}" "${_firewall_type}" echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then @@ -57,6 +55,19 @@ ipfw_start() echo 'Firewall logging enabled.' sysctl net.inet.ip.fw.verbose=1 >/dev/null fi +} + +ipfw_poststart() +{ + local _coscript + + # Start firewall coscripts + # + for _coscript in ${firewall_coscripts} ; do + if [ -f "${_coscript}" ]; then + ${_coscript} quietstart + fi + done # Enable the firewall # @@ -67,13 +78,22 @@ ipfw_start() ipfw_stop() { + local _coscript + # Disable the firewall # ${SYSCTL_W} net.inet.ip.fw.enable=0 - if [ -f /etc/rc.d/natd ] ; then - /etc/rc.d/natd quietstop - fi + + # Stop firewall coscripts + # + for _coscript in `reverse_list ${firewall_coscripts}` ; do + if [ -f "${_coscript}" ]; then + ${_coscript} quietstop + fi + done } load_rc_config $name +firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}" + run_rc_command $* Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Tue Feb 16 18:10:35 2010 (r203961) +++ stable/8/share/man/man5/rc.conf.5 Tue Feb 16 19:00:47 2010 (r203962) @@ -512,6 +512,10 @@ specifies a filename. .Pq Vt str The IPv6 equivalent of .Va firewall_flags . +.It Va firewall_coscripts +.Pq Vt str +List of executables and/or rc scripts to run after firewall starts/stops. +Default is empty. .\" ----- firewall_nat_enable setting -------------------------------- .It Va firewall_nat_enable .Pq Vt bool From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 19:28:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEB0A10656A5; Tue, 16 Feb 2010 19:28:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC0498FC33; Tue, 16 Feb 2010 19:28:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GJSA4I013391; Tue, 16 Feb 2010 19:28:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GJSAfP013385; Tue, 16 Feb 2010 19:28:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002161928.o1GJSAfP013385@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 19:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203963 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:28:10 -0000 Author: imp Date: Tue Feb 16 19:28:10 2010 New Revision: 203963 URL: http://svn.freebsd.org/changeset/base/203963 Log: Remove NetBSD Foundation clauses 3 & 4. They eliminated those clauses last year. Modified: head/include/getopt.h head/include/hesiod.h head/include/nl_types.h head/include/nsswitch.h head/include/wchar.h Modified: head/include/getopt.h ============================================================================== --- head/include/getopt.h Tue Feb 16 19:00:47 2010 (r203962) +++ head/include/getopt.h Tue Feb 16 19:28:10 2010 (r203963) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/include/hesiod.h ============================================================================== --- head/include/hesiod.h Tue Feb 16 19:00:47 2010 (r203962) +++ head/include/hesiod.h Tue Feb 16 19:28:10 2010 (r203963) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/include/nl_types.h ============================================================================== --- head/include/nl_types.h Tue Feb 16 19:00:47 2010 (r203962) +++ head/include/nl_types.h Tue Feb 16 19:28:10 2010 (r203963) @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/include/nsswitch.h ============================================================================== --- head/include/nsswitch.h Tue Feb 16 19:00:47 2010 (r203962) +++ head/include/nsswitch.h Tue Feb 16 19:28:10 2010 (r203963) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/include/wchar.h ============================================================================== --- head/include/wchar.h Tue Feb 16 19:00:47 2010 (r203962) +++ head/include/wchar.h Tue Feb 16 19:28:10 2010 (r203963) @@ -41,13 +41,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 19:39:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06727106566C; Tue, 16 Feb 2010 19:39:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6DC88FC1A; Tue, 16 Feb 2010 19:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GJdoo9016024; Tue, 16 Feb 2010 19:39:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GJdo5M015979; Tue, 16 Feb 2010 19:39:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002161939.o1GJdo5M015979@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 19:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203964 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:39:51 -0000 Author: imp Date: Tue Feb 16 19:39:50 2010 New Revision: 203964 URL: http://svn.freebsd.org/changeset/base/203964 Log: Remove the Berkeley clause 3's. Add a few $FreeBSD$ Modified: head/include/_ctype.h head/include/a.out.h head/include/ar.h head/include/assert.h head/include/ctype.h head/include/db.h head/include/dirent.h head/include/dlfcn.h head/include/err.h head/include/fnmatch.h head/include/fstab.h head/include/fts.h head/include/glob.h head/include/grp.h head/include/limits.h head/include/locale.h head/include/memory.h head/include/mpool.h head/include/ndbm.h head/include/netdb.h head/include/nlist.h head/include/paths.h head/include/pwd.h head/include/ranlib.h head/include/regex.h head/include/regexp.h head/include/resolv.h head/include/runetype.h head/include/setjmp.h head/include/signal.h head/include/stab.h head/include/stddef.h head/include/stdio.h head/include/stdlib.h head/include/string.h head/include/sysexits.h head/include/tar.h head/include/termios.h head/include/time.h head/include/timeconv.h head/include/ttyent.h head/include/unistd.h head/include/utime.h head/include/vis.h Modified: head/include/_ctype.h ============================================================================== --- head/include/_ctype.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/_ctype.h Tue Feb 16 19:39:50 2010 (r203964) @@ -18,11 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/a.out.h ============================================================================== --- head/include/a.out.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/a.out.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/ar.h ============================================================================== --- head/include/ar.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/ar.h Tue Feb 16 19:39:50 2010 (r203964) @@ -18,11 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/assert.h ============================================================================== --- head/include/assert.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/assert.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/ctype.h ============================================================================== --- head/include/ctype.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/ctype.h Tue Feb 16 19:39:50 2010 (r203964) @@ -18,11 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/db.h ============================================================================== --- head/include/db.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/db.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/dirent.h ============================================================================== --- head/include/dirent.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/dirent.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/dlfcn.h ============================================================================== --- head/include/dlfcn.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/dlfcn.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/err.h ============================================================================== --- head/include/err.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/err.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/fnmatch.h ============================================================================== --- head/include/fnmatch.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/fnmatch.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/fstab.h ============================================================================== --- head/include/fstab.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/fstab.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/fts.h ============================================================================== --- head/include/fts.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/fts.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/glob.h ============================================================================== --- head/include/glob.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/glob.h Tue Feb 16 19:39:50 2010 (r203964) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/grp.h ============================================================================== --- head/include/grp.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/grp.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/limits.h ============================================================================== --- head/include/limits.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/limits.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/locale.h ============================================================================== --- head/include/locale.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/locale.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/memory.h ============================================================================== --- head/include/memory.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/memory.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)memory.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #include Modified: head/include/mpool.h ============================================================================== --- head/include/mpool.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/mpool.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/ndbm.h ============================================================================== --- head/include/ndbm.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/ndbm.h Tue Feb 16 19:39:50 2010 (r203964) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/netdb.h ============================================================================== --- head/include/netdb.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/netdb.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/nlist.h ============================================================================== --- head/include/nlist.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/nlist.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/paths.h ============================================================================== --- head/include/paths.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/paths.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/pwd.h ============================================================================== --- head/include/pwd.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/pwd.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/ranlib.h ============================================================================== --- head/include/ranlib.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/ranlib.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)ranlib.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _RANLIB_H_ Modified: head/include/regex.h ============================================================================== --- head/include/regex.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/regex.h Tue Feb 16 19:39:50 2010 (r203964) @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/regexp.h ============================================================================== --- head/include/regexp.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/regexp.h Tue Feb 16 19:39:50 2010 (r203964) @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/resolv.h ============================================================================== --- head/include/resolv.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/resolv.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/runetype.h ============================================================================== --- head/include/runetype.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/runetype.h Tue Feb 16 19:39:50 2010 (r203964) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/setjmp.h ============================================================================== --- head/include/setjmp.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/setjmp.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/signal.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/stab.h ============================================================================== --- head/include/stab.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/stab.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)stab.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _STAB_H_ Modified: head/include/stddef.h ============================================================================== --- head/include/stddef.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/stddef.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/stdio.h Tue Feb 16 19:39:50 2010 (r203964) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/stdlib.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/string.h ============================================================================== --- head/include/string.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/string.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/sysexits.h ============================================================================== --- head/include/sysexits.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/sysexits.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _SYSEXITS_H_ Modified: head/include/tar.h ============================================================================== --- head/include/tar.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/tar.h Tue Feb 16 19:39:50 2010 (r203964) @@ -13,11 +13,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -34,6 +30,8 @@ * SUCH DAMAGE. * * @(#)tar.h 8.2 (Berkeley) 1/4/94 + * + * $FreeBSD$ */ #ifndef _TAR_H Modified: head/include/termios.h ============================================================================== --- head/include/termios.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/termios.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/time.h ============================================================================== --- head/include/time.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/time.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/timeconv.h ============================================================================== --- head/include/timeconv.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/timeconv.h Tue Feb 16 19:39:50 2010 (r203964) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/ttyent.h ============================================================================== --- head/include/ttyent.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/ttyent.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/unistd.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/utime.h ============================================================================== --- head/include/utime.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/utime.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/vis.h ============================================================================== --- head/include/vis.h Tue Feb 16 19:28:10 2010 (r203963) +++ head/include/vis.h Tue Feb 16 19:39:50 2010 (r203964) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 19:46:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C83471065679; Tue, 16 Feb 2010 19:46:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B467E8FC19; Tue, 16 Feb 2010 19:46:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GJkkUA017651; Tue, 16 Feb 2010 19:46:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GJkkS6017639; Tue, 16 Feb 2010 19:46:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002161946.o1GJkkS6017639@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 19:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203965 - in head/include: arpa protocols X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:46:47 -0000 Author: imp Date: Tue Feb 16 19:46:46 2010 New Revision: 203965 URL: http://svn.freebsd.org/changeset/base/203965 Log: Remove clause 3 from Berkeley copyrights. Add a few $FreeBSD$'s. Modified: head/include/arpa/ftp.h head/include/arpa/inet.h head/include/arpa/nameser.h head/include/arpa/nameser_compat.h head/include/arpa/telnet.h head/include/arpa/tftp.h head/include/protocols/dumprestore.h head/include/protocols/routed.h head/include/protocols/rwhod.h head/include/protocols/talkd.h head/include/protocols/timed.h Modified: head/include/arpa/ftp.h ============================================================================== --- head/include/arpa/ftp.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/ftp.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)ftp.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _ARPA_FTP_H_ Modified: head/include/arpa/inet.h ============================================================================== --- head/include/arpa/inet.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/inet.h Tue Feb 16 19:46:46 2010 (r203965) @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/arpa/nameser.h ============================================================================== --- head/include/arpa/nameser.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/nameser.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/arpa/nameser_compat.h ============================================================================== --- head/include/arpa/nameser_compat.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/nameser_compat.h Tue Feb 16 19:46:46 2010 (r203965) @@ -9,11 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/arpa/telnet.h ============================================================================== --- head/include/arpa/telnet.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/telnet.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/arpa/tftp.h ============================================================================== --- head/include/arpa/tftp.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/arpa/tftp.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/protocols/dumprestore.h ============================================================================== --- head/include/protocols/dumprestore.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/protocols/dumprestore.h Tue Feb 16 19:46:46 2010 (r203965) @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/protocols/routed.h ============================================================================== --- head/include/protocols/routed.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/protocols/routed.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/include/protocols/rwhod.h ============================================================================== --- head/include/protocols/rwhod.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/protocols/rwhod.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)rwhod.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _PROTOCOLS_RWHOD_H_ Modified: head/include/protocols/talkd.h ============================================================================== --- head/include/protocols/talkd.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/protocols/talkd.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,6 +27,8 @@ * SUCH DAMAGE. * * @(#)talkd.h 8.1 (Berkeley) 6/2/93 + * + * $FreeBSD$ */ #ifndef _PROTOCOLS_TALKD_H_ Modified: head/include/protocols/timed.h ============================================================================== --- head/include/protocols/timed.h Tue Feb 16 19:39:50 2010 (r203964) +++ head/include/protocols/timed.h Tue Feb 16 19:46:46 2010 (r203965) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 19:59:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A7F8106568F; Tue, 16 Feb 2010 19:59:10 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67C058FC1B; Tue, 16 Feb 2010 19:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GJxAnF020366; Tue, 16 Feb 2010 19:59:10 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GJxArP020364; Tue, 16 Feb 2010 19:59:10 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002161959.o1GJxArP020364@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 16 Feb 2010 19:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203966 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 19:59:10 -0000 Author: jh Date: Tue Feb 16 19:59:10 2010 New Revision: 203966 URL: http://svn.freebsd.org/changeset/base/203966 Log: Improve descriptions for tmpfs mount options. The descriptions have been mostly obtained from NetBSD mount_tmpfs(8) manual page. Obtained from: NetBSD Discussed with: delphij Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Tue Feb 16 19:46:46 2010 (r203965) +++ head/share/man/man5/tmpfs.5 Tue Feb 16 19:59:10 2010 (r203966) @@ -1,4 +1,4 @@ -.\" +.\"- .\" Copyright (c) 2007 Xin LI .\" All rights reserved. .\" @@ -22,9 +22,34 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" +.\"- +.\" Copyright (c) 2005, 2006 The NetBSD Foundation, 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 January 29, 2010 +.Dd February 16, 2010 .Dt TMPFS 5 .Os .Sh NAME @@ -59,17 +84,28 @@ mounting file systems: .Bl -tag -width indent .It Cm gid -root group id. +Specifies the group ID of the root inode of the file system. +Defaults to the mount point's GID. .It Cm uid -root user id. +Specifies the user ID of the root inode of the file system. +Defaults to the mount point's UID. .It Cm mode -permissions in octal format. +Specifies the mode (in octal notation) of the root inode of the file system. +Defaults to the mount point's mode. .It Cm inodes -maximum number of inodes. +Specifies the maximum number of nodes available to the file system. +If not specified, the file system chooses a reasonable maximum based on +the file system size, which can be limited with the +.Cm size +option. .It Cm size -maximum size (in bytes) for the file system. +Specifies the total file system size in bytes. +If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE +is given, the available amount of memory (including +main memory and swap space) will be used. .It Cm maxfilesize -maximum file size (in bytes). +Specifies the maximum file size in bytes. +Defaults to the maximum possible value. .El .Sh EXAMPLES To mount a From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 20:00:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A836E10656A9; Tue, 16 Feb 2010 20:00:20 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CEA18FC1B; Tue, 16 Feb 2010 20:00:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GK0KP6020723; Tue, 16 Feb 2010 20:00:20 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GK0KgX020720; Tue, 16 Feb 2010 20:00:20 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002162000.o1GK0KgX020720@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 16 Feb 2010 20:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203967 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 20:00:20 -0000 Author: jh Date: Tue Feb 16 20:00:20 2010 New Revision: 203967 URL: http://svn.freebsd.org/changeset/base/203967 Log: Xref mdmfs(8). Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Tue Feb 16 19:59:10 2010 (r203966) +++ head/share/man/man5/tmpfs.5 Tue Feb 16 20:00:20 2010 (r203967) @@ -117,6 +117,7 @@ memory file system: .Xr nmount 2 , .Xr unmount 2 , .Xr fstab 5 , +.Xr mdmfs 8 , .Xr mount 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 20:00:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73BEB1065693; Tue, 16 Feb 2010 20:00:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FA588FC22; Tue, 16 Feb 2010 20:00:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GK0L69020751; Tue, 16 Feb 2010 20:00:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GK0Lhb020744; Tue, 16 Feb 2010 20:00:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002162000.o1GK0Lhb020744@svn.freebsd.org> From: Marius Strobl Date: Tue, 16 Feb 2010 20:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203968 - in head/sys: modules/nfs_common modules/nfsclient modules/nfsserver nfs nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 20:00:21 -0000 Author: marius Date: Tue Feb 16 20:00:21 2010 New Revision: 203968 URL: http://svn.freebsd.org/changeset/base/203968 Log: Factor out the code shared between NFS client and server into its own module. With r203732 it became apparent that creating the sysctl nodes twice causes at least a warning, however the whole code shouldn't be present twice in the first place. Discussed with: rmacklem Added: head/sys/modules/nfs_common/ head/sys/modules/nfs_common/Makefile (contents, props changed) Modified: head/sys/modules/nfsclient/Makefile head/sys/modules/nfsserver/Makefile head/sys/nfs/nfs_common.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsserver/nfs_srvsubs.c Added: head/sys/modules/nfs_common/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/nfs_common/Makefile Tue Feb 16 20:00:21 2010 (r203968) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../nfs + +KMOD= nfs_common +SRCS= nfs_common.c opt_nfs.h vnode_if.h + +.include Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Tue Feb 16 20:00:20 2010 (r203967) +++ head/sys/modules/nfsclient/Makefile Tue Feb 16 20:00:21 2010 (r203968) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs ${.CURDIR}/../../rpc +.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../rpc KMOD= nfsclient SRCS= vnode_if.h \ nfs_bio.c nfs_lock.c nfs_node.c nfs_subs.c nfs_nfsiod.c \ - nfs_vfsops.c nfs_vnops.c nfs_common.c nfs_krpc.c \ + nfs_vfsops.c nfs_vnops.c nfs_krpc.c \ opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h SRCS+= opt_inet6.h opt_kdtrace.h opt_kgssapi.h Modified: head/sys/modules/nfsserver/Makefile ============================================================================== --- head/sys/modules/nfsserver/Makefile Tue Feb 16 20:00:20 2010 (r203967) +++ head/sys/modules/nfsserver/Makefile Tue Feb 16 20:00:21 2010 (r203968) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../nfsserver ${.CURDIR}/../../nfs +.PATH: ${.CURDIR}/../../nfsserver KMOD= nfsserver SRCS= vnode_if.h \ - nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsubs.c nfs_common.c \ + nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsubs.c \ opt_mac.h \ opt_kgssapi.h \ opt_nfs.h Modified: head/sys/nfs/nfs_common.c ============================================================================== --- head/sys/nfs/nfs_common.c Tue Feb 16 20:00:20 2010 (r203967) +++ head/sys/nfs/nfs_common.c Tue Feb 16 20:00:21 2010 (r203968) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -79,15 +80,15 @@ nfstype nfsv3_type[9] = { static void *nfsm_dissect_xx_sub(int s, struct mbuf **md, caddr_t *dpos, int how); -SYSCTL_DECL(_vfs_nfs); +SYSCTL_NODE(_vfs, OID_AUTO, nfs_common, CTLFLAG_RD, 0, "NFS common support"); static int nfs_realign_test; -SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RD, &nfs_realign_test, - 0, "Number of realign tests done"); +SYSCTL_INT(_vfs_nfs_common, OID_AUTO, realign_test, CTLFLAG_RD, + &nfs_realign_test, 0, "Number of realign tests done"); static int nfs_realign_count; -SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RD, &nfs_realign_count, - 0, "Number of mbuf realignments done"); +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) @@ -404,3 +405,12 @@ nfs_realign(struct mbuf **pm, int how) } return (0); } + +static moduledata_t nfs_common_mod = { + "nfs_common", + NULL, + NULL +}; + +DECLARE_MODULE(nfs_common, nfs_common_mod, SI_SUB_VFS, SI_ORDER_ANY); +MODULE_VERSION(nfs_common, 1); Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Tue Feb 16 20:00:20 2010 (r203967) +++ head/sys/nfsclient/nfs_vfsops.c Tue Feb 16 20:00:21 2010 (r203968) @@ -147,6 +147,7 @@ MODULE_DEPEND(nfs, krpc, 1, 1, 1); #ifdef KGSSAPI MODULE_DEPEND(nfs, kgssapi, 1, 1, 1); #endif +MODULE_DEPEND(nfs, nfs_common, 1, 1, 1); static struct nfs_rpcops nfs_rpcops = { nfs_readrpc, Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Tue Feb 16 20:00:20 2010 (r203967) +++ head/sys/nfsserver/nfs_srvsubs.c Tue Feb 16 20:00:21 2010 (r203968) @@ -560,6 +560,7 @@ DECLARE_MODULE(nfsserver, nfsserver_mod, MODULE_VERSION(nfsserver, 1); MODULE_DEPEND(nfsserver, nfssvc, 1, 1, 1); MODULE_DEPEND(nfsserver, krpc, 1, 1, 1); +MODULE_DEPEND(nfsserver, nfs_common, 1, 1, 1); /* * Set up nameidata for a lookup() call and do it. From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 20:46:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 590421065692; Tue, 16 Feb 2010 20:46:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 471F58FC0C; Tue, 16 Feb 2010 20:46:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GKkNZd030872; Tue, 16 Feb 2010 20:46:23 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GKkNra030870; Tue, 16 Feb 2010 20:46:23 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002162046.o1GKkNra030870@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 20:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203969 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 20:46:23 -0000 Author: marcel Date: Tue Feb 16 20:46:22 2010 New Revision: 203969 URL: http://svn.freebsd.org/changeset/base/203969 Log: Define TLS_MODEL for PowerPC as well. Since PowerPC uses variant I, like ia64, leave it empty (default model). Modified: head/lib/libc/stdlib/malloc.c Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Tue Feb 16 20:00:21 2010 (r203968) +++ head/lib/libc/stdlib/malloc.c Tue Feb 16 20:46:22 2010 (r203969) @@ -250,6 +250,7 @@ __FBSDID("$FreeBSD$"); #endif #ifdef __powerpc__ # define LG_QUANTUM 4 +# define TLS_MODEL /* default */ #endif #ifdef __s390x__ # define LG_QUANTUM 4 From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 21:39:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A05701065695; Tue, 16 Feb 2010 21:39:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 900D18FC2C; Tue, 16 Feb 2010 21:39:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GLdKTt042680; Tue, 16 Feb 2010 21:39:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GLdKqO042678; Tue, 16 Feb 2010 21:39:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002162139.o1GLdKqO042678@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 21:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203970 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:39:20 -0000 Author: imp Date: Tue Feb 16 21:39:20 2010 New Revision: 203970 URL: http://svn.freebsd.org/changeset/base/203970 Log: The NetBSD Foundation has granted permission for people to remove clause 3 and 4 from their software. Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Tue Feb 16 20:46:22 2010 (r203969) +++ head/sbin/ifconfig/ifieee80211.c Tue Feb 16 21:39:20 2010 (r203970) @@ -43,13 +43,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 21:43:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD94106566B; Tue, 16 Feb 2010 21:43:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2793C8FC14; Tue, 16 Feb 2010 21:43:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GLhwJ6043761; Tue, 16 Feb 2010 21:43:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GLhvxg043748; Tue, 16 Feb 2010 21:43:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002162143.o1GLhvxg043748@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 21:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203971 - in head/usr.bin: gencat getent nl stat usbhidaction usbhidctl xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:43:58 -0000 Author: imp Date: Tue Feb 16 21:43:57 2010 New Revision: 203971 URL: http://svn.freebsd.org/changeset/base/203971 Log: The NetBSD Foundation has granted permission to remove clause 3 and 4 from their software. Obtained from: NetBSD Modified: head/usr.bin/gencat/gencat.c head/usr.bin/getent/getent.1 head/usr.bin/getent/getent.c head/usr.bin/nl/nl.1 head/usr.bin/nl/nl.c head/usr.bin/stat/stat.1 head/usr.bin/stat/stat.c head/usr.bin/usbhidaction/usbhidaction.1 head/usr.bin/usbhidaction/usbhidaction.c head/usr.bin/usbhidctl/usbhid.c head/usr.bin/usbhidctl/usbhidctl.1 head/usr.bin/xlint/lint1/makeman Modified: head/usr.bin/gencat/gencat.c ============================================================================== --- head/usr.bin/gencat/gencat.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/gencat/gencat.c Tue Feb 16 21:43:57 2010 (r203971) @@ -18,13 +18,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/getent/getent.1 ============================================================================== --- head/usr.bin/getent/getent.1 Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/getent/getent.1 Tue Feb 16 21:43:57 2010 (r203971) @@ -14,13 +14,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/getent/getent.c Tue Feb 16 21:43:57 2010 (r203971) @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/nl/nl.1 ============================================================================== --- head/usr.bin/nl/nl.1 Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/nl/nl.1 Tue Feb 16 21:43:57 2010 (r203971) @@ -14,13 +14,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/nl/nl.c ============================================================================== --- head/usr.bin/nl/nl.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/nl/nl.c Tue Feb 16 21:43:57 2010 (r203971) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/stat/stat.1 ============================================================================== --- head/usr.bin/stat/stat.1 Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/stat/stat.1 Tue Feb 16 21:43:57 2010 (r203971) @@ -14,13 +14,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/stat/stat.c ============================================================================== --- head/usr.bin/stat/stat.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/stat/stat.c Tue Feb 16 21:43:57 2010 (r203971) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/usbhidaction/usbhidaction.1 ============================================================================== --- head/usr.bin/usbhidaction/usbhidaction.1 Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/usbhidaction/usbhidaction.1 Tue Feb 16 21:43:57 2010 (r203971) @@ -15,13 +15,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/usbhidaction/usbhidaction.c ============================================================================== --- head/usr.bin/usbhidaction/usbhidaction.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/usbhidaction/usbhidaction.c Tue Feb 16 21:43:57 2010 (r203971) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/usbhidctl/usbhid.c ============================================================================== --- head/usr.bin/usbhidctl/usbhid.c Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/usbhidctl/usbhid.c Tue Feb 16 21:43:57 2010 (r203971) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/usbhidctl/usbhidctl.1 ============================================================================== --- head/usr.bin/usbhidctl/usbhidctl.1 Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/usbhidctl/usbhidctl.1 Tue Feb 16 21:43:57 2010 (r203971) @@ -15,13 +15,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.bin/xlint/lint1/makeman ============================================================================== --- head/usr.bin/xlint/lint1/makeman Tue Feb 16 21:39:20 2010 (r203970) +++ head/usr.bin/xlint/lint1/makeman Tue Feb 16 21:43:57 2010 (r203971) @@ -15,13 +15,6 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 21:47:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 152CA106566B; Tue, 16 Feb 2010 21:47:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02EBA8FC0C; Tue, 16 Feb 2010 21:47:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GLl56u044502; Tue, 16 Feb 2010 21:47:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GLl5LP044492; Tue, 16 Feb 2010 21:47:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002162147.o1GLl5LP044492@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 21:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203972 - in head/usr.sbin: eeprom makefs makefs/compat rpcbind usbdevs yppoll X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:47:06 -0000 Author: imp Date: Tue Feb 16 21:47:05 2010 New Revision: 203972 URL: http://svn.freebsd.org/changeset/base/203972 Log: The NetBSD Foundation has given permission to remove clause 3 and 4 from their liceense. Obtained from: NetBSD Modified: head/usr.sbin/eeprom/eeprom.8 head/usr.sbin/eeprom/eeprom.c head/usr.sbin/makefs/compat/pwcache.c head/usr.sbin/makefs/compat/strsuftoll.c head/usr.sbin/makefs/getid.c head/usr.sbin/rpcbind/util.c head/usr.sbin/usbdevs/usbdevs.8 head/usr.sbin/usbdevs/usbdevs.c head/usr.sbin/yppoll/yppoll.8 Modified: head/usr.sbin/eeprom/eeprom.8 ============================================================================== --- head/usr.sbin/eeprom/eeprom.8 Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/eeprom/eeprom.8 Tue Feb 16 21:47:05 2010 (r203972) @@ -13,13 +13,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/eeprom/eeprom.c ============================================================================== --- head/usr.sbin/eeprom/eeprom.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/eeprom/eeprom.c Tue Feb 16 21:47:05 2010 (r203972) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/makefs/compat/pwcache.c ============================================================================== --- head/usr.sbin/makefs/compat/pwcache.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/makefs/compat/pwcache.c Tue Feb 16 21:47:05 2010 (r203972) @@ -45,13 +45,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/makefs/compat/strsuftoll.c ============================================================================== --- head/usr.sbin/makefs/compat/strsuftoll.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/makefs/compat/strsuftoll.c Tue Feb 16 21:47:05 2010 (r203972) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/makefs/getid.c ============================================================================== --- head/usr.sbin/makefs/getid.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/makefs/getid.c Tue Feb 16 21:47:05 2010 (r203972) @@ -46,13 +46,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/rpcbind/util.c ============================================================================== --- head/usr.sbin/rpcbind/util.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/rpcbind/util.c Tue Feb 16 21:47:05 2010 (r203972) @@ -18,13 +18,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -185,6 +178,8 @@ addrmerge(struct netbuf *caller, char *s if (ifsa == NULL || ifsa->sa_family != hint_sa->sa_family || !(ifap->ifa_flags & IFF_UP)) continue; + if (!addr_is_bound(ifsa)) + continue; if (!(ifap->ifa_flags & IFF_LOOPBACK) && !listen_addr(ifsa)) continue; Modified: head/usr.sbin/usbdevs/usbdevs.8 ============================================================================== --- head/usr.sbin/usbdevs/usbdevs.8 Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/usbdevs/usbdevs.8 Tue Feb 16 21:47:05 2010 (r203972) @@ -12,13 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/usbdevs/usbdevs.c ============================================================================== --- head/usr.sbin/usbdevs/usbdevs.c Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/usbdevs/usbdevs.c Tue Feb 16 21:47:05 2010 (r203972) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/usr.sbin/yppoll/yppoll.8 ============================================================================== --- head/usr.sbin/yppoll/yppoll.8 Tue Feb 16 21:43:57 2010 (r203971) +++ head/usr.sbin/yppoll/yppoll.8 Tue Feb 16 21:47:05 2010 (r203972) @@ -12,13 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 21:49:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2AB61065670; Tue, 16 Feb 2010 21:49:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2C368FC19; Tue, 16 Feb 2010 21:49:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GLnaOX045062; Tue, 16 Feb 2010 21:49:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GLnaDY045060; Tue, 16 Feb 2010 21:49:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002162149.o1GLnaDY045060@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 21:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203973 - head/libexec/rtld-elf/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:49:37 -0000 Author: imp Date: Tue Feb 16 21:49:36 2010 New Revision: 203973 URL: http://svn.freebsd.org/changeset/base/203973 Log: The NetBSD Foundation has granted permission to remove clauses 3 and 4. Obtained from: NetBSD Modified: head/libexec/rtld-elf/arm/rtld_start.S Modified: head/libexec/rtld-elf/arm/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/arm/rtld_start.S Tue Feb 16 21:47:05 2010 (r203972) +++ head/libexec/rtld-elf/arm/rtld_start.S Tue Feb 16 21:49:36 2010 (r203973) @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 21:59:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F6411065695; Tue, 16 Feb 2010 21:59:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF1D8FC14; Tue, 16 Feb 2010 21:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GLxHXf047266; Tue, 16 Feb 2010 21:59:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GLxH5p047249; Tue, 16 Feb 2010 21:59:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002162159.o1GLxH5p047249@svn.freebsd.org> From: Warner Losh Date: Tue, 16 Feb 2010 21:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203974 - in head/sys/arm: arm include sa11x0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 21:59:19 -0000 Author: imp Date: Tue Feb 16 21:59:17 2010 New Revision: 203974 URL: http://svn.freebsd.org/changeset/base/203974 Log: The NetBSD Foundation has granted permission to remove clauses 3 and 4. Obtained from: NetBSD Modified: head/sys/arm/arm/pmap.c head/sys/arm/arm/support.S head/sys/arm/include/_inttypes.h head/sys/arm/include/_stdint.h head/sys/arm/include/bus.h head/sys/arm/include/bus_dma.h head/sys/arm/include/ucontext.h head/sys/arm/sa11x0/sa11x0.c head/sys/arm/sa11x0/sa11x0_dmacreg.h head/sys/arm/sa11x0/sa11x0_gpioreg.h head/sys/arm/sa11x0/sa11x0_irq.S head/sys/arm/sa11x0/sa11x0_irqhandler.c head/sys/arm/sa11x0/sa11x0_ostreg.h head/sys/arm/sa11x0/sa11x0_ppcreg.h head/sys/arm/sa11x0/sa11x0_reg.h head/sys/arm/sa11x0/sa11x0_var.h Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/arm/pmap.c Tue Feb 16 21:59:17 2010 (r203974) @@ -77,13 +77,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/arm/support.S ============================================================================== --- head/sys/arm/arm/support.S Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/arm/support.S Tue Feb 16 21:59:17 2010 (r203974) @@ -72,13 +72,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/include/_inttypes.h ============================================================================== --- head/sys/arm/include/_inttypes.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/include/_inttypes.h Tue Feb 16 21:59:17 2010 (r203974) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/include/_stdint.h ============================================================================== --- head/sys/arm/include/_stdint.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/include/_stdint.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/include/bus.h Tue Feb 16 21:59:17 2010 (r203974) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/include/bus_dma.h ============================================================================== --- head/sys/arm/include/bus_dma.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/include/bus_dma.h Tue Feb 16 21:59:17 2010 (r203974) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/include/ucontext.h ============================================================================== --- head/sys/arm/include/ucontext.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/include/ucontext.h Tue Feb 16 21:59:17 2010 (r203974) @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/sa11x0/sa11x0.c ============================================================================== --- head/sys/arm/sa11x0/sa11x0.c Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0.c Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. */ /*- * Copyright (c) 1999 Modified: head/sys/arm/sa11x0/sa11x0_dmacreg.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_dmacreg.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_dmacreg.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/arm/sa11x0/sa11x0_gpioreg.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_gpioreg.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_gpioreg.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/sa11x0/sa11x0_irq.S ============================================================================== --- head/sys/arm/sa11x0/sa11x0_irq.S Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_irq.S Tue Feb 16 21:59:17 2010 (r203974) @@ -16,13 +16,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Mark Brinicombe - * for the NetBSD Project. - * 4. The name of the company nor the name of the author may be used to - * endorse or promote products derived from this software without specific - * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF Modified: head/sys/arm/sa11x0/sa11x0_irqhandler.c ============================================================================== --- head/sys/arm/sa11x0/sa11x0_irqhandler.c Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_irqhandler.c Tue Feb 16 21:59:17 2010 (r203974) @@ -19,13 +19,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/sa11x0/sa11x0_ostreg.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_ostreg.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_ostreg.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/sa11x0/sa11x0_ppcreg.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_ppcreg.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_ppcreg.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/arm/sa11x0/sa11x0_reg.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_reg.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_reg.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/arm/sa11x0/sa11x0_var.h ============================================================================== --- head/sys/arm/sa11x0/sa11x0_var.h Tue Feb 16 21:49:36 2010 (r203973) +++ head/sys/arm/sa11x0/sa11x0_var.h Tue Feb 16 21:59:17 2010 (r203974) @@ -14,13 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 22:19:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4778106566C; Tue, 16 Feb 2010 22:19:55 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A33E8FC17; Tue, 16 Feb 2010 22:19:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GMJtBq051862; Tue, 16 Feb 2010 22:19:55 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GMJtZi051858; Tue, 16 Feb 2010 22:19:55 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002162219.o1GMJtZi051858@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 16 Feb 2010 22:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203975 - stable/8/bin/cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 22:19:55 -0000 Author: gavin Date: Tue Feb 16 22:19:55 2010 New Revision: 203975 URL: http://svn.freebsd.org/changeset/base/203975 Log: Merge r202461 from head: Implement an "-x" option to cp(1), for compatibility with Linux and feature parity with du(1) and similar: When set, cp(1) will not traverse mount points. PR: bin/88056 Initial patch by: Graham J Lee leeg teaching.physics.ox.ac.uk Modified: stable/8/bin/cp/cp.1 stable/8/bin/cp/cp.c stable/8/bin/cp/utils.c Directory Properties: stable/8/bin/cp/ (props changed) Modified: stable/8/bin/cp/cp.1 ============================================================================== --- stable/8/bin/cp/cp.1 Tue Feb 16 21:59:17 2010 (r203974) +++ stable/8/bin/cp/cp.1 Tue Feb 16 22:19:55 2010 (r203975) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 27, 2006 +.Dd January 17, 2010 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -183,6 +183,8 @@ permissions. Cause .Nm to be verbose, showing files as they are copied. +.It Fl x +File system mount points are not traversed. .El .Pp For each destination file that already exists, its contents are Modified: stable/8/bin/cp/cp.c ============================================================================== --- stable/8/bin/cp/cp.c Tue Feb 16 21:59:17 2010 (r203974) +++ stable/8/bin/cp/cp.c Tue Feb 16 22:19:55 2010 (r203975) @@ -101,8 +101,9 @@ main(int argc, char *argv[]) int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; char *target; + fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprv")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -150,6 +151,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'x': + fts_options |= FTS_XDEV; + break; default: usage(); break; @@ -160,7 +164,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(); - fts_options = FTS_NOCHDIR | FTS_PHYSICAL; if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); if (rflag) Modified: stable/8/bin/cp/utils.c ============================================================================== --- stable/8/bin/cp/utils.c Tue Feb 16 21:59:17 2010 (r203974) +++ stable/8/bin/cp/utils.c Tue Feb 16 22:19:55 2010 (r203975) @@ -518,8 +518,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... " +"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", +" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " "target_directory"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 22:23:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E35D106566C; Tue, 16 Feb 2010 22:23:33 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CF4B8FC17; Tue, 16 Feb 2010 22:23:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GMNXEc052714; Tue, 16 Feb 2010 22:23:33 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GMNX8i052710; Tue, 16 Feb 2010 22:23:33 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002162223.o1GMNX8i052710@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 16 Feb 2010 22:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203976 - in stable/8/share/man/man4: . man4.i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 22:23:33 -0000 Author: gavin Date: Tue Feb 16 22:23:33 2010 New Revision: 203976 URL: http://svn.freebsd.org/changeset/base/203976 Log: Merge 203689 from head: Install the padlock(4) man page on amd64 as well as i386, to match the platforms where the driver itself is compiled and installed. PR: docs/130895 Reported by: George Hartzell Added: stable/8/share/man/man4/padlock.4 - copied unchanged from r203689, head/share/man/man4/padlock.4 Deleted: stable/8/share/man/man4/man4.i386/padlock.4 Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/man4.i386/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Tue Feb 16 22:19:55 2010 (r203975) +++ stable/8/share/man/man4/Makefile Tue Feb 16 22:23:33 2010 (r203976) @@ -294,6 +294,7 @@ MAN= aac.4 \ ${_nxge.4} \ ohci.4 \ orm.4 \ + ${_padlock.4} \ pass.4 \ patm.4 \ pccard.4 \ @@ -641,6 +642,7 @@ _nfsmb.4= nfsmb.4 _nve.4= nve.4 _nvram.4= nvram.4 _nxge.4= nxge.4 +_padlock.4= padlock.4 _rr232x.4= rr232x.4 _speaker.4= speaker.4 _spkr.4= spkr.4 Modified: stable/8/share/man/man4/man4.i386/Makefile ============================================================================== --- stable/8/share/man/man4/man4.i386/Makefile Tue Feb 16 22:19:55 2010 (r203975) +++ stable/8/share/man/man4/man4.i386/Makefile Tue Feb 16 22:23:33 2010 (r203976) @@ -21,7 +21,6 @@ MAN= aic.4 \ mcd.4 \ mse.4 \ npx.4 \ - padlock.4 \ pae.4 \ pbio.4 \ pcf.4 \ Copied: stable/8/share/man/man4/padlock.4 (from r203689, head/share/man/man4/padlock.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/padlock.4 Tue Feb 16 22:23:33 2010 (r203976, copy of r203689, head/share/man/man4/padlock.4) @@ -0,0 +1,97 @@ +.\" Copyright (c) 2005 Christian Brueffer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 8, 2010 +.Dt PADLOCK 4 +.Os +.Sh NAME +.Nm padlock +.Nd "driver for the cryptographic functions and RNG in VIA C3, C7 and Eden processors" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device crypto" +.Cd "device padlock" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +padlock_load="YES" +.Ed +.Sh DESCRIPTION +The C3 and Eden processor series from VIA include hardware acceleration for +AES. +The C7 series includes hardware acceleration for AES, SHA1, SHA256 and RSA. +All of the above processor series include a hardware random number generator. +.Pp +The +.Nm +driver registers itself to accelerate AES operations and, if available, HMAC/SHA1 +and HMAC/SHA256 for +.Xr crypto 4 . +It also registers itself to accelerate other HMAC algorithms, although +there is no hardware acceleration for those algorithms. +This is only needed so +.Nm +can work with +.Xr ipsec 4 . +.Pp +The hardware random number generator supplies data for the kernel +.Xr random 4 +subsystem. +.Sh SEE ALSO +.Xr crypt 3 , +.Xr crypto 4 , +.Xr intro 4 , +.Xr ipsec 4 , +.Xr random 4 , +.Xr crypto 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox . +The first +.Fx +release to include it was +.Fx 6.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver with AES encryption support was written by +.An Jason Wright Aq jason@OpenBSD.org . +It was ported to +.Fx +and then extended to support SHA1 and SHA256 +by +.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org . +This manual page was written by +.An Christian Brueffer Aq brueffer@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 22:53:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E6C31065670; Tue, 16 Feb 2010 22:53:18 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E83D8FC12; Tue, 16 Feb 2010 22:53:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GMrILs059325; Tue, 16 Feb 2010 22:53:18 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GMrIfm059322; Tue, 16 Feb 2010 22:53:18 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002162253.o1GMrIfm059322@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 16 Feb 2010 22:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203977 - head/usr.bin/unzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 22:53:18 -0000 Author: gavin Date: Tue Feb 16 22:53:18 2010 New Revision: 203977 URL: http://svn.freebsd.org/changeset/base/203977 Log: Implement the rename query, for when a file with the same name as the one about to be extracted already exists. The question, and interpretation of the response is deliberately compatible with Info-Zip. This change was originally obtained from NetBSD, but has three changes: - better compatibility with Info-Zip in the handling of ^D - Use getdelim() rather than getline() - bug fix: != changed to == in the "file rename" code I suspect the latter is also a bug in NetBSD, but I can't easily confirm this. PR: bin/143307 Reviewed by: rdivacky (change to unzip.c only) Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8 MFC after: 1 month Modified: head/usr.bin/unzip/unzip.1 head/usr.bin/unzip/unzip.c Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Tue Feb 16 22:23:33 2010 (r203976) +++ head/usr.bin/unzip/unzip.1 Tue Feb 16 22:53:18 2010 (r203977) @@ -158,17 +158,6 @@ utility is only able to process ZIP arch Depending on the installed version of .Xr libarchive , this may or may not include self-extracting archives. -.Sh BUGS -The -.Nm -utility currently does not support asking the user whether to -overwrite or skip a file that already exists on disk. -To be on the safe side, it will fail if it encounters a file that -already exists and neither the -.Fl n -nor the -.Fl o -command line option was specified. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY Modified: head/usr.bin/unzip/unzip.c ============================================================================== --- head/usr.bin/unzip/unzip.c Tue Feb 16 22:23:33 2010 (r203976) +++ head/usr.bin/unzip/unzip.c Tue Feb 16 22:53:18 2010 (r203977) @@ -411,17 +411,65 @@ extract_dir(struct archive *a, struct ar static unsigned char buffer[8192]; static char spinner[] = { '|', '/', '-', '\\' }; +static int +handle_existing_file(char **path) +{ + size_t alen; + ssize_t len; + char buf[4]; + + for (;;) { + fprintf(stderr, + "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", + *path); + if (fgets(buf, sizeof(buf), stdin) == 0) { + clearerr(stdin); + printf("NULL\n(EOF or read error, " + "treating as \"[N]one\"...)\n"); + n_opt = 1; + return -1; + } + switch (*buf) { + case 'A': + o_opt = 1; + /* FALLTHROUGH */ + case 'y': + case 'Y': + (void)unlink(*path); + return 1; + case 'N': + n_opt = 1; + /* FALLTHROUGH */ + case 'n': + return -1; + case 'r': + case 'R': + printf("New name: "); + fflush(stdout); + free(*path); + *path = NULL; + alen = 0; + len = getdelim(path, &alen, '\n', stdin); + if ((*path)[len - 1] == '\n') + (*path)[len - 1] = '\0'; + return 0; + default: + break; + } + } +} + /* * Extract a regular file. */ static void -extract_file(struct archive *a, struct archive_entry *e, const char *path) +extract_file(struct archive *a, struct archive_entry *e, char **path) { int mode; time_t mtime; struct stat sb; struct timeval tv[2]; - int cr, fd, text, warn; + int cr, fd, text, warn, check; ssize_t len; unsigned char *p, *q, *end; @@ -431,32 +479,36 @@ extract_file(struct archive *a, struct a mtime = archive_entry_mtime(e); /* look for existing file of same name */ - if (lstat(path, &sb) == 0) { +recheck: + if (lstat(*path, &sb) == 0) { if (u_opt || f_opt) { /* check if up-to-date */ if (S_ISREG(sb.st_mode) && sb.st_mtime >= mtime) return; - (void)unlink(path); + (void)unlink(*path); } else if (o_opt) { /* overwrite */ - (void)unlink(path); + (void)unlink(*path); } else if (n_opt) { /* do not overwrite */ return; } else { - /* XXX ask user */ - errorx("not implemented"); + check = handle_existing_file(path); + if (check == 0) + goto recheck; + if (check == -1) + return; /* do not overwrite */ } } else { if (f_opt) return; } - if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) - error("open('%s')", path); + if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) + error("open('%s')", *path); /* loop over file contents and write to disk */ - info(" extracting: %s", path); + info(" extracting: %s", *path); text = a_opt; warn = 0; cr = 0; @@ -473,7 +525,7 @@ extract_file(struct archive *a, struct a if (a_opt && cr) { if (len == 0 || buffer[0] != '\n') if (write(fd, "\r", 1) != 1) - error("write('%s')", path); + error("write('%s')", *path); cr = 0; } @@ -504,7 +556,7 @@ extract_file(struct archive *a, struct a /* simple case */ if (!a_opt || !text) { if (write(fd, buffer, len) != len) - error("write('%s')", path); + error("write('%s')", *path); continue; } @@ -514,7 +566,7 @@ extract_file(struct archive *a, struct a if (!warn && !isascii(*q)) { warningx("%s may be corrupted due" " to weak text file detection" - " heuristic", path); + " heuristic", *path); warn = 1; } if (q[0] != '\r') @@ -527,7 +579,7 @@ extract_file(struct archive *a, struct a break; } if (write(fd, p, q - p) != q - p) - error("write('%s')", path); + error("write('%s')", *path); } } if (tty) @@ -542,9 +594,9 @@ extract_file(struct archive *a, struct a tv[1].tv_sec = mtime; tv[1].tv_usec = 0; if (futimes(fd, tv) != 0) - error("utimes('%s')", path); + error("utimes('%s')", *path); if (close(fd) != 0) - error("close('%s')", path); + error("close('%s')", *path); } /* @@ -620,7 +672,7 @@ extract(struct archive *a, struct archiv if (S_ISDIR(filetype)) extract_dir(a, e, realpathname); else - extract_file(a, e, realpathname); + extract_file(a, e, &realpathname); free(realpathname); free(pathname); From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 22:55:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB543106566C; Tue, 16 Feb 2010 22:55:38 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C30828FC18; Tue, 16 Feb 2010 22:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1GMtcZd059866; Tue, 16 Feb 2010 22:55:38 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1GMtcSb059864; Tue, 16 Feb 2010 22:55:38 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002162255.o1GMtcSb059864@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 16 Feb 2010 22:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203978 - head/usr.bin/unzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 22:55:39 -0000 Author: gavin Date: Tue Feb 16 22:55:38 2010 New Revision: 203978 URL: http://svn.freebsd.org/changeset/base/203978 Log: Bump .Dd for r203977 MFC after: 1 month Modified: head/usr.bin/unzip/unzip.1 Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Tue Feb 16 22:53:18 2010 (r203977) +++ head/usr.bin/unzip/unzip.1 Tue Feb 16 22:55:38 2010 (r203978) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2009 +.Dd February 16, 2010 .Dt UNZIP 1 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 04:45:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC40E106568D; Wed, 17 Feb 2010 04:45:18 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f223.google.com (mail-bw0-f223.google.com [209.85.218.223]) by mx1.freebsd.org (Postfix) with ESMTP id E40ED8FC20; Wed, 17 Feb 2010 04:45:17 +0000 (UTC) Received: by bwz23 with SMTP id 23so1685004bwz.13 for ; Tue, 16 Feb 2010 20:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=yZHyDHXtyzsvlki8MH4rOy6GBXBAVt45HqWC5mfw0cI=; b=ENZaYYh+JiK5G+NnedIopA2ECiGbIjJUKsLqoHqe2vR2q80mo1D1KtPAQSF3gdmMNW vhdfxjdZupvJH2CVvltWso0JSUxmeJAUTtiscWCmZD6oqF0SawrCkMYgVuSLAVb6usl3 xmqJb23y85zSdTEK2uEzscsK6jbUIBzWo/VvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Kxfj/9f0RMZxGuA/1y/lHvI+mlZbw9YcRYz2gPlXEK0qD+xaAcPX9YI6k6fGk/r2Wi tAoGlufuWjJ2EmrdB1CCho0zVth406rE6KQcHTtAQeJiQmJrEvCGrrZnpgXuAcTHdcYS yueebX1KXk/CYeWvT57US5WAWzc2xRmddoRn8= MIME-Version: 1.0 Received: by 10.204.10.140 with SMTP id p12mr4379062bkp.54.1266381916380; Tue, 16 Feb 2010 20:45:16 -0800 (PST) In-Reply-To: <201002162147.o1GLl5LP044492@svn.freebsd.org> References: <201002162147.o1GLl5LP044492@svn.freebsd.org> Date: Wed, 17 Feb 2010 07:45:16 +0300 Message-ID: From: pluknet To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: base64 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203972 - in head/usr.sbin: eeprom makefs makefs/compat rpcbind usbdevs yppoll X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 04:45:19 -0000 T24gMTcgRmVicnVhcnkgMjAxMCAwMDo0NywgV2FybmVyIExvc2ggPGltcEBmcmVlYnNkLm9yZz4g d3JvdGU6ClsuLi5dCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQo+IC0tLSBoZWFkL3Vzci5zYmluL3Jw Y2JpbmQvdXRpbC5jIKAgoCCgIKBUdWUgRmViIDE2IDIxOjQzOjU3IDIwMTAgoCCgIKAgoChyMjAz OTcxKQo+ICsrKyBoZWFkL3Vzci5zYmluL3JwY2JpbmQvdXRpbC5jIKAgoCCgIKBUdWUgRmViIDE2 IDIxOjQ3OjA1IDIwMTAgoCCgIKAgoChyMjAzOTcyKQpbLi4uXQo+IEBAIC0xODUsNiArMTc4LDgg QEAgYWRkcm1lcmdlKHN0cnVjdCBuZXRidWYgKmNhbGxlciwgY2hhciAqcwo+IKAgoCCgIKAgoCCg IKAgoGlmIChpZnNhID09IE5VTEwgfHwgaWZzYS0+c2FfZmFtaWx5ICE9IGhpbnRfc2EtPnNhX2Zh bWlseSB8fAo+IKAgoCCgIKAgoCCgIKAgoCCgIKAhKGlmYXAtPmlmYV9mbGFncyAmIElGRl9VUCkp Cj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKBjb250aW51ZTsKPiArIKAgoCCgIKAgoCCgIKAgaWYg KCFhZGRyX2lzX2JvdW5kKGlmc2EpKQo+ICsgoCCgIKAgoCCgIKAgoCCgIKAgoCCgIGNvbnRpbnVl Owo+Cj4goCCgIKAgoCCgIKAgoCCgaWYgKCEoaWZhcC0+aWZhX2ZsYWdzICYgSUZGX0xPT1BCQUNL KSAmJiAhbGlzdGVuX2FkZHIoaWZzYSkpCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKBjb250aW51 ZTsKPgoKSGksIFdhcm5lci4KCldhcyB0aGlzIGNoYW5nZSBpbnRlbnRpb25hbD8KVGhhbmtzLgoK LS0gCndiciwKcGx1a25ldAo= From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 06:11:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F025106568D; Wed, 17 Feb 2010 06:11:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F28C18FC1A; Wed, 17 Feb 2010 06:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1H6B5jZ055870; Wed, 17 Feb 2010 06:11:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1H6B5oG055868; Wed, 17 Feb 2010 06:11:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002170611.o1H6B5oG055868@svn.freebsd.org> From: Warner Losh Date: Wed, 17 Feb 2010 06:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203984 - head/usr.sbin/rpcbind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 06:11:06 -0000 Author: imp Date: Wed Feb 17 06:11:05 2010 New Revision: 203984 URL: http://svn.freebsd.org/changeset/base/203984 Log: Revert bogus change that snuck into r203972. Modified: head/usr.sbin/rpcbind/util.c Modified: head/usr.sbin/rpcbind/util.c ============================================================================== --- head/usr.sbin/rpcbind/util.c Wed Feb 17 03:11:56 2010 (r203983) +++ head/usr.sbin/rpcbind/util.c Wed Feb 17 06:11:05 2010 (r203984) @@ -178,8 +178,6 @@ addrmerge(struct netbuf *caller, char *s if (ifsa == NULL || ifsa->sa_family != hint_sa->sa_family || !(ifap->ifa_flags & IFF_UP)) continue; - if (!addr_is_bound(ifsa)) - continue; if (!(ifap->ifa_flags & IFF_LOOPBACK) && !listen_addr(ifsa)) continue; From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 06:43:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15DBF106566B; Wed, 17 Feb 2010 06:43:38 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03CAC8FC19; Wed, 17 Feb 2010 06:43:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1H6hbol063172; Wed, 17 Feb 2010 06:43:37 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1H6hbhc063167; Wed, 17 Feb 2010 06:43:37 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002170643.o1H6hbhc063167@svn.freebsd.org> From: Neel Natu Date: Wed, 17 Feb 2010 06:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203985 - in head/sys/mips: mips sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 06:43:38 -0000 Author: neel Date: Wed Feb 17 06:43:37 2010 New Revision: 203985 URL: http://svn.freebsd.org/changeset/base/203985 Log: Various fixes to get the SWARM config working on a big-endian Sibyte CPU. Getting the little-endian PCI bus working on the big-endian CPU proved to be quite challenging. We let the PCI devices be mapped in the "match byte lanes" address window. This is where they are mapped by the CFE and DMA transfers generated to or from addresses within this window are not subject to automatic byte-swapping. However any access by the driver to memory-mapped pci space is redirected via the "match bit lanes" address window. We get the benefit of automatic byte swapping through this address window and drivers don't need to change to deal with CPU big-endianness. Added: head/sys/mips/sibyte/sb_bus_space.h (contents, props changed) Modified: head/sys/mips/mips/bus_space_generic.c head/sys/mips/sibyte/sb_asm.S head/sys/mips/sibyte/sb_zbpci.c Modified: head/sys/mips/mips/bus_space_generic.c ============================================================================== --- head/sys/mips/mips/bus_space_generic.c Wed Feb 17 06:11:05 2010 (r203984) +++ head/sys/mips/mips/bus_space_generic.c Wed Feb 17 06:43:37 2010 (r203985) @@ -206,6 +206,14 @@ static struct bus_space generic_space = #define wr8(a, v) oct_write8(a, v) #define wr16(a, v) oct_write16(a, v) #define wr32(a, v) oct_write32(a, v) +#elif defined(CPU_SB1) && _BYTE_ORDER == _BIG_ENDIAN +#include +#define rd8(a) sb_big_endian_read8(a) +#define rd16(a) sb_big_endian_read16(a) +#define rd32(a) sb_big_endian_read32(a) +#define wr8(a, v) sb_big_endian_write8(a, v) +#define wr16(a, v) sb_big_endian_write16(a, v) +#define wr32(a, v) sb_big_endian_write32(a, v) #else #define rd8(a) readb(a) #define rd16(a) readw(a) Modified: head/sys/mips/sibyte/sb_asm.S ============================================================================== --- head/sys/mips/sibyte/sb_asm.S Wed Feb 17 06:11:05 2010 (r203984) +++ head/sys/mips/sibyte/sb_asm.S Wed Feb 17 06:43:37 2010 (r203985) @@ -28,6 +28,7 @@ #include #include +#include /* * We compile a 32-bit kernel to run on the SB-1 processor which is a 64-bit @@ -50,7 +51,7 @@ LEAF(sb_load64) ld v1, 0(a0) /* result = *(uint64_t *)ptr */ move v0, v1 -#if defined(TARGET_BIG_ENDIAN) +#if _BYTE_ORDER == _BIG_ENDIAN dsll32 v1, v1, 0 dsrl32 v1, v1, 0 /* v1 = lower_uint32(result) */ jr ra @@ -68,7 +69,7 @@ END(sb_load64) * Return value: void */ LEAF(sb_store64) -#if defined(TARGET_BIG_ENDIAN) +#if _BYTE_ORDER == _BIG_ENDIAN dsll32 a2, a2, 0 /* a2 = upper_uint32(val) */ dsll32 a3, a3, 0 /* a3 = lower_uint32(val) */ dsrl32 a3, a3, 0 Added: head/sys/mips/sibyte/sb_bus_space.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/sibyte/sb_bus_space.h Wed Feb 17 06:43:37 2010 (r203985) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2010 Neelkanth Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SB_BUS_SPACE_H_ +#define _SB_BUS_SPACE_H_ + +#include + +#if _BYTE_ORDER == _BIG_ENDIAN +uint8_t sb_big_endian_read8(bus_addr_t addr); +uint16_t sb_big_endian_read16(bus_addr_t addr); +uint32_t sb_big_endian_read32(bus_addr_t addr); +void sb_big_endian_write8(bus_addr_t addr, uint8_t val); +void sb_big_endian_write16(bus_addr_t addr, uint16_t val); +void sb_big_endian_write32(bus_addr_t addr, uint32_t val); +#endif + +#endif Modified: head/sys/mips/sibyte/sb_zbpci.c ============================================================================== --- head/sys/mips/sibyte/sb_zbpci.c Wed Feb 17 06:11:05 2010 (r203984) +++ head/sys/mips/sibyte/sb_zbpci.c Wed Feb 17 06:43:37 2010 (r203985) @@ -50,6 +50,7 @@ #include "pcib_if.h" +#include "sb_bus_space.h" #include "sb_scd.h" __FBSDID("$FreeBSD$"); @@ -63,6 +64,15 @@ static const vm_paddr_t CFG_PADDR_BASE = static const u_long PCI_IOSPACE_ADDR = 0xFC000000; static const u_long PCI_IOSPACE_SIZE = 0x02000000; +#define PCI_MATCH_BYTE_LANES_START 0x40000000 +#define PCI_MATCH_BYTE_LANES_END 0x5FFFFFFF +#define PCI_MATCH_BYTE_LANES_SIZE 0x20000000 + +#define PCI_MATCH_BIT_LANES_MASK (1 << 29) +#define PCI_MATCH_BIT_LANES_START 0x60000000 +#define PCI_MATCH_BIT_LANES_END 0x7FFFFFFF +#define PCI_MATCH_BIT_LANES_SIZE 0x20000000 + static struct rman port_rman; static int @@ -112,6 +122,19 @@ zbpci_attach(device_t dev) panic("Cannot allocate resource for config space accesses."); /* + * Allocate the entire "match bit lanes" address space. + */ +#if _BYTE_ORDER == _BIG_ENDIAN + rid = 2; + res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, + PCI_MATCH_BIT_LANES_START, + PCI_MATCH_BIT_LANES_END, + PCI_MATCH_BIT_LANES_SIZE, 0); + if (res == NULL) + panic("Cannot allocate resource for pci match bit lanes."); +#endif /* _BYTE_ORDER ==_BIG_ENDIAN */ + + /* * Allocate KVA for accessing PCI config space. */ va = kmem_alloc_nofault(kernel_map, PAGE_SIZE * mp_ncpus); @@ -177,21 +200,61 @@ static int zbpci_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { + int error; void *vaddr; - u_long paddr, psize; + u_long orig_paddr, paddr, psize; + + paddr = rman_get_start(res); + psize = rman_get_size(res); + orig_paddr = paddr; + +#if _BYTE_ORDER == _BIG_ENDIAN + /* + * The CFE allocates PCI memory resources that map to the + * "match byte lanes" address space. This address space works + * best for DMA transfers because it does not do any automatic + * byte swaps when data crosses the pci-cpu interface. + * + * This also makes it sub-optimal for accesses to PCI device + * registers because it exposes the little-endian nature of + * the PCI bus to the big-endian CPU. The Sibyte has another + * address window called the "match bit lanes" window which + * automatically swaps bytes when data crosses the pci-cpu + * interface. + * + * We "assume" that any bus_space memory accesses done by the + * CPU to a PCI device are register/configuration accesses and + * are done through the "match bit lanes" window. Any DMA + * transfers will continue to be through the "match byte lanes" + * window because the PCI BAR registers will not be changed. + */ + if (type == SYS_RES_MEMORY) { + if (paddr >= PCI_MATCH_BYTE_LANES_START && + paddr + psize - 1 <= PCI_MATCH_BYTE_LANES_END) { + paddr |= PCI_MATCH_BIT_LANES_MASK; + rman_set_start(res, paddr); + rman_set_end(res, paddr + psize - 1); + } + } +#endif if (type != SYS_RES_IOPORT) { - return (bus_generic_activate_resource(bus, child, type, - rid, res)); + error = bus_generic_activate_resource(bus, child, type, + rid, res); +#if _BYTE_ORDER == _BIG_ENDIAN + if (type == SYS_RES_MEMORY) { + rman_set_start(res, orig_paddr); + rman_set_end(res, orig_paddr + psize - 1); + } +#endif + return (error); } /* * Map the I/O space resource through the memory window starting * at PCI_IOSPACE_ADDR. */ - paddr = rman_get_start(res) + PCI_IOSPACE_ADDR; - psize = rman_get_size(res); - vaddr = pmap_mapdev(paddr, psize); + vaddr = pmap_mapdev(paddr + PCI_IOSPACE_ADDR, psize); rman_set_virtual(res, vaddr); rman_set_bustag(res, mips_bus_space_generic); @@ -280,6 +343,9 @@ zbpci_config_space_va(int bus, int slot, va_page = zbpci_config_space[cpu].vaddr; pa = CFG_PADDR_BASE | (bus << 16) | (slot << 11) | (func << 8) | reg; +#if _BYTE_ORDER == _BIG_ENDIAN + pa = pa ^ (4 - bytes); +#endif pa_page = pa & ~(PAGE_SIZE - 1); if (zbpci_config_space[cpu].paddr != pa_page) { pmap_kremove(va_page); @@ -397,3 +463,82 @@ DEFINE_CLASS_1(zbpci, zbpci_driver, zbpc static devclass_t zbpci_devclass; DRIVER_MODULE(zbpci, zbbus, zbpci_driver, zbpci_devclass, 0, 0); + +/* + * Big endian bus space routines + */ +#if _BYTE_ORDER == _BIG_ENDIAN + +/* + * The CPU correctly deals with the big-endian to little-endian swap if + * we are accessing 4 bytes at a time. However if we want to read 1 or 2 + * bytes then we need to fudge the address generated by the CPU such that + * it generates the right byte enables on the PCI bus. + */ +static bus_addr_t +sb_match_bit_lane_addr(bus_addr_t addr, int bytes) +{ + vm_offset_t pa; + + pa = vtophys(addr); + + if (pa >= PCI_MATCH_BIT_LANES_START && pa <= PCI_MATCH_BIT_LANES_END) + return (addr ^ (4 - bytes)); + else + return (addr); +} + +uint8_t +sb_big_endian_read8(bus_addr_t addr) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 1); + return (readb(addr2)); +} + +uint16_t +sb_big_endian_read16(bus_addr_t addr) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 2); + return (readw(addr2)); +} + +uint32_t +sb_big_endian_read32(bus_addr_t addr) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 4); + return (readl(addr2)); +} + +void +sb_big_endian_write8(bus_addr_t addr, uint8_t val) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 1); + writeb(addr2, val); +} + +void +sb_big_endian_write16(bus_addr_t addr, uint16_t val) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 2); + writew(addr2, val); +} + +void +sb_big_endian_write32(bus_addr_t addr, uint32_t val) +{ + bus_addr_t addr2; + + addr2 = sb_match_bit_lane_addr(addr, 4); + writel(addr2, val); +} +#endif /* _BIG_ENDIAN */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 09:03:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4AFC1065672; Wed, 17 Feb 2010 09:03:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B39198FC0A; Wed, 17 Feb 2010 09:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1H93cNP094194; Wed, 17 Feb 2010 09:03:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1H93c6M094192; Wed, 17 Feb 2010 09:03:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002170903.o1H93c6M094192@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 09:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203988 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 09:03:38 -0000 Author: kib Date: Wed Feb 17 09:03:38 2010 New Revision: 203988 URL: http://svn.freebsd.org/changeset/base/203988 Log: MFC r203875: Do not leak process lock when current thread is not allowed to see target. Modified: stable/8/sys/kern/kern_event.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/kern/kern_event.c ============================================================================== --- stable/8/sys/kern/kern_event.c Wed Feb 17 08:40:54 2010 (r203987) +++ stable/8/sys/kern/kern_event.c Wed Feb 17 09:03:38 2010 (r203988) @@ -334,8 +334,10 @@ filt_procattach(struct knote *kn) if (p == NULL) return (ESRCH); - if ((error = p_cansee(curthread, p))) + if ((error = p_cansee(curthread, p))) { + PROC_UNLOCK(p); return (error); + } kn->kn_ptr.p_proc = p; kn->kn_flags |= EV_CLEAR; /* automatically set */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 09:09:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF870106566B; Wed, 17 Feb 2010 09:09:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA808FC08; Wed, 17 Feb 2010 09:09:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1H99CT5095449; Wed, 17 Feb 2010 09:09:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1H99C2G095444; Wed, 17 Feb 2010 09:09:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002170909.o1H99C2G095444@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 09:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203989 - in stable/8/lib/msun: amd64 i387 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 09:09:12 -0000 Author: kib Date: Wed Feb 17 09:09:12 2010 New Revision: 203989 URL: http://svn.freebsd.org/changeset/base/203989 Log: MFC r203441: Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an argument for fnstsw. Explicitely specify sizes for the XMM control and status word and X87 control and status words. Modified: stable/8/lib/msun/amd64/fenv.c stable/8/lib/msun/amd64/fenv.h stable/8/lib/msun/i387/fenv.c stable/8/lib/msun/i387/fenv.h Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/amd64/fenv.c ============================================================================== --- stable/8/lib/msun/amd64/fenv.c Wed Feb 17 09:03:38 2010 (r203988) +++ stable/8/lib/msun/amd64/fenv.c Wed Feb 17 09:09:12 2010 (r203989) @@ -86,7 +86,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __stmxcsr(&mxcsr); __fnstenv(&envp->__x87); @@ -101,7 +101,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); __stmxcsr(&mxcsr); @@ -113,7 +114,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -129,7 +131,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: stable/8/lib/msun/amd64/fenv.h ============================================================================== --- stable/8/lib/msun/amd64/fenv.h Wed Feb 17 09:03:38 2010 (r203988) +++ stable/8/lib/msun/amd64/fenv.h Wed Feb 17 09:09:12 2010 (r203989) @@ -110,7 +110,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -124,7 +125,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -134,7 +136,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -149,7 +151,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -197,7 +200,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are Modified: stable/8/lib/msun/i387/fenv.c ============================================================================== --- stable/8/lib/msun/i387/fenv.c Wed Feb 17 09:03:38 2010 (r203988) +++ stable/8/lib/msun/i387/fenv.c Wed Feb 17 09:09:12 2010 (r203989) @@ -87,7 +87,7 @@ int fesetexceptflag(const fexcept_t *flagp, int excepts) { fenv_t env; - int mxcsr; + __uint32_t mxcsr; __fnstenv(&env); env.__status &= ~excepts; @@ -117,7 +117,7 @@ feraiseexcept(int excepts) int fegetenv(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); /* @@ -135,7 +135,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); __fnclex(); @@ -152,7 +152,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); if (__HAS_SSE()) @@ -167,7 +168,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -188,7 +190,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: stable/8/lib/msun/i387/fenv.h ============================================================================== --- stable/8/lib/msun/i387/fenv.h Wed Feb 17 09:03:38 2010 (r203988) +++ stable/8/lib/msun/i387/fenv.h Wed Feb 17 09:09:12 2010 (r203989) @@ -114,7 +114,7 @@ static __inline int feclearexcept(int __excepts) { fenv_t __env; - int __mxcsr; + __uint32_t __mxcsr; if (__excepts == FE_ALL_EXCEPT) { __fnclex(); @@ -134,7 +134,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -151,7 +152,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -164,7 +166,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -179,7 +181,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -206,7 +209,7 @@ static __inline int fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; - int __mxcsr; + __uint32_t __mxcsr; __mxcsr = __get_mxcsr(__env); __set_mxcsr(__env, 0xffffffff); @@ -234,7 +237,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 09:11:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17CDD1065670; Wed, 17 Feb 2010 09:11:22 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 079198FC0C; Wed, 17 Feb 2010 09:11:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1H9BLYS095998; Wed, 17 Feb 2010 09:11:21 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1H9BL6m095996; Wed, 17 Feb 2010 09:11:21 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <201002170911.o1H9BL6m095996@svn.freebsd.org> From: Poul-Henning Kamp Date: Wed, 17 Feb 2010 09:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 09:11:22 -0000 Author: phk Date: Wed Feb 17 09:11:21 2010 New Revision: 203990 URL: http://svn.freebsd.org/changeset/base/203990 Log: Mention EISDIR as a possible errno. Modified: head/lib/libc/sys/unlink.2 Modified: head/lib/libc/sys/unlink.2 ============================================================================== --- head/lib/libc/sys/unlink.2 Wed Feb 17 09:09:12 2010 (r203989) +++ head/lib/libc/sys/unlink.2 Wed Feb 17 09:11:21 2010 (r203990) @@ -114,6 +114,8 @@ succeeds unless: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. +.It Bq Er EISDIR +The named file is a directory. .It Bq Er ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 10:15:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E831065670; Wed, 17 Feb 2010 10:15:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E90038FC19; Wed, 17 Feb 2010 10:15:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HAFHni010508; Wed, 17 Feb 2010 10:15:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HAFHhV010506; Wed, 17 Feb 2010 10:15:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002171015.o1HAFHhV010506@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 10:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203996 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 10:15:18 -0000 Author: kib Date: Wed Feb 17 10:15:17 2010 New Revision: 203996 URL: http://svn.freebsd.org/changeset/base/203996 Log: MFC r203875: Do not leak process lock when current thread is not allowed to see target. Approved by: re (bz) Modified: stable/7/sys/kern/kern_event.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_event.c ============================================================================== --- stable/7/sys/kern/kern_event.c Wed Feb 17 09:51:19 2010 (r203995) +++ stable/7/sys/kern/kern_event.c Wed Feb 17 10:15:17 2010 (r203996) @@ -323,8 +323,10 @@ filt_procattach(struct knote *kn) if (p == NULL) return (ESRCH); - if ((error = p_cansee(curthread, p))) + if ((error = p_cansee(curthread, p))) { + PROC_UNLOCK(p); return (error); + } kn->kn_ptr.p_proc = p; kn->kn_flags |= EV_CLEAR; /* automatically set */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 10:21:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04A691065672; Wed, 17 Feb 2010 10:21:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E860E8FC12; Wed, 17 Feb 2010 10:21:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HAL0iA014033; Wed, 17 Feb 2010 10:21:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HAL0Yc014031; Wed, 17 Feb 2010 10:21:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002171021.o1HAL0Yc014031@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 10:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203997 - releng/7.3/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 10:21:01 -0000 Author: kib Date: Wed Feb 17 10:21:00 2010 New Revision: 203997 URL: http://svn.freebsd.org/changeset/base/203997 Log: MFC r203875: Do not leak process lock when current thread is not allowed to see target. Approved by: re (bz) Modified: releng/7.3/sys/kern/kern_event.c Directory Properties: releng/7.3/sys/ (props changed) releng/7.3/sys/cddl/contrib/opensolaris/ (props changed) releng/7.3/sys/contrib/dev/acpica/ (props changed) releng/7.3/sys/contrib/pf/ (props changed) Modified: releng/7.3/sys/kern/kern_event.c ============================================================================== --- releng/7.3/sys/kern/kern_event.c Wed Feb 17 10:15:17 2010 (r203996) +++ releng/7.3/sys/kern/kern_event.c Wed Feb 17 10:21:00 2010 (r203997) @@ -323,8 +323,10 @@ filt_procattach(struct knote *kn) if (p == NULL) return (ESRCH); - if ((error = p_cansee(curthread, p))) + if ((error = p_cansee(curthread, p))) { + PROC_UNLOCK(p); return (error); + } kn->kn_ptr.p_proc = p; kn->kn_flags |= EV_CLEAR; /* automatically set */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 10:27:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82502106566C; Wed, 17 Feb 2010 10:27:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70BEA8FC0A; Wed, 17 Feb 2010 10:27:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HAR75V015424; Wed, 17 Feb 2010 10:27:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HAR727015419; Wed, 17 Feb 2010 10:27:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002171027.o1HAR727015419@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 10:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203998 - in stable/7/lib/msun: amd64 i387 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 10:27:07 -0000 Author: kib Date: Wed Feb 17 10:27:07 2010 New Revision: 203998 URL: http://svn.freebsd.org/changeset/base/203998 Log: MFC r203441: Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an argument for fnstsw. Explicitely specify sizes for the XMM control and status word and X87 control and status words. Approved by: re (bz) Modified: stable/7/lib/msun/amd64/fenv.c stable/7/lib/msun/amd64/fenv.h stable/7/lib/msun/i387/fenv.c stable/7/lib/msun/i387/fenv.h Directory Properties: stable/7/lib/msun/ (props changed) Modified: stable/7/lib/msun/amd64/fenv.c ============================================================================== --- stable/7/lib/msun/amd64/fenv.c Wed Feb 17 10:21:00 2010 (r203997) +++ stable/7/lib/msun/amd64/fenv.c Wed Feb 17 10:27:07 2010 (r203998) @@ -86,7 +86,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __stmxcsr(&mxcsr); __fnstenv(&envp->__x87); @@ -101,7 +101,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); __stmxcsr(&mxcsr); @@ -113,7 +114,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -129,7 +131,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: stable/7/lib/msun/amd64/fenv.h ============================================================================== --- stable/7/lib/msun/amd64/fenv.h Wed Feb 17 10:21:00 2010 (r203997) +++ stable/7/lib/msun/amd64/fenv.h Wed Feb 17 10:27:07 2010 (r203998) @@ -110,7 +110,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -124,7 +125,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -134,7 +136,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -149,7 +151,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -197,7 +200,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are Modified: stable/7/lib/msun/i387/fenv.c ============================================================================== --- stable/7/lib/msun/i387/fenv.c Wed Feb 17 10:21:00 2010 (r203997) +++ stable/7/lib/msun/i387/fenv.c Wed Feb 17 10:27:07 2010 (r203998) @@ -87,7 +87,7 @@ int fesetexceptflag(const fexcept_t *flagp, int excepts) { fenv_t env; - int mxcsr; + __uint32_t mxcsr; __fnstenv(&env); env.__status &= ~excepts; @@ -117,7 +117,7 @@ feraiseexcept(int excepts) int fegetenv(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); /* @@ -135,7 +135,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); __fnclex(); @@ -152,7 +152,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); if (__HAS_SSE()) @@ -167,7 +168,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -188,7 +190,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: stable/7/lib/msun/i387/fenv.h ============================================================================== --- stable/7/lib/msun/i387/fenv.h Wed Feb 17 10:21:00 2010 (r203997) +++ stable/7/lib/msun/i387/fenv.h Wed Feb 17 10:27:07 2010 (r203998) @@ -114,7 +114,7 @@ static __inline int feclearexcept(int __excepts) { fenv_t __env; - int __mxcsr; + __uint32_t __mxcsr; if (__excepts == FE_ALL_EXCEPT) { __fnclex(); @@ -134,7 +134,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -151,7 +152,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -164,7 +166,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -179,7 +181,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -206,7 +209,7 @@ static __inline int fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; - int __mxcsr; + __uint32_t __mxcsr; __mxcsr = __get_mxcsr(__env); __set_mxcsr(__env, 0xffffffff); @@ -234,7 +237,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 10:39:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3AD106568D; Wed, 17 Feb 2010 10:39:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2DB8FC0A; Wed, 17 Feb 2010 10:39:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HAddax018217; Wed, 17 Feb 2010 10:39:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HAddhY018212; Wed, 17 Feb 2010 10:39:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002171039.o1HAddhY018212@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Feb 2010 10:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204000 - in releng/7.3/lib/msun: amd64 i387 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 10:39:39 -0000 Author: kib Date: Wed Feb 17 10:39:39 2010 New Revision: 204000 URL: http://svn.freebsd.org/changeset/base/204000 Log: MFC r203441: Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an argument for fnstsw. Explicitely specify sizes for the XMM control and status word and X87 control and status words. Approved by: re (bz) Modified: releng/7.3/lib/msun/amd64/fenv.c releng/7.3/lib/msun/amd64/fenv.h releng/7.3/lib/msun/i387/fenv.c releng/7.3/lib/msun/i387/fenv.h Directory Properties: releng/7.3/lib/msun/ (props changed) Modified: releng/7.3/lib/msun/amd64/fenv.c ============================================================================== --- releng/7.3/lib/msun/amd64/fenv.c Wed Feb 17 10:34:12 2010 (r203999) +++ releng/7.3/lib/msun/amd64/fenv.c Wed Feb 17 10:39:39 2010 (r204000) @@ -86,7 +86,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __stmxcsr(&mxcsr); __fnstenv(&envp->__x87); @@ -101,7 +101,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); __stmxcsr(&mxcsr); @@ -113,7 +114,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -129,7 +131,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: releng/7.3/lib/msun/amd64/fenv.h ============================================================================== --- releng/7.3/lib/msun/amd64/fenv.h Wed Feb 17 10:34:12 2010 (r203999) +++ releng/7.3/lib/msun/amd64/fenv.h Wed Feb 17 10:39:39 2010 (r204000) @@ -110,7 +110,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -124,7 +125,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __stmxcsr(&__mxcsr); __fnstsw(&__status); @@ -134,7 +136,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -149,7 +151,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -197,7 +200,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are Modified: releng/7.3/lib/msun/i387/fenv.c ============================================================================== --- releng/7.3/lib/msun/i387/fenv.c Wed Feb 17 10:34:12 2010 (r203999) +++ releng/7.3/lib/msun/i387/fenv.c Wed Feb 17 10:39:39 2010 (r204000) @@ -87,7 +87,7 @@ int fesetexceptflag(const fexcept_t *flagp, int excepts) { fenv_t env; - int mxcsr; + __uint32_t mxcsr; __fnstenv(&env); env.__status &= ~excepts; @@ -117,7 +117,7 @@ feraiseexcept(int excepts) int fegetenv(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); /* @@ -135,7 +135,7 @@ fegetenv(fenv_t *envp) int feholdexcept(fenv_t *envp) { - int mxcsr; + __uint32_t mxcsr; __fnstenv(envp); __fnclex(); @@ -152,7 +152,8 @@ feholdexcept(fenv_t *envp) int feupdateenv(const fenv_t *envp) { - int mxcsr, status; + __uint32_t mxcsr; + __uint16_t status; __fnstsw(&status); if (__HAS_SSE()) @@ -167,7 +168,8 @@ feupdateenv(const fenv_t *envp) int __feenableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); @@ -188,7 +190,8 @@ __feenableexcept(int mask) int __fedisableexcept(int mask) { - int mxcsr, control, omask; + __uint32_t mxcsr, omask; + __uint16_t control; mask &= FE_ALL_EXCEPT; __fnstcw(&control); Modified: releng/7.3/lib/msun/i387/fenv.h ============================================================================== --- releng/7.3/lib/msun/i387/fenv.h Wed Feb 17 10:34:12 2010 (r203999) +++ releng/7.3/lib/msun/i387/fenv.h Wed Feb 17 10:39:39 2010 (r204000) @@ -114,7 +114,7 @@ static __inline int feclearexcept(int __excepts) { fenv_t __env; - int __mxcsr; + __uint32_t __mxcsr; if (__excepts == FE_ALL_EXCEPT) { __fnclex(); @@ -134,7 +134,8 @@ feclearexcept(int __excepts) static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -151,7 +152,8 @@ int feraiseexcept(int __excepts); static __inline int fetestexcept(int __excepts) { - int __mxcsr, __status; + __uint32_t __mxcsr; + __uint16_t __status; __fnstsw(&__status); if (__HAS_SSE()) @@ -164,7 +166,7 @@ fetestexcept(int __excepts) static __inline int fegetround(void) { - int __control; + __uint16_t __control; /* * We assume that the x87 and the SSE unit agree on the @@ -179,7 +181,8 @@ fegetround(void) static __inline int fesetround(int __round) { - int __mxcsr, __control; + __uint32_t __mxcsr; + __uint16_t __control; if (__round & ~_ROUND_MASK) return (-1); @@ -206,7 +209,7 @@ static __inline int fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; - int __mxcsr; + __uint32_t __mxcsr; __mxcsr = __get_mxcsr(__env); __set_mxcsr(__env, 0xffffffff); @@ -234,7 +237,7 @@ int fedisableexcept(int __mask); static __inline int fegetexcept(void) { - int __control; + __uint16_t __control; /* * We assume that the masks for the x87 and the SSE unit are From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 11:18:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CDA01065711; Wed, 17 Feb 2010 11:18:25 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B4728FC0C; Wed, 17 Feb 2010 11:18:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HBIPFu026721; Wed, 17 Feb 2010 11:18:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HBIPdY026717; Wed, 17 Feb 2010 11:18:25 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201002171118.o1HBIPdY026717@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Feb 2010 11:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204001 - in vendor/tzcode/dist: libc/stdtime unused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 11:18:25 -0000 Author: edwin Date: Wed Feb 17 11:18:24 2010 New Revision: 204001 URL: http://svn.freebsd.org/changeset/base/204001 Log: Vendor import of tzcode2010a: * asctime.c - Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if asctime_r is called with a NULL struct tm pointer. (Note that asctime_r is called by ctime_r and asctime; asctime is called by ctime.) * localtime.c - Set errno to EINVAL and return WRONG if time1 is called with a NULL struct tm pointer; avoid dereference if a NULL struct tm pointer is passed to timelocal, timegm, or timeoff. (Note that time1 is called by mktime, timegm, and timeoff; mktime is called by timelocal.) Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzcode/dist/libc/stdtime/asctime.c vendor/tzcode/dist/libc/stdtime/localtime.c vendor/tzcode/dist/unused/tz-art.htm Modified: vendor/tzcode/dist/libc/stdtime/asctime.c ============================================================================== --- vendor/tzcode/dist/libc/stdtime/asctime.c Wed Feb 17 10:39:39 2010 (r204000) +++ vendor/tzcode/dist/libc/stdtime/asctime.c Wed Feb 17 11:18:24 2010 (r204001) @@ -11,7 +11,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)asctime.c 8.2"; +static char elsieid[] = "@(#)asctime.c 8.5"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -91,6 +91,10 @@ char * buf; char year[INT_STRLEN_MAXIMUM(int) + 2]; char result[MAX_ASCTIME_BUF_SIZE]; + if (timeptr == NULL) { + errno = EINVAL; + return strcpy(buf, "??? ??? ?? ??:??:?? ????\n"); + } if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK) wn = "???"; else wn = wday_name[timeptr->tm_wday]; @@ -113,10 +117,9 @@ char * buf; timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, year); - if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) { - (void) strcpy(buf, result); - return buf; - } else { + if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) + return strcpy(buf, result); + else { #ifdef EOVERFLOW errno = EOVERFLOW; #else /* !defined EOVERFLOW */ Modified: vendor/tzcode/dist/libc/stdtime/localtime.c ============================================================================== --- vendor/tzcode/dist/libc/stdtime/localtime.c Wed Feb 17 10:39:39 2010 (r204000) +++ vendor/tzcode/dist/libc/stdtime/localtime.c Wed Feb 17 11:18:24 2010 (r204001) @@ -5,7 +5,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)localtime.c 8.9"; +static char elsieid[] = "@(#)localtime.c 8.10"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -1889,6 +1889,10 @@ const long offset; int types[TZ_MAX_TYPES]; int okay; + if (tmp == NULL) { + errno = EINVAL; + return WRONG; + } if (tmp->tm_isdst > 1) tmp->tm_isdst = 1; t = time2(tmp, funcp, offset, &okay); @@ -1960,7 +1964,8 @@ time_t timelocal(tmp) struct tm * const tmp; { - tmp->tm_isdst = -1; /* in case it wasn't initialized */ + if (tmp != NULL) + tmp->tm_isdst = -1; /* in case it wasn't initialized */ return mktime(tmp); } @@ -1968,7 +1973,8 @@ time_t timegm(tmp) struct tm * const tmp; { - tmp->tm_isdst = 0; + if (tmp != NULL) + tmp->tm_isdst = 0; return time1(tmp, gmtsub, 0L); } @@ -1977,7 +1983,8 @@ timeoff(tmp, offset) struct tm * const tmp; const long offset; { - tmp->tm_isdst = 0; + if (tmp != NULL) + tmp->tm_isdst = 0; return time1(tmp, gmtsub, offset); } Modified: vendor/tzcode/dist/unused/tz-art.htm ============================================================================== --- vendor/tzcode/dist/unused/tz-art.htm Wed Feb 17 10:39:39 2010 (r204000) +++ vendor/tzcode/dist/unused/tz-art.htm Wed Feb 17 11:18:24 2010 (r204001) @@ -9,7 +9,7 @@ PUBLIC "-//W3C//DTD HTML 4.01//EN"

Time and the Arts

-@(#)tz-art.htm 8.15 +@(#)tz-art.htm 8.16

This file is in the public domain, so clarified as of @@ -366,6 +366,11 @@ premonition in the "We Had a Dream" epis (originally aired 2007-02-28).

  • +In the "30 Rock" episode "Anna Howard Shaw Day" (first broadcast 2010-02-11), +Jack Donaghy's date realizes that a Geneva-to-New-York business phone call +received in the evening must be fake given the difference in local times. +
  • +
  • In the 1946 movie "A Matter of Life and Death" (U.S. title "Stairway to Heaven") there is a reference to British Double Summer Time. From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 11:19:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 819BE1065676; Wed, 17 Feb 2010 11:19:21 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5851A8FC08; Wed, 17 Feb 2010 11:19:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HBJL8x026957; Wed, 17 Feb 2010 11:19:21 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HBJLCY026956; Wed, 17 Feb 2010 11:19:21 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201002171119.o1HBJLCY026956@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Feb 2010 11:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204002 - vendor/tzcode/tzcode2010a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 11:19:21 -0000 Author: edwin Date: Wed Feb 17 11:19:21 2010 New Revision: 204002 URL: http://svn.freebsd.org/changeset/base/204002 Log: Tag of tzcode2010a Added: vendor/tzcode/tzcode2010a/ - copied from r204001, vendor/tzcode/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 13:06:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7041065679; Wed, 17 Feb 2010 13:06:07 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C03A8FC13; Wed, 17 Feb 2010 13:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HD67Yh050327; Wed, 17 Feb 2010 13:06:07 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HD675S050325; Wed, 17 Feb 2010 13:06:07 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201002171306.o1HD675S050325@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 17 Feb 2010 13:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204003 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 13:06:07 -0000 Author: luigi Date: Wed Feb 17 13:06:06 2010 New Revision: 204003 URL: http://svn.freebsd.org/changeset/base/204003 Log: remove recursive lock/unlock calls, we do them already before entering the switch. Reported by: Marta Carbone Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Feb 17 11:19:21 2010 (r204002) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Feb 17 13:06:06 2010 (r204003) @@ -343,27 +343,22 @@ del_entry(struct ip_fw_chain *chain, u_i break; case 2: /* move rules with given number to new set */ - IPFW_UH_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (rule->rulenum == rulenum) rule->set = new_set; } - IPFW_UH_WUNLOCK(chain); break; case 3: /* move rules with given set number to new set */ - IPFW_UH_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (rule->set == rulenum) rule->set = new_set; } - IPFW_UH_WUNLOCK(chain); break; case 4: /* swap two sets */ - IPFW_UH_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (rule->set == rulenum) @@ -371,7 +366,6 @@ del_entry(struct ip_fw_chain *chain, u_i else if (rule->set == new_set) rule->set = rulenum; } - IPFW_UH_WUNLOCK(chain); break; } rule = chain->reap; From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 16:45:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B8F0106566B; Wed, 17 Feb 2010 16:45:04 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B26B8FC0A; Wed, 17 Feb 2010 16:45:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HGj47v098545; Wed, 17 Feb 2010 16:45:04 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HGj41k098543; Wed, 17 Feb 2010 16:45:04 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002171645.o1HGj41k098543@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 17 Feb 2010 16:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204008 - head/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 16:45:04 -0000 Author: ru Date: Wed Feb 17 16:45:03 2010 New Revision: 204008 URL: http://svn.freebsd.org/changeset/base/204008 Log: realloc() with a proper amount of memory. MFC after: 3 days Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Wed Feb 17 15:44:01 2010 (r204007) +++ head/lib/libjail/jail.c Wed Feb 17 16:45:03 2010 (r204008) @@ -191,7 +191,7 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - jp = realloc(jp, nlist * sizeof(jp)); + jp = realloc(jp, nlist * sizeof(*jp)); if (jp == NULL) { jailparam_free(jp, njp); return (-1); From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 17:03:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96874106566B; Wed, 17 Feb 2010 17:03:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C99A8FC19; Wed, 17 Feb 2010 17:03:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HH343H002680; Wed, 17 Feb 2010 17:03:04 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HH34Zk002678; Wed, 17 Feb 2010 17:03:04 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201002171703.o1HH34Zk002678@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 17 Feb 2010 17:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204009 - head/sys/dev/mge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:03:04 -0000 Author: raj Date: Wed Feb 17 17:03:04 2010 New Revision: 204009 URL: http://svn.freebsd.org/changeset/base/204009 Log: Assorted fixes for mge(4). - Use proper map for the busdma sync on mge descriptor. - Remove unnecesary busdma sync. - Eliminate redundant locking in mge_reinit_rx() (just assert). - Kill unused variable. Submitted by: Grzegorz Bernacki Obtained from: Semihalf MFC after: 1 week Modified: head/sys/dev/mge/if_mge.c Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Wed Feb 17 16:45:03 2010 (r204008) +++ head/sys/dev/mge/if_mge.c Wed Feb 17 17:03:04 2010 (r204009) @@ -457,10 +457,7 @@ mge_allocate_dma(struct mge_softc *sc) { int error; struct mge_desc_wrapper *dw; - int num, i; - - - num = MGE_TX_DESC_NUM + MGE_RX_DESC_NUM; + int i; /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ error = bus_dma_tag_create(NULL, /* parent */ @@ -543,7 +540,7 @@ mge_reinit_rx(struct mge_softc *sc) struct mge_desc_wrapper *dw; int i; - MGE_RECEIVE_LOCK(sc); + MGE_RECEIVE_LOCK_ASSERT(sc); mge_free_desc(sc, sc->mge_rx_desc, MGE_RX_DESC_NUM, sc->mge_rx_dtag, 1); @@ -564,8 +561,6 @@ mge_reinit_rx(struct mge_softc *sc) /* Enable RX queue */ MGE_WRITE(sc, MGE_RX_QUEUE_CMD, MGE_ENABLE_RXQ(MGE_RX_DEFAULT_QUEUE)); - - MGE_RECEIVE_UNLOCK(sc); } #ifdef DEVICE_POLLING @@ -1375,9 +1370,6 @@ mge_encap(struct mge_softc *sc, struct m dw = &sc->mge_tx_desc[desc_no]; mapp = dw->buffer_dmap; - bus_dmamap_sync(sc->mge_desc_dtag, mapp, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* Create mapping in DMA memory */ error = bus_dmamap_load_mbuf_sg(sc->mge_tx_dtag, mapp, m0, segs, &nsegs, BUS_DMA_NOWAIT); @@ -1401,7 +1393,7 @@ mge_encap(struct mge_softc *sc, struct m mge_offload_setup_descriptor(sc, dw); } - bus_dmamap_sync(sc->mge_desc_dtag, mapp, + bus_dmamap_sync(sc->mge_desc_dtag, dw->desc_dmap, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); sc->tx_desc_curr = (++sc->tx_desc_curr) % MGE_TX_DESC_NUM; From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 17:54:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D30A01065670; Wed, 17 Feb 2010 17:54:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A45CF8FC19; Wed, 17 Feb 2010 17:54:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3F40F46B5B; Wed, 17 Feb 2010 12:54:46 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8848E8A01F; Wed, 17 Feb 2010 12:54:45 -0500 (EST) From: John Baldwin To: Ulrich Spoerlein Date: Wed, 17 Feb 2010 11:43:57 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201002151510.o1FFAMgv035651@svn.freebsd.org> In-Reply-To: <201002151510.o1FFAMgv035651@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002171143.57885.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Feb 2010 12:54:45 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203926 - in head/games/fortune: fortune strfile unstr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:54:46 -0000 On Monday 15 February 2010 10:10:22 am Ulrich Spoerlein wrote: > Author: uqs > Date: Mon Feb 15 15:10:21 2010 > New Revision: 203926 > URL: http://svn.freebsd.org/changeset/base/203926 > > Log: > fortune(6) switch to 3-clause BSDL; style(9) > > This reduces the diff to other *BSD and makes it possible to actually > see the code differences. > > Approved by: ed (Co-mentor) There appear to be a lot of unrelated changes to at least fortune.c in this commit. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 17:54:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF0A41065676; Wed, 17 Feb 2010 17:54:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BBA338FC13; Wed, 17 Feb 2010 17:54:47 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 651AD46B5C; Wed, 17 Feb 2010 12:54:47 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8E8BC8A021; Wed, 17 Feb 2010 12:54:46 -0500 (EST) From: John Baldwin To: ticso@cicely.de Date: Wed, 17 Feb 2010 11:50:16 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <20100210203519.GA44831@FreeBSD.org> <20100215.171425.646090028373155752.imp@bsdimp.com> <20100216133032.GH43625@cicely7.cicely.de> In-Reply-To: <20100216133032.GH43625@cicely7.cicely.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002171150.16645.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Feb 2010 12:54:46 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: danfe@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, avg@freebsd.org, attilio@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r203758 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 17:54:48 -0000 On Tuesday 16 February 2010 8:30:32 am Bernd Walter wrote: > On Mon, Feb 15, 2010 at 05:14:25PM -0700, M. Warner Losh wrote: > > In message: <4B79CE84.3060901@freebsd.org> > > Andriy Gapon writes: > > : At least in the i386/amd64 kernel config files typically we have: > > : optionsOPTION > > : And it is the case for the quoted above amd64 context. > > > > That's the standard way to add options in all kernel config files, > > although there's pockets here and there which don't quite comply. > > Interesting - I wasn't aware of this, but it surely makes sense. There's a comment in sys/conf/NOTES: # # NOTES conventions and style guide: # # Large block comments should begin and end with a line containing only a # comment character. # # To describe a particular object, a block comment (if it exists) should # come first. Next should come device, options, and hints lines in that # order. All device and option lines must be described by a comment that # doesn't just expand the device or option name. Use only a concise # comment on the same line if possible. Very detailed descriptions of # devices and subsystems belong in man pages. # # A space followed by a tab separates 'options' from an option name. Two # spaces followed by a tab separate 'device' from a device name. Comments # after an option or device should use one space after the comment character. # To comment out a negative option that disables code and thus should not be # enabled for LINT builds, precede 'options' with "#!". # -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 18:47:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A3B106566C; Wed, 17 Feb 2010 18:47:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD838FC1D; Wed, 17 Feb 2010 18:47:22 +0000 (UTC) Received: from c122-106-163-215.carlnfd1.nsw.optusnet.com.au (c122-106-163-215.carlnfd1.nsw.optusnet.com.au [122.106.163.215]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1HIlKZ4023649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 05:47:21 +1100 Date: Thu, 18 Feb 2010 05:47:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Poul-Henning Kamp In-Reply-To: <201002170911.o1H9BL6m095996@svn.freebsd.org> Message-ID: <20100218044931.S95007@delplex.bde.org> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 18:47:23 -0000 On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: > Log: > Mention EISDIR as a possible errno. It's not a possible error. > Modified: > head/lib/libc/sys/unlink.2 > > Modified: head/lib/libc/sys/unlink.2 > ============================================================================== > --- head/lib/libc/sys/unlink.2 Wed Feb 17 09:09:12 2010 (r203989) > +++ head/lib/libc/sys/unlink.2 Wed Feb 17 09:11:21 2010 (r203990) > @@ -114,6 +114,8 @@ succeeds unless: > .Bl -tag -width Er > .It Bq Er ENOTDIR > A component of the path prefix is not a directory. > +.It Bq Er EISDIR > +The named file is a directory. > .It Bq Er ENAMETOOLONG > A component of a pathname exceeded 255 characters, > or an entire path name exceeded 1023 characters. According to the POSIX spec (old draft, current version is the same): %%% 48397 [EPERM] The file named by path is a directory, and either the calling process does not 48398 have appropriate privileges, or the implementation prohibits using unlink( ) 48399 on directories. [EISDIR] [not mentioned for unlink()] %%% According to unlink.2: %%% [EPERM] The named file is a directory. [EISDIR] [previously not mentioned] %%% According to the source code: in kern_unlinkat(): % if (vp->v_type == VDIR && oldinum == 0) { % error = EPERM; /* POSIX */ % } else if (oldinum != 0 && % ((error = vn_stat(vp, &sb, td->td_ucred, NOCRED, td)) == 0) && % sb.st_ino != oldinum) { % error = EIDRM; /* Identifier removed */ % } else { `oldinum' is always 0 for unlink(2). Thus the code matches the specified and previously-documented behaviour. FreeBSD is still choosing to implement the second possibility of the spec (that the implementation prohibits using unlink() on directories) (except the first possibility allows this too -- appropriate privilege can mean "more privilege than anyone has"). The difference may be a difference in FreeBSD since trying to use appropriate privilege may have side effects, but it isn't required to be a difference in POSIX. `oldinum' is also always 0 for unlinkat(2). It seems to be only nonzero for the ffs_fsck sysctl. I guess this sysctl is undocumented and its EIDRM error is even less documented. The oldinum code has bad style: - weird indentation for both continued lines. Far from KNF (-ci4). Closer to -lp, but off-by 1 char for that. - banal comment. The "POSIX" comment for oldinum == 0 is banal and misleading too. POSIX does specify the errno as EPERM, but the only possibly-surprising thing about this errno is that it occurs for the superuser too, not what it is. Once upon a time, FreeBSD implemented the first possibility, with appropriate privilege meaning that only the superuser can try to unlink() (might still fail due to a leaf file system not liking it). Then the errno of EPERM was generic for lack of appropriate privelege and not commented on. Only the superuse case changed, and the comment misleads by documenting something banal instead of that. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 18:51:35 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86A95106566B; Wed, 17 Feb 2010 18:51:35 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 21C648FC12; Wed, 17 Feb 2010 18:51:34 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o1HIpXeF058535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 19:51:33 +0100 (CET) (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o1HIpXTl058534; Wed, 17 Feb 2010 19:51:33 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Wed, 17 Feb 2010 19:51:33 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: John Baldwin Message-ID: <20100217185133.GL57731@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201002151510.o1FFAMgv035651@svn.freebsd.org> <201002171143.57885.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002171143.57885.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r203926 - in head/games/fortune: fortune strfile unstr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 18:51:35 -0000 On Wed, 17.02.2010 at 11:43:57 -0500, John Baldwin wrote: > On Monday 15 February 2010 10:10:22 am Ulrich Spoerlein wrote: > > Author: uqs > > Date: Mon Feb 15 15:10:21 2010 > > New Revision: 203926 > > URL: http://svn.freebsd.org/changeset/base/203926 > > > > Log: > > fortune(6) switch to 3-clause BSDL; style(9) > > > > This reduces the diff to other *BSD and makes it possible to actually > > see the code differences. > > > > Approved by: ed (Co-mentor) > > There appear to be a lot of unrelated changes to at least fortune.c in this > commit. Hi John, care to elaborate? The commit log says that style(9) has been applied and it is a diff reduction commit in general. That said, the only object code altering change is the replacing of exit(0) with return(0) at the end of main(). There's nothing definitive in style(9) about that ... Cheers, Uli From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 18:58:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F19106568D; Wed, 17 Feb 2010 18:58:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 196168FC15; Wed, 17 Feb 2010 18:58:27 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id BA49C7E993; Wed, 17 Feb 2010 18:58:26 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id o1HIwP3K006414; Wed, 17 Feb 2010 18:58:26 GMT (envelope-from phk@critter.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 18 Feb 2010 05:47:19 +1100." <20100218044931.S95007@delplex.bde.org> Date: Wed, 17 Feb 2010 18:58:25 +0000 Message-ID: <6413.1266433105@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 18:58:28 -0000 In message <20100218044931.S95007@delplex.bde.org>, Bruce Evans writes: >On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: > >> Log: >> Mention EISDIR as a possible errno. > >It's not a possible error. critter phk> cat > a.c #include #include int main(int argc, char **argv) { if (unlink("/")) err(1, "Told you so"); return (0); } critter phk> cc a.c critter phk> ./a.out a.out: Told you so: Is a directory critter phk> -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 19:13:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15242106568D; Wed, 17 Feb 2010 19:13:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5228FC26; Wed, 17 Feb 2010 19:13:49 +0000 (UTC) Received: from besplex.bde.org (c122-106-163-215.carlnfd1.nsw.optusnet.com.au [122.106.163.215]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1HJDjc0021896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 06:13:47 +1100 Date: Thu, 18 Feb 2010 06:13:45 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans In-Reply-To: <20100218044931.S95007@delplex.bde.org> Message-ID: <20100218055229.Q1735@besplex.bde.org> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <20100218044931.S95007@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 19:13:50 -0000 On Thu, 18 Feb 2010, Bruce Evans wrote: > On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: > >> Log: >> Mention EISDIR as a possible errno. > > It's not a possible error. > >> ... Related bug: unlink(1) bogusly prints a messages that looks like strerror(EISDIR). It doesn't even try unlink(2) on directories, but prints this message from a private string. %%% Script started on Thu Feb 18 05:49:45 2010 ttyp0:bde@besplex:/tmp/z> mkdir z ttyp0:bde@besplex:/tmp/z> /bin/unlink z unlink: z: is a directory ttyp0:bde@besplex:/tmp/z> truss /bin/unlink z lstat("z",0xbfbfe840) = 0 (0x0) unlink: write(2,0xbfbfe0b0,8) = 8 (0x8) z: is a directorywrite(2,0xbfbfe0d0,17) = 17 (0x11) write(2,0x80a6753,1) = 1 (0x1) exit(0x1) process exit, rval = 256 %%% Here I use /bin/unlink since the unlink in $PATH is missing the bug. /bin/unlink is a link to /bin/rm. rm(1) takes a -d flag which should do the right thing for unlink, but this flag is neither settable nor forced for unlink(1). The above behaviour of unlink(1) is not permitted by POSIX or unlink(1)'s man page: POSIX (old draft, no change in current version): %%% 36900 The unlink utility shall perform the function call: 36901 unlink(file); 36902 A user may need appropriate privilege to invoke the unlink utility. %%% Man page: %%% When the utility is called as unlink, only one argument, which must not be a directory, may be supplied. No options may be supplied in this sim- ple mode of operation, which performs an unlink(2) operation on the passed argument. STANDARDS The rm command conforms to IEEE Std 1003.2 (``POSIX.2''). The simplified unlink command conforms to Version 2 of the Single UNIX Specification (``SUSv2''). %%% Oops, the man page actually says that the arg must not be a directory. POSIX doesn't make this restriction, except by possibly requiring appropriate privilege, which can be interpreted as "more privilege than exists" if the file is a directory so as to make FreeBSD conform (except the error must involve unlink(1) not being invokable in this case :-). POSIX doesn't specify the form of the diagnostic message for any case. Anyway, unlink(1) shouldn't fall into rm(1)'s error handling to to print its diagnostic. It should use a special message (matching its man page) for directories, or just try unlink(2). rm(1)'s current special message should say something about directory removal requiring -d, and not look like strerror(EISDIR). Or since directory removal is prohibited by the kernel, the -d option can never work, so it should have been removed ~10 years ago when the kernel was changed to prohibit it. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 20:25:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5883510656AE; Wed, 17 Feb 2010 20:25:58 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 169368FC21; Wed, 17 Feb 2010 20:25:57 +0000 (UTC) Received: by pxi12 with SMTP id 12so5105351pxi.33 for ; Wed, 17 Feb 2010 12:25:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=g8V05duK29zLGbrB6RmVYN72OVZ4sgspfE0UtXip8aw=; b=dEZkluGqVu1SVKZgkfR7FCI01Jf41TpazNGLX8Ff5tckGP9vWGXNEKPNM5B7L1jlR2 RRbVJBYaOpKrwUC7N/Wxfne2J0EH/2BGpPC4YRkylRnCZM3aWOzVBC9q7A/j4F44h0bj IO8SDW/8wjPgRV4vqRXcevHyZZf1eG6SCGsYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=HgLSwVZZgps8bFvPWTNinH1wZEdCXrmvqZ5cnCp/aTmRjPPW8qV7B6u3bVGeVDW1eV qA0nnk6iG5RMq0vcyx1UmPc10zUw4q/zDWlsUqcnjfK4IhfrLgHw5otchZsYlj6tay9r YlDPkb6Dh9tM2fh+DJxaOI6dd/pc8v9+Pr+sk= MIME-Version: 1.0 Received: by 10.143.24.10 with SMTP id b10mr1830610wfj.253.1266438356370; Wed, 17 Feb 2010 12:25:56 -0800 (PST) In-Reply-To: <20100218055229.Q1735@besplex.bde.org> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <20100218044931.S95007@delplex.bde.org> <20100218055229.Q1735@besplex.bde.org> Date: Wed, 17 Feb 2010 12:25:56 -0800 Message-ID: <7d6fde3d1002171225n5b6ebc2eyb85ffbfacb594da9@mail.gmail.com> From: Garrett Cooper To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 20:25:58 -0000 On Wed, Feb 17, 2010 at 11:13 AM, Bruce Evans wrote: > On Thu, 18 Feb 2010, Bruce Evans wrote: > >> On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: >> >>> Log: >>> =A0Mention EISDIR as a possible errno. >> >> It's not a possible error. >> >>> ... > > Related bug: unlink(1) bogusly prints a messages that looks like > strerror(EISDIR). =A0It doesn't even try unlink(2) on directories, > but prints this message from a private string. > > %%% > Script started on Thu Feb 18 05:49:45 2010 > ttyp0:bde@besplex:/tmp/z> mkdir z > ttyp0:bde@besplex:/tmp/z> /bin/unlink z > unlink: z: is a directory > ttyp0:bde@besplex:/tmp/z> truss /bin/unlink z > lstat("z",0xbfbfe840) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0=3D 0 (0x0) > unlink: write(2,0xbfbfe0b0,8) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0=3D 8 (0x8) > z: is a directorywrite(2,0xbfbfe0d0,17) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0=3D 17 (0x11) > > write(2,0x80a6753,1) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =3D 1 (0x1) > exit(0x1) process exit, rval =3D 256 > %%% > > Here I use /bin/unlink since the unlink in $PATH is missing the bug. > > /bin/unlink is a link to /bin/rm. =A0rm(1) takes a -d flag which should > do the right thing for unlink, but this flag is neither settable nor > forced for unlink(1). > > The above behaviour of unlink(1) is not permitted by POSIX or unlink(1)'s > man page: > > POSIX (old draft, no change in current version): > %%% > 36900 =A0 =A0 =A0 =A0 =A0 =A0The unlink utility shall perform the functio= n call: > 36901 =A0 =A0 =A0 =A0 =A0 =A0unlink(file); > 36902 =A0 =A0 =A0 =A0 =A0 =A0A user may need appropriate privilege to inv= oke the unlink > utility. > %%% > > Man page: > %%% > =A0 =A0 When the utility is called as unlink, only one argument, which mu= st not > =A0 =A0 be a directory, may be supplied. =A0No options may be supplied in= this > sim- > =A0 =A0 ple mode of operation, which performs an unlink(2) operation on t= he > =A0 =A0 passed argument. > > STANDARDS > =A0 =A0 The rm command conforms to IEEE Std 1003.2 (``POSIX.2''). > > =A0 =A0 The simplified unlink command conforms to Version 2 of the Single= UNIX > =A0 =A0 Specification (``SUSv2''). > %%% > > Oops, the man page actually says that the arg must not be a directory. > > POSIX doesn't make this restriction, except by possibly requiring > appropriate privilege, which can be interpreted as "more privilege > than exists" if the file is a directory so as to make FreeBSD conform > (except the error must involve unlink(1) not being invokable in this > case :-). =A0POSIX doesn't specify the form of the diagnostic message for > any case. > > Anyway, unlink(1) shouldn't fall into rm(1)'s error handling to to > print its diagnostic. =A0It should use a special message (matching its > man page) for directories, or just try unlink(2). > > rm(1)'s current special message should say something about directory > removal requiring -d, and not look like strerror(EISDIR). =A0Or since > directory removal is prohibited by the kernel, the -d option can never > work, so it should have been removed ~10 years ago when the kernel was > changed to prohibit it. 1. Where is EISDIR used in rm(1)? [garrcoop@garrcoop-fbsd /usr/src/sys]$ grep EISDIR ../bin/rm/rm.c [garrcoop@garrcoop-fbsd /usr/src/sys]$ uname -a FreeBSD garrcoop-fbsd.cisco.com 8.0-STABLE FreeBSD 8.0-STABLE #2: Wed Feb 3 16:57:07 PST 2010 garrcoop@garrcoop-fbsd.cisco.com:/usr/obj/usr/src/sys/LAPPY_X86 i386 2. phk's example in a latter email used unlink(2), not unlink(1). Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 20:31:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 580AF106568B; Wed, 17 Feb 2010 20:31:12 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5B58FC19; Wed, 17 Feb 2010 20:31:11 +0000 (UTC) Received: by pxi12 with SMTP id 12so5109328pxi.33 for ; Wed, 17 Feb 2010 12:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=z3IQKdeHLrUfWAkvdY8mhKFATQ6fb2Wts/C/Er73NNc=; b=QmFmE1OMMZF3/oC3Z9EKqhTo7FF6I5YsmSEFZIr17e/5DRK19WwfcWYn+TaLCWOh2/ 1QFeOe0ktI8ldBDdWRKEvTaHFth+CT31wPbZrisYt9z57l3AH5M0Kqc9WP3zb0/Eey9x uU94wHa3/PLS6y4hNyjhCtkxpt8OmAPp9UC4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hJtjUiyvv3C2wc18uMFGSimaepyItzAzi7AkGzxxKTABRD1XAR7uOWNZGN3saerL9f KN1JmCAA1gPnH6CdrqV4aUQVua0DOgQ5sXlDCSGWrBoTlgRJbmMdGxxhGe5dKPMi95DX 51B9OUmT5FuAAAezhQgAbGbAKi6eqwxr1FXWM= MIME-Version: 1.0 Received: by 10.142.247.33 with SMTP id u33mr5648801wfh.219.1266438671529; Wed, 17 Feb 2010 12:31:11 -0800 (PST) In-Reply-To: <201002170911.o1H9BL6m095996@svn.freebsd.org> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> Date: Wed, 17 Feb 2010 12:31:11 -0800 Message-ID: <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> From: Garrett Cooper To: Poul-Henning Kamp Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 20:31:12 -0000 On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp wrote: > Author: phk > Date: Wed Feb 17 09:11:21 2010 > New Revision: 203990 > URL: http://svn.freebsd.org/changeset/base/203990 > > Log: > =A0Mention EISDIR as a possible errno. > > Modified: > =A0head/lib/libc/sys/unlink.2 > > Modified: head/lib/libc/sys/unlink.2 > =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 > --- head/lib/libc/sys/unlink.2 =A0Wed Feb 17 09:09:12 2010 =A0 =A0 =A0 = =A0(r203989) > +++ head/lib/libc/sys/unlink.2 =A0Wed Feb 17 09:11:21 2010 =A0 =A0 =A0 = =A0(r203990) > @@ -114,6 +114,8 @@ succeeds unless: > =A0.Bl -tag -width Er > =A0.It Bq Er ENOTDIR > =A0A component of the path prefix is not a directory. > +.It Bq Er EISDIR > +The named file is a directory. > =A0.It Bq Er ENAMETOOLONG > =A0A component of a pathname exceeded 255 characters, > =A0or an entire path name exceeded 1023 characters. This is wrong as per POSIX (): [EPERM] The file named by path is a directory, and either the calling process does not have appropriate privileges, or the implementation prohibits using unlink() on directories. ... and the current manpage ... [EPERM] The named file is a directory. The manpage needs to be modified to note that, or the offender needs to be fixed. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 20:31:56 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12731065679; Wed, 17 Feb 2010 20:31:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 597488FC18; Wed, 17 Feb 2010 20:31:56 +0000 (UTC) Received: from besplex.bde.org (c122-106-163-215.carlnfd1.nsw.optusnet.com.au [122.106.163.215]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1HKVpPi012911 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 07:31:53 +1100 Date: Thu, 18 Feb 2010 07:31:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Poul-Henning Kamp In-Reply-To: <6413.1266433105@critter.freebsd.dk> Message-ID: <20100218064545.J2074@besplex.bde.org> References: <6413.1266433105@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 20:31:56 -0000 On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: > In message <20100218044931.S95007@delplex.bde.org>, Bruce Evans writes: >> On Wed, 17 Feb 2010, Poul-Henning Kamp wrote: >> >>> Log: >>> Mention EISDIR as a possible errno. >> >> It's not a possible error. > > critter phk> cat > a.c > #include > #include > > int > main(int argc, char **argv) > { > if (unlink("/")) > err(1, "Told you so"); > return (0); > } > critter phk> cc a.c > critter phk> ./a.out > a.out: Told you so: Is a directory > critter phk> Better fix the kernel bug than break the documentation then. The bug is very old -- it happens in ~5.2, where the code is a bit easier to understand: % int % kern_unlink(struct thread *td, char *path, enum uio_seg pathseg) % { % struct mount *mp; % struct vnode *vp; % int error; % struct nameidata nd; % % restart: % bwillwrite(); % NDINIT(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, pathseg, path, % td); % if ((error = namei(&nd)) != 0) % return (error); namei() returns EISDIR for "/" (due to DELETE and and the special handling of the degenerate case which includes "/" and not much else, else the bug would affect more cases). Then we return the wrong errno before we test VDIR. % vp = nd.ni_vp; % if (vp->v_type == VDIR) % error = EPERM; % else { Untested fix for ~5.2. Also fixes some style bugs. % Index: vfs_syscalls.c % =================================================================== % RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v % retrieving revision 1.354 % diff -u -2 -r1.354 vfs_syscalls.c % --- vfs_syscalls.c 24 Jun 2004 17:22:29 -0000 1.354 % +++ vfs_syscalls.c 17 Feb 2010 20:01:09 -0000 % @@ -1614,10 +1605,11 @@ % restart: % bwillwrite(); % - NDINIT(&nd, DELETE, LOCKPARENT|LOCKLEAF, pathseg, path, td); % + NDINIT(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, pathseg, path, % + td); Style fixes: - spell out NOFOLLOW (NOFOLLOW is 0, so omitting it is just confusing). This bug is in about 3 other vfs syscalls. - there are spaces around binary operators in KNF. These spaces are especially important for the "|" operator since this operator looks more like an alphanumeric character than most operator symbols, but they are most often omitted for this operator :-(. % if ((error = namei(&nd)) != 0) % - return (error); % + return (error == EISDIR ? EPERM : error); Fix the EISDIR bug. % vp = nd.ni_vp; % if (vp->v_type == VDIR) % - error = EPERM; /* POSIX */ % + error = EPERM; Remove banal/misleading comment. The new fixup needs a comment more than this, but I don't want to add one. % else { % /* ISTR trying to avoid the special handling for the degenerate case in namei() and lookup() (2 almost identical copies of it). The correct fix may be there. From lookup() in ~5.2: % /* % * Check for degenerate name (e.g. / or "") % * which is a way of talking about a directory, % * e.g. like "/." or ".". % */ % if (cnp->cn_nameptr[0] == '\0') { % if (dp->v_type != VDIR) { % error = ENOTDIR; % goto bad; % } % if (cnp->cn_nameiop != LOOKUP) { % error = EISDIR; % goto bad; % } Cases with trailing slashes are handled by removing the slash, but this doesn't work for "/" since we don't want to end up with the fully degenerate name of "". Cases starting with this fully degnerate name haven't been permitted since ~1988 when POSIX disallowed it, but the comment in the code hasn't caught up with this. The comment gives these cases as examples only, but I think that is another bug and that this is a complete list of degenerate names so the comment should say "i.e.,". After catching up with 1988 and removing "" from the list, only "/" remains. This is not really degenerate and can hopefully be handled more directly and simply. The != VDIR case in the above might already be unreachable. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 20:41:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35AE01065672; Wed, 17 Feb 2010 20:41:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id BC8698FC0C; Wed, 17 Feb 2010 20:41:15 +0000 (UTC) Received: from besplex.bde.org (c122-106-163-215.carlnfd1.nsw.optusnet.com.au [122.106.163.215]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1HKfClT004453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 07:41:13 +1100 Date: Thu, 18 Feb 2010 07:41:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper In-Reply-To: <7d6fde3d1002171225n5b6ebc2eyb85ffbfacb594da9@mail.gmail.com> Message-ID: <20100218073347.O2621@besplex.bde.org> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <20100218044931.S95007@delplex.bde.org> <20100218055229.Q1735@besplex.bde.org> <7d6fde3d1002171225n5b6ebc2eyb85ffbfacb594da9@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-828759399-1266439272=:2621" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp , Bruce Evans Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 20:41:16 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-828759399-1266439272=:2621 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 17 Feb 2010, Garrett Cooper wrote: > On Wed, Feb 17, 2010 at 11:13 AM, Bruce Evans wrot= e: >> On Thu, 18 Feb 2010, Bruce Evans wrote: >>>> ... >> >> Related bug: unlink(1) bogusly prints a messages that looks like >> strerror(EISDIR). =A0It doesn't even try unlink(2) on directories, >> but prints this message from a private string. >> ... >> Anyway, unlink(1) shouldn't fall into rm(1)'s error handling to to >> print its diagnostic. =A0It should use a special message (matching its >> man page) for directories, or just try unlink(2). >> >> rm(1)'s current special message should say something about directory >> removal requiring -d, and not look like strerror(EISDIR). =A0Or since >> directory removal is prohibited by the kernel, the -d option can never >> work, so it should have been removed ~10 years ago when the kernel was >> changed to prohibit it. > > 1. Where is EISDIR used in rm(1)? Nowhere. As described above, unlink[rm](1) prints a message that looks like sterror(EISDIR) from a private string. It doesn't even fake the string properly (the real message capitalizes "Is"). > 2. phk's example in a latter email used unlink(2), not unlink(1). My first reply was about unlink(2). My second reply was originally about the related bug in unlink(1) but expanded to cover related bugs in rm(1). Bruce --0-828759399-1266439272=:2621-- From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 21:01:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1DE31065676; Wed, 17 Feb 2010 21:01:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B1AE58FC13; Wed, 17 Feb 2010 21:01:33 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5BA1346B23; Wed, 17 Feb 2010 16:01:33 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7F20A8A01F; Wed, 17 Feb 2010 16:01:32 -0500 (EST) From: John Baldwin To: Ulrich =?iso-8859-1?q?Sp=F6rlein?= Date: Wed, 17 Feb 2010 15:56:08 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201002151510.o1FFAMgv035651@svn.freebsd.org> <201002171143.57885.jhb@freebsd.org> <20100217185133.GL57731@acme.spoerlein.net> In-Reply-To: <20100217185133.GL57731@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201002171556.08395.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Feb 2010 16:01:32 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203926 - in head/games/fortune: fortune strfile unstr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:01:34 -0000 On Wednesday 17 February 2010 1:51:33 pm Ulrich Sp=F6rlein wrote: > On Wed, 17.02.2010 at 11:43:57 -0500, John Baldwin wrote: > > On Monday 15 February 2010 10:10:22 am Ulrich Spoerlein wrote: > > > Author: uqs > > > Date: Mon Feb 15 15:10:21 2010 > > > New Revision: 203926 > > > URL: http://svn.freebsd.org/changeset/base/203926 > > >=20 > > > Log: > > > fortune(6) switch to 3-clause BSDL; style(9) > > > =20 > > > This reduces the diff to other *BSD and makes it possible to actual= ly > > > see the code differences. > > > =20 > > > Approved by: ed (Co-mentor) > >=20 > > There appear to be a lot of unrelated changes to at least fortune.c in = this=20 > > commit. >=20 > Hi John, >=20 > care to elaborate? The commit log says that style(9) has been applied > and it is a diff reduction commit in general. >=20 > That said, the only object code altering change is the replacing of > exit(0) with return(0) at the end of main(). There's nothing definitive > in style(9) about that ... Oh, I missed the 'style(9)' bit. A full sentence and even separate line items such as: =2D Switch to a 3-clause BSD license. =2D Various style(9) fixes. might help to reduce any confusion in the future. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 21:16:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8E381065692; Wed, 17 Feb 2010 21:16:41 +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 903A88FC18; Wed, 17 Feb 2010 21:16:41 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 65D051FFC22; Wed, 17 Feb 2010 21:16:40 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 01A0D844C2; Wed, 17 Feb 2010 22:16:39 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ulrich =?utf-8?Q?Sp=C3=B6rlein?= References: <201002151510.o1FFAMgv035651@svn.freebsd.org> <201002171143.57885.jhb@freebsd.org> <20100217185133.GL57731@acme.spoerlein.net> Date: Wed, 17 Feb 2010 22:16:39 +0100 In-Reply-To: <20100217185133.GL57731@acme.spoerlein.net> ("Ulrich =?utf-8?Q?Sp=C3=B6rlein=22's?= message of "Wed, 17 Feb 2010 19:51:33 +0100") Message-ID: <861vgjzhoo.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r203926 - in head/games/fortune: fortune strfile unstr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:16:41 -0000 Ulrich Sp=C3=B6rlein writes: > That said, the only object code altering change is the replacing of > exit(0) with return(0) at the end of main(). That's a regression. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 21:17:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4EA61065672; Wed, 17 Feb 2010 21:17:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA48A8FC1F; Wed, 17 Feb 2010 21:17:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HLHs4C059597; Wed, 17 Feb 2010 21:17:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HLHsE6059594; Wed, 17 Feb 2010 21:17:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002172117.o1HLHsE6059594@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Feb 2010 21:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204012 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:17:54 -0000 Author: jhb Date: Wed Feb 17 21:17:54 2010 New Revision: 204012 URL: http://svn.freebsd.org/changeset/base/204012 Log: Fix a bug where MSI interrupts on x86 were always routed to APIC ID 0 rather than the APIC ID of the boot CPU prior to SI_SUB_SMP. This resulted in some storage controllers not being able to enumerate attached devices when using MSI/MSI-X interrupts. This only affects <= 7.x, so it is a direct commit to 7 rather than an MFC. Reviewed by: scottl Approved by: re (kib) Modified: stable/7/sys/amd64/amd64/msi.c stable/7/sys/i386/i386/msi.c Modified: stable/7/sys/amd64/amd64/msi.c ============================================================================== --- stable/7/sys/amd64/amd64/msi.c Wed Feb 17 17:34:55 2010 (r204011) +++ stable/7/sys/amd64/amd64/msi.c Wed Feb 17 21:17:54 2010 (r204012) @@ -321,6 +321,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -477,6 +478,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers")); Modified: stable/7/sys/i386/i386/msi.c ============================================================================== --- stable/7/sys/i386/i386/msi.c Wed Feb 17 17:34:55 2010 (r204011) +++ stable/7/sys/i386/i386/msi.c Wed Feb 17 21:17:54 2010 (r204012) @@ -321,6 +321,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -477,6 +478,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers")); From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 21:19:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64351106566B; Wed, 17 Feb 2010 21:19:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2218FC12; Wed, 17 Feb 2010 21:19:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HLJBCN059924; Wed, 17 Feb 2010 21:19:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HLJB27059921; Wed, 17 Feb 2010 21:19:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002172119.o1HLJB27059921@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Feb 2010 21:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204013 - in releng/7.3/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:19:12 -0000 Author: jhb Date: Wed Feb 17 21:19:10 2010 New Revision: 204013 URL: http://svn.freebsd.org/changeset/base/204013 Log: Fix a bug where MSI interrupts on x86 were always routed to APIC ID 0 rather than the APIC ID of the boot CPU prior to SI_SUB_SMP. This resulted in some storage controllers not being able to enumerate attached devices when using MSI/MSI-X interrupts. This only affects <= 7.x, so it is a direct commit to 7.3 rather than an MFC. Approved by: re (kib) Modified: releng/7.3/sys/amd64/amd64/msi.c releng/7.3/sys/i386/i386/msi.c Modified: releng/7.3/sys/amd64/amd64/msi.c ============================================================================== --- releng/7.3/sys/amd64/amd64/msi.c Wed Feb 17 21:17:54 2010 (r204012) +++ releng/7.3/sys/amd64/amd64/msi.c Wed Feb 17 21:19:10 2010 (r204013) @@ -321,6 +321,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -477,6 +478,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers")); Modified: releng/7.3/sys/i386/i386/msi.c ============================================================================== --- releng/7.3/sys/i386/i386/msi.c Wed Feb 17 21:17:54 2010 (r204012) +++ releng/7.3/sys/i386/i386/msi.c Wed Feb 17 21:19:10 2010 (r204013) @@ -321,6 +321,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -477,6 +478,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; KASSERT(msi->msi_intsrc.is_handlers == 0, ("dead MSI-X has handlers")); From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 21:20:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 522CE1065692; Wed, 17 Feb 2010 21:20:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277748FC19; Wed, 17 Feb 2010 21:20:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HLKt1x060331; Wed, 17 Feb 2010 21:20:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HLKtbe060328; Wed, 17 Feb 2010 21:20:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002172120.o1HLKtbe060328@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Feb 2010 21:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204014 - in stable/6/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:20:55 -0000 Author: jhb Date: Wed Feb 17 21:20:54 2010 New Revision: 204014 URL: http://svn.freebsd.org/changeset/base/204014 Log: Fix a bug where MSI interrupts on x86 were always routed to APIC ID 0 rather than the APIC ID of the boot CPU prior to SI_SUB_SMP. This resulted in some storage controllers not being able to enumerate attached devices when using MSI/MSI-X interrupts. This only affects <= 7.x, so it is a direct commit to 7 rather than an MFC. Modified: stable/6/sys/amd64/amd64/msi.c stable/6/sys/i386/i386/msi.c Modified: stable/6/sys/amd64/amd64/msi.c ============================================================================== --- stable/6/sys/amd64/amd64/msi.c Wed Feb 17 21:19:10 2010 (r204013) +++ stable/6/sys/amd64/amd64/msi.c Wed Feb 17 21:20:54 2010 (r204014) @@ -301,6 +301,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -458,6 +459,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; /* XXX: Somewhat gross. */ Modified: stable/6/sys/i386/i386/msi.c ============================================================================== --- stable/6/sys/i386/i386/msi.c Wed Feb 17 21:19:10 2010 (r204013) +++ stable/6/sys/i386/i386/msi.c Wed Feb 17 21:20:54 2010 (r204014) @@ -301,6 +301,7 @@ again: for (i = 0; i < count; i++) { msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]); msi->msi_dev = dev; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_vector = vector + i; if (bootverbose) printf("msi: routing MSI IRQ %d to vector %u\n", @@ -458,6 +459,7 @@ again: /* Setup source. */ msi->msi_dev = dev; msi->msi_vector = vector; + msi->msi_cpu = PCPU_GET(apic_id); msi->msi_msix = 1; /* XXX: Somewhat gross. */ From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 22:22:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 435301065679; Wed, 17 Feb 2010 22:22:21 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32D628FC0C; Wed, 17 Feb 2010 22:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HMMLm3073902; Wed, 17 Feb 2010 22:22:21 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HMML9A073900; Wed, 17 Feb 2010 22:22:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201002172222.o1HMML9A073900@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Feb 2010 22:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204016 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 22:22:21 -0000 Author: jilles Date: Wed Feb 17 22:22:20 2010 New Revision: 204016 URL: http://svn.freebsd.org/changeset/base/204016 Log: sh: arith: Test an octal constant as well. Modified: head/tools/regression/bin/sh/expansion/arith2.0 Modified: head/tools/regression/bin/sh/expansion/arith2.0 ============================================================================== --- head/tools/regression/bin/sh/expansion/arith2.0 Wed Feb 17 22:10:47 2010 (r204015) +++ head/tools/regression/bin/sh/expansion/arith2.0 Wed Feb 17 22:22:20 2010 (r204016) @@ -22,6 +22,7 @@ check "4611686018427387904" 461168601842 check "0x4000000000000000" 4611686018427387904 check "0400000000000000000000" 4611686018427387904 check "0x4Ab0000000000000" 5381801554707742720 +check "010" 8 # try out all operators v=42 From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 22:25:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E55106566B; Wed, 17 Feb 2010 22:25:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0776E8FC19; Wed, 17 Feb 2010 22:25:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HMPMJK074610; Wed, 17 Feb 2010 22:25:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HMPMdt074608; Wed, 17 Feb 2010 22:25:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201002172225.o1HMPMdt074608@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Feb 2010 22:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204017 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 22:25:23 -0000 Author: jilles Date: Wed Feb 17 22:25:22 2010 New Revision: 204017 URL: http://svn.freebsd.org/changeset/base/204017 Log: sh: arith: Add a test for a bug in the dash arith code, which I plan to import at some point. Our current code handles it fine and it should stay that way. Added: head/tools/regression/bin/sh/expansion/arith3.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith3.0 Wed Feb 17 22:25:22 2010 (r204017) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ $(($1)) != $2 ]; then + failures=$((failures+1)) + echo "For $1, expected $2 actual $(($1))" + fi +} + +check "1 << 1 + 1 | 1" 5 + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Wed Feb 17 22:28:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D58BE106566B; Wed, 17 Feb 2010 22:28:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C59C08FC13; Wed, 17 Feb 2010 22:28:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1HMSb31075395; Wed, 17 Feb 2010 22:28:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1HMSbxA075393; Wed, 17 Feb 2010 22:28:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201002172228.o1HMSbxA075393@svn.freebsd.org> From: Ed Maste Date: Wed, 17 Feb 2010 22:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204019 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 22:28:37 -0000 Author: emaste Date: Wed Feb 17 22:28:37 2010 New Revision: 204019 URL: http://svn.freebsd.org/changeset/base/204019 Log: Include command type in COMMAND TIMEOUT messages to aid in debugging. Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Wed Feb 17 22:28:32 2010 (r204018) +++ head/sys/dev/aac/aac.c Wed Feb 17 22:28:37 2010 (r204019) @@ -2352,8 +2352,9 @@ aac_timeout(struct aac_softc *sc) /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) { cm->cm_flags |= AAC_CMD_TIMEDOUT; device_printf(sc->aac_dev, - "COMMAND %p TIMEOUT AFTER %d SECONDS\n", - cm, (int)(time_uptime-cm->cm_timestamp)); + "COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n", + cm, cm->cm_fib->Header.Command, + (int)(time_uptime-cm->cm_timestamp)); AAC_PRINT_FIB(sc, cm->cm_fib); timedout++; } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 01:15:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB20106566B; Thu, 18 Feb 2010 01:15:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48D6E8FC0A; Thu, 18 Feb 2010 01:15:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I1Fwo9012445; Thu, 18 Feb 2010 01:15:58 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I1FwZk012443; Thu, 18 Feb 2010 01:15:58 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002180115.o1I1FwZk012443@svn.freebsd.org> From: Matt Jacob Date: Thu, 18 Feb 2010 01:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204023 - stable/8/sbin/geom/class/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 01:15:58 -0000 Author: mjacob Date: Thu Feb 18 01:15:58 2010 New Revision: 204023 URL: http://svn.freebsd.org/changeset/base/204023 Log: Add the long missing "destroy" option [mfc of 203505] Modified: stable/8/sbin/geom/class/multipath/geom_multipath.c Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- stable/8/sbin/geom/class/multipath/geom_multipath.c Wed Feb 17 23:54:54 2010 (r204022) +++ stable/8/sbin/geom/class/multipath/geom_multipath.c Thu Feb 18 01:15:58 2010 (r204023) @@ -55,6 +55,10 @@ struct g_command class_commands[] = { NULL, "[-v] name prov ..." }, { + "destroy", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + NULL, "[-v] prov ..." + }, + { "clear", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, NULL, "[-v] prov ..." }, From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 01:44:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 833DD1065672; Thu, 18 Feb 2010 01:44:48 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 724478FC16; Thu, 18 Feb 2010 01:44:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I1imMQ018731; Thu, 18 Feb 2010 01:44:48 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I1imGp018729; Thu, 18 Feb 2010 01:44:48 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002180144.o1I1imGp018729@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 18 Feb 2010 01:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204024 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 01:44:48 -0000 Author: marcel Date: Thu Feb 18 01:44:48 2010 New Revision: 204024 URL: http://svn.freebsd.org/changeset/base/204024 Log: Unbreak WARNS=6 builds for C++ code: -Wold-style-definition is not accepted by the C++ compiler. Filter it out. Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Feb 18 01:15:58 2010 (r204023) +++ head/share/mk/sys.mk Thu Feb 18 01:44:48 2010 (r204024) @@ -66,7 +66,7 @@ CFLAGS += -g .endif CXX ?= c++ -CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign} +CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} PO_CXXFLAGS ?= ${CXXFLAGS} CPP ?= cpp From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 02:06:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D97106566C; Thu, 18 Feb 2010 02:06:58 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03AF58FC12; Thu, 18 Feb 2010 02:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I26vUl023581; Thu, 18 Feb 2010 02:06:57 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I26vjl023579; Thu, 18 Feb 2010 02:06:57 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002180206.o1I26vjl023579@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 18 Feb 2010 02:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204025 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 02:06:58 -0000 Author: marcel Date: Thu Feb 18 02:06:57 2010 New Revision: 204025 URL: http://svn.freebsd.org/changeset/base/204025 Log: Allow suppression of -Wcast-align for WARNS>=4 by defining NO_WCAST_ALIGN. The headers of the standard C++ library are not 64-bit clean and trigger the warning. This prevents use of WARNS>=4 on ia64 for example. Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Feb 18 01:44:48 2010 (r204024) +++ head/share/mk/bsd.sys.mk Thu Feb 18 02:06:57 2010 (r204025) @@ -43,7 +43,10 @@ CWARNFLAGS += -W -Wno-unused-parameter - . endif . if ${WARNS} >= 4 CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ - -Wshadow -Wcast-align -Wunused-parameter + -Wshadow -Wunused-parameter +. if !defined(NO_WCAST_ALIGN) +CWARNFLAGS += -Wcast-align +. endif . endif # BDECFLAGS . if ${WARNS} >= 6 From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 03:32:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFF1D106566B; Thu, 18 Feb 2010 03:32:51 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8558A8FC0C; Thu, 18 Feb 2010 03:32:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I3WpVH042685; Thu, 18 Feb 2010 03:32:51 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I3WpBd042683; Thu, 18 Feb 2010 03:32:51 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002180332.o1I3WpBd042683@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 18 Feb 2010 03:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204027 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 03:32:52 -0000 Author: marcel Date: Thu Feb 18 03:32:51 2010 New Revision: 204027 URL: http://svn.freebsd.org/changeset/base/204027 Log: Also add DEBUG_FLAGS to CXXFLAGS if defined. Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Feb 18 02:37:23 2010 (r204026) +++ head/share/mk/bsd.prog.mk Thu Feb 18 03:32:51 2010 (r204027) @@ -17,6 +17,7 @@ NO_WERROR= .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} +CXXFLAGS+=${DEBUG_FLAGS} .if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") CTFFLAGS+= -g From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 05:14:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665B1106566B; Thu, 18 Feb 2010 05:14:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 566868FC12; Thu, 18 Feb 2010 05:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I5EaX5065027; Thu, 18 Feb 2010 05:14:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I5EaP3065025; Thu, 18 Feb 2010 05:14:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002180514.o1I5EaP3065025@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 05:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204030 - head/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 05:14:36 -0000 Author: imp Date: Thu Feb 18 05:14:36 2010 New Revision: 204030 URL: http://svn.freebsd.org/changeset/base/204030 Log: bc and dc are not BSD version, not GNU version. Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Feb 18 05:12:05 2010 (r204029) +++ head/usr.bin/Makefile Thu Feb 18 05:14:36 2010 (r204030) @@ -5,7 +5,7 @@ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend -# XXX Use GNU versions: apropos bc dc diff grep ld man patch whatis +# XXX Use GNU versions: apropos diff grep ld man patch whatis # Moved to secure: bdes # From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 05:19:17 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FA781065679; Thu, 18 Feb 2010 05:19:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A4E9A8FC28; Thu, 18 Feb 2010 05:19:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1I59Jh7059667; Wed, 17 Feb 2010 22:09:19 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 17 Feb 2010 22:09:35 -0700 (MST) Message-Id: <20100217.220935.1104512900358221705.imp@bsdimp.com> To: marcel@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201002180206.o1I26vjl023579@svn.freebsd.org> References: <201002180206.o1I26vjl023579@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204025 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 05:19:17 -0000 In message: <201002180206.o1I26vjl023579@svn.freebsd.org> Marcel Moolenaar writes: : Allow suppression of -Wcast-align for WARNS>=4 by defining : NO_WCAST_ALIGN. The headers of the standard C++ library are : not 64-bit clean and trigger the warning. This prevents use : of WARNS>=4 on ia64 for example. Even 32-bit ARM has issues with alignment and things like data puning of types like sockaddr. Warner From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 05:49:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915B4106566B; Thu, 18 Feb 2010 05:49:53 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8FF8FC0C; Thu, 18 Feb 2010 05:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1I5nr8k072844; Thu, 18 Feb 2010 05:49:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1I5nruS072838; Thu, 18 Feb 2010 05:49:53 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002180549.o1I5nruS072838@svn.freebsd.org> From: Neel Natu Date: Thu, 18 Feb 2010 05:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204031 - in head: share/mk sys/conf sys/kern sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 05:49:53 -0000 Author: neel Date: Thu Feb 18 05:49:52 2010 New Revision: 204031 URL: http://svn.freebsd.org/changeset/base/204031 Log: Kernel module support for mips. Reviewed by: gonzo Tested by: Alexandr Rybalko (ray@dlink.ua) Modified: head/share/mk/bsd.cpu.mk head/sys/conf/files.mips head/sys/conf/kmod.mk head/sys/kern/link_elf_obj.c head/sys/mips/mips/elf_machdep.c Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Thu Feb 18 05:14:36 2010 (r204030) +++ head/share/mk/bsd.cpu.mk Thu Feb 18 05:49:52 2010 (r204031) @@ -203,11 +203,9 @@ LD += -EB .if ${MACHINE_ARCH} == "mips" . if defined(TARGET_BIG_ENDIAN) CFLAGS += -EB -LDFLAGS += -Wl,-EB LD += -EB . else CFLAGS += -EL -LDFLAGS += -Wl,-EL LD += -EL . endif CFLAGS += -msoft-float -G0 -mno-dsp -mabicalls Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Feb 18 05:14:36 2010 (r204030) +++ head/sys/conf/files.mips Thu Feb 18 05:49:52 2010 (r204031) @@ -89,6 +89,8 @@ libkern/umoddi3.c optional isa_mips32 #libkern/mips/strcmp.S standard #libkern/mips/strncmp.S standard +kern/link_elf_obj.c standard + dev/cfe/cfe_api.c optional cfe dev/cfe/cfe_console.c optional cfe_console dev/cfe/cfe_env.c optional cfe_env Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Feb 18 05:14:36 2010 (r204030) +++ head/sys/conf/kmod.mk Thu Feb 18 05:49:52 2010 (r204031) @@ -128,6 +128,10 @@ CFLAGS+= -fno-omit-frame-pointer CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif +.if ${MACHINE_ARCH} == "mips" +CFLAGS+= -G0 -fno-pic -mno-abicalls -mlong-calls +.endif + .if defined(FIRMWS) .if !exists(@) ${KMOD:S/$/.c/}: @ @@ -174,7 +178,7 @@ ${PROG}.symbols: ${FULLPROG} ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} .endif -.if ${MACHINE_ARCH} != amd64 +.if ${MACHINE_ARCH} != amd64 && ${MACHINE_ARCH} != mips ${FULLPROG}: ${KMOD}.kld ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld .if !defined(DEBUG_FLAGS) @@ -187,7 +191,7 @@ EXPORT_SYMS?= NO CLEANFILES+= export_syms .endif -.if ${MACHINE_ARCH} != amd64 +.if ${MACHINE_ARCH} != amd64 && ${MACHINE_ARCH} != mips ${KMOD}.kld: ${OBJS} .else ${FULLPROG}: ${OBJS} @@ -206,7 +210,8 @@ ${FULLPROG}: ${OBJS} export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .endif -.if !defined(DEBUG_FLAGS) && ${MACHINE_ARCH} == amd64 +.if !defined(DEBUG_FLAGS) && \ + (${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == mips) ${OBJCOPY} --strip-debug ${.TARGET} .endif Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Thu Feb 18 05:14:36 2010 (r204030) +++ head/sys/kern/link_elf_obj.c Thu Feb 18 05:49:52 2010 (r204031) @@ -853,8 +853,8 @@ link_elf_load_file(linker_class_t cls, c panic("lost relatab"); if (mapbase != (vm_offset_t)ef->address + mapsize) panic("mapbase 0x%lx != address %p + mapsize 0x%lx (0x%lx)\n", - mapbase, ef->address, mapsize, - (vm_offset_t)ef->address + mapsize); + (u_long)mapbase, ef->address, (u_long)mapsize, + (u_long)(vm_offset_t)ef->address + mapsize); /* Local intra-module relocations */ link_elf_reloc_local(lf); Modified: head/sys/mips/mips/elf_machdep.c ============================================================================== --- head/sys/mips/mips/elf_machdep.c Thu Feb 18 05:14:36 2010 (r204030) +++ head/sys/mips/mips/elf_machdep.c Thu Feb 18 05:49:52 2010 (r204031) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef __mips_n64 struct sysentvec elf64_freebsd_sysvec = { @@ -163,7 +164,12 @@ elf_reloc_internal(linker_file_t lf, Elf Elf_Addr addend = (Elf_Addr)0; Elf_Word rtype = (Elf_Word)0, symidx; const Elf_Rel *rel; - const Elf_Rela *rela; + + /* + * Stash R_MIPS_HI16 info so we can use it when processing R_MIPS_LO16 + */ + static Elf_Addr ahl; + static Elf_Addr *where_hi16; switch (type) { case ELF_RELOC_REL: @@ -173,108 +179,63 @@ elf_reloc_internal(linker_file_t lf, Elf rtype = ELF_R_TYPE(rel->r_info); symidx = ELF_R_SYM(rel->r_info); break; - case ELF_RELOC_RELA: - rela = (const Elf_Rela *)data; - where = (Elf_Addr *) (relocbase + rela->r_offset); - addend = rela->r_addend; - rtype = ELF_R_TYPE(rela->r_info); - symidx = ELF_R_SYM(rela->r_info); - break; default: panic("unknown reloc type %d\n", type); } - if (local) { -#if 0 /* TBD */ - if (rtype == R_386_RELATIVE) { /* A + B */ - addr = elf_relocaddr(lf, relocbase + addend); - if (*where != addr) - *where = addr; - } - return (0); -#endif - } - switch (rtype) { + case R_MIPS_NONE: /* none */ + break; - case R_MIPS_NONE: /* none */ - break; + case R_MIPS_32: /* S + A */ + addr = lookup(lf, symidx, 1); + if (addr == 0) + return (-1); + addr += addend; + if (*where != addr) + *where = addr; + break; - case R_MIPS_16: /* S + sign-extend(A) */ - /* - * There shouldn't be R_MIPS_16 relocs in kernel objects. - */ - printf("kldload: unexpected R_MIPS_16 relocation\n"); - return -1; - break; - - case R_MIPS_32: /* S + A - P */ - addr = lookup(lf, symidx, 1); - if (addr == 0) - return -1; - addr += addend; - if (*where != addr) - *where = addr; - break; - - case R_MIPS_REL32: /* A - EA + S */ - /* - * There shouldn't be R_MIPS_REL32 relocs in kernel objects? - */ - printf("kldload: unexpected R_MIPS_REL32 relocation\n"); - return -1; - break; - - case R_MIPS_26: /* ((A << 2) | (P & 0xf0000000) + S) >> 2 */ - break; - - case R_MIPS_HI16: - /* extern/local: ((AHL + S) - ((short)(AHL + S)) >> 16 */ - /* _gp_disp: ((AHL + GP - P) - (short)(AHL + GP - P)) >> 16 */ - break; - - case R_MIPS_LO16: - /* extern/local: AHL + S */ - /* _gp_disp: AHL + GP - P + 4 */ - break; - - case R_MIPS_GPREL16: - /* extern/local: ((AHL + S) - ((short)(AHL + S)) >> 16 */ - /* _gp_disp: ((AHL + GP - P) - (short)(AHL + GP - P)) >> 16 */ - break; - - case R_MIPS_LITERAL: /* sign-extend(A) + L */ - break; - - case R_MIPS_GOT16: /* external: G */ - /* local: tbd */ - break; - - case R_MIPS_PC16: /* sign-extend(A) + S - P */ - break; - - case R_MIPS_CALL16: /* G */ - break; - - case R_MIPS_GPREL32: /* A + S + GP0 - GP */ - break; - - case R_MIPS_GOTHI16: /* (G - (short)G) >> 16 + A */ - break; - - case R_MIPS_GOTLO16: /* G & 0xffff */ - break; - - case R_MIPS_CALLHI16: /* (G - (short)G) >> 16 + A */ - break; - - case R_MIPS_CALLLO16: /* G & 0xffff */ - break; - - default: - printf("kldload: unexpected relocation type %d\n", - rtype); + case R_MIPS_26: /* ((A << 2) | (P & 0xf0000000) + S) >> 2 */ + addr = lookup(lf, symidx, 1); + if (addr == 0) return (-1); + + addend &= 0x03ffffff; + addend <<= 2; + + addr += ((Elf_Addr)where & 0xf0000000) | addend; + addr >>= 2; + + *where &= ~0x03ffffff; + *where |= addr & 0x03ffffff; + break; + + case R_MIPS_HI16: /* ((AHL + S) - ((short)(AHL + S)) >> 16 */ + ahl = addend << 16; + where_hi16 = where; + break; + + case R_MIPS_LO16: /* AHL + S */ + ahl += (int16_t)addend; + addr = lookup(lf, symidx, 1); + if (addr == 0) + return (-1); + + addend &= 0xffff0000; + addend |= (uint16_t)(ahl + addr); + *where = addend; + + addend = *where_hi16; + addend &= 0xffff0000; + addend |= ((ahl + addr) - (int16_t)(ahl + addr)) >> 16; + *where_hi16 = addend; + break; + + default: + printf("kldload: unexpected relocation type %d\n", + rtype); + return (-1); } return(0); } @@ -299,6 +260,11 @@ int elf_cpu_load_file(linker_file_t lf __unused) { + /* + * Sync the I and D caches to make sure our relocations are visible. + */ + mips_icache_sync_all(); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 06:54:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B23D1106568B; Thu, 18 Feb 2010 06:54:59 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC708FC12; Thu, 18 Feb 2010 06:54:58 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o1I6t6PO071100; Thu, 18 Feb 2010 06:55:06 GMT (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id xhu7gah9jcrtcpu2wm2i34q6mn; Thu, 18 Feb 2010 06:55:06 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4B7CE47E.4090500@freebsd.org> Date: Wed, 17 Feb 2010 22:55:58 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Garrett Cooper References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> In-Reply-To: <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 06:54:59 -0000 Garrett Cooper wrote: > On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp wrote: >> Author: phk >> Date: Wed Feb 17 09:11:21 2010 >> New Revision: 203990 >> URL: http://svn.freebsd.org/changeset/base/203990 >> >> Log: >> Mention EISDIR as a possible errno. >> >> Modified: >> head/lib/libc/sys/unlink.2 > > This is wrong as per POSIX > (): > > [EPERM] > The file named by path is a directory, and either the calling process > does not have appropriate privileges, or the implementation prohibits > using unlink() on directories. On a not-entirely-unrelated note, I wonder if any of the POSIX experts around know whether POSIX specifies an errno value for this call: open("/", O_WRONLY | O_EXCL | O_CREAT, 0777) I ran into this puzzler back when I was trying to optimize the restore sequence for libarchive. As near as I've been able to tell, POSIX is ambiguous here: It requires EISDIR for open(O_WRONLY) on a dir and EEXIST for open(O_EXCL | O_CREAT) on an existing item but without any clear guidance on which of those takes priority in this case. Anyone think they know the answer? Cheers, Tim From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 09:55:46 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EEA2106566C; Thu, 18 Feb 2010 09:55:46 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC508FC15; Thu, 18 Feb 2010 09:55:46 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 9EC2A2167C8; Thu, 18 Feb 2010 11:55:39 +0200 (EET) Date: Thu, 18 Feb 2010 11:55:39 +0200 From: Jaakko Heinonen To: Bruce Evans Message-ID: <20100218095538.GA2318@a91-153-117-195.elisa-laajakaista.fi> References: <6413.1266433105@critter.freebsd.dk> <20100218064545.J2074@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218064545.J2074@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, Poul-Henning Kamp , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 09:55:46 -0000 On 2010-02-18, Bruce Evans wrote: > > critter phk> ./a.out > > a.out: Told you so: Is a directory > > Better fix the kernel bug than break the documentation then. Seconded. > namei() returns EISDIR for "/" (due to DELETE and and the special handling > of the degenerate case which includes "/" and not much else, else the bug > would affect more cases). This causes a problem also for mkdir(2), rmdir(2) and rename(2). All of them incorrectly return EISDIR for "/". An open PR and some discussion: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/59739 http://lists.freebsd.org/pipermail/freebsd-hackers/2009-November/029958.html -- Jaakko From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:39:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B26106568D; Thu, 18 Feb 2010 10:39:54 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 530E68FC12; Thu, 18 Feb 2010 10:39:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IAdsnW039107; Thu, 18 Feb 2010 10:39:54 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IAdsSO039106; Thu, 18 Feb 2010 10:39:54 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181039.o1IAdsSO039106@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204032 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:39:54 -0000 Author: brucec Date: Thu Feb 18 10:39:53 2010 New Revision: 204032 URL: http://svn.freebsd.org/changeset/base/204032 Log: MFC r203681: Fix typo and remove extra spaces. Approved by: rrs (mentor) Modified: stable/8/share/man/man4/sctp.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/sctp.4 ============================================================================== --- stable/8/share/man/man4/sctp.4 Thu Feb 18 05:49:52 2010 (r204031) +++ stable/8/share/man/man4/sctp.4 Thu Feb 18 10:39:53 2010 (r204032) @@ -154,8 +154,8 @@ also supports the following extensions: This extension allows one to have message be skipped and not delivered based on some user specified parameters. .It "sctp dynamic addressing" - This extension allows addresses to be added and deleted -dynammically from an existing association. +This extension allows addresses to be added and deleted +dynamically from an existing association. .It "sctp authentication" This extension allows the user to authenticate specific peer chunks (including data) to validate that the peer @@ -164,7 +164,7 @@ association. A shared key option is also provided for so that two stacks can pre-share keys. .It "packet drop" - Some routers support a special satellite protocol that +Some routers support a special satellite protocol that will report losses due to corruption. This allows retransmissions without subsequent loss in bandwidth utilization. From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:46:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9009106568B; Thu, 18 Feb 2010 10:46:25 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3F88FC14; Thu, 18 Feb 2010 10:46:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IAkPPW040652; Thu, 18 Feb 2010 10:46:25 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IAkP2k040648; Thu, 18 Feb 2010 10:46:25 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181046.o1IAkP2k040648@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204033 - in stable/8: bin/pkill bin/ps usr.bin/w X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:46:25 -0000 Author: brucec Date: Thu Feb 18 10:46:25 2010 New Revision: 204033 URL: http://svn.freebsd.org/changeset/base/204033 Log: MFC r203688: Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows the -M option to be used without specifying -N. PR: bin/138146 Approved by: rrs (mentor) Modified: stable/8/bin/pkill/pkill.c stable/8/bin/ps/ps.c stable/8/usr.bin/w/w.c Directory Properties: stable/8/bin/pkill/ (props changed) stable/8/bin/ps/ (props changed) stable/8/usr.bin/w/ (props changed) Modified: stable/8/bin/pkill/pkill.c ============================================================================== --- stable/8/bin/pkill/pkill.c Thu Feb 18 10:39:53 2010 (r204032) +++ stable/8/bin/pkill/pkill.c Thu Feb 18 10:46:25 2010 (r204033) @@ -180,7 +180,8 @@ main(int argc, char **argv) debug_opt = 0; pidfile = NULL; pidfilelock = 0; - execf = coref = _PATH_DEVNULL; + execf = NULL; + coref = _PATH_DEVNULL; while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1) switch (ch) { Modified: stable/8/bin/ps/ps.c ============================================================================== --- stable/8/bin/ps/ps.c Thu Feb 18 10:39:53 2010 (r204032) +++ stable/8/bin/ps/ps.c Thu Feb 18 10:46:25 2010 (r204033) @@ -212,7 +212,8 @@ main(int argc, char *argv[]) init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id"); init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); - memf = nlistf = _PATH_DEVNULL; + memf = _PATH_DEVNULL; + nlistf = NULL; while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch (ch) { case 'A': Modified: stable/8/usr.bin/w/w.c ============================================================================== --- stable/8/usr.bin/w/w.c Thu Feb 18 10:39:53 2010 (r204032) +++ stable/8/usr.bin/w/w.c Thu Feb 18 10:46:25 2010 (r204033) @@ -158,7 +158,8 @@ main(int argc, char *argv[]) } dropgid = 0; - memf = nlistf = _PATH_DEVNULL; + memf = _PATH_DEVNULL; + nlistf = NULL; while ((ch = getopt(argc, argv, p)) != -1) switch (ch) { case 'd': From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:48:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AA9F106566B; Thu, 18 Feb 2010 10:48:37 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 591C28FC13; Thu, 18 Feb 2010 10:48:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IAmbsc041165; Thu, 18 Feb 2010 10:48:37 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IAmbw7041163; Thu, 18 Feb 2010 10:48:37 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181048.o1IAmbw7041163@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204034 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:48:37 -0000 Author: brucec Date: Thu Feb 18 10:48:37 2010 New Revision: 204034 URL: http://svn.freebsd.org/changeset/base/204034 Log: MFC r203690: Xorg isn't treated as a distribution, so /usr/X11R6/lib shouldn't be configured when running ldconfig. PR: bin/138945 Approved by: rrs (mentor) Modified: stable/8/usr.sbin/sysinstall/package.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/package.c ============================================================================== --- stable/8/usr.sbin/sysinstall/package.c Thu Feb 18 10:46:25 2010 (r204033) +++ stable/8/usr.sbin/sysinstall/package.c Thu Feb 18 10:48:37 2010 (r204034) @@ -139,7 +139,7 @@ package_extract(Device *dev, char *name, /* If necessary, initialize the ldconfig hints */ if (!file_readable("/var/run/ld-elf.so.hints")) - vsystem("ldconfig /usr/lib /usr/lib/compat /usr/local/lib /usr/X11R6/lib"); + vsystem("ldconfig /usr/lib /usr/lib/compat /usr/local/lib"); /* Be initially optimistic */ ret = DITEM_SUCCESS; From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:51:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93AEA1065695; Thu, 18 Feb 2010 10:51:31 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 691508FC1D; Thu, 18 Feb 2010 10:51:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IApVKo041861; Thu, 18 Feb 2010 10:51:31 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IApVih041856; Thu, 18 Feb 2010 10:51:31 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181051.o1IApVih041856@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204035 - stable/8/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:51:31 -0000 Author: brucec Date: Thu Feb 18 10:51:31 2010 New Revision: 204035 URL: http://svn.freebsd.org/changeset/base/204035 Log: MFC r203322: Fix typo of ENOTCONN. Add missing RETURN VALUES section in sctp_opt_info(3). Approved by: rrs (mentor) Modified: stable/8/lib/libc/net/sctp_opt_info.3 stable/8/lib/libc/net/sctp_recvmsg.3 stable/8/lib/libc/net/sctp_send.3 stable/8/lib/libc/net/sctp_sendmsg.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/net/sctp_opt_info.3 ============================================================================== --- stable/8/lib/libc/net/sctp_opt_info.3 Thu Feb 18 10:48:37 2010 (r204034) +++ stable/8/lib/libc/net/sctp_opt_info.3 Thu Feb 18 10:51:31 2010 (r204035) @@ -87,6 +87,8 @@ socket options. .Dv SCTP_PEER_AUTH_CHUNKS .Pp .Dv SCTP_LOCAL_AUTH_CHUNKS +.Sh RETURN VALUES +The call returns 0 on success and -1 upon error. .Sh ERRORS The .Fn sctp_opt_info Modified: stable/8/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- stable/8/lib/libc/net/sctp_recvmsg.3 Thu Feb 18 10:48:37 2010 (r204034) +++ stable/8/lib/libc/net/sctp_recvmsg.3 Thu Feb 18 10:51:31 2010 (r204035) @@ -269,7 +269,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was Modified: stable/8/lib/libc/net/sctp_send.3 ============================================================================== --- stable/8/lib/libc/net/sctp_send.3 Thu Feb 18 10:48:37 2010 (r204034) +++ stable/8/lib/libc/net/sctp_send.3 Thu Feb 18 10:51:31 2010 (r204035) @@ -319,7 +319,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was Modified: stable/8/lib/libc/net/sctp_sendmsg.3 ============================================================================== --- stable/8/lib/libc/net/sctp_sendmsg.3 Thu Feb 18 10:48:37 2010 (r204034) +++ stable/8/lib/libc/net/sctp_sendmsg.3 Thu Feb 18 10:51:31 2010 (r204035) @@ -296,7 +296,7 @@ This generally indicates that the interf but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. -.It Bq Er ENOTCON +.It Bq Er ENOTCONN On a one-to-one style socket no association exists. .It Bq Er ECONNRESET An abort was received by the stack while the user was From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:55:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08BF106566C; Thu, 18 Feb 2010 10:55:42 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF31C8FC14; Thu, 18 Feb 2010 10:55:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IAtgJL042828; Thu, 18 Feb 2010 10:55:42 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IAtgXJ042826; Thu, 18 Feb 2010 10:55:42 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181055.o1IAtgXJ042826@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204036 - stable/8/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:55:43 -0000 Author: brucec Date: Thu Feb 18 10:55:42 2010 New Revision: 204036 URL: http://svn.freebsd.org/changeset/base/204036 Log: MFC r203323: Remove extra semicolon. Approved by: rrs (mentor) Modified: stable/8/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/8/lib/libc/net/sctp_sys_calls.c Thu Feb 18 10:51:31 2010 (r204035) +++ stable/8/lib/libc/net/sctp_sys_calls.c Thu Feb 18 10:55:42 2010 (r204036) @@ -784,7 +784,7 @@ sctp_sendx(int sd, const void *msg, size free(buf); if (ret != 0) { if (errno == EALREADY) { - no_end_cx = 1;; + no_end_cx = 1; goto continue_send; } return (ret); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 10:59:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6424B1065672; Thu, 18 Feb 2010 10:59:32 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51F1B8FC1D; Thu, 18 Feb 2010 10:59:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IAxWvu043723; Thu, 18 Feb 2010 10:59:32 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IAxWiv043720; Thu, 18 Feb 2010 10:59:32 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181059.o1IAxWiv043720@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 10:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204037 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 10:59:32 -0000 Author: brucec Date: Thu Feb 18 10:59:32 2010 New Revision: 204037 URL: http://svn.freebsd.org/changeset/base/204037 Log: MFC r203678: Rename usb2_ structures and variables to usb_. Approved by: rrs (mentor) Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Thu Feb 18 10:55:42 2010 (r204036) +++ stable/8/sys/dev/sound/usb/uaudio.c Thu Feb 18 10:59:32 2010 (r204037) @@ -155,16 +155,16 @@ struct uaudio_chan { struct pcmchan_caps pcm_cap; /* capabilities */ struct snd_dbuf *pcm_buf; - const struct usb_config *usb2_cfg; + const struct usb_config *usb_cfg; struct mtx *pcm_mtx; /* lock protecting this structure */ struct uaudio_softc *priv_sc; struct pcm_channel *pcm_ch; struct usb_xfer *xfer[UAUDIO_NCHANBUFS]; - const struct usb2_audio_streaming_interface_descriptor *p_asid; - const struct usb2_audio_streaming_type1_descriptor *p_asf1d; - const struct usb2_audio_streaming_endpoint_descriptor *p_sed; - const usb2_endpoint_descriptor_audio_t *p_ed1; - const usb2_endpoint_descriptor_audio_t *p_ed2; + const struct usb_audio_streaming_interface_descriptor *p_asid; + const struct usb_audio_streaming_type1_descriptor *p_asf1d; + const struct usb_audio_streaming_endpoint_descriptor *p_sed; + const usb_endpoint_descriptor_audio_t *p_ed1; + const usb_endpoint_descriptor_audio_t *p_ed2; const struct uaudio_format *p_fmt; uint8_t *buf; /* pointer to buffer */ @@ -278,13 +278,13 @@ struct uaudio_search_result { struct uaudio_terminal_node { union { const struct usb_descriptor *desc; - const struct usb2_audio_input_terminal *it; - const struct usb2_audio_output_terminal *ot; - const struct usb2_audio_mixer_unit_0 *mu; - const struct usb2_audio_selector_unit *su; - const struct usb2_audio_feature_unit *fu; - const struct usb2_audio_processing_unit_0 *pu; - const struct usb2_audio_extension_unit_0 *eu; + const struct usb_audio_input_terminal *it; + const struct usb_audio_output_terminal *ot; + const struct usb_audio_mixer_unit_0 *mu; + const struct usb_audio_selector_unit *su; + const struct usb_audio_feature_unit *fu; + const struct usb_audio_processing_unit_0 *pu; + const struct usb_audio_extension_unit_0 *eu; } u; struct uaudio_search_result usr; struct uaudio_terminal_node *root; @@ -359,7 +359,7 @@ static void uaudio_mixer_add_mixer(struc static void uaudio_mixer_add_selector(struct uaudio_softc *, const struct uaudio_terminal_node *, int); static uint32_t uaudio_mixer_feature_get_bmaControls( - const struct usb2_audio_feature_unit *, uint8_t); + const struct usb_audio_feature_unit *, uint8_t); static void uaudio_mixer_add_feature(struct uaudio_softc *, const struct uaudio_terminal_node *, int); static void uaudio_mixer_add_processing_updown(struct uaudio_softc *, @@ -368,7 +368,7 @@ static void uaudio_mixer_add_processing( const struct uaudio_terminal_node *, int); static void uaudio_mixer_add_extension(struct uaudio_softc *, const struct uaudio_terminal_node *, int); -static struct usb2_audio_cluster uaudio_mixer_get_cluster(uint8_t, +static struct usb_audio_cluster uaudio_mixer_get_cluster(uint8_t, const struct uaudio_terminal_node *); static uint16_t uaudio_mixer_determine_class(const struct uaudio_terminal_node *, struct uaudio_mixer_node *); @@ -408,7 +408,7 @@ static int32_t umidi_detach(device_t dev #if USB_DEBUG static void uaudio_chan_dump_ep_desc( - const usb2_endpoint_descriptor_audio_t *); + const usb_endpoint_descriptor_audio_t *); static void uaudio_mixer_dump_cluster(uint8_t, const struct uaudio_terminal_node *); static const char *uaudio_mixer_get_terminal_name(uint16_t); @@ -782,7 +782,7 @@ uaudio_detach(device_t dev) #if USB_DEBUG static void -uaudio_chan_dump_ep_desc(const usb2_endpoint_descriptor_audio_t *ed) +uaudio_chan_dump_ep_desc(const usb_endpoint_descriptor_audio_t *ed) { if (ed) { DPRINTF("endpoint=%p bLength=%d bDescriptorType=%d \n" @@ -803,11 +803,11 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint32_t rate, uint8_t channels, uint8_t bit_resolution) { struct usb_descriptor *desc = NULL; - const struct usb2_audio_streaming_interface_descriptor *asid = NULL; - const struct usb2_audio_streaming_type1_descriptor *asf1d = NULL; - const struct usb2_audio_streaming_endpoint_descriptor *sed = NULL; - const usb2_endpoint_descriptor_audio_t *ed1 = NULL; - const usb2_endpoint_descriptor_audio_t *ed2 = NULL; + const struct usb_audio_streaming_interface_descriptor *asid = NULL; + const struct usb_audio_streaming_type1_descriptor *asf1d = NULL; + const struct usb_audio_streaming_endpoint_descriptor *sed = NULL; + const usb_endpoint_descriptor_audio_t *ed1 = NULL; + const usb_endpoint_descriptor_audio_t *ed2 = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); struct usb_interface_descriptor *id; const struct uaudio_format *p_fmt; @@ -1045,10 +1045,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan->iface_alt_index = alt_index; if (ep_dir == UE_DIR_IN) - chan->usb2_cfg = + chan->usb_cfg = uaudio_cfg_record; else - chan->usb2_cfg = + chan->usb_cfg = uaudio_cfg_play; chan->sample_size = (( @@ -1429,7 +1429,7 @@ uaudio_chan_init(struct uaudio_softc *sc } } if (usbd_transfer_setup(sc->sc_udev, &iface_index, ch->xfer, - ch->usb2_cfg, UAUDIO_NCHANBUFS, ch, ch->pcm_mtx)) { + ch->usb_cfg, UAUDIO_NCHANBUFS, ch, ch->pcm_mtx)) { DPRINTF("could not allocate USB transfers!\n"); goto error; } @@ -1709,7 +1709,7 @@ uaudio_mixer_add_input(struct uaudio_sof const struct uaudio_terminal_node *iot, int id) { #if USB_DEBUG - const struct usb2_audio_input_terminal *d = iot[id].u.it; + const struct usb_audio_input_terminal *d = iot[id].u.it; DPRINTFN(3, "bTerminalId=%d wTerminalType=0x%04x " "bAssocTerminal=%d bNrChannels=%d wChannelConfig=%d " @@ -1725,7 +1725,7 @@ uaudio_mixer_add_output(struct uaudio_so const struct uaudio_terminal_node *iot, int id) { #if USB_DEBUG - const struct usb2_audio_output_terminal *d = iot[id].u.ot; + const struct usb_audio_output_terminal *d = iot[id].u.ot; DPRINTFN(3, "bTerminalId=%d wTerminalType=0x%04x " "bAssocTerminal=%d bSourceId=%d iTerminal=%d\n", @@ -1740,8 +1740,8 @@ uaudio_mixer_add_mixer(struct uaudio_sof { struct uaudio_mixer_node mix; - const struct usb2_audio_mixer_unit_0 *d0 = iot[id].u.mu; - const struct usb2_audio_mixer_unit_1 *d1; + const struct usb_audio_mixer_unit_0 *d0 = iot[id].u.mu; + const struct usb_audio_mixer_unit_1 *d1; uint32_t bno; /* bit number */ uint32_t p; /* bit number accumulator */ @@ -1823,7 +1823,7 @@ static void uaudio_mixer_add_selector(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - const struct usb2_audio_selector_unit *d = iot[id].u.su; + const struct usb_audio_selector_unit *d = iot[id].u.su; struct uaudio_mixer_node mix; uint16_t i; @@ -1864,7 +1864,7 @@ uaudio_mixer_add_selector(struct uaudio_ } static uint32_t -uaudio_mixer_feature_get_bmaControls(const struct usb2_audio_feature_unit *d, +uaudio_mixer_feature_get_bmaControls(const struct usb_audio_feature_unit *d, uint8_t index) { uint32_t temp = 0; @@ -1889,7 +1889,7 @@ static void uaudio_mixer_add_feature(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - const struct usb2_audio_feature_unit *d = iot[id].u.fu; + const struct usb_audio_feature_unit *d = iot[id].u.fu; struct uaudio_mixer_node mix; uint32_t fumask; uint32_t mmask; @@ -2015,10 +2015,10 @@ static void uaudio_mixer_add_processing_updown(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - const struct usb2_audio_processing_unit_0 *d0 = iot[id].u.pu; - const struct usb2_audio_processing_unit_1 *d1 = + const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu; + const struct usb_audio_processing_unit_1 *d1 = (const void *)(d0->baSourceId + d0->bNrInPins); - const struct usb2_audio_processing_unit_updown *ud = + const struct usb_audio_processing_unit_updown *ud = (const void *)(d1->bmControls + d1->bControlSize); struct uaudio_mixer_node mix; uint8_t i; @@ -2057,8 +2057,8 @@ static void uaudio_mixer_add_processing(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - const struct usb2_audio_processing_unit_0 *d0 = iot[id].u.pu; - const struct usb2_audio_processing_unit_1 *d1 = + const struct usb_audio_processing_unit_0 *d0 = iot[id].u.pu; + const struct usb_audio_processing_unit_1 *d1 = (const void *)(d0->baSourceId + d0->bNrInPins); struct uaudio_mixer_node mix; uint16_t ptype; @@ -2102,8 +2102,8 @@ static void uaudio_mixer_add_extension(struct uaudio_softc *sc, const struct uaudio_terminal_node *iot, int id) { - const struct usb2_audio_extension_unit_0 *d0 = iot[id].u.eu; - const struct usb2_audio_extension_unit_1 *d1 = + const struct usb_audio_extension_unit_0 *d0 = iot[id].u.eu; + const struct usb_audio_extension_unit_1 *d1 = (const void *)(d0->baSourceId + d0->bNrInPins); struct uaudio_mixer_node mix; @@ -2133,19 +2133,19 @@ uaudio_mixer_add_extension(struct uaudio static const void * uaudio_mixer_verify_desc(const void *arg, uint32_t len) { - const struct usb2_audio_mixer_unit_1 *d1; - const struct usb2_audio_extension_unit_1 *e1; - const struct usb2_audio_processing_unit_1 *u1; + const struct usb_audio_mixer_unit_1 *d1; + const struct usb_audio_extension_unit_1 *e1; + const struct usb_audio_processing_unit_1 *u1; union { const struct usb_descriptor *desc; - const struct usb2_audio_input_terminal *it; - const struct usb2_audio_output_terminal *ot; - const struct usb2_audio_mixer_unit_0 *mu; - const struct usb2_audio_selector_unit *su; - const struct usb2_audio_feature_unit *fu; - const struct usb2_audio_processing_unit_0 *pu; - const struct usb2_audio_extension_unit_0 *eu; + const struct usb_audio_input_terminal *it; + const struct usb_audio_output_terminal *ot; + const struct usb_audio_mixer_unit_0 *mu; + const struct usb_audio_selector_unit *su; + const struct usb_audio_feature_unit *fu; + const struct usb_audio_processing_unit_0 *pu; + const struct usb_audio_extension_unit_0 *eu; } u; u.desc = arg; @@ -2269,7 +2269,7 @@ uaudio_mixer_dump_cluster(uint8_t id, co }; uint16_t cc; uint8_t i; - const struct usb2_audio_cluster cl = uaudio_mixer_get_cluster(id, iot); + const struct usb_audio_cluster cl = uaudio_mixer_get_cluster(id, iot); cc = UGETW(cl.wChannelConfig); @@ -2286,10 +2286,10 @@ uaudio_mixer_dump_cluster(uint8_t id, co #endif -static struct usb2_audio_cluster +static struct usb_audio_cluster uaudio_mixer_get_cluster(uint8_t id, const struct uaudio_terminal_node *iot) { - struct usb2_audio_cluster r; + struct usb_audio_cluster r; const struct usb_descriptor *dp; uint8_t i; @@ -2311,7 +2311,7 @@ uaudio_mixer_get_cluster(uint8_t id, con break; case UDESCSUB_AC_MIXER: - r = *(const struct usb2_audio_cluster *) + r = *(const struct usb_audio_cluster *) &iot[id].u.mu->baSourceId[iot[id].u.mu-> bNrInPins]; goto done; @@ -2328,13 +2328,13 @@ uaudio_mixer_get_cluster(uint8_t id, con break; case UDESCSUB_AC_PROCESSING: - r = *((const struct usb2_audio_cluster *) + r = *((const struct usb_audio_cluster *) &iot[id].u.pu->baSourceId[iot[id].u.pu-> bNrInPins]); goto done; case UDESCSUB_AC_EXTENSION: - r = *((const struct usb2_audio_cluster *) + r = *((const struct usb_audio_cluster *) &iot[id].u.eu->baSourceId[iot[id].u.eu-> bNrInPins]); goto done; @@ -2760,10 +2760,10 @@ static void uaudio_mixer_fill_info(struct uaudio_softc *sc, struct usb_device *udev, void *desc) { - const struct usb2_audio_control_descriptor *acdp; + const struct usb_audio_control_descriptor *acdp; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); const struct usb_descriptor *dp; - const struct usb2_audio_unit *au; + const struct usb_audio_unit *au; struct uaudio_terminal_node *iot = NULL; uint16_t wTotalLen; uint8_t ID_max = 0; /* inclusive */ Modified: stable/8/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudioreg.h Thu Feb 18 10:55:42 2010 (r204036) +++ stable/8/sys/dev/sound/usb/uaudioreg.h Thu Feb 18 10:59:32 2010 (r204037) @@ -64,9 +64,9 @@ typedef struct { */ uByte bRefresh; uByte bSynchAddress; -} __packed usb2_endpoint_descriptor_audio_t; +} __packed usb_endpoint_descriptor_audio_t; -struct usb2_audio_control_descriptor { +struct usb_audio_control_descriptor { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -76,7 +76,7 @@ struct usb2_audio_control_descriptor { uByte baInterfaceNr[1]; } __packed; -struct usb2_audio_streaming_interface_descriptor { +struct usb_audio_streaming_interface_descriptor { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -85,7 +85,7 @@ struct usb2_audio_streaming_interface_de uWord wFormatTag; } __packed; -struct usb2_audio_streaming_endpoint_descriptor { +struct usb_audio_streaming_endpoint_descriptor { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -97,7 +97,7 @@ struct usb2_audio_streaming_endpoint_des uWord wLockDelay; } __packed; -struct usb2_audio_streaming_type1_descriptor { +struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -115,7 +115,7 @@ struct usb2_audio_streaming_type1_descri #define UA_SAMP_HI(p) UA_GETSAMP(p, 1) } __packed; -struct usb2_audio_cluster { +struct usb_audio_cluster { uByte bNrChannels; uWord wChannelConfig; #define UA_CHANNEL_LEFT 0x0001 @@ -134,7 +134,7 @@ struct usb2_audio_cluster { } __packed; /* Shared by all units and terminals */ -struct usb2_audio_unit { +struct usb_audio_unit { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -142,7 +142,7 @@ struct usb2_audio_unit { }; /* UDESCSUB_AC_INPUT */ -struct usb2_audio_input_terminal { +struct usb_audio_input_terminal { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -156,7 +156,7 @@ struct usb2_audio_input_terminal { } __packed; /* UDESCSUB_AC_OUTPUT */ -struct usb2_audio_output_terminal { +struct usb_audio_output_terminal { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -168,16 +168,16 @@ struct usb2_audio_output_terminal { } __packed; /* UDESCSUB_AC_MIXER */ -struct usb2_audio_mixer_unit_0 { +struct usb_audio_mixer_unit_0 { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; uByte bUnitId; uByte bNrInPins; uByte baSourceId[0]; /* [bNrInPins] */ - /* struct usb2_audio_mixer_unit_1 */ + /* struct usb_audio_mixer_unit_1 */ } __packed; -struct usb2_audio_mixer_unit_1 { +struct usb_audio_mixer_unit_1 { uByte bNrChannels; uWord wChannelConfig; uByte iChannelNames; @@ -186,7 +186,7 @@ struct usb2_audio_mixer_unit_1 { } __packed; /* UDESCSUB_AC_SELECTOR */ -struct usb2_audio_selector_unit { +struct usb_audio_selector_unit { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -197,7 +197,7 @@ struct usb2_audio_selector_unit { } __packed; /* UDESCSUB_AC_FEATURE */ -struct usb2_audio_feature_unit { +struct usb_audio_feature_unit { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -209,7 +209,7 @@ struct usb2_audio_feature_unit { } __packed; /* UDESCSUB_AC_PROCESSING */ -struct usb2_audio_processing_unit_0 { +struct usb_audio_processing_unit_0 { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -217,9 +217,9 @@ struct usb2_audio_processing_unit_0 { uWord wProcessType; uByte bNrInPins; uByte baSourceId[0]; /* [bNrInPins] */ - /* struct usb2_audio_processing_unit_1 */ + /* struct usb_audio_processing_unit_1 */ } __packed; -struct usb2_audio_processing_unit_1 { +struct usb_audio_processing_unit_1 { uByte bNrChannels; uWord wChannelConfig; uByte iChannelNames; @@ -228,14 +228,14 @@ struct usb2_audio_processing_unit_1 { #define UA_PROC_ENABLE_MASK 1 } __packed; -struct usb2_audio_processing_unit_updown { +struct usb_audio_processing_unit_updown { uByte iProcessing; uByte bNrModes; uWord waModes[0]; /* [bNrModes] */ } __packed; /* UDESCSUB_AC_EXTENSION */ -struct usb2_audio_extension_unit_0 { +struct usb_audio_extension_unit_0 { uByte bLength; uByte bDescriptorType; uByte bDescriptorSubtype; @@ -243,9 +243,9 @@ struct usb2_audio_extension_unit_0 { uWord wExtensionCode; uByte bNrInPins; uByte baSourceId[0]; /* [bNrInPins] */ - /* struct usb2_audio_extension_unit_1 */ + /* struct usb_audio_extension_unit_1 */ } __packed; -struct usb2_audio_extension_unit_1 { +struct usb_audio_extension_unit_1 { uByte bNrChannels; uWord wChannelConfig; uByte iChannelNames; From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 11:03:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13BA81065676; Thu, 18 Feb 2010 11:03:36 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 016CE8FC08; Thu, 18 Feb 2010 11:03:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IB3Zq7044678; Thu, 18 Feb 2010 11:03:35 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IB3ZEG044672; Thu, 18 Feb 2010 11:03:35 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181103.o1IB3ZEG044672@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 11:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204038 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 11:03:36 -0000 Author: brucec Date: Thu Feb 18 11:03:35 2010 New Revision: 204038 URL: http://svn.freebsd.org/changeset/base/204038 Log: MFC r203679: Remove the usb2_input_kbd directive that was missed during the renaming of the drivers in the usb2 stack. Approved by: rrs (mentor) Modified: stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/conf/files.ia64 stable/8/sys/conf/files.pc98 stable/8/sys/conf/files.sparc64 Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Thu Feb 18 10:59:32 2010 (r204037) +++ stable/8/sys/conf/files.amd64 Thu Feb 18 11:03:35 2010 (r204038) @@ -205,7 +205,7 @@ dev/hwpmc/hwpmc_core.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd +dev/kbd/kbd.c optional atkbd | sc | ukbd dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev dev/mem/memutil.c optional mem Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Thu Feb 18 10:59:32 2010 (r204037) +++ stable/8/sys/conf/files.i386 Thu Feb 18 11:03:35 2010 (r204038) @@ -197,7 +197,7 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux -dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd +dev/kbd/kbd.c optional atkbd | sc | ukbd dev/le/if_le_isa.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Thu Feb 18 10:59:32 2010 (r204037) +++ stable/8/sys/conf/files.ia64 Thu Feb 18 11:03:35 2010 (r204038) @@ -57,7 +57,7 @@ dev/fb/fb.c optional fb | vga dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc dev/io/iodev.c optional io -dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd +dev/kbd/kbd.c optional atkbd | sc | ukbd dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Thu Feb 18 10:59:32 2010 (r204037) +++ stable/8/sys/conf/files.pc98 Thu Feb 18 11:03:35 2010 (r204038) @@ -105,7 +105,7 @@ dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/io/iodev.c optional io -dev/kbd/kbd.c optional pckbd | sc | ukbd | usb2_input_kbd +dev/kbd/kbd.c optional pckbd | sc | ukbd dev/le/if_le_cbus.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev Modified: stable/8/sys/conf/files.sparc64 ============================================================================== --- stable/8/sys/conf/files.sparc64 Thu Feb 18 10:59:32 2010 (r204037) +++ stable/8/sys/conf/files.sparc64 Thu Feb 18 11:03:35 2010 (r204038) @@ -38,7 +38,7 @@ dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc dev/hwpmc/hwpmc_sparc64.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd +dev/kbd/kbd.c optional atkbd | sc | ukbd dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus dev/le/lebuffer_sbus.c optional le sbus From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 11:07:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2CE1065672; Thu, 18 Feb 2010 11:07:36 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FF168FC18; Thu, 18 Feb 2010 11:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IB7anr045576; Thu, 18 Feb 2010 11:07:36 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IB7aG8045573; Thu, 18 Feb 2010 11:07:36 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201002181107.o1IB7aG8045573@svn.freebsd.org> From: Bruce Cran Date: Thu, 18 Feb 2010 11:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204039 - in stable/8/sys: conf dev/aic7xxx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 11:07:36 -0000 Author: brucec Date: Thu Feb 18 11:07:36 2010 New Revision: 204039 URL: http://svn.freebsd.org/changeset/base/204039 Log: MFC r203685: Document the usfs driver and the NO_SYSCTL_DESCR option, and update the comment for umass. Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR is used. Approved by: rrs (mentor) Modified: stable/8/sys/conf/NOTES stable/8/sys/dev/aic7xxx/aic79xx_osm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Thu Feb 18 11:03:35 2010 (r204038) +++ stable/8/sys/conf/NOTES Thu Feb 18 11:07:36 2010 (r204039) @@ -377,6 +377,11 @@ options KDTRACE_HOOKS options SYSCTL_DEBUG # +# NO_SYSCTL_DESCR omits the sysctl node descriptions to save space in the +# resulting kernel. +options NO_SYSCTL_DESCR + +# # DEBUG_MEMGUARD builds and enables memguard(9), a replacement allocator # for the kernel used to detect modify-after-free scenarios. See the # memguard(9) man page for more information on usage. @@ -2529,8 +2534,10 @@ device uhid device ukbd # USB printer device ulpt -# USB Iomega Zip 100 Drive (Requires scbus and da) +# USB mass storage driver (Requires scbus and da) device umass +# USB mass storage driver for device-side mode +device usfs # USB support for Belkin F5U109 and Magic Control Technology serial adapters device umct # USB modem support Modified: stable/8/sys/dev/aic7xxx/aic79xx_osm.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx_osm.c Thu Feb 18 11:03:35 2010 (r204038) +++ stable/8/sys/dev/aic7xxx/aic79xx_osm.c Thu Feb 18 11:07:36 2010 (r204039) @@ -83,11 +83,13 @@ static const char *ahd_sysctl_node_eleme "debug" }; +#ifndef NO_SYSCTL_DESCR static const char *ahd_sysctl_node_descriptions[] = { "root error collection for aic79xx controllers", "summary collection for aic79xx controllers", "debug collection for aic79xx controllers" }; +#endif static const char *ahd_sysctl_errors_elements[] = { "Cerrors", @@ -95,11 +97,13 @@ static const char *ahd_sysctl_errors_ele "Ferrors" }; +#ifndef NO_SYSCTL_DESCR static const char *ahd_sysctl_errors_descriptions[] = { "Correctable errors", "Uncorrectable errors", "Fatal errors" }; +#endif static int ahd_set_debugcounters(SYSCTL_HANDLER_ARGS) From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 13:46:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92C5A1065676; Thu, 18 Feb 2010 13:46:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81DF88FC13; Thu, 18 Feb 2010 13:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IDks28080755; Thu, 18 Feb 2010 13:46:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IDks96080753; Thu, 18 Feb 2010 13:46:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201002181346.o1IDks96080753@svn.freebsd.org> From: Michael Tuexen Date: Thu, 18 Feb 2010 13:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204040 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 13:46:54 -0000 Author: tuexen Date: Thu Feb 18 13:46:54 2010 New Revision: 204040 URL: http://svn.freebsd.org/changeset/base/204040 Log: Use uint32_t instead of u_long. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Feb 18 11:07:36 2010 (r204039) +++ head/sys/netinet/sctp_indata.c Thu Feb 18 13:46:54 2010 (r204040) @@ -3513,7 +3513,7 @@ sctp_handle_segments(struct mbuf *m, int static void sctp_check_for_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; int tot_revoked = 0; @@ -3595,7 +3595,7 @@ sctp_check_for_revoked(struct sctp_tcb * static void sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, - u_long biggest_tsn_acked, u_long biggest_tsn_newly_acked, u_long this_sack_lowest_newack, int accum_moved) + uint32_t biggest_tsn_acked, uint32_t biggest_tsn_newly_acked, uint32_t this_sack_lowest_newack, int accum_moved) { struct sctp_tmit_chunk *tp1; int strike_flag = 0; @@ -4781,7 +4781,7 @@ again: static void sctp_check_for_nr_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 14:08:30 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C92A4106566C; Thu, 18 Feb 2010 14:08:30 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 979088FC0A; Thu, 18 Feb 2010 14:07:21 +0000 (UTC) Received: from lawrence1.loshell.room52.net (unknown [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 230C27E878; Fri, 19 Feb 2010 01:07:17 +1100 (EST) Message-ID: <4B7D4962.8070706@freebsd.org> Date: Fri, 19 Feb 2010 01:06:26 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.1.5) Gecko/20100105 Thunderbird/3.0 MIME-Version: 1.0 To: Alexander Motin References: <201002141938.o1EJcRpx065470@svn.freebsd.org> In-Reply-To: <201002141938.o1EJcRpx065470@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 14:08:30 -0000 Hi Alexander and all, On 02/15/10 06:38, Alexander Motin wrote: > Author: mav > Date: Sun Feb 14 19:38:27 2010 > New Revision: 203889 > URL: http://svn.freebsd.org/changeset/base/203889 > > Log: > MFC r203108: > Large set of CAM improvements: [snip] I've been having issues with the mpt-driven LSI SAS adapter in my SunFire X4100 server running FreeBSD 8-STABLE r202132. Under certain disk workloads like running an svn update of the src tree or kernel compile, the disk subsystem will become extremely unresponsive in a stalled like state, and /var/log/messages will report a number of these: mpt0: mpt_cam_event: 0x16 It does eventually come good after a minute or two even though the svn op or build is still running, then it will maybe repeat a few times stalled/good behaviour sometimes with minutes between events. A couple of times it has gotten even more upset reporting things like this: mpt0: mpt_cam_event: 0x16 mpt0: mpt_cam_event: 0x16 mpt0: request 0xffffff80002f1400:54058 timed out for ccb 0xffffff0001c65000 (req->ccb 0xffffff0001c65000) mpt0: attempting to abort req 0xffffff80002f1400:54058 function 0 mpt0: request 0xffffff80002fd100:54059 timed out for ccb 0xffffff009f3ec800 (req->ccb 0xffffff009f3ec800) mpt0: request 0xffffff80002efcf0:54060 timed out for ccb 0xffffff0001bd2000 (req->ccb 0xffffff0001bd2000) mpt0: mpt_recover_commands: IOC Status 0x4a. Resetting controller. mpt0: mpt_cam_event: 0x0 mpt0: mpt_cam_event: 0x0 mpt0: completing timedout/aborted req 0xffffff80002f1400:54058 mpt0: completing timedout/aborted req 0xffffff80002fd100:54059 mpt0: completing timedout/aborted req 0xffffff80002efcf0:54060 mpt0: mpt_cam_event: 0x16 mpt0: mpt_cam_event: 0x12 mpt0: mpt_cam_event: 0x12 mpt0: mpt_cam_event: 0x16 mpt0: Volume(0:2): Volume Status Changed mpt0: request 0xffffff80002f8990:0 timed out for ccb 0xffffff009f3cb800 (req->ccb 0) No ill effects are observed after such an episode and the array remains in healthy as-normal state. The only observable problem is the stall of all disk IO while these events occur. The disk configuration is 2 x 320GB WD3200BEKT 7200RPM SATA HDDs in RAID1. The hardware reports itself as: mpt0: port 0xa800-0xa8ff mem 0xfc4fc000-0xfc4fffff,0xfc4e0000-0xfc4effff irq 28 at device 3.0 on pci2 mpt0: [ITHREAD] mpt0: MPI Version=1.5.13.0 mpt0: Capabilities: ( RAID-0 RAID-1E RAID-1 ) mpt0: 1 Active Volume (2 Max) mpt0: 2 Hidden Drive Members (10 Max) mpt0@pci0:2:3:0: class=0x010000 card=0x30601000 chip=0x00501000 rev=0x02 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'SAS 3000 series, 4-port with 1064 -StorPort' class = mass storage subclass = SCSI As best I can tell, the hardware is ok, both disks report as fine without SMART errors and are only 2 months old, so wanted to rule out software issues. On upgrading to recent 8-STABLE, I got a page fault kernel panic on boot in the mpt driver mpt_raid0 kproc. After some trial and error, r203888 is the most recent revision that boots fine, whilst r203889 exhibits the page fault. I should also note that r203888 still sees the "mpt0: mpt_cam_event: 0x16" messages and associated disk IO stalls. I compiled DDB into my r203889 kernel. Unfortunately my ILO emulates a USB keyboard so I can't do anything in DDB which is a huge pain, but here's the info I did get (hand transcribed): Fatal trap 12: page fault while in kernel mode current process: mpt_raid0 Stopped at xpt_rescan+0x1d: movq 0x10(%rsi),%rdx So there are two separate issues here: 1. Any thoughts on how to resolve the regression in the mpt driver with the r203889 commit? 2. Any thoughts on the behaviour I'm seeing with the mpt_cam_event messages? Is it possible it's just a driver issue? Is the hardware likely bad? I'm really hoping they'll go away once the driver issue is resolved as the freezes are fairly unacceptable on a production machine and the hardware appears to pass all checks I've done so far. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 14:28:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA3E1065670; Thu, 18 Feb 2010 14:28:39 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF3A8FC16; Thu, 18 Feb 2010 14:28:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IEScoM090108; Thu, 18 Feb 2010 14:28:38 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IEScJO090104; Thu, 18 Feb 2010 14:28:38 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002181428.o1IEScJO090104@svn.freebsd.org> From: Ed Schouten Date: Thu, 18 Feb 2010 14:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204041 - in head/sys: amd64/amd64 i386/i386 i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 14:28:39 -0000 Author: ed Date: Thu Feb 18 14:28:38 2010 New Revision: 204041 URL: http://svn.freebsd.org/changeset/base/204041 Log: Allow the pmap code to be built with GCC from FreeBSD 7 again. This patch basically gives us the best of both worlds. Instead of forcing the compiler to emulate GNU-style inline semantics even though we're using ISO C99, it will only use GNU-style inlining when the compiler is configured that way (__GNUC_GNU_INLINE__). Tested by: jhb Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Feb 18 13:46:54 2010 (r204040) +++ head/sys/amd64/amd64/pmap.c Thu Feb 18 14:28:38 2010 (r204041) @@ -151,7 +151,11 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Feb 18 13:46:54 2010 (r204040) +++ head/sys/i386/i386/pmap.c Thu Feb 18 14:28:38 2010 (r204041) @@ -162,7 +162,11 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Feb 18 13:46:54 2010 (r204040) +++ head/sys/i386/xen/pmap.c Thu Feb 18 14:28:38 2010 (r204041) @@ -173,7 +173,11 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 14:48:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FC62106568B; Thu, 18 Feb 2010 14:48:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 23F278FC12; Thu, 18 Feb 2010 14:48:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D26CA46B39; Thu, 18 Feb 2010 09:48:41 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 32D4F8A026; Thu, 18 Feb 2010 09:48:41 -0500 (EST) From: John Baldwin To: Ed Schouten Date: Thu, 18 Feb 2010 09:48:29 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <201002181428.o1IEScJO090104@svn.freebsd.org> In-Reply-To: <201002181428.o1IEScJO090104@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002180948.29343.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 18 Feb 2010 09:48:41 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204041 - in head/sys: amd64/amd64 i386/i386 i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 14:48:42 -0000 On Thursday 18 February 2010 9:28:38 am Ed Schouten wrote: > Author: ed > Date: Thu Feb 18 14:28:38 2010 > New Revision: 204041 > URL: http://svn.freebsd.org/changeset/base/204041 > > Log: > Allow the pmap code to be built with GCC from FreeBSD 7 again. > > This patch basically gives us the best of both worlds. Instead of > forcing the compiler to emulate GNU-style inline semantics even though > we're using ISO C99, it will only use GNU-style inlining when the > compiler is configured that way (__GNUC_GNU_INLINE__). > > Tested by: jhb Thanks! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 15:00:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA49B106566B; Thu, 18 Feb 2010 15:00:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8A978FC15; Thu, 18 Feb 2010 15:00:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IF0hbi097284; Thu, 18 Feb 2010 15:00:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IF0hIM097281; Thu, 18 Feb 2010 15:00:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002181500.o1IF0hIM097281@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 18 Feb 2010 15:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204042 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 15:00:44 -0000 Author: nwhitehorn Date: Thu Feb 18 15:00:43 2010 New Revision: 204042 URL: http://svn.freebsd.org/changeset/base/204042 Log: Fix a bug where pages being removed from memory entirely no longer have PVOs, and so the modified state of the page can no longer be communicated to the VM layer, causing pages not to be flushed to swap when needed, in turn causing memory corruption. Also make several correctness adjustments to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs. Obtained from: projects/ppc64 Discussed with: grehan MFC after: 2 weeks Modified: head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Thu Feb 18 14:28:38 2010 (r204041) +++ head/sys/powerpc/aim/mmu_oea.c Thu Feb 18 15:00:43 2010 (r204042) @@ -1729,6 +1729,10 @@ moea_remove_all(mmu_t mmu, vm_page_t m) moea_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } + if ((m->flags & PG_WRITEABLE) && moea_is_modified(mmu, m)) { + moea_attr_clear(m, LPTE_CHG); + vm_page_dirty(m); + } vm_page_flag_clear(m, PG_WRITEABLE); } @@ -2203,10 +2207,8 @@ moea_query_bit(vm_page_t m, int ptebit) struct pvo_entry *pvo; struct pte *pt; -#if 0 if (moea_attr_fetch(m) & ptebit) return (TRUE); -#endif LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Feb 18 14:28:38 2010 (r204041) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Feb 18 15:00:43 2010 (r204042) @@ -172,6 +172,7 @@ va_to_vsid(pmap_t pm, vm_offset_t va) return ((pm->pm_sr[(uintptr_t)va >> ADDR_SR_SHFT]) & SR_VSID_MASK); } +#define PTESYNC() __asm __volatile("ptesync"); #define TLBSYNC() __asm __volatile("tlbsync; ptesync"); #define SYNC() __asm __volatile("sync"); #define EIEIO() __asm __volatile("eieio"); @@ -194,6 +195,7 @@ TLBIE(pmap_t pmap, vm_offset_t va) { vpn = (uint64_t)(va & ADDR_PIDX); if (pmap != NULL) vpn |= (va_to_vsid(pmap,va) << 28); + vpn &= ~(0xffffULL << 48); vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; @@ -201,8 +203,7 @@ TLBIE(pmap_t pmap, vm_offset_t va) { mtx_lock_spin(&tlbie_mutex); __asm __volatile("\ mfmsr %0; \ - clrldi %1,%0,49; \ - mtmsr %1; \ + mr %1, %0; \ insrdi %1,%5,1,0; \ mtmsrd %1; \ ptesync; \ @@ -215,7 +216,8 @@ TLBIE(pmap_t pmap, vm_offset_t va) { eieio; \ tlbsync; \ ptesync;" - : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1)); + : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) + : "memory"); mtx_unlock_spin(&tlbie_mutex); } @@ -226,13 +228,13 @@ TLBIE(pmap_t pmap, vm_offset_t va) { #define VSID_TO_SR(vsid) ((vsid) & 0xf) #define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff) -#define PVO_PTEGIDX_MASK 0x007 /* which PTEG slot */ -#define PVO_PTEGIDX_VALID 0x008 /* slot is valid */ -#define PVO_WIRED 0x010 /* PVO entry is wired */ -#define PVO_MANAGED 0x020 /* PVO entry is managed */ -#define PVO_BOOTSTRAP 0x080 /* PVO entry allocated during +#define PVO_PTEGIDX_MASK 0x007UL /* which PTEG slot */ +#define PVO_PTEGIDX_VALID 0x008UL /* slot is valid */ +#define PVO_WIRED 0x010UL /* PVO entry is wired */ +#define PVO_MANAGED 0x020UL /* PVO entry is managed */ +#define PVO_BOOTSTRAP 0x080UL /* PVO entry allocated during bootstrap */ -#define PVO_FAKE 0x100 /* fictitious phys page */ +#define PVO_FAKE 0x100UL /* fictitious phys page */ #define PVO_VADDR(pvo) ((pvo)->pvo_vaddr & ~ADDR_POFF) #define PVO_ISFAKE(pvo) ((pvo)->pvo_vaddr & PVO_FAKE) #define PVO_PTEGIDX_GET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_MASK) @@ -512,23 +514,6 @@ moea64_attr_save(vm_page_t m, u_int64_t m->md.mdpg_attrs |= ptebit; } -static __inline int -moea64_pte_compare(const struct lpte *pt, const struct lpte *pvo_pt) -{ - if (pt->pte_hi == pvo_pt->pte_hi) - return (1); - - return (0); -} - -static __inline int -moea64_pte_match(struct lpte *pt, uint64_t vsid, vm_offset_t va, int which) -{ - return (pt->pte_hi & ~LPTE_VALID) == - ((vsid << LPTE_VSID_SHIFT) | - ((uint64_t)(va >> ADDR_API_SHFT64) & LPTE_API) | which); -} - static __inline void moea64_pte_create(struct lpte *pt, uint64_t vsid, vm_offset_t va, uint64_t pte_lo) @@ -583,7 +568,7 @@ moea64_pte_set(struct lpte *pt, struct l pt->pte_lo = pvo_pt->pte_lo; EIEIO(); pt->pte_hi = pvo_pt->pte_hi; - SYNC(); + PTESYNC(); moea64_pte_valid++; } @@ -602,7 +587,6 @@ moea64_pte_unset(struct lpte *pt, struct * Invalidate the pte. */ pt->pte_hi &= ~LPTE_VALID; - TLBIE(pmap,va); /* @@ -621,6 +605,8 @@ moea64_pte_change(struct lpte *pt, struc */ moea64_pte_unset(pt, pvo_pt, pmap, va); moea64_pte_set(pt, pvo_pt); + if (pmap == kernel_pmap) + isync(); } static __inline uint64_t @@ -701,7 +687,7 @@ moea64_bridge_cpu_bootstrap(mmu_t mmup, for (i = 0; i < 16; i++) { mtsrin(i << ADDR_SR_SHFT, kernel_pmap->pm_sr[i]); } - __asm __volatile ("sync; mtsdr1 %0; isync" + __asm __volatile ("ptesync; mtsdr1 %0; isync" :: "r"((u_int)moea64_pteg_table | (32 - cntlzw(moea64_pteg_mask >> 11)))); tlbia(); @@ -1135,7 +1121,7 @@ void moea64_set_scratchpage_pa(int which EIEIO(); moea64_scratchpage_pte[which]->pte_hi |= LPTE_VALID; - TLBIE(kernel_pmap, moea64_scratchpage_va[which]); + PTESYNC(); isync(); } void @@ -1155,8 +1141,6 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms kcopy((void *)moea64_scratchpage_va[0], (void *)moea64_scratchpage_va[1], PAGE_SIZE); - __syncicache((void *)moea64_scratchpage_va[1],PAGE_SIZE); - mtx_unlock(&moea64_scratchpage_mtx); } @@ -1174,8 +1158,6 @@ moea64_zero_page_area(mmu_t mmu, vm_page moea64_set_scratchpage_pa(0,pa); bzero((caddr_t)moea64_scratchpage_va[0] + off, size); - __syncicache((void *)moea64_scratchpage_va[0],PAGE_SIZE); - mtx_unlock(&moea64_scratchpage_mtx); } @@ -1266,9 +1248,6 @@ moea64_enter_locked(pmap_t pmap, vm_offs error = moea64_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), pte_lo, pvo_flags); - if (pmap == kernel_pmap) - TLBIE(pmap, va); - /* * Flush the page from the instruction cache if this page is * mapped executable and cacheable. @@ -1281,6 +1260,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs static void moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t sz) { + /* * This is much trickier than on older systems because * we can't sync the icache on physical addresses directly @@ -1303,8 +1283,9 @@ moea64_syncicache(pmap_t pmap, vm_offset mtx_lock(&moea64_scratchpage_mtx); - moea64_set_scratchpage_pa(1,pa); - __syncicache((void *)moea64_scratchpage_va[1], sz); + moea64_set_scratchpage_pa(1,pa & ~ADDR_POFF); + __syncicache((void *)(moea64_scratchpage_va[1] + + (va & ADDR_POFF)), sz); mtx_unlock(&moea64_scratchpage_mtx); } @@ -1441,8 +1422,6 @@ moea64_uma_page_alloc(uma_zone_t zone, i &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, PVO_WIRED | PVO_BOOTSTRAP); - TLBIE(kernel_pmap, va); - if (needed_lock) PMAP_UNLOCK(kernel_pmap); @@ -1531,7 +1510,7 @@ moea64_remove_write(mmu_t mmu, vm_page_t lo |= pvo->pvo_pte.lpte.pte_lo; pvo->pvo_pte.lpte.pte_lo &= ~LPTE_CHG; moea64_pte_change(pt, &pvo->pvo_pte.lpte, - pvo->pvo_pmap, pvo->pvo_vaddr); + pvo->pvo_pmap, PVO_VADDR(pvo)); } UNLOCK_TABLE(); } @@ -1590,8 +1569,6 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, &moea64_pvo_kunmanaged, va, pa, pte_lo, PVO_WIRED | VM_PROT_EXECUTE); - TLBIE(kernel_pmap, va); - if (error != 0 && error != ENOENT) panic("moea64_kenter: failed to enter va %#x pa %#x: %d", va, pa, error); @@ -1823,7 +1800,7 @@ moea64_protect(mmu_t mmu, pmap_t pm, vm_ */ if (pt != NULL) { moea64_pte_change(pt, &pvo->pvo_pte.lpte, - pvo->pvo_pmap, pvo->pvo_vaddr); + pvo->pvo_pmap, PVO_VADDR(pvo)); if ((pvo->pvo_pte.lpte.pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { moea64_syncicache(pm, sva, @@ -1927,6 +1904,10 @@ moea64_remove_all(mmu_t mmu, vm_page_t m moea64_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } + if ((m->flags & PG_WRITEABLE) && moea64_is_modified(mmu, m)) { + moea64_attr_clear(m, LPTE_CHG); + vm_page_dirty(m); + } vm_page_flag_clear(m, PG_WRITEABLE); } @@ -2107,7 +2088,7 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z first = 1; LIST_INSERT_HEAD(pvo_head, pvo, pvo_vlink); - if (pvo->pvo_pte.lpte.pte_lo & PVO_WIRED) + if (pvo->pvo_vaddr & PVO_WIRED) pm->pm_stats.wired_count++; pm->pm_stats.resident_count++; @@ -2122,6 +2103,9 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z moea64_pte_overflow++; } + if (pm == kernel_pmap) + isync(); + UNLOCK_TABLE(); return (first ? ENOENT : 0); @@ -2140,7 +2124,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, pt = moea64_pvo_to_pte(pvo, pteidx); if (pt != NULL) { moea64_pte_unset(pt, &pvo->pvo_pte.lpte, pvo->pvo_pmap, - pvo->pvo_vaddr); + PVO_VADDR(pvo)); PVO_PTEGIDX_CLR(pvo); } else { moea64_pte_overflow--; @@ -2151,7 +2135,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, * Update our statistics. */ pvo->pvo_pmap->pm_stats.resident_count--; - if (pvo->pvo_pte.lpte.pte_lo & PVO_WIRED) + if (pvo->pvo_vaddr & PVO_WIRED) pvo->pvo_pmap->pm_stats.wired_count--; /* @@ -2178,7 +2162,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, */ LIST_REMOVE(pvo, pvo_olink); if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) - uma_zfree(pvo->pvo_vaddr & PVO_MANAGED ? moea64_mpvo_zone : + uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); moea64_pvo_entries--; moea64_pvo_remove_calls++; @@ -2237,8 +2221,8 @@ moea64_pvo_to_pte(const struct pvo_entry int ptegidx; uint64_t vsid; - vsid = va_to_vsid(pvo->pvo_pmap, pvo->pvo_vaddr); - ptegidx = va_to_pteg(vsid, pvo->pvo_vaddr); + vsid = va_to_vsid(pvo->pvo_pmap, PVO_VADDR(pvo)); + ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo)); pteidx = moea64_pvo_pte_index(pvo, ptegidx); } @@ -2325,10 +2309,8 @@ moea64_query_bit(vm_page_t m, u_int64_t struct pvo_entry *pvo; struct lpte *pt; -#if 0 if (moea64_attr_fetch(m) & ptebit) return (TRUE); -#endif LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 15:45:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD17106566B; Thu, 18 Feb 2010 15:45:44 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 217568FC17; Thu, 18 Feb 2010 15:45:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IFjiOH007350; Thu, 18 Feb 2010 15:45:44 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IFjiAq007348; Thu, 18 Feb 2010 15:45:44 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201002181545.o1IFjiAq007348@svn.freebsd.org> From: Ken Smith Date: Thu, 18 Feb 2010 15:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204044 - head/release/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 15:45:44 -0000 Author: kensmith Date: Thu Feb 18 15:45:43 2010 New Revision: 204044 URL: http://svn.freebsd.org/changeset/base/204044 Log: Provide a script that can be used to create the memstick images. For now it isn't being integrated into 'make release' because for the forseeable future the memstick images will be identical to what's on the DVD except for which package set is provided. If/when what's on the memstick diverges from what's on the DVD it would make more sense to generate a "memstick" directory in $CHROOT/R/cdrom and build the memstick image along with the ISO images. Reviewed by: jhb, ru, Garrett Cooper (yanefbsd at gmail dot com) Added: head/release/scripts/make-memstick.sh (contents, props changed) Added: head/release/scripts/make-memstick.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/scripts/make-memstick.sh Thu Feb 18 15:45:43 2010 (r204044) @@ -0,0 +1,83 @@ +#!/bin/sh +# +# This script generates a "memstick image" (image that can be copied to a +# USB memory stick) from a directory tree. Note that the script does not +# clean up after itself very well for error conditions on purpose so the +# problem can be diagnosed (full filesystem most likely but ...). +# +# Usage: make-memstick.sh +# +# $FreeBSD$ +# + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +export PATH + +BLOCKSIZE=10240 + +if [ $# -ne 2 ]; then + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 +fi + +tempfile="${2}.$$" + +if [ ! -d ${1} ]; then + echo "${1} must be a directory" + exit 1 +fi + +if [ -e ${2} ]; then + echo "won't overwrite ${2}" + exit 1 +fi + +rm -f ${tempfile} +makefs ${tempfile} ${1} +if [ $? -ne 0 ]; then + echo "makefs failed" + exit 1 +fi + +# +# Use $BLOCKSIZE for transfers to improve efficiency. When calculating +# how many blocks to transfer "+ 2" is to account for truncation in the +# division and to provide space for the label. +# + +filesize=`stat -f "%z" ${tempfile}` +blocks=$(($filesize / ${BLOCKSIZE} + 2)) +dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} +if [ $? -ne 0 ]; then + echo "creation of image file failed" + exit 1 +fi + +unit=`mdconfig -a -t vnode -f ${2}` +if [ $? -ne 0 ]; then + echo "mdconfig failed" + exit 1 +fi + +fdisk -BIq /dev/${unit} +if [ $? -ne 0 ]; then + echo "fdisk failed" + exit 1 +fi + +bsdlabel -B -w /dev/${unit} +if [ $? -ne 0 ]; then + echo "bsdlabel failed" + exit 1 +fi + +dd if=${tempfile} of=/dev/${unit}a bs=$BLOCKSIZE conv=sync +if [ $? -ne 0 ]; then + echo "copying filesystem into image file failed" + exit 1 +fi + +mdconfig -d -u ${unit} + +rm -f ${tempfile} + From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 15:53:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 659C0106568D; Thu, 18 Feb 2010 15:53:08 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 3B1E88FC22; Thu, 18 Feb 2010 15:53:07 +0000 (UTC) Received: from [192.168.0.101] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o1IFr7OB079807; Thu, 18 Feb 2010 07:53:07 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B7D626A.9040301@feral.com> Date: Thu, 18 Feb 2010 07:53:14 -0800 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Lawrence Stewart References: <201002141938.o1EJcRpx065470@svn.freebsd.org> <4B7D4962.8070706@freebsd.org> In-Reply-To: <4B7D4962.8070706@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Thu, 18 Feb 2010 07:53:07 -0800 (PST) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 15:53:08 -0000 Just a total swag here, but reduce the openings via camcontrol to < 32, or even < 16 > > 1. Any thoughts on how to resolve the regression in the mpt driver > with the r203889 commit? > > 2. Any thoughts on the behaviour I'm seeing with the mpt_cam_event > messages? Is it possible it's just a driver issue? Is the hardware > likely bad? I'm really hoping they'll go away once the driver issue is > resolved as the freezes are fairly unacceptable on a production > machine and the hardware appears to pass all checks I've done so far. > > Cheers, > Lawrence From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 16:05:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052361065698; Thu, 18 Feb 2010 16:05:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E99658FC16; Thu, 18 Feb 2010 16:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IG59gu011736; Thu, 18 Feb 2010 16:05:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IG59IQ011734; Thu, 18 Feb 2010 16:05:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181605.o1IG59IQ011734@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 16:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204045 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 16:05:10 -0000 Author: imp Date: Thu Feb 18 16:05:09 2010 New Revision: 204045 URL: http://svn.freebsd.org/changeset/base/204045 Log: The kdump data stream is an unaligned data stream for stat and sockaddr structures. As such, we have top copy the data structure into a local buffer before we can reference it, otherwise we have unaligned references (these are fixed up automatically on some CPUs, but not on others). We do this unconditionally to make the code easier to read and understand. Submitted by: Grzegorz Bernacki Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Thu Feb 18 15:45:43 2010 (r204044) +++ head/usr.bin/kdump/kdump.c Thu Feb 18 16:05:09 2010 (r204045) @@ -1328,6 +1328,8 @@ ktrstruct(char *buf, size_t buflen) char *name, *data; size_t namelen, datalen; int i; + struct stat sb; + struct sockaddr_storage ss; for (name = buf, namelen = 0; namelen < buflen && name[namelen] != '\0'; @@ -1348,12 +1350,16 @@ ktrstruct(char *buf, size_t buflen) if (strcmp(name, "stat") == 0) { if (datalen != sizeof(struct stat)) goto invalid; - ktrstat((struct stat *)data); + memcpy(&sb, data, datalen); + ktrstat(&sb); } else if (strcmp(name, "sockaddr") == 0) { + if (datalen > sizeof(ss)) + goto invalid; + memcpy(&ss, data, datalen); if (datalen < sizeof(struct sockaddr) || - datalen != ((struct sockaddr *)(data))->sa_len) + datalen != ss.ss_len) goto invalid; - ktrsockaddr((struct sockaddr *)data); + ktrsockaddr((struct sockaddr *)&ss); } else { printf("unknown structure\n"); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 16:23:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59B691065694; Thu, 18 Feb 2010 16:23:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48DBE8FC15; Thu, 18 Feb 2010 16:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IGNElF015784; Thu, 18 Feb 2010 16:23:14 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IGNEqB015782; Thu, 18 Feb 2010 16:23:14 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002181623.o1IGNEqB015782@svn.freebsd.org> From: Rick Macklem Date: Thu, 18 Feb 2010 16:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204046 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 16:23:14 -0000 Author: rmacklem Date: Thu Feb 18 16:23:13 2010 New Revision: 204046 URL: http://svn.freebsd.org/changeset/base/204046 Log: MFC: r203848 This fixes the experimental NFS server so that it won't crash in the caching code for IPv6 by fixing a typo that used the incorrect variable. It also fixes the indentation of the statement above it. Reported by: simon AT comsys.ntu-kpi.kiev.ua Modified: stable/8/sys/fs/nfsserver/nfs_nfsdcache.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 18 16:05:09 2010 (r204045) +++ stable/8/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 18 16:23:13 2010 (r204046) @@ -386,9 +386,9 @@ loop: newrp->rc_inet = saddr->sin_addr.s_addr; else if (saddr->sin_family == AF_INET6) { saddr6 = (struct sockaddr_in6 *)saddr; - NFSBCOPY((caddr_t)&saddr6->sin6_addr,(caddr_t)&newrp->rc_inet6, - sizeof (struct in6_addr)); - rp->rc_flag |= RC_INETIPV6; + NFSBCOPY((caddr_t)&saddr6->sin6_addr, (caddr_t)&newrp->rc_inet6, + sizeof (struct in6_addr)); + newrp->rc_flag |= RC_INETIPV6; } LIST_INSERT_HEAD(hp, newrp, rc_hash); TAILQ_INSERT_TAIL(&nfsrvudplru, newrp, rc_lru); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 16:52:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17AA2106566C; Thu, 18 Feb 2010 16:52:50 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1C388FC13; Thu, 18 Feb 2010 16:52:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IGqnMa022410; Thu, 18 Feb 2010 16:52:49 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IGqnqR022408; Thu, 18 Feb 2010 16:52:49 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002181652.o1IGqnqR022408@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 18 Feb 2010 16:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204048 - in stable/8/lib: libc_r libkse X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 16:52:50 -0000 Author: ru Date: Thu Feb 18 16:52:49 2010 New Revision: 204048 URL: http://svn.freebsd.org/changeset/base/204048 Log: MFC: r203918: Unbreak makefiles by removing mentions of DEFAULT_THREAD_LIB. Modified: stable/8/lib/libc_r/Makefile stable/8/lib/libkse/Makefile Directory Properties: stable/8/lib/libc_r/ (props changed) stable/8/lib/libkse/ (props changed) Modified: stable/8/lib/libc_r/Makefile ============================================================================== --- stable/8/lib/libc_r/Makefile Thu Feb 18 16:25:38 2010 (r204047) +++ stable/8/lib/libc_r/Makefile Thu Feb 18 16:52:49 2010 (r204048) @@ -10,10 +10,6 @@ .include -.if ${DEFAULT_THREAD_LIB} == "libc_r" && ${SHLIBDIR} == "/usr/lib" -SHLIBDIR= /lib -.endif - LIB=c_r SHLIB_MAJOR= 7 CFLAGS+=-DPTHREAD_KERNEL @@ -32,16 +28,4 @@ PRECIOUSLIB= .include "${.CURDIR}/uthread/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libc_r" -.if ${MK_INSTALLLIB} != "no" -SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a -.endif -.if !defined(NO_PIC) -SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so -.endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif -.endif - .include Modified: stable/8/lib/libkse/Makefile ============================================================================== --- stable/8/lib/libkse/Makefile Thu Feb 18 16:25:38 2010 (r204047) +++ stable/8/lib/libkse/Makefile Thu Feb 18 16:52:49 2010 (r204048) @@ -10,15 +10,7 @@ .include -.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no" -LIB=kse -.if ${SHLIBDIR} == "/usr/lib" -SHLIBDIR= /lib -.endif -.else SHLIB=kse -.endif - SHLIB_MAJOR= 4 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ @@ -51,16 +43,4 @@ PRECIOUSLIB= .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" -.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no" -.if ${MK_INSTALLLIB} != "no" -SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a -.endif -.if !defined(NO_PIC) -SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so -.endif -.if ${MK_PROFILE} != "no" -SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a -.endif -.endif - .include From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 18:35:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5ADF41065676; Thu, 18 Feb 2010 18:35:10 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1D78FC18; Thu, 18 Feb 2010 18:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IIZAnZ044913; Thu, 18 Feb 2010 18:35:10 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IIZARB044911; Thu, 18 Feb 2010 18:35:10 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201002181835.o1IIZARB044911@svn.freebsd.org> From: Matt Jacob Date: Thu, 18 Feb 2010 18:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204050 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 18:35:10 -0000 Author: mjacob Date: Thu Feb 18 18:35:09 2010 New Revision: 204050 URL: http://svn.freebsd.org/changeset/base/204050 Log: Don't try and re-use a handle, even if the firmware tells you that's what is logged in. PR: kern/144026 MFC after: 1 week Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Thu Feb 18 17:11:06 2010 (r204049) +++ head/sys/dev/isp/isp.c Thu Feb 18 18:35:09 2010 (r204050) @@ -2182,9 +2182,7 @@ isp_plogx(ispsoftc_t *isp, int chan, uin msg = "no Exchange Control Block"; break; case PLOGX_IOCBERR_FAILED: - ISP_SNPRINTF(buf, sizeof (buf), - "reason 0x%x (last LOGIN state 0x%x)", - parm1 & 0xff, (parm1 >> 8) & 0xff); + ISP_SNPRINTF(buf, sizeof (buf), "reason 0x%x (last LOGIN state 0x%x)", parm1 & 0xff, (parm1 >> 8) & 0xff); msg = buf; break; case PLOGX_IOCBERR_NOFABRIC: @@ -2194,8 +2192,7 @@ isp_plogx(ispsoftc_t *isp, int chan, uin msg = "firmware not ready"; break; case PLOGX_IOCBERR_NOLOGIN: - ISP_SNPRINTF(buf, sizeof (buf), "not logged in (last state 0x%x)", - parm1); + ISP_SNPRINTF(buf, sizeof (buf), "not logged in (last state 0x%x)", parm1); msg = buf; rval = MBOX_NOT_LOGGED_IN; break; @@ -2207,21 +2204,18 @@ isp_plogx(ispsoftc_t *isp, int chan, uin msg = "no PCB allocated"; break; case PLOGX_IOCBERR_EINVAL: - ISP_SNPRINTF(buf, sizeof (buf), "invalid parameter at offset 0x%x", - parm1); + ISP_SNPRINTF(buf, sizeof (buf), "invalid parameter at offset 0x%x", parm1); msg = buf; break; case PLOGX_IOCBERR_PORTUSED: lev = ISP_LOGSANCFG|ISP_LOGDEBUG0; - ISP_SNPRINTF(buf, sizeof (buf), - "already logged in with N-Port handle 0x%x", parm1); + ISP_SNPRINTF(buf, sizeof (buf), "already logged in with N-Port handle 0x%x", parm1); msg = buf; rval = MBOX_PORT_ID_USED | (parm1 << 16); break; case PLOGX_IOCBERR_HNDLUSED: lev = ISP_LOGSANCFG|ISP_LOGDEBUG0; - ISP_SNPRINTF(buf, sizeof (buf), - "handle already used for PortID 0x%06x", parm1); + ISP_SNPRINTF(buf, sizeof (buf), "handle already used for PortID 0x%06x", parm1); msg = buf; rval = MBOX_LOOP_ID_USED; break; @@ -2232,15 +2226,12 @@ isp_plogx(ispsoftc_t *isp, int chan, uin msg = "no FLOGI_ACC"; break; default: - ISP_SNPRINTF(buf, sizeof (buf), "status %x from %x", - plp->plogx_status, flags); + ISP_SNPRINTF(buf, sizeof (buf), "status %x from %x", plp->plogx_status, flags); msg = buf; break; } if (msg) { - isp_prt(isp, ISP_LOGERR, - "Chan %d PLOGX PortID 0x%06x to N-Port handle 0x%x: %s", - chan, portid, handle, msg); + isp_prt(isp, ISP_LOGERR, "Chan %d PLOGX PortID 0x%06x to N-Port handle 0x%x: %s", chan, portid, handle, msg); } out: if (gs == 0) { @@ -3901,8 +3892,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha * Find an unused handle and try and use to login to a port. */ static int -isp_login_device(ispsoftc_t *isp, int chan, uint32_t portid, isp_pdb_t *p, - uint16_t *ohp) +isp_login_device(ispsoftc_t *isp, int chan, uint32_t portid, isp_pdb_t *p, uint16_t *ohp) { int lim, i, r; uint16_t handle; @@ -3922,8 +3912,7 @@ isp_login_device(ispsoftc_t *isp, int ch */ r = isp_getpdb(isp, chan, handle, p, 0); if (r == 0 && p->portid != portid) { - (void) isp_plogx(isp, chan, handle, portid, - PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT, 1); + (void) isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 1); } else if (r == 0) { break; } @@ -3933,8 +3922,7 @@ isp_login_device(ispsoftc_t *isp, int ch /* * Now try and log into the device */ - r = isp_plogx(isp, chan, handle, portid, - PLOGX_FLG_CMD_PLOGI, 1); + r = isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_PLOGI, 1); if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { return (-1); } @@ -3942,7 +3930,26 @@ isp_login_device(ispsoftc_t *isp, int ch *ohp = handle; break; } else if ((r & 0xffff) == MBOX_PORT_ID_USED) { - handle = r >> 16; + /* + * If we get here, then the firmwware still thinks we're logged into this device, but with a different + * handle. We need to break that association. We used to try and just substitute the handle, but then + * failed to get any data via isp_getpdb (below). + */ + if (isp_plogx(isp, chan, r >> 16, portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 1)) { + isp_prt(isp, ISP_LOGERR, "baw... logout of %x failed", r >> 16); + } + if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { + return (-1); + } + r = isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_PLOGI, 1); + if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { + return (-1); + } + if (r == 0) { + *ohp = handle; + } else { + i = lim; + } break; } else if (r != MBOX_LOOP_ID_USED) { i = lim; @@ -3956,8 +3963,7 @@ isp_login_device(ispsoftc_t *isp, int ch } if (i == lim) { - isp_prt(isp, ISP_LOGWARN, "Chan %d PLOGI 0x%06x failed", - chan, portid); + isp_prt(isp, ISP_LOGWARN, "Chan %d PLOGI 0x%06x failed", chan, portid); return (-1); } @@ -3971,15 +3977,12 @@ isp_login_device(ispsoftc_t *isp, int ch return (-1); } if (r != 0) { - isp_prt(isp, ISP_LOGERR, - "Chan %d new device 0x%06x@0x%x disappeared", - chan, portid, handle); + isp_prt(isp, ISP_LOGERR, "Chan %d new device 0x%06x@0x%x disappeared", chan, portid, handle); return (-1); } if (p->handle != handle || p->portid != portid) { - isp_prt(isp, ISP_LOGERR, - "Chan %d new device 0x%06x@0x%x changed (0x%06x@0x%0x)", + isp_prt(isp, ISP_LOGERR, "Chan %d new device 0x%06x@0x%x changed (0x%06x@0x%0x)", chan, portid, handle, p->portid, p->handle); return (-1); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 18:57:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A777106566C; Thu, 18 Feb 2010 18:57:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF1968FC12; Thu, 18 Feb 2010 18:57:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IIvFCj049767; Thu, 18 Feb 2010 18:57:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IIvFrG049765; Thu, 18 Feb 2010 18:57:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181857.o1IIvFrG049765@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 18:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204051 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 18:57:16 -0000 Author: imp Date: Thu Feb 18 18:57:15 2010 New Revision: 204051 URL: http://svn.freebsd.org/changeset/base/204051 Log: n64 has a different size for KINFO_PROC_SIZE. Modified: head/sys/sys/user.h Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Thu Feb 18 18:35:09 2010 (r204050) +++ head/sys/sys/user.h Thu Feb 18 18:57:15 2010 (r204051) @@ -100,8 +100,12 @@ #define KINFO_PROC_SIZE 768 #endif #ifdef __mips__ +#ifdef __mips_n64 +#define KINFO_PROC_SIZE 1088 +#else #define KINFO_PROC_SIZE 816 #endif +#endif #ifdef __powerpc__ #define KINFO_PROC_SIZE 768 #endif From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 19:02:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9DE21065705; Thu, 18 Feb 2010 19:02:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA7238FC1F; Thu, 18 Feb 2010 19:02:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IJ2Xrn050970; Thu, 18 Feb 2010 19:02:33 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IJ2XDx050968; Thu, 18 Feb 2010 19:02:33 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181902.o1IJ2XDx050968@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 19:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204052 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 19:02:33 -0000 Author: imp Date: Thu Feb 18 19:02:33 2010 New Revision: 204052 URL: http://svn.freebsd.org/changeset/base/204052 Log: Use proper structure type for 64-bit headers # this fixes the MALTA64 build Modified: head/sys/mips/mips/elf_trampoline.c Modified: head/sys/mips/mips/elf_trampoline.c ============================================================================== --- head/sys/mips/mips/elf_trampoline.c Thu Feb 18 18:57:15 2010 (r204051) +++ head/sys/mips/mips/elf_trampoline.c Thu Feb 18 19:02:33 2010 (r204052) @@ -96,7 +96,7 @@ load_kernel(void * kstart) #ifdef __mips_n64 Elf64_Ehdr *eh; Elf64_Phdr phdr[64] /* XXX */; - Elf64_Phdr shdr[64] /* XXX */; + Elf64_Shdr shdr[64] /* XXX */; #else Elf32_Ehdr *eh; Elf32_Phdr phdr[64] /* XXX */; From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 19:06:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83451065695; Thu, 18 Feb 2010 19:06:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5AF58FC0A; Thu, 18 Feb 2010 19:06:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IJ6U6E051912; Thu, 18 Feb 2010 19:06:30 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IJ6UrF051909; Thu, 18 Feb 2010 19:06:30 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201002181906.o1IJ6UrF051909@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 18 Feb 2010 19:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204053 - head/usr.bin/hexdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 19:06:30 -0000 Author: gavin Date: Thu Feb 18 19:06:30 2010 New Revision: 204053 URL: http://svn.freebsd.org/changeset/base/204053 Log: The correct value of DEL is 0x7f, not 0xff. This is purely a documentation issue - od(1) and hexdump(1) behave as expected. PR: docs/143869 Submitted by: gcooper MFC after: 2 weeks Modified: head/usr.bin/hexdump/hexdump.1 head/usr.bin/hexdump/od.1 Modified: head/usr.bin/hexdump/hexdump.1 ============================================================================== --- head/usr.bin/hexdump/hexdump.1 Thu Feb 18 19:02:33 2010 (r204052) +++ head/usr.bin/hexdump/hexdump.1 Thu Feb 18 19:06:30 2010 (r204053) @@ -32,7 +32,7 @@ .\" @(#)hexdump.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 10, 2004 +.Dd February 18, 2010 .Dt HEXDUMP 1 .Os .Sh NAME @@ -258,7 +258,7 @@ strings. .It "\&00C\ FF\t00D\ CR\t00E\ SO\t00F\ SI\t010\ DLE\t011\ DC1 .It "\&012\ DC2\t013\ DC3\t014\ DC4\t015\ NAK\t016\ SYN\t017\ ETB .It "\&018\ CAN\t019\ EM\t01A\ SUB\t01B\ ESC\t01C\ FS\t01D\ GS -.It "\&01E\ RS\t01F\ US\t0FF\ DEL +.It "\&01E\ RS\t01F\ US\t07F\ DEL .El .El .Pp Modified: head/usr.bin/hexdump/od.1 ============================================================================== --- head/usr.bin/hexdump/od.1 Thu Feb 18 19:02:33 2010 (r204052) +++ head/usr.bin/hexdump/od.1 Thu Feb 18 19:06:30 2010 (r204053) @@ -32,7 +32,7 @@ .\" @(#)od.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 24, 2006 +.Dd February 18, 2010 .Os .Dt OD 1 .Sh NAME @@ -155,7 +155,7 @@ Control characters are displayed using t .It "00c FF 00d CR 00e SO 00f SI 010 DLE 011 DC1" .It "012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB" .It "018 CAN 019 EM 01a SUB 01b ESC 01c FS 01d GS" -.It "01e RS 01f US 020 SP 0ff DEL" +.It "01e RS 01f US 020 SP 07f DEL" .El .It Cm c Characters in the default character set. From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 19:24:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A25310656B1; Thu, 18 Feb 2010 19:24:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29E1E8FC1F; Thu, 18 Feb 2010 19:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IJOOON055877; Thu, 18 Feb 2010 19:24:24 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IJOOth055875; Thu, 18 Feb 2010 19:24:24 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181924.o1IJOOth055875@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 19:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204054 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 19:24:24 -0000 Author: imp Date: Thu Feb 18 19:24:23 2010 New Revision: 204054 URL: http://svn.freebsd.org/changeset/base/204054 Log: Parens around tertiary operator so that casting the result works... Modified: head/sys/mips/cavium/octeon_pcmap_regs.h Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Thu Feb 18 19:06:30 2010 (r204053) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Thu Feb 18 19:24:23 2010 (r204054) @@ -601,10 +601,9 @@ typedef enum { #define octeon_ptr_to_phys(ptr) \ - ((((mipsx_addr_size) ptr) >> MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT) == 2) ? \ + (((((mipsx_addr_size) ptr) >> MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT) == 2) ? \ ((mipsx_addr_size) ptr & MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED) : \ - (vtophys(ptr)) - + (vtophys(ptr))) #ifdef CODE_FOR_64_BIT_NEEDED static inline mipsx_addr_size octeon_ptr_to_phys (void *ptr) From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 19:27:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1659D1065692; Thu, 18 Feb 2010 19:27:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 028FA8FC19; Thu, 18 Feb 2010 19:27:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IJR0WQ056472; Thu, 18 Feb 2010 19:27:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IJR0WV056469; Thu, 18 Feb 2010 19:27:00 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181927.o1IJR0WV056469@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 19:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204055 - in head/sys/mips/cavium: . dev/rgmii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 19:27:01 -0000 Author: imp Date: Thu Feb 18 19:27:00 2010 New Revision: 204055 URL: http://svn.freebsd.org/changeset/base/204055 Log: Make printfs work for both OCTEON1 and OCTEON1-32 Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Thu Feb 18 19:24:23 2010 (r204054) +++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Thu Feb 18 19:27:00 2010 (r204055) @@ -209,8 +209,9 @@ void octeon_fpa_fill_pool_mem (u_int poo memory = (void *) OCTEON_ALIGN(memory); #ifdef FPA_DEBUG_TERSE - printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: %p = 0x%X\n", - pool, elem_num, elem_size_bytes, block_size, memory, (void *)OCTEON_PTR2PHYS(memory)); + printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: %p = %p\n", + pool, elem_num, elem_size_bytes, block_size, memory, + (void *)(intptr_t)OCTEON_PTR2PHYS(memory)); #endif // memory = (void *) ((((u_int) memory / OCTEON_FPA_POOL_ALIGNMENT) + 1) * OCTEON_FPA_POOL_ALIGNMENT); @@ -218,7 +219,8 @@ void octeon_fpa_fill_pool_mem (u_int poo while (elem_num--) { #ifdef FPA_DEBUG if (((elems - elem_num) < 4) || (elem_num < 4)) - printf(" %% Block %d: %p Phys 0x%X Bytes %u\n", block, memory, OCTEON_PTR2PHYS(memory), elem_size_bytes); + printf(" %% Block %d: %p Phys %p Bytes %u\n", block, memory, + (void *)(intptr_t)OCTEON_PTR2PHYS(memory), elem_size_bytes); block++; #endif octeon_fpa_free(memory, pool, 0); Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Thu Feb 18 19:24:23 2010 (r204054) +++ head/sys/mips/cavium/octeon_machdep.c Thu Feb 18 19:27:00 2010 (r204055) @@ -659,8 +659,8 @@ octeon_memory_init(void) uint32_t realmem_bytes; if (octeon_board_real()) { - printf("octeon_dram == %llx\n", octeon_dram); - printf("reduced to ram: %u MB", (uint32_t) octeon_dram >> 20); + printf("octeon_dram == %jx\n", (intmax_t)octeon_dram); + printf("reduced to ram: %u MB", (uint32_t)octeon_dram >> 20); realmem_bytes = (octeon_dram - PAGE_SIZE); realmem_bytes &= ~(PAGE_SIZE - 1); @@ -678,8 +678,8 @@ octeon_memory_init(void) phys_avail[1] = realmem_bytes; realmem_bytes -= OCTEON_DRAM_FIRST_256_END; realmem_bytes &= ~(PAGE_SIZE - 1); - printf("phys_avail[0] = %x phys_avail[1] = %x\n", - phys_avail[0], phys_avail[1]); + printf("phys_avail[0] = %#lx phys_avail[1] = %#lx\n", + (long)phys_avail[0], (long)phys_avail[1]); } else { /* Simulator gets 96Meg period. */ phys_avail[1] = (96 << 20); @@ -707,8 +707,8 @@ octeon_memory_init(void) phys_avail[2] = 0x20000000; printf("realmem_bytes is now at %x\n", realmem_bytes); phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); - printf("Next block of memory goes from %x to %x\n", - phys_avail[2], phys_avail[3]); + printf("Next block of memory goes from %#lx to %#lx\n", + (long)phys_avail[2], (long)phys_avail[3]); physmem += btoc(phys_avail[3] - phys_avail[2]); } else { printf("realmem_bytes is %d\n", realmem_bytes); @@ -716,8 +716,8 @@ octeon_memory_init(void) realmem = physmem; printf("Total DRAM Size %#X\n", (uint32_t) octeon_dram); - printf("Bank 0 = %#08X -> %#08X\n", phys_avail[0], phys_avail[1]); - printf("Bank 1 = %#08X -> %#08X\n", phys_avail[2], phys_avail[3]); + printf("Bank 0 = %#08lX -> %#08lX\n", (long)phys_avail[0], (long)phys_avail[1]); + printf("Bank 1 = %#08lX -> %#08lX\n", (long)phys_avail[2], (long)phys_avail[3]); printf("physmem: %#lx\n", physmem); Maxmem = physmem; From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 19:41:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFDDF1065672; Thu, 18 Feb 2010 19:41:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FEBC8FC08; Thu, 18 Feb 2010 19:41:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IJfc74059689; Thu, 18 Feb 2010 19:41:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IJfcKN059687; Thu, 18 Feb 2010 19:41:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002181941.o1IJfcKN059687@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 19:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204056 - head/sys/mips/alchemy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 19:41:38 -0000 Author: imp Date: Thu Feb 18 19:41:38 2010 New Revision: 204056 URL: http://svn.freebsd.org/changeset/base/204056 Log: Hack to make ALCHEMY compile again... Modified: head/sys/mips/alchemy/obio.c Modified: head/sys/mips/alchemy/obio.c ============================================================================== --- head/sys/mips/alchemy/obio.c Thu Feb 18 19:27:00 2010 (r204055) +++ head/sys/mips/alchemy/obio.c Thu Feb 18 19:41:38 2010 (r204056) @@ -120,6 +120,40 @@ static int obio_setup_intr(device_t, dev static int obio_teardown_intr(device_t, device_t, struct resource *, void *); +static void +obio_mask_irq(void *arg) +{ + /* XXX need to write */ +#if 0 + unsigned int irq = (unsigned int)arg; + int ip_bit, mask, mask_register; + + /* mask IRQ */ + mask_register = ICU_IRQ_MASK_REG(irq); + ip_bit = ICU_IP_BIT(irq); + + mask = ICU_REG_READ(mask_register); + ICU_REG_WRITE(mask_register, mask | ip_bit); +#endif +} + +static void +obio_unmask_irq(void *arg) +{ + /* XXX need to write */ +#if 0 + unsigned int irq = (unsigned int)arg; + int ip_bit, mask, mask_register; + + /* unmask IRQ */ + mask_register = ICU_IRQ_MASK_REG(irq); + ip_bit = ICU_IP_BIT(irq); + + mask = ICU_REG_READ(mask_register); + ICU_REG_WRITE(mask_register, mask & ~ip_bit); +#endif +} + static int obio_probe(device_t dev) { @@ -320,9 +354,10 @@ obio_setup_intr(device_t dev, device_t c event = sc->sc_eventstab[irq]; if (event == NULL) { - error = intr_event_create(&event, (void *)irq, 0, irq, - (mask_fn)mips_mask_irq, (mask_fn)mips_unmask_irq, - NULL, NULL, "obio intr%d:", irq); + error = intr_event_create(&event, (void *)irq, 0, irq, + obio_mask_irq, obio_unmask_irq, + NULL, NULL, + "obio intr%d:", irq); sc->sc_eventstab[irq] = event; } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 20:20:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D398A1065676; Thu, 18 Feb 2010 20:20:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C39C08FC21; Thu, 18 Feb 2010 20:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IKKYEb068428; Thu, 18 Feb 2010 20:20:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IKKY9l068426; Thu, 18 Feb 2010 20:20:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002182020.o1IKKY9l068426@svn.freebsd.org> From: Warner Losh Date: Thu, 18 Feb 2010 20:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204060 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 20:20:34 -0000 Author: imp Date: Thu Feb 18 20:20:34 2010 New Revision: 204060 URL: http://svn.freebsd.org/changeset/base/204060 Log: Unbreak SENTRY5 build. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Feb 18 20:02:38 2010 (r204059) +++ head/sys/conf/files.mips Thu Feb 18 20:20:34 2010 (r204060) @@ -97,6 +97,7 @@ dev/cfe/cfe_env.c optional cfe_env #dev/cfe/cfe_resource.c optional cfe # not yet needed dev/siba/siba.c optional siba -dev/siba/siba_pcib.c optional siba pci dev/siba/siba_cc.c optional siba +dev/siba/siba_core.c optional siba +dev/siba/siba_pcib.c optional siba pci #mips/sentry5/siba_mips.c optional siba # not yet From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 21:14:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03120106566B; Thu, 18 Feb 2010 21:14:30 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6BA38FC15; Thu, 18 Feb 2010 21:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1ILETf0080383; Thu, 18 Feb 2010 21:14:29 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1ILETnw080381; Thu, 18 Feb 2010 21:14:29 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201002182114.o1ILETnw080381@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 18 Feb 2010 21:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204061 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 21:14:30 -0000 Author: edwin Date: Thu Feb 18 21:14:29 2010 New Revision: 204061 URL: http://svn.freebsd.org/changeset/base/204061 Log: Add heads-up requests for parts of the tree I look after and which are partly maintained by a third party: - share/zoneinfo - usr.sbin/zic - lib/libc/stdtime Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Feb 18 20:20:34 2010 (r204060) +++ head/MAINTAINERS Thu Feb 18 21:14:29 2010 (r204061) @@ -125,6 +125,12 @@ gnu/usr.bin/send-pr bugmaster Pre-commit ncurses rafan Heads-up appreciated, try not to break it. *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. +share/zoneinfo edwin Heads-up appreciated, since our data is coming + from a third party source. +usr.sbin/zic edwin Heads-up appreciated, since this code is + maintained by a third party source. +lib/libc/stdtime edwin Heads-up appreciated, since parts of this code + is maintained by a third party source. Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:10:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9212C106566C; Thu, 18 Feb 2010 22:10:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8180C8FC08; Thu, 18 Feb 2010 22:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMAto1092783; Thu, 18 Feb 2010 22:10:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMAtI7092781; Thu, 18 Feb 2010 22:10:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182210.o1IMAtI7092781@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204063 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:10:55 -0000 Author: pjd Date: Thu Feb 18 22:10:55 2010 New Revision: 204063 URL: http://svn.freebsd.org/changeset/base/204063 Log: Simplify code a bit. Modified: head/sys/nfsclient/nfs_kdtrace.c Modified: head/sys/nfsclient/nfs_kdtrace.c ============================================================================== --- head/sys/nfsclient/nfs_kdtrace.c Thu Feb 18 21:21:54 2010 (r204062) +++ head/sys/nfsclient/nfs_kdtrace.c Thu Feb 18 22:10:55 2010 (r204063) @@ -500,15 +500,11 @@ dtnfsclient_load(void *dummy) static int dtnfsclient_unload() { - int error = 0; dtrace_nfsclient_nfs23_start_probe = NULL; dtrace_nfsclient_nfs23_done_probe = NULL; - if ((error = dtrace_unregister(dtnfsclient_id)) != 0) - return (error); - - return (error); + return (dtrace_unregister(dtnfsclient_id)); } static int From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:12:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19E1610656BD; Thu, 18 Feb 2010 22:12:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 096378FC15; Thu, 18 Feb 2010 22:12:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMCeqO093232; Thu, 18 Feb 2010 22:12:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMCeGM093230; Thu, 18 Feb 2010 22:12:40 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182212.o1IMCeGM093230@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204064 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:12:41 -0000 Author: pjd Date: Thu Feb 18 22:12:40 2010 New Revision: 204064 URL: http://svn.freebsd.org/changeset/base/204064 Log: Use NULL instead of 0 when setting up pointer. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu Feb 18 22:10:55 2010 (r204063) +++ head/sys/kern/uipc_syscalls.c Thu Feb 18 22:12:40 2010 (r204064) @@ -941,8 +941,8 @@ kern_recvit(td, s, mp, fromseg, controlp struct uio *ktruio = NULL; #endif - if(controlp != NULL) - *controlp = 0; + if (controlp != NULL) + *controlp = NULL; AUDIT_ARG_FD(s); error = getsock(td->td_proc->p_fd, s, &fp, NULL); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:14:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 545021065676; Thu, 18 Feb 2010 22:14:45 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440048FC08; Thu, 18 Feb 2010 22:14:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMEjNm093722; Thu, 18 Feb 2010 22:14:45 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMEjMq093720; Thu, 18 Feb 2010 22:14:45 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182214.o1IMEjMq093720@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204065 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:14:45 -0000 Author: pjd Date: Thu Feb 18 22:14:44 2010 New Revision: 204065 URL: http://svn.freebsd.org/changeset/base/204065 Log: Use vput() instead of VOP_UNLOCK()+vrele(). The comment here is out-dated, we no longer pass thread pointer to VOP_UNLOCK(). Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Feb 18 22:12:40 2010 (r204064) +++ head/sys/kern/vfs_default.c Thu Feb 18 22:14:44 2010 (r204065) @@ -894,10 +894,7 @@ loop: error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; - - /* Do not turn this into vput. td is not always curthread. */ - VOP_UNLOCK(vp, 0); - vrele(vp); + vput(vp); MNT_ILOCK(mp); } MNT_IUNLOCK(mp); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:22:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3D2A106566B; Thu, 18 Feb 2010 22:22:45 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2868FC0C; Thu, 18 Feb 2010 22:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMMjAq095524; Thu, 18 Feb 2010 22:22:45 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMMjNO095522; Thu, 18 Feb 2010 22:22:45 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182222.o1IMMjNO095522@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204066 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:22:46 -0000 Author: pjd Date: Thu Feb 18 22:22:45 2010 New Revision: 204066 URL: http://svn.freebsd.org/changeset/base/204066 Log: - Reduce scope of vnode lock. vfs_mount_alloc() doesn't need vnode to be locked. - Remove code duplication. Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Feb 18 22:14:44 2010 (r204065) +++ head/sys/kern/vfs_mount.c Thu Feb 18 22:22:45 2010 (r204066) @@ -959,12 +959,12 @@ vfs_domount( } vp->v_iflag |= VI_MOUNT; VI_UNLOCK(vp); + VOP_UNLOCK(vp, 0); /* * Allocate and initialize the filesystem. */ mp = vfs_mount_alloc(vp, vfsp, fspath, td->td_ucred); - VOP_UNLOCK(vp, 0); /* XXXMAC: pass to vfs_mount_alloc? */ mp->mnt_optnew = fsdata; @@ -1060,12 +1060,12 @@ vfs_domount( * Put the new filesystem on the mount list after root. */ cache_purge(vp); + VI_LOCK(vp); + vp->v_iflag &= ~VI_MOUNT; + VI_UNLOCK(vp); if (!error) { struct vnode *newdp; - VI_LOCK(vp); - vp->v_iflag &= ~VI_MOUNT; - VI_UNLOCK(vp); vp->v_mountedhere = mp; mtx_lock(&mountlist_mtx); TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list); @@ -1083,9 +1083,6 @@ vfs_domount( if (error) vrele(vp); } else { - VI_LOCK(vp); - vp->v_iflag &= ~VI_MOUNT; - VI_UNLOCK(vp); vfs_unbusy(mp); vfs_mount_destroy(mp); vput(vp); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:23:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40EC21065694; Thu, 18 Feb 2010 22:23:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 306658FC22; Thu, 18 Feb 2010 22:23:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMNVBj095790; Thu, 18 Feb 2010 22:23:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMNVc3095788; Thu, 18 Feb 2010 22:23:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182223.o1IMNVc3095788@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204067 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:23:31 -0000 Author: pjd Date: Thu Feb 18 22:23:30 2010 New Revision: 204067 URL: http://svn.freebsd.org/changeset/base/204067 Log: Update comment. We also look for GPT partitions. Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Thu Feb 18 22:22:45 2010 (r204066) +++ head/sys/boot/zfs/zfs.c Thu Feb 18 22:23:30 2010 (r204067) @@ -397,7 +397,7 @@ zfs_dev_init(void) /* * Open all the disks we can find and see if we can reconstruct * ZFS pools from them. Bogusly assumes that the disks are named - * diskN or diskNsM. + * diskN, diskNpM or diskNsM. */ zfs_init(); for (unit = 0; unit < 32 /* XXX */; unit++) { From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:26:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C672106568F; Thu, 18 Feb 2010 22:26:02 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF8028FC13; Thu, 18 Feb 2010 22:26:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMQ1Li096351; Thu, 18 Feb 2010 22:26:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMQ1Os096347; Thu, 18 Feb 2010 22:26:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182226.o1IMQ1Os096347@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204068 - in head/sys: compat/linux netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:26:02 -0000 Author: pjd Date: Thu Feb 18 22:26:01 2010 New Revision: 204068 URL: http://svn.freebsd.org/changeset/base/204068 Log: No need to include security/mac/mac_framework.h here. Modified: head/sys/compat/linux/linux_stats.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Thu Feb 18 22:23:30 2010 (r204067) +++ head/sys/compat/linux/linux_stats.c Thu Feb 18 22:26:01 2010 (r204068) @@ -58,8 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - static void translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) { Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Thu Feb 18 22:23:30 2010 (r204067) +++ head/sys/netinet/ip_mroute.c Thu Feb 18 22:26:01 2010 (r204068) @@ -114,8 +114,6 @@ __FBSDID("$FreeBSD$"); #include -#include - #ifndef KTR_IPMF #define KTR_IPMF KTR_INET #endif Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Thu Feb 18 22:23:30 2010 (r204067) +++ head/sys/netinet/ip_options.c Thu Feb 18 22:26:01 2010 (r204068) @@ -65,8 +65,6 @@ __FBSDID("$FreeBSD$"); #include -#include - static int ip_dosourceroute = 0; SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, &ip_dosourceroute, 0, "Enable forwarding source routed IP packets"); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:27:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B64C91065676; Thu, 18 Feb 2010 22:27:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EA98FC17; Thu, 18 Feb 2010 22:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMRcmp096748; Thu, 18 Feb 2010 22:27:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMRcc8096746; Thu, 18 Feb 2010 22:27:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182227.o1IMRcc8096746@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204069 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:27:38 -0000 Author: pjd Date: Thu Feb 18 22:27:38 2010 New Revision: 204069 URL: http://svn.freebsd.org/changeset/base/204069 Log: Log attach just like we log detach. Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Thu Feb 18 22:26:01 2010 (r204068) +++ head/sys/geom/geom_subr.c Thu Feb 18 22:27:38 2010 (r204069) @@ -707,6 +707,7 @@ g_attach(struct g_consumer *cp, struct g g_topology_assert(); G_VALID_CONSUMER(cp); G_VALID_PROVIDER(pp); + g_trace(G_T_TOPOLOGY, "g_attach(%p, %p)", cp, pp); KASSERT(cp->provider == NULL, ("attach but attached")); cp->provider = pp; LIST_INSERT_HEAD(&pp->consumers, cp, consumers); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:28:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D316F1065679; Thu, 18 Feb 2010 22:28:12 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2AE38FC21; Thu, 18 Feb 2010 22:28:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMSClU096915; Thu, 18 Feb 2010 22:28:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMSCsR096913; Thu, 18 Feb 2010 22:28:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182228.o1IMSCsR096913@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204070 - head/sys/geom/stripe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:28:12 -0000 Author: pjd Date: Thu Feb 18 22:28:12 2010 New Revision: 204070 URL: http://svn.freebsd.org/changeset/base/204070 Log: Correct comment. Modified: head/sys/geom/stripe/g_stripe.c Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Thu Feb 18 22:27:38 2010 (r204069) +++ head/sys/geom/stripe/g_stripe.c Thu Feb 18 22:28:12 2010 (r204070) @@ -633,7 +633,7 @@ g_stripe_start(struct bio *bp) * Do use "economic" when: * 1. "Economic" mode is ON. * or - * 2. "Fast" mode failed. It can only failed if there is no memory. + * 2. "Fast" mode failed. It can only fail if there is no memory. */ if (!fast || error != 0) error = g_stripe_start_economic(bp, no, offset, length); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:29:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7814B1065693; Thu, 18 Feb 2010 22:29:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 665478FC0A; Thu, 18 Feb 2010 22:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMTZ9i097246; Thu, 18 Feb 2010 22:29:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMTZJE097244; Thu, 18 Feb 2010 22:29:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182229.o1IMTZJE097244@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204071 - head/sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:29:35 -0000 Author: pjd Date: Thu Feb 18 22:29:35 2010 New Revision: 204071 URL: http://svn.freebsd.org/changeset/base/204071 Log: - Style fixes. - Prefer strlcpy() over strncpy(). Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Thu Feb 18 22:28:12 2010 (r204070) +++ head/sys/geom/multipath/g_multipath.c Thu Feb 18 22:29:35 2010 (r204071) @@ -95,9 +95,8 @@ g_mpd(void *arg, int flags __unused) g_topology_assert(); cp = arg; - if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) { + if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); - } if (cp->provider) { printf("GEOM_MULTIPATH: %s removed from %s\n", cp->provider->name, cp->geom->name); @@ -222,15 +221,16 @@ g_multipath_done_error(struct bio *bp) static void g_multipath_kt(void *arg) { + g_multipath_kt_state = GKT_RUN; mtx_lock(&gmtbq_mtx); while (g_multipath_kt_state == GKT_RUN) { for (;;) { struct bio *bp; + bp = bioq_takefirst(&gmtbq); - if (bp == NULL) { + if (bp == NULL) break; - } mtx_unlock(&gmtbq_mtx); g_multipath_done_error(bp); mtx_lock(&gmtbq_mtx); @@ -264,9 +264,8 @@ g_multipath_access(struct g_provider *pp fail: LIST_FOREACH(cp, &gp->consumer, consumer) { - if (cp == badcp) { + if (cp == badcp) break; - } (void) g_access(cp, -dr, -dw, -de); } return (error); @@ -290,9 +289,8 @@ g_multipath_create(struct g_class *mp, s } gp = g_new_geomf(mp, md->md_name); - if (gp == NULL) { + if (gp == NULL) goto fail; - } sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); gp->softc = sc; @@ -303,9 +301,8 @@ g_multipath_create(struct g_class *mp, s memcpy(sc->sc_name, md->md_name, sizeof (sc->sc_name)); pp = g_new_providerf(gp, "multipath/%s", md->md_name); - if (pp == NULL) { + if (pp == NULL) goto fail; - } /* limit the provider to not have it stomp on metadata */ pp->mediasize = md->md_size - md->md_sectorsize; pp->sectorsize = md->md_sectorsize; @@ -314,9 +311,8 @@ g_multipath_create(struct g_class *mp, s return (gp); fail: if (gp != NULL) { - if (gp->softc != NULL) { + if (gp->softc != NULL) g_free(gp->softc); - } g_destroy_geom(gp); } return (NULL); @@ -338,9 +334,8 @@ g_multipath_add_disk(struct g_geom *gp, * Make sure that the passed provider isn't already attached */ LIST_FOREACH(cp, &gp->consumer, consumer) { - if (cp->provider == pp) { + if (cp->provider == pp) break; - } } if (cp) { printf("GEOM_MULTIPATH: provider %s already attached to %s\n", @@ -349,9 +344,8 @@ g_multipath_add_disk(struct g_geom *gp, } nxtcp = LIST_FIRST(&gp->consumer); cp = g_new_consumer(gp); - if (cp == NULL) { + if (cp == NULL) return (ENOMEM); - } error = g_attach(cp, pp); if (error != 0) { printf("GEOM_MULTIPATH: cannot attach %s to %s", @@ -392,13 +386,11 @@ g_multipath_destroy(struct g_geom *gp) struct g_provider *pp; g_topology_assert(); - if (gp->softc == NULL) { + if (gp->softc == NULL) return (ENXIO); - } pp = LIST_FIRST(&gp->provider); - if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0)) { + if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0)) return (EBUSY); - } printf("GEOM_MULTIPATH: destroying %s\n", gp->name); g_free(gp->softc); gp->softc = NULL; @@ -410,6 +402,7 @@ static int g_multipath_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) { + return (g_multipath_destroy(gp)); } @@ -418,9 +411,8 @@ g_multipath_init(struct g_class *mp) { bioq_init(&gmtbq); mtx_init(&gmtbq_mtx, "gmtbq", NULL, MTX_DEF); - if (kproc_create(g_multipath_kt, mp, NULL, 0, 0, "g_mp_kt") == 0) { + if (kproc_create(g_multipath_kt, mp, NULL, 0, 0, "g_mp_kt") == 0) g_multipath_kt_state = GKT_RUN; - } } static void @@ -446,18 +438,16 @@ g_multipath_read_metadata(struct g_consu g_topology_assert(); error = g_access(cp, 1, 0, 0); - if (error != 0) { + if (error != 0) return (error); - } pp = cp->provider; g_topology_unlock(); buf = g_read_data(cp, pp->mediasize - pp->sectorsize, pp->sectorsize, &error); g_topology_lock(); g_access(cp, -1, 0, 0); - if (buf == NULL) { + if (buf == NULL) return (error); - } multipath_metadata_decode(buf, md); g_free(buf); return (0); @@ -484,15 +474,13 @@ g_multipath_taste(struct g_class *mp, st g_detach(cp); g_destroy_consumer(cp); g_destroy_geom(gp); - if (error != 0) { + if (error != 0) return (NULL); - } gp = NULL; if (strcmp(md.md_magic, G_MULTIPATH_MAGIC) != 0) { - if (g_multipath_debug) { + if (g_multipath_debug) printf("%s is not MULTIPATH\n", pp->name); - } return (NULL); } if (md.md_version != G_MULTIPATH_VERSION) { @@ -501,9 +489,8 @@ g_multipath_taste(struct g_class *mp, st G_MULTIPATH_VERSION); return (NULL); } - if (g_multipath_debug) { + if (g_multipath_debug) printf("MULTIPATH: %s/%s\n", md.md_name, md.md_uuid); - } /* * Let's check if such a device already is present. We check against @@ -519,25 +506,20 @@ g_multipath_taste(struct g_class *mp, st sc = NULL; LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; - if (sc == NULL) { + if (sc == NULL) continue; - } - if (strncmp(md.md_uuid, sc->sc_uuid, sizeof(md.md_uuid)) == 0) { + if (strncmp(md.md_uuid, sc->sc_uuid, sizeof(md.md_uuid)) == 0) break; - } } LIST_FOREACH(gp1, &mp->geom, geom) { - if (gp1 == gp) { + if (gp1 == gp) continue; - } sc = gp1->softc; - if (sc == NULL) { + if (sc == NULL) continue; - } - if (strncmp(md.md_name, sc->sc_name, sizeof(md.md_name)) == 0) { + if (strncmp(md.md_name, sc->sc_name, sizeof(md.md_name)) == 0) break; - } } /* @@ -564,9 +546,9 @@ g_multipath_taste(struct g_class *mp, st sc->sc_name, sc->sc_uuid); printf("GEOM_MULTIPATH: %s will be (temporarily) %s\n", md.md_uuid, buf); - strlcpy(md.md_name, buf, sizeof (md.md_name)); + strlcpy(md.md_name, buf, sizeof(md.md_name)); } else { - strlcpy(md.md_name, sc->sc_name, sizeof (md.md_name)); + strlcpy(md.md_name, sc->sc_name, sizeof(md.md_name)); } } @@ -586,9 +568,8 @@ g_multipath_taste(struct g_class *mp, st KASSERT(sc != NULL, ("sc is NULL")); error = g_multipath_add_disk(gp, pp); if (error != 0) { - if (isnew) { + if (isnew) g_multipath_destroy(gp); - } return (NULL); } return (gp); @@ -627,9 +608,8 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "No 'arg1' argument"); return; } - if (strncmp(name, devpf, 5) == 0) { + if (strncmp(name, devpf, 5) == 0) name += 5; - } pp0 = g_provider_by_name(name); if (pp0 == NULL) { gctl_error(req, "Provider %s is invalid", name); @@ -641,9 +621,8 @@ g_multipath_ctl_create(struct gctl_req * gctl_error(req, "No 'arg2' argument"); return; } - if (strncmp(name, devpf, 5) == 0) { + if (strncmp(name, devpf, 5) == 0) name += 5; - } pp1 = g_provider_by_name(name); if (pp1 == NULL) { gctl_error(req, "Provider %s is invalid", name); @@ -687,13 +666,12 @@ g_multipath_ctl_create(struct gctl_req * memset(&md, 0, sizeof(md)); md.md_size = pp0->mediasize; md.md_sectorsize = pp0->sectorsize; - strncpy(md.md_name, mpname, sizeof (md.md_name)); - strncpy(md.md_uuid, uuid, sizeof (md.md_uuid)); + strlcpy(md.md_name, mpname, sizeof(md.md_name)); + strlcpy(md.md_uuid, uuid, sizeof(md.md_uuid)); gp = g_multipath_create(mp, &md); - if (gp == NULL) { + if (gp == NULL) return; - } error = g_multipath_add_disk(gp, pp0); if (error) { g_multipath_destroy(gp); From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:30:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52F1D1065676; Thu, 18 Feb 2010 22:30:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 421718FC08; Thu, 18 Feb 2010 22:30:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMUcdD097520; Thu, 18 Feb 2010 22:30:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMUcn3097518; Thu, 18 Feb 2010 22:30:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182230.o1IMUcn3097518@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204072 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:30:38 -0000 Author: pjd Date: Thu Feb 18 22:30:37 2010 New Revision: 204072 URL: http://svn.freebsd.org/changeset/base/204072 Log: No need to include security/mac/mac_framework.h here. Modified: head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Thu Feb 18 22:29:35 2010 (r204071) +++ head/sys/netinet6/in6_pcb.c Thu Feb 18 22:30:37 2010 (r204072) @@ -101,8 +101,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - struct in6_addr zeroin6_addr; int From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:31:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC2BB106568B; Thu, 18 Feb 2010 22:31:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAF578FC15; Thu, 18 Feb 2010 22:31:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMVhB6097788; Thu, 18 Feb 2010 22:31:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMVhKW097786; Thu, 18 Feb 2010 22:31:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182231.o1IMVhKW097786@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204073 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:31:43 -0000 Author: pjd Date: Thu Feb 18 22:31:43 2010 New Revision: 204073 URL: http://svn.freebsd.org/changeset/base/204073 Log: Add tunable and sysctl to skip hostid check on pool import. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Feb 18 22:30:37 2010 (r204072) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Feb 18 22:31:43 2010 (r204073) @@ -62,6 +62,14 @@ #include "zfs_prop.h" #include "zfs_comutil.h" +/* Check hostid on import? */ +static int check_hostid = 1; + +SYSCTL_DECL(_vfs_zfs); +TUNABLE_INT("vfs.zfs.check_hostid", &check_hostid); +SYSCTL_INT(_vfs_zfs, OID_AUTO, check_hostid, CTLFLAG_RW, &check_hostid, 0, + "Check hostid on import?"); + int zio_taskq_threads[ZIO_TYPES][ZIO_TASKQ_TYPES] = { /* ISSUE INTR */ { 1, 1 }, /* ZIO_TYPE_NULL */ @@ -1168,7 +1176,7 @@ spa_load(spa_t *spa, nvlist_t *config, s ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); - if (hostid != 0 && myhostid != 0 && + if (check_hostid && hostid != 0 && myhostid != 0 && (unsigned long)hostid != myhostid) { cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:34:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7861106566B; Thu, 18 Feb 2010 22:34:29 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C73578FC0A; Thu, 18 Feb 2010 22:34:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IMYTcZ098458; Thu, 18 Feb 2010 22:34:29 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IMYTWB098456; Thu, 18 Feb 2010 22:34:29 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182234.o1IMYTWB098456@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 22:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204074 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:34:29 -0000 Author: pjd Date: Thu Feb 18 22:34:29 2010 New Revision: 204074 URL: http://svn.freebsd.org/changeset/base/204074 Log: Correct typo in comment. Modified: head/sys/netipsec/keydb.h Modified: head/sys/netipsec/keydb.h ============================================================================== --- head/sys/netipsec/keydb.h Thu Feb 18 22:31:43 2010 (r204073) +++ head/sys/netipsec/keydb.h Thu Feb 18 22:34:29 2010 (r204074) @@ -52,7 +52,7 @@ union sockaddr_union { /* Security Assocciation Index */ /* NOTE: Ensure to be same address family */ struct secasindex { - union sockaddr_union src; /* srouce address for SA */ + union sockaddr_union src; /* source address for SA */ union sockaddr_union dst; /* destination address for SA */ u_int16_t proto; /* IPPROTO_ESP or IPPROTO_AH */ u_int8_t mode; /* mode of protocol, see ipsec.h */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:42:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B862B1065670; Thu, 18 Feb 2010 22:42:15 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4618FC13; Thu, 18 Feb 2010 22:42:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.4/8.14.4) with ESMTP id o1IMgDVw035576; Fri, 19 Feb 2010 01:42:13 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 19 Feb 2010 01:42:13 +0300 (MSK) From: Dmitry Morozovsky To: Pawel Jakub Dawidek In-Reply-To: <201002182231.o1IMVhKW097786@svn.freebsd.org> Message-ID: References: <201002182231.o1IMVhKW097786@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (woozle.rinet.ru [0.0.0.0]); Fri, 19 Feb 2010 01:42:13 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204073 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:42:15 -0000 On Thu, 18 Feb 2010, Pawel Jakub Dawidek wrote: PJD> Log: PJD> Add tunable and sysctl to skip hostid check on pool import. Wow, thank you! What do you think about disabling this check by default (no MFCs, surely, due to POLA)? And, is it possible to distinguish hardware changes from OS changes? (if it's possible, I suppose only OS changes should be default stopgap from importing/mounting) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 22:54:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 750C3106566C; Thu, 18 Feb 2010 22:54:26 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id B0D858FC1D; Thu, 18 Feb 2010 22:54:25 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6718A45CDC; Thu, 18 Feb 2010 23:54:23 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id D2DB445C9C; Thu, 18 Feb 2010 23:54:16 +0100 (CET) Date: Thu, 18 Feb 2010 23:54:14 +0100 From: Pawel Jakub Dawidek To: Dmitry Morozovsky Message-ID: <20100218225414.GA2157@garage.freebsd.pl> References: <201002182231.o1IMVhKW097786@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204073 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:54:26 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 19, 2010 at 01:42:13AM +0300, Dmitry Morozovsky wrote: > On Thu, 18 Feb 2010, Pawel Jakub Dawidek wrote: >=20 > PJD> Log: > PJD> Add tunable and sysctl to skip hostid check on pool import. >=20 > Wow, thank you! >=20 > What do you think about disabling this check by default (no MFCs, surely,= due=20 > to POLA)? And, is it possible to distinguish hardware changes from OS cha= nges? > (if it's possible, I suppose only OS changes should be default stopgap fr= om=20 > importing/mounting) I'm definiatelly against turning off this check by default. Especially now, when HAST will hit the tree in a moment and you can share storage between machines. It would be too easy to shoot yourself in the foot. Although it might not be good idea to suggest setting this tunable when hostid doesn't match with printf on the console. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkt9xRYACgkQForvXbEpPzQMxwCgwVawHf0Z49abgN/os6hSEJY9 beAAn39pHftPLu/0jbvFTXMnCqK39fUm =Ua/a -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 23:04:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FA3D106566B; Thu, 18 Feb 2010 23:04:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6479D8FC1B; Thu, 18 Feb 2010 23:04:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1IN413U005047; Thu, 18 Feb 2010 23:04:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1IN41gs005044; Thu, 18 Feb 2010 23:04:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182304.o1IN41gs005044@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 23:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204075 - in head/sbin/ggate: ggated shared X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 23:04:01 -0000 Author: pjd Date: Thu Feb 18 23:04:01 2010 New Revision: 204075 URL: http://svn.freebsd.org/changeset/base/204075 Log: Style nits. Modified: head/sbin/ggate/ggated/ggated.c head/sbin/ggate/shared/ggate.c Modified: head/sbin/ggate/ggated/ggated.c ============================================================================== --- head/sbin/ggate/ggated/ggated.c Thu Feb 18 22:34:29 2010 (r204074) +++ head/sbin/ggate/ggated/ggated.c Thu Feb 18 23:04:01 2010 (r204075) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Modified: head/sbin/ggate/shared/ggate.c ============================================================================== --- head/sbin/ggate/shared/ggate.c Thu Feb 18 22:34:29 2010 (r204074) +++ head/sbin/ggate/shared/ggate.c Thu Feb 18 23:04:01 2010 (r204075) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -159,7 +159,7 @@ g_gate_sectorsize(int fd) g_gate_xlog("fstat(): %s.", strerror(errno)); if (S_ISCHR(sb.st_mode)) { if (ioctl(fd, DIOCGSECTORSIZE, &secsize) == -1) { - g_gate_xlog("Can't get sector size: %s.", + g_gate_xlog("Can't get sector size: %s.", strerror(errno)); } } else if (S_ISREG(sb.st_mode)) { @@ -174,7 +174,7 @@ void g_gate_open_device(void) { - g_gate_devfd = open("/dev/" G_GATE_CTL_NAME, O_RDWR, 0); + g_gate_devfd = open("/dev/" G_GATE_CTL_NAME, O_RDWR); if (g_gate_devfd == -1) err(EXIT_FAILURE, "open(/dev/%s)", G_GATE_CTL_NAME); } @@ -281,7 +281,7 @@ g_gate_socket_settings(int sfd) /* Socket settings. */ on = 1; if (nagle) { - if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, + if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) == -1) { g_gate_xlog("setsockopt() error: %s.", strerror(errno)); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 23:16:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FBCB106566B; Thu, 18 Feb 2010 23:16:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6278FC08; Thu, 18 Feb 2010 23:16:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1INGKs2007799; Thu, 18 Feb 2010 23:16:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1INGKqf007786; Thu, 18 Feb 2010 23:16:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182316.o1INGKqf007786@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 23:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204076 - in head: etc/defaults etc/rc.d sbin sbin/ggate/ggatec sbin/ggate/ggatel sbin/hastctl sbin/hastd share/examples share/examples/hast share/man/man5 sys/geom/gate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 23:16:20 -0000 Author: pjd Date: Thu Feb 18 23:16:19 2010 New Revision: 204076 URL: http://svn.freebsd.org/changeset/base/204076 Log: Please welcome HAST - Highly Avalable Storage. HAST allows to transparently store data on two physically separated machines connected over the TCP/IP network. HAST works in Primary-Secondary (Master-Backup, Master-Slave) configuration, which means that only one of the cluster nodes can be active at any given time. Only Primary node is able to handle I/O requests to HAST-managed devices. Currently HAST is limited to two cluster nodes in total. HAST operates on block level - it provides disk-like devices in /dev/hast/ directory for use by file systems and/or applications. Working on block level makes it transparent for file systems and applications. There in no difference between using HAST-provided device and raw disk, partition, etc. All of them are just regular GEOM providers in FreeBSD. For more information please consult hastd(8), hastctl(8) and hast.conf(5) manual pages, as well as http://wiki.FreeBSD.org/HAST. Sponsored by: FreeBSD Foundation Sponsored by: OMCnet Internet Service GmbH Sponsored by: TransIP BV Added: head/etc/rc.d/hastd (contents, props changed) head/sbin/hastctl/ head/sbin/hastctl/Makefile (contents, props changed) head/sbin/hastctl/hastctl.8 (contents, props changed) head/sbin/hastctl/hastctl.c (contents, props changed) head/sbin/hastd/ head/sbin/hastd/Makefile (contents, props changed) head/sbin/hastd/activemap.c (contents, props changed) head/sbin/hastd/activemap.h (contents, props changed) head/sbin/hastd/control.c (contents, props changed) head/sbin/hastd/control.h (contents, props changed) head/sbin/hastd/ebuf.c (contents, props changed) head/sbin/hastd/ebuf.h (contents, props changed) head/sbin/hastd/hast.conf.5 (contents, props changed) head/sbin/hastd/hast.h (contents, props changed) head/sbin/hastd/hast_proto.c (contents, props changed) head/sbin/hastd/hast_proto.h (contents, props changed) head/sbin/hastd/hastd.8 (contents, props changed) head/sbin/hastd/hastd.c (contents, props changed) head/sbin/hastd/hastd.h (contents, props changed) head/sbin/hastd/hooks.c (contents, props changed) head/sbin/hastd/hooks.h (contents, props changed) head/sbin/hastd/metadata.c (contents, props changed) head/sbin/hastd/metadata.h (contents, props changed) head/sbin/hastd/nv.c (contents, props changed) head/sbin/hastd/nv.h (contents, props changed) head/sbin/hastd/parse.y (contents, props changed) head/sbin/hastd/pjdlog.c (contents, props changed) head/sbin/hastd/pjdlog.h (contents, props changed) head/sbin/hastd/primary.c (contents, props changed) head/sbin/hastd/proto.c (contents, props changed) head/sbin/hastd/proto.h (contents, props changed) head/sbin/hastd/proto_common.c (contents, props changed) head/sbin/hastd/proto_impl.h (contents, props changed) head/sbin/hastd/proto_socketpair.c (contents, props changed) head/sbin/hastd/proto_tcp4.c (contents, props changed) head/sbin/hastd/proto_uds.c (contents, props changed) head/sbin/hastd/rangelock.c (contents, props changed) head/sbin/hastd/rangelock.h (contents, props changed) head/sbin/hastd/secondary.c (contents, props changed) head/sbin/hastd/subr.c (contents, props changed) head/sbin/hastd/subr.h (contents, props changed) head/sbin/hastd/synch.h (contents, props changed) head/sbin/hastd/token.l (contents, props changed) head/share/examples/hast/ head/share/examples/hast/ucarp.sh (contents, props changed) head/share/examples/hast/ucarp_down.sh (contents, props changed) head/share/examples/hast/ucarp_up.sh (contents, props changed) head/share/examples/hast/vip-down.sh (contents, props changed) head/share/examples/hast/vip-up.sh (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/rc.d/Makefile head/sbin/Makefile head/sbin/ggate/ggatec/ggatec.c head/sbin/ggate/ggatel/ggatel.c head/share/examples/Makefile head/share/man/man5/rc.conf.5 head/sys/geom/gate/g_gate.c head/sys/geom/gate/g_gate.h Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Thu Feb 18 23:04:01 2010 (r204075) +++ head/etc/defaults/rc.conf Thu Feb 18 23:16:19 2010 (r204076) @@ -260,6 +260,9 @@ syslogd_flags="-s" # Flags to syslogd ( inetd_enable="NO" # Run the network daemon dispatcher (YES/NO). inetd_program="/usr/sbin/inetd" # path to inetd, if you want a different one. inetd_flags="-wW -C 60" # Optional flags to inetd +hastd_enable="NO" # Run the HAST daemon (YES/NO). +hastd_program="/sbin/hastd" # path to hastd, if you want a different one. +hastd_flags="" # Optional flags to hastd. # # named. It may be possible to run named in a sandbox, man security for # details. Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Thu Feb 18 23:04:01 2010 (r204075) +++ head/etc/rc.d/Makefile Thu Feb 18 23:16:19 2010 (r204076) @@ -12,7 +12,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI encswap \ faith fsck ftp-proxy ftpd \ gbde geli geli2 gssd \ - hcsecd \ + hastd hcsecd \ hostapd hostid hostid_save hostname \ inetd initrandom \ ip6addrctl ipfilter ipfs ipfw ipmon \ Added: head/etc/rc.d/hastd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/hastd Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: hastd +# REQUIRE: NETWORKING syslogd +# BEFORE: DAEMON + +. /etc/rc.subr + +name="hastd" +rcvar=`set_rcvar` +pidfile="/var/run/${name}.pid" +command="/sbin/${name}" +hastctl="/sbin/hastctl" +required_files="/etc/hast.conf" +stop_precmd="hastd_stop_precmd" +required_modules="geom_gate:g_gate" + +sockfile="/var/run/syslogd.sockets" +evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" +altlog_proglist="named" + +hastd_stop_precmd() +{ + ${hastctl} role init all +} + +load_rc_config $name +run_rc_command "$1" Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Thu Feb 18 23:04:01 2010 (r204075) +++ head/sbin/Makefile Thu Feb 18 23:16:19 2010 (r204076) @@ -36,6 +36,8 @@ SUBDIR= adjkerntz \ ggate \ growfs \ gvinum \ + hastctl \ + hastd \ ifconfig \ init \ ${_ipf} \ Modified: head/sbin/ggate/ggatec/ggatec.c ============================================================================== --- head/sbin/ggate/ggatec/ggatec.c Thu Feb 18 23:04:01 2010 (r204075) +++ head/sbin/ggate/ggatec/ggatec.c Thu Feb 18 23:16:19 2010 (r204076) @@ -59,7 +59,7 @@ enum { UNSET, CREATE, DESTROY, LIST, RES static const char *path = NULL; static const char *host = NULL; -static int unit = -1; +static int unit = G_GATE_UNIT_AUTO; static unsigned flags = 0; static int force = 0; static unsigned queue_size = G_GATE_QUEUE_SIZE; Modified: head/sbin/ggate/ggatel/ggatel.c ============================================================================== --- head/sbin/ggate/ggatel/ggatel.c Thu Feb 18 23:04:01 2010 (r204075) +++ head/sbin/ggate/ggatel/ggatel.c Thu Feb 18 23:16:19 2010 (r204076) @@ -50,7 +50,7 @@ enum { UNSET, CREATE, DESTROY, LIST, RESCUE } action = UNSET; static const char *path = NULL; -static int unit = -1; +static int unit = G_GATE_UNIT_AUTO; static unsigned flags = 0; static int force = 0; static unsigned queue_size = G_GATE_QUEUE_SIZE; Added: head/sbin/hastctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/hastctl/Makefile Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,36 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../hastd + +PROG= hastctl +SRCS= activemap.c +SRCS+= ebuf.c +SRCS+= hast_proto.c hastctl.c +SRCS+= metadata.c +SRCS+= nv.c +SRCS+= parse.y pjdlog.c +SRCS+= proto.c proto_common.c proto_tcp4.c proto_uds.c +SRCS+= token.l +SRCS+= subr.c +SRCS+= y.tab.h +WARNS?= 6 +MAN= hastctl.8 + +CFLAGS+=-I${.CURDIR}/../hastd +CFLAGS+=-DINET +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif +# This is needed to have WARNS > 1. +CFLAGS+=-DYY_NO_UNPUT + +DPADD= ${LIBCRYPTO} ${LIBL} +LDADD= -lcrypto -ll + +YFLAGS+=-v + +CLEANFILES=y.tab.c y.tab.h y.output + +.include Added: head/sbin/hastctl/hastctl.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/hastctl/hastctl.8 Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,217 @@ +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Pawel Jakub Dawidek under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 1, 2010 +.Dt HASTCTL 8 +.Os +.Sh NAME +.Nm hastctl +.Nd "Highly Available Storage control utility" +.Sh SYNOPSIS +.Nm +.Cm create +.Op Fl d +.Op Fl c Ar config +.Op Fl e Ar extentsize +.Op Fl k Ar keepdirty +.Op Fl m Ar mediasize +.Ar name ... +.Nm +.Cm role +.Op Fl d +.Op Fl c Ar config +.Aq init | primary | secondary +.Ar all | name ... +.Nm +.Cm status +.Op Fl d +.Op Fl c Ar config +.Op Ar all | name ... +.Nm +.Cm dump +.Op Fl d +.Op Fl c Ar config +.Op Ar all | name ... +.Sh DESCRIPTION +The +.Nm +utility is used to control the behaviour of the +.Xr hastd 8 +daemon. +.Pp +This utility should be used by HA software like +.Nm heartbeat +or +.Nm ucarp +to setup HAST resources role when changing from primary mode to +secondary or vice versa. +Be aware that if a file system like UFS exists on HAST provider and +primary node dies, file system has to be checked for inconsistencies +with the +.Xr fsck 8 +utility after switching secondary node to primary role. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm create" +.It Cm create +Initialize local provider configured for the given resource. +Additional options include: +.Bl -tag -width ".Fl e Ar extentsize" +.It Fl e Ar extentsize +Size of an extent. +Extent is a block which is used for synchronization. +.Nm +maintains a map of dirty extents and extent is the smallest region that +can be marked as dirty. +If any part of an extent is modified, entire extent will be synchronized +when nodes connect. +If extent size is too small, there will be too much disk activity +related to dirty map updates, which will degrade performance of the +given resource. +If extent size is too large, synchronization, even in case of short +outage, can take a long time increasing the risk of loosing up-to-date +node before synchronization process is completed. +The default extent size is +.Va 2MB . +.It Fl k Ar keepdirty +Maximum number of dirty extents to keep dirty all the time. +Most recently used extents are kept dirty to reduce number of metadata +updates. +The default numer of most recently used extents which will be kept +dirty is +.Va 64 . +.It Fl m Ar mediasize +Size of the smaller provider used as backend storage on both nodes. +This option can be omitted if node providers have the same size on both +sides. +.El +.It Cm role +Change role of the given resource. +The role can be one of: +.Bl -tag -width ".Cm secondary" +.It Cm init +Resource is turned off. +.It Cm primary +Local +.Xr hastd 8 +daemon will act as primary node for the given resource. +System on which resource role is set to primary can use +.Pa /dev/hast/ +GEOM provider. +.It Cm secondary +Local +.Xr hastd 8 +daemon will act as secondary node for the given resource - it will wait +for connection from the primary node and will handle I/O requests +received from it. +GEOM provider +.Pa /dev/hast/ +will not be created on secondary node. +.El +.It Cm status +Present status of the configured resources. +.It Cm dump +Dump metadata stored on local component for the configured resources. +.El +.Pp +In addition, every subcommand can be followed by the following options: +.Bl -tag -width ".Fl c Ar config" +.It Fl c Ar config +Specify alternative location of the configuration file. +The default location is +.Pa /etc/hast.conf . +.It Fl d +Print debugging information. +This option can be specified multiple times to raise the verbosity +level. +.El +.Sh EXIT STATUS +Exit status is 0 on success, or one of the values described in +.Xr sysexits 3 +on failure. +.Sh EXAMPLES +Initialize HAST provider, create file system on it and mount it. +.Bd -literal -offset indent +nodeB# hastctl create shared +nodeB# hastd +nodeB# hastctl role secondary shared + +nodeB# hastctl create shared +nodeA# hastd +nodeA# hastctl role primary shared +nodeA# newfs -U /dev/hast/shared +nodeA# mount -o noatime /dev/hast/shared /shared +nodeA# application_start +.Ed +.Pp +Switch roles for the +.Nm shared +HAST resource. +.Bd -literal -offset indent +nodeA# application_stop +nodeA# umount -f /shared +nodeA# hastctl role secondary shared + +nodeB# hastctl role primary shared +nodeB# fsck -t ufs /dev/hast/shared +nodeB# mount -o noatime /dev/hast/shared /shared +nodeB# application_start +.Ed +.Sh FILES +.Bl -tag -width ".Pa /var/run/hastctl" -compact +.It Pa /etc/hast.conf +Configuration file for +.Nm +and +.Xr hastd 8 . +.It Pa /var/run/hastctl +Control socket used by +.Nm +to communicate with the +.Xr hastd 8 +daemon. +.El +.Sh SEE ALSO +.Xr sysexits 3 , +.Xr geom 4 , +.Xr hast.conf 5 , +.Xr fsck 8 , +.Xr ggatec 8 , +.Xr ggatel 8 , +.Xr hastd 8 , +.Xr mount 8 , +.Xr newfs 8 . +.Sh AUTHORS +The +.Nm +was developed by +.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org +under sponsorship of the FreeBSD Foundation. Added: head/sbin/hastctl/hastctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/hastctl/hastctl.c Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,526 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "hast.h" +#include "hast_proto.h" +#include "metadata.h" +#include "nv.h" +#include "pjdlog.h" +#include "proto.h" +#include "subr.h" + +/* Path to configuration file. */ +static const char *cfgpath = HAST_CONFIG; +/* Hastd configuration. */ +static struct hastd_config *cfg; +/* Control connection. */ +static struct proto_conn *controlconn; + +enum { + CMD_INVALID, + CMD_CREATE, + CMD_ROLE, + CMD_STATUS, + CMD_DUMP +}; + +static __dead2 void +usage(void) +{ + + fprintf(stderr, + "usage: %s create [-d] [-c config] [-e extentsize] [-k keepdirty]\n" + "\t\t[-m mediasize] name ...\n", + getprogname()); + fprintf(stderr, + " %s role [-d] [-c config] all | name ...\n", + getprogname()); + fprintf(stderr, + " %s status [-d] [-c config] [all | name ...]\n", + getprogname()); + fprintf(stderr, + " %s dump [-d] [-c config] [all | name ...]\n", + getprogname()); + exit(EX_USAGE); +} + +static int +create_one(struct hast_resource *res, intmax_t mediasize, intmax_t extentsize, + intmax_t keepdirty) +{ + unsigned char *buf; + size_t mapsize; + int ec; + + ec = 0; + pjdlog_prefix_set("[%s] ", res->hr_name); + + if (provinfo(res, true) < 0) { + ec = EX_NOINPUT; + goto end; + } + if (mediasize == 0) + mediasize = res->hr_local_mediasize; + else if (mediasize > res->hr_local_mediasize) { + pjdlog_error("Provided mediasize is larger than provider %s size.", + res->hr_localpath); + ec = EX_DATAERR; + goto end; + } + if (!powerof2(res->hr_local_sectorsize)) { + pjdlog_error("Sector size of provider %s is not power of 2 (%u).", + res->hr_localpath, res->hr_local_sectorsize); + ec = EX_DATAERR; + goto end; + } + if (extentsize == 0) + extentsize = HAST_EXTENTSIZE; + if (extentsize < res->hr_local_sectorsize) { + pjdlog_error("Extent size (%jd) is less than sector size (%u).", + (intmax_t)extentsize, res->hr_local_sectorsize); + ec = EX_DATAERR; + goto end; + } + if ((extentsize % res->hr_local_sectorsize) != 0) { + pjdlog_error("Extent size (%jd) is not multiple of sector size (%u).", + (intmax_t)extentsize, res->hr_local_sectorsize); + ec = EX_DATAERR; + goto end; + } + mapsize = activemap_calc_ondisk_size(mediasize - METADATA_SIZE, + extentsize, res->hr_local_sectorsize); + if (keepdirty == 0) + keepdirty = HAST_KEEPDIRTY; + res->hr_datasize = mediasize - METADATA_SIZE - mapsize; + res->hr_extentsize = extentsize; + res->hr_keepdirty = keepdirty; + + res->hr_localoff = METADATA_SIZE + mapsize; + + if (metadata_write(res) < 0) { + ec = EX_IOERR; + goto end; + } + buf = calloc(1, mapsize); + if (buf == NULL) { + pjdlog_error("Unable to allocate %zu bytes of memory for initial bitmap.", + mapsize); + ec = EX_TEMPFAIL; + goto end; + } + if (pwrite(res->hr_localfd, buf, mapsize, METADATA_SIZE) != + (ssize_t)mapsize) { + pjdlog_errno(LOG_ERR, "Unable to store initial bitmap on %s", + res->hr_localpath); + free(buf); + ec = EX_IOERR; + goto end; + } + free(buf); +end: + if (res->hr_localfd >= 0) + close(res->hr_localfd); + pjdlog_prefix_set("%s", ""); + return (ec); +} + +static void +control_create(int argc, char *argv[], intmax_t mediasize, intmax_t extentsize, + intmax_t keepdirty) +{ + struct hast_resource *res; + int ec, ii, ret; + + /* Initialize the given resources. */ + if (argc < 1) + usage(); + ec = 0; + for (ii = 0; ii < argc; ii++) { + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { + if (strcmp(argv[ii], res->hr_name) == 0) + break; + } + if (res == NULL) { + pjdlog_error("Unknown resource %s.", argv[ii]); + if (ec == 0) + ec = EX_DATAERR; + continue; + } + ret = create_one(res, mediasize, extentsize, keepdirty); + if (ret != 0 && ec == 0) + ec = ret; + } + exit(ec); +} + +static int +dump_one(struct hast_resource *res) +{ + int ret; + + ret = metadata_read(res, false); + if (ret != 0) + return (ret); + + printf("resource: %s\n", res->hr_name); + printf(" datasize: %ju\n", (uintmax_t)res->hr_datasize); + printf(" extentsize: %d\n", res->hr_extentsize); + printf(" keepdirty: %d\n", res->hr_keepdirty); + printf(" localoff: %ju\n", (uintmax_t)res->hr_localoff); + printf(" resuid: %ju\n", (uintmax_t)res->hr_resuid); + printf(" localcnt: %ju\n", (uintmax_t)res->hr_primary_localcnt); + printf(" remotecnt: %ju\n", (uintmax_t)res->hr_primary_remotecnt); + printf(" prevrole: %s\n", role2str(res->hr_previous_role)); + + return (0); +} + +static void +control_dump(int argc, char *argv[]) +{ + struct hast_resource *res; + int ec, ret; + + /* Dump metadata of the given resource(s). */ + + ec = 0; + if (argc == 0 || (argc == 1 && strcmp(argv[0], "all") == 0)) { + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { + ret = dump_one(res); + if (ret != 0 && ec == 0) + ec = ret; + } + } else { + int ii; + + for (ii = 0; ii < argc; ii++) { + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { + if (strcmp(argv[ii], res->hr_name) == 0) + break; + } + if (res == NULL) { + pjdlog_error("Unknown resource %s.", argv[ii]); + if (ec == 0) + ec = EX_DATAERR; + continue; + } + ret = dump_one(res); + if (ret != 0 && ec == 0) + ec = ret; + } + } + exit(ec); +} + +static int +control_set_role(struct nv *nv, const char *newrole) +{ + const char *res, *oldrole; + unsigned int ii; + int error, ret; + + ret = 0; + + for (ii = 0; ; ii++) { + res = nv_get_string(nv, "resource%u", ii); + if (res == NULL) + break; + pjdlog_prefix_set("[%s] ", res); + error = nv_get_int16(nv, "error%u", ii); + if (error != 0) { + if (ret == 0) + ret = error; + pjdlog_warning("Received error %d from hastd.", error); + continue; + } + oldrole = nv_get_string(nv, "role%u", ii); + if (strcmp(oldrole, newrole) == 0) + pjdlog_debug(2, "Role unchanged (%s).", oldrole); + else { + pjdlog_debug(1, "Role changed from %s to %s.", oldrole, + newrole); + } + } + pjdlog_prefix_set("%s", ""); + return (ret); +} + +static int +control_status(struct nv *nv) +{ + unsigned int ii; + const char *str; + int error, ret; + + ret = 0; + + for (ii = 0; ; ii++) { + str = nv_get_string(nv, "resource%u", ii); + if (str == NULL) + break; + printf("%s:\n", str); + error = nv_get_int16(nv, "error%u", ii); + if (error != 0) { + if (ret == 0) + ret = error; + printf(" error: %d\n", error); + continue; + } + printf(" role: %s\n", nv_get_string(nv, "role%u", ii)); + printf(" provname: %s\n", + nv_get_string(nv, "provname%u", ii)); + printf(" localpath: %s\n", + nv_get_string(nv, "localpath%u", ii)); + printf(" extentsize: %u\n", + (unsigned int)nv_get_uint32(nv, "extentsize%u", ii)); + printf(" keepdirty: %u\n", + (unsigned int)nv_get_uint32(nv, "keepdirty%u", ii)); + printf(" remoteaddr: %s\n", + nv_get_string(nv, "remoteaddr%u", ii)); + printf(" replication: %s\n", + nv_get_string(nv, "replication%u", ii)); + str = nv_get_string(nv, "status%u", ii); + if (str != NULL) + printf(" status: %s\n", str); + printf(" dirty: %ju bytes\n", + (uintmax_t)nv_get_uint64(nv, "dirty%u", ii)); + } + return (ret); +} + +static int +numfromstr(const char *str, intmax_t *nump) +{ + intmax_t num; + char *suffix; + int rerrno; + + rerrno = errno; + errno = 0; + num = strtoimax(str, &suffix, 0); + if (errno == 0 && *suffix != '\0') + errno = EINVAL; + if (errno != 0) + return (-1); + *nump = num; + errno = rerrno; + return (0); +} + +int +main(int argc, char *argv[]) +{ + struct nv *nv; + intmax_t mediasize, extentsize, keepdirty; + int cmd, debug, error, ii; + const char *optstr; + + debug = 0; + mediasize = extentsize = keepdirty = 0; + + if (argc == 1) + usage(); + + if (strcmp(argv[1], "create") == 0) { + cmd = CMD_CREATE; + optstr = "c:de:k:m:h"; + } else if (strcmp(argv[1], "role") == 0) { + cmd = CMD_ROLE; + optstr = "c:dh"; + } else if (strcmp(argv[1], "status") == 0) { + cmd = CMD_STATUS; + optstr = "c:dh"; + } else if (strcmp(argv[1], "dump") == 0) { + cmd = CMD_DUMP; + optstr = "c:dh"; + } else + usage(); + + argc--; + argv++; + + for (;;) { + int ch; + + ch = getopt(argc, argv, optstr); + if (ch == -1) + break; + switch (ch) { + case 'c': + cfgpath = optarg; + break; + case 'd': + debug++; + break; + case 'e': + if (numfromstr(optarg, &extentsize) < 0) + err(1, "Invalid extentsize"); + break; + case 'k': + if (numfromstr(optarg, &keepdirty) < 0) + err(1, "Invalid keepdirty"); + break; + case 'm': + if (numfromstr(optarg, &mediasize) < 0) + err(1, "Invalid mediasize"); + break; + case 'h': + default: + usage(); + } + } + argc -= optind; + argv += optind; + + switch (cmd) { + case CMD_CREATE: + case CMD_ROLE: + if (argc == 0) + usage(); + break; + } + + pjdlog_debug_set(debug); + + cfg = yy_config_parse(cfgpath); + assert(cfg != NULL); + + switch (cmd) { + case CMD_CREATE: + control_create(argc, argv, mediasize, extentsize, keepdirty); + /* NOTREACHED */ + assert(!"What are we doing here?!"); + break; + case CMD_DUMP: + /* Dump metadata from local component of the given resource. */ + control_dump(argc, argv); + /* NOTREACHED */ + assert(!"What are we doing here?!"); + break; + case CMD_ROLE: + /* Change role for the given resources. */ + if (argc < 2) + usage(); + nv = nv_alloc(); + nv_add_uint8(nv, HASTCTL_CMD_SETROLE, "cmd"); + if (strcmp(argv[0], "init") == 0) + nv_add_uint8(nv, HAST_ROLE_INIT, "role"); + else if (strcmp(argv[0], "primary") == 0) + nv_add_uint8(nv, HAST_ROLE_PRIMARY, "role"); + else if (strcmp(argv[0], "secondary") == 0) + nv_add_uint8(nv, HAST_ROLE_SECONDARY, "role"); + else + usage(); + for (ii = 0; ii < argc - 1; ii++) + nv_add_string(nv, argv[ii + 1], "resource%d", ii); + break; + case CMD_STATUS: + /* Obtain status of the given resources. */ + nv = nv_alloc(); + nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); + if (argc == 0) + nv_add_string(nv, "all", "resource%d", 0); + else { + for (ii = 0; ii < argc; ii++) + nv_add_string(nv, argv[ii], "resource%d", ii); + } + break; + default: + assert(!"Impossible role!"); + } + + /* Setup control connection... */ + if (proto_client(cfg->hc_controladdr, &controlconn) < 0) { + pjdlog_exit(EX_OSERR, + "Unable to setup control connection to %s", + cfg->hc_controladdr); + } + /* ...and connect to hastd. */ + if (proto_connect(controlconn) < 0) { + pjdlog_exit(EX_OSERR, "Unable to connect to hastd via %s", + cfg->hc_controladdr); + } + /* Send the command to the server... */ + if (hast_proto_send(NULL, controlconn, nv, NULL, 0) < 0) { + pjdlog_exit(EX_UNAVAILABLE, + "Unable to send command to hastd via %s", + cfg->hc_controladdr); + } + nv_free(nv); + /* ...and receive reply. */ + if (hast_proto_recv(NULL, controlconn, &nv, NULL, 0) < 0) { + pjdlog_exit(EX_UNAVAILABLE, + "cannot receive reply from hastd via %s", + cfg->hc_controladdr); + } + + error = nv_get_int16(nv, "error"); + if (error != 0) { + pjdlog_exitx(EX_SOFTWARE, "Error %d received from hastd.", + error); + } + nv_set_error(nv, 0); + + switch (cmd) { + case CMD_ROLE: + error = control_set_role(nv, argv[0]); + break; + case CMD_STATUS: + error = control_status(nv); + break; + default: + assert(!"Impossible role!"); + } + + exit(error); +} Added: head/sbin/hastd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/hastd/Makefile Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +.include + +PROG= hastd +SRCS= activemap.c +SRCS+= control.c +SRCS+= ebuf.c +SRCS+= hast_proto.c hastd.c hooks.c +SRCS+= metadata.c +SRCS+= nv.c +SRCS+= secondary.c +SRCS+= parse.y pjdlog.c primary.c +SRCS+= proto.c proto_common.c proto_socketpair.c proto_tcp4.c proto_uds.c +SRCS+= rangelock.c +SRCS+= subr.c +SRCS+= token.l +SRCS+= y.tab.h +WARNS?= 6 +MAN= hastd.8 hast.conf.5 + +CFLAGS+=-I${.CURDIR} +CFLAGS+=-DINET +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif +# This is needed to have WARNS > 1. +CFLAGS+=-DYY_NO_UNPUT + +DPADD= ${LIBCRYPTO} ${LIBGEOM} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lcrypto -lgeom -ll -lpthread -lutil + +YFLAGS+=-v + +CLEANFILES=y.tab.c y.tab.h y.output + +.include Added: head/sbin/hastd/activemap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/hastd/activemap.c Thu Feb 18 23:16:19 2010 (r204076) @@ -0,0 +1,691 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include /* powerof2() */ +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define ACTIVEMAP_MAGIC 0xac71e4 +struct activemap { + int am_magic; /* Magic value. */ + off_t am_mediasize; /* Media size in bytes. */ + uint32_t am_extentsize; /* Extent size in bytes, + must be power of 2. */ + uint8_t am_extentshift;/* 2 ^ extentbits == extentsize */ + int am_nextents; /* Number of extents. */ + size_t am_mapsize; /* Bitmap size in bytes. */ + uint16_t *am_memtab; /* An array that holds number of pending + writes per extent. */ + bitstr_t *am_diskmap; /* On-disk bitmap of dirty extents. */ + bitstr_t *am_memmap; /* In-memory bitmap of dirty extents. */ + size_t am_diskmapsize; /* Map size rounded up to sector size. */ + uint64_t am_ndirty; /* Number of dirty regions. */ + bitstr_t *am_syncmap; /* Bitmap of extents to sync. */ + off_t am_syncoff; /* Next synchronization offset. */ + TAILQ_HEAD(skeepdirty, keepdirty) am_keepdirty; /* List of extents that + we keep dirty to reduce bitmap + updates. */ + int am_nkeepdirty; /* Number of am_keepdirty elements. */ + int am_nkeepdirty_limit; /* Maximum number of am_keepdirty + elements. */ +}; + +struct keepdirty { + int kd_extent; + TAILQ_ENTRY(keepdirty) kd_next; +}; + +/* + * Helper function taken from sys/systm.h to calculate extentshift. + */ +static uint32_t *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 23:20:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF06106566C; Thu, 18 Feb 2010 23:20:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4BD8FC12; Thu, 18 Feb 2010 23:20:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1INKFPo008684; Thu, 18 Feb 2010 23:20:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1INKF5R008682; Thu, 18 Feb 2010 23:20:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002182320.o1INKF5R008682@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Feb 2010 23:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204077 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 23:20:15 -0000 Author: pjd Date: Thu Feb 18 23:20:15 2010 New Revision: 204077 URL: http://svn.freebsd.org/changeset/base/204077 Log: Remove some lines left over by accident. Modified: head/etc/rc.d/hastd Modified: head/etc/rc.d/hastd ============================================================================== --- head/etc/rc.d/hastd Thu Feb 18 23:16:19 2010 (r204076) +++ head/etc/rc.d/hastd Thu Feb 18 23:20:15 2010 (r204077) @@ -18,10 +18,6 @@ required_files="/etc/hast.conf" stop_precmd="hastd_stop_precmd" required_modules="geom_gate:g_gate" -sockfile="/var/run/syslogd.sockets" -evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" -altlog_proglist="named" - hastd_stop_precmd() { ${hastctl} role init all From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 23:22:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25F23106566C; Thu, 18 Feb 2010 23:22:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B269E8FC1B; Thu, 18 Feb 2010 23:22:31 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 63FB246B03; Thu, 18 Feb 2010 18:22:31 -0500 (EST) Date: Thu, 18 Feb 2010 23:22:31 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek In-Reply-To: <201002182316.o1INGKqf007786@svn.freebsd.org> Message-ID: References: <201002182316.o1INGKqf007786@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204076 - in head: etc/defaults etc/rc.d sbin sbin/ggate/ggatec sbin/ggate/ggatel sbin/hastctl sbin/hastd share/examples share/examples/hast share/man/man5 sys/geom/gate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 23:22:32 -0000 On Thu, 18 Feb 2010, Pawel Jakub Dawidek wrote: > Please welcome HAST - Highly Avalable Storage. Excellent news! I know a number of shops will be very excited to see this in the tree. Could you say a little about the future of ggated in light of the new arrival? Robert > > HAST allows to transparently store data on two physically separated machines > connected over the TCP/IP network. HAST works in Primary-Secondary > (Master-Backup, Master-Slave) configuration, which means that only one of the > cluster nodes can be active at any given time. Only Primary node is able to > handle I/O requests to HAST-managed devices. Currently HAST is limited to two > cluster nodes in total. > > HAST operates on block level - it provides disk-like devices in /dev/hast/ > directory for use by file systems and/or applications. Working on block level > makes it transparent for file systems and applications. There in no difference > between using HAST-provided device and raw disk, partition, etc. All of them > are just regular GEOM providers in FreeBSD. > > For more information please consult hastd(8), hastctl(8) and hast.conf(5) > manual pages, as well as http://wiki.FreeBSD.org/HAST. > > Sponsored by: FreeBSD Foundation > Sponsored by: OMCnet Internet Service GmbH > Sponsored by: TransIP BV > > Added: > head/etc/rc.d/hastd (contents, props changed) > head/sbin/hastctl/ > head/sbin/hastctl/Makefile (contents, props changed) > head/sbin/hastctl/hastctl.8 (contents, props changed) > head/sbin/hastctl/hastctl.c (contents, props changed) > head/sbin/hastd/ > head/sbin/hastd/Makefile (contents, props changed) > head/sbin/hastd/activemap.c (contents, props changed) > head/sbin/hastd/activemap.h (contents, props changed) > head/sbin/hastd/control.c (contents, props changed) > head/sbin/hastd/control.h (contents, props changed) > head/sbin/hastd/ebuf.c (contents, props changed) > head/sbin/hastd/ebuf.h (contents, props changed) > head/sbin/hastd/hast.conf.5 (contents, props changed) > head/sbin/hastd/hast.h (contents, props changed) > head/sbin/hastd/hast_proto.c (contents, props changed) > head/sbin/hastd/hast_proto.h (contents, props changed) > head/sbin/hastd/hastd.8 (contents, props changed) > head/sbin/hastd/hastd.c (contents, props changed) > head/sbin/hastd/hastd.h (contents, props changed) > head/sbin/hastd/hooks.c (contents, props changed) > head/sbin/hastd/hooks.h (contents, props changed) > head/sbin/hastd/metadata.c (contents, props changed) > head/sbin/hastd/metadata.h (contents, props changed) > head/sbin/hastd/nv.c (contents, props changed) > head/sbin/hastd/nv.h (contents, props changed) > head/sbin/hastd/parse.y (contents, props changed) > head/sbin/hastd/pjdlog.c (contents, props changed) > head/sbin/hastd/pjdlog.h (contents, props changed) > head/sbin/hastd/primary.c (contents, props changed) > head/sbin/hastd/proto.c (contents, props changed) > head/sbin/hastd/proto.h (contents, props changed) > head/sbin/hastd/proto_common.c (contents, props changed) > head/sbin/hastd/proto_impl.h (contents, props changed) > head/sbin/hastd/proto_socketpair.c (contents, props changed) > head/sbin/hastd/proto_tcp4.c (contents, props changed) > head/sbin/hastd/proto_uds.c (contents, props changed) > head/sbin/hastd/rangelock.c (contents, props changed) > head/sbin/hastd/rangelock.h (contents, props changed) > head/sbin/hastd/secondary.c (contents, props changed) > head/sbin/hastd/subr.c (contents, props changed) > head/sbin/hastd/subr.h (contents, props changed) > head/sbin/hastd/synch.h (contents, props changed) > head/sbin/hastd/token.l (contents, props changed) > head/share/examples/hast/ > head/share/examples/hast/ucarp.sh (contents, props changed) > head/share/examples/hast/ucarp_down.sh (contents, props changed) > head/share/examples/hast/ucarp_up.sh (contents, props changed) > head/share/examples/hast/vip-down.sh (contents, props changed) > head/share/examples/hast/vip-up.sh (contents, props changed) > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/Makefile > head/sbin/Makefile > head/sbin/ggate/ggatec/ggatec.c > head/sbin/ggate/ggatel/ggatel.c > head/share/examples/Makefile > head/share/man/man5/rc.conf.5 > head/sys/geom/gate/g_gate.c > head/sys/geom/gate/g_gate.h > > Modified: head/etc/defaults/rc.conf > ============================================================================== > --- head/etc/defaults/rc.conf Thu Feb 18 23:04:01 2010 (r204075) > +++ head/etc/defaults/rc.conf Thu Feb 18 23:16:19 2010 (r204076) > @@ -260,6 +260,9 @@ syslogd_flags="-s" # Flags to syslogd ( > inetd_enable="NO" # Run the network daemon dispatcher (YES/NO). > inetd_program="/usr/sbin/inetd" # path to inetd, if you want a different one. > inetd_flags="-wW -C 60" # Optional flags to inetd > +hastd_enable="NO" # Run the HAST daemon (YES/NO). > +hastd_program="/sbin/hastd" # path to hastd, if you want a different one. > +hastd_flags="" # Optional flags to hastd. > # > # named. It may be possible to run named in a sandbox, man security for > # details. > > Modified: head/etc/rc.d/Makefile > ============================================================================== > --- head/etc/rc.d/Makefile Thu Feb 18 23:04:01 2010 (r204075) > +++ head/etc/rc.d/Makefile Thu Feb 18 23:16:19 2010 (r204076) > @@ -12,7 +12,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI > encswap \ > faith fsck ftp-proxy ftpd \ > gbde geli geli2 gssd \ > - hcsecd \ > + hastd hcsecd \ > hostapd hostid hostid_save hostname \ > inetd initrandom \ > ip6addrctl ipfilter ipfs ipfw ipmon \ > > Added: head/etc/rc.d/hastd > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/rc.d/hastd Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,31 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# PROVIDE: hastd > +# REQUIRE: NETWORKING syslogd > +# BEFORE: DAEMON > + > +. /etc/rc.subr > + > +name="hastd" > +rcvar=`set_rcvar` > +pidfile="/var/run/${name}.pid" > +command="/sbin/${name}" > +hastctl="/sbin/hastctl" > +required_files="/etc/hast.conf" > +stop_precmd="hastd_stop_precmd" > +required_modules="geom_gate:g_gate" > + > +sockfile="/var/run/syslogd.sockets" > +evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" > +altlog_proglist="named" > + > +hastd_stop_precmd() > +{ > + ${hastctl} role init all > +} > + > +load_rc_config $name > +run_rc_command "$1" > > Modified: head/sbin/Makefile > ============================================================================== > --- head/sbin/Makefile Thu Feb 18 23:04:01 2010 (r204075) > +++ head/sbin/Makefile Thu Feb 18 23:16:19 2010 (r204076) > @@ -36,6 +36,8 @@ SUBDIR= adjkerntz \ > ggate \ > growfs \ > gvinum \ > + hastctl \ > + hastd \ > ifconfig \ > init \ > ${_ipf} \ > > Modified: head/sbin/ggate/ggatec/ggatec.c > ============================================================================== > --- head/sbin/ggate/ggatec/ggatec.c Thu Feb 18 23:04:01 2010 (r204075) > +++ head/sbin/ggate/ggatec/ggatec.c Thu Feb 18 23:16:19 2010 (r204076) > @@ -59,7 +59,7 @@ enum { UNSET, CREATE, DESTROY, LIST, RES > > static const char *path = NULL; > static const char *host = NULL; > -static int unit = -1; > +static int unit = G_GATE_UNIT_AUTO; > static unsigned flags = 0; > static int force = 0; > static unsigned queue_size = G_GATE_QUEUE_SIZE; > > Modified: head/sbin/ggate/ggatel/ggatel.c > ============================================================================== > --- head/sbin/ggate/ggatel/ggatel.c Thu Feb 18 23:04:01 2010 (r204075) > +++ head/sbin/ggate/ggatel/ggatel.c Thu Feb 18 23:16:19 2010 (r204076) > @@ -50,7 +50,7 @@ > enum { UNSET, CREATE, DESTROY, LIST, RESCUE } action = UNSET; > > static const char *path = NULL; > -static int unit = -1; > +static int unit = G_GATE_UNIT_AUTO; > static unsigned flags = 0; > static int force = 0; > static unsigned queue_size = G_GATE_QUEUE_SIZE; > > Added: head/sbin/hastctl/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/hastctl/Makefile Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,36 @@ > +# $FreeBSD$ > + > +.include > + > +.PATH: ${.CURDIR}/../hastd > + > +PROG= hastctl > +SRCS= activemap.c > +SRCS+= ebuf.c > +SRCS+= hast_proto.c hastctl.c > +SRCS+= metadata.c > +SRCS+= nv.c > +SRCS+= parse.y pjdlog.c > +SRCS+= proto.c proto_common.c proto_tcp4.c proto_uds.c > +SRCS+= token.l > +SRCS+= subr.c > +SRCS+= y.tab.h > +WARNS?= 6 > +MAN= hastctl.8 > + > +CFLAGS+=-I${.CURDIR}/../hastd > +CFLAGS+=-DINET > +.if ${MK_INET6_SUPPORT} != "no" > +CFLAGS+=-DINET6 > +.endif > +# This is needed to have WARNS > 1. > +CFLAGS+=-DYY_NO_UNPUT > + > +DPADD= ${LIBCRYPTO} ${LIBL} > +LDADD= -lcrypto -ll > + > +YFLAGS+=-v > + > +CLEANFILES=y.tab.c y.tab.h y.output > + > +.include > > Added: head/sbin/hastctl/hastctl.8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/hastctl/hastctl.8 Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,217 @@ > +.\" Copyright (c) 2010 The FreeBSD Foundation > +.\" All rights reserved. > +.\" > +.\" This software was developed by Pawel Jakub Dawidek under sponsorship from > +.\" the FreeBSD Foundation. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd February 1, 2010 > +.Dt HASTCTL 8 > +.Os > +.Sh NAME > +.Nm hastctl > +.Nd "Highly Available Storage control utility" > +.Sh SYNOPSIS > +.Nm > +.Cm create > +.Op Fl d > +.Op Fl c Ar config > +.Op Fl e Ar extentsize > +.Op Fl k Ar keepdirty > +.Op Fl m Ar mediasize > +.Ar name ... > +.Nm > +.Cm role > +.Op Fl d > +.Op Fl c Ar config > +.Aq init | primary | secondary > +.Ar all | name ... > +.Nm > +.Cm status > +.Op Fl d > +.Op Fl c Ar config > +.Op Ar all | name ... > +.Nm > +.Cm dump > +.Op Fl d > +.Op Fl c Ar config > +.Op Ar all | name ... > +.Sh DESCRIPTION > +The > +.Nm > +utility is used to control the behaviour of the > +.Xr hastd 8 > +daemon. > +.Pp > +This utility should be used by HA software like > +.Nm heartbeat > +or > +.Nm ucarp > +to setup HAST resources role when changing from primary mode to > +secondary or vice versa. > +Be aware that if a file system like UFS exists on HAST provider and > +primary node dies, file system has to be checked for inconsistencies > +with the > +.Xr fsck 8 > +utility after switching secondary node to primary role. > +.Pp > +The first argument to > +.Nm > +indicates an action to be performed: > +.Bl -tag -width ".Cm create" > +.It Cm create > +Initialize local provider configured for the given resource. > +Additional options include: > +.Bl -tag -width ".Fl e Ar extentsize" > +.It Fl e Ar extentsize > +Size of an extent. > +Extent is a block which is used for synchronization. > +.Nm > +maintains a map of dirty extents and extent is the smallest region that > +can be marked as dirty. > +If any part of an extent is modified, entire extent will be synchronized > +when nodes connect. > +If extent size is too small, there will be too much disk activity > +related to dirty map updates, which will degrade performance of the > +given resource. > +If extent size is too large, synchronization, even in case of short > +outage, can take a long time increasing the risk of loosing up-to-date > +node before synchronization process is completed. > +The default extent size is > +.Va 2MB . > +.It Fl k Ar keepdirty > +Maximum number of dirty extents to keep dirty all the time. > +Most recently used extents are kept dirty to reduce number of metadata > +updates. > +The default numer of most recently used extents which will be kept > +dirty is > +.Va 64 . > +.It Fl m Ar mediasize > +Size of the smaller provider used as backend storage on both nodes. > +This option can be omitted if node providers have the same size on both > +sides. > +.El > +.It Cm role > +Change role of the given resource. > +The role can be one of: > +.Bl -tag -width ".Cm secondary" > +.It Cm init > +Resource is turned off. > +.It Cm primary > +Local > +.Xr hastd 8 > +daemon will act as primary node for the given resource. > +System on which resource role is set to primary can use > +.Pa /dev/hast/ > +GEOM provider. > +.It Cm secondary > +Local > +.Xr hastd 8 > +daemon will act as secondary node for the given resource - it will wait > +for connection from the primary node and will handle I/O requests > +received from it. > +GEOM provider > +.Pa /dev/hast/ > +will not be created on secondary node. > +.El > +.It Cm status > +Present status of the configured resources. > +.It Cm dump > +Dump metadata stored on local component for the configured resources. > +.El > +.Pp > +In addition, every subcommand can be followed by the following options: > +.Bl -tag -width ".Fl c Ar config" > +.It Fl c Ar config > +Specify alternative location of the configuration file. > +The default location is > +.Pa /etc/hast.conf . > +.It Fl d > +Print debugging information. > +This option can be specified multiple times to raise the verbosity > +level. > +.El > +.Sh EXIT STATUS > +Exit status is 0 on success, or one of the values described in > +.Xr sysexits 3 > +on failure. > +.Sh EXAMPLES > +Initialize HAST provider, create file system on it and mount it. > +.Bd -literal -offset indent > +nodeB# hastctl create shared > +nodeB# hastd > +nodeB# hastctl role secondary shared > + > +nodeB# hastctl create shared > +nodeA# hastd > +nodeA# hastctl role primary shared > +nodeA# newfs -U /dev/hast/shared > +nodeA# mount -o noatime /dev/hast/shared /shared > +nodeA# application_start > +.Ed > +.Pp > +Switch roles for the > +.Nm shared > +HAST resource. > +.Bd -literal -offset indent > +nodeA# application_stop > +nodeA# umount -f /shared > +nodeA# hastctl role secondary shared > + > +nodeB# hastctl role primary shared > +nodeB# fsck -t ufs /dev/hast/shared > +nodeB# mount -o noatime /dev/hast/shared /shared > +nodeB# application_start > +.Ed > +.Sh FILES > +.Bl -tag -width ".Pa /var/run/hastctl" -compact > +.It Pa /etc/hast.conf > +Configuration file for > +.Nm > +and > +.Xr hastd 8 . > +.It Pa /var/run/hastctl > +Control socket used by > +.Nm > +to communicate with the > +.Xr hastd 8 > +daemon. > +.El > +.Sh SEE ALSO > +.Xr sysexits 3 , > +.Xr geom 4 , > +.Xr hast.conf 5 , > +.Xr fsck 8 , > +.Xr ggatec 8 , > +.Xr ggatel 8 , > +.Xr hastd 8 , > +.Xr mount 8 , > +.Xr newfs 8 . > +.Sh AUTHORS > +The > +.Nm > +was developed by > +.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org > +under sponsorship of the FreeBSD Foundation. > > Added: head/sbin/hastctl/hastctl.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/hastctl/hastctl.c Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,526 @@ > +/*- > + * Copyright (c) 2009-2010 The FreeBSD Foundation > + * All rights reserved. > + * > + * This software was developed by Pawel Jakub Dawidek under sponsorship from > + * the FreeBSD Foundation. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#include "hast.h" > +#include "hast_proto.h" > +#include "metadata.h" > +#include "nv.h" > +#include "pjdlog.h" > +#include "proto.h" > +#include "subr.h" > + > +/* Path to configuration file. */ > +static const char *cfgpath = HAST_CONFIG; > +/* Hastd configuration. */ > +static struct hastd_config *cfg; > +/* Control connection. */ > +static struct proto_conn *controlconn; > + > +enum { > + CMD_INVALID, > + CMD_CREATE, > + CMD_ROLE, > + CMD_STATUS, > + CMD_DUMP > +}; > + > +static __dead2 void > +usage(void) > +{ > + > + fprintf(stderr, > + "usage: %s create [-d] [-c config] [-e extentsize] [-k keepdirty]\n" > + "\t\t[-m mediasize] name ...\n", > + getprogname()); > + fprintf(stderr, > + " %s role [-d] [-c config] all | name ...\n", > + getprogname()); > + fprintf(stderr, > + " %s status [-d] [-c config] [all | name ...]\n", > + getprogname()); > + fprintf(stderr, > + " %s dump [-d] [-c config] [all | name ...]\n", > + getprogname()); > + exit(EX_USAGE); > +} > + > +static int > +create_one(struct hast_resource *res, intmax_t mediasize, intmax_t extentsize, > + intmax_t keepdirty) > +{ > + unsigned char *buf; > + size_t mapsize; > + int ec; > + > + ec = 0; > + pjdlog_prefix_set("[%s] ", res->hr_name); > + > + if (provinfo(res, true) < 0) { > + ec = EX_NOINPUT; > + goto end; > + } > + if (mediasize == 0) > + mediasize = res->hr_local_mediasize; > + else if (mediasize > res->hr_local_mediasize) { > + pjdlog_error("Provided mediasize is larger than provider %s size.", > + res->hr_localpath); > + ec = EX_DATAERR; > + goto end; > + } > + if (!powerof2(res->hr_local_sectorsize)) { > + pjdlog_error("Sector size of provider %s is not power of 2 (%u).", > + res->hr_localpath, res->hr_local_sectorsize); > + ec = EX_DATAERR; > + goto end; > + } > + if (extentsize == 0) > + extentsize = HAST_EXTENTSIZE; > + if (extentsize < res->hr_local_sectorsize) { > + pjdlog_error("Extent size (%jd) is less than sector size (%u).", > + (intmax_t)extentsize, res->hr_local_sectorsize); > + ec = EX_DATAERR; > + goto end; > + } > + if ((extentsize % res->hr_local_sectorsize) != 0) { > + pjdlog_error("Extent size (%jd) is not multiple of sector size (%u).", > + (intmax_t)extentsize, res->hr_local_sectorsize); > + ec = EX_DATAERR; > + goto end; > + } > + mapsize = activemap_calc_ondisk_size(mediasize - METADATA_SIZE, > + extentsize, res->hr_local_sectorsize); > + if (keepdirty == 0) > + keepdirty = HAST_KEEPDIRTY; > + res->hr_datasize = mediasize - METADATA_SIZE - mapsize; > + res->hr_extentsize = extentsize; > + res->hr_keepdirty = keepdirty; > + > + res->hr_localoff = METADATA_SIZE + mapsize; > + > + if (metadata_write(res) < 0) { > + ec = EX_IOERR; > + goto end; > + } > + buf = calloc(1, mapsize); > + if (buf == NULL) { > + pjdlog_error("Unable to allocate %zu bytes of memory for initial bitmap.", > + mapsize); > + ec = EX_TEMPFAIL; > + goto end; > + } > + if (pwrite(res->hr_localfd, buf, mapsize, METADATA_SIZE) != > + (ssize_t)mapsize) { > + pjdlog_errno(LOG_ERR, "Unable to store initial bitmap on %s", > + res->hr_localpath); > + free(buf); > + ec = EX_IOERR; > + goto end; > + } > + free(buf); > +end: > + if (res->hr_localfd >= 0) > + close(res->hr_localfd); > + pjdlog_prefix_set("%s", ""); > + return (ec); > +} > + > +static void > +control_create(int argc, char *argv[], intmax_t mediasize, intmax_t extentsize, > + intmax_t keepdirty) > +{ > + struct hast_resource *res; > + int ec, ii, ret; > + > + /* Initialize the given resources. */ > + if (argc < 1) > + usage(); > + ec = 0; > + for (ii = 0; ii < argc; ii++) { > + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { > + if (strcmp(argv[ii], res->hr_name) == 0) > + break; > + } > + if (res == NULL) { > + pjdlog_error("Unknown resource %s.", argv[ii]); > + if (ec == 0) > + ec = EX_DATAERR; > + continue; > + } > + ret = create_one(res, mediasize, extentsize, keepdirty); > + if (ret != 0 && ec == 0) > + ec = ret; > + } > + exit(ec); > +} > + > +static int > +dump_one(struct hast_resource *res) > +{ > + int ret; > + > + ret = metadata_read(res, false); > + if (ret != 0) > + return (ret); > + > + printf("resource: %s\n", res->hr_name); > + printf(" datasize: %ju\n", (uintmax_t)res->hr_datasize); > + printf(" extentsize: %d\n", res->hr_extentsize); > + printf(" keepdirty: %d\n", res->hr_keepdirty); > + printf(" localoff: %ju\n", (uintmax_t)res->hr_localoff); > + printf(" resuid: %ju\n", (uintmax_t)res->hr_resuid); > + printf(" localcnt: %ju\n", (uintmax_t)res->hr_primary_localcnt); > + printf(" remotecnt: %ju\n", (uintmax_t)res->hr_primary_remotecnt); > + printf(" prevrole: %s\n", role2str(res->hr_previous_role)); > + > + return (0); > +} > + > +static void > +control_dump(int argc, char *argv[]) > +{ > + struct hast_resource *res; > + int ec, ret; > + > + /* Dump metadata of the given resource(s). */ > + > + ec = 0; > + if (argc == 0 || (argc == 1 && strcmp(argv[0], "all") == 0)) { > + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { > + ret = dump_one(res); > + if (ret != 0 && ec == 0) > + ec = ret; > + } > + } else { > + int ii; > + > + for (ii = 0; ii < argc; ii++) { > + TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { > + if (strcmp(argv[ii], res->hr_name) == 0) > + break; > + } > + if (res == NULL) { > + pjdlog_error("Unknown resource %s.", argv[ii]); > + if (ec == 0) > + ec = EX_DATAERR; > + continue; > + } > + ret = dump_one(res); > + if (ret != 0 && ec == 0) > + ec = ret; > + } > + } > + exit(ec); > +} > + > +static int > +control_set_role(struct nv *nv, const char *newrole) > +{ > + const char *res, *oldrole; > + unsigned int ii; > + int error, ret; > + > + ret = 0; > + > + for (ii = 0; ; ii++) { > + res = nv_get_string(nv, "resource%u", ii); > + if (res == NULL) > + break; > + pjdlog_prefix_set("[%s] ", res); > + error = nv_get_int16(nv, "error%u", ii); > + if (error != 0) { > + if (ret == 0) > + ret = error; > + pjdlog_warning("Received error %d from hastd.", error); > + continue; > + } > + oldrole = nv_get_string(nv, "role%u", ii); > + if (strcmp(oldrole, newrole) == 0) > + pjdlog_debug(2, "Role unchanged (%s).", oldrole); > + else { > + pjdlog_debug(1, "Role changed from %s to %s.", oldrole, > + newrole); > + } > + } > + pjdlog_prefix_set("%s", ""); > + return (ret); > +} > + > +static int > +control_status(struct nv *nv) > +{ > + unsigned int ii; > + const char *str; > + int error, ret; > + > + ret = 0; > + > + for (ii = 0; ; ii++) { > + str = nv_get_string(nv, "resource%u", ii); > + if (str == NULL) > + break; > + printf("%s:\n", str); > + error = nv_get_int16(nv, "error%u", ii); > + if (error != 0) { > + if (ret == 0) > + ret = error; > + printf(" error: %d\n", error); > + continue; > + } > + printf(" role: %s\n", nv_get_string(nv, "role%u", ii)); > + printf(" provname: %s\n", > + nv_get_string(nv, "provname%u", ii)); > + printf(" localpath: %s\n", > + nv_get_string(nv, "localpath%u", ii)); > + printf(" extentsize: %u\n", > + (unsigned int)nv_get_uint32(nv, "extentsize%u", ii)); > + printf(" keepdirty: %u\n", > + (unsigned int)nv_get_uint32(nv, "keepdirty%u", ii)); > + printf(" remoteaddr: %s\n", > + nv_get_string(nv, "remoteaddr%u", ii)); > + printf(" replication: %s\n", > + nv_get_string(nv, "replication%u", ii)); > + str = nv_get_string(nv, "status%u", ii); > + if (str != NULL) > + printf(" status: %s\n", str); > + printf(" dirty: %ju bytes\n", > + (uintmax_t)nv_get_uint64(nv, "dirty%u", ii)); > + } > + return (ret); > +} > + > +static int > +numfromstr(const char *str, intmax_t *nump) > +{ > + intmax_t num; > + char *suffix; > + int rerrno; > + > + rerrno = errno; > + errno = 0; > + num = strtoimax(str, &suffix, 0); > + if (errno == 0 && *suffix != '\0') > + errno = EINVAL; > + if (errno != 0) > + return (-1); > + *nump = num; > + errno = rerrno; > + return (0); > +} > + > +int > +main(int argc, char *argv[]) > +{ > + struct nv *nv; > + intmax_t mediasize, extentsize, keepdirty; > + int cmd, debug, error, ii; > + const char *optstr; > + > + debug = 0; > + mediasize = extentsize = keepdirty = 0; > + > + if (argc == 1) > + usage(); > + > + if (strcmp(argv[1], "create") == 0) { > + cmd = CMD_CREATE; > + optstr = "c:de:k:m:h"; > + } else if (strcmp(argv[1], "role") == 0) { > + cmd = CMD_ROLE; > + optstr = "c:dh"; > + } else if (strcmp(argv[1], "status") == 0) { > + cmd = CMD_STATUS; > + optstr = "c:dh"; > + } else if (strcmp(argv[1], "dump") == 0) { > + cmd = CMD_DUMP; > + optstr = "c:dh"; > + } else > + usage(); > + > + argc--; > + argv++; > + > + for (;;) { > + int ch; > + > + ch = getopt(argc, argv, optstr); > + if (ch == -1) > + break; > + switch (ch) { > + case 'c': > + cfgpath = optarg; > + break; > + case 'd': > + debug++; > + break; > + case 'e': > + if (numfromstr(optarg, &extentsize) < 0) > + err(1, "Invalid extentsize"); > + break; > + case 'k': > + if (numfromstr(optarg, &keepdirty) < 0) > + err(1, "Invalid keepdirty"); > + break; > + case 'm': > + if (numfromstr(optarg, &mediasize) < 0) > + err(1, "Invalid mediasize"); > + break; > + case 'h': > + default: > + usage(); > + } > + } > + argc -= optind; > + argv += optind; > + > + switch (cmd) { > + case CMD_CREATE: > + case CMD_ROLE: > + if (argc == 0) > + usage(); > + break; > + } > + > + pjdlog_debug_set(debug); > + > + cfg = yy_config_parse(cfgpath); > + assert(cfg != NULL); > + > + switch (cmd) { > + case CMD_CREATE: > + control_create(argc, argv, mediasize, extentsize, keepdirty); > + /* NOTREACHED */ > + assert(!"What are we doing here?!"); > + break; > + case CMD_DUMP: > + /* Dump metadata from local component of the given resource. */ > + control_dump(argc, argv); > + /* NOTREACHED */ > + assert(!"What are we doing here?!"); > + break; > + case CMD_ROLE: > + /* Change role for the given resources. */ > + if (argc < 2) > + usage(); > + nv = nv_alloc(); > + nv_add_uint8(nv, HASTCTL_CMD_SETROLE, "cmd"); > + if (strcmp(argv[0], "init") == 0) > + nv_add_uint8(nv, HAST_ROLE_INIT, "role"); > + else if (strcmp(argv[0], "primary") == 0) > + nv_add_uint8(nv, HAST_ROLE_PRIMARY, "role"); > + else if (strcmp(argv[0], "secondary") == 0) > + nv_add_uint8(nv, HAST_ROLE_SECONDARY, "role"); > + else > + usage(); > + for (ii = 0; ii < argc - 1; ii++) > + nv_add_string(nv, argv[ii + 1], "resource%d", ii); > + break; > + case CMD_STATUS: > + /* Obtain status of the given resources. */ > + nv = nv_alloc(); > + nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); > + if (argc == 0) > + nv_add_string(nv, "all", "resource%d", 0); > + else { > + for (ii = 0; ii < argc; ii++) > + nv_add_string(nv, argv[ii], "resource%d", ii); > + } > + break; > + default: > + assert(!"Impossible role!"); > + } > + > + /* Setup control connection... */ > + if (proto_client(cfg->hc_controladdr, &controlconn) < 0) { > + pjdlog_exit(EX_OSERR, > + "Unable to setup control connection to %s", > + cfg->hc_controladdr); > + } > + /* ...and connect to hastd. */ > + if (proto_connect(controlconn) < 0) { > + pjdlog_exit(EX_OSERR, "Unable to connect to hastd via %s", > + cfg->hc_controladdr); > + } > + /* Send the command to the server... */ > + if (hast_proto_send(NULL, controlconn, nv, NULL, 0) < 0) { > + pjdlog_exit(EX_UNAVAILABLE, > + "Unable to send command to hastd via %s", > + cfg->hc_controladdr); > + } > + nv_free(nv); > + /* ...and receive reply. */ > + if (hast_proto_recv(NULL, controlconn, &nv, NULL, 0) < 0) { > + pjdlog_exit(EX_UNAVAILABLE, > + "cannot receive reply from hastd via %s", > + cfg->hc_controladdr); > + } > + > + error = nv_get_int16(nv, "error"); > + if (error != 0) { > + pjdlog_exitx(EX_SOFTWARE, "Error %d received from hastd.", > + error); > + } > + nv_set_error(nv, 0); > + > + switch (cmd) { > + case CMD_ROLE: > + error = control_set_role(nv, argv[0]); > + break; > + case CMD_STATUS: > + error = control_status(nv); > + break; > + default: > + assert(!"Impossible role!"); > + } > + > + exit(error); > +} > > Added: head/sbin/hastd/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/hastd/Makefile Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,37 @@ > +# $FreeBSD$ > + > +.include > + > +PROG= hastd > +SRCS= activemap.c > +SRCS+= control.c > +SRCS+= ebuf.c > +SRCS+= hast_proto.c hastd.c hooks.c > +SRCS+= metadata.c > +SRCS+= nv.c > +SRCS+= secondary.c > +SRCS+= parse.y pjdlog.c primary.c > +SRCS+= proto.c proto_common.c proto_socketpair.c proto_tcp4.c proto_uds.c > +SRCS+= rangelock.c > +SRCS+= subr.c > +SRCS+= token.l > +SRCS+= y.tab.h > +WARNS?= 6 > +MAN= hastd.8 hast.conf.5 > + > +CFLAGS+=-I${.CURDIR} > +CFLAGS+=-DINET > +.if ${MK_INET6_SUPPORT} != "no" > +CFLAGS+=-DINET6 > +.endif > +# This is needed to have WARNS > 1. > +CFLAGS+=-DYY_NO_UNPUT > + > +DPADD= ${LIBCRYPTO} ${LIBGEOM} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} > +LDADD= -lcrypto -lgeom -ll -lpthread -lutil > + > +YFLAGS+=-v > + > +CLEANFILES=y.tab.c y.tab.h y.output > + > +.include > > Added: head/sbin/hastd/activemap.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/hastd/activemap.c Thu Feb 18 23:16:19 2010 (r204076) > @@ -0,0 +1,691 @@ > +/*- > + * Copyright (c) 2009-2010 The FreeBSD Foundation > + * All rights reserved. > + * > + * This software was developed by Pawel Jakub Dawidek under sponsorship from > + * the FreeBSD Foundation. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include /* powerof2() */ > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define ACTIVEMAP_MAGIC 0xac71e4 > +struct activemap { > + int am_magic; /* Magic value. */ > + off_t am_mediasize; /* Media size in bytes. */ > + uint32_t am_extentsize; /* Extent size in bytes, > + must be power of 2. */ > + uint8_t am_extentshift;/* 2 ^ extentbits == extentsize */ > + int am_nextents; /* Number of extents. */ > + size_t am_mapsize; /* Bitmap size in bytes. */ > + uint16_t *am_memtab; /* An array that holds number of pending > + writes per extent. */ > + bitstr_t *am_diskmap; /* On-disk bitmap of dirty extents. */ > + bitstr_t *am_memmap; /* In-memory bitmap of dirty extents. */ > + size_t am_diskmapsize; /* Map size rounded up to sector size. */ > + uint64_t am_ndirty; /* Number of dirty regions. */ > + bitstr_t *am_syncmap; /* Bitmap of extents to sync. */ > + off_t am_syncoff; /* Next synchronization offset. */ > + TAILQ_HEAD(skeepdirty, keepdirty) am_keepdirty; /* List of extents that > + we keep dirty to reduce bitmap > + updates. */ > + int am_nkeepdirty; /* Number of am_keepdirty elements. */ > + int am_nkeepdirty_limit; /* Maximum number of am_keepdirty > + elements. */ > +}; > + > +struct keepdirty { > + int kd_extent; > + TAILQ_ENTRY(keepdirty) kd_next; > +}; > + > +/* > + * Helper function taken from sys/systm.h to calculate extentshift. > + */ > +static uint32_t > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 02:25:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C47A1065694 for ; Fri, 19 Feb 2010 02:25:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id B040D8FC19 for ; Fri, 19 Feb 2010 02:25:43 +0000 (UTC) Received: (qmail 11913 invoked by uid 399); 19 Feb 2010 02:25:41 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 Feb 2010 02:25:41 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B7DF6A4.2030408@FreeBSD.org> Date: Thu, 18 Feb 2010 18:25:40 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100123 Thunderbird/3.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201002182320.o1INKF5R008682@svn.freebsd.org> In-Reply-To: <201002182320.o1INKF5R008682@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204077 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 02:25:44 -0000 On 02/18/10 15:20, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Thu Feb 18 23:20:15 2010 > New Revision: 204077 > URL: http://svn.freebsd.org/changeset/base/204077 > > Log: > Remove some lines left over by accident. If this script is starting a persistent service it should have KEYWORD: SHUTDOWN added after BEFORE. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 02:34:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48AE41065679; Fri, 19 Feb 2010 02:34:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EDFE8FC1B; Fri, 19 Feb 2010 02:34:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1J2YQvD051511; Fri, 19 Feb 2010 02:34:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1J2YQUX051509; Fri, 19 Feb 2010 02:34:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002190234.o1J2YQUX051509@svn.freebsd.org> From: Xin LI Date: Fri, 19 Feb 2010 02:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204080 - head/etc/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 02:34:26 -0000 Author: delphij Date: Fri Feb 19 02:34:25 2010 New Revision: 204080 URL: http://svn.freebsd.org/changeset/base/204080 Log: Create a directory for hast's examples. Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri Feb 19 01:13:37 2010 (r204079) +++ head/etc/mtree/BSD.usr.dist Fri Feb 19 02:34:25 2010 (r204080) @@ -215,6 +215,8 @@ .. find_interface .. + hast + .. hostapd .. ibcs2 From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 03:36:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93DD5106566C; Fri, 19 Feb 2010 03:36:02 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8300A8FC0A; Fri, 19 Feb 2010 03:36:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1J3a2p2065266; Fri, 19 Feb 2010 03:36:02 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1J3a2lP065264; Fri, 19 Feb 2010 03:36:02 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201002190336.o1J3a2lP065264@svn.freebsd.org> From: Weongyo Jeong Date: Fri, 19 Feb 2010 03:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204081 - head/sys/dev/bwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 03:36:02 -0000 Author: weongyo Date: Fri Feb 19 03:36:02 2010 New Revision: 204081 URL: http://svn.freebsd.org/changeset/base/204081 Log: o print msgs with length if the frame is too short to pass to net80211. o print key index for debugging if the frame is attempted to decrypt for WEP, AES or TKIP though currently HW decryption isn't supported. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Fri Feb 19 02:34:25 2010 (r204080) +++ head/sys/dev/bwn/if_bwn.c Fri Feb 19 03:36:02 2010 (r204081) @@ -9416,19 +9416,24 @@ bwn_rxeof(struct bwn_mac *mac, struct mb padding = (macstat & BWN_RX_MAC_PADDING) ? 2 : 0; if (m->m_pkthdr.len < (sizeof(struct bwn_plcp6) + padding)) { - device_printf(sc->sc_dev, "RX: Packet size underrun (1)\n"); + device_printf(sc->sc_dev, "frame too short (length=%d)\n", + m->m_pkthdr.len); goto drop; } plcp = (struct bwn_plcp6 *)(mp + padding); m_adj(m, sizeof(struct bwn_plcp6) + padding); if (m->m_pkthdr.len < IEEE80211_MIN_LEN) { - device_printf(sc->sc_dev, "RX: Packet size underrun (2)\n"); + device_printf(sc->sc_dev, "frame too short (length=%d)\n", + m->m_pkthdr.len); goto drop; } wh = mtod(m, struct ieee80211_frame_min *); if (macstat & BWN_RX_MAC_DEC) - device_printf(sc->sc_dev, "TODO: BWN_RX_MAC_DEC\n"); + device_printf(sc->sc_dev, + "RX decryption attempted (old %d keyidx %#x)\n", + BWN_ISOLDFMT(mac), + (macstat & BWN_RX_MAC_KEYIDX) >> BWN_RX_MAC_KEYIDX_SHIFT); /* XXX calculating RSSI & noise & antenna */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 04:37:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B7961065670; Fri, 19 Feb 2010 04:37:55 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED2908FC13; Fri, 19 Feb 2010 04:37:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1J4bswM078818; Fri, 19 Feb 2010 04:37:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1J4bskr078816; Fri, 19 Feb 2010 04:37:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002190437.o1J4bskr078816@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 19 Feb 2010 04:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204082 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 04:37:55 -0000 Author: nwhitehorn Date: Fri Feb 19 04:37:54 2010 New Revision: 204082 URL: http://svn.freebsd.org/changeset/base/204082 Log: Allow the SMU driver to read a variety of hardware sensors (possible questions on the thermal calibration), and to read and set fan RPMs from software. While here, fix a number of bugs. Calibration code from: OpenBSD MFC after: 2 weeks Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Fri Feb 19 03:36:02 2010 (r204081) +++ head/sys/powerpc/powermac/smu.c Fri Feb 19 04:37:54 2010 (r204082) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -46,11 +47,30 @@ __FBSDID("$FreeBSD$"); #include struct smu_cmd { - uint8_t cmd; + volatile uint8_t cmd; uint8_t len; uint8_t data[254]; }; +struct smu_fan { + cell_t reg; + cell_t min_rpm; + cell_t max_rpm; + cell_t unmanaged_rpm; + char location[32]; +}; + +struct smu_sensor { + cell_t reg; + char location[32]; + enum { + SMU_CURRENT_SENSOR, + SMU_VOLTAGE_SENSOR, + SMU_POWER_SENSOR, + SMU_TEMP_SENSOR + } type; +}; + struct smu_softc { device_t sc_dev; struct mtx sc_mtx; @@ -65,6 +85,23 @@ struct smu_softc { struct smu_cmd *sc_cmd; bus_addr_t sc_cmd_phys; bus_dmamap_t sc_cmd_dmamap; + + struct smu_fan *sc_fans; + int sc_nfans; + struct smu_sensor *sc_sensors; + int sc_nsensors; + + /* Calibration data */ + uint16_t sc_cpu_diode_scale; + int16_t sc_cpu_diode_offset; + + uint16_t sc_cpu_volt_scale; + int16_t sc_cpu_volt_offset; + uint16_t sc_cpu_curr_scale; + int16_t sc_cpu_curr_offset; + + uint16_t sc_slots_pow_scale; + int16_t sc_slots_pow_offset; }; /* regular bus attachment functions */ @@ -77,6 +114,12 @@ static int smu_attach(device_t); static void smu_cpufreq_pre_change(device_t, const struct cf_level *level); static void smu_cpufreq_post_change(device_t, const struct cf_level *level); +/* utility functions */ +static int smu_get_datablock(device_t dev, int8_t id, uint8_t *buf, + size_t len); +static void smu_attach_fans(device_t dev, phandle_t fanroot); +static void smu_attach_sensors(device_t dev, phandle_t sensroot); + /* where to find the doorbell GPIO */ static device_t smu_doorbell = NULL; @@ -97,11 +140,31 @@ static driver_t smu_driver = { static devclass_t smu_devclass; DRIVER_MODULE(smu, nexus, smu_driver, smu_devclass, 0, 0); +MALLOC_DEFINE(M_SMU, "smu", "SMU Sensor Information"); -#define SMU_MAILBOX 0x860c +#define SMU_MAILBOX 0x8000860c /* Command types */ -#define SMU_POWER 0xaa +#define SMU_ADC 0xd8 +#define SMU_FAN 0x4a +#define SMU_I2C 0x9a +#define SMU_I2C_SIMPLE 0x00 +#define SMU_I2C_NORMAL 0x01 +#define SMU_I2C_COMBINED 0x02 +#define SMU_MISC 0xee +#define SMU_MISC_GET_DATA 0x02 +#define SMU_POWER 0xaa + +/* Data blocks */ +#define SMU_CPUTEMP_CAL 0x18 +#define SMU_CPUVOLT_CAL 0x21 +#define SMU_SLOTPW_CAL 0x78 + +/* Partitions */ +#define SMU_PARTITION 0x3e +#define SMU_PARTITION_LATEST 0x01 +#define SMU_PARTITION_BASE 0x02 +#define SMU_PARTITION_UPDATE 0x03 static int smu_probe(device_t dev) @@ -127,6 +190,8 @@ static int smu_attach(device_t dev) { struct smu_softc *sc; + phandle_t node, child; + uint8_t data[12]; sc = device_get_softc(dev); @@ -139,7 +204,7 @@ smu_attach(device_t dev) bus_dma_tag_create(NULL, 16, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, PAGE_SIZE, 1, PAGE_SIZE, 0, NULL, NULL, &(sc->sc_dmatag)); - sc->sc_bt = &bs_be_tag; + sc->sc_bt = &bs_le_tag; bus_space_map(sc->sc_bt, SMU_MAILBOX, 4, 0, &sc->sc_mailbox); /* @@ -159,6 +224,40 @@ smu_attach(device_t dev) EVENTHANDLER_REGISTER(cpufreq_post_change, smu_cpufreq_post_change, dev, EVENTHANDLER_PRI_ANY); + /* + * Detect and attach child devices. + */ + node = ofw_bus_get_node(dev); + for (child = OF_child(node); child != 0; child = OF_peer(child)) { + char name[32]; + memset(name, 0, sizeof(name)); + OF_getprop(child, "name", name, sizeof(name)); + + if (strncmp(name, "rpm-fans", 9) == 0 || + strncmp(name, "fans", 5) == 0) + smu_attach_fans(dev, child); + + if (strncmp(name, "sensors", 8) == 0) + smu_attach_sensors(dev, child); + } + + /* + * Collect calibration constants. + */ + smu_get_datablock(dev, SMU_CPUTEMP_CAL, data, sizeof(data)); + sc->sc_cpu_diode_scale = (data[4] << 8) + data[5]; + sc->sc_cpu_diode_offset = (data[6] << 8) + data[7]; + + smu_get_datablock(dev, SMU_CPUVOLT_CAL, data, sizeof(data)); + sc->sc_cpu_volt_scale = (data[4] << 8) + data[5]; + sc->sc_cpu_volt_offset = (data[6] << 8) + data[7]; + sc->sc_cpu_curr_scale = (data[8] << 8) + data[9]; + sc->sc_cpu_curr_offset = (data[10] << 8) + data[11]; + + smu_get_datablock(dev, SMU_SLOTPW_CAL, data, sizeof(data)); + sc->sc_slots_pow_scale = (data[4] << 8) + data[5]; + sc->sc_slots_pow_offset = (data[6] << 8) + data[7]; + return (0); } @@ -166,19 +265,22 @@ static int smu_run_cmd(device_t dev, struct smu_cmd *cmd) { struct smu_softc *sc; - int doorbell_ack, result; + int doorbell_ack, result, oldpow; sc = device_get_softc(dev); mtx_lock(&sc->sc_mtx); + oldpow = powerpc_pow_enabled; + powerpc_pow_enabled = 0; + /* Copy the command to the mailbox */ memcpy(sc->sc_cmd, cmd, sizeof(*cmd)); bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_PREWRITE); bus_space_write_4(sc->sc_bt, sc->sc_mailbox, 0, sc->sc_cmd_phys); - /* Invalidate the cacheline it is in -- SMU bypasses the cache */ - __asm __volatile("dcbst 0,%0; sync" :: "r"(sc->sc_cmd): "memory"); + /* Flush the cacheline it is in -- SMU bypasses the cache */ + __asm __volatile("sync; dcbf 0,%0; sync" :: "r"(sc->sc_cmd): "memory"); /* Ring SMU doorbell */ macgpio_write(smu_doorbell, GPIO_DDR_OUTPUT); @@ -188,7 +290,7 @@ smu_run_cmd(device_t dev, struct smu_cmd /* XXX: timeout */ DELAY(50); doorbell_ack = macgpio_read(smu_doorbell); - } while (!doorbell_ack); + } while (doorbell_ack != (GPIO_DDR_OUTPUT | GPIO_LEVEL_RO | GPIO_DATA)); /* Check result. First invalidate the cache again... */ __asm __volatile("dcbf 0,%0; sync" :: "r"(sc->sc_cmd) : "memory"); @@ -196,16 +298,49 @@ smu_run_cmd(device_t dev, struct smu_cmd bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_POSTREAD); /* SMU acks the command by inverting the command bits */ - if (sc->sc_cmd->cmd == ~cmd->cmd) + if (sc->sc_cmd->cmd == ((~cmd->cmd) & 0xff)) result = 0; else result = EIO; + powerpc_pow_enabled = oldpow; + + memcpy(cmd->data, sc->sc_cmd->data, sizeof(cmd->data)); + mtx_unlock(&sc->sc_mtx); return (result); } +static int +smu_get_datablock(device_t dev, int8_t id, uint8_t *buf, size_t len) +{ + struct smu_cmd cmd; + uint8_t addr[4]; + + cmd.cmd = SMU_PARTITION; + cmd.len = 2; + cmd.data[0] = SMU_PARTITION_LATEST; + cmd.data[1] = id; + + smu_run_cmd(dev, &cmd); + + addr[0] = addr[1] = 0; + addr[2] = cmd.data[0]; + addr[3] = cmd.data[1]; + + cmd.cmd = SMU_MISC; + cmd.len = 7; + cmd.data[0] = SMU_MISC_GET_DATA; + cmd.data[1] = sizeof(addr); + memcpy(&cmd.data[2], addr, sizeof(addr)); + cmd.data[6] = len; + + smu_run_cmd(dev, &cmd); + memcpy(buf, cmd.data, len); + return (0); +} + static void smu_slew_cpu_voltage(device_t dev, int to) { @@ -286,3 +421,298 @@ doorbell_attach(device_t dev) smu_doorbell = dev; return (0); } + +/* + * Sensor and fan management + */ + +static int +smu_fan_set_rpm(device_t smu, struct smu_fan *fan, int rpm) +{ + struct smu_cmd cmd; + + cmd.cmd = SMU_FAN; + cmd.len = 14; + cmd.data[0] = 0; + cmd.data[1] = 1 << fan->reg; + + /* + * There are two locations used for the fan speed. + * Store it in both. + */ + + cmd.data[2] = cmd.data[2 + 2*fan->reg] = (rpm >> 8) & 0xff; + cmd.data[3] = cmd.data[3 + 2*fan->reg] = rpm & 0xff; + + return (smu_run_cmd(smu, &cmd)); +} + +static int +smu_fan_read_rpm(device_t smu, struct smu_fan *fan) +{ + struct smu_cmd cmd; + + cmd.cmd = SMU_FAN; + cmd.len = 2; + cmd.data[0] = 1; + cmd.data[1] = 1 << fan->reg; + + smu_run_cmd(smu, &cmd); + + return ((cmd.data[1] << 8) | cmd.data[2]); +} + +static int +smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t smu; + struct smu_softc *sc; + struct smu_fan *fan; + int rpm, error; + + smu = arg1; + sc = device_get_softc(smu); + fan = &sc->sc_fans[arg2]; + + rpm = smu_fan_read_rpm(smu, fan); + error = sysctl_handle_int(oidp, &rpm, 0, req); + + if (error || !req->newptr) + return (error); + + + return (smu_fan_set_rpm(smu, fan, rpm)); +} + +static void +smu_attach_fans(device_t dev, phandle_t fanroot) +{ + struct smu_fan *fan; + struct smu_softc *sc; + struct sysctl_oid *oid, *fanroot_oid; + struct sysctl_ctx_list *ctx; + phandle_t child; + char type[32], sysctl_name[32]; + int i; + + sc = device_get_softc(dev); + sc->sc_nfans = 0; + + for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) + sc->sc_nfans++; + + if (sc->sc_nfans == 0) { + device_printf(dev, "WARNING: No fans detected!\n"); + return; + } + + sc->sc_fans = malloc(sc->sc_nfans * sizeof(struct smu_fan), M_SMU, + M_WAITOK | M_ZERO); + + fan = sc->sc_fans; + sc->sc_nfans = 0; + + ctx = device_get_sysctl_ctx(dev); + fanroot_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fans", + CTLFLAG_RD, 0, "SMU Fan Information"); + + for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) { + OF_getprop(child, "device_type", type, sizeof(type)); + if (strcmp(type, "fan-rpm-control") != 0) + continue; + + OF_getprop(child, "reg", &fan->reg, sizeof(cell_t)); + OF_getprop(child, "min-value", &fan->min_rpm, sizeof(cell_t)); + OF_getprop(child, "max-value", &fan->max_rpm, sizeof(cell_t)); + OF_getprop(child, "unmanaged-value", &fan->unmanaged_rpm, + sizeof(cell_t)); + OF_getprop(child, "location", fan->location, + sizeof(fan->location)); + + /* Make sure it is at a safe value initially */ + //smu_fan_set_rpm(dev, fan, fan->unmanaged_rpm); + + /* Add sysctls */ + for (i = 0; i < strlen(fan->location); i++) { + sysctl_name[i] = tolower(fan->location[i]); + if (isspace(sysctl_name[i])) + sysctl_name[i] = '_'; + } + sysctl_name[i] = 0; + + oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "minrpm", + CTLTYPE_INT | CTLFLAG_RD, &fan->min_rpm, sizeof(cell_t), + "Minimum allowed RPM"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "maxrpm", + CTLTYPE_INT | CTLFLAG_RD, &fan->max_rpm, sizeof(cell_t), + "Maximum allowed RPM"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "rpm", + CTLTYPE_INT | CTLFLAG_RW, dev, sc->sc_nfans, + smu_fanrpm_sysctl, "I", "Fan RPM"); + + fan++; + sc->sc_nfans++; + } +} + +static int +smu_sensor_read(device_t smu, struct smu_sensor *sens) +{ + struct smu_cmd cmd; + struct smu_softc *sc; + int64_t value; + + cmd.cmd = SMU_ADC; + cmd.len = 1; + cmd.data[0] = sens->reg; + + smu_run_cmd(smu, &cmd); + + sc = device_get_softc(smu); + value = (cmd.data[0] << 8) | cmd.data[1]; + + switch (sens->type) { + case SMU_TEMP_SENSOR: + value *= sc->sc_cpu_diode_scale; + value >>= 3; + value += ((int64_t)sc->sc_cpu_diode_offset) << 9; + value <<= 1; + + /* Convert from 16.16 fixed point degC into integer C. */ + value *= 15625; + value /= 1024; + value /= 1000000; + break; + case SMU_VOLTAGE_SENSOR: + value *= sc->sc_cpu_volt_scale; + value += sc->sc_cpu_volt_offset; + value <<= 4; + + /* Convert from 16.16 fixed point V into mV. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + case SMU_CURRENT_SENSOR: + value *= sc->sc_cpu_curr_scale; + value += sc->sc_cpu_curr_offset; + value <<= 4; + + /* Convert from 16.16 fixed point A into mA. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + case SMU_POWER_SENSOR: + value *= sc->sc_slots_pow_scale; + value += sc->sc_slots_pow_offset; + value <<= 4; + + /* Convert from 16.16 fixed point W into mW. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + } + + return (value); +} + +static int +smu_sensor_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t smu; + struct smu_softc *sc; + struct smu_sensor *sens; + int value, error; + + smu = arg1; + sc = device_get_softc(smu); + sens = &sc->sc_sensors[arg2]; + + value = smu_sensor_read(smu, sens); + error = sysctl_handle_int(oidp, &value, 0, req); + + return (error); +} + +static void +smu_attach_sensors(device_t dev, phandle_t sensroot) +{ + struct smu_sensor *sens; + struct smu_softc *sc; + struct sysctl_oid *sensroot_oid; + struct sysctl_ctx_list *ctx; + phandle_t child; + char type[32]; + int i; + + sc = device_get_softc(dev); + sc->sc_nsensors = 0; + + for (child = OF_child(sensroot); child != 0; child = OF_peer(child)) + sc->sc_nsensors++; + + if (sc->sc_nsensors == 0) { + device_printf(dev, "WARNING: No sensors detected!\n"); + return; + } + + sc->sc_fans = malloc(sc->sc_nsensors * sizeof(struct smu_sensor), M_SMU, + M_WAITOK | M_ZERO); + + sens = sc->sc_sensors; + sc->sc_nsensors = 0; + + ctx = device_get_sysctl_ctx(dev); + sensroot_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensors", + CTLFLAG_RD, 0, "SMU Sensor Information"); + + for (child = OF_child(sensroot); child != 0; child = OF_peer(child)) { + char sysctl_name[40], sysctl_desc[40]; + const char *units; + + OF_getprop(child, "device_type", type, sizeof(type)); + + if (strcmp(type, "current-sensor") == 0) { + sens->type = SMU_CURRENT_SENSOR; + units = "mA"; + } else if (strcmp(type, "temp-sensor") == 0) { + sens->type = SMU_TEMP_SENSOR; + units = "C"; + } else if (strcmp(type, "voltage-sensor") == 0) { + sens->type = SMU_VOLTAGE_SENSOR; + units = "mV"; + } else if (strcmp(type, "power-sensor") == 0) { + sens->type = SMU_POWER_SENSOR; + units = "mW"; + } else { + continue; + } + + OF_getprop(child, "reg", &sens->reg, sizeof(cell_t)); + OF_getprop(child, "location", sens->location, + sizeof(sens->location)); + + for (i = 0; i < strlen(sens->location); i++) { + sysctl_name[i] = tolower(sens->location[i]); + if (isspace(sysctl_name[i])) + sysctl_name[i] = '_'; + } + sysctl_name[i] = 0; + + sprintf(sysctl_desc,"%s (%s)", sens->location, units); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensroot_oid), OID_AUTO, + sysctl_name, CTLTYPE_INT | CTLFLAG_RD, dev, sc->sc_nsensors, + smu_sensor_sysctl, "I", sysctl_desc); + + sens++; + sc->sc_nsensors++; + } +} + From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 06:11:41 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95915106566B; Fri, 19 Feb 2010 06:11:41 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 4EEE38FC17; Fri, 19 Feb 2010 06:11:40 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id DF7F07E87D; Fri, 19 Feb 2010 17:11:35 +1100 (EST) Message-ID: <4B7E2B94.3090605@freebsd.org> Date: Fri, 19 Feb 2010 17:11:32 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20100105 Thunderbird/3.0 MIME-Version: 1.0 To: Matthew Jacob References: <201002141938.o1EJcRpx065470@svn.freebsd.org> <4B7D4962.8070706@freebsd.org> <4B7D626A.9040301@feral.com> In-Reply-To: <4B7D626A.9040301@feral.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 06:11:41 -0000 Hi Matt, On 02/19/10 02:53, Matthew Jacob wrote: > Just a total swag here, but reduce the openings via camcontrol to < 32, > or even < 16 Thanks for the suggestion. camcontrol doesn't seem able to futz with the mpt controller e.g.: root@server# camcontrol identify da0 -v (pass0:mpt0:0:2:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00 (pass0:mpt0:0:2:0): CAM status: CCB request was invalid However, there does appear to be a relevant sysctl: root@server# sysctl dev.mpt.0 dev.mpt.0.%desc: LSILogic SAS/SATA Adapter dev.mpt.0.%driver: mpt dev.mpt.0.%location: slot=3 function=0 dev.mpt.0.%pnpinfo: vendor=0x1000 device=0x0050 subvendor=0x1000 subdevice=0x3060 class=0x010000 dev.mpt.0.%parent: pci2 dev.mpt.0.debug: 3 dev.mpt.0.role: 1 dev.mpt.0.vol_member_wce: NC dev.mpt.0.vol_queue_depth: 128 dev.mpt.0.vol_resync_rate: 0 dev.mpt.0.nonoptimal_volumes: 0 Setting dev.mpt.0.vol_queue_depth=32, I can still trigger the "mpt0: mpt_cam_event: 0x16" messages by doing an svn up on the src tree. Same if I set depth to 16, so unfortunately it doesn't seem to do help in this case. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 07:56:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B23C106566B; Fri, 19 Feb 2010 07:56:35 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 859498FC0A; Fri, 19 Feb 2010 07:56:34 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C041145D8D; Fri, 19 Feb 2010 08:56:31 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 08E7B456B1; Fri, 19 Feb 2010 08:56:25 +0100 (CET) Date: Fri, 19 Feb 2010 08:56:23 +0100 From: Pawel Jakub Dawidek To: Robert Watson Message-ID: <20100219075623.GB2157@garage.freebsd.pl> References: <201002182316.o1INGKqf007786@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Yylu36WmvOXNoKYn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204076 - in head: etc/defaults etc/rc.d sbin sbin/ggate/ggatec sbin/ggate/ggatel sbin/hastctl sbin/hastd share/examples share/examples/hast share/man/man5 sys/geom/gate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 07:56:35 -0000 --Yylu36WmvOXNoKYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 18, 2010 at 11:22:31PM +0000, Robert Watson wrote: >=20 > On Thu, 18 Feb 2010, Pawel Jakub Dawidek wrote: >=20 > > Please welcome HAST - Highly Avalable Storage. >=20 > Excellent news! I know a number of shops will be very excited to see thi= s=20 > in the tree. >=20 > Could you say a little about the future of ggated in light of the new=20 > arrival? Ggated serves different purpose actually, so it will stay. In lack of HAST, people started to use ggate+gmirror to get similar functionality, but they don't have to do that anymore. Ggatec/ggated functionality is much similar to iSCSI, so if something will make ggatec/ggated to go away, it will be iSCSI. I've some really evil performance improvements plans for HAST and ggatec will benefit as well. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Yylu36WmvOXNoKYn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkt+RCYACgkQForvXbEpPzT3+wCeLwHPvQUVxdWRpTvfbYhHEN/W eGQAoPeCSMzpJgj3MJ7fBdvYlkZQ0OmY =aWrj -----END PGP SIGNATURE----- --Yylu36WmvOXNoKYn-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 08:50:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7381C106566B; Fri, 19 Feb 2010 08:50:42 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw0-f204.google.com (mail-yw0-f204.google.com [209.85.211.204]) by mx1.freebsd.org (Postfix) with ESMTP id DAC158FC0C; Fri, 19 Feb 2010 08:50:41 +0000 (UTC) Received: by ywh42 with SMTP id 42so1793488ywh.7 for ; Fri, 19 Feb 2010 00:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ByywCu2yMGi4wzWsjPtnPjKOX/rhdJRkSDimtVloQWM=; b=QdkfSLW7Kj002WE147aniYtiBeETLRwm4vXg1Sv5uSid8zE6HelcIsGqiETGjDqAet QfG2Drfs8sCYudeJkkLPLMzXqrO1feco2dhmOGpxl7LJJkpYgWAQefeiUyYgIVb5etzH tB4owXIWIZcX9vbF5C/hvlUeQ8A1dzjYfNjXU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=L/jrwd9GXiIakkgMCtXUGqVUB9MwOB4egF02r/jPTupjtF3C9Jmwgilqs9LOaPCk+S 8vZ5U374F98inIds9LAlEOjFjtY/sfqPx9Xwr7HdvKwmqMwwcTMCfH0VHpc1HMze92N4 uKH9VbmJAQB+7HCsAU5ZbSbRkBZpMd376n+os= Received: by 10.103.87.34 with SMTP id p34mr7793573mul.18.1266569440397; Fri, 19 Feb 2010 00:50:40 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id n10sm8652890mue.14.2010.02.19.00.50.37 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 00:50:38 -0800 (PST) Sender: Alexander Motin Message-ID: <4B7E50DC.3070103@FreeBSD.org> Date: Fri, 19 Feb 2010 10:50:36 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Lawrence Stewart References: <201002141938.o1EJcRpx065470@svn.freebsd.org> <4B7D4962.8070706@freebsd.org> <4B7D626A.9040301@feral.com> <4B7E2B94.3090605@freebsd.org> In-Reply-To: <4B7E2B94.3090605@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Matthew Jacob , svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 08:50:42 -0000 Lawrence Stewart wrote: > On 02/19/10 02:53, Matthew Jacob wrote: >> Just a total swag here, but reduce the openings via camcontrol to < 32, >> or even < 16 > > Thanks for the suggestion. camcontrol doesn't seem able to futz with the > mpt controller e.g.: > > root@server# camcontrol identify da0 -v > (pass0:mpt0:0:2:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 > 00 00 > (pass0:mpt0:0:2:0): CAM status: CCB request was invalid IDENTIFY is an ATA command. It is not working there now, as mpt on some level translates ATA into SCSI. `camcontrol inquiry da0` and the others probably should work. > However, there does appear to be a relevant sysctl: > > root@server# sysctl dev.mpt.0 > dev.mpt.0.%desc: LSILogic SAS/SATA Adapter > dev.mpt.0.%driver: mpt > dev.mpt.0.%location: slot=3 function=0 > dev.mpt.0.%pnpinfo: vendor=0x1000 device=0x0050 subvendor=0x1000 > subdevice=0x3060 class=0x010000 > dev.mpt.0.%parent: pci2 > dev.mpt.0.debug: 3 > dev.mpt.0.role: 1 > dev.mpt.0.vol_member_wce: NC > dev.mpt.0.vol_queue_depth: 128 > dev.mpt.0.vol_resync_rate: 0 > dev.mpt.0.nonoptimal_volumes: 0 > > Setting dev.mpt.0.vol_queue_depth=32, I can still trigger the > "mpt0: mpt_cam_event: 0x16" messages by doing an svn up on the src tree. > Same if I set depth to 16, so unfortunately it doesn't seem to do help > in this case. I am not sure what this sysctl does, but it is mpt driver own sysctl. It has nothing common with number of tags used by CAM (at least directly). -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 09:18:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32E48106566C; Fri, 19 Feb 2010 09:18:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 086A78FC0C; Fri, 19 Feb 2010 09:18:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1J9IQPV040593; Fri, 19 Feb 2010 09:18:26 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1J9IQ3A040592; Fri, 19 Feb 2010 09:18:26 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002190918.o1J9IQ3A040592@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 19 Feb 2010 09:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204083 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 09:18:27 -0000 Author: pjd Date: Fri Feb 19 09:18:26 2010 New Revision: 204083 URL: http://svn.freebsd.org/changeset/base/204083 Log: Add missing KEYWORD line. Pointed out by: dougb Modified: head/etc/rc.d/hastd Modified: head/etc/rc.d/hastd ============================================================================== --- head/etc/rc.d/hastd Fri Feb 19 04:37:54 2010 (r204082) +++ head/etc/rc.d/hastd Fri Feb 19 09:18:26 2010 (r204083) @@ -6,6 +6,7 @@ # PROVIDE: hastd # REQUIRE: NETWORKING syslogd # BEFORE: DAEMON +# KEYWORD: nojail shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 13:56:21 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DC711065670; Fri, 19 Feb 2010 13:56:21 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6398FC14; Fri, 19 Feb 2010 13:56:21 +0000 (UTC) Received: from lawrence1.loshell.room52.net (unknown [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 6AED77E87D; Sat, 20 Feb 2010 00:56:19 +1100 (EST) Message-ID: <4B7E9882.3000703@freebsd.org> Date: Sat, 20 Feb 2010 00:56:18 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.1.5) Gecko/20100105 Thunderbird/3.0 MIME-Version: 1.0 To: Alexander Motin References: <201002141938.o1EJcRpx065470@svn.freebsd.org> <4B7D4962.8070706@freebsd.org> <4B7D626A.9040301@feral.com> <4B7E2B94.3090605@freebsd.org> <4B7E50DC.3070103@FreeBSD.org> In-Reply-To: <4B7E50DC.3070103@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Matthew Jacob , svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 13:56:21 -0000 On 02/19/10 19:50, Alexander Motin wrote: > Lawrence Stewart wrote: >> On 02/19/10 02:53, Matthew Jacob wrote: >>> Just a total swag here, but reduce the openings via camcontrol to< 32, >>> or even< 16 >> >> Thanks for the suggestion. camcontrol doesn't seem able to futz with the >> mpt controller e.g.: >> >> root@server# camcontrol identify da0 -v >> (pass0:mpt0:0:2:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 >> 00 00 >> (pass0:mpt0:0:2:0): CAM status: CCB request was invalid > > IDENTIFY is an ATA command. It is not working there now, as mpt on some > level translates ATA into SCSI. `camcontrol inquiry da0` and the others > probably should work. root@server# camcontrol inquiry da0 pass0: Fixed Direct Access SCSI-2 device pass0: 300.000MB/s transfers, Command Queueing Enabled > >> However, there does appear to be a relevant sysctl: >> >> root@server# sysctl dev.mpt.0 >> dev.mpt.0.%desc: LSILogic SAS/SATA Adapter >> dev.mpt.0.%driver: mpt >> dev.mpt.0.%location: slot=3 function=0 >> dev.mpt.0.%pnpinfo: vendor=0x1000 device=0x0050 subvendor=0x1000 >> subdevice=0x3060 class=0x010000 >> dev.mpt.0.%parent: pci2 >> dev.mpt.0.debug: 3 >> dev.mpt.0.role: 1 >> dev.mpt.0.vol_member_wce: NC >> dev.mpt.0.vol_queue_depth: 128 >> dev.mpt.0.vol_resync_rate: 0 >> dev.mpt.0.nonoptimal_volumes: 0 >> >> Setting dev.mpt.0.vol_queue_depth=32, I can still trigger the >> "mpt0: mpt_cam_event: 0x16" messages by doing an svn up on the src tree. >> Same if I set depth to 16, so unfortunately it doesn't seem to do help >> in this case. > > I am not sure what this sysctl does, but it is mpt driver own sysctl. It > has nothing common with number of tags used by CAM (at least directly). Ah ok, I misunderstood what openings meant in this context... I thought it was the queue depth. So if I restore dev.mpt.0.vol_queue_depth=128 and do the following: root@server# camcontrol tags da0 (pass0:mpt0:0:2:0): device openings: 255 root@server# camcontrol tags da0 -N 64 (pass0:mpt0:0:2:0): tagged openings now 64 (pass0:mpt0:0:2:0): device openings: 64 I can still trigger the "mpt0: mpt_cam_event: 0x16" messages. Same with openings set to 32. If I lower the openings down to 16, I still get fairly large stalls in disk IO, but the mpt_cam_event messages no longer appear. Hmmmm... Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 14:27:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 992BA106566C; Fri, 19 Feb 2010 14:27:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88E118FC08; Fri, 19 Feb 2010 14:27:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JERW73010359; Fri, 19 Feb 2010 14:27:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JERW9T010358; Fri, 19 Feb 2010 14:27:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002191427.o1JERW9T010358@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Feb 2010 14:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204085 - head/usr.sbin/mptable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:27:32 -0000 Author: jhb Date: Fri Feb 19 14:27:32 2010 New Revision: 204085 URL: http://svn.freebsd.org/changeset/base/204085 Log: Fix a typo. Submitted by: Jakub Lach jakub_lach of mailplus pl Modified: head/usr.sbin/mptable/mptable.c Modified: head/usr.sbin/mptable/mptable.c ============================================================================== --- head/usr.sbin/mptable/mptable.c Fri Feb 19 10:54:03 2010 (r204084) +++ head/usr.sbin/mptable/mptable.c Fri Feb 19 14:27:32 2010 (r204085) @@ -147,7 +147,7 @@ tableEntry basetableEntryTypes[] = tableEntry extendedtableEntryTypes[] = { { 128, 20, "System Address Space" }, - { 129, 8, "Bus Heirarchy" }, + { 129, 8, "Bus Hierarchy" }, { 130, 8, "Compatibility Bus Address" } }; From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 14:31:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485F41065696; Fri, 19 Feb 2010 14:31:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC5C8FC21; Fri, 19 Feb 2010 14:31:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JEV2RQ011146; Fri, 19 Feb 2010 14:31:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JEV2Vc011144; Fri, 19 Feb 2010 14:31:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002191431.o1JEV2Vc011144@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Feb 2010 14:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204086 - head/usr.sbin/mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:31:02 -0000 Author: jhb Date: Fri Feb 19 14:31:01 2010 New Revision: 204086 URL: http://svn.freebsd.org/changeset/base/204086 Log: - Don't emit a warning in 'show adapter' if the IOC2 or IOC6 pages are not present. mpt(4) controllers that do not support RAID do not have an IOC6 page, for example. - Correct a check for a missing page error in a debug function. MFC after: 1 week Modified: head/usr.sbin/mptutil/mpt_show.c Modified: head/usr.sbin/mptutil/mpt_show.c ============================================================================== --- head/usr.sbin/mptutil/mpt_show.c Fri Feb 19 14:27:32 2010 (r204085) +++ head/usr.sbin/mptutil/mpt_show.c Fri Feb 19 14:31:01 2010 (r204086) @@ -78,6 +78,7 @@ show_adapter(int ac, char **av) CONFIG_PAGE_MANUFACTURING_0 *man0; CONFIG_PAGE_IOC_2 *ioc2; CONFIG_PAGE_IOC_6 *ioc6; + U16 IOCStatus; int fd, comma; if (ac != 1) { @@ -108,7 +109,7 @@ show_adapter(int ac, char **av) free(man0); - ioc2 = mpt_read_ioc_page(fd, 2, NULL); + ioc2 = mpt_read_ioc_page(fd, 2, &IOCStatus); if (ioc2 != NULL) { printf(" RAID Levels:"); comma = 0; @@ -151,9 +152,11 @@ show_adapter(int ac, char **av) printf(" none"); printf("\n"); free(ioc2); - } + } else if ((IOCStatus & MPI_IOCSTATUS_MASK) != + MPI_IOCSTATUS_CONFIG_INVALID_PAGE) + warnx("mpt_read_ioc_page(2): %s", mpt_ioc_status(IOCStatus)); - ioc6 = mpt_read_ioc_page(fd, 6, NULL); + ioc6 = mpt_read_ioc_page(fd, 6, &IOCStatus); if (ioc6 != NULL) { display_stripe_map(" RAID0 Stripes", ioc6->SupportedStripeSizeMapIS); @@ -172,7 +175,9 @@ show_adapter(int ac, char **av) printf("-%u", ioc6->MaxDrivesIME); printf("\n"); free(ioc6); - } + } else if ((IOCStatus & MPI_IOCSTATUS_MASK) != + MPI_IOCSTATUS_CONFIG_INVALID_PAGE) + warnx("mpt_read_ioc_page(6): %s", mpt_ioc_status(IOCStatus)); /* TODO: Add an ioctl to fetch IOC_FACTS and print firmware version. */ @@ -541,7 +546,8 @@ show_physdisks(int ac, char **av) for (i = 0; i <= 0xff; i++) { pinfo = mpt_pd_info(fd, i, &IOCStatus); if (pinfo == NULL) { - if (IOCStatus != MPI_IOCSTATUS_CONFIG_INVALID_PAGE) + if ((IOCStatus & MPI_IOCSTATUS_MASK) != + MPI_IOCSTATUS_CONFIG_INVALID_PAGE) warnx("mpt_pd_info(%d): %s", i, mpt_ioc_status(IOCStatus)); continue; From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 14:59:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DAD106566B; Fri, 19 Feb 2010 14:59:42 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346218FC0A; Fri, 19 Feb 2010 14:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JExgaC017501; Fri, 19 Feb 2010 14:59:42 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JExgvV017499; Fri, 19 Feb 2010 14:59:42 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201002191459.o1JExgvV017499@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Feb 2010 14:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204087 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 14:59:42 -0000 Author: attilio Date: Fri Feb 19 14:59:41 2010 New Revision: 204087 URL: http://svn.freebsd.org/changeset/base/204087 Log: Fix a race in regard of p_numthreads. Submitted by: Giovanni Trematerra Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Fri Feb 19 14:31:01 2010 (r204086) +++ head/sys/kern/kern_kthread.c Fri Feb 19 14:59:41 2010 (r204087) @@ -312,18 +312,17 @@ kthread_exit(void) { struct proc *p; + p = curthread->td_proc; + /* A module may be waiting for us to exit. */ wakeup(curthread); - - /* - * We could rely on thread_exit to call exit1() but - * there is extra work that needs to be done - */ - if (curthread->td_proc->p_numthreads == 1) - kproc_exit(0); /* never returns */ - - p = curthread->td_proc; PROC_LOCK(p); + if (curthread->td_proc->p_numthreads == 1) { + PROC_UNLOCK(p); + kproc_exit(0); + + /* NOTREACHED. */ + } PROC_SLOCK(p); thread_exit(); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 15:03:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2353A106566C; Fri, 19 Feb 2010 15:03:56 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12C068FC14; Fri, 19 Feb 2010 15:03:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JF3t7W018469; Fri, 19 Feb 2010 15:03:55 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JF3tAE018467; Fri, 19 Feb 2010 15:03:55 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201002191503.o1JF3tAE018467@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Feb 2010 15:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204088 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 15:03:56 -0000 Author: attilio Date: Fri Feb 19 15:03:55 2010 New Revision: 204088 URL: http://svn.freebsd.org/changeset/base/204088 Log: Fix the grammar. Submitted by: Brandon Gooch Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Fri Feb 19 14:59:41 2010 (r204087) +++ head/sys/kern/kern_kthread.c Fri Feb 19 15:03:55 2010 (r204088) @@ -339,9 +339,9 @@ kthread_suspend(struct thread *td, int t p = td->td_proc; /* - * td_pflags should not be ready by any other thread different by + * td_pflags should not be read by any thread other than * curthread, but as long as this flag is invariant during the - * thread lifetime, it is ok to check for it now. + * thread's lifetime, it is OK to check its state. */ if ((td->td_pflags & TDP_KTHREAD) == 0) return (EINVAL); @@ -370,9 +370,9 @@ kthread_resume(struct thread *td) p = td->td_proc; /* - * td_pflags should not be ready by any other thread different by + * td_pflags should not be read by any thread other than * curthread, but as long as this flag is invariant during the - * thread lifetime, it is ok to check for it now. + * thread's lifetime, it is OK to check its state. */ if ((td->td_pflags & TDP_KTHREAD) == 0) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 15:10:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C93C51065670; Fri, 19 Feb 2010 15:10:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8F568FC16; Fri, 19 Feb 2010 15:10:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JFA5sJ019850; Fri, 19 Feb 2010 15:10:05 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JFA5LC019848; Fri, 19 Feb 2010 15:10:05 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201002191510.o1JFA5LC019848@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Feb 2010 15:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204089 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 15:10:05 -0000 Author: attilio Date: Fri Feb 19 15:10:05 2010 New Revision: 204089 URL: http://svn.freebsd.org/changeset/base/204089 Log: Use the cached value within comparison. Submitted by: jhb Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Fri Feb 19 15:03:55 2010 (r204088) +++ head/sys/kern/kern_kthread.c Fri Feb 19 15:10:05 2010 (r204089) @@ -317,7 +317,7 @@ kthread_exit(void) /* A module may be waiting for us to exit. */ wakeup(curthread); PROC_LOCK(p); - if (curthread->td_proc->p_numthreads == 1) { + if (p->p_numthreads == 1) { PROC_UNLOCK(p); kproc_exit(0); From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 15:16:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E272B106568B; Fri, 19 Feb 2010 15:16:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D09338FC0C; Fri, 19 Feb 2010 15:16:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JFG05M021207; Fri, 19 Feb 2010 15:16:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JFG0l8021205; Fri, 19 Feb 2010 15:16:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201002191516.o1JFG0l8021205@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Feb 2010 15:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204090 - head/usr.sbin/mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 15:16:01 -0000 Author: jhb Date: Fri Feb 19 15:16:00 2010 New Revision: 204090 URL: http://svn.freebsd.org/changeset/base/204090 Log: Fix mptutil's method for locating disk devices attached to a specific mpt(4) controller. Previously, the code assumed that multiple match patterns provided to an XPT_DEV_MATCH request were ANDed together. Instead, they are ORed. Instead, to match peripherals for a specific bus, one query needs to be performed to lookup the path ID of the bus. A second query can then be performed matching peripherals attached to that path. This approach also makes the code a bit cleaner as the returned match results do not mix bus and perphierals. Reported by: several folks MFC after: 1 week Modified: head/usr.sbin/mptutil/mpt_cam.c Modified: head/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- head/usr.sbin/mptutil/mpt_cam.c Fri Feb 19 15:10:05 2010 (r204089) +++ head/usr.sbin/mptutil/mpt_cam.c Fri Feb 19 15:16:00 2010 (r204090) @@ -56,15 +56,75 @@ xpt_open(void) return (xptfd); } +/* Fetch the path id of bus 0 for the opened mpt controller. */ +static int +fetch_path_id(path_id_t *path_id) +{ + struct bus_match_pattern *b; + union ccb ccb; + size_t bufsize; + + if (xpt_open() < 0) + return (ENXIO); + + /* First, find the path id of bus 0 for this mpt controller. */ + bzero(&ccb, sizeof(ccb)); + + ccb.ccb_h.func_code = XPT_DEV_MATCH; + + bufsize = sizeof(struct dev_match_result) * 1; + ccb.cdm.num_matches = 0; + ccb.cdm.match_buf_len = bufsize; + ccb.cdm.matches = calloc(1, bufsize); + + bufsize = sizeof(struct dev_match_pattern) * 1; + ccb.cdm.num_patterns = 1; + ccb.cdm.pattern_buf_len = bufsize; + ccb.cdm.patterns = calloc(1, bufsize); + + /* Match mptX bus 0. */ + ccb.cdm.patterns[0].type = DEV_MATCH_BUS; + b = &ccb.cdm.patterns[0].pattern.bus_pattern; + snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); + b->unit_number = mpt_unit; + b->bus_id = 0; + b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; + + if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + free(ccb.cdm.matches); + free(ccb.cdm.patterns); + return (errno); + } + free(ccb.cdm.patterns); + + if (((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) || + (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { + warnx("fetch_path_id got CAM error %#x, CDM error %d\n", + ccb.ccb_h.status, ccb.cdm.status); + free(ccb.cdm.matches); + return (EIO); + } + + /* We should have exactly 1 match for the bus. */ + if (ccb.cdm.num_matches != 1 || + ccb.cdm.matches[0].type != DEV_MATCH_BUS) { + free(ccb.cdm.matches); + return (ENOENT); + } + *path_id = ccb.cdm.matches[0].result.bus_result.path_id; + free(ccb.cdm.matches); + return (0); +} + int mpt_query_disk(U8 VolumeBus, U8 VolumeID, struct mpt_query_disk *qd) { - struct bus_match_pattern *b; struct periph_match_pattern *p; struct periph_match_result *r; union ccb ccb; + path_id_t path_id; size_t bufsize; - int i; + int error, i; /* mpt(4) only handles devices on bus 0. */ if (VolumeBus != 0) @@ -73,6 +133,11 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID if (xpt_open() < 0) return (ENXIO); + /* Find the path ID of bus 0. */ + error = fetch_path_id(&path_id); + if (error) + return (error); + bzero(&ccb, sizeof(ccb)); ccb.ccb_h.func_code = XPT_DEV_MATCH; @@ -85,25 +150,18 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = calloc(1, bufsize); - bufsize = sizeof(struct dev_match_pattern) * 2; - ccb.cdm.num_patterns = 2; + bufsize = sizeof(struct dev_match_pattern) * 1; + ccb.cdm.num_patterns = 1; ccb.cdm.pattern_buf_len = bufsize; ccb.cdm.patterns = calloc(1, bufsize); - /* Match mptX bus 0. */ - ccb.cdm.patterns[0].type = DEV_MATCH_BUS; - b = &ccb.cdm.patterns[0].pattern.bus_pattern; - snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); - b->unit_number = mpt_unit; - b->bus_id = 0; - b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; - /* Look for a "da" device at the specified target and lun. */ - ccb.cdm.patterns[1].type = DEV_MATCH_PERIPH; - p = &ccb.cdm.patterns[1].pattern.periph_pattern; + ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; + p = &ccb.cdm.patterns[0].pattern.periph_pattern; + p->path_id = path_id; snprintf(p->periph_name, sizeof(p->periph_name), "da"); p->target_id = VolumeID; - p->flags = PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; + p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { i = errno; @@ -122,25 +180,22 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID } /* - * We should have exactly 2 matches, 1 for the bus and 1 for - * the peripheral. However, if we only have 1 match and it is - * for the bus, don't print an error message and return - * ENOENT. + * We should have exactly 1 match for the peripheral. + * However, if we don't get a match, don't print an error + * message and return ENOENT. */ - if (ccb.cdm.num_matches == 1 && - ccb.cdm.matches[0].type == DEV_MATCH_BUS) { + if (ccb.cdm.num_matches == 0) { free(ccb.cdm.matches); return (ENOENT); } - if (ccb.cdm.num_matches != 2) { - warnx("mpt_query_disk got %d matches, expected 2", + if (ccb.cdm.num_matches != 1) { + warnx("mpt_query_disk got %d matches, expected 1", ccb.cdm.num_matches); free(ccb.cdm.matches); return (EIO); } - if (ccb.cdm.matches[0].type != DEV_MATCH_BUS || - ccb.cdm.matches[1].type != DEV_MATCH_PERIPH) { - warnx("mpt_query_disk got wrong CAM matches"); + if (ccb.cdm.matches[0].type != DEV_MATCH_PERIPH) { + warnx("mpt_query_disk got wrong CAM match"); free(ccb.cdm.matches); return (EIO); } @@ -336,47 +391,44 @@ mpt_fetch_disks(int fd, int *ndisks, str { CONFIG_PAGE_IOC_2 *ioc2; struct mpt_standalone_disk *disks; - struct bus_match_pattern *b; struct periph_match_pattern *p; struct periph_match_result *r; struct cam_device *dev; union ccb ccb; + path_id_t path_id; size_t bufsize; u_int i; - int count; + int count, error; if (xpt_open() < 0) return (ENXIO); + error = fetch_path_id(&path_id); + if (error) + return (error); + for (count = 100;; count+= 100) { /* Try to fetch 'count' disks in one go. */ bzero(&ccb, sizeof(ccb)); ccb.ccb_h.func_code = XPT_DEV_MATCH; - bufsize = sizeof(struct dev_match_result) * (count + 2); + bufsize = sizeof(struct dev_match_result) * (count + 1); ccb.cdm.num_matches = 0; ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = calloc(1, bufsize); - bufsize = sizeof(struct dev_match_pattern) * 2; - ccb.cdm.num_patterns = 2; + bufsize = sizeof(struct dev_match_pattern) * 1; + ccb.cdm.num_patterns = 1; ccb.cdm.pattern_buf_len = bufsize; ccb.cdm.patterns = calloc(1, bufsize); - /* Match mptX bus 0. */ - ccb.cdm.patterns[0].type = DEV_MATCH_BUS; - b = &ccb.cdm.patterns[0].pattern.bus_pattern; - snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); - b->unit_number = mpt_unit; - b->bus_id = 0; - b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; - /* Match any "da" peripherals. */ - ccb.cdm.patterns[1].type = DEV_MATCH_PERIPH; - p = &ccb.cdm.patterns[1].pattern.periph_pattern; + ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; + p = &ccb.cdm.patterns[0].pattern.periph_pattern; + p->path_id = path_id; snprintf(p->periph_name, sizeof(p->periph_name), "da"); - p->flags = PERIPH_MATCH_NAME; + p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { i = errno; @@ -406,21 +458,16 @@ mpt_fetch_disks(int fd, int *ndisks, str break; } - /* - * We should have N + 1 matches, 1 for the bus and 1 for each - * "da" device. - */ - if (ccb.cdm.num_matches < 1) { - warnx("mpt_fetch_disks didn't get any matches"); - free(ccb.cdm.matches); - return (EIO); - } - if (ccb.cdm.matches[0].type != DEV_MATCH_BUS) { - warnx("mpt_fetch_disks got wrong CAM matches"); + /* Shortcut if we don't have any "da" devices. */ + if (ccb.cdm.num_matches == 0) { free(ccb.cdm.matches); - return (EIO); + *ndisks = 0; + *disksp = NULL; + return (0); } - for (i = 1; i < ccb.cdm.num_matches; i++) { + + /* We should have N matches, 1 for each "da" device. */ + for (i = 0; i < ccb.cdm.num_matches; i++) { if (ccb.cdm.matches[i].type != DEV_MATCH_PERIPH) { warnx("mpt_fetch_disks got wrong CAM matches"); free(ccb.cdm.matches); @@ -428,14 +475,6 @@ mpt_fetch_disks(int fd, int *ndisks, str } } - /* Shortcut if we don't have any "da" devices. */ - if (ccb.cdm.num_matches == 1) { - free(ccb.cdm.matches); - *ndisks = 0; - *disksp = NULL; - return (0); - } - /* * Some of the "da" peripherals may be for RAID volumes, so * fetch the IOC 2 page (list of RAID volumes) so we can @@ -444,7 +483,7 @@ mpt_fetch_disks(int fd, int *ndisks, str ioc2 = mpt_read_ioc_page(fd, 2, NULL); disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); count = 0; - for (i = 1; i < ccb.cdm.num_matches; i++) { + for (i = 0; i < ccb.cdm.num_matches; i++) { r = &ccb.cdm.matches[i].result.periph_result; if (periph_is_volume(ioc2, r)) continue; @@ -480,10 +519,9 @@ mpt_fetch_disks(int fd, int *ndisks, str int mpt_rescan_bus(int bus, int id) { - struct bus_match_pattern *b; union ccb ccb; path_id_t path_id; - size_t bufsize; + int error; /* mpt(4) only handles devices on bus 0. */ if (bus != -1 && bus != 0) @@ -492,54 +530,12 @@ mpt_rescan_bus(int bus, int id) if (xpt_open() < 0) return (ENXIO); - /* First, find the path id of bus 0 for this mpt controller. */ - bzero(&ccb, sizeof(ccb)); - - ccb.ccb_h.func_code = XPT_DEV_MATCH; - - bufsize = sizeof(struct dev_match_result) * 1; - ccb.cdm.num_matches = 0; - ccb.cdm.match_buf_len = bufsize; - ccb.cdm.matches = calloc(1, bufsize); - - bufsize = sizeof(struct dev_match_pattern) * 1; - ccb.cdm.num_patterns = 1; - ccb.cdm.pattern_buf_len = bufsize; - ccb.cdm.patterns = calloc(1, bufsize); - - /* Match mptX bus 0. */ - ccb.cdm.patterns[0].type = DEV_MATCH_BUS; - b = &ccb.cdm.patterns[0].pattern.bus_pattern; - snprintf(b->dev_name, sizeof(b->dev_name), "mpt"); - b->unit_number = mpt_unit; - b->bus_id = 0; - b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; - - if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - free(ccb.cdm.matches); - free(ccb.cdm.patterns); - return (errno); - } - free(ccb.cdm.patterns); - - if (((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) || - (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { - warnx("mpt_rescan_bus got CAM error %#x, CDM error %d\n", - ccb.ccb_h.status, ccb.cdm.status); - free(ccb.cdm.matches); - return (EIO); - } - - /* We should have exactly 1 match for the bus. */ - if (ccb.cdm.num_matches != 1 || - ccb.cdm.matches[0].type != DEV_MATCH_BUS) { - free(ccb.cdm.matches); - return (ENOENT); - } - path_id = ccb.cdm.matches[0].result.bus_result.path_id; - free(ccb.cdm.matches); + error = fetch_path_id(&path_id); + if (error) + return (error); - /* Now perform the actual rescan. */ + /* Perform the actual rescan. */ + bzero(&ccb, sizeof(ccb)); ccb.ccb_h.path_id = path_id; if (id == -1) { ccb.ccb_h.func_code = XPT_SCAN_BUS; From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 16:36:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C83E10656B7; Fri, 19 Feb 2010 16:36:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AA558FC5E; Fri, 19 Feb 2010 16:36:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JGa9vY038998; Fri, 19 Feb 2010 16:36:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JGa9hO038996; Fri, 19 Feb 2010 16:36:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201002191636.o1JGa9hO038996@svn.freebsd.org> From: Rick Macklem Date: Fri, 19 Feb 2010 16:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204091 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 16:36:09 -0000 Author: rmacklem Date: Fri Feb 19 16:36:08 2010 New Revision: 204091 URL: http://svn.freebsd.org/changeset/base/204091 Log: MFC: r203849 Change the default value for vfs.newnfs.enable_locallocks to 0 for the experimental NFS server, since local locking is known to be broken and the patch to fix it is still a work in progress. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Fri Feb 19 15:16:00 2010 (r204090) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Fri Feb 19 16:36:08 2010 (r204091) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); struct nfsrv_stablefirst nfsrv_stablefirst; int nfsrv_issuedelegs = 0; -int nfsrv_dolocallocks = 1; +int nfsrv_dolocallocks = 0; struct nfsv4lock nfsv4rootfs_lock; extern int newnfs_numnfsd; From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 16:54:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2AF1065672; Fri, 19 Feb 2010 16:54:51 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9886A8FC12; Fri, 19 Feb 2010 16:54:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JGspkh043211; Fri, 19 Feb 2010 16:54:51 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JGspfE043208; Fri, 19 Feb 2010 16:54:51 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201002191654.o1JGspfE043208@svn.freebsd.org> From: Tony Finch Date: Fri, 19 Feb 2010 16:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204092 - head/usr.bin/unifdef X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 16:54:51 -0000 Author: fanf Date: Fri Feb 19 16:54:51 2010 New Revision: 204092 URL: http://svn.freebsd.org/changeset/base/204092 Log: Update to upstream version 1.338 Fix a long-standing cpp compatibility bug: The -DFOO argument (without an explicit value) should define FOO to 1 not to the empty string. Add support for CRLF newlines, based on a suggestion from Mark Rushakoff. Obtained from: http://dotat.at/prog/unifdef/ Modified: head/usr.bin/unifdef/unifdef.1 head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.1 ============================================================================== --- head/usr.bin/unifdef/unifdef.1 Fri Feb 19 16:36:08 2010 (r204091) +++ head/usr.bin/unifdef/unifdef.1 Fri Feb 19 16:54:51 2010 (r204092) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 -.\" $dotat: unifdef/unifdef.1,v 1.62 2010/01/19 17:33:53 fanf2 Exp $ +.\" $dotat: unifdef/unifdef.1,v 1.63 2010/02/19 16:41:15 fanf2 Exp $ .\" $FreeBSD$ .\" .Dd January 19, 2010 @@ -168,14 +168,16 @@ with appropriate arguments to process th .Sh OPTIONS .Pp .Bl -tag -width indent -compact -.It Fl D Ns Ar sym Ns Op = Ns Ar val -Specify that a symbol is defined, -and optionally specify what value to give it -for the purpose of handling +.It Fl D Ns Ar sym Ns = Ns Ar val +Specify that a symbol is defined to a given value +which is used when evaluating .Ic #if and .Ic #elif -directives. +control expressions. +.Pp +.It Fl D Ns Ar sym +Specify that a symbol is defined to the value 1. .Pp .It Fl U Ns Ar sym Specify that a symbol is undefined. Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Fri Feb 19 16:36:08 2010 (r204091) +++ head/usr.bin/unifdef/unifdef.c Fri Feb 19 16:54:51 2010 (r204092) @@ -39,8 +39,8 @@ * #else's and #endif's to see that they match their * corresponding #ifdef or #ifndef * - * The first two items above require better buffer handling, which would - * also make it possible to handle all "dodgy" directives correctly. + * These require better buffer handling, which would also make + * it possible to handle all "dodgy" directives correctly. */ #include @@ -57,7 +57,7 @@ #include #ifdef __IDSTRING -__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.193 2010/01/19 18:03:02 fanf2 Exp $"); +__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.198 2010/02/19 16:37:05 fanf2 Exp $"); #endif #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -190,6 +190,10 @@ static char tempname[FILENAM static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */ static char *keyword; /* used for editing #elif's */ +static const char *newline; /* input file format */ +static const char newline_unix[] = "\n"; +static const char newline_crlf[] = "\r\n"; + static Comment_state incomment; /* comment parser state */ static Line_state linestate; /* #if line parser state */ static Ifstate ifstate[MAXDEPTH]; /* #if processor state */ @@ -313,6 +317,7 @@ main(int argc, char *argv[]) input = stdin; } if (ofilename == NULL) { + ofilename = "[stdout]"; output = stdout; } else { struct stat ist, ost; @@ -336,7 +341,8 @@ main(int argc, char *argv[]) "%.*s/" TEMPLATE, (int)(dirsep - ofilename), ofilename); else - strlcpy(tempname, TEMPLATE, sizeof(tempname)); + snprintf(tempname, sizeof(tempname), + TEMPLATE); ofd = mkstemp(tempname); if (ofd != -1) output = fdopen(ofd, "w+"); @@ -429,9 +435,9 @@ static void Itrue (void) { Ftrue(); ign static void Ifalse(void) { Ffalse(); ignoreon(); } /* edit this line */ static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); } -static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); } -static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); } -static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); } +static void Mtrue (void) { keywordedit("else"); state(IS_TRUE_MIDDLE); } +static void Melif (void) { keywordedit("endif"); state(IS_FALSE_TRAILER); } +static void Melse (void) { keywordedit("endif"); state(IS_FALSE_ELSE); } static state_fn * const trans_table[IS_COUNT][LT_COUNT] = { /* IS_OUTSIDE */ @@ -497,7 +503,8 @@ ignoreon(void) static void keywordedit(const char *replacement) { - strlcpy(keyword, replacement, tline + sizeof(tline) - keyword); + snprintf(keyword, tline + sizeof(tline) - keyword, + "%s%s", replacement, newline); print(); } static void @@ -532,20 +539,20 @@ flushline(bool keep) if (symlist) return; if (keep ^ complement) { - bool blankline = tline[strspn(tline, " \t\n")] == '\0'; + bool blankline = tline[strspn(tline, " \t\r\n")] == '\0'; if (blankline && compblank && blankcount != blankmax) { delcount += 1; blankcount += 1; } else { if (lnnum && delcount > 0) - printf("#line %d\n", linenum); + printf("#line %d%s", linenum, newline); fputs(tline, output); delcount = 0; blankmax = blankcount = blankline ? blankcount + 1 : 0; } } else { if (lnblank) - putc('\n', output); + fputs(newline, output); exitstat = 1; delcount += 1; blankcount = 0; @@ -580,7 +587,7 @@ static void closeout(void) { if (fclose(output) == EOF) { - warn("couldn't write to output"); + warn("couldn't write to %s", ofilename); if (overwriting) { unlink(tempname); errx(2, "%s unchanged", filename); @@ -623,6 +630,12 @@ parseline(void) if (fgets(tline, MAXLINE, input) == NULL) return (LT_EOF); + if (newline == NULL) { + if (strrchr(tline, '\n') == strrchr(tline, '\r') + 1) + newline = newline_crlf; + else + newline = newline_unix; + } retval = LT_PLAIN; wascomment = incomment; cp = skipcomment(tline); @@ -638,7 +651,8 @@ parseline(void) cp = skipsym(cp); kwlen = cp - keyword; /* no way can we deal with a continuation inside a keyword */ - if (strncmp(cp, "\\\n", 2) == 0) + if (strncmp(cp, "\\\r\n", 3) == 0 || + strncmp(cp, "\\\n", 2) == 0) Eioccc(); if (strlcmp("ifdef", keyword, kwlen) == 0 || strlcmp("ifndef", keyword, kwlen) == 0) { @@ -689,9 +703,8 @@ parseline(void) size_t len = cp - tline; if (fgets(tline + len, MAXLINE - len, input) == NULL) { /* append the missing newline */ - tline[len+0] = '\n'; - tline[len+1] = '\0'; - cp++; + strcpy(tline + len, newline); + cp += strlen(newline); linestate = LS_START; } else { linestate = LS_DIRTY; @@ -947,11 +960,16 @@ skipcomment(const char *cp) } while (*cp != '\0') /* don't reset to LS_START after a line continuation */ - if (strncmp(cp, "\\\n", 2) == 0) + if (strncmp(cp, "\\\r\n", 3) == 0) + cp += 3; + else if (strncmp(cp, "\\\n", 2) == 0) cp += 2; else switch (incomment) { case NO_COMMENT: - if (strncmp(cp, "/\\\n", 3) == 0) { + if (strncmp(cp, "/\\\r\n", 4) == 0) { + incomment = STARTING_COMMENT; + cp += 4; + } else if (strncmp(cp, "/\\\n", 3) == 0) { incomment = STARTING_COMMENT; cp += 3; } else if (strncmp(cp, "/*", 2) == 0) { @@ -971,7 +989,7 @@ skipcomment(const char *cp) } else if (strncmp(cp, "\n", 1) == 0) { linestate = LS_START; cp += 1; - } else if (strchr(" \t", *cp) != NULL) { + } else if (strchr(" \r\t", *cp) != NULL) { cp += 1; } else return (cp); @@ -1003,7 +1021,10 @@ skipcomment(const char *cp) cp += 1; continue; case C_COMMENT: - if (strncmp(cp, "*\\\n", 3) == 0) { + if (strncmp(cp, "*\\\r\n", 4) == 0) { + incomment = FINISHING_COMMENT; + cp += 4; + } else if (strncmp(cp, "*\\\n", 3) == 0) { incomment = FINISHING_COMMENT; cp += 3; } else if (strncmp(cp, "*/", 2) == 0) { @@ -1124,7 +1145,7 @@ addsym(bool ignorethis, bool definethis, value[symind] = val+1; *val = '\0'; } else if (*val == '\0') - value[symind] = ""; + value[symind] = "1"; else usage(); } else { From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 17:16:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D59C1065679; Fri, 19 Feb 2010 17:16:24 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 74D6D8FC0C; Fri, 19 Feb 2010 17:16:23 +0000 (UTC) Received: by bwz8 with SMTP id 8so268318bwz.3 for ; Fri, 19 Feb 2010 09:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ea9HO/1vXWD2SYmglKJ6ozzZhS3pvikX3bOMpG3WFJg=; b=c5WmUj92dgS0KgQuOOjf32XPQYpyJiVwWvEMz9LLVqUFlv15Gbyr2z42dZpjdcVc30 TNRgwOWDfq6EWx/sqvJ9L4cAU5gXsOcY+aXz7RZWeAHsE0sqqZev8KS0G+AuraJMWSMq gfXXiNWr1AzrzJuxX1QCHEWYUFe2/mkjmntnM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=WsPFk5747X6u+nuU4vMffWFGM9KvhuwwhzYu1+cY5JdS2tW88WGQ6o9g12NndUvgCr 1FN593sLoQdLEUN/jTPWK4HVksVKdjFXAs6A4pkkGxBwIL8+nEOUDiHMQmmB0S1yn/cs YYjrcrpoSqiurl1FeDMYpBwjSoMcgZP0Z1pXk= Received: by 10.103.48.13 with SMTP id a13mr8266777muk.14.1266599782198; Fri, 19 Feb 2010 09:16:22 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id j10sm1821397muh.26.2010.02.19.09.16.20 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 09:16:21 -0800 (PST) Sender: Alexander Motin Message-ID: <4B7EC763.4090507@FreeBSD.org> Date: Fri, 19 Feb 2010 19:16:19 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Lawrence Stewart References: <201002141938.o1EJcRpx065470@svn.freebsd.org> <4B7D4962.8070706@freebsd.org> In-Reply-To: <4B7D4962.8070706@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r203889 - in stable/8/sys: cam cam/ata cam/scsi dev/ahci dev/asr dev/ata dev/ciss dev/hptiop dev/hptrr dev/mly dev/mpt dev/ppbus dev/siis dev/trm dev/twa dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 17:16:24 -0000 Lawrence Stewart wrote: > A couple of times it has gotten even more upset reporting things like this: > > mpt0: mpt_cam_event: 0x16 > mpt0: mpt_cam_event: 0x16 > mpt0: request 0xffffff80002f1400:54058 timed out for ccb > 0xffffff0001c65000 (req->ccb 0xffffff0001c65000) > mpt0: attempting to abort req 0xffffff80002f1400:54058 function 0 > mpt0: request 0xffffff80002fd100:54059 timed out for ccb > 0xffffff009f3ec800 (req->ccb 0xffffff009f3ec800) > mpt0: request 0xffffff80002efcf0:54060 timed out for ccb > 0xffffff0001bd2000 (req->ccb 0xffffff0001bd2000) > mpt0: mpt_recover_commands: IOC Status 0x4a. Resetting controller. > mpt0: mpt_cam_event: 0x0 > mpt0: mpt_cam_event: 0x0 > mpt0: completing timedout/aborted req 0xffffff80002f1400:54058 > mpt0: completing timedout/aborted req 0xffffff80002fd100:54059 > mpt0: completing timedout/aborted req 0xffffff80002efcf0:54060 > mpt0: mpt_cam_event: 0x16 > mpt0: mpt_cam_event: 0x12 > mpt0: mpt_cam_event: 0x12 > mpt0: mpt_cam_event: 0x16 > mpt0: Volume(0:2): Volume Status Changed > mpt0: request 0xffffff80002f8990:0 timed out for ccb 0xffffff009f3cb800 > (req->ccb 0) > > No ill effects are observed after such an episode and the array remains > in healthy as-normal state. The only observable problem is the stall of > all disk IO while these events occur. I have no idea how mpt driver works, neither I have hardware to play, but quick look shows that 0x12 event is MPI_EVENT_SAS_PHY_LINK_STATUS, and 0x16 is MPI_EVENT_SAS_DISCOVERY. Both are not handled by mpt driver and so logged. I would say something is going on at physical level of your SAN. Timeouts are also could be the result of physical issues. > As best I can tell, the hardware is ok, both disks report as fine > without SMART errors and are only 2 months old, so wanted to rule out > software issues. On upgrading to recent 8-STABLE, I got a page fault > kernel panic on boot in the mpt driver mpt_raid0 kproc. After some trial > and error, r203888 is the most recent revision that boots fine, whilst > r203889 exhibits the page fault. I should also note that r203888 still > sees the "mpt0: mpt_cam_event: 0x16" messages and associated disk IO > stalls. > > I compiled DDB into my r203889 kernel. Unfortunately my ILO emulates a > USB keyboard so I can't do anything in DDB which is a huge pain, but > here's the info I did get (hand transcribed): > > Fatal trap 12: page fault while in kernel mode > current process: mpt_raid0 > Stopped at xpt_rescan+0x1d: movq 0x10(%rsi),%rdx > > 1. Any thoughts on how to resolve the regression in the mpt driver with > the r203889 commit? Any thoughts where to find a good telepath? :) For the beginning, show at least verbose boot messages up to the crash. Full panic message could also be useful, it may show address of the fault instruction, which may be resolved to source line with addr2line tool. If you could find a good old PS/2 keyboard, backtrace would be interesting to see. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 17:37:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C93F1065670; Fri, 19 Feb 2010 17:37:47 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCCA8FC16; Fri, 19 Feb 2010 17:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JHblF2052638; Fri, 19 Feb 2010 17:37:47 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JHbld8052637; Fri, 19 Feb 2010 17:37:47 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201002191737.o1JHbld8052637@svn.freebsd.org> From: Alexander Kabaev Date: Fri, 19 Feb 2010 17:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204093 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 17:37:47 -0000 Author: kan Date: Fri Feb 19 17:37:46 2010 New Revision: 204093 URL: http://svn.freebsd.org/changeset/base/204093 Log: Define DMA_RX_STATUS_OVERFLOW with correct value. The RX overflow is reported in bit 2 on real hardware and Linux driver for the same device already has this defined correctly. This fixes frequent interrupt storms seen on RouterStation Pro boards. Discussed with: gonzo Modified: head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Fri Feb 19 16:54:51 2010 (r204092) +++ head/sys/mips/atheros/ar71xxreg.h Fri Feb 19 17:37:46 2010 (r204093) @@ -403,9 +403,9 @@ #define AR71XX_DMA_RX_STATUS 0x194 #define DMA_RX_STATUS_PCOUNT_MASK 0xff #define DMA_RX_STATUS_PCOUNT_SHIFT 16 -#define DMA_RX_STATUS_BUS_ERROR (1 << 3) -#define DMA_RX_STATUS_OVERFLOW (1 << 1) -#define DMA_RX_STATUS_PKT_RECVD (1 << 0) +#define DMA_RX_STATUS_BUS_ERROR (1 << 3) +#define DMA_RX_STATUS_OVERFLOW (1 << 2) +#define DMA_RX_STATUS_PKT_RECVD (1 << 0) #define AR71XX_DMA_INTR 0x198 #define AR71XX_DMA_INTR_STATUS 0x19C #define DMA_INTR_ALL ((1 << 8) - 1) From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 17:45:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6E69106566B; Fri, 19 Feb 2010 17:45:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B49718FC1B; Fri, 19 Feb 2010 17:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JHjlsI054491; Fri, 19 Feb 2010 17:45:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JHjlCp054489; Fri, 19 Feb 2010 17:45:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002191745.o1JHjlCp054489@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Feb 2010 17:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204094 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 17:45:47 -0000 Author: mav Date: Fri Feb 19 17:45:47 2010 New Revision: 204094 URL: http://svn.freebsd.org/changeset/base/204094 Log: MFC r203931: Make CD driver a bit more robust and predictable to unreported errors. Modified: stable/8/sys/cam/scsi/scsi_cd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_cd.c Fri Feb 19 17:37:46 2010 (r204093) +++ stable/8/sys/cam/scsi/scsi_cd.c Fri Feb 19 17:45:47 2010 (r204094) @@ -638,15 +638,14 @@ cdregister(struct cam_periph *periph, vo return(CAM_REQ_CMP_ERR); } - softc = (struct cd_softc *)malloc(sizeof(*softc),M_DEVBUF,M_NOWAIT); - + softc = (struct cd_softc *)malloc(sizeof(*softc),M_DEVBUF, + M_NOWAIT | M_ZERO); if (softc == NULL) { printf("cdregister: Unable to probe new device. " "Unable to allocate softc\n"); return(CAM_REQ_CMP_ERR); } - bzero(softc, sizeof(*softc)); LIST_INIT(&softc->pending_ccbs); STAILQ_INIT(&softc->mode_queue); softc->state = CD_STATE_PROBE; @@ -861,8 +860,7 @@ cdregister(struct cam_periph *periph, vo */ else { nchanger = malloc(sizeof(struct cdchanger), - M_DEVBUF, M_NOWAIT); - + M_DEVBUF, M_NOWAIT | M_ZERO); if (nchanger == NULL) { softc->flags &= ~CD_FLAG_CHANGER; printf("cdregister: unable to malloc " @@ -875,10 +873,6 @@ cdregister(struct cam_periph *periph, vo */ goto cdregisterexit; } - - /* zero the structure */ - bzero(nchanger, sizeof(struct cdchanger)); - if (camq_init(&nchanger->devq, 1) != 0) { softc->flags &= ~CD_FLAG_CHANGER; printf("cdregister: changer support " @@ -1506,8 +1500,7 @@ cdstart(struct cam_periph *periph, union { rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap), - M_SCSICD, - M_NOWAIT); + M_SCSICD, M_NOWAIT | M_ZERO); if (rcap == NULL) { xpt_print(periph->path, "cdstart: Couldn't malloc read_capacity data\n"); @@ -2073,7 +2066,7 @@ cdioctl(struct disk *dp, u_long cmd, voi u_int32_t len = args->data_len; data = malloc(sizeof(struct cd_sub_channel_info), - M_SCSICD, M_WAITOK); + M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2125,7 +2118,7 @@ cdioctl(struct disk *dp, u_long cmd, voi struct ioc_toc_header *th; th = malloc(sizeof(struct ioc_toc_header), M_SCSICD, - M_WAITOK); + M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2162,8 +2155,8 @@ cdioctl(struct disk *dp, u_long cmd, voi u_int32_t len, readlen, idx, num; u_int32_t starting_track = te->starting_track; - data = malloc(sizeof(*data), M_SCSICD, M_WAITOK); - lead = malloc(sizeof(*lead), M_SCSICD, M_WAITOK); + data = malloc(sizeof(*data), M_SCSICD, M_WAITOK | M_ZERO); + lead = malloc(sizeof(*lead), M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2291,7 +2284,7 @@ cdioctl(struct disk *dp, u_long cmd, voi struct ioc_toc_header *th; u_int32_t track; - data = malloc(sizeof(*data), M_SCSICD, M_WAITOK); + data = malloc(sizeof(*data), M_SCSICD, M_WAITOK | M_ZERO); cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, @@ -2910,7 +2903,7 @@ cdsize(struct cam_periph *periph, u_int3 /* XXX Should be M_WAITOK */ rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), - M_SCSICD, M_NOWAIT); + M_SCSICD, M_NOWAIT | M_ZERO); if (rcap_buf == NULL) return (ENOMEM); @@ -2929,6 +2922,9 @@ cdsize(struct cam_periph *periph, u_int3 softc->params.disksize = scsi_4btoul(rcap_buf->addr) + 1; softc->params.blksize = scsi_4btoul(rcap_buf->length); + /* Make sure we got at least some block size. */ + if (error == 0 && softc->params.blksize == 0) + error = EIO; /* * SCSI-3 mandates that the reported blocksize shall be 2048. * Older drives sometimes report funny values, trim it down to From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 17:54:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6828106568F; Fri, 19 Feb 2010 17:54:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4BC58FC08; Fri, 19 Feb 2010 17:54:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JHs3iL056375; Fri, 19 Feb 2010 17:54:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JHs3Ge056372; Fri, 19 Feb 2010 17:54:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002191754.o1JHs3Ge056372@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Feb 2010 17:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204095 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 17:54:04 -0000 Author: mav Date: Fri Feb 19 17:54:03 2010 New Revision: 204095 URL: http://svn.freebsd.org/changeset/base/204095 Log: MFC r203873: With FBS enabled, we have no idea what command caused timeout. Implement same logic as in siis(4) - wait for other commands complete or timeout and then give some more time. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Fri Feb 19 17:45:47 2010 (r204094) +++ stable/8/sys/dev/ahci/ahci.c Fri Feb 19 17:54:03 2010 (r204095) @@ -1657,6 +1657,45 @@ ahci_execute_transaction(struct ahci_slo return; } +/* Must be called with channel locked. */ +static void +ahci_process_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_TIMEOUT); + } +} + +/* Must be called with channel locked. */ +static void +ahci_rearm_timeout(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < ch->numslots; i++) { + struct ahci_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < AHCI_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 2000, + (timeout_t*)ahci_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void ahci_timeout(struct ahci_slot *slot) @@ -1693,7 +1732,6 @@ ahci_timeout(struct ahci_slot *slot) ATA_INL(ch->r_mem, AHCI_P_SACT), ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD), ATA_INL(ch->r_mem, AHCI_P_SERR)); - ch->fatalerr = 1; /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; @@ -1705,14 +1743,28 @@ ahci_timeout(struct ahci_slot *slot) } xpt_done(fccb); } - /* Handle command with timeout. */ - ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); - /* Handle the rest of commands. */ - for (i = 0; i < ch->numslots; i++) { - /* Do we have a running request on slot? */ - if (ch->slot[i].state < AHCI_SLOT_RUNNING) - continue; - ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + if (!ch->fbs_enabled) { + /* Without FBS we know real timeout source. */ + ch->fatalerr = 1; + /* Handle command with timeout. */ + ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); + /* Handle the rest of commands. */ + for (i = 0; i < ch->numslots; i++) { + /* Do we have a running request on slot? */ + if (ch->slot[i].state < AHCI_SLOT_RUNNING) + continue; + ahci_end_transaction(&ch->slot[i], AHCI_ERR_INNOCENT); + } + } else { + /* With FBS we wait for other commands timeout and pray. */ + if (ch->toslots == 0) + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); + if ((ch->rslots & ~ch->toslots) == 0) + ahci_process_timeout(dev); + else + device_printf(dev, " ... waiting for slots %08x\n", + ch->rslots & ~ch->toslots); } } @@ -1809,10 +1861,6 @@ ahci_end_transaction(struct ahci_slot *s ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case AHCI_ERR_TIMEOUT: - /* Do no treat soft-reset timeout as fatal here. */ - if (ccb->ccb_h.func_code != XPT_ATA_IO || - !(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) - ch->fatalerr = 1; if (!ch->readlog) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; @@ -1828,6 +1876,11 @@ ahci_end_transaction(struct ahci_slot *s ch->oslots &= ~(1 << slot->slot); ch->rslots &= ~(1 << slot->slot); ch->aslots &= ~(1 << slot->slot); + if (et != AHCI_ERR_TIMEOUT) { + if (ch->toslots == (1 << slot->slot)) + xpt_release_simq(ch->sim, TRUE); + ch->toslots &= ~(1 << slot->slot); + } slot->state = AHCI_SLOT_EMPTY; slot->ccb = NULL; /* Update channel stats. */ @@ -1867,7 +1920,7 @@ ahci_end_transaction(struct ahci_slot *s /* If we have no other active commands, ... */ if (ch->rslots == 0) { /* if there was fatal error - reset port. */ - if (ch->fatalerr) { + if (ch->toslots != 0 || ch->fatalerr) { ahci_reset(dev); } else { /* if we have slots in error, we can reinit port. */ @@ -1879,7 +1932,10 @@ ahci_end_transaction(struct ahci_slot *s if (!ch->readlog && ch->numhslots) ahci_issue_read_log(dev); } - } + /* If all the rest of commands are in timeout - give them chance. */ + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != AHCI_ERR_TIMEOUT) + ahci_rearm_timeout(dev); /* Start PM timer. */ if (ch->numrslots == 0 && ch->pm_level > 3) { callout_schedule(&ch->pm_timer, @@ -2143,7 +2199,10 @@ ahci_reset(device_t dev) ch->hold[i] = NULL; ch->numhslots--; } + if (ch->toslots != 0) + xpt_release_simq(ch->sim, TRUE); ch->eslots = 0; + ch->toslots = 0; ch->fatalerr = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Fri Feb 19 17:45:47 2010 (r204094) +++ stable/8/sys/dev/ahci/ahci.h Fri Feb 19 17:54:03 2010 (r204095) @@ -401,6 +401,7 @@ struct ahci_channel { uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ uint32_t eslots; /* Slots in error */ + uint32_t toslots; /* Slots in timeout */ int numrslots; /* Number of running slots */ int numrslotspd[16];/* Number of running slots per dev */ int numtslots; /* Number of tagged slots */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 18:00:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13A42106566C; Fri, 19 Feb 2010 18:00:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD38F8FC17; Fri, 19 Feb 2010 18:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JI0cak057946; Fri, 19 Feb 2010 18:00:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JI0cDY057943; Fri, 19 Feb 2010 18:00:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201002191800.o1JI0cDY057943@svn.freebsd.org> From: Michael Tuexen Date: Fri, 19 Feb 2010 18:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204096 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 18:00:39 -0000 Author: tuexen Date: Fri Feb 19 18:00:38 2010 New Revision: 204096 URL: http://svn.freebsd.org/changeset/base/204096 Log: * Fix another u_long -> uint32_t issue. * Remove an unused global variable. * Fix an issue reported by Bruce Cran related to reusing SCTP socket which where connected. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Feb 19 17:54:03 2010 (r204095) +++ head/sys/netinet/sctp_usrreq.c Fri Feb 19 18:00:38 2010 (r204096) @@ -980,7 +980,9 @@ sctp_shutdown(struct socket *so) /* For UDP model this is a invalid call */ if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { /* Restore the flags that the soshutdown took away. */ + SOCKBUF_LOCK(&so->so_rcv); so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); /* This proc will wakeup for read and do nothing (I hope) */ SCTP_INP_RUNLOCK(inp); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP); @@ -4465,6 +4467,15 @@ sctp_connect(struct socket *so, struct s if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; /* Set the connected flag so we can queue data */ + SOCKBUF_LOCK(&so->so_rcv); + so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); + SOCKBUF_LOCK(&so->so_snd); + so->so_snd.sb_state &= ~SBS_CANTSENDMORE; + SOCKBUF_UNLOCK(&so->so_snd); + SOCK_LOCK(so); + so->so_state &= ~SS_ISDISCONNECTING; + SOCK_UNLOCK(so); soisconnecting(so); } SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri Feb 19 17:54:03 2010 (r204095) +++ head/sys/netinet/sctputil.c Fri Feb 19 18:00:38 2010 (r204096) @@ -849,7 +849,7 @@ retry: uint32_t sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int save_in_twait) { - u_long x, not_done; + uint32_t x, not_done; struct timeval now; (void)SCTP_GETTIME_TIMEVAL(&now); @@ -2751,8 +2751,6 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa return (EFAULT); } -int sctp_asoc_change_wake = 0; - static void sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -2806,7 +2804,6 @@ sctp_notify_assoc_change(uint32_t event, SCTP_SOCKET_UNLOCK(so, 1); } #endif - sctp_asoc_change_wake++; } if (sctp_is_feature_off(stcb->sctp_ep, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { /* event not enabled */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 18:01:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F068F1065693; Fri, 19 Feb 2010 18:01:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDB208FC17; Fri, 19 Feb 2010 18:01:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JI1Wh9058184; Fri, 19 Feb 2010 18:01:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JI1WRv058183; Fri, 19 Feb 2010 18:01:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002191801.o1JI1WRv058183@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Feb 2010 18:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204097 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 18:01:33 -0000 Author: mav Date: Fri Feb 19 18:01:32 2010 New Revision: 204097 URL: http://svn.freebsd.org/changeset/base/204097 Log: Mark r203870 as merged. It was accidentally committed before. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 18:07:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769EE106566B; Fri, 19 Feb 2010 18:07:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B81B8FC14; Fri, 19 Feb 2010 18:07:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JI7pHh059659; Fri, 19 Feb 2010 18:07:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JI7pg6059635; Fri, 19 Feb 2010 18:07:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002191807.o1JI7pg6059635@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Feb 2010 18:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204098 - stable/8/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 18:07:51 -0000 Author: mav Date: Fri Feb 19 18:07:51 2010 New Revision: 204098 URL: http://svn.freebsd.org/changeset/base/204098 Log: MFC r203528: Add pci_get|set_max_read_req() helper functions to control maximum PCIe read request size. Modified: stable/8/sys/dev/pci/pci.c stable/8/sys/dev/pci/pcivar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Fri Feb 19 18:01:32 2010 (r204097) +++ stable/8/sys/dev/pci/pci.c Fri Feb 19 18:07:51 2010 (r204098) @@ -1592,6 +1592,40 @@ pci_ht_map_msi(device_t dev, uint64_t ad } } +int +pci_get_max_read_req(device_t dev) +{ + int cap; + uint16_t val; + + if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + return (0); + val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); + val &= PCIM_EXP_CTL_MAX_READ_REQUEST; + val >>= 12; + return (1 << (val + 7)); +} + +int +pci_set_max_read_req(device_t dev, int size) +{ + int cap; + uint16_t val; + + if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + return (0); + if (size < 128) + size = 128; + if (size > 4096) + size = 4096; + size = (1 << (fls(size) - 1)); + val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); + val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST; + val |= (fls(size) - 8) << 12; + pci_write_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, val, 2); + return (size); +} + /* * Support for MSI message signalled interrupts. */ Modified: stable/8/sys/dev/pci/pcivar.h ============================================================================== --- stable/8/sys/dev/pci/pcivar.h Fri Feb 19 18:01:32 2010 (r204097) +++ stable/8/sys/dev/pci/pcivar.h Fri Feb 19 18:07:51 2010 (r204098) @@ -458,6 +458,9 @@ int pci_msi_device_blacklisted(device_t void pci_ht_map_msi(device_t dev, uint64_t addr); +int pci_get_max_read_req(device_t dev); +int pci_set_max_read_req(device_t dev, int size); + #endif /* _SYS_BUS_H_ */ /* From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 18:15:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13EEE106566B; Fri, 19 Feb 2010 18:15:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 023738FC08; Fri, 19 Feb 2010 18:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JIFjWM061436; Fri, 19 Feb 2010 18:15:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JIFjvK061434; Fri, 19 Feb 2010 18:15:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201002191815.o1JIFjvK061434@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Feb 2010 18:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204099 - stable/8/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 18:15:46 -0000 Author: mav Date: Fri Feb 19 18:15:45 2010 New Revision: 204099 URL: http://svn.freebsd.org/changeset/base/204099 Log: MFC r200291, r203529: Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes. It gives those beasts additional 10% of write bandwidth. Use new helper functions to do it. Modified: stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Fri Feb 19 18:07:51 2010 (r204098) +++ stable/8/sys/dev/siis/siis.c Fri Feb 19 18:15:45 2010 (r204099) @@ -231,6 +231,9 @@ siis_resume(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); + /* Set PCIe max read request size to at least 1024 bytes */ + if (pci_get_max_read_req(dev) < 1024) + pci_set_max_read_req(dev, 1024); /* Put controller into reset state. */ ctlr->gctl |= SIIS_GCTL_GRESET; ATA_OUTL(ctlr->r_gmem, SIIS_GCTL, ctlr->gctl); From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 18:23:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62039106568B; Fri, 19 Feb 2010 18:23:46 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 505908FC14; Fri, 19 Feb 2010 18:23:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JINk8E063256; Fri, 19 Feb 2010 18:23:46 GMT (envelope-from deischen@svn.freebsd.org) Received: (from deischen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JINki9063254; Fri, 19 Feb 2010 18:23:46 GMT (envelope-from deischen@svn.freebsd.org) Message-Id: <201002191823.o1JINki9063254@svn.freebsd.org> From: Daniel Eischen Date: Fri, 19 Feb 2010 18:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204100 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 18:23:46 -0000 Author: deischen Date: Fri Feb 19 18:23:45 2010 New Revision: 204100 URL: http://svn.freebsd.org/changeset/base/204100 Log: Correct spelling of reseting (found while researching the "bb hang detected" messages that are plaguing me). While I'm here, delete trailing whitespace. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Feb 19 18:15:45 2010 (r204099) +++ head/sys/dev/ath/if_ath.c Fri Feb 19 18:23:45 2010 (r204100) @@ -42,9 +42,9 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" #include -#include +#include #include -#include +#include #include #include #include @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include - + #include #include #include @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET -#include +#include #include #endif @@ -467,7 +467,7 @@ ath_attach(u_int16_t devid, struct ath_s /* * Allocate hardware transmit queues: one queue for * beacon frames and one data queue for each QoS - * priority. Note that the hal handles reseting + * priority. Note that the hal handles resetting * these queues at the needed time. * * XXX PS-Poll @@ -758,7 +758,7 @@ ath_detach(struct ath_softc *sc) DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags %x\n", __func__, ifp->if_flags); - /* + /* * NB: the order of these is important: * o stop the chip so no more interrupts will fire * o call the 802.11 layer before detaching the hal to @@ -1475,7 +1475,7 @@ ath_bmiss_proc(void *arg, int pending) DPRINTF(sc, ATH_DEBUG_ANY, "%s: pending %u\n", __func__, pending); if (ath_hal_gethangstate(sc->sc_ah, 0xff, &hangs) && hangs != 0) { - if_printf(ifp, "bb hang detected (0x%x), reseting\n", hangs); + if_printf(ifp, "bb hang detected (0x%x), resetting\n", hangs); ath_reset(ifp); } else ieee80211_beacon_miss(ifp->if_l2com); @@ -1838,7 +1838,7 @@ ath_start(struct ifnet *ifp) * go out or none... */ STAILQ_INIT(&frags); - if ((m->m_flags & M_FRAG) && + if ((m->m_flags & M_FRAG) && !ath_txfrag_setup(sc, &frags, m, ni)) { DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of txfrag buffers\n", __func__); @@ -3356,7 +3356,7 @@ ath_descdma_setup(struct ath_softc *sc, } error = bus_dmamem_alloc(dd->dd_dmat, (void**) &dd->dd_desc, - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &dd->dd_dmamap); if (error != 0) { if_printf(ifp, "unable to alloc memory for %u %s descriptors, " @@ -3792,7 +3792,7 @@ ath_rx_proc(void *arg, int npending) /* * If mbuf allocation failed previously there * will be no mbuf; try again to re-populate it. - */ + */ /* XXX make debug msg */ if_printf(ifp, "%s: no mbuf!\n", __func__); STAILQ_REMOVE_HEAD(&sc->sc_rxbuf, bf_list); @@ -3863,7 +3863,7 @@ ath_rx_proc(void *arg, int npending) bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); - ath_handle_micerror(ic, + ath_handle_micerror(ic, mtod(m, struct ieee80211_frame *), sc->sc_splitmic ? rs->rs_keyix-32 : rs->rs_keyix); @@ -4040,7 +4040,7 @@ rx_accept: */ if (type == IEEE80211_FC0_TYPE_DATA) { const HAL_RATE_TABLE *rt = sc->sc_currates; - ath_led_event(sc, + ath_led_event(sc, rt->rateCodeToIndex[rs->rs_rate]); } else if (ticks - sc->sc_ledevent >= sc->sc_ledidle) ath_led_event(sc, 0); @@ -5322,7 +5322,7 @@ ath_startrecv(struct ath_softc *sc) return 0; } -/* +/* * Update internal state after a channel change. */ static void @@ -5342,7 +5342,7 @@ ath_chan_change(struct ath_softc *sc, st /* * Set/change channels. If the channel is really being changed, - * it's done by reseting the chip. To accomplish this we must + * it's done by resetting the chip. To accomplish this we must * first cleanup any pending DMA, then restart stuff after a la * ath_init. */ @@ -5541,7 +5541,7 @@ ath_set_channel(struct ieee80211com *ic) sc->sc_syncbeacon = 1; } -/* +/* * Walk the vap list and check if there any vap's in RUN state. */ static int @@ -5803,7 +5803,7 @@ ath_newassoc(struct ieee80211_node *ni, an->an_mgmtrix = ath_tx_findrix(sc, tp->mgmtrate); ath_rate_newassoc(sc, an, isnew); - if (isnew && + if (isnew && (vap->iv_flags & IEEE80211_F_PRIVACY) == 0 && sc->sc_hasclrkey && ni->ni_ucastkey.wk_keyix == IEEE80211_KEYIX_NONE) ath_setup_stationkey(ni); @@ -6048,7 +6048,7 @@ ath_setcurmode(struct ath_softc *sc, enu sc->sc_protrix = ath_tx_findrix(sc, 2*2); else sc->sc_protrix = ath_tx_findrix(sc, 2*1); - /* NB: caller is responsible for reseting rate control state */ + /* NB: caller is responsible for resetting rate control state */ #undef N } @@ -6123,7 +6123,7 @@ ath_watchdog(void *arg) if (ath_hal_gethangstate(sc->sc_ah, 0xffff, &hangs) && hangs != 0) { if_printf(ifp, "%s hang detected (0x%x)\n", - hangs & 0xff ? "bb" : "mac", hangs); + hangs & 0xff ? "bb" : "mac", hangs); } else if_printf(ifp, "device timeout\n"); ath_reset(ifp); @@ -6804,7 +6804,7 @@ ath_tx_raw_start(struct ath_softc *sc, s if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT)) ieee80211_dump_pkt(ic, mtod(m0, caddr_t), m0->m_len, sc->sc_hwmap[rix].ieeerate, -1); - + if (ieee80211_radiotap_active_vap(vap)) { u_int64_t tsf = ath_hal_gettsf64(ah); From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 20:18:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ED881065672; Fri, 19 Feb 2010 20:18:17 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2433C8FC15; Fri, 19 Feb 2010 20:18:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JKIHEg088416; Fri, 19 Feb 2010 20:18:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JKIHta088414; Fri, 19 Feb 2010 20:18:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201002192018.o1JKIHta088414@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 19 Feb 2010 20:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204101 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 20:18:17 -0000 Author: pjd Date: Fri Feb 19 20:18:16 2010 New Revision: 204101 URL: http://svn.freebsd.org/changeset/base/204101 Log: Don't set f_bsize to recordsize. It might confuse some software (like squid). Submitted by: Alexander Zagrebin MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Feb 19 18:23:45 2010 (r204100) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Feb 19 20:18:16 2010 (r204101) @@ -214,7 +214,7 @@ blksz_changed_cb(void *arg, uint64_t new newval = SPA_MAXBLOCKSIZE; zfsvfs->z_max_blksz = newval; - zfsvfs->z_vfs->vfs_bsize = newval; + zfsvfs->z_vfs->mnt_stat.f_iosize = newval; } static void @@ -577,7 +577,8 @@ zfs_domount(vfs_t *vfsp, char *osname) if (error = dsl_prop_get_integer(osname, "recordsize", &recordsize, NULL)) goto out; - zfsvfs->z_vfs->vfs_bsize = recordsize; + zfsvfs->z_vfs->vfs_bsize = SPA_MINBLOCKSIZE; + zfsvfs->z_vfs->mnt_stat.f_iosize = recordsize; vfsp->vfs_data = zfsvfs; vfsp->mnt_flag |= MNT_LOCAL; @@ -817,8 +818,8 @@ zfs_statfs(vfs_t *vfsp, struct statfs *s * We report the fragsize as the smallest block size we support, * and we report our blocksize as the filesystem's maximum blocksize. */ - statp->f_bsize = zfsvfs->z_vfs->vfs_bsize; - statp->f_iosize = zfsvfs->z_vfs->vfs_bsize; + statp->f_bsize = SPA_MINBLOCKSIZE; + statp->f_iosize = zfsvfs->z_vfs->mnt_stat.f_iosize; /* * The following report "total" blocks of various kinds in the @@ -826,7 +827,7 @@ zfs_statfs(vfs_t *vfsp, struct statfs *s * "fragment" size. */ - statp->f_blocks = (refdbytes + availbytes) / statp->f_bsize; + statp->f_blocks = (refdbytes + availbytes) >> SPA_MINBLOCKSHIFT; statp->f_bfree = availbytes / statp->f_bsize; statp->f_bavail = statp->f_bfree; /* no root reservation */ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 21:11:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A1C106566B; Fri, 19 Feb 2010 21:11:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 370B08FC15; Fri, 19 Feb 2010 21:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JLBfun000288; Fri, 19 Feb 2010 21:11:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JLBfDA000286; Fri, 19 Feb 2010 21:11:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002192111.o1JLBfDA000286@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Feb 2010 21:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204102 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 21:11:41 -0000 Author: marius Date: Fri Feb 19 21:11:40 2010 New Revision: 204102 URL: http://svn.freebsd.org/changeset/base/204102 Log: Hook up nfs_common missed in r203968. Submitted by: kib Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Feb 19 20:18:16 2010 (r204101) +++ head/sys/modules/Makefile Fri Feb 19 21:11:40 2010 (r204102) @@ -194,6 +194,7 @@ SUBDIR= ${_3dfx} \ ${_ndis} \ ${_netgraph} \ ${_nfe} \ + nfs_common \ nfscl \ nfsclient \ nfscommon \ From owner-svn-src-all@FreeBSD.ORG Fri Feb 19 23:54:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B3DB106566C; Fri, 19 Feb 2010 23:54:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED4528FC08; Fri, 19 Feb 2010 23:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1JNsCva035891; Fri, 19 Feb 2010 23:54:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1JNsCZJ035886; Fri, 19 Feb 2010 23:54:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002192354.o1JNsCZJ035886@svn.freebsd.org> From: Xin LI Date: Fri, 19 Feb 2010 23:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204103 - in head/usr.bin: . seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 23:54:13 -0000 Author: delphij Date: Fri Feb 19 23:54:12 2010 New Revision: 204103 URL: http://svn.freebsd.org/changeset/base/204103 Log: Add seq(1), a small utility to generate sequence number. Obtained from: NetBSD MFC after: 3 months Added: head/usr.bin/seq/ head/usr.bin/seq/Makefile (contents, props changed) head/usr.bin/seq/seq.1 (contents, props changed) head/usr.bin/seq/seq.c (contents, props changed) Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Feb 19 21:11:40 2010 (r204102) +++ head/usr.bin/Makefile Fri Feb 19 23:54:12 2010 (r204103) @@ -172,6 +172,7 @@ SUBDIR= alias \ ${_rwho} \ script \ sed \ + seq \ shar \ showmount \ ${_smbutil} \ Added: head/usr.bin/seq/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/seq/Makefile Fri Feb 19 23:54:12 2010 (r204103) @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.3 2009/04/14 22:15:26 lukem Exp $ +# $FreeBSD$ + +PROG= seq +DPADD= ${LIBM} +LDADD= -lm + +.include Added: head/usr.bin/seq/seq.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/seq/seq.1 Fri Feb 19 23:54:12 2010 (r204103) @@ -0,0 +1,187 @@ +.\" $NetBSD: seq.1,v 1.6 2008/11/26 15:03:47 ginsbach Exp $ +.\" +.\" Copyright (c) 2005 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Brian Ginsbach. +.\" +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 19, 2010 +.Dt SEQ 1 +.Os +.Sh NAME +.Nm seq +.Nd print sequences of numbers +.Sh SYNOPSIS +.Nm +.Op Fl w +.Op Fl f Ar format +.Op Fl s Ar string +.Op Fl t Ar string +.Op Ar first Op Ar incr +.Ar last +.Sh DESCRIPTION +The +.Nm +utility prints a sequence of numbers, one per line +.Pq default , +from +.Ar first +.Pq default 1 , +to near +.Ar last +as possible, in increments of +.Ar incr +.Pq default 1 . +When +.Ar first +is larger than +.Ar last +the default +.Ar incr +is -1. +.Pp +All numbers are interpreted as floating point. +.Pp +Normally integer values are printed as decimal integers. +.Pp +The +.Nm +utility accepts the following options: +.Bl -tag -width Ar +.It Fl f Ar format +Use a +.Xr printf 3 +style +.Ar format +to print each number. +Only the +.Cm E , +.Cm e , +.Cm f , +.Cm G , +.Cm g , +and +.Cm % +conversion characters are valid, along with any optional +flags and an optional numeric minimum field width or precision. +The +.Ar format +can contain character escape sequences in backslash notation as +defined in +.St -ansiC . +The default is +.Cm %g . +.It Fl s Ar string +Use +.Ar string +to separate numbers. +The +.Ar string +can contain character escape sequences in backslash notation as +defined in +.St -ansiC . +The default is +.Cm \en . +.It Fl t Ar string +Use +.Ar string +to terminate sequence of numbers. +The +.Ar string +can contain character escape sequences in backslash notation as +defined in +.St -ansiC . +This option is useful when the default separator +does not contain a +.Cm \en . +.It Fl w +Equalize the widths of all numbers by padding with zeros as necessary. +This option has no effect with the +.Fl f +option. +If any sequence numbers will be printed in exponential notation, +the default conversion is changed to +.Cm %e . +.El +.Pp +The +.Nm +utility exits 0 on success and non-zero if an error occurs. +.Sh EXAMPLES +.Bd -literal -offset indent +# seq 1 3 +1 +2 +3 + +# seq 3 1 +3 +2 +1 + +# seq -w 0 .05 .1 +0.00 +0.05 +0.10 +.Ed +.Sh SEE ALSO +.Xr jot 1 , +.Xr printf 1 , +.Xr printf 3 +.Sh HISTORY +The +.Nm +command first appeared in +.Tn "Plan 9 from Bell Labs" . +A +.Nm +command appeared in +.Nx 3.0 , +and ported to +.Fx 9.0 . +This command was based on the command of the same name in +.Tn "Plan 9 from Bell Labs" +and the +.Tn GNU +core utilities. +The +.Tn GNU +.Nm +command first appeared in the 1.13 shell utilities release. +.Sh BUGS +The +.Fl w +option does not handle the transition from pure floating point +to exponent representation very well. +The +.Nm +command is not bug for bug compatible with the +.Tn "Plan 9 from Bell Labs" +or +.Tn GNU +versions of +.Nm . Added: head/usr.bin/seq/seq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/seq/seq.c Fri Feb 19 23:54:12 2010 (r204103) @@ -0,0 +1,452 @@ +/* $NetBSD: seq.c,v 1.5 2008/07/21 14:19:26 lukem Exp $ */ +/* + * Copyright (c) 2005 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Brian Ginsbach. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define ZERO '0' +#define SPACE ' ' + +#define MAX(a, b) (((a) < (b))? (b) : (a)) +#define ISSIGN(c) ((int)(c) == '-' || (int)(c) == '+') +#define ISEXP(c) ((int)(c) == 'e' || (int)(c) == 'E') +#define ISODIGIT(c) ((int)(c) >= '0' && (int)(c) <= '7') + +/* Globals */ + +const char *decimal_point = "."; /* default */ +char default_format[] = { "%g" }; /* default */ + +/* Prototypes */ + +double e_atof(const char *); + +int decimal_places(const char *); +int main(int, char *[]); +int numeric(const char *); +int valid_format(const char *); + +char *generate_format(double, double, double, int, char); +char *unescape(char *); + +/* + * The seq command will print out a numeric sequence from 1, the default, + * to a user specified upper limit by 1. The lower bound and increment + * maybe indicated by the user on the command line. The sequence can + * be either whole, the default, or decimal numbers. + */ +int +main(int argc, char *argv[]) +{ + int c = 0, errflg = 0; + int equalize = 0; + double first = 1.0; + double last = 0.0; + double incr = 0.0; + struct lconv *locale; + char *fmt = NULL; + const char *sep = "\n"; + const char *term = NULL; + char pad = ZERO; + + /* Determine the locale's decimal point. */ + locale = localeconv(); + if (locale && locale->decimal_point && locale->decimal_point[0] != '\0') + decimal_point = locale->decimal_point; + + /* + * Process options, but handle negative numbers separately + * least they trip up getopt(3). + */ + while ((optind < argc) && !numeric(argv[optind]) && + (c = getopt(argc, argv, "f:hs:t:w")) != -1) { + + switch (c) { + case 'f': /* format (plan9) */ + fmt = optarg; + equalize = 0; + break; + case 's': /* separator (GNU) */ + sep = unescape(optarg); + break; + case 't': /* terminator (new) */ + term = unescape(optarg); + break; + case 'w': /* equal width (plan9) */ + if (!fmt) + if (equalize++) + pad = SPACE; + break; + case 'h': /* help (GNU) */ + default: + errflg++; + break; + } + } + + argc -= optind; + argv += optind; + if (argc < 1 || argc > 3) + errflg++; + + if (errflg) { + fprintf(stderr, + "usage: %s [-w] [-f format] [-s string] [-t string] [first [incr]] last\n", + getprogname()); + exit(1); + } + + last = e_atof(argv[argc - 1]); + + if (argc > 1) + first = e_atof(argv[0]); + + if (argc > 2) { + incr = e_atof(argv[1]); + /* Plan 9/GNU don't do zero */ + if (incr == 0.0) + errx(1, "zero %screment", (first < last)? "in" : "de"); + } + + /* default is one for Plan 9/GNU work alike */ + if (incr == 0.0) + incr = (first < last) ? 1.0 : -1.0; + + if (incr <= 0.0 && first < last) + errx(1, "needs positive increment"); + + if (incr >= 0.0 && first > last) + errx(1, "needs negative decrement"); + + if (fmt != NULL) { + if (!valid_format(fmt)) + errx(1, "invalid format string: `%s'", fmt); + fmt = unescape(fmt); + /* + * XXX to be bug for bug compatible with Plan 9 add a + * newline if none found at the end of the format string. + */ + } else + fmt = generate_format(first, incr, last, equalize, pad); + + if (incr > 0) { + for (; first <= last; first += incr) { + printf(fmt, first); + fputs(sep, stdout); + } + } else { + for (; first >= last; first += incr) { + printf(fmt, first); + fputs(sep, stdout); + } + } + if (term != NULL) + fputs(term, stdout); + + return (0); +} + +/* + * numeric - verify that string is numeric + */ +int +numeric(const char *s) +{ + int seen_decimal_pt, decimal_pt_len; + + /* skip any sign */ + if (ISSIGN((unsigned char)*s)) + s++; + + seen_decimal_pt = 0; + decimal_pt_len = strlen(decimal_point); + while (*s) { + if (!isdigit((unsigned char)*s)) { + if (!seen_decimal_pt && + strncmp(s, decimal_point, decimal_pt_len) == 0) { + s += decimal_pt_len; + seen_decimal_pt = 1; + continue; + } + if (ISEXP((unsigned char)*s)) { + s++; + if (ISSIGN((unsigned char)*s)) { + s++; + continue; + } + } + break; + } + s++; + } + return (*s == '\0'); +} + +/* + * valid_format - validate user specified format string + */ +int +valid_format(const char *fmt) +{ + int conversions = 0; + + while (*fmt != '\0') { + /* scan for conversions */ + if (*fmt != '\0' && *fmt != '%') { + do { + fmt++; + } while (*fmt != '\0' && *fmt != '%'); + } + /* scan a conversion */ + if (*fmt != '\0') { + do { + fmt++; + + /* ok %% */ + if (*fmt == '%') { + fmt++; + break; + } + /* valid conversions */ + if (strchr("eEfgG", *fmt) && + conversions++ < 1) { + fmt++; + break; + } + /* flags, width and precsision */ + if (isdigit((unsigned char)*fmt) || + strchr("+- 0#.", *fmt)) + continue; + + /* oops! bad conversion format! */ + return (0); + } while (*fmt != '\0'); + } + } + + return (conversions <= 1); +} + +/* + * unescape - handle C escapes in a string + */ +char * +unescape(char *orig) +{ + char c, *cp, *new = orig; + int i; + + for (cp = orig; (*orig = *cp); cp++, orig++) { + if (*cp != '\\') + continue; + + switch (*++cp) { + case 'a': /* alert (bell) */ + *orig = '\a'; + continue; + case 'b': /* backspace */ + *orig = '\b'; + continue; + case 'e': /* escape */ + *orig = '\e'; + continue; + case 'f': /* formfeed */ + *orig = '\f'; + continue; + case 'n': /* newline */ + *orig = '\n'; + continue; + case 'r': /* carriage return */ + *orig = '\r'; + continue; + case 't': /* horizontal tab */ + *orig = '\t'; + continue; + case 'v': /* vertical tab */ + *orig = '\v'; + continue; + case '\\': /* backslash */ + *orig = '\\'; + continue; + case '\'': /* single quote */ + *orig = '\''; + continue; + case '\"': /* double quote */ + *orig = '"'; + continue; + case '0': + case '1': + case '2': + case '3': /* octal */ + case '4': + case '5': + case '6': + case '7': /* number */ + for (i = 0, c = 0; + ISODIGIT((unsigned char)*cp) && i < 3; + i++, cp++) { + c <<= 3; + c |= (*cp - '0'); + } + *orig = c; + --cp; + continue; + case 'x': /* hexidecimal number */ + cp++; /* skip 'x' */ + for (i = 0, c = 0; + isxdigit((unsigned char)*cp) && i < 2; + i++, cp++) { + c <<= 4; + if (isdigit((unsigned char)*cp)) + c |= (*cp - '0'); + else + c |= ((toupper((unsigned char)*cp) - + 'A') + 10); + } + *orig = c; + --cp; + continue; + default: + --cp; + break; + } + } + + return (new); +} + +/* + * e_atof - convert an ASCII string to a double + * exit if string is not a valid double, or if converted value would + * cause overflow or underflow + */ +double +e_atof(const char *num) +{ + char *endp; + double dbl; + + errno = 0; + dbl = strtod(num, &endp); + + if (errno == ERANGE) + /* under or overflow */ + err(2, "%s", num); + else if (*endp != '\0') + /* "junk" left in number */ + errx(2, "invalid floating point argument: %s", num); + + /* zero shall have no sign */ + if (dbl == -0.0) + dbl = 0; + return (dbl); +} + +/* + * decimal_places - count decimal places in a number (string) + */ +int +decimal_places(const char *number) +{ + int places = 0; + char *dp; + + /* look for a decimal point */ + if ((dp = strstr(number, decimal_point))) { + dp += strlen(decimal_point); + + while (isdigit((unsigned char)*dp++)) + places++; + } + return (places); +} + +/* + * generate_format - create a format string + * + * XXX to be bug for bug compatable with Plan9 and GNU return "%g" + * when "%g" prints as "%e" (this way no width adjustments are made) + */ +char * +generate_format(double first, double incr, double last, int equalize, char pad) +{ + static char buf[256]; + char cc = '\0'; + int precision, width1, width2, places; + + if (equalize == 0) + return (default_format); + + /* figure out "last" value printed */ + if (first > last) + last = first - incr * floor((first - last) / incr); + else + last = first + incr * floor((last - first) / incr); + + sprintf(buf, "%g", incr); + if (strchr(buf, 'e')) + cc = 'e'; + precision = decimal_places(buf); + + width1 = sprintf(buf, "%g", first); + if (strchr(buf, 'e')) + cc = 'e'; + if ((places = decimal_places(buf))) + width1 -= (places + strlen(decimal_point)); + + precision = MAX(places, precision); + + width2 = sprintf(buf, "%g", last); + if (strchr(buf, 'e')) + cc = 'e'; + if ((places = decimal_places(buf))) + width2 -= (places + strlen(decimal_point)); + + if (precision) { + sprintf(buf, "%%%c%d.%d%c", pad, + MAX(width1, width2) + (int) strlen(decimal_point) + + precision, precision, (cc) ? cc : 'f'); + } else { + sprintf(buf, "%%%c%d%c", pad, MAX(width1, width2), + (cc) ? cc : 'g'); + } + + return (buf); +} From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 00:16:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B3191065670; Sat, 20 Feb 2010 00:16:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEB58FC08; Sat, 20 Feb 2010 00:16:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K0Gisa040896; Sat, 20 Feb 2010 00:16:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K0GiLW040894; Sat, 20 Feb 2010 00:16:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002200016.o1K0GiLW040894@svn.freebsd.org> From: Xin LI Date: Sat, 20 Feb 2010 00:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204104 - head/usr.bin/jot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 00:16:45 -0000 Author: delphij Date: Sat Feb 20 00:16:44 2010 New Revision: 204104 URL: http://svn.freebsd.org/changeset/base/204104 Log: Add a reference to newly added seq(1) command. Submitted by: jilles MFC after: 3 months Modified: head/usr.bin/jot/jot.1 Modified: head/usr.bin/jot/jot.1 ============================================================================== --- head/usr.bin/jot/jot.1 Fri Feb 19 23:54:12 2010 (r204103) +++ head/usr.bin/jot/jot.1 Sat Feb 20 00:16:44 2010 (r204104) @@ -32,7 +32,7 @@ .\" @(#)jot.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 6, 2006 +.Dd February 19, 2010 .Dt JOT 1 .Os .Sh NAME @@ -239,6 +239,7 @@ but only one is allowed. .Xr ed 1 , .Xr expand 1 , .Xr rs 1 , +.Xr seq 1 , .Xr yes 1 , .Xr arc4random 3 , .Xr printf 3 , From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 00:19:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA14B106566B; Sat, 20 Feb 2010 00:19:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9F1F8FC0A; Sat, 20 Feb 2010 00:19:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K0JLMd041484; Sat, 20 Feb 2010 00:19:21 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K0JLUQ041482; Sat, 20 Feb 2010 00:19:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201002200019.o1K0JLUQ041482@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 20 Feb 2010 00:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204105 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 00:19:21 -0000 Author: jkim Date: Sat Feb 20 00:19:21 2010 New Revision: 204105 URL: http://svn.freebsd.org/changeset/base/204105 Log: Return partially filled buffer for non-blocking read(2) in non-immediate mode. PR: kern/143855 Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Sat Feb 20 00:16:44 2010 (r204104) +++ head/sys/net/bpf.c Sat Feb 20 00:19:21 2010 (r204105) @@ -664,8 +664,9 @@ static int bpfread(struct cdev *dev, struct uio *uio, int ioflag) { struct bpf_d *d; - int timed_out; int error; + int non_block; + int timed_out; error = devfs_get_cdevpriv((void **)&d); if (error != 0) @@ -678,6 +679,8 @@ bpfread(struct cdev *dev, struct uio *ui if (uio->uio_resid != d->bd_bufsize) return (EINVAL); + non_block = ((ioflag & O_NONBLOCK) != 0); + BPFD_LOCK(d); d->bd_pid = curthread->td_proc->p_pid; if (d->bd_bufmode != BPF_BUFMODE_BUFFER) { @@ -694,14 +697,20 @@ bpfread(struct cdev *dev, struct uio *ui * have arrived to fill the store buffer. */ while (d->bd_hbuf == NULL) { - if ((d->bd_immediate || timed_out) && d->bd_slen != 0) { + if (d->bd_slen != 0) { /* * A packet(s) either arrived since the previous * read or arrived while we were asleep. - * Rotate the buffers and return what's here. */ - ROTATE_BUFFERS(d); - break; + if (d->bd_immediate || non_block || timed_out) { + /* + * Rotate the buffers and return what's here + * if we are in immediate mode, non-blocking + * flag is set, or this descriptor timed out. + */ + ROTATE_BUFFERS(d); + break; + } } /* @@ -715,7 +724,7 @@ bpfread(struct cdev *dev, struct uio *ui return (ENXIO); } - if (ioflag & O_NONBLOCK) { + if (non_block) { BPFD_UNLOCK(d); return (EWOULDBLOCK); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 01:05:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97347106566C; Sat, 20 Feb 2010 01:05:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 865C98FC0A; Sat, 20 Feb 2010 01:05:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K15UEH051697; Sat, 20 Feb 2010 01:05:30 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K15U3L051695; Sat, 20 Feb 2010 01:05:30 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201002200105.o1K15U3L051695@svn.freebsd.org> From: Ed Maste Date: Sat, 20 Feb 2010 01:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204106 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 01:05:30 -0000 Author: emaste Date: Sat Feb 20 01:05:30 2010 New Revision: 204106 URL: http://svn.freebsd.org/changeset/base/204106 Log: Avoid corrupting the list or queue if _REMOVE is invoked with a reference to the head. PR: kern/119307 MFC After: 1 week Modified: head/sys/sys/queue.h Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Sat Feb 20 00:19:21 2010 (r204105) +++ head/sys/sys/queue.h Sat Feb 20 01:05:30 2010 (r204106) @@ -112,6 +112,7 @@ struct qm_trace { #define TRACEBUF struct qm_trace trace; #define TRASHIT(x) do {(x) = (void *)-1;} while (0) +#define QMD_SAVELINK(name, link) void **name = (void *)&(link) #define QMD_TRACE_HEAD(head) do { \ (head)->trace.prevline = (head)->trace.lastline; \ @@ -130,6 +131,7 @@ struct qm_trace { #else #define QMD_TRACE_ELEM(elem) #define QMD_TRACE_HEAD(head) +#define QMD_SAVELINK(name, link) #define TRACEBUF #define TRASHIT(x) #endif /* QUEUE_MACRO_DEBUG */ @@ -189,6 +191,7 @@ struct { \ #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_REMOVE(head, elm, type, field) do { \ + QMD_SAVELINK(oldnext, (elm)->field.sle_next); \ if (SLIST_FIRST((head)) == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ @@ -198,7 +201,7 @@ struct { \ curelm = SLIST_NEXT(curelm, field); \ SLIST_REMOVE_AFTER(curelm, field); \ } \ - TRASHIT((elm)->field.sle_next); \ + TRASHIT(*oldnext); \ } while (0) #define SLIST_REMOVE_AFTER(elm, field) do { \ @@ -285,6 +288,7 @@ struct { \ #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) #define STAILQ_REMOVE(head, elm, type, field) do { \ + QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \ if (STAILQ_FIRST((head)) == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } \ @@ -294,7 +298,7 @@ struct { \ curelm = STAILQ_NEXT(curelm, field); \ STAILQ_REMOVE_AFTER(head, curelm, field); \ } \ - TRASHIT((elm)->field.stqe_next); \ + TRASHIT(*oldnext); \ } while (0) #define STAILQ_REMOVE_HEAD(head, field) do { \ @@ -415,14 +419,16 @@ struct { \ #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_REMOVE(elm, field) do { \ + QMD_SAVELINK(oldnext, (elm)->field.le_next); \ + QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ QMD_LIST_CHECK_NEXT(elm, field); \ QMD_LIST_CHECK_PREV(elm, field); \ if (LIST_NEXT((elm), field) != NULL) \ LIST_NEXT((elm), field)->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ - TRASHIT((elm)->field.le_next); \ - TRASHIT((elm)->field.le_prev); \ + TRASHIT(*oldnext); \ + TRASHIT(*oldprev); \ } while (0) #define LIST_SWAP(head1, head2, type, field) do { \ @@ -587,6 +593,8 @@ struct { \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_REMOVE(head, elm, field) do { \ + QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ + QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ QMD_TAILQ_CHECK_NEXT(elm, field); \ QMD_TAILQ_CHECK_PREV(elm, field); \ if ((TAILQ_NEXT((elm), field)) != NULL) \ @@ -597,8 +605,8 @@ struct { \ QMD_TRACE_HEAD(head); \ } \ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ - TRASHIT((elm)->field.tqe_next); \ - TRASHIT((elm)->field.tqe_prev); \ + TRASHIT(*oldnext); \ + TRASHIT(*oldprev); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 01:23:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E82A1065679; Sat, 20 Feb 2010 01:23:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1E28FC0C; Sat, 20 Feb 2010 01:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K1NFv7055602; Sat, 20 Feb 2010 01:23:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K1NFv3055600; Sat, 20 Feb 2010 01:23:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002200123.o1K1NFv3055600@svn.freebsd.org> From: Xin LI Date: Sat, 20 Feb 2010 01:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204107 - head/usr.bin/seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 01:23:16 -0000 Author: delphij Date: Sat Feb 20 01:23:15 2010 New Revision: 204107 URL: http://svn.freebsd.org/changeset/base/204107 Log: Treat numbers after [Ee] a positive number rather than an invalid one. Modified: head/usr.bin/seq/seq.c Modified: head/usr.bin/seq/seq.c ============================================================================== --- head/usr.bin/seq/seq.c Sat Feb 20 01:05:30 2010 (r204106) +++ head/usr.bin/seq/seq.c Sat Feb 20 01:23:15 2010 (r204107) @@ -207,7 +207,8 @@ numeric(const char *s) } if (ISEXP((unsigned char)*s)) { s++; - if (ISSIGN((unsigned char)*s)) { + if (ISSIGN((unsigned char)*s) || + isdigit((unsigned char)*s)) { s++; continue; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 03:19:55 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 18950106566B; Sat, 20 Feb 2010 03:19:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Fri, 19 Feb 2010 22:19:42 -0500 User-Agent: KMail/1.6.2 References: <201002200019.o1K0JLUQ041482@svn.freebsd.org> In-Reply-To: <201002200019.o1K0JLUQ041482@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002192219.46977.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r204105 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 03:19:55 -0000 On Friday 19 February 2010 07:19 pm, Jung-uk Kim wrote: > Author: jkim > Date: Sat Feb 20 00:19:21 2010 > New Revision: 204105 > URL: http://svn.freebsd.org/changeset/base/204105 > > Log: > Return partially filled buffer for non-blocking read(2) > in non-immediate mode. > > PR: kern/143855 Submitted by: Guy Harris Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 06:39:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D9511065672; Sat, 20 Feb 2010 06:39:14 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4358FC0C; Sat, 20 Feb 2010 06:39:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K6dEgc024991; Sat, 20 Feb 2010 06:39:14 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K6dEfn024981; Sat, 20 Feb 2010 06:39:14 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002200639.o1K6dEfn024981@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Feb 2010 06:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204108 - in head/sys: conf mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 06:39:14 -0000 Author: neel Date: Sat Feb 20 06:39:14 2010 New Revision: 204108 URL: http://svn.freebsd.org/changeset/base/204108 Log: Get rid of unused options: KERNPHYSADDR, KERNVIRTADDR, PHYSADDR, PHYS_ADDR_64BIT Discussed with: gonzo, imp Modified: head/sys/conf/options.mips head/sys/mips/conf/ADM5120 head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 head/sys/mips/conf/OCTEON1-32 head/sys/mips/conf/QEMU head/sys/mips/conf/SWARM head/sys/mips/conf/XLR Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/conf/options.mips Sat Feb 20 06:39:14 2010 (r204108) @@ -48,10 +48,6 @@ CFE_CONSOLE opt_global.h CFE_ENV opt_global.h CFE_ENV_SIZE opt_global.h -KERNPHYSADDR opt_global.h -KERNVIRTADDR opt_global.h -PHYSADDR opt_global.h -PHYS_ADDR_64BIT opt_global.h NOFPU opt_global.h TARGET_OCTEON opt_global.h TARGET_EMULATOR opt_ddb.h Modified: head/sys/mips/conf/ADM5120 ============================================================================== --- head/sys/mips/conf/ADM5120 Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/ADM5120 Sat Feb 20 06:39:14 2010 (r204108) @@ -25,7 +25,6 @@ makeoptions MIPS_LITTLE_ENDIAN=defined # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNVIRTADDR=0x80100000 include "../adm5120/std.adm5120" hints "ADM5120.hints" #Default places to look for devices. Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/MALTA Sat Feb 20 06:39:14 2010 (r204108) @@ -28,7 +28,6 @@ options YAMON # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNVIRTADDR=0x80100000 options TICK_USE_YAMON_FREQ=defined #options TICK_USE_MALTA_RTC=defined Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/MALTA64 Sat Feb 20 06:39:14 2010 (r204108) @@ -29,7 +29,6 @@ options YAMON # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNVIRTADDR=0x80100000 options TICK_USE_YAMON_FREQ=defined #options TICK_USE_MALTA_RTC=defined Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/OCTEON1 Sat Feb 20 06:39:14 2010 (r204108) @@ -37,7 +37,6 @@ makeoptions TARGET_BIG_ENDIAN=define makeoptions TARGET_64BIT=defined makeoptions KERNLOADADDR=0xffffffff80100000 -options KERNVIRTADDR=0xffffffff80100000 include "../cavium/std.octeon1" hints "OCTEON1.hints" #Default places to look for devices. Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/OCTEON1-32 Sat Feb 20 06:39:14 2010 (r204108) @@ -26,7 +26,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions TARGET_BIG_ENDIAN=defined makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1.32 -options KERNVIRTADDR=0x81000000 makeoptions KERNLOADADDR=0x81000000 include "../cavium/std.octeon1" Modified: head/sys/mips/conf/QEMU ============================================================================== --- head/sys/mips/conf/QEMU Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/QEMU Sat Feb 20 06:39:14 2010 (r204108) @@ -27,7 +27,6 @@ makeoptions ARCH_FLAGS=-march=mips32 # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" -options KERNVIRTADDR=0x80100000 include "../adm5120/std.adm5120" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/SWARM Sat Feb 20 06:39:14 2010 (r204108) @@ -19,11 +19,6 @@ options CFE_CONSOLE options CFE_ENV options ALT_BREAK_TO_DEBUGGER -# cfe loader expects kernel at 0x80001000 for mips32 w/o backwards -# offsets in the linked elf image (see ldscript hack) -# XXX can we conditionalize the linker stuff on options CFE? -options KERNVIRTADDR=0x80001000 - makeoptions LDSCRIPT_NAME= ldscript.mips.cfe #cpu CPU_MIPS64 Modified: head/sys/mips/conf/XLR ============================================================================== --- head/sys/mips/conf/XLR Sat Feb 20 01:23:15 2010 (r204107) +++ head/sys/mips/conf/XLR Sat Feb 20 06:39:14 2010 (r204108) @@ -53,7 +53,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions TARGET_BIG_ENDIAN # -options KERNVIRTADDR=0x80100000 include "../rmi/std.xlr" @@ -87,7 +86,6 @@ options ROOTDEVNAME=\"nfs:10.1.1.8:/usr #options ROOTDEVNAME=\"ufs:md0\" options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options HZ=1000 -options PHYS_ADDR_64BIT options NO_SWAPPING #Debugging options From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 07:34:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42E661065672; Sat, 20 Feb 2010 07:34:38 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3177B8FC08; Sat, 20 Feb 2010 07:34:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K7Ycoe037181; Sat, 20 Feb 2010 07:34:38 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K7Ycbs037179; Sat, 20 Feb 2010 07:34:38 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201002200734.o1K7Ycbs037179@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Feb 2010 07:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204109 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 07:34:38 -0000 Author: neel Date: Sat Feb 20 07:34:37 2010 New Revision: 204109 URL: http://svn.freebsd.org/changeset/base/204109 Log: Fix DDB backtrace that includes a kernel exception frame. The backtrace code tries to look for an instruction of the form "sw ra, x(sp)" to figure out the program counter of the calling function. When we generate the kernel exception frame we store the 'ra' at the time of the exception using an instruction of the same form. The problem is that the 'ra' at the time of the exception is not the same as the 'program counter' at the time of the exception. The fix is to save the 'exception program counter' register by staging it through the 'ra' register. Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Sat Feb 20 06:39:14 2010 (r204108) +++ head/sys/mips/mips/exception.S Sat Feb 20 07:34:37 2010 (r204109) @@ -275,6 +275,15 @@ SlowFault: mtc0 a0, COP_0_STATUS_REG #endif +/* + * Save CPU and CP0 register state. + * + * This is straightforward except for saving the exception program + * counter. The ddb backtrace code looks for the first instruction + * matching the form "sw ra, (off)sp" to figure out the address of the + * calling function. So we must make sure that we save the exception + * PC by staging it through 'ra' as opposed to any other register. + */ #define SAVE_CPU \ SAVE_REG(AT, AST, sp) ;\ .set at ; \ @@ -314,9 +323,12 @@ SlowFault: SAVE_REG(v1, MULHI, sp) ;\ SAVE_REG(a0, SR, sp) ;\ SAVE_REG(a1, CAUSE, sp) ;\ - SAVE_REG(ra, RA, sp) ;\ SAVE_REG(a2, BADVADDR, sp) ;\ - SAVE_REG(a3, PC, sp) ;\ + move t0, ra ;\ + move ra, a3 ;\ + SAVE_REG(ra, PC, sp) ;\ + move ra, t0 ;\ + SAVE_REG(ra, RA, sp) ;\ PTR_ADDU v0, sp, KERN_EXC_FRAME_SIZE ;\ SAVE_REG(v0, SP, sp) ;\ CLEAR_STATUS ;\ From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 08:19:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD3B106566C; Sat, 20 Feb 2010 08:19:20 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFFA8FC16; Sat, 20 Feb 2010 08:19:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1K8JK9c046947; Sat, 20 Feb 2010 08:19:20 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1K8JKkg046945; Sat, 20 Feb 2010 08:19:20 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201002200819.o1K8JKkg046945@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 20 Feb 2010 08:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204110 - head/lib/libc/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 08:19:20 -0000 Author: gabor Date: Sat Feb 20 08:19:19 2010 New Revision: 204110 URL: http://svn.freebsd.org/changeset/base/204110 Log: - More style(9) fixups Approved by: delphij (mentor) Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Sat Feb 20 07:34:37 2010 (r204109) +++ head/lib/libc/nls/msgcat.c Sat Feb 20 08:19:19 2010 (r204110) @@ -60,34 +60,35 @@ __FBSDID("$FreeBSD$"); #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" -#define RLOCK(fail) { int ret; \ - if (__isthreaded && \ - ((ret = _pthread_rwlock_rdlock(&rwlock)) != 0)) { \ - errno = ret; \ - return (fail); \ +#define RLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_rdlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ }} -#define WLOCK(fail) { int ret; \ - if (__isthreaded && \ - ((ret = _pthread_rwlock_wrlock(&rwlock)) != 0)) { \ - errno = ret; \ - return (fail); \ +#define WLOCK(fail) { int ret; \ + if (__isthreaded && \ + ((ret = _pthread_rwlock_wrlock(&rwlock)) != 0)) { \ + errno = ret; \ + return (fail); \ }} -#define UNLOCK { if (__isthreaded) \ +#define UNLOCK { if (__isthreaded) \ _pthread_rwlock_unlock(&rwlock); } #define NLERR ((nl_catd) -1) #define NLRETERR(errc) { errno = errc; return (NLERR); } -#define SAVEFAIL(n, l, e) { WLOCK(NLERR); \ - np = malloc(sizeof(struct catentry)); \ - if (np != NULL) { \ - np->name = strdup(n); \ - np->path = NULL; \ - np->lang = (l == NULL) ? NULL : strdup(l); \ - np->caterrno = e; \ - SLIST_INSERT_HEAD(&cache, np, list); \ - } \ - UNLOCK; \ - errno = e; \ +#define SAVEFAIL(n, l, e) { WLOCK(NLERR); \ + np = malloc(sizeof(struct catentry)); \ + if (np != NULL) { \ + np->name = strdup(n); \ + np->path = NULL; \ + np->lang = (l == NULL) ? NULL : \ + strdup(l); \ + np->caterrno = e; \ + SLIST_INSERT_HEAD(&cache, np, list); \ + } \ + UNLOCK; \ + errno = e; \ } static nl_catd load_msgcat(const char *, const char *, const char *); @@ -209,7 +210,7 @@ catopen(const char *name, int type) break; case '%': ++nlspath; - /* fallthrough */ + /* FALLTHROUGH */ default: if (pathP - path >= sizeof(path) - 1) @@ -369,7 +370,8 @@ load_msgcat(const char *path, const char /* path/name will never be NULL here */ - /* One more try in cache; if it was not found by name, + /* + * One more try in cache; if it was not found by name, * it might still be found by absolute path. */ RLOCK(NLERR); @@ -393,8 +395,9 @@ load_msgcat(const char *path, const char NLRETERR(EFTYPE); } - /* If the file size cannot be held in size_t we cannot mmap() - * it to the memory. Probably, this will not be a problem given + /* + * If the file size cannot be held in size_t we cannot mmap() + * it to the memory. Probably, this will not be a problem given * that catalog files are usually small. */ if (st.st_size > SIZE_T_MAX) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 10:19:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229C1106566B; Sat, 20 Feb 2010 10:19:20 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E59A8FC14; Sat, 20 Feb 2010 10:19:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KAJJfx074173; Sat, 20 Feb 2010 10:19:19 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KAJJAm074161; Sat, 20 Feb 2010 10:19:19 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201002201019.o1KAJJAm074161@svn.freebsd.org> From: Ulrich Spoerlein Date: Sat, 20 Feb 2010 10:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204111 - in head: lib/libarchive sbin/restore sys/dev/cxgb/ulp/iw_cxgb sys/fs/ext2fs sys/fs/msdosfs usr.bin/cpio usr.bin/tar usr.bin/tar/test usr.bin/xinstall usr.sbin/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 10:19:20 -0000 Author: uqs Date: Sat Feb 20 10:19:19 2010 New Revision: 204111 URL: http://svn.freebsd.org/changeset/base/204111 Log: Fix common misspelling of hierarchy Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor) Modified: head/lib/libarchive/archive_write_disk.3 head/sbin/restore/restore.h head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/usr.bin/cpio/bsdcpio.1 head/usr.bin/tar/test/test_option_T.c head/usr.bin/tar/test/test_option_s.c head/usr.bin/tar/tree.c head/usr.bin/xinstall/xinstall.c head/usr.sbin/mtree/mtree.5 Modified: head/lib/libarchive/archive_write_disk.3 ============================================================================== --- head/lib/libarchive/archive_write_disk.3 Sat Feb 20 08:19:19 2010 (r204110) +++ head/lib/libarchive/archive_write_disk.3 Sat Feb 20 10:19:19 2010 (r204111) @@ -339,7 +339,7 @@ In particular, the directory .Pa aa is created as well as the final object .Pa bb . -In theory, this can be exploited to create an entire directory heirarchy +In theory, this can be exploited to create an entire directory hierarchy with a single request. Of course, this does not work if the .Cm ARCHIVE_EXTRACT_NODOTDOT @@ -371,5 +371,5 @@ compact implementation when appropriate. .Pp There should be a corresponding .Nm archive_read_disk -interface that walks a directory heirarchy and returns archive +interface that walks a directory hierarchy and returns archive entry objects. Modified: head/sbin/restore/restore.h ============================================================================== --- head/sbin/restore/restore.h Sat Feb 20 08:19:19 2010 (r204110) +++ head/sbin/restore/restore.h Sat Feb 20 10:19:19 2010 (r204111) @@ -41,7 +41,7 @@ extern int bflag; /* set input block size */ extern int dflag; /* print out debugging info */ extern int Dflag; /* degraded mode - try hard to get stuff back */ -extern int hflag; /* restore heirarchies */ +extern int hflag; /* restore hierarchies */ extern int mflag; /* restore by name instead of inode number */ extern int Nflag; /* do not write the disk */ extern int uflag; /* unlink symlink targets */ Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Sat Feb 20 10:19:19 2010 (r204111) @@ -675,7 +675,7 @@ static void __flush_qp(struct iwch_qp *q qhp->refcnt++; mtx_unlock(&qhp->lock); - /* locking heirarchy: cq lock first, then qp lock. */ + /* locking hierarchy: cq lock first, then qp lock. */ mtx_lock(&rchp->lock); mtx_lock(&qhp->lock); cxio_flush_hw_cq(&rchp->cq); @@ -685,7 +685,7 @@ static void __flush_qp(struct iwch_qp *q mtx_unlock(&rchp->lock); (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context); - /* locking heirarchy: cq lock first, then qp lock. */ + /* locking hierarchy: cq lock first, then qp lock. */ mtx_lock(&schp->lock); mtx_lock(&qhp->lock); cxio_flush_hw_cq(&schp->cq); Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/sys/fs/ext2fs/ext2_vnops.c Sat Feb 20 10:19:19 2010 (r204111) @@ -894,7 +894,7 @@ abortit: /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the - * directory heirarchy above the target, as this would + * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so * as to be able to change "..". We must repeat the call Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Sat Feb 20 10:19:19 2010 (r204111) @@ -1072,7 +1072,7 @@ abortit: /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the - * directory heirarchy above the target, as this would + * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so * as to be able to change "..". We must repeat the call Modified: head/usr.bin/cpio/bsdcpio.1 ============================================================================== --- head/usr.bin/cpio/bsdcpio.1 Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.bin/cpio/bsdcpio.1 Sat Feb 20 10:19:19 2010 (r204111) @@ -266,7 +266,7 @@ for more information. .Sh EXAMPLES The .Nm -command is traditionally used to copy file heirarchies in conjunction +command is traditionally used to copy file hierarchies in conjunction with the .Xr find 1 command. Modified: head/usr.bin/tar/test/test_option_T.c ============================================================================== --- head/usr.bin/tar/test/test_option_T.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.bin/tar/test/test_option_T.c Sat Feb 20 10:19:19 2010 (r204111) @@ -43,7 +43,7 @@ DEFINE_TEST(test_option_T) int r; struct stat st; - /* Create a simple dir heirarchy; bail if anything fails. */ + /* Create a simple dir hierarchy; bail if anything fails. */ if (!assertEqualInt(0, mkdir("d1", 0755))) return; if (!assertEqualInt(0, mkdir("d1/d2", 0755))) return; if (!touch("d1/f1")) return; Modified: head/usr.bin/tar/test/test_option_s.c ============================================================================== --- head/usr.bin/tar/test/test_option_s.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.bin/tar/test/test_option_s.c Sat Feb 20 10:19:19 2010 (r204111) @@ -44,7 +44,7 @@ DEFINE_TEST(test_option_s) { struct stat st; - /* Create a sample file heirarchy. */ + /* Create a sample file hierarchy. */ assertEqualInt(0, mkdir("in", 0755)); assertEqualInt(0, mkdir("in/d1", 0755)); assertEqualInt(0, mkfile("in/d1/foo", "foo")); Modified: head/usr.bin/tar/tree.c ============================================================================== --- head/usr.bin/tar/tree.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.bin/tar/tree.c Sat Feb 20 10:19:19 2010 (r204111) @@ -313,7 +313,7 @@ tree_next(struct tree *t) * violation. Just crash now. */ if (t->visit_type == TREE_ERROR_FATAL) { const char *msg = "Unable to continue traversing" - " directory heirarchy after a fatal error."; + " directory hierarchy after a fatal error."; write(2, msg, strlen(msg)); *(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ exit(1); /* In case the SEGV didn't work. */ Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.bin/xinstall/xinstall.c Sat Feb 20 10:19:19 2010 (r204111) @@ -733,7 +733,7 @@ strip(const char *to_name) /* * install_dir -- - * build directory heirarchy + * build directory hierarchy */ static void install_dir(char *path) Modified: head/usr.sbin/mtree/mtree.5 ============================================================================== --- head/usr.sbin/mtree/mtree.5 Sat Feb 20 08:19:19 2010 (r204110) +++ head/usr.sbin/mtree/mtree.5 Sat Feb 20 10:19:19 2010 (r204111) @@ -33,12 +33,12 @@ .Os .Sh NAME .Nm mtree -.Nd format of mtree dir heirarchy files +.Nd format of mtree dir hierarchy files .Sh DESCRIPTION The .Nm format is a textual format that describes a collection of filesystem objects. -Such files are typically used to create or verify directory heirarchies. +Such files are typically used to create or verify directory hierarchies. .Ss General Format An .Nm From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 11:50:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F45106566C; Sat, 20 Feb 2010 11:50:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B624C8FC08; Sat, 20 Feb 2010 11:50:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KBooGf094279; Sat, 20 Feb 2010 11:50:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KBoo7P094278; Sat, 20 Feb 2010 11:50:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002201150.o1KBoo7P094278@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Feb 2010 11:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204112 - stable/8/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 11:50:50 -0000 Author: kib Date: Sat Feb 20 11:50:50 2010 New Revision: 204112 URL: http://svn.freebsd.org/changeset/base/204112 Log: MFC r203818: Clear the bp pointer when buffer is already brelse()d. Modified: stable/8/sys/ufs/ffs/ffs_alloc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 10:19:19 2010 (r204111) +++ stable/8/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 11:50:50 2010 (r204112) @@ -425,8 +425,10 @@ nospace: reclaimed = 1; softdep_request_cleanup(fs, vp); UFS_UNLOCK(ump); - if (bp) + if (bp) { brelse(bp); + bp = NULL; + } UFS_LOCK(ump); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 11:54:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2766D106566C; Sat, 20 Feb 2010 11:54:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16CCF8FC18; Sat, 20 Feb 2010 11:54:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KBsJJP095114; Sat, 20 Feb 2010 11:54:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KBsI9J095112; Sat, 20 Feb 2010 11:54:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002201154.o1KBsI9J095112@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Feb 2010 11:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204113 - stable/8/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 11:54:20 -0000 Author: kib Date: Sat Feb 20 11:54:18 2010 New Revision: 204113 URL: http://svn.freebsd.org/changeset/base/204113 Log: MFC r203822: Remove unused macros. Modified: stable/8/sys/fs/msdosfs/denode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/msdosfs/denode.h ============================================================================== --- stable/8/sys/fs/msdosfs/denode.h Sat Feb 20 11:50:50 2010 (r204112) +++ stable/8/sys/fs/msdosfs/denode.h Sat Feb 20 11:54:18 2010 (r204113) @@ -207,9 +207,6 @@ struct denode { ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#define de_forw de_chain[0] -#define de_back de_chain[1] - #ifdef _KERNEL #define VTODE(vp) ((struct denode *)(vp)->v_data) From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 11:56:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 54EEC106566C; Sat, 20 Feb 2010 11:56:09 +0000 (UTC) Date: Sat, 20 Feb 2010 11:56:09 +0000 From: Alexey Dokuchaev To: Pawel Jakub Dawidek Message-ID: <20100220115609.GA94735@FreeBSD.org> References: <201002192018.o1JKIHta088414@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201002192018.o1JKIHta088414@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204101 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 11:56:09 -0000 On Fri, Feb 19, 2010 at 08:18:17PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Fri Feb 19 20:18:16 2010 > New Revision: 204101 > URL: http://svn.freebsd.org/changeset/base/204101 > > Don't set f_bsize to recordsize. It might confuse some software (like squid). Can submitter (or maybe you, Pawel) elaborate on the subject please? Particularly, what exactly breaks squid and in what way? This was not immediately obvious from reading the diff. Thanks. ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 11:58:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66A92106568D; Sat, 20 Feb 2010 11:58:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 561E28FC0C; Sat, 20 Feb 2010 11:58:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KBwK43096083; Sat, 20 Feb 2010 11:58:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KBwJbM096082; Sat, 20 Feb 2010 11:58:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002201158.o1KBwJbM096082@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Feb 2010 11:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204114 - stable/8/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 11:58:20 -0000 Author: kib Date: Sat Feb 20 11:58:19 2010 New Revision: 204114 URL: http://svn.freebsd.org/changeset/base/204114 Log: MFC r203826: Use M_ZERO instead of calling bzero(). Fix function name in the comment. MFC r203828: Fix function name in the comment in the second location too. Modified: stable/8/sys/fs/msdosfs/msdosfs_denode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 20 11:54:18 2010 (r204113) +++ stable/8/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 20 11:58:19 2010 (r204114) @@ -144,11 +144,11 @@ deget(pmp, dirclust, diroffset, depp) } /* - * Do the MALLOC before the getnewvnode since doing so afterward + * Do the malloc before the getnewvnode since doing so afterward * might cause a bogus v_data pointer to get dereferenced - * elsewhere if MALLOC should block. + * elsewhere if malloc should block. */ - ldep = malloc(sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK); + ldep = malloc(sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK | M_ZERO); /* * Directory entry was not in cache, have to create a vnode and @@ -161,7 +161,6 @@ deget(pmp, dirclust, diroffset, depp) free(ldep, M_MSDOSFSNODE); return error; } - bzero((caddr_t)ldep, sizeof *ldep); nvp->v_data = ldep; ldep->de_vnode = nvp; ldep->de_flag = 0; From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 11:58:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 597DA106568D; Sat, 20 Feb 2010 11:58:38 +0000 (UTC) Date: Sat, 20 Feb 2010 11:58:38 +0000 From: Alexey Dokuchaev To: Xin LI Message-ID: <20100220115838.GB94735@FreeBSD.org> References: <201002192354.o1JNsCZJ035886@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201002192354.o1JNsCZJ035886@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204103 - in head/usr.bin: . seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 11:58:38 -0000 On Fri, Feb 19, 2010 at 11:54:12PM +0000, Xin LI wrote: > Author: delphij > Date: Fri Feb 19 23:54:12 2010 > New Revision: 204103 > URL: http://svn.freebsd.org/changeset/base/204103 > > Log: > Add seq(1), a small utility to generate sequence number. Why do we need this when we have jot(1)? ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 12:31:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 594BF106566C; Sat, 20 Feb 2010 12:31:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48EDA8FC0C; Sat, 20 Feb 2010 12:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KCV1OD003449; Sat, 20 Feb 2010 12:31:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KCV1j5003447; Sat, 20 Feb 2010 12:31:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002201231.o1KCV1j5003447@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Feb 2010 12:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204115 - stable/7/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 12:31:01 -0000 Author: kib Date: Sat Feb 20 12:31:00 2010 New Revision: 204115 URL: http://svn.freebsd.org/changeset/base/204115 Log: MFC r203818: Clear the bp pointer when buffer is already brelse()d. Approved by: re (bz) Modified: stable/7/sys/ufs/ffs/ffs_alloc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 11:58:19 2010 (r204114) +++ stable/7/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 12:31:00 2010 (r204115) @@ -427,8 +427,10 @@ nospace: reclaimed = 1; softdep_request_cleanup(fs, vp); UFS_UNLOCK(ump); - if (bp) + if (bp) { brelse(bp); + bp = NULL; + } UFS_LOCK(ump); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 12:34:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 170CC106566C; Sat, 20 Feb 2010 12:34:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 074318FC0A; Sat, 20 Feb 2010 12:34:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KCYEDi004228; Sat, 20 Feb 2010 12:34:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KCYEJ0004226; Sat, 20 Feb 2010 12:34:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002201234.o1KCYEJ0004226@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Feb 2010 12:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204116 - releng/7.3/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 12:34:15 -0000 Author: kib Date: Sat Feb 20 12:34:14 2010 New Revision: 204116 URL: http://svn.freebsd.org/changeset/base/204116 Log: MFC r203818: Clear the bp pointer when buffer is already brelse()d. Approved by: re (bz) Modified: releng/7.3/sys/ufs/ffs/ffs_alloc.c Directory Properties: releng/7.3/sys/ (props changed) releng/7.3/sys/cddl/contrib/opensolaris/ (props changed) releng/7.3/sys/contrib/dev/acpica/ (props changed) releng/7.3/sys/contrib/pf/ (props changed) Modified: releng/7.3/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- releng/7.3/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 12:31:00 2010 (r204115) +++ releng/7.3/sys/ufs/ffs/ffs_alloc.c Sat Feb 20 12:34:14 2010 (r204116) @@ -427,8 +427,10 @@ nospace: reclaimed = 1; softdep_request_cleanup(fs, vp); UFS_UNLOCK(ump); - if (bp) + if (bp) { brelse(bp); + bp = NULL; + } UFS_LOCK(ump); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 12:48:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2750106566C; Sat, 20 Feb 2010 12:48:44 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21198FC1E; Sat, 20 Feb 2010 12:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KCmitH007418; Sat, 20 Feb 2010 12:48:44 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KCmi3Q007416; Sat, 20 Feb 2010 12:48:44 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201002201248.o1KCmi3Q007416@svn.freebsd.org> From: Antoine Brodin Date: Sat, 20 Feb 2010 12:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204117 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 12:48:45 -0000 Author: antoine Date: Sat Feb 20 12:48:44 2010 New Revision: 204117 URL: http://svn.freebsd.org/changeset/base/204117 Log: MFC from head to stable/8: r202896: Unbreak world: - WITHOUT_OPENSSH (and WITH_KERBEROS) - WITHOUT_KERBEROS and WITH_GSSAPI PR: 137483 Submitted by: bf r203016 by ru@: Regen the list of prebuild libraries using tools/make_libdeps.sh. Reviewed by: ru@ Modified: stable/8/Makefile.inc1 (contents, props changed) Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Sat Feb 20 12:34:14 2010 (r204116) +++ stable/8/Makefile.inc1 Sat Feb 20 12:48:44 2010 (r204117) @@ -1087,19 +1087,19 @@ _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L -_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ - ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libroken} \ - ${_kerberos5_lib_libheimntlm} ${_kerberos5_lib_libgssapi_krb5} \ - lib/libbz2 lib/libcom_err lib/libcrypt lib/libelf \ +_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \ + ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ + ${_kerberos5_lib_libroken} \ + lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libexpat \ - ${_lib_cddl} ${_lib_libgssapi} ${_lib_libipx} \ + ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus lib/libutil \ ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ - ${_secure_lib_libssl} lib/libdwarf lib/libproc + ${_secure_lib_libssl} .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr @@ -1121,18 +1121,20 @@ lib/libradius__L secure/lib/libssl__L: s .if ${MK_OPENSSH} != "no" _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L -.if ${MK_KERBEROS} != "no" -kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ +.if ${MK_KERBEROS_SUPPORT} != "no" +secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ - lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ - lib/libcrypt__L -secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L + lib/libmd__L kerberos5/lib/libroken__L .endif .endif .endif _secure_lib= secure/lib .endif +.if ${MK_GSSAPI} != "no" +_lib_libgssapi= lib/libgssapi +.endif + .if ${MK_IPX} != "no" _lib_libipx= lib/libipx .endif @@ -1144,8 +1146,6 @@ _kerberos5_lib_libkrb5= kerberos5/lib/li _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm -_kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5 -_lib_libgssapi= lib/libgssapi .endif .if ${MK_NIS} != "no" From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:19:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B931C1065694; Sat, 20 Feb 2010 13:19:33 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECE98FC19; Sat, 20 Feb 2010 13:19:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:705d:318e:2cb0:5f81] (unknown [IPv6:2001:7b8:3a7:0:705d:318e:2cb0:5f81]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 974885C59; Sat, 20 Feb 2010 14:19:32 +0100 (CET) Message-ID: <4B7FE166.7010002@andric.com> Date: Sat, 20 Feb 2010 14:19:34 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.2pre) Gecko/20100218 Lanikai/3.1b1pre MIME-Version: 1.0 To: Alexey Dokuchaev References: <201002192018.o1JKIHta088414@svn.freebsd.org> <20100220115609.GA94735@FreeBSD.org> In-Reply-To: <20100220115609.GA94735@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r204101 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:19:33 -0000 On 2010-02-20 12:56, Alexey Dokuchaev wrote: >> URL: http://svn.freebsd.org/changeset/base/204101 >> >> Don't set f_bsize to recordsize. It might confuse some software (like squid). > > Can submitter (or maybe you, Pawel) elaborate on the subject please? > Particularly, what exactly breaks squid and in what way? This was not > immediately obvious from reading the diff. Thanks. See here for the original post to -current: http://lists.freebsd.org/pipermail/freebsd-current/2010-February/015494.html From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:24:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 1D5FF106566C; Sat, 20 Feb 2010 13:24:09 +0000 (UTC) Date: Sat, 20 Feb 2010 13:24:09 +0000 From: Alexey Dokuchaev To: Dimitry Andric Message-ID: <20100220132408.GA57083@FreeBSD.org> References: <201002192018.o1JKIHta088414@svn.freebsd.org> <20100220115609.GA94735@FreeBSD.org> <4B7FE166.7010002@andric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4B7FE166.7010002@andric.com> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r204101 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:24:09 -0000 On Sat, Feb 20, 2010 at 02:19:34PM +0100, Dimitry Andric wrote: > On 2010-02-20 12:56, Alexey Dokuchaev wrote: > >>URL: http://svn.freebsd.org/changeset/base/204101 > >> > >>Don't set f_bsize to recordsize. It might confuse some software (like > >>squid). > > > >Can submitter (or maybe you, Pawel) elaborate on the subject please? > >Particularly, what exactly breaks squid and in what way? > > See here for the original post to -current: > > http://lists.freebsd.org/pipermail/freebsd-current/2010-February/015494.html Thanks a lot, Dimitry, this quite answers my question. ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:33:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE0581065670; Sat, 20 Feb 2010 13:33:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEEC48FC13; Sat, 20 Feb 2010 13:33:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KDXo7d017354; Sat, 20 Feb 2010 13:33:50 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KDXoos017352; Sat, 20 Feb 2010 13:33:50 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002201333.o1KDXoos017352@svn.freebsd.org> From: Ed Schouten Date: Sat, 20 Feb 2010 13:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204118 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:33:51 -0000 Author: ed Date: Sat Feb 20 13:33:50 2010 New Revision: 204118 URL: http://svn.freebsd.org/changeset/base/204118 Log: Add . This header file uses __packed, without including . This means it cannot be used in the way described in sysarch(3) by only including . Modified: head/sys/amd64/include/sysarch.h Modified: head/sys/amd64/include/sysarch.h ============================================================================== --- head/sys/amd64/include/sysarch.h Sat Feb 20 12:48:44 2010 (r204117) +++ head/sys/amd64/include/sysarch.h Sat Feb 20 13:33:50 2010 (r204118) @@ -35,6 +35,8 @@ #ifndef _MACHINE_SYSARCH_H_ #define _MACHINE_SYSARCH_H_ +#include + #define I386_GET_LDT 0 #define I386_SET_LDT 1 #define LDT_AUTO_ALLOC 0xffffffff From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:35:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 363A31065670; Sat, 20 Feb 2010 13:35:06 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2631C8FC0A; Sat, 20 Feb 2010 13:35:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KDZ6kJ017670; Sat, 20 Feb 2010 13:35:06 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KDZ6nm017668; Sat, 20 Feb 2010 13:35:06 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201002201335.o1KDZ6nm017668@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 20 Feb 2010 13:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204119 - stable/8/sbin/restore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:35:06 -0000 Author: jh Date: Sat Feb 20 13:35:05 2010 New Revision: 204119 URL: http://svn.freebsd.org/changeset/base/204119 Log: MFC r203157, r203816: Handle short reads when the -P option is used and remove some dead code. PR: bin/121502 Modified: stable/8/sbin/restore/tape.c Directory Properties: stable/8/sbin/restore/ (props changed) Modified: stable/8/sbin/restore/tape.c ============================================================================== --- stable/8/sbin/restore/tape.c Sat Feb 20 13:33:50 2010 (r204118) +++ stable/8/sbin/restore/tape.c Sat Feb 20 13:35:05 2010 (r204119) @@ -227,7 +227,7 @@ setup(void) volno = 1; setdumpnum(); FLUSHTAPEBUF(); - if (!pipein && !bflag) + if (!pipein && !pipecmdin && !bflag) findtapeblksize(); if (gethead(&spcl) == FAIL) { fprintf(stderr, "Tape is not a dump tape\n"); @@ -333,10 +333,6 @@ getvol(long nextvol) } if (volno == 1) return; - if (pipecmdin) { - closemt(); - goto getpipecmdhdr; - } goto gethdr; } again: @@ -400,7 +396,6 @@ again: if (pipecmdin) { char volno[sizeof("2147483647")]; -getpipecmdhdr: (void)sprintf(volno, "%d", newvol); if (setenv("RESTORE_VOLUME", volno, 1) == -1) { fprintf(stderr, "Cannot set $RESTORE_VOLUME: %s\n", @@ -1204,17 +1199,17 @@ getmore: * Check for mid-tape short read error. * If found, skip rest of buffer and start with the next. */ - if (!pipein && numtrec < ntrec && i > 0) { + if (!pipein && !pipecmdin && numtrec < ntrec && i > 0) { dprintf(stdout, "mid-media short read error.\n"); numtrec = ntrec; } /* * Handle partial block read. */ - if (pipein && i == 0 && rd > 0) + if ((pipein || pipecmdin) && i == 0 && rd > 0) i = rd; else if (i > 0 && i != ntrec * TP_BSIZE) { - if (pipein) { + if (pipein || pipecmdin) { rd += i; cnt -= i; if (cnt > 0) From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:35:22 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5AE21065741; Sat, 20 Feb 2010 13:35:22 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 409998FC13; Sat, 20 Feb 2010 13:35:22 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o1KDZLxR007446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Feb 2010 14:35:21 +0100 (CET) (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o1KDZLFF007442; Sat, 20 Feb 2010 14:35:21 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Sat, 20 Feb 2010 14:35:20 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Alexey Dokuchaev Message-ID: <20100220133520.GB57731@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Alexey Dokuchaev , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201002192354.o1JNsCZJ035886@svn.freebsd.org> <20100220115838.GB94735@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100220115838.GB94735@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r204103 - in head/usr.bin: . seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:35:22 -0000 On Sat, 20.02.2010 at 11:58:38 +0000, Alexey Dokuchaev wrote: > On Fri, Feb 19, 2010 at 11:54:12PM +0000, Xin LI wrote: > > Author: delphij > > Date: Fri Feb 19 23:54:12 2010 > > New Revision: 204103 > > URL: http://svn.freebsd.org/changeset/base/204103 > > > > Log: > > Add seq(1), a small utility to generate sequence number. > > Why do we need this when we have jot(1)? Compatibility with shell scripts, I suppose. Some ports may use seq(1) in their test or build targets, etc. There is no jot(1) on any Linux or Solaris I've seen so usage of seq(1) is fairly common. I wonder though, if we could merge functionality into jot(1) and employ a link to seq. Uli From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 13:57:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 34D5F1065679; Sat, 20 Feb 2010 13:57:04 +0000 (UTC) Date: Sat, 20 Feb 2010 13:57:04 +0000 From: Alexey Dokuchaev To: Ulrich Sp??rlein , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20100220135704.GA57372@FreeBSD.org> References: <201002192354.o1JNsCZJ035886@svn.freebsd.org> <20100220115838.GB94735@FreeBSD.org> <20100220133520.GB57731@acme.spoerlein.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20100220133520.GB57731@acme.spoerlein.net> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: svn commit: r204103 - in head/usr.bin: . seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 13:57:04 -0000 On Sat, Feb 20, 2010 at 02:35:20PM +0100, Ulrich Sp??rlein wrote: > On Sat, 20.02.2010 at 11:58:38 +0000, Alexey Dokuchaev wrote: > > Why do we need [seq] when we have jot(1)? > > Compatibility with shell scripts, I suppose. Some ports may use seq(1) > in their test or build targets, etc. There is no jot(1) on any Linux or > Solaris I've seen so usage of seq(1) is fairly common. True, jot(1) is BSD specific. But if we speak for ports, trivial patch can turn seq(1) expression into jot(1) one, thus getting rid of gratuitous dependency. > I wonder though, if we could merge functionality into jot(1) and employ > a link to seq. I would probably be OK with the last suggestion. :-) ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 14:13:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6E50106568B; Sat, 20 Feb 2010 14:13:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A75B78FC17; Sat, 20 Feb 2010 14:13:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KEDlAJ026189; Sat, 20 Feb 2010 14:13:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KEDltK026187; Sat, 20 Feb 2010 14:13:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201002201413.o1KEDltK026187@svn.freebsd.org> From: Ed Schouten Date: Sat, 20 Feb 2010 14:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204120 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 14:13:47 -0000 Author: ed Date: Sat Feb 20 14:13:47 2010 New Revision: 204120 URL: http://svn.freebsd.org/changeset/base/204120 Log: Remove redundant inclusion of . In my previous commit I should have moved the inclusion to the top, instead of adding a second one. Modified: head/sys/amd64/include/sysarch.h Modified: head/sys/amd64/include/sysarch.h ============================================================================== --- head/sys/amd64/include/sysarch.h Sat Feb 20 13:35:05 2010 (r204119) +++ head/sys/amd64/include/sysarch.h Sat Feb 20 14:13:47 2010 (r204120) @@ -70,8 +70,6 @@ struct i386_ioperm_args { }; #ifndef _KERNEL -#include - __BEGIN_DECLS int amd64_get_fsbase(void **); int amd64_get_gsbase(void **); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 14:29:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F417D106566B; Sat, 20 Feb 2010 14:29:04 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AC3C08FC12; Sat, 20 Feb 2010 14:29:02 +0000 (UTC) Received: by pwj7 with SMTP id 7so1316366pwj.13 for ; Sat, 20 Feb 2010 06:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=mxOSZFiZ13aP8qRl5IbJxx7DT7rjr5S3mDky6rxpV1Q=; b=EkH51gl8/8ZYaMST2D8UHBtrFsD5Mwoi2NPafpy/+xp8FcXDgs2/vkoDbC0lst5bBE iY3iUtua7HijrLWDGHNcspTQ1wQyYFjUc5L/qtVYYyR2y3K2NuPHYA3nDVPPxJ8Ih9n7 ig3MPXQ1TI1R7E0IREYoJv8JuCEkJzOA+i/Yw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=swNM2itC3wmslXopsGw8YRfJQRoQCX+rVhSu7F5jegjG5Uehy+Q1mkV+zdN8qQRlkV Qyy8dIHZPvMHDPXtLjkyLcytX+B42G5IoEVLFBZQxxd4Y71VL25xb9NMXaSYw2DD89uJ Z5EIQn2U+kAhRSFOZbUejYgX1hXbv9ZRT1mxg= MIME-Version: 1.0 Received: by 10.114.68.12 with SMTP id q12mr918844waa.67.1266676139841; Sat, 20 Feb 2010 06:28:59 -0800 (PST) In-Reply-To: <20100220133520.GB57731@acme.spoerlein.net> References: <201002192354.o1JNsCZJ035886@svn.freebsd.org> <20100220115838.GB94735@FreeBSD.org> <20100220133520.GB57731@acme.spoerlein.net> Date: Sat, 20 Feb 2010 06:28:59 -0800 Message-ID: From: Xin LI To: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= , Alexey Dokuchaev , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r204103 - in head/usr.bin: . seq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 14:29:05 -0000 On Sat, Feb 20, 2010 at 5:35 AM, Ulrich Sp=C3=B6rlein wro= te: > On Sat, 20.02.2010 at 11:58:38 +0000, Alexey Dokuchaev wrote: >> On Fri, Feb 19, 2010 at 11:54:12PM +0000, Xin LI wrote: >> > Author: delphij >> > Date: Fri Feb 19 23:54:12 2010 >> > New Revision: 204103 >> > URL: http://svn.freebsd.org/changeset/base/204103 >> > >> > Log: >> > =C2=A0 Add seq(1), a small utility to generate sequence number. >> >> Why do we need this when we have jot(1)? > > Compatibility with shell scripts, I suppose. Some ports may use seq(1) > in their test or build targets, etc. There is no jot(1) on any Linux or > Solaris I've seen so usage of seq(1) is fairly common. Yes exactly. > I wonder though, if we could merge functionality into jot(1) and employ > a link to seq. The primary difference between the two is the command line parsing and option handling and seq uses double number. I think we will not benefit a lot from the shared code unfortunately... Cheers, --=20 Xin LI http://www.delphij.net From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 14:52:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30094106568B; Sat, 20 Feb 2010 14:52:08 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2017C8FC1C; Sat, 20 Feb 2010 14:52:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KEq81v034618; Sat, 20 Feb 2010 14:52:08 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KEq76Y034616; Sat, 20 Feb 2010 14:52:07 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201002201452.o1KEq76Y034616@svn.freebsd.org> From: Kevin Lo Date: Sat, 20 Feb 2010 14:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204121 - head/sys/arm/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 14:52:08 -0000 Author: kevlo Date: Sat Feb 20 14:52:07 2010 New Revision: 204121 URL: http://svn.freebsd.org/changeset/base/204121 Log: Correct both FA526/FA626TE cpu ids since the cpu id is always masked with 0xfffffff0 Modified: head/sys/arm/include/armreg.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sat Feb 20 14:13:47 2010 (r204120) +++ head/sys/arm/include/armreg.h Sat Feb 20 14:52:07 2010 (r204121) @@ -151,8 +151,8 @@ #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ #define CPU_ID_MV88FR571_VD 0x56155710 /* Marvell Feroceon 88FR571-VD Core (ID from datasheet) */ #define CPU_ID_MV88FR571_41 0x41159260 /* Marvell Feroceon 88FR571-VD Core (actual ID from CPU reg) */ -#define CPU_ID_FA526 0x66015261 -#define CPU_ID_FA626TE 0x66056261 +#define CPU_ID_FA526 0x66015260 +#define CPU_ID_FA626TE 0x66056260 #define CPU_ID_SA1110 0x6901b110 #define CPU_ID_IXP1200 0x6901c120 #define CPU_ID_80200 0x69052000 From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 14:54:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62054106566B; Sat, 20 Feb 2010 14:54:11 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51E9E8FC16; Sat, 20 Feb 2010 14:54:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KEsBGW035085; Sat, 20 Feb 2010 14:54:11 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KEsBuH035081; Sat, 20 Feb 2010 14:54:11 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201002201454.o1KEsBuH035081@svn.freebsd.org> From: Kevin Lo Date: Sat, 20 Feb 2010 14:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204122 - in head/sys/arm: arm include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 14:54:11 -0000 Author: kevlo Date: Sat Feb 20 14:54:11 2010 New Revision: 204122 URL: http://svn.freebsd.org/changeset/base/204122 Log: Show the cpu info for fa526 Submitted by: Yohanes Nugroho Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/md_var.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Feb 20 14:52:07 2010 (r204121) +++ head/sys/arm/arm/cpufunc.c Sat Feb 20 14:54:11 2010 (r204122) @@ -2119,7 +2119,8 @@ fa526_setup(char *args) cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE; + | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE + | CPU_CONTROL_BPRD_ENABLE; cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Sat Feb 20 14:52:07 2010 (r204121) +++ head/sys/arm/arm/identcpu.c Sat Feb 20 14:54:11 2010 (r204122) @@ -220,6 +220,9 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_ARM966ESR1, CPU_CLASS_ARM9ES, "ARM966E-S", generic_steppings }, + { CPU_ID_FA526, CPU_CLASS_ARM9, "FA526", + generic_steppings }, + { CPU_ID_TI925T, CPU_CLASS_ARM9TDMI, "TI ARM925T", generic_steppings }, @@ -317,6 +320,7 @@ const struct cpu_classtab cpu_classes[] { "ARM7", "CPU_ARM7" }, /* CPU_CLASS_ARM7 */ { "ARM7TDMI", "CPU_ARM7TDMI" }, /* CPU_CLASS_ARM7TDMI */ { "ARM8", "CPU_ARM8" }, /* CPU_CLASS_ARM8 */ + { "ARM9", "CPU_ARM9" }, /* CPU_CLASS_ARM9 */ { "ARM9TDMI", "CPU_ARM9TDMI" }, /* CPU_CLASS_ARM9TDMI */ { "ARM9E-S", "CPU_ARM9E" }, /* CPU_CLASS_ARM9ES */ { "ARM9EJ-S", "CPU_ARM9E" }, /* CPU_CLASS_ARM9EJS */ Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Sat Feb 20 14:52:07 2010 (r204121) +++ head/sys/arm/include/md_var.h Sat Feb 20 14:54:11 2010 (r204122) @@ -57,6 +57,7 @@ enum cpu_class { CPU_CLASS_ARM7, CPU_CLASS_ARM7TDMI, CPU_CLASS_ARM8, + CPU_CLASS_ARM9, CPU_CLASS_ARM9TDMI, CPU_CLASS_ARM9ES, CPU_CLASS_ARM9EJS, From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 15:20:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 472A8106566C; Sat, 20 Feb 2010 15:20:29 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 354858FC08; Sat, 20 Feb 2010 15:20:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KFKTWv041064; Sat, 20 Feb 2010 15:20:29 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KFKT9A041062; Sat, 20 Feb 2010 15:20:29 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201002201520.o1KFKT9A041062@svn.freebsd.org> From: Attilio Rao Date: Sat, 20 Feb 2010 15:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204123 - in head/tools/regression/kthread: . kld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 15:20:29 -0000 Author: attilio Date: Sat Feb 20 15:20:28 2010 New Revision: 204123 URL: http://svn.freebsd.org/changeset/base/204123 Log: Add a regression test for the kthread(9) interface. Submitted by: Giovanni Trematerra Added: head/tools/regression/kthread/ head/tools/regression/kthread/kld/ head/tools/regression/kthread/kld/Makefile (contents, props changed) head/tools/regression/kthread/kld/kthrdlk.c (contents, props changed) Added: head/tools/regression/kthread/kld/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/kthread/kld/Makefile Sat Feb 20 15:20:28 2010 (r204123) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR} + +KMOD= kthrdlk +NO_MAN= +SRCS= kthrdlk.c +WARNS?= 2 + +.include Added: head/tools/regression/kthread/kld/kthrdlk.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/kthread/kld/kthrdlk.c Sat Feb 20 15:20:28 2010 (r204123) @@ -0,0 +1,204 @@ +/*- + * Copyright (c) 2010 Giovanni Trematerra + * 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. + */ + +/* + * PURPOSE: + * + * This kernel module helped to identify a deadlock in kthread + * interface, also pointed out a race in kthread_exit function. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef TESTPAUSE_DEBUG +#define DPRINTF(x) do { \ + printf (x); \ +} while (0) +#else +#define DPRINTF(x) +#endif + +static struct mtx test_global_lock; +static int global_condvar; +static int test_thrcnt; +volatile int QUIT; + +static void +thr_suspender(void *arg) +{ + struct thread *td = (struct thread *) arg; + int error; + + for (;;) { + if (QUIT == 1) + break; + error = kthread_suspend(td, 10*hz); + if (error != 0 && QUIT == 0) { + if (error == EWOULDBLOCK) + panic("Ooops: kthread deadlock\n"); + else + panic("kthread_suspend error: %d\n", error); + break; + } + } + + mtx_lock(&test_global_lock); + test_thrcnt--; + wakeup(&global_condvar); + mtx_unlock(&test_global_lock); + + kthread_exit(); +} + +static void +thr_resumer(void *arg) +{ + struct thread *td = (struct thread *) arg; + int error; + + for (;;) { + /* must be the last thread to exit */ + if (QUIT == 1 && test_thrcnt == 1) + break; + error = kthread_resume(td); + if (error != 0) + panic("%s: error on kthread_resume. error: %d\n", + __func__, error); + } + + mtx_lock(&test_global_lock); + test_thrcnt--; + wakeup(&global_condvar); + mtx_unlock(&test_global_lock); + + kthread_exit(); +} + +static void +thr_getsuspended(void *arg) +{ + for (;;) { + if (QUIT == 1) + break; + kthread_suspend_check(); + } + + mtx_lock(&test_global_lock); + test_thrcnt--; + wakeup(&global_condvar); + mtx_unlock(&test_global_lock); + + kthread_exit(); +} + +static void +kthrdlk_init(void) +{ + struct proc *testproc; + struct thread *newthr; + int error; + + QUIT = 0; + test_thrcnt = 3; + mtx_init(&test_global_lock, "kthrdlk_lock", NULL, MTX_DEF); + testproc = NULL; + error = kproc_kthread_add(thr_getsuspended, NULL, &testproc, &newthr, + 0, 0, "kthrdlk", "thr_getsuspended"); + if (error != 0) + panic("cannot start thr_getsuspended error: %d\n", error); + + error = kproc_kthread_add(thr_resumer, newthr, &testproc, NULL, 0, 0, + "kthrdlk", "thr_resumer"); + if (error != 0) + panic("cannot start thr_resumer error: %d\n", error); + + error = kproc_kthread_add(thr_suspender, newthr, &testproc, NULL, 0, 0, + "kthrdlk", "thr_suspender"); + if (error != 0) + panic("cannot start thr_suspender error: %d\n", error); +} + +static void +kthrdlk_done(void) +{ + int ret; + DPRINTF(("sending QUIT signal to the thrdlk threads\n")); + + /* wait kernel threads end */ + mtx_lock(&test_global_lock); + QUIT = 1; + while (test_thrcnt != 0) { + ret = mtx_sleep(&global_condvar, &test_global_lock, 0, "waiting thrs end", 30 * hz); + if (ret == EWOULDBLOCK) { + panic("some threads not die! remaing: %d", test_thrcnt); + break; + } + } + if (test_thrcnt == 0) + DPRINTF(("All test_pause threads die\n")); + + mtx_destroy(&test_global_lock); +} + +static int +kthrdlk_handler(module_t mod, int /*modeventtype_t*/ what, + void *arg) +{ + switch (what) { + case MOD_LOAD: + kthrdlk_init(); + uprintf("kthrdlk loaded!\n"); + return (0); + case MOD_UNLOAD: + kthrdlk_done(); + uprintf("Bye Bye! kthrdlk unloaded!\n"); + return (0); + } + + return (EOPNOTSUPP); +} + +static moduledata_t mod_data= { + "kthrdlk", + kthrdlk_handler, + 0 + }; + +MODULE_VERSION(kthrdlk, 1); + +DECLARE_MODULE(kthrdlk, mod_data, SI_SUB_EXEC, SI_ORDER_ANY); + From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:13:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F791065676; Sat, 20 Feb 2010 16:13:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 330108FC17; Sat, 20 Feb 2010 16:13:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGDipB053067; Sat, 20 Feb 2010 16:13:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGDiiK053065; Sat, 20 Feb 2010 16:13:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002201613.o1KGDiiK053065@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Feb 2010 16:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204126 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:13:44 -0000 Author: nwhitehorn Date: Sat Feb 20 16:13:43 2010 New Revision: 204126 URL: http://svn.freebsd.org/changeset/base/204126 Log: Merge r198724 to Book-E. casuword() non-atomically read the current value of its argument before atomically replacing it, which could occasionally return the wrong value on an SMP system. This resulted in user mutex operations hanging when using threaded applications. Modified: head/sys/powerpc/booke/copyinout.c Modified: head/sys/powerpc/booke/copyinout.c ============================================================================== --- head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:12:37 2010 (r204125) +++ head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:13:43 2010 (r204126) @@ -295,8 +295,19 @@ casuword(volatile u_long *addr, u_long o return (EFAULT); } - val = *addr; - (void) atomic_cmpset_32((volatile uint32_t *)addr, old, new); + __asm __volatile ( + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ + "cmplw %3, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "3:\n\t" + : "=&r" (val), "=m" (*addr) + : "r" (addr), "r" (old), "r" (new), "m" (*addr) + : "cc", "memory"); td->td_pcb->pcb_onfault = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:14:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E5D1065693; Sat, 20 Feb 2010 16:14:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D62348FC1E; Sat, 20 Feb 2010 16:14:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGEJdC053234; Sat, 20 Feb 2010 16:14:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGEJ6p053232; Sat, 20 Feb 2010 16:14:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002201614.o1KGEJ6p053232@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Feb 2010 16:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204127 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:14:20 -0000 Author: nwhitehorn Date: Sat Feb 20 16:14:19 2010 New Revision: 204127 URL: http://svn.freebsd.org/changeset/base/204127 Log: Turn on experimental support for DEEPNAP on the 970MP. Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sat Feb 20 16:13:43 2010 (r204126) +++ head/sys/powerpc/powerpc/cpu.c Sat Feb 20 16:14:19 2010 (r204127) @@ -446,8 +446,16 @@ cpu_970_setup(int cpuid, uint16_t vers) : "=r" (hid0_hi), "=r" (hid0_lo) : "K" (SPR_HID0)); /* Configure power-saving mode */ - hid0_hi |= (HID0_NAP | HID0_DPM); - hid0_hi &= ~(HID0_DOZE | HID0_DEEPNAP); + switch (vers) { + case IBM970MP: + hid0_hi |= (HID0_DEEPNAP | HID0_DPM); + hid0_hi &= ~(HID0_DOZE | HID0_NAP); + break; + default: + hid0_hi |= (HID0_NAP | HID0_DPM); + hid0_hi &= ~(HID0_DOZE | HID0_DEEPNAP); + break; + } powerpc_pow_enabled = 1; __asm __volatile (" \ From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:23:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C67E8106566B; Sat, 20 Feb 2010 16:23:29 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B32368FC14; Sat, 20 Feb 2010 16:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGNTYo055289; Sat, 20 Feb 2010 16:23:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGNTV9055282; Sat, 20 Feb 2010 16:23:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002201623.o1KGNTV9055282@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Feb 2010 16:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204128 - in head/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:23:30 -0000 Author: nwhitehorn Date: Sat Feb 20 16:23:29 2010 New Revision: 204128 URL: http://svn.freebsd.org/changeset/base/204128 Log: Reduce KVA pressure on OEA64 systems running in bridge mode by mapping UMA segments at their physical addresses instead of into KVA. This emulates the direct mapping behavior of OEA32 in an ad-hoc way. To make this work properly required sharing the entire kernel PMAP with Open Firmware, so ofw_pmap is transformed into a stub on 64-bit CPUs. Also implement some more tweaks to get more mileage out of our limited amount of KVA, principally by extending KVA into segment 16 until the beginning of the first OFW mapping. Reported by: linimon Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/uma_machdep.c head/sys/powerpc/include/sr.h head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/aim/machdep.c Sat Feb 20 16:23:29 2010 (r204128) @@ -198,6 +198,11 @@ cpu_startup(void *dummy) ptoa(physmem) / 1048576); realmem = physmem; + if (bootverbose) + printf("available KVA = %zd (%zd MB)\n", + virtual_end - virtual_avail, + (virtual_end - virtual_avail) / 1048576); + /* * Display any holes after the first chunk of extended memory. */ Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/aim/mmu_oea.c Sat Feb 20 16:23:29 2010 (r204128) @@ -909,7 +909,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k * Set the start and end of kva. */ virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_end = VM_MAX_SAFE_KERNEL_ADDRESS; /* * Allocate a kernel stack with a guard page for thread0 and map it @@ -2413,7 +2413,7 @@ moea_unmapdev(mmu_t mmu, vm_offset_t va, * If this is outside kernel virtual space, then it's a * battable entry and doesn't require unmapping */ - if ((va >= VM_MIN_KERNEL_ADDRESS) && (va <= VM_MAX_KERNEL_ADDRESS)) { + if ((va >= VM_MIN_KERNEL_ADDRESS) && (va <= virtual_end)) { base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/aim/mmu_oea64.c Sat Feb 20 16:23:29 2010 (r204128) @@ -297,9 +297,6 @@ struct pvo_head moea64_pvo_unmanaged = uma_zone_t moea64_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea64_mpvo_zone; /* zone for pvo entries for managed pages */ -vm_offset_t pvo_allocator_start; -vm_offset_t pvo_allocator_end; - #define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; @@ -699,6 +696,7 @@ moea64_add_ofw_mappings(mmu_t mmup, phan struct ofw_map translations[sz/sizeof(struct ofw_map)]; register_t msr; vm_offset_t off; + vm_paddr_t pa_base; int i, ofw_mappings; bzero(translations, sz); @@ -720,33 +718,18 @@ moea64_add_ofw_mappings(mmu_t mmup, phan if (translations[i].om_pa_hi) panic("OFW translations above 32-bit boundary!"); + pa_base = translations[i].om_pa_lo; + /* Now enter the pages for this mapping */ - /* - * Lock the ofw pmap. pmap_kenter(), which we use for the - * pages the kernel also needs, does its own locking. - */ - PMAP_LOCK(&ofw_pmap); DISABLE_TRANS(msr); for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { - struct vm_page m; - - /* Map low memory mappings into the kernel pmap, too. - * These are typically mappings made by the loader, - * so we need them if we want to keep executing. */ - - if (translations[i].om_va + off < SEGMENT_LENGTH) - moea64_kenter(mmup, translations[i].om_va + off, - translations[i].om_va + off); - - m.phys_addr = translations[i].om_pa_lo + off; - moea64_enter_locked(&ofw_pmap, - translations[i].om_va + off, &m, VM_PROT_ALL, 1); + moea64_kenter(mmup, translations[i].om_va + off, + pa_base + off); ofw_mappings++; } ENABLE_TRANS(msr); - PMAP_UNLOCK(&ofw_pmap); } } @@ -926,8 +909,8 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o */ moea64_pinit(mmup, &ofw_pmap); - ofw_pmap.pm_sr[KERNEL_SR] = kernel_pmap->pm_sr[KERNEL_SR]; - ofw_pmap.pm_sr[KERNEL2_SR] = kernel_pmap->pm_sr[KERNEL2_SR]; + for (i = 0; i < 16; i++) + ofw_pmap.pm_sr[i] = kernel_pmap->pm_sr[i]; if ((chosen = OF_finddevice("/chosen")) == -1) panic("moea64_bootstrap: can't find /chosen"); @@ -965,15 +948,20 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * Set the start and end of kva. */ virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_end = VM_MAX_SAFE_KERNEL_ADDRESS; /* - * Allocate some stupid buffer regions. + * Figure out how far we can extend virtual_end into segment 16 + * without running into existing mappings. Segment 16 is guaranteed + * to contain neither RAM nor devices (at least on Apple hardware), + * but will generally contain some OFW mappings we should not + * step on. */ - pvo_allocator_start = virtual_avail; - virtual_avail += SEGMENT_LENGTH/4; - pvo_allocator_end = virtual_avail; + PMAP_LOCK(kernel_pmap); + while (moea64_pvo_find_va(kernel_pmap, virtual_end+1, NULL) == NULL) + virtual_end += PAGE_SIZE; + PMAP_UNLOCK(kernel_pmap); /* * Allocate some things for page zeroing @@ -1014,26 +1002,20 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * Allocate virtual address space for the message buffer. */ pa = msgbuf_phys = moea64_bootstrap_alloc(MSGBUF_SIZE, PAGE_SIZE); - msgbufp = (struct msgbuf *)virtual_avail; - va = virtual_avail; - virtual_avail += round_page(MSGBUF_SIZE); - while (va < virtual_avail) { - moea64_kenter(mmup, va, pa); + msgbufp = (struct msgbuf *)msgbuf_phys; + while (pa - msgbuf_phys < MSGBUF_SIZE) { + moea64_kenter(mmup, pa, pa); pa += PAGE_SIZE; - va += PAGE_SIZE; } /* * Allocate virtual address space for the dynamic percpu area. */ pa = moea64_bootstrap_alloc(DPCPU_SIZE, PAGE_SIZE); - dpcpu = (void *)virtual_avail; - va = virtual_avail; - virtual_avail += DPCPU_SIZE; - while (va < virtual_avail) { - moea64_kenter(mmup, va, pa); + dpcpu = (void *)pa; + while (pa - (vm_offset_t)dpcpu < DPCPU_SIZE) { + moea64_kenter(mmup, pa, pa); pa += PAGE_SIZE; - va += PAGE_SIZE; } dpcpu_init(dpcpu, 0); } @@ -1412,14 +1394,10 @@ moea64_uma_page_alloc(uma_zone_t zone, i break; } - va = pvo_allocator_start; - pvo_allocator_start += PAGE_SIZE; - - if (pvo_allocator_start >= pvo_allocator_end) - panic("Ran out of PVO allocator buffer space!"); + va = VM_PAGE_TO_PHYS(m); moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, - &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, + &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, PVO_WIRED | PVO_BOOTSTRAP); if (needed_lock) @@ -1557,10 +1535,12 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, uint64_t pte_lo; int error; +#if 0 if (!pmap_bootstrapped) { - if (va >= VM_MIN_KERNEL_ADDRESS && va < VM_MAX_KERNEL_ADDRESS) + if (va >= VM_MIN_KERNEL_ADDRESS && va < virtual_end) panic("Trying to enter an address in KVA -- %#x!\n",pa); } +#endif pte_lo = moea64_calc_wimg(pa); Modified: head/sys/powerpc/aim/uma_machdep.c ============================================================================== --- head/sys/powerpc/aim/uma_machdep.c Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/aim/uma_machdep.c Sat Feb 20 16:23:29 2010 (r204128) @@ -56,13 +56,6 @@ uma_small_alloc(uma_zone_t zone, int byt vm_page_t m; int pflags; - if (!hw_direct_map) { - *flags = UMA_SLAB_KMEM; - va = (void *)kmem_malloc(kmem_map, bytes, wait); - - return va; - } - *flags = UMA_SLAB_PRIV; if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; @@ -82,6 +75,10 @@ uma_small_alloc(uma_zone_t zone, int byt } va = (void *) VM_PAGE_TO_PHYS(m); + + if (!hw_direct_map) + pmap_kenter((vm_offset_t)va, VM_PAGE_TO_PHYS(m)); + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero(va, PAGE_SIZE); atomic_add_int(&hw_uma_mdpages, 1); @@ -94,13 +91,11 @@ uma_small_free(void *mem, int size, u_in { vm_page_t m; - if (!hw_direct_map) { - kmem_free(kmem_map, (vm_offset_t)mem, size); - - return; - } + if (!hw_direct_map) + pmap_remove(kernel_pmap,(vm_offset_t)mem, + (vm_offset_t)mem + PAGE_SIZE); - m = PHYS_TO_VM_PAGE((u_int32_t)mem); + m = PHYS_TO_VM_PAGE((vm_offset_t)mem); m->wire_count--; vm_page_free(m); atomic_subtract_int(&cnt.v_wire_count, 1); Modified: head/sys/powerpc/include/sr.h ============================================================================== --- head/sys/powerpc/include/sr.h Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/include/sr.h Sat Feb 20 16:23:29 2010 (r204128) @@ -45,6 +45,7 @@ #define USER_SR 12 #define KERNEL_SR 13 #define KERNEL2_SR 14 +#define KERNEL3_SR 15 #define KERNEL_VSIDBITS 0xfffff #define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) #define KERNEL2_SEGMENT (0xfffff0 + KERNEL2_SR) Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sat Feb 20 16:14:19 2010 (r204127) +++ head/sys/powerpc/include/vmparam.h Sat Feb 20 16:23:29 2010 (r204128) @@ -98,7 +98,8 @@ #define KERNBASE 0x00100000 /* start of kernel virtual */ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) -#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH - 1) +#define VM_MAX_SAFE_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH -1) +#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 3*SEGMENT_LENGTH - 1) /* * Use the direct-mapped BAT registers for UMA small allocs. This @@ -106,13 +107,6 @@ */ #define UMA_MD_SMALL_ALLOC -/* - * On 64-bit systems in bridge mode, we have no direct map, so we fake - * the small_alloc() calls. But we need the VM to be in a reasonable - * state first. - */ -#define UMA_MD_SMALL_ALLOC_NEEDS_VM - #else /* From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:28:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED2D1065679; Sat, 20 Feb 2010 16:28:37 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD2458FC0A; Sat, 20 Feb 2010 16:28:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGSbm0056452; Sat, 20 Feb 2010 16:28:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGSbPO056450; Sat, 20 Feb 2010 16:28:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201002201628.o1KGSbPO056450@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Feb 2010 16:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204129 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:28:38 -0000 Author: nwhitehorn Date: Sat Feb 20 16:28:37 2010 New Revision: 204129 URL: http://svn.freebsd.org/changeset/base/204129 Log: Enable NETIF_OPEN_CLOSE_ONCE on PowerPC OFW. This fixes netbooting on PowerPC Book-S hardware, which had been broken for a very long time. Submitted by: Andreas Tobler MFC after: 1 week Modified: head/sys/boot/powerpc/ofw/Makefile Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Sat Feb 20 16:23:29 2010 (r204128) +++ head/sys/boot/powerpc/ofw/Makefile Sat Feb 20 16:28:37 2010 (r204129) @@ -56,6 +56,11 @@ CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../.. LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +# Avoid the open-close-dance for every file access as some firmwares perform +# an auto-negotiation on every open of the network interface and thus causes +# netbooting to take horribly long. +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE + # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:30:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB21910656B3; Sat, 20 Feb 2010 16:30:29 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98D898FC1C; Sat, 20 Feb 2010 16:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGUTan056897; Sat, 20 Feb 2010 16:30:29 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGUTlQ056893; Sat, 20 Feb 2010 16:30:29 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201630.o1KGUTlQ056893@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 16:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204130 - in head/sys/mips: include rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:30:29 -0000 Author: rrs Date: Sat Feb 20 16:30:29 2010 New Revision: 204130 URL: http://svn.freebsd.org/changeset/base/204130 Log: Some fixes to the current RMI interrupt handling, changes in this patch are: - (cleanup) remove rmi specific 'struct mips_intrhand' - this is no longer needed since 'struct intr_event' have all the required hooks - add xlr_cpu_establish_hardintr, which has args for pre/post ithread and filter hooks, so that the PCI code can add the PCI controller interrupt ack code here - make 'cpu_establish_hardintr' use the above function. - (fix) change type of eirr/eimr from register_t to uint64_t. These have to be 64bit otherwise we cannot handle interrupts from 32. - (fix) use eimr to mask eirr before checking interrupts, so that we will not handle masked interrupts. Obtained from: C. Jayachandran - c.jayachandran@gmail.com Modified: head/sys/mips/include/intr_machdep.h head/sys/mips/rmi/interrupt.h head/sys/mips/rmi/intr_machdep.c Modified: head/sys/mips/include/intr_machdep.h ============================================================================== --- head/sys/mips/include/intr_machdep.h Sat Feb 20 16:28:37 2010 (r204129) +++ head/sys/mips/include/intr_machdep.h Sat Feb 20 16:30:29 2010 (r204130) @@ -30,21 +30,7 @@ #define _MACHINE_INTR_MACHDEP_H_ #ifdef TARGET_XLR_XLS -/* - * XLR/XLS uses its own intr_machdep.c and has - * a different number of interupts. This probably - * should be placed somewhere else. - */ - -struct mips_intrhand { - struct intr_event *mih_event; - driver_intr_t *mih_disable; - volatile long *cntp; /* interrupt counter */ -}; - -extern struct mips_intrhand mips_intr_handlers[]; #define XLR_MAX_INTR 64 - #else #define NHARD_IRQS 6 #define NSOFT_IRQS 2 Modified: head/sys/mips/rmi/interrupt.h ============================================================================== --- head/sys/mips/rmi/interrupt.h Sat Feb 20 16:28:37 2010 (r204129) +++ head/sys/mips/rmi/interrupt.h Sat Feb 20 16:30:29 2010 (r204130) @@ -25,7 +25,7 @@ * 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. - * + *__FBSDID("$FreeBSD$") * RMI_BSD */ #ifndef _RMI_INTERRUPT_H_ #define _RMI_INTERRUPT_H_ @@ -39,4 +39,14 @@ #define IRQ_MSGRING 6 #define IRQ_TIMER 7 +/* + * XLR needs custom pre and post handlers for PCI/PCI-e interrupts + * XXX: maybe follow i386 intsrc model + */ +void xlr_cpu_establish_hardintr(const char *, driver_filter_t *, + driver_intr_t *, void *, int, int, void **, void (*)(void *), + void (*)(void *), void (*)(void *), int (*)(void *, u_char)); +void xlr_mask_hard_irq(void *); +void xlr_unmask_hard_irq(void *); + #endif /* _RMI_INTERRUPT_H_ */ Modified: head/sys/mips/rmi/intr_machdep.c ============================================================================== --- head/sys/mips/rmi/intr_machdep.c Sat Feb 20 16:28:37 2010 (r204129) +++ head/sys/mips/rmi/intr_machdep.c Sat Feb 20 16:30:29 2010 (r204130) @@ -51,19 +51,19 @@ __FBSDID("$FreeBSD$"); /*#include */ static mips_intrcnt_t mips_intr_counters[XLR_MAX_INTR]; -struct mips_intrhand mips_intr_handlers[XLR_MAX_INTR]; +static struct intr_event *mips_intr_events[XLR_MAX_INTR]; static int intrcnt_index; -static void -mips_mask_hard_irq(void *source) +void +xlr_mask_hard_irq(void *source) { uintptr_t irq = (uintptr_t) source; write_c0_eimr64(read_c0_eimr64() & ~(1ULL << irq)); } -static void -mips_unmask_hard_irq(void *source) +void +xlr_unmask_hard_irq(void *source) { uintptr_t irq = (uintptr_t) source; @@ -71,10 +71,11 @@ mips_unmask_hard_irq(void *source) } void -cpu_establish_hardintr(const char *name, driver_filter_t * filt, - void (*handler) (void *), void *arg, int irq, int flags, void **cookiep) +xlr_cpu_establish_hardintr(const char *name, driver_filter_t * filt, + void (*handler) (void *), void *arg, int irq, int flags, void **cookiep, + void (*pre_ithread)(void *), void (*post_ithread)(void *), + void (*post_filter)(void *), int (*assign_cpu)(void *, u_char)) { - struct mips_intrhand *mih; /* descriptor for the IRQ */ struct intr_event *ie; /* descriptor for the IRQ */ int errcode; @@ -85,25 +86,33 @@ cpu_establish_hardintr(const char *name, * FIXME locking - not needed now, because we do this only on * startup from CPU0 */ - mih = &mips_intr_handlers[irq]; + ie = mips_intr_events[irq]; /* mih->cntp = &intrcnt[irq]; */ - ie = mih->mih_event; if (ie == NULL) { errcode = intr_event_create(&ie, (void *)(uintptr_t) irq, 0, - irq, mips_mask_hard_irq, mips_unmask_hard_irq, - NULL, NULL, "hard intr%d:", irq); + irq, pre_ithread, post_ithread, post_filter, assign_cpu, + "hard intr%d:", irq); if (errcode) { printf("Could not create event for intr %d\n", irq); return; } + mips_intr_events[irq] = ie; } + intr_event_add_handler(ie, name, filt, handler, arg, intr_priority(flags), flags, cookiep); - mih->mih_event = ie; - mips_unmask_hard_irq((void *)(uintptr_t) irq); + xlr_unmask_hard_irq((void *)(uintptr_t) irq); } +void +cpu_establish_hardintr(const char *name, driver_filter_t * filt, + void (*handler) (void *), void *arg, int irq, int flags, void **cookiep) +{ + xlr_cpu_establish_hardintr(name, filt, handler, arg, irq, + flags, cookiep, xlr_mask_hard_irq, xlr_unmask_hard_irq, + NULL, NULL); +} void cpu_establish_softintr(const char *name, driver_filter_t * filt, @@ -111,20 +120,26 @@ cpu_establish_softintr(const char *name, void **cookiep) { /* we don't separate them into soft/hard like other mips */ - cpu_establish_hardintr(name, filt, handler, arg, irq, flags, cookiep); + xlr_cpu_establish_hardintr(name, filt, handler, arg, irq, + flags, cookiep, xlr_mask_hard_irq, xlr_unmask_hard_irq, + NULL, NULL); } void cpu_intr(struct trapframe *tf) { - struct mips_intrhand *mih; struct intr_event *ie; - register_t eirr; + uint64_t eirr, eimr; int i; critical_enter(); + + /* find a list of enabled interrupts */ eirr = read_c0_eirr64(); - if (eirr == 0) { + eimr = read_c0_eimr64(); + eirr &= eimr; + + if (eirr == 0) { critical_exit(); return; } @@ -162,9 +177,8 @@ cpu_intr(struct trapframe *tf) } #endif #endif - mih = &mips_intr_handlers[i]; + ie = mips_intr_events[i]; /* atomic_add_long(mih->cntp, 1); */ - ie = mih->mih_event; write_c0_eirr64(1ULL << i); pic_ack(i, 0); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 16:32:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B218106566B; Sat, 20 Feb 2010 16:32:34 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 188FE8FC13; Sat, 20 Feb 2010 16:32:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KGWXTQ057400; Sat, 20 Feb 2010 16:32:33 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KGWXF7057398; Sat, 20 Feb 2010 16:32:33 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201632.o1KGWXF7057398@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 16:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204131 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 16:32:34 -0000 Author: rrs Date: Sat Feb 20 16:32:33 2010 New Revision: 204131 URL: http://svn.freebsd.org/changeset/base/204131 Log: Cleanups for sys/mips/rmi/bus_space_rmi.c - remove pci related code from bus_space_rmi.c, we will have another file for PCI bus space functions which will do byte-swapping. - remove local SWAP implementation - added TODO stub for unimplemented functions Obtained from: C. Jayachandran - c.jayachandran@gmail.com Modified: head/sys/mips/rmi/bus_space_rmi.c Modified: head/sys/mips/rmi/bus_space_rmi.c ============================================================================== --- head/sys/mips/rmi/bus_space_rmi.c Sat Feb 20 16:30:29 2010 (r204130) +++ head/sys/mips/rmi/bus_space_rmi.c Sat Feb 20 16:32:33 2010 (r204131) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -42,14 +43,12 @@ __FBSDID("$FreeBSD$"); #include #include -void xlr_print_int(uint32_t); static int rmi_bus_space_map(void *t, bus_addr_t addr, bus_size_t size, int flags, bus_space_handle_t * bshp); - static void rmi_bus_space_unmap(void *t, bus_space_handle_t bsh, bus_size_t size); @@ -132,6 +131,7 @@ rmi_bus_space_write_multi_1(void *t, bus_size_t offset, const u_int8_t * addr, size_t count); + static void rmi_bus_space_write_multi_2(void *t, bus_space_handle_t handle, @@ -176,7 +176,6 @@ static void rmi_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, bus_size_t offset __unused, bus_size_t len __unused, int flags); - static void rmi_bus_space_copy_region_2(void *t, bus_space_handle_t bsh1, @@ -244,7 +243,8 @@ rmi_bus_space_write_multi_stream_4(void const u_int32_t * addr, size_t count); - +#define TODO() printf("XLR memory bus space function '%s' unimplemented\n", __func__) + static struct bus_space local_rmi_bus_space = { /* cookie */ (void *)0, @@ -355,27 +355,9 @@ static struct bus_space local_rmi_bus_sp /* generic bus_space tag */ bus_space_tag_t rmi_bus_space = &local_rmi_bus_space; -#define MIPS_BUS_SPACE_IO 0 /* space is i/o space */ -#define MIPS_BUS_SPACE_MEM 1 /* space is mem space */ -#define MIPS_BUS_SPACE_PCI 10 /* avoid conflict with other spaces */ - -#define BUS_SPACE_UNRESTRICTED (~0) - -#define SWAP32(x)\ - (((x) & 0xff000000) >> 24) | \ - (((x) & 0x000000ff) << 24) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x00ff0000) >> 8) - -#define SWAP16(x)\ - (((x) & 0xff00) >> 8) | \ - (((x) & 0x00ff) << 8) - /* * Map a region of device bus space into CPU virtual address space. */ - - static int rmi_bus_space_map(void *t __unused, bus_addr_t addr, bus_size_t size __unused, int flags __unused, @@ -417,34 +399,24 @@ static u_int8_t rmi_bus_space_read_1(void *tag, bus_space_handle_t handle, bus_size_t offset) { - if ((int)tag == MIPS_BUS_SPACE_PCI) - return (u_int8_t) (*(volatile u_int8_t *)(handle + offset)); - else - return (u_int8_t) (*(volatile u_int32_t *)(handle + offset)); + return (u_int8_t) (*(volatile u_int32_t *)(handle + offset)); } static u_int16_t rmi_bus_space_read_2(void *tag, bus_space_handle_t handle, bus_size_t offset) { - if ((int)tag == MIPS_BUS_SPACE_PCI) - return SWAP16((u_int16_t) (*(volatile u_int16_t *)(handle + offset))); - else - return *(volatile u_int16_t *)(handle + offset); + return (u_int16_t)(*(volatile u_int32_t *)(handle + offset)); } static u_int32_t rmi_bus_space_read_4(void *tag, bus_space_handle_t handle, bus_size_t offset) { - if ((int)tag == MIPS_BUS_SPACE_PCI) - return SWAP32((*(volatile u_int32_t *)(handle + offset))); - else - return (*(volatile u_int32_t *)(handle + offset)); + return (*(volatile u_int32_t *)(handle + offset)); } - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. @@ -453,41 +425,21 @@ static void rmi_bus_space_read_multi_1(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int8_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = (*(volatile u_int8_t *)(handle + offset)); - addr++; - } + TODO(); } static void rmi_bus_space_read_multi_2(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int16_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = *(volatile u_int16_t *)(handle + offset); - *addr = SWAP16(*addr); - addr++; - } + TODO(); } static void rmi_bus_space_read_multi_4(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int32_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = *(volatile u_int32_t *)(handle + offset); - *addr = SWAP32(*addr); - addr++; - } + TODO(); } /* @@ -495,43 +447,28 @@ rmi_bus_space_read_multi_4(void *tag, bu * described by tag/handle/offset. */ - static void rmi_bus_space_write_1(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int8_t value) { - mips_sync(); - if ((int)tag == MIPS_BUS_SPACE_PCI) - *(volatile u_int8_t *)(handle + offset) = value; - else - *(volatile u_int32_t *)(handle + offset) = (u_int32_t) value; + *(volatile u_int32_t *)(handle + offset) = (u_int32_t)value; } static void rmi_bus_space_write_2(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int16_t value) { - mips_sync(); - if ((int)tag == MIPS_BUS_SPACE_PCI) { - *(volatile u_int16_t *)(handle + offset) = SWAP16(value); - } else - *(volatile u_int16_t *)(handle + offset) = value; + *(volatile u_int32_t *)(handle + offset) = (u_int32_t)value; } - static void rmi_bus_space_write_4(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int32_t value) { - mips_sync(); - if ((int)tag == MIPS_BUS_SPACE_PCI) { - *(volatile u_int32_t *)(handle + offset) = SWAP32(value); - } else - *(volatile u_int32_t *)(handle + offset) = value; + *(volatile u_int32_t *)(handle + offset) = value; } - /* * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. @@ -542,39 +479,21 @@ static void rmi_bus_space_write_multi_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int8_t *)(handle + offset)) = *addr; - addr++; - } + TODO(); } static void rmi_bus_space_write_multi_2(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int16_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int16_t *)(handle + offset)) = SWAP16(*addr); - addr++; - } + TODO(); } static void rmi_bus_space_write_multi_4(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int32_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int32_t *)(handle + offset)) = SWAP32(*addr); - addr++; - } + TODO(); } /* @@ -589,7 +508,7 @@ rmi_bus_space_set_region_2(void *t, bus_ bus_addr_t addr = bsh + offset; for (; count != 0; count--, addr += 2) - (*(volatile u_int16_t *)(addr)) = value; + (*(volatile u_int32_t *)(addr)) = value; } static void @@ -649,43 +568,24 @@ static void rmi_bus_space_read_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int8_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = (*(volatile u_int8_t *)(handle + offset)); - addr++; - } + TODO(); } static void rmi_bus_space_read_multi_stream_2(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int16_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = (*(volatile u_int16_t *)(handle + offset)); - addr++; - } + TODO(); } static void rmi_bus_space_read_multi_stream_4(void *tag, bus_space_handle_t handle, bus_size_t offset, u_int32_t * addr, size_t count) { - - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - *addr = (*(volatile u_int32_t *)(handle + offset)); - addr++; - } + TODO(); } - /* * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -695,24 +595,14 @@ void rmi_bus_space_read_region_1(void *t, bus_space_handle_t bsh, bus_size_t offset, u_int8_t * addr, size_t count) { - bus_addr_t baddr = bsh + offset; - - while (count--) { - *addr++ = (*(volatile u_int8_t *)(baddr)); - baddr += 1; - } + TODO(); } void rmi_bus_space_read_region_2(void *t, bus_space_handle_t bsh, bus_size_t offset, u_int16_t * addr, size_t count) { - bus_addr_t baddr = bsh + offset; - - while (count--) { - *addr++ = (*(volatile u_int16_t *)(baddr)); - baddr += 2; - } + TODO(); } void @@ -727,13 +617,11 @@ rmi_bus_space_read_region_4(void *t, bus } } - void rmi_bus_space_write_stream_1(void *t, bus_space_handle_t handle, bus_size_t offset, u_int8_t value) { - mips_sync(); - *(volatile u_int8_t *)(handle + offset) = value; + TODO(); } @@ -741,8 +629,7 @@ static void rmi_bus_space_write_stream_2(void *t, bus_space_handle_t handle, bus_size_t offset, u_int16_t value) { - mips_sync(); - *(volatile u_int16_t *)(handle + offset) = value; + TODO(); } @@ -750,8 +637,7 @@ static void rmi_bus_space_write_stream_4(void *t, bus_space_handle_t handle, bus_size_t offset, u_int32_t value) { - mips_sync(); - *(volatile u_int32_t *)(handle + offset) = value; + TODO(); } @@ -759,39 +645,21 @@ static void rmi_bus_space_write_multi_stream_1(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int8_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int8_t *)(handle + offset)) = *addr; - addr++; - } + TODO(); } static void rmi_bus_space_write_multi_stream_2(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int16_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int16_t *)(handle + offset)) = *addr; - addr++; - } + TODO(); } static void rmi_bus_space_write_multi_stream_4(void *tag, bus_space_handle_t handle, bus_size_t offset, const u_int32_t * addr, size_t count) { - mips_sync(); - if ((int)tag != MIPS_BUS_SPACE_PCI) - return; - while (count--) { - (*(volatile u_int32_t *)(handle + offset)) = *addr; - addr++; - } + TODO(); } void @@ -801,31 +669,18 @@ rmi_bus_space_write_region_2(void *t, const u_int16_t * addr, size_t count) { - bus_addr_t baddr = (bus_addr_t) bsh + offset; - - while (count--) { - (*(volatile u_int16_t *)(baddr)) = *addr; - addr++; - baddr += 2; - } + TODO(); } void rmi_bus_space_write_region_4(void *t, bus_space_handle_t bsh, bus_size_t offset, const u_int32_t * addr, size_t count) { - bus_addr_t baddr = bsh + offset; - - while (count--) { - (*(volatile u_int32_t *)(baddr)) = *addr; - addr++; - baddr += 4; - } + TODO(); } static void rmi_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, bus_size_t offset __unused, bus_size_t len __unused, int flags) { - } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 17:12:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A8361065676; Sat, 20 Feb 2010 17:12:07 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6750A8FC08; Sat, 20 Feb 2010 17:12:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KHC72F066480; Sat, 20 Feb 2010 17:12:07 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KHC7vR066478; Sat, 20 Feb 2010 17:12:07 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201712.o1KHC7vR066478@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 17:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204135 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 17:12:07 -0000 Author: rrs Date: Sat Feb 20 17:12:07 2010 New Revision: 204135 URL: http://svn.freebsd.org/changeset/base/204135 Log: Opps forgot to add this: - add bus_space_rmi_pci.c for PCI bus space Obtained from: C. Jayachandran - Added: head/sys/mips/rmi/bus_space_rmi_pci.c (contents, props changed) Added: head/sys/mips/rmi/bus_space_rmi_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/rmi/bus_space_rmi_pci.c Sat Feb 20 17:12:07 2010 (r204135) @@ -0,0 +1,760 @@ +/*- + * Copyright (c) 2009 RMI Corporation + * 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. + * + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +static int +rmi_pci_bus_space_map(void *t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t * bshp); + +static void +rmi_pci_bus_space_unmap(void *t, bus_space_handle_t bsh, + bus_size_t size); + +static int +rmi_pci_bus_space_subregion(void *t, + bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, + bus_space_handle_t * nbshp); + +static u_int8_t +rmi_pci_bus_space_read_1(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static u_int16_t +rmi_pci_bus_space_read_2(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static u_int32_t +rmi_pci_bus_space_read_4(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static void +rmi_pci_bus_space_read_multi_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_1(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t value); + +static void +rmi_pci_bus_space_write_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t value); + +static void +rmi_pci_bus_space_write_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t value); + +static void +rmi_pci_bus_space_write_multi_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + + +static void +rmi_pci_bus_space_set_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int16_t value, + size_t count); +static void +rmi_pci_bus_space_set_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int32_t value, + size_t count); + +static void +rmi_pci_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, int flags); + +static void +rmi_pci_bus_space_copy_region_2(void *t, + bus_space_handle_t bsh1, + bus_size_t off1, + bus_space_handle_t bsh2, + bus_size_t off2, size_t count); + +u_int8_t +rmi_pci_bus_space_read_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset); + +static u_int16_t +rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset); + +static u_int32_t +rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset); +static void +rmi_pci_bus_space_read_multi_stream_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_stream_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_stream_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, + size_t count); + +void +rmi_pci_bus_space_write_stream_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int8_t value); +static void +rmi_pci_bus_space_write_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value); + +static void +rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value); + +static void +rmi_pci_bus_space_write_multi_stream_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int8_t * addr, + size_t count); +static void +rmi_pci_bus_space_write_multi_stream_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_stream_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + +#define TODO() printf("XLR memory bus space function '%s' unimplemented\n", __func__) + +static struct bus_space local_rmi_pci_bus_space = { + /* cookie */ + (void *)0, + + /* mapping/unmapping */ + rmi_pci_bus_space_map, + rmi_pci_bus_space_unmap, + rmi_pci_bus_space_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + rmi_pci_bus_space_barrier, + + /* read (single) */ + rmi_pci_bus_space_read_1, + rmi_pci_bus_space_read_2, + rmi_pci_bus_space_read_4, + NULL, + + /* read multiple */ + rmi_pci_bus_space_read_multi_1, + rmi_pci_bus_space_read_multi_2, + rmi_pci_bus_space_read_multi_4, + NULL, + + /* read region */ + rmi_pci_bus_space_read_region_1, + rmi_pci_bus_space_read_region_2, + rmi_pci_bus_space_read_region_4, + NULL, + + /* write (single) */ + rmi_pci_bus_space_write_1, + rmi_pci_bus_space_write_2, + rmi_pci_bus_space_write_4, + NULL, + + /* write multiple */ + rmi_pci_bus_space_write_multi_1, + rmi_pci_bus_space_write_multi_2, + rmi_pci_bus_space_write_multi_4, + NULL, + + /* write region */ + NULL, + rmi_pci_bus_space_write_region_2, + rmi_pci_bus_space_write_region_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + rmi_pci_bus_space_set_region_2, + rmi_pci_bus_space_set_region_4, + NULL, + + /* copy */ + NULL, + rmi_pci_bus_space_copy_region_2, + NULL, + NULL, + + /* read (single) stream */ + rmi_pci_bus_space_read_stream_1, + rmi_pci_bus_space_read_stream_2, + rmi_pci_bus_space_read_stream_4, + NULL, + + /* read multiple stream */ + rmi_pci_bus_space_read_multi_stream_1, + rmi_pci_bus_space_read_multi_stream_2, + rmi_pci_bus_space_read_multi_stream_4, + NULL, + + /* read region stream */ + rmi_pci_bus_space_read_region_1, + rmi_pci_bus_space_read_region_2, + rmi_pci_bus_space_read_region_4, + NULL, + + /* write (single) stream */ + rmi_pci_bus_space_write_stream_1, + rmi_pci_bus_space_write_stream_2, + rmi_pci_bus_space_write_stream_4, + NULL, + + /* write multiple stream */ + rmi_pci_bus_space_write_multi_stream_1, + rmi_pci_bus_space_write_multi_stream_2, + rmi_pci_bus_space_write_multi_stream_4, + NULL, + + /* write region stream */ + NULL, + rmi_pci_bus_space_write_region_2, + rmi_pci_bus_space_write_region_4, + NULL, +}; + +/* generic bus_space tag */ +bus_space_tag_t rmi_pci_bus_space = &local_rmi_pci_bus_space; + +/* + * Map a region of device bus space into CPU virtual address space. + */ +static int +rmi_pci_bus_space_map(void *t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t * bshp) +{ + *bshp = addr; + return (0); +} + +/* + * Unmap a region of device bus space. + */ +static void +rmi_pci_bus_space_unmap(void *t __unused, bus_space_handle_t bsh __unused, + bus_size_t size __unused) +{ +} + +/* + * Get a new handle for a subregion of an already-mapped area of bus space. + */ + +static int +rmi_pci_bus_space_subregion(void *t __unused, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size __unused, + bus_space_handle_t * nbshp) +{ + *nbshp = bsh + offset; + return (0); +} + +/* + * Read a 1, 2, 4, or 8 byte quantity from bus space + * described by tag/handle/offset. + */ + +static u_int8_t +rmi_pci_bus_space_read_1(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return (u_int8_t) (*(volatile u_int8_t *)(handle + offset)); +} + +static u_int16_t +rmi_pci_bus_space_read_2(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return bswap16((u_int16_t) (*(volatile u_int16_t *)(handle + offset))); +} + +static u_int32_t +rmi_pci_bus_space_read_4(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return bswap32((*(volatile u_int32_t *)(handle + offset))); +} + + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle/offset and copy into buffer provided. + */ +static void +rmi_pci_bus_space_read_multi_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int8_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + + while (count--) { + *addr = *(volatile u_int16_t *)(handle + offset); + *addr = bswap16(*addr); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + + while (count--) { + *addr = *(volatile u_int32_t *)(handle + offset); + *addr = bswap32(*addr); + addr++; + } +} + +/* + * Write the 1, 2, 4, or 8 byte value `value' to bus space + * described by tag/handle/offset. + */ + +static void +rmi_pci_bus_space_write_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t value) +{ + mips_sync(); + *(volatile u_int8_t *)(handle + offset) = value; +} + +static void +rmi_pci_bus_space_write_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value) +{ + mips_sync(); + *(volatile u_int16_t *)(handle + offset) = bswap16(value); +} + + +static void +rmi_pci_bus_space_write_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value) +{ + mips_sync(); + *(volatile u_int32_t *)(handle + offset) = bswap32(value); +} + +/* + * Write `count' 1, 2, 4, or 8 byte quantities from the buffer + * provided to bus space described by tag/handle/offset. + */ + + +static void +rmi_pci_bus_space_write_multi_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int8_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int8_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int16_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int16_t *)(handle + offset)) = bswap16(*addr); + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int32_t *)(handle + offset)) = bswap32(*addr); + addr++; + } +} + +/* + * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described + * by tag/handle starting at `offset'. + */ + +static void +rmi_pci_bus_space_set_region_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 2) + (*(volatile u_int16_t *)(addr)) = value; +} + +static void +rmi_pci_bus_space_set_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 4) + (*(volatile u_int32_t *)(addr)) = value; +} + + +/* + * Copy `count' 1, 2, 4, or 8 byte values from bus space starting + * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. + */ +static void +rmi_pci_bus_space_copy_region_2(void *t, bus_space_handle_t bsh1, + bus_size_t off1, bus_space_handle_t bsh2, + bus_size_t off2, size_t count) +{ + TODO(); +} + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle/offset and copy into buffer provided. + */ + +u_int8_t +rmi_pci_bus_space_read_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return *((volatile u_int8_t *)(handle + offset)); +} + + +static u_int16_t +rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + return *(volatile u_int16_t *)(handle + offset); +} + + +static u_int32_t +rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + return (*(volatile u_int32_t *)(handle + offset)); +} + + +static void +rmi_pci_bus_space_read_multi_stream_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int8_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_stream_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int16_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_stream_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int32_t *)(handle + offset)); + addr++; + } +} + + + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle and starting at `offset' and copy into + * buffer provided. + */ +void +rmi_pci_bus_space_read_region_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int8_t *)(baddr)); + baddr += 1; + } +} + +void +rmi_pci_bus_space_read_region_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int16_t *)(baddr)); + baddr += 2; + } +} + +void +rmi_pci_bus_space_read_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int32_t *)(baddr)); + baddr += 4; + } +} + + +void +rmi_pci_bus_space_write_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int8_t value) +{ + mips_sync(); + *(volatile u_int8_t *)(handle + offset) = value; +} + +static void +rmi_pci_bus_space_write_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value) +{ + mips_sync(); + *(volatile u_int16_t *)(handle + offset) = value; +} + + +static void +rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value) +{ + mips_sync(); + *(volatile u_int32_t *)(handle + offset) = value; +} + + +static void +rmi_pci_bus_space_write_multi_stream_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int8_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int8_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_stream_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int16_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int16_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_stream_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int32_t *)(handle + offset)) = *addr; + addr++; + } +} + +void +rmi_pci_bus_space_write_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int16_t * addr, + size_t count) +{ + bus_addr_t baddr = (bus_addr_t) bsh + offset; + + while (count--) { + (*(volatile u_int16_t *)(baddr)) = *addr; + addr++; + baddr += 2; + } +} + +void +rmi_pci_bus_space_write_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + (*(volatile u_int32_t *)(baddr)) = *addr; + addr++; + baddr += 4; + } +} + +static void +rmi_pci_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, int flags) +{ + +} From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 17:19:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EA98106566B; Sat, 20 Feb 2010 17:19:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B5338FC0C; Sat, 20 Feb 2010 17:19:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KHJHTG068098; Sat, 20 Feb 2010 17:19:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KHJHt3068093; Sat, 20 Feb 2010 17:19:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201719.o1KHJHt3068093@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 17:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204136 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 17:19:17 -0000 Author: rrs Date: Sat Feb 20 17:19:16 2010 New Revision: 204136 URL: http://svn.freebsd.org/changeset/base/204136 Log: Changes for pci and pci-e support - add bus_space_rmi_pci.c for PCI bus space - files.xlr update for changes in files - pcibus.c merged into xlr_pci.c (they were small files with inter-dependencies) - xlr_pci.c - lot of changes here with few fixes, formatting cleanup Obtained from: C. Jayachandran (JC) - c.jayachandran@gmail.com Modified: head/sys/mips/rmi/bus_space_rmi_pci.c head/sys/mips/rmi/files.xlr head/sys/mips/rmi/pcibus.h head/sys/mips/rmi/xlr_pci.c Modified: head/sys/mips/rmi/bus_space_rmi_pci.c ============================================================================== --- head/sys/mips/rmi/bus_space_rmi_pci.c Sat Feb 20 17:12:07 2010 (r204135) +++ head/sys/mips/rmi/bus_space_rmi_pci.c Sat Feb 20 17:19:16 2010 (r204136) @@ -23,6 +23,767 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +static int +rmi_pci_bus_space_map(void *t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t * bshp); + +static void +rmi_pci_bus_space_unmap(void *t, bus_space_handle_t bsh, + bus_size_t size); + +static int +rmi_pci_bus_space_subregion(void *t, + bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, + bus_space_handle_t * nbshp); + +static u_int8_t +rmi_pci_bus_space_read_1(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static u_int16_t +rmi_pci_bus_space_read_2(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static u_int32_t +rmi_pci_bus_space_read_4(void *t, + bus_space_handle_t handle, + bus_size_t offset); + +static void +rmi_pci_bus_space_read_multi_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_1(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t value); + +static void +rmi_pci_bus_space_write_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t value); + +static void +rmi_pci_bus_space_write_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t value); + +static void +rmi_pci_bus_space_write_multi_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + + +static void +rmi_pci_bus_space_set_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int16_t value, + size_t count); +static void +rmi_pci_bus_space_set_region_4(void *t, + bus_space_handle_t bsh, + bus_size_t offset, u_int32_t value, + size_t count); + +static void +rmi_pci_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, int flags); + +static void +rmi_pci_bus_space_copy_region_2(void *t, + bus_space_handle_t bsh1, + bus_size_t off1, + bus_space_handle_t bsh2, + bus_size_t off2, size_t count); + +u_int8_t +rmi_pci_bus_space_read_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset); + +static u_int16_t +rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset); + +static u_int32_t +rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset); +static void +rmi_pci_bus_space_read_multi_stream_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_stream_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_read_multi_stream_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, + size_t count); + +void +rmi_pci_bus_space_write_stream_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int8_t value); +static void +rmi_pci_bus_space_write_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value); + +static void +rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value); + +static void +rmi_pci_bus_space_write_multi_stream_1(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int8_t * addr, + size_t count); +static void +rmi_pci_bus_space_write_multi_stream_2(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int16_t * addr, + size_t count); + +static void +rmi_pci_bus_space_write_multi_stream_4(void *t, + bus_space_handle_t handle, + bus_size_t offset, + const u_int32_t * addr, + size_t count); + +#define TODO() printf("XLR memory bus space function '%s' unimplemented\n", __func__) + +static struct bus_space local_rmi_pci_bus_space = { + /* cookie */ + (void *)0, + + /* mapping/unmapping */ + rmi_pci_bus_space_map, + rmi_pci_bus_space_unmap, + rmi_pci_bus_space_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + rmi_pci_bus_space_barrier, + + /* read (single) */ + rmi_pci_bus_space_read_1, + rmi_pci_bus_space_read_2, + rmi_pci_bus_space_read_4, + NULL, + + /* read multiple */ + rmi_pci_bus_space_read_multi_1, + rmi_pci_bus_space_read_multi_2, + rmi_pci_bus_space_read_multi_4, + NULL, + + /* read region */ + rmi_pci_bus_space_read_region_1, + rmi_pci_bus_space_read_region_2, + rmi_pci_bus_space_read_region_4, + NULL, + + /* write (single) */ + rmi_pci_bus_space_write_1, + rmi_pci_bus_space_write_2, + rmi_pci_bus_space_write_4, + NULL, + + /* write multiple */ + rmi_pci_bus_space_write_multi_1, + rmi_pci_bus_space_write_multi_2, + rmi_pci_bus_space_write_multi_4, + NULL, + + /* write region */ + NULL, + rmi_pci_bus_space_write_region_2, + rmi_pci_bus_space_write_region_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + rmi_pci_bus_space_set_region_2, + rmi_pci_bus_space_set_region_4, + NULL, + + /* copy */ + NULL, + rmi_pci_bus_space_copy_region_2, + NULL, + NULL, + + /* read (single) stream */ + rmi_pci_bus_space_read_stream_1, + rmi_pci_bus_space_read_stream_2, + rmi_pci_bus_space_read_stream_4, + NULL, + + /* read multiple stream */ + rmi_pci_bus_space_read_multi_stream_1, + rmi_pci_bus_space_read_multi_stream_2, + rmi_pci_bus_space_read_multi_stream_4, + NULL, + + /* read region stream */ + rmi_pci_bus_space_read_region_1, + rmi_pci_bus_space_read_region_2, + rmi_pci_bus_space_read_region_4, + NULL, + + /* write (single) stream */ + rmi_pci_bus_space_write_stream_1, + rmi_pci_bus_space_write_stream_2, + rmi_pci_bus_space_write_stream_4, + NULL, + + /* write multiple stream */ + rmi_pci_bus_space_write_multi_stream_1, + rmi_pci_bus_space_write_multi_stream_2, + rmi_pci_bus_space_write_multi_stream_4, + NULL, + + /* write region stream */ + NULL, + rmi_pci_bus_space_write_region_2, + rmi_pci_bus_space_write_region_4, + NULL, +}; + +/* generic bus_space tag */ +bus_space_tag_t rmi_pci_bus_space = &local_rmi_pci_bus_space; + +/* + * Map a region of device bus space into CPU virtual address space. + */ +static int +rmi_pci_bus_space_map(void *t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t * bshp) +{ + *bshp = addr; + return (0); +} + +/* + * Unmap a region of device bus space. + */ +static void +rmi_pci_bus_space_unmap(void *t __unused, bus_space_handle_t bsh __unused, + bus_size_t size __unused) +{ +} + +/* + * Get a new handle for a subregion of an already-mapped area of bus space. + */ + +static int +rmi_pci_bus_space_subregion(void *t __unused, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size __unused, + bus_space_handle_t * nbshp) +{ + *nbshp = bsh + offset; + return (0); +} + +/* + * Read a 1, 2, 4, or 8 byte quantity from bus space + * described by tag/handle/offset. + */ + +static u_int8_t +rmi_pci_bus_space_read_1(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return (u_int8_t) (*(volatile u_int8_t *)(handle + offset)); +} + +static u_int16_t +rmi_pci_bus_space_read_2(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return bswap16((u_int16_t) (*(volatile u_int16_t *)(handle + offset))); +} + +static u_int32_t +rmi_pci_bus_space_read_4(void *tag, bus_space_handle_t handle, + bus_size_t offset) +{ + return bswap32((*(volatile u_int32_t *)(handle + offset))); +} + + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle/offset and copy into buffer provided. + */ +static void +rmi_pci_bus_space_read_multi_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int8_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + + while (count--) { + *addr = *(volatile u_int16_t *)(handle + offset); + *addr = bswap16(*addr); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + + while (count--) { + *addr = *(volatile u_int32_t *)(handle + offset); + *addr = bswap32(*addr); + addr++; + } +} + +/* + * Write the 1, 2, 4, or 8 byte value `value' to bus space + * described by tag/handle/offset. + */ + +static void +rmi_pci_bus_space_write_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t value) +{ + mips_sync(); + *(volatile u_int8_t *)(handle + offset) = value; +} + +static void +rmi_pci_bus_space_write_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value) +{ + mips_sync(); + *(volatile u_int16_t *)(handle + offset) = bswap16(value); +} + + +static void +rmi_pci_bus_space_write_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value) +{ + mips_sync(); + *(volatile u_int32_t *)(handle + offset) = bswap32(value); +} + +/* + * Write `count' 1, 2, 4, or 8 byte quantities from the buffer + * provided to bus space described by tag/handle/offset. + */ + + +static void +rmi_pci_bus_space_write_multi_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int8_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int8_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int16_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int16_t *)(handle + offset)) = bswap16(*addr); + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int32_t *)(handle + offset)) = bswap32(*addr); + addr++; + } +} + +/* + * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described + * by tag/handle starting at `offset'. + */ + +static void +rmi_pci_bus_space_set_region_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 2) + (*(volatile u_int16_t *)(addr)) = value; +} + +static void +rmi_pci_bus_space_set_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 4) + (*(volatile u_int32_t *)(addr)) = value; +} + + +/* + * Copy `count' 1, 2, 4, or 8 byte values from bus space starting + * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. + */ +static void +rmi_pci_bus_space_copy_region_2(void *t, bus_space_handle_t bsh1, + bus_size_t off1, bus_space_handle_t bsh2, + bus_size_t off2, size_t count) +{ + TODO(); +} + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle/offset and copy into buffer provided. + */ + +u_int8_t +rmi_pci_bus_space_read_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return *((volatile u_int8_t *)(handle + offset)); +} + + +static u_int16_t +rmi_pci_bus_space_read_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + return *(volatile u_int16_t *)(handle + offset); +} + + +static u_int32_t +rmi_pci_bus_space_read_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + return (*(volatile u_int32_t *)(handle + offset)); +} + + +static void +rmi_pci_bus_space_read_multi_stream_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int8_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_stream_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int16_t *)(handle + offset)); + addr++; + } +} + +static void +rmi_pci_bus_space_read_multi_stream_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + while (count--) { + *addr = (*(volatile u_int32_t *)(handle + offset)); + addr++; + } +} + + + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle and starting at `offset' and copy into + * buffer provided. + */ +void +rmi_pci_bus_space_read_region_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int8_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int8_t *)(baddr)); + baddr += 1; + } +} + +void +rmi_pci_bus_space_read_region_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int16_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int16_t *)(baddr)); + baddr += 2; + } +} + +void +rmi_pci_bus_space_read_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, u_int32_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = (*(volatile u_int32_t *)(baddr)); + baddr += 4; + } +} + + +void +rmi_pci_bus_space_write_stream_1(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int8_t value) +{ + mips_sync(); + *(volatile u_int8_t *)(handle + offset) = value; +} + +static void +rmi_pci_bus_space_write_stream_2(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int16_t value) +{ + mips_sync(); + *(volatile u_int16_t *)(handle + offset) = value; +} + + +static void +rmi_pci_bus_space_write_stream_4(void *t, bus_space_handle_t handle, + bus_size_t offset, u_int32_t value) +{ + mips_sync(); + *(volatile u_int32_t *)(handle + offset) = value; +} + + +static void +rmi_pci_bus_space_write_multi_stream_1(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int8_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int8_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_stream_2(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int16_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int16_t *)(handle + offset)) = *addr; + addr++; + } +} + +static void +rmi_pci_bus_space_write_multi_stream_4(void *tag, bus_space_handle_t handle, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + mips_sync(); + while (count--) { + (*(volatile u_int32_t *)(handle + offset)) = *addr; + addr++; + } +} + +void +rmi_pci_bus_space_write_region_2(void *t, + bus_space_handle_t bsh, + bus_size_t offset, + const u_int16_t * addr, + size_t count) +{ + bus_addr_t baddr = (bus_addr_t) bsh + offset; + + while (count--) { + (*(volatile u_int16_t *)(baddr)) = *addr; + addr++; + baddr += 2; + } +} + +void +rmi_pci_bus_space_write_region_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const u_int32_t * addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + (*(volatile u_int32_t *)(baddr)) = *addr; + addr++; + baddr += 4; + } +} + +static void +rmi_pci_bus_space_barrier(void *tag __unused, bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, int flags) +{ + +} +/*- + * Copyright (c) 2009 RMI Corporation + * 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. + * */ #include __FBSDID("$FreeBSD$"); Modified: head/sys/mips/rmi/files.xlr ============================================================================== --- head/sys/mips/rmi/files.xlr Sat Feb 20 17:12:07 2010 (r204135) +++ head/sys/mips/rmi/files.xlr Sat Feb 20 17:19:16 2010 (r204136) @@ -14,10 +14,10 @@ mips/rmi/uart_bus_xlr_iodi.c optional mips/rmi/uart_cpu_mips_xlr.c optional uart mips/rmi/perfmon_kern.c optional xlr_perfmon mips/rmi/perfmon_percpu.c optional xlr_perfmon -#mips/rmi/pcibus.c optional pci -#mips/rmi/xlr_pci.c optional pci +mips/rmi/xlr_pci.c optional pci #mips/rmi/xls_ehci.c optional usb ehci mips/rmi/bus_space_rmi.c standard +mips/rmi/bus_space_rmi_pci.c optional pci mips/rmi/dev/sec/rmisec.c optional rmisec mips/rmi/dev/sec/rmilib.c optional rmisec mips/rmi/dev/xlr/rge.c optional rge Modified: head/sys/mips/rmi/pcibus.h ============================================================================== --- head/sys/mips/rmi/pcibus.h Sat Feb 20 17:12:07 2010 (r204135) +++ head/sys/mips/rmi/pcibus.h Sat Feb 20 17:19:16 2010 (r204136) @@ -25,38 +25,11 @@ * * $FreeBSD$ */ -#define DEFAULT_PCI_CONFIG_BASE 0x18000000 +#define DEFAULT_PCI_CONFIG_BASE 0x18000000 +#define MSI_MIPS_ADDR_BASE 0xfee00000 -#define MSI_MIPS_ADDR_BASE 0xfee00000 +#define PCIE_LINK0_MSI_STATUS 0x90 +#define PCIE_LINK1_MSI_STATUS 0x94 +#define PCIE_LINK2_MSI_STATUS 0x190 +#define PCIE_LINK3_MSI_STATUS 0x194 - -#define PCIE_LINK0_MSI_STATUS 0x90 -#define PCIE_LINK1_MSI_STATUS 0x94 -#define PCIE_LINK2_MSI_STATUS 0x190 -#define PCIE_LINK3_MSI_STATUS 0x194 - -void pci_init_resources(void); -struct resource * -xlr_pci_alloc_resource(device_t bus, device_t child, - int type, int *rid, - u_long start, u_long end, u_long count, - u_int flags); -int -pci_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r); -int -pci_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r); -int -pci_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *r); -struct rman *pci_get_rman(device_t dev, int type); - -int -mips_platform_pci_setup_intr(device_t dev, device_t child, - struct resource *irq, int flags, - driver_filter_t * filt, - driver_intr_t * intr, void *arg, - void **cookiep); -int - mips_pci_route_interrupt(device_t bus, device_t dev, int pin); Modified: head/sys/mips/rmi/xlr_pci.c ============================================================================== --- head/sys/mips/rmi/xlr_pci.c Sat Feb 20 17:12:07 2010 (r204135) +++ head/sys/mips/rmi/xlr_pci.c Sat Feb 20 17:19:16 2010 (r204136) @@ -28,17 +28,21 @@ * * RMI_BSD */ #include +__FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include #include #include +#include #include #include +#include #include +#include #include #include #include @@ -47,50 +51,46 @@ #include #include #include -#include #include #include #include #include #include + #include "pcib_if.h" +#define pci_cfg_offset(bus,slot,devfn,where) (((bus)<<16) + ((slot) << 11)+((devfn)<<8)+(where)) +#define PCIE_LINK_STATE 0x4000 + #define LSU_CFG0_REGID 0 #define LSU_CERRLOG_REGID 9 #define LSU_CERROVF_REGID 10 #define LSU_CERRINT_REGID 11 -#define SWAP32(x)\ - (((x) & 0xff000000) >> 24) | \ - (((x) & 0x000000ff) << 24) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x00ff0000) >> 8) - /* MSI support */ - -#define MSI_MIPS_ADDR_DEST 0x000ff000 -#define MSI_MIPS_ADDR_RH 0x00000008 -#define MSI_MIPS_ADDR_RH_OFF 0x00000000 -#define MSI_MIPS_ADDR_RH_ON 0x00000008 -#define MSI_MIPS_ADDR_DM 0x00000004 -#define MSI_MIPS_ADDR_DM_PHYSICAL 0x00000000 -#define MSI_MIPS_ADDR_DM_LOGICAL 0x00000004 +#define MSI_MIPS_ADDR_DEST 0x000ff000 +#define MSI_MIPS_ADDR_RH 0x00000008 +#define MSI_MIPS_ADDR_RH_OFF 0x00000000 +#define MSI_MIPS_ADDR_RH_ON 0x00000008 +#define MSI_MIPS_ADDR_DM 0x00000004 +#define MSI_MIPS_ADDR_DM_PHYSICAL 0x00000000 +#define MSI_MIPS_ADDR_DM_LOGICAL 0x00000004 /* Fields in data for Intel MSI messages. */ -#define MSI_MIPS_DATA_TRGRMOD 0x00008000 /* Trigger mode */ -#define MSI_MIPS_DATA_TRGREDG 0x00000000 /* edge */ -#define MSI_MIPS_DATA_TRGRLVL 0x00008000 /* level */ - -#define MSI_MIPS_DATA_LEVEL 0x00004000 /* Polarity. */ -#define MSI_MIPS_DATA_DEASSERT 0x00000000 -#define MSI_MIPS_DATA_ASSERT 0x00004000 - -#define MSI_MIPS_DATA_DELMOD 0x00000700 /* Delivery Mode */ -#define MSI_MIPS_DATA_DELFIXED 0x00000000 /* fixed */ -#define MSI_MIPS_DATA_DELLOPRI 0x00000100 /* lowest priority */ +#define MSI_MIPS_DATA_TRGRMOD 0x00008000 /* Trigger mode */ +#define MSI_MIPS_DATA_TRGREDG 0x00000000 /* edge */ +#define MSI_MIPS_DATA_TRGRLVL 0x00008000 /* level */ + +#define MSI_MIPS_DATA_LEVEL 0x00004000 /* Polarity. */ +#define MSI_MIPS_DATA_DEASSERT 0x00000000 +#define MSI_MIPS_DATA_ASSERT 0x00004000 + +#define MSI_MIPS_DATA_DELMOD 0x00000700 /* Delivery Mode */ +#define MSI_MIPS_DATA_DELFIXED 0x00000000 /* fixed */ +#define MSI_MIPS_DATA_DELLOPRI 0x00000100 /* lowest priority */ -#define MSI_MIPS_DATA_INTVEC 0x000000ff +#define MSI_MIPS_DATA_INTVEC 0x000000ff /* * Build Intel MSI message and data values from a source. AMD64 systems @@ -104,52 +104,95 @@ (MSI_MIPS_DATA_TRGRLVL | MSI_MIPS_DATA_DELFIXED | \ MSI_MIPS_DATA_ASSERT | (irq)) -struct xlr_hose_softc { +#define DEBUG +#ifdef DEBUG +#define dbg_devprintf device_printf +#else +#define dbg_devprintf(dev, fmt, ...) +#endif + +struct xlr_pcib_softc { int junk; /* no softc */ }; + +extern bus_space_tag_t rmi_pci_bus_space; static devclass_t pcib_devclass; -static int pci_bus_status = 0; -static void *pci_config_base; +static void *xlr_pci_config_base; +static struct rman irq_rman, port_rman, mem_rman; -static uint32_t pci_cfg_read_32bit(uint32_t addr); -static void pci_cfg_write_32bit(uint32_t addr, uint32_t data); +static void +xlr_pci_init_resources(void) +{ + irq_rman.rm_start = 0; + irq_rman.rm_end = 255; + irq_rman.rm_type = RMAN_ARRAY; + irq_rman.rm_descr = "PCI Mapped Interrupts"; + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, 0, 255)) + panic("pci_init_resources irq_rman"); + + port_rman.rm_start = 0; + port_rman.rm_end = ~0u; + port_rman.rm_type = RMAN_ARRAY; + port_rman.rm_descr = "I/O ports"; + if (rman_init(&port_rman) + || rman_manage_region(&port_rman, 0x10000000, 0x1fffffff)) + panic("pci_init_resources port_rman"); + + mem_rman.rm_start = 0; + mem_rman.rm_end = ~0u; + mem_rman.rm_type = RMAN_ARRAY; + mem_rman.rm_descr = "I/O memory"; + if (rman_init(&mem_rman) + || rman_manage_region(&mem_rman, 0xd0000000, 0xdfffffff)) + panic("pci_init_resources mem_rman"); +} static int xlr_pcib_probe(device_t dev) { - device_set_desc(dev, "xlr system bridge controller"); + if (xlr_board_info.is_xls) + device_set_desc(dev, "XLS PCIe bus"); + else + device_set_desc(dev, "XLR PCI bus"); - pci_init_resources(); - pci_config_base = (void *)MIPS_PHYS_TO_KSEG1(DEFAULT_PCI_CONFIG_BASE); - pci_bus_status = 1; + xlr_pci_init_resources(); + xlr_pci_config_base = (void *)MIPS_PHYS_TO_KSEG1(DEFAULT_PCI_CONFIG_BASE); return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 17:24:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D8D91065695; Sat, 20 Feb 2010 17:24:34 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5C8E8FC17; Sat, 20 Feb 2010 17:24:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KHOXAe069335; Sat, 20 Feb 2010 17:24:33 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KHOXiJ069332; Sat, 20 Feb 2010 17:24:33 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201724.o1KHOXiJ069332@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 17:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204137 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 17:24:34 -0000 Author: rrs Date: Sat Feb 20 17:24:33 2010 New Revision: 204137 URL: http://svn.freebsd.org/changeset/base/204137 Log: Fix for the rge driver for boards without rge6 and rge7. - changes to avoid adding theses instances on specific chips Obtained from: C. Jayachandran - JC - c.jayachandran@gmail.com Modified: head/sys/mips/rmi/board.c head/sys/mips/rmi/iodi.c Modified: head/sys/mips/rmi/board.c ============================================================================== --- head/sys/mips/rmi/board.c Sat Feb 20 17:19:16 2010 (r204136) +++ head/sys/mips/rmi/board.c Sat Feb 20 17:24:33 2010 (r204137) @@ -27,6 +27,8 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * *****************************RMI_2**********************************/ +#include /* RCS ID & Copyright macro defns */ +__FBSDID("$FreeBSD$"); #include #include #include @@ -93,6 +95,7 @@ struct xlr_board_info xlr_board_info; int xlr_board_info_setup() { + if (xlr_is_xls()) { xlr_board_info.is_xls = 1; xlr_board_info.nr_cpus = 8; @@ -122,6 +125,18 @@ xlr_board_info_setup() /* network block 1 */ xlr_board_info.gmac_block[1].type = XLR_GMAC; xlr_board_info.gmac_block[1].enabled = 0xf; + if (xlr_is_xls4xx()) { + xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_GPIO_OFFSET); + uint32_t tmp; + + /* some ports are not enabled on 4xx, figure this out + from the GPIO fuse bank */ + tmp = xlr_read_reg(mmio, 35); + if (tmp & (1<<28)) + xlr_board_info.gmac_block[1].enabled &= ~0x8; + if (tmp & (1<<29)) + xlr_board_info.gmac_block[1].enabled &= ~0x4; + } xlr_board_info.gmac_block[1].credit_config = &xls_cc_table_gmac1; xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_GMAC1_TX0; xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_GMAC1_FR_0; Modified: head/sys/mips/rmi/iodi.c ============================================================================== --- head/sys/mips/rmi/iodi.c Sat Feb 20 17:19:16 2010 (r204136) +++ head/sys/mips/rmi/iodi.c Sat Feb 20 17:24:33 2010 (r204137) @@ -271,11 +271,15 @@ iodi_attach(device_t dev) tmpd = device_add_child(dev, "rge", 5); device_set_ivars(tmpd, &xlr_board_info.gmac_block[1]); - tmpd = device_add_child(dev, "rge", 6); - device_set_ivars(tmpd, &xlr_board_info.gmac_block[1]); - - tmpd = device_add_child(dev, "rge", 7); - device_set_ivars(tmpd, &xlr_board_info.gmac_block[1]); + if (xlr_board_info.gmac_block[1].enabled & 0x4) { + tmpd = device_add_child(dev, "rge", 6); + device_set_ivars(tmpd, &xlr_board_info.gmac_block[1]); + } + + if (xlr_board_info.gmac_block[1].enabled & 0x8) { + tmpd = device_add_child(dev, "rge", 7); + device_set_ivars(tmpd, &xlr_board_info.gmac_block[1]); + } } else if (xlr_board_info.gmac_block[1].type == XLR_XGMAC) { #if 0 /* XGMAC not yet */ tmpd = device_add_child(dev, "rge", 4); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 17:29:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263B4106566B; Sat, 20 Feb 2010 17:29:28 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 122168FC18; Sat, 20 Feb 2010 17:29:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KHTRir070435; Sat, 20 Feb 2010 17:29:27 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KHTRH3070429; Sat, 20 Feb 2010 17:29:27 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201002201729.o1KHTRH3070429@svn.freebsd.org> From: Randall Stewart Date: Sat, 20 Feb 2010 17:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204138 - in head: contrib/gdb/gdb gnu/usr.bin gnu/usr.bin/gdb/arch/mips gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 17:29:28 -0000 Author: rrs Date: Sat Feb 20 17:29:27 2010 New Revision: 204138 URL: http://svn.freebsd.org/changeset/base/204138 Log: These contain JC's patch to get gdb sort of working on mips. Its not fully done yet but its a start. Obtained from: JC - c.jayachandran@gmail.com M gnu/usr.bin/gdb/kgdb/trgt_mips.c M gnu/usr.bin/gdb/arch/mips/init.c M gnu/usr.bin/gdb/arch/mips/Makefile M gnu/usr.bin/Makefile M contrib/gdb/gdb/mips-tdep.h Modified: head/contrib/gdb/gdb/mips-tdep.h head/gnu/usr.bin/Makefile head/gnu/usr.bin/gdb/arch/mips/Makefile head/gnu/usr.bin/gdb/arch/mips/init.c head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Modified: head/contrib/gdb/gdb/mips-tdep.h ============================================================================== --- head/contrib/gdb/gdb/mips-tdep.h Sat Feb 20 17:24:33 2010 (r204137) +++ head/contrib/gdb/gdb/mips-tdep.h Sat Feb 20 17:29:27 2010 (r204138) @@ -62,6 +62,17 @@ struct mips_regnum extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch); enum { + MIPS_S0_REGNUM = 16, + MIPS_S1_REGNUM = 17, + MIPS_S2_REGNUM = 18, + MIPS_S3_REGNUM = 19, + MIPS_S4_REGNUM = 20, + MIPS_S5_REGNUM = 21, + MIPS_S6_REGNUM = 22, + MIPS_S7_REGNUM = 23, + MIPS_SP_REGNUM = 29, + MIPS_FP_REGNUM = 30, + MIPS_RA_REGNUM = 31, MIPS_EMBED_LO_REGNUM = 33, MIPS_EMBED_HI_REGNUM = 34, MIPS_EMBED_BADVADDR_REGNUM = 35, Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Sat Feb 20 17:24:33 2010 (r204137) +++ head/gnu/usr.bin/Makefile Sat Feb 20 17:29:27 2010 (r204138) @@ -21,10 +21,6 @@ SUBDIR= ${_binutils} \ sort \ ${_texinfo} -.if ${MACHINE_ARCH} == "mips" -MK_GDB=no # not yet -.endif - .if ${MK_CXX} != "no" _gperf= gperf .if ${MK_GROFF} != "no" Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/arch/mips/Makefile Sat Feb 20 17:24:33 2010 (r204137) +++ head/gnu/usr.bin/gdb/arch/mips/Makefile Sat Feb 20 17:29:27 2010 (r204138) @@ -1,10 +1,10 @@ # $FreeBSD$ .if !defined(GDB_CROSS_DEBUGGER) -LIBSRCS+= mips-nat.c mips-nat.c mipsfbsd-nat.c +LIBSRCS+= mipsfbsd-nat.c .endif LIBSRCS+= solib.c solib-svr4.c -LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c +LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c nm.h: echo '#include "mips/nm-fbsd.h"' > ${.TARGET} Modified: head/gnu/usr.bin/gdb/arch/mips/init.c ============================================================================== --- head/gnu/usr.bin/gdb/arch/mips/init.c Sat Feb 20 17:24:33 2010 (r204137) +++ head/gnu/usr.bin/gdb/arch/mips/init.c Sat Feb 20 17:29:27 2010 (r204138) @@ -123,15 +123,19 @@ initialize_all_files (void) _initialize_ser_pipe (); _initialize_ser_tcp (); #ifndef CROSS_DEBUGGER +#if 0 _initialize_mipsfbsd_nat (); _initialize_mips_nat (); +#endif _initialize_kernel_u_addr (); _initialize_infptrace (); _initialize_inftarg (); _initialize_solib (); _initialize_svr4_solib (); +#if 0 _initialize_svr4_lm (); #endif +#endif _initialize_remote (); _initialize_dcache (); _initialize_sr_support (); Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sat Feb 20 17:24:33 2010 (r204137) +++ head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sat Feb 20 17:29:27 2010 (r204138) @@ -61,18 +61,17 @@ kgdb_trgt_fetch_registers(int regno __un warnx("kvm_read: %s", kvm_geterr(kvm)); memset(&pcb, 0, sizeof(pcb)); } - supply_register(MIPS_S0_REGNUM, (char *)&pcb.pcb_context.val[0]); - supply_register(MIPS_S1_REGNUM, (char *)&pcb.pcb_context.val[1]); - supply_register(MIPS_S2_REGNUM, (char *)&pcb.pcb_context.val[2]); - supply_register(MIPS_S3_REGNUM, (char *)&pcb.pcb_context.val[3]); - supply_register(MIPS_S4_REGNUM, (char *)&pcb.pcb_context.val[4]); - supply_register(MIPS_S5_REGNUM, (char *)&pcb.pcb_context.val[5]); - supply_register(MIPS_S6_REGNUM, (char *)&pcb.pcb_context.val[6]); - supply_register(MIPS_S7_REGNUM, (char *)&pcb.pcb_context.val[7]); - supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context.val[8]); - supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context.val[8]); - supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context.val[9]); - supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context.val[10]); + supply_register(MIPS_S0_REGNUM, (char *)&pcb.pcb_context[0]); + supply_register(MIPS_S1_REGNUM, (char *)&pcb.pcb_context[1]); + supply_register(MIPS_S2_REGNUM, (char *)&pcb.pcb_context[2]); + supply_register(MIPS_S3_REGNUM, (char *)&pcb.pcb_context[3]); + supply_register(MIPS_S4_REGNUM, (char *)&pcb.pcb_context[4]); + supply_register(MIPS_S5_REGNUM, (char *)&pcb.pcb_context[5]); + supply_register(MIPS_S6_REGNUM, (char *)&pcb.pcb_context[6]); + supply_register(MIPS_S7_REGNUM, (char *)&pcb.pcb_context[7]); + supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context[8]); + supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context[9]); + supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context[10]); } void From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 18:17:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1645C106566B; Sat, 20 Feb 2010 18:17:34 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id AC9EB8FC12; Sat, 20 Feb 2010 18:17:33 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id BFA46C427C; Sat, 20 Feb 2010 19:19:20 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id 1iqBt1yw8rtE; Sat, 20 Feb 2010 19:19:20 +0100 (CET) Received: from [192.168.133.14] (nat3-102.ghnet.pl [91.150.222.102]) by smtp.semihalf.com (Postfix) with ESMTPSA id 1EBF2C427A; Sat, 20 Feb 2010 19:19:20 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <201002201613.o1KGDiiK053065@svn.freebsd.org> Date: Sat, 20 Feb 2010 19:17:20 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201002201613.o1KGDiiK053065@svn.freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204126 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 18:17:34 -0000 On 2010-02-20, at 17:13, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sat Feb 20 16:13:43 2010 > New Revision: 204126 > URL: http://svn.freebsd.org/changeset/base/204126 >=20 > Log: > Merge r198724 to Book-E. casuword() non-atomically read the current = value > of its argument before atomically replacing it, which could = occasionally > return the wrong value on an SMP system. This resulted in user mutex > operations hanging when using threaded applications. Have you got a particular test case when this was breaking, so I can = test? > Modified: > head/sys/powerpc/booke/copyinout.c >=20 > Modified: head/sys/powerpc/booke/copyinout.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 > --- head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:12:37 2010 = (r204125) > +++ head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:13:43 2010 = (r204126) > @@ -295,8 +295,19 @@ casuword(volatile u_long *addr, u_long o > return (EFAULT); > } >=20 > - val =3D *addr; > - (void) atomic_cmpset_32((volatile uint32_t *)addr, old, new); > + __asm __volatile ( > + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ > + "cmplw %3, %0\n\t" /* compare */ > + "bne 2f\n\t" /* exit if not equal */ > + "stwcx. %4, 0, %2\n\t" /* attempt to store */ > + "bne- 1b\n\t" /* spin if failed */ > + "b 3f\n\t" /* we've succeeded */ > + "2:\n\t" > + "stwcx. %0, 0, %2\n\t" /* clear reservation = (74xx) */ The 74xx comment reference is somewhat confusing as the clear = reservation operation is pretty uniform accross 32-bit PowerPC I guess, = and not 74xx specific. Rafal From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 18:24:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE84D106566C; Sat, 20 Feb 2010 18:24:27 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB9C8FC17; Sat, 20 Feb 2010 18:24:27 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0KY500F00KGQVB00@smtpauth2.wiscmail.wisc.edu>; Sat, 20 Feb 2010 12:24:26 -0600 (CST) Received: from comporellon.tachypleus.net (adsl-76-233-146-74.dsl.mdsnwi.sbcglobal.net [76.233.146.74]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0KY5006A9KGOGA30@smtpauth2.wiscmail.wisc.edu>; Sat, 20 Feb 2010 12:24:25 -0600 (CST) Date: Sat, 20 Feb 2010 12:24:24 -0600 From: Nathan Whitehorn In-reply-to: To: Rafal Jaworowski Message-id: <4B8028D8.7090402@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.233.146.74 X-Spam-PmxInfo: Server=avs-9, Version=5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.2.20.180925, SenderIP=76.233.146.74 References: <201002201613.o1KGDiiK053065@svn.freebsd.org> User-Agent: Thunderbird 2.0.0.23 (X11/20100206) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204126 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 18:24:27 -0000 Rafal Jaworowski wrote: > On 2010-02-20, at 17:13, Nathan Whitehorn wrote: > > >> Author: nwhitehorn >> Date: Sat Feb 20 16:13:43 2010 >> New Revision: 204126 >> URL: http://svn.freebsd.org/changeset/base/204126 >> >> Log: >> Merge r198724 to Book-E. casuword() non-atomically read the current value >> of its argument before atomically replacing it, which could occasionally >> return the wrong value on an SMP system. This resulted in user mutex >> operations hanging when using threaded applications. >> > > Have you got a particular test case when this was breaking, so I can test? > This typically shows up with heavy lock contention on umtx operations. I discovered this because running csup died for me 100% of the time on my Xserve, by hanging forever in some umtx code. This change explicitly preserves the semantics of casuword -- it is just the code for atomic_cmpset_32 copied from atomic.h, but returning the value loading with lwarx, instead of replacing it with a success code. This closes a race between val = *addr and atomic_cmpset. With the old code, another CPU could change the value at addr between val = *addr and atomic_cmpset, causing casuword to return the wrong value. >> Modified: >> head/sys/powerpc/booke/copyinout.c >> >> Modified: head/sys/powerpc/booke/copyinout.c >> ============================================================================== >> --- head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:12:37 2010 (r204125) >> +++ head/sys/powerpc/booke/copyinout.c Sat Feb 20 16:13:43 2010 (r204126) >> @@ -295,8 +295,19 @@ casuword(volatile u_long *addr, u_long o >> return (EFAULT); >> } >> >> - val = *addr; >> - (void) atomic_cmpset_32((volatile uint32_t *)addr, old, new); >> + __asm __volatile ( >> + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ >> + "cmplw %3, %0\n\t" /* compare */ >> + "bne 2f\n\t" /* exit if not equal */ >> + "stwcx. %4, 0, %2\n\t" /* attempt to store */ >> + "bne- 1b\n\t" /* spin if failed */ >> + "b 3f\n\t" /* we've succeeded */ >> + "2:\n\t" >> + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ >> > > The 74xx comment reference is somewhat confusing as the clear reservation operation is pretty uniform accross 32-bit PowerPC I guess, and not 74xx specific. > That's true. It should also be updated in atomic.h. -Nathan From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 19:30:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505AA106568D; Sat, 20 Feb 2010 19:30:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2888FC08; Sat, 20 Feb 2010 19:30:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KJU55m096841; Sat, 20 Feb 2010 19:30:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KJU5Ce096839; Sat, 20 Feb 2010 19:30:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201002201930.o1KJU5Ce096839@svn.freebsd.org> From: Alan Cox Date: Sat, 20 Feb 2010 19:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204139 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 19:30:05 -0000 Author: alc Date: Sat Feb 20 19:30:04 2010 New Revision: 204139 URL: http://svn.freebsd.org/changeset/base/204139 Log: Eliminate an unused declaration. Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Feb 20 17:29:27 2010 (r204138) +++ head/sys/sys/systm.h Sat Feb 20 19:30:04 2010 (r204139) @@ -52,8 +52,6 @@ extern char version[]; /* system versio extern char copyright[]; /* system copyright */ extern int kstack_pages; /* number of kernel stack pages */ -extern int nswap; /* size of swap space */ - extern u_long pagesizes[]; /* supported page sizes */ extern long physmem; /* physical memory */ extern long realmem; /* 'real' memory */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 19:59:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22E6C106566C; Sat, 20 Feb 2010 19:59:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 086178FC13; Sat, 20 Feb 2010 19:59:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KJxqKI003515; Sat, 20 Feb 2010 19:59:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KJxq3n003511; Sat, 20 Feb 2010 19:59:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201002201959.o1KJxq3n003511@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Feb 2010 19:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204140 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 19:59:53 -0000 Author: bz Date: Sat Feb 20 19:59:52 2010 New Revision: 204140 URL: http://svn.freebsd.org/changeset/base/204140 Log: Split up ip_drain() into an outer lock and iterator part and a "locked" version that will only handle a single network stack instance. The latter is called directly from ip_destroy(). Hook up an ip_destroy() function to release resources from the legacy IP network layer upon virtual network stack teardown. Sponsored by: ISPsystem Reviewed by: rwatson MFC After: 5 days Modified: head/sys/netinet/in_proto.c head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Sat Feb 20 19:30:04 2010 (r204139) +++ head/sys/netinet/in_proto.c Sat Feb 20 19:59:52 2010 (r204140) @@ -114,6 +114,9 @@ struct protosw inetsw[] = { .pr_domain = &inetdomain, .pr_protocol = IPPROTO_IP, .pr_init = ip_init, +#ifdef VIMAGE + .pr_destroy = ip_destroy, +#endif .pr_slowtimo = ip_slowtimo, .pr_drain = ip_drain, .pr_usrreqs = &nousrreqs Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sat Feb 20 19:30:04 2010 (r204139) +++ head/sys/netinet/ip_input.c Sat Feb 20 19:59:52 2010 (r204140) @@ -199,6 +199,7 @@ static struct mtx ipqlock; static void maxnipq_update(void); static void ipq_zone_change(void *); +static void ip_drain_locked(void); SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, &VNET_NAME(nipq), 0, @@ -368,6 +369,22 @@ ip_init(void) netisr_register(&ip_nh); } +#ifdef VIMAGE +void +ip_destroy(void) +{ + + /* Cleanup in_ifaddr hash table; should be empty. */ + hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); + + IPQ_LOCK(); + ip_drain_locked(); + IPQ_UNLOCK(); + + uma_zdestroy(V_ipq_zone); +} +#endif + void ip_fini(void *xtp) { @@ -1237,23 +1254,32 @@ ip_slowtimo(void) /* * Drain off all datagram fragments. */ +static void +ip_drain_locked(void) +{ + int i; + + IPQ_LOCK_ASSERT(); + + for (i = 0; i < IPREASS_NHASH; i++) { + while(!TAILQ_EMPTY(&V_ipq[i])) { + IPSTAT_ADD(ips_fragdropped, + TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); + ip_freef(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); + } + } +} + void ip_drain(void) { VNET_ITERATOR_DECL(vnet_iter); - int i; VNET_LIST_RLOCK_NOSLEEP(); IPQ_LOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - for (i = 0; i < IPREASS_NHASH; i++) { - while(!TAILQ_EMPTY(&V_ipq[i])) { - IPSTAT_ADD(ips_fragdropped, - TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); - ip_freef(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); - } - } + ip_drain_locked(); CURVNET_RESTORE(); } IPQ_UNLOCK(); Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Sat Feb 20 19:30:04 2010 (r204139) +++ head/sys/netinet/ip_var.h Sat Feb 20 19:59:52 2010 (r204140) @@ -212,6 +212,9 @@ int ip_fragment(struct ip *ip, struct mb u_long if_hwassist_flags, int sw_csum); void ip_forward(struct mbuf *m, int srcrt); void ip_init(void); +#ifdef VIMAGE +void ip_destroy(void); +#endif extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 20:30:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D71106566C; Sat, 20 Feb 2010 20:30:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 433E68FC0A; Sat, 20 Feb 2010 20:30:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KKUeMi010353; Sat, 20 Feb 2010 20:30:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KKUekS010349; Sat, 20 Feb 2010 20:30:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201002202030.o1KKUekS010349@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Feb 2010 20:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204141 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 20:30:41 -0000 Author: tuexen Date: Sat Feb 20 20:30:40 2010 New Revision: 204141 URL: http://svn.freebsd.org/changeset/base/204141 Log: Fix handling of SHUTDOWN-ACK chunk in COOKIE_WAIT and COOKIE_ECHOED. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Feb 20 19:59:52 2010 (r204140) +++ head/sys/netinet/sctp_input.c Sat Feb 20 20:30:40 2010 (r204141) @@ -918,7 +918,8 @@ sctp_handle_shutdown(struct sctp_shutdow static void sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp, - struct sctp_tcb *stcb, struct sctp_nets *net) + struct sctp_tcb *stcb, + struct sctp_nets *net) { struct sctp_association *asoc; @@ -934,6 +935,13 @@ sctp_handle_shutdown_ack(struct sctp_shu asoc = &stcb->asoc; /* process according to association state */ + if ((SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_WAIT) || + (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED)) { + /* unexpected SHUTDOWN-ACK... do OOTB handling... */ + sctp_send_shutdown_complete(stcb, net, 1); + SCTP_TCB_UNLOCK(stcb); + return; + } if ((SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) && (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_ACK_SENT)) { /* unexpected SHUTDOWN-ACK... so ignore... */ @@ -975,7 +983,7 @@ sctp_handle_shutdown_ack(struct sctp_shu /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); /* send SHUTDOWN-COMPLETE */ - sctp_send_shutdown_complete(stcb, net); + sctp_send_shutdown_complete(stcb, net, 0); /* notify upper layer protocol */ if (stcb->sctp_socket) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Feb 20 19:59:52 2010 (r204140) +++ head/sys/netinet/sctp_output.c Sat Feb 20 20:30:40 2010 (r204141) @@ -10622,27 +10622,37 @@ sctp_send_abort_tcb(struct sctp_tcb *stc void sctp_send_shutdown_complete(struct sctp_tcb *stcb, - struct sctp_nets *net) + struct sctp_nets *net, + int reflect_vtag) { /* formulate and SEND a SHUTDOWN-COMPLETE */ struct mbuf *m_shutdown_comp; struct sctp_shutdown_complete_chunk *shutdown_complete; + uint32_t vtag; + uint8_t flags; m_shutdown_comp = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER); if (m_shutdown_comp == NULL) { /* no mbuf's */ return; } + if (reflect_vtag) { + flags = SCTP_HAD_NO_TCB; + vtag = stcb->asoc.my_vtag; + } else { + flags = 0; + vtag = stcb->asoc.peer_vtag; + } shutdown_complete = mtod(m_shutdown_comp, struct sctp_shutdown_complete_chunk *); shutdown_complete->ch.chunk_type = SCTP_SHUTDOWN_COMPLETE; - shutdown_complete->ch.chunk_flags = 0; + shutdown_complete->ch.chunk_flags = flags; shutdown_complete->ch.chunk_length = htons(sizeof(struct sctp_shutdown_complete_chunk)); SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk); (void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, (struct sockaddr *)&net->ro._l_addr, m_shutdown_comp, 0, NULL, 0, 1, 0, NULL, 0, stcb->sctp_ep->sctp_lport, stcb->rport, - htonl(stcb->asoc.peer_vtag), + htonl(vtag), net->port, SCTP_SO_NOT_LOCKED, NULL); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); return; Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Sat Feb 20 19:59:52 2010 (r204140) +++ head/sys/netinet/sctp_output.h Sat Feb 20 20:30:40 2010 (r204141) @@ -111,7 +111,7 @@ void sctp_send_shutdown(struct sctp_tcb void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *); -void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *); +void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int); void sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *, From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 21:43:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7593D1065670; Sat, 20 Feb 2010 21:43:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 661828FC17; Sat, 20 Feb 2010 21:43:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KLhall026515; Sat, 20 Feb 2010 21:43:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KLhaZD026513; Sat, 20 Feb 2010 21:43:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201002202143.o1KLhaZD026513@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Feb 2010 21:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204142 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 21:43:36 -0000 Author: bz Date: Sat Feb 20 21:43:36 2010 New Revision: 204142 URL: http://svn.freebsd.org/changeset/base/204142 Log: Enhance a panic string to contain more useful debugging information. Sponsored by: ISPsystem Reviewed by: rwatson MFC after: 5 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Feb 20 20:30:40 2010 (r204141) +++ head/sys/net/if.c Sat Feb 20 21:43:36 2010 (r204142) @@ -809,7 +809,8 @@ if_detach_internal(struct ifnet *ifp, in IFNET_WUNLOCK(); if (!found) { if (vmove) - panic("interface not in it's own ifnet list"); + panic("%s: ifp=%p not on the ifnet tailq %p", + __func__, ifp, &V_ifnet); else return; /* XXX this should panic as well? */ } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 21:45:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE035106578C; Sat, 20 Feb 2010 21:45:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE3CE8FC14; Sat, 20 Feb 2010 21:45:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KLj4Mp026893; Sat, 20 Feb 2010 21:45:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KLj4Jp026891; Sat, 20 Feb 2010 21:45:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201002202145.o1KLj4Jp026891@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Feb 2010 21:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204143 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 21:45:05 -0000 Author: bz Date: Sat Feb 20 21:45:04 2010 New Revision: 204143 URL: http://svn.freebsd.org/changeset/base/204143 Log: Upon virtual network stack teardown properly release the TCP syncache resources. Sponsored by: ISPsystem Reviewed by: rwatson MFC After: 5 days Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sat Feb 20 21:43:36 2010 (r204142) +++ head/sys/netinet/tcp_syncache.c Sat Feb 20 21:45:04 2010 (r204143) @@ -278,11 +278,33 @@ syncache_init(void) void syncache_destroy(void) { + struct syncache_head *sch; + struct syncache *sc, *nsc; + int i; + + /* Cleanup hash buckets: stop timers, free entries, destroy locks. */ + for (i = 0; i < V_tcp_syncache.hashsize; i++) { + + sch = &V_tcp_syncache.hashbase[i]; + callout_drain(&sch->sch_timer); + + SCH_LOCK(sch); + TAILQ_FOREACH_SAFE(sc, &sch->sch_bucket, sc_hash, nsc) + syncache_drop(sc, sch); + SCH_UNLOCK(sch); + KASSERT(TAILQ_EMPTY(&sch->sch_bucket), + ("%s: sch->sch_bucket not empty", __func__)); + KASSERT(sch->sch_length == 0, ("%s: sch->sch_length %d not 0", + __func__, sch->sch_length)); + mtx_destroy(&sch->sch_mtx); + } - /* XXX walk the cache, free remaining objects, stop timers */ + KASSERT(V_tcp_syncache.cache_count == 0, ("%s: cache_count %d not 0", + __func__, V_tcp_syncache.cache_count)); + /* Free the allocated global resources. */ uma_zdestroy(V_tcp_syncache.zone); - FREE(V_tcp_syncache.hashbase, M_SYNCACHE); + free(V_tcp_syncache.hashbase, M_SYNCACHE); } #endif From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:01:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2C4D106566C; Sat, 20 Feb 2010 22:01:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88DA28FC08; Sat, 20 Feb 2010 22:01:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KM1Og9030498; Sat, 20 Feb 2010 22:01:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KM1O24030495; Sat, 20 Feb 2010 22:01:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002202201.o1KM1O24030495@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Feb 2010 22:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204144 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:01:24 -0000 Author: marius Date: Sat Feb 20 22:01:24 2010 New Revision: 204144 URL: http://svn.freebsd.org/changeset/base/204144 Log: Add support for BCM54K2 found in combination with Apple K2 GMAC. Submitted by: Andreas Tobler Obtained from: OpenBSD MFC after: 1 week Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sat Feb 20 21:45:04 2010 (r204143) +++ head/sys/dev/mii/brgphy.c Sat Feb 20 22:01:24 2010 (r204144) @@ -104,6 +104,7 @@ static void brgphy_reset(struct mii_soft static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); static void bcm5411_load_dspcode(struct mii_softc *); +static void bcm54k2_load_dspcode(struct mii_softc *); static void brgphy_fixup_5704_a0_bug(struct mii_softc *); static void brgphy_fixup_adc_bug(struct mii_softc *); static void brgphy_fixup_adjust_trim(struct mii_softc *); @@ -117,6 +118,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM, BCM5400), MII_PHY_DESC(xxBROADCOM, BCM5401), MII_PHY_DESC(xxBROADCOM, BCM5411), + MII_PHY_DESC(xxBROADCOM, BCM54K2), MII_PHY_DESC(xxBROADCOM, BCM5701), MII_PHY_DESC(xxBROADCOM, BCM5703), MII_PHY_DESC(xxBROADCOM, BCM5704), @@ -415,6 +417,9 @@ brgphy_service(struct mii_softc *sc, str case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: @@ -730,6 +735,24 @@ bcm5411_load_dspcode(struct mii_softc *s PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } +void +bcm54k2_load_dspcode(struct mii_softc *sc) +{ + static const struct { + int reg; + uint16_t val; + } dspcode[] = { + { 4, 0x01e1 }, + { 9, 0x0300 }, + { 0, 0 }, + }; + int i; + + for (i = 0; dspcode[i].reg != 0; i++) + PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); + +} + static void brgphy_fixup_5704_a0_bug(struct mii_softc *sc) { @@ -932,6 +955,9 @@ brgphy_reset(struct mii_softc *sc) case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Sat Feb 20 21:45:04 2010 (r204143) +++ head/sys/dev/mii/miidevs Sat Feb 20 22:01:24 2010 (r204144) @@ -145,6 +145,7 @@ model xxBROADCOM BCM5703 0x0016 BCM5703 model xxBROADCOM BCM5704 0x0019 BCM5704 10/100/1000baseTX PHY model xxBROADCOM BCM5705 0x001a BCM5705 10/100/1000baseTX PHY model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY +model xxBROADCOM BCM54K2 0x002e BCM54K2 10/100/1000baseTX PHY model xxBROADCOM BCM5714 0x0034 BCM5714 10/100/1000baseTX PHY model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:09:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 349421065670; Sat, 20 Feb 2010 22:09:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19EF38FC14; Sat, 20 Feb 2010 22:09:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KM9mbg032345; Sat, 20 Feb 2010 22:09:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KM9mNe032343; Sat, 20 Feb 2010 22:09:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201002202209.o1KM9mNe032343@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Feb 2010 22:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204145 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:09:49 -0000 Author: bz Date: Sat Feb 20 22:09:48 2010 New Revision: 204145 URL: http://svn.freebsd.org/changeset/base/204145 Log: Start to implement ifnet DDB support: - 'show ifnets' prints a list of ifnet *s per virtual network stack, - 'show ifnet ' prints fields matching the given ifp. We do not yet print the complete set of fields and might want to factor this out to an extra if_debug.c file in case this grows a lot[1]. We may also want to grow 'show ifnet ' support[1]. Sponsored by: ISPsystem Suggested by: rwatson [1] Reviewed by: rwatson MFC after: 5 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Feb 20 22:01:24 2010 (r204144) +++ head/sys/net/if.c Sat Feb 20 22:09:48 2010 (r204145) @@ -34,6 +34,7 @@ #include "opt_inet6.h" #include "opt_inet.h" #include "opt_carp.h" +#include "opt_ddb.h" #include #include @@ -62,6 +63,10 @@ #include #include +#ifdef DDB +#include +#endif + #include #include #include @@ -3331,3 +3336,79 @@ if_deregister_com_alloc(u_char type) if_com_alloc[type] = NULL; if_com_free[type] = NULL; } + +#ifdef DDB +static void +if_show_ifnet(struct ifnet *ifp) +{ + + if (ifp == NULL) + return; + db_printf("%s:\n", ifp->if_xname); +#define IF_DB_PRINTF(f, e) db_printf(" %s = " f "\n", #e, ifp->e); + IF_DB_PRINTF("%s", if_dname); + IF_DB_PRINTF("%d", if_dunit); + IF_DB_PRINTF("%s", if_description); + IF_DB_PRINTF("%u", if_index); + IF_DB_PRINTF("%u", if_refcount); + IF_DB_PRINTF("%d", if_index_reserved); + IF_DB_PRINTF("%p", if_softc); + IF_DB_PRINTF("%p", if_l2com); + IF_DB_PRINTF("%p", if_vnet); + IF_DB_PRINTF("%p", if_home_vnet); + IF_DB_PRINTF("%p", if_addr); + IF_DB_PRINTF("%p", if_llsoftc); + IF_DB_PRINTF("%p", if_label); + IF_DB_PRINTF("%u", if_pcount); + IF_DB_PRINTF("0x%08x", if_flags); + IF_DB_PRINTF("0x%08x", if_drv_flags); + IF_DB_PRINTF("0x%08x", if_capabilities); + IF_DB_PRINTF("0x%08x", if_capenable); + IF_DB_PRINTF("%p", if_snd.ifq_head); + IF_DB_PRINTF("%p", if_snd.ifq_tail); + IF_DB_PRINTF("%d", if_snd.ifq_len); + IF_DB_PRINTF("%d", if_snd.ifq_maxlen); + IF_DB_PRINTF("%d", if_snd.ifq_drops); + IF_DB_PRINTF("%p", if_snd.ifq_drv_head); + IF_DB_PRINTF("%p", if_snd.ifq_drv_tail); + IF_DB_PRINTF("%d", if_snd.ifq_drv_len); + IF_DB_PRINTF("%d", if_snd.ifq_drv_maxlen); + IF_DB_PRINTF("%d", if_snd.altq_type); + IF_DB_PRINTF("%x", if_snd.altq_flags); +#undef IF_DB_PRINTF +} + +DB_SHOW_COMMAND(ifnet, db_show_ifnet) +{ + + if (!have_addr) { + db_printf("usage: show ifnet \n"); + return; + } + + if_show_ifnet((struct ifnet *)addr); +} + +DB_SHOW_COMMAND(ifnets, db_show_ifnets) +{ + VNET_ITERATOR_DECL(vnet_iter); + struct ifnet *ifp; + u_short idx; + + VNET_FOREACH(vnet_iter) { + CURVNET_SET_QUIET(vnet_iter); +#ifdef VIMAGE + db_printf("vnet=%p\n", curvnet); +#endif + for (idx = 1; idx <= V_if_index; idx++) { + ifp = V_ifindex_table[idx].ife_ifnet; + if (ifp == NULL) + continue; + db_printf( "%20s ifp=%p\n", ifp->if_xname, ifp); + if (db_pager_quit) + break; + } + CURVNET_RESTORE(); + } +} +#endif From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:24:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453D01065670; Sat, 20 Feb 2010 22:24:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BC7A8FC17; Sat, 20 Feb 2010 22:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KMOPWv035658; Sat, 20 Feb 2010 22:24:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KMOOfb035656; Sat, 20 Feb 2010 22:24:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002202224.o1KMOOfb035656@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 20 Feb 2010 22:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204146 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:24:25 -0000 Author: yongari Date: Sat Feb 20 22:24:24 2010 New Revision: 204146 URL: http://svn.freebsd.org/changeset/base/204146 Log: Correct inversed programming of ethernet hardware address on big-endian architecture. Submitted by: C. Jayachandran (initial version) Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Sat Feb 20 22:09:48 2010 (r204145) +++ head/sys/dev/msk/if_msk.c Sat Feb 20 22:24:24 2010 (r204146) @@ -3713,10 +3713,10 @@ msk_init_locked(struct msk_if_softc *sc_ struct msk_softc *sc; struct ifnet *ifp; struct mii_data *mii; - uint16_t eaddr[ETHER_ADDR_LEN / 2]; + uint8_t *eaddr; uint16_t gmac; uint32_t reg; - int error, i; + int error; MSK_IF_LOCK_ASSERT(sc_if); @@ -3785,14 +3785,20 @@ msk_init_locked(struct msk_if_softc *sc_ GMAC_WRITE_2(sc, sc_if->msk_port, GM_SERIAL_MODE, gmac); /* Set station address. */ - bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L + i * 4, - eaddr[i]); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L + i * 4, - eaddr[i]); - + eaddr = IF_LLADDR(ifp); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1H, + eaddr[4] | (eaddr[5] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2H, + eaddr[4] | (eaddr[5] << 8)); + /* Disable interrupts for counter overflows. */ GMAC_WRITE_2(sc, sc_if->msk_port, GM_TX_IRQ_MSK, 0); GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_IRQ_MSK, 0); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:29:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2B4C1065670; Sat, 20 Feb 2010 22:29:28 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2DE48FC14; Sat, 20 Feb 2010 22:29:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KMTSfj036805; Sat, 20 Feb 2010 22:29:28 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KMTSpW036802; Sat, 20 Feb 2010 22:29:28 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201002202229.o1KMTSpW036802@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Feb 2010 22:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204147 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:29:29 -0000 Author: bz Date: Sat Feb 20 22:29:28 2010 New Revision: 204147 URL: http://svn.freebsd.org/changeset/base/204147 Log: Set curvnet earlier so that it also covers calls to sodisconnect(), which before were possibly panicing the system in ULP code in the VIMAGE case. Submitted by: Igor (igor ispsystem.com) MFC after: 5 days Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Feb 20 22:24:24 2010 (r204146) +++ head/sys/kern/uipc_socket.c Sat Feb 20 22:29:28 2010 (r204147) @@ -773,6 +773,8 @@ soconnect(struct socket *so, struct sock if (so->so_options & SO_ACCEPTCONN) return (EOPNOTSUPP); + + CURVNET_SET(so->so_vnet); /* * If protocol is connection-based, can only connect once. * Otherwise, if connected, try to disconnect first. This allows @@ -788,10 +790,9 @@ soconnect(struct socket *so, struct sock * biting us. */ so->so_error = 0; - CURVNET_SET(so->so_vnet); error = (*so->so_proto->pr_usrreqs->pru_connect)(so, nam, td); - CURVNET_RESTORE(); } + CURVNET_RESTORE(); return (error); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:43:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82D731065670; Sat, 20 Feb 2010 22:43:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2FE8FC19; Sat, 20 Feb 2010 22:43:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KMhDX0039859; Sat, 20 Feb 2010 22:43:13 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KMhDKZ039845; Sat, 20 Feb 2010 22:43:13 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002202243.o1KMhDKZ039845@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 20 Feb 2010 22:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204148 - in stable/8/sys/ia64: acpica ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:43:13 -0000 Author: marcel Date: Sat Feb 20 22:43:12 2010 New Revision: 204148 URL: http://svn.freebsd.org/changeset/base/204148 Log: MFC rev 203883: o Eliminate IA64_PHYS_TO_RR6 by calling bus_space_map() or pmap_mapdev(). o Implement bus_space_map() in terms of pmap_mapdev(). o Have ia64_pib hold the uncached virtual address of the PIB. Modified: stable/8/sys/ia64/acpica/madt.c stable/8/sys/ia64/ia64/bus_machdep.c stable/8/sys/ia64/ia64/efi.c stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/ia64/machdep.c stable/8/sys/ia64/ia64/mp_machdep.c stable/8/sys/ia64/ia64/pmap.c stable/8/sys/ia64/ia64/sapic.c stable/8/sys/ia64/include/bus.h stable/8/sys/ia64/include/intr.h stable/8/sys/ia64/include/md_var.h stable/8/sys/ia64/include/pmap.h stable/8/sys/ia64/include/vmparam.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/ia64/acpica/madt.c ============================================================================== --- stable/8/sys/ia64/acpica/madt.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/acpica/madt.c Sat Feb 20 22:43:12 2010 (r204148) @@ -31,8 +31,6 @@ #include -extern u_int64_t ia64_lapic_address; - struct sapic *sapic_create(int, int, u_int64_t); static void @@ -150,7 +148,7 @@ ia64_probe_sapics(void) /* Save the address of the processor interrupt block. */ if (bootverbose) printf("\tLocal APIC address=0x%x\n", table->Address); - ia64_lapic_address = table->Address; + ia64_lapic_addr = table->Address; end = (char *)table + table->Header.Length; p = (char *)(table + 1); @@ -172,7 +170,7 @@ ia64_probe_sapics(void) case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: { ACPI_MADT_LOCAL_APIC_OVERRIDE *lapic = (ACPI_MADT_LOCAL_APIC_OVERRIDE *)entry; - ia64_lapic_address = lapic->Address; + ia64_lapic_addr = lapic->Address; break; } Modified: stable/8/sys/ia64/ia64/bus_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/bus_machdep.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/bus_machdep.c Sat Feb 20 22:43:12 2010 (r204148) @@ -29,12 +29,33 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include extern u_long ia64_port_base; #define __PIO_ADDR(port) \ (void *)(ia64_port_base | (((port) & 0xfffc) << 10) | ((port) & 0xFFF)) +int +bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size, + int flags __unused, bus_space_handle_t *bshp) +{ + + *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? addr : (uintptr_t)pmap_mapdev(addr, size); + return (0); +} + + +void +bus_space_unmap(bus_space_tag_t bst __unused, bus_space_handle_t bsh, + bus_size_t size) +{ + + pmap_unmapdev(bsh, size); +} + uint8_t bus_space_read_io_1(u_long port) { Modified: stable/8/sys/ia64/ia64/efi.c ============================================================================== --- stable/8/sys/ia64/ia64/efi.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/efi.c Sat Feb 20 22:43:12 2010 (r204148) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include extern uint64_t ia64_call_efi_physical(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); @@ -123,8 +125,8 @@ efi_boot_minimal(uint64_t systbl) md->md_virt = (void *)IA64_PHYS_TO_RR7(md->md_phys); else if (md->md_attr & EFI_MD_ATTR_UC) - md->md_virt = - (void *)IA64_PHYS_TO_RR6(md->md_phys); + md->md_virt = pmap_mapdev(md->md_phys, + md->md_pages * EFI_PAGE_SIZE); } md = efi_md_next(md); } Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/interrupt.c Sat Feb 20 22:43:12 2010 (r204148) @@ -106,7 +106,6 @@ void interrupt(struct trapframe *tf) { struct thread *td; - volatile struct ia64_interrupt_block *ib = IA64_INTERRUPT_BLOCK; uint64_t adj, clk, itc; int64_t delta; u_int vector; @@ -130,7 +129,7 @@ interrupt(struct trapframe *tf) */ if (vector == 0) { PCPU_INC(md.stats.pcs_nextints); - inta = ib->ib_inta; + inta = ia64_ld1(&ia64_pib->ib_inta); if (inta == 15) { PCPU_INC(md.stats.pcs_nstrays); __asm __volatile("mov cr.eoi = r0;; srlz.d"); Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/machdep.c Sat Feb 20 22:43:12 2010 (r204148) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,10 @@ struct fpswa_iface *fpswa_iface; u_int64_t ia64_pal_base; u_int64_t ia64_port_base; +u_int64_t ia64_lapic_addr = PAL_PIB_DEFAULT_ADDR; + +struct ia64_pib *ia64_pib; + static int ia64_sync_icache_needed; char machine[] = MACHINE; @@ -308,6 +313,8 @@ cpu_startup(void *dummy) * information. */ ia64_probe_sapics(); + ia64_pib = pmap_mapdev(ia64_lapic_addr, sizeof(*ia64_pib)); + ia64_mca_init(); /* @@ -684,7 +691,8 @@ ia64_init(void) for (md = efi_md_first(); md != NULL; md = efi_md_next(md)) { switch (md->md_type) { case EFI_MD_TYPE_IOPORT: - ia64_port_base = IA64_PHYS_TO_RR6(md->md_phys); + ia64_port_base = (uintptr_t)pmap_mapdev(md->md_phys, + md->md_pages * EFI_PAGE_SIZE); break; case EFI_MD_TYPE_PALCODE: ia64_pal_base = md->md_phys; Modified: stable/8/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/mp_machdep.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/mp_machdep.c Sat Feb 20 22:43:12 2010 (r204148) @@ -68,8 +68,9 @@ MALLOC_DEFINE(M_SMP, "SMP", "SMP related void ia64_ap_startup(void); -#define LID_SAPIC_ID(x) ((int)((x) >> 24) & 0xff) -#define LID_SAPIC_EID(x) ((int)((x) >> 16) & 0xff) +#define LID_SAPIC(x) ((u_int)((x) >> 16)) +#define LID_SAPIC_ID(x) ((u_int)((x) >> 24) & 0xff) +#define LID_SAPIC_EID(x) ((u_int)((x) >> 16) & 0xff) #define LID_SAPIC_SET(id,eid) (((id & 0xff) << 8 | (eid & 0xff)) << 16); #define LID_SAPIC_MASK 0xffff0000UL @@ -114,7 +115,6 @@ ia64_store_mca_state(void* arg) void ia64_ap_startup(void) { - volatile struct ia64_interrupt_block *ib = IA64_INTERRUPT_BLOCK; uint64_t vhpt; int vector; @@ -153,7 +153,7 @@ ia64_ap_startup(void) while (vector != 15) { ia64_srlz_d(); if (vector == 0) - vector = (int)ib->ib_inta; + vector = (int)ia64_ld1(&ia64_pib->ib_inta); ia64_set_eoi(0); ia64_srlz_d(); vector = ia64_get_ivr(); @@ -363,16 +363,18 @@ ipi_all_but_self(int ipi) void ipi_send(struct pcpu *cpu, int ipi) { - volatile uint64_t *pipi; - uint64_t vector; + u_int lid; + uint8_t vector; - pipi = (void *)IA64_PHYS_TO_RR6(ia64_lapic_address | - ((cpu->pc_md.lid & LID_SAPIC_MASK) >> 12)); - vector = (uint64_t)(ipi_vector[ipi] & 0xff); + lid = LID_SAPIC(cpu->pc_md.lid); + vector = ipi_vector[ipi]; KASSERT(vector != 0, ("IPI %d is not assigned a vector", ipi)); - *pipi = vector; - CTR3(KTR_SMP, "ipi_send(%p, %ld), cpuid=%d", pipi, vector, - PCPU_GET(cpuid)); + + ia64_mf(); + ia64_st8(&(ia64_pib->ib_ipi[lid][0]), vector); + ia64_mf_a(); + CTR4(KTR_SMP, "ipi_send(%p, %ld): cpuid=%d, vector=%u", cpu, ipi, + PCPU_GET(cpuid), vector); } SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); Modified: stable/8/sys/ia64/ia64/pmap.c ============================================================================== --- stable/8/sys/ia64/ia64/pmap.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/pmap.c Sat Feb 20 22:43:12 2010 (r204148) @@ -2145,9 +2145,12 @@ pmap_remove_write(vm_page_t m) * NOT real memory. */ void * -pmap_mapdev(vm_offset_t pa, vm_size_t size) +pmap_mapdev(vm_paddr_t pa, vm_size_t size) { - return (void*) IA64_PHYS_TO_RR6(pa); + vm_offset_t va; + + va = pa | IA64_RR_BASE(6); + return ((void *)va); } /* @@ -2156,7 +2159,6 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - return; } /* Modified: stable/8/sys/ia64/ia64/sapic.c ============================================================================== --- stable/8/sys/ia64/ia64/sapic.c Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/ia64/sapic.c Sat Feb 20 22:43:12 2010 (r204148) @@ -42,6 +42,9 @@ #include #include +#include +#include + static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); static int sysctl_machdep_apic(SYSCTL_HANDLER_ARGS); @@ -52,8 +55,6 @@ SYSCTL_OID(_machdep, OID_AUTO, apic, CTL struct sapic *ia64_sapics[16]; /* XXX make this resizable */ int ia64_sapic_count; -u_int64_t ia64_lapic_address = PAL_PIB_DEFAULT_ADDR; - struct sapic_rte { u_int64_t rte_vector :8; u_int64_t rte_delivery_mode :3; @@ -165,7 +166,7 @@ sapic_create(u_int id, u_int base, u_int sa->sa_id = id; sa->sa_base = base; - sa->sa_registers = IA64_PHYS_TO_RR6(address); + sa->sa_registers = (uintptr_t)pmap_mapdev(address, 1048576); mtx_init(&sa->sa_mtx, "I/O SAPIC lock", NULL, MTX_SPIN); Modified: stable/8/sys/ia64/include/bus.h ============================================================================== --- stable/8/sys/ia64/include/bus.h Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/include/bus.h Sat Feb 20 22:43:12 2010 (r204148) @@ -132,28 +132,14 @@ /* - * Map a region of device bus space into CPU virtual address space. + * Map and unmap a region of device bus space into CPU virtual address space. */ -static __inline int -bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size __unused, - int flags __unused, bus_space_handle_t *bshp) -{ - - *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO)) - ? addr : IA64_PHYS_TO_RR6(addr); - return (0); -} - - -/* - * Unmap a region of device bus space. - */ -static __inline void -bus_space_unmap(bus_space_tag_t bst __unused, bus_space_handle_t bsh __unused, - bus_size_t size __unused) -{ -} +int +bus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, + bus_space_handle_t *); +void +bus_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t size); /* * Get a new handle for a subregion of an already-mapped area of bus space. Modified: stable/8/sys/ia64/include/intr.h ============================================================================== --- stable/8/sys/ia64/include/intr.h Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/include/intr.h Sat Feb 20 22:43:12 2010 (r204148) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2007-2010 Marcel Moolenaar * Copyright (c) 1998 Doug Rabson * All rights reserved. * @@ -27,26 +28,23 @@ */ #ifndef _MACHINE_INTR_H_ -#define _MACHINE_INTR_H_ +#define _MACHINE_INTR_H_ /* * Layout of the Processor Interrupt Block. */ -struct ia64_interrupt_block +struct ia64_pib { - u_int64_t ib_ipi[0x20000]; /* 1Mb of IPI interrupts */ - u_int8_t ib_reserved1[0xe0000]; - u_int8_t ib_inta; /* Generate INTA cycle */ - u_int8_t ib_reserved2[7]; - u_int8_t ib_xtp; /* XTP cycle */ - u_int8_t ib_reserved3[7]; - u_int8_t ib_reserved4[0x1fff0]; + uint64_t ib_ipi[65536][2]; /* 64K-way IPIs (1MB area). */ + uint8_t _rsvd1[0xe0000]; + uint8_t ib_inta; /* Generate INTA cycle. */ + uint8_t _rsvd2[7]; + uint8_t ib_xtp; /* External Task Priority. */ + uint8_t _rsvd3[7]; + uint8_t _rsvd4[0x1fff0]; }; -extern u_int64_t ia64_lapic_address; - -#define IA64_INTERRUPT_BLOCK \ - (struct ia64_interrupt_block *)IA64_PHYS_TO_RR6(ia64_lapic_address) +extern struct ia64_pib *ia64_pib; int ia64_setup_intr(const char *name, int irq, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); Modified: stable/8/sys/ia64/include/md_var.h ============================================================================== --- stable/8/sys/ia64/include/md_var.h Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/include/md_var.h Sat Feb 20 22:43:12 2010 (r204148) @@ -49,7 +49,7 @@ struct ia64_fdesc { #define IA64_CFM_RRB_FR(x) (((x) >> 25) & 0x7f) #define IA64_CFM_RRB_PR(x) (((x) >> 32) & 0x3f) -/* Concenience function (inline) to adjust backingstore pointers. */ +/* Convenience function (inline) to adjust backingstore pointers. */ static __inline uint64_t ia64_bsp_adjust(uint64_t bsp, int nslots) { @@ -60,22 +60,22 @@ ia64_bsp_adjust(uint64_t bsp, int nslots #ifdef _KERNEL -extern char sigcode[]; -extern char esigcode[]; -extern int szsigcode; -extern long Maxmem; - struct _special; -struct fpreg; -struct reg; struct thread; struct trapframe; +/* + * Return value from ia64_init. Describes stack to switch to. + */ struct ia64_init_return { uint64_t bspstore; uint64_t sp; }; +extern uint64_t ia64_lapic_addr; + +extern long Maxmem; + void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); void cpu_mp_add(u_int, u_int, u_int); Modified: stable/8/sys/ia64/include/pmap.h ============================================================================== --- stable/8/sys/ia64/include/pmap.h Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/include/pmap.h Sat Feb 20 22:43:12 2010 (r204148) @@ -132,7 +132,7 @@ vm_paddr_t pmap_kextract(vm_offset_t va) void pmap_kremove(vm_offset_t); void pmap_setdevram(unsigned long long basea, vm_offset_t sizea); int pmap_uses_prom_console(void); -void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); unsigned *pmap_pte(pmap_t, vm_offset_t) __pure2; void pmap_set_opt (unsigned *); Modified: stable/8/sys/ia64/include/vmparam.h ============================================================================== --- stable/8/sys/ia64/include/vmparam.h Sat Feb 20 22:29:28 2010 (r204147) +++ stable/8/sys/ia64/include/vmparam.h Sat Feb 20 22:43:12 2010 (r204148) @@ -132,7 +132,6 @@ #define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61) #define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1)) -#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) #define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) /* From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 22:47:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23494106566C; Sat, 20 Feb 2010 22:47:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDE298FC08; Sat, 20 Feb 2010 22:47:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KMlKea040833; Sat, 20 Feb 2010 22:47:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KMlKPb040830; Sat, 20 Feb 2010 22:47:20 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002202247.o1KMlKPb040830@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 20 Feb 2010 22:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204149 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 22:47:22 -0000 Author: yongari Date: Sat Feb 20 22:47:20 2010 New Revision: 204149 URL: http://svn.freebsd.org/changeset/base/204149 Log: Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to TSO over VLAN without VLAN hardware tagging. Driver changes and userland support will follow. Reviewed by: thompsa Modified: head/sys/net/if.h head/sys/net/if_vlan.c Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Sat Feb 20 22:43:12 2010 (r204148) +++ head/sys/net/if.h Sat Feb 20 22:47:20 2010 (r204149) @@ -218,6 +218,7 @@ struct if_data { #define IFCAP_TOE6 0x08000 /* interface can offload TCP6 */ #define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */ #define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ +#define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Feb 20 22:43:12 2010 (r204148) +++ head/sys/net/if_vlan.c Sat Feb 20 22:47:20 2010 (r204149) @@ -1322,11 +1322,26 @@ vlan_capabilities(struct ifvlan *ifv) if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM; - ifp->if_hwassist = p->if_hwassist; + ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | + CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; } + /* + * If the parent interface can do TSO on VLANs then + * propagate the hardware-assisted flag. TSO on VLANs + * does not necessarily require hardware VLAN tagging. + */ + if (p->if_capabilities & IFCAP_VLAN_HWTSO) + ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; + if (p->if_capenable & IFCAP_VLAN_HWTSO) { + ifp->if_capenable |= p->if_capenable & IFCAP_TSO; + ifp->if_hwassist |= p->if_hwassist & CSUM_TSO; + } else { + ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO); + ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO); + } } static void From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 23:01:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E951065676; Sat, 20 Feb 2010 23:01:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 518BC8FC08; Sat, 20 Feb 2010 23:01:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KN19Du044010; Sat, 20 Feb 2010 23:01:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KN197B044006; Sat, 20 Feb 2010 23:01:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002202301.o1KN197B044006@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 20 Feb 2010 23:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204150 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 23:01:09 -0000 Author: yongari Date: Sat Feb 20 23:01:09 2010 New Revision: 204150 URL: http://svn.freebsd.org/changeset/base/204150 Log: Add TSO support on VLAN in fconfig(8). Reviewed by: thompsa Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c head/sbin/ifconfig/ifvlan.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat Feb 20 22:47:20 2010 (r204149) +++ head/sbin/ifconfig/ifconfig.8 Sat Feb 20 23:01:09 2010 (r204150) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd February 20, 2010 .Dt IFCONFIG 8 .Os .Sh NAME @@ -408,20 +408,20 @@ they support in their capabilities. is a synonym for enabling all available WOL mechanisms. To disable WOL use .Fl wol . -.It Cm vlanmtu , vlanhwtag, vlanhwfilter +.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso If the driver offers user-configurable VLAN support, enable -reception of extended frames, tag processing in hardware, or -frame filtering in hardware, +reception of extended frames, tag processing in hardware, +frame filtering in hardware, or TSO on VLAN, respectively. Note that this must be issued on a physical interface associated with .Xr vlan 4 , not on a .Xr vlan 4 interface itself. -.It Fl vlanmtu , vlanhwtag, vlanhwfilter +.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso If the driver offers user-configurable VLAN support, disable -reception of extended frames, tag processing in hardware, or -frame filtering in hardware, +reception of extended frames, tag processing in hardware, +frame filtering in hardware, or TSO on VLAN, respectively. .It Cm vnet Ar jail Move the interface to the Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Sat Feb 20 22:47:20 2010 (r204149) +++ head/sbin/ifconfig/ifconfig.c Sat Feb 20 23:01:09 2010 (r204150) @@ -881,7 +881,7 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER" +"\21VLAN_HWFILTER\23VLAN_HWTSO" /* * Print the status of the interface. If an address family was Modified: head/sbin/ifconfig/ifvlan.c ============================================================================== --- head/sbin/ifconfig/ifvlan.c Sat Feb 20 22:47:20 2010 (r204149) +++ head/sbin/ifconfig/ifvlan.c Sat Feb 20 23:01:09 2010 (r204150) @@ -181,6 +181,8 @@ static struct cmd vlan_cmds[] = { DEF_CMD("-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap), DEF_CMD("vlanhwfilter", IFCAP_VLAN_HWFILTER, setifcap), DEF_CMD("-vlanhwfilter", -IFCAP_VLAN_HWFILTER, setifcap), + DEF_CMD("-vlanhwtso", -IFCAP_VLAN_HWTSO, setifcap), + DEF_CMD("vlanhwtso", IFCAP_VLAN_HWTSO, setifcap), }; static struct afswtch af_vlan = { .af_name = "af_vlan", From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 23:21:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F1BC106566C; Sat, 20 Feb 2010 23:21:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0848FC0A; Sat, 20 Feb 2010 23:21:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KNL7TB048427; Sat, 20 Feb 2010 23:21:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KNL7wB048425; Sat, 20 Feb 2010 23:21:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201002202321.o1KNL7wB048425@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 20 Feb 2010 23:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204151 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 23:21:07 -0000 Author: yongari Date: Sat Feb 20 23:21:06 2010 New Revision: 204151 URL: http://svn.freebsd.org/changeset/base/204151 Log: Add TSO support on VLAN. Controller requires VLAN hardware tagging to make TSO work on VLAN. So if VLAN hardware tagging is disabled explicitly clear TSO on VLAN. While I'm here remove duplicated VLAN_CAPABILITIES call. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Feb 20 23:01:09 2010 (r204150) +++ head/sys/dev/bge/if_bge.c Sat Feb 20 23:21:06 2010 (r204151) @@ -2816,7 +2816,7 @@ bge_attach(device_t dev) IFCAP_VLAN_MTU; if ((sc->bge_flags & BGE_FLAG_TSO) != 0) { ifp->if_hwassist |= CSUM_TSO; - ifp->if_capabilities |= IFCAP_TSO4; + ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; } #ifdef IFCAP_VLAN_HWCSUM ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; @@ -4526,9 +4526,6 @@ bge_ioctl(struct ifnet *ifp, u_long comm ifp->if_hwassist |= BGE_CSUM_FEATURES; else ifp->if_hwassist &= ~BGE_CSUM_FEATURES; -#ifdef VLAN_CAPABILITIES - VLAN_CAPABILITIES(ifp); -#endif } if ((mask & IFCAP_TSO4) != 0 && @@ -4546,16 +4543,21 @@ bge_ioctl(struct ifnet *ifp, u_long comm bge_init(sc); } - if (mask & IFCAP_VLAN_HWTAGGING) { + if ((mask & IFCAP_VLAN_HWTSO) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTSO) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) + ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; BGE_LOCK(sc); bge_setvlan(sc); BGE_UNLOCK(sc); + } #ifdef VLAN_CAPABILITIES - VLAN_CAPABILITIES(ifp); + VLAN_CAPABILITIES(ifp); #endif - } - break; default: error = ether_ioctl(ifp, command, data); From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 23:24:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A1A1065672; Sat, 20 Feb 2010 23:24:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2D7E8FC12; Sat, 20 Feb 2010 23:24:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KNOJgY049182; Sat, 20 Feb 2010 23:24:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KNOJYf049161; Sat, 20 Feb 2010 23:24:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002202324.o1KNOJYf049161@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Feb 2010 23:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204152 - in head/sys: boot/sparc64/loader sparc64/include sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 23:24:20 -0000 Author: marius Date: Sat Feb 20 23:24:19 2010 New Revision: 204152 URL: http://svn.freebsd.org/changeset/base/204152 Log: Some machines can not only consist of CPUs running at different speeds but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now. Modified: head/sys/boot/sparc64/loader/main.c head/sys/sparc64/include/cache.h head/sys/sparc64/include/cpu.h head/sys/sparc64/include/md_var.h head/sys/sparc64/include/pcpu.h head/sys/sparc64/include/pmap.h head/sys/sparc64/include/smp.h head/sys/sparc64/include/ver.h head/sys/sparc64/sparc64/cache.c head/sys/sparc64/sparc64/cheetah.c head/sys/sparc64/sparc64/identcpu.c head/sys/sparc64/sparc64/iommu.c head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/mp_locore.S head/sys/sparc64/sparc64/mp_machdep.c head/sys/sparc64/sparc64/nexus.c head/sys/sparc64/sparc64/pmap.c head/sys/sparc64/sparc64/spitfire.c head/sys/sparc64/sparc64/tick.c head/sys/sparc64/sparc64/trap.c Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/boot/sparc64/loader/main.c Sat Feb 20 23:24:19 2010 (r204152) @@ -137,7 +137,7 @@ struct tlb_entry *dtlb_store; struct tlb_entry *itlb_store; u_int dtlb_slot; u_int itlb_slot; -int cpu_impl; +static int cpu_impl; static u_int dtlb_slot_max; static u_int itlb_slot_max; Modified: head/sys/sparc64/include/cache.h ============================================================================== --- head/sys/sparc64/include/cache.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/cache.h Sat Feb 20 23:24:19 2010 (r204152) @@ -91,7 +91,7 @@ struct cacheinfo { struct pcpu; -typedef void cache_enable_t(void); +typedef void cache_enable_t(u_int cpu_impl); typedef void cache_flush_t(void); typedef void dcache_page_inval_t(vm_paddr_t pa); typedef void icache_page_inval_t(vm_paddr_t pa); Modified: head/sys/sparc64/include/cpu.h ============================================================================== --- head/sys/sparc64/include/cpu.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/cpu.h Sat Feb 20 23:24:19 2010 (r204152) @@ -52,7 +52,7 @@ extern char btext[]; extern char etext[]; -void cheetah_init(void); +void cheetah_init(u_int cpu_impl); void cpu_halt(void); void cpu_reset(void); void fork_trampoline(void); Modified: head/sys/sparc64/include/md_var.h ============================================================================== --- head/sys/sparc64/include/md_var.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/md_var.h Sat Feb 20 23:24:19 2010 (r204152) @@ -47,8 +47,8 @@ extern vm_paddr_t kstack0_phys; struct pcpu; struct md_utrap; -const char *cpu_cpuid_prop(void); -uint32_t cpu_get_mid(void); +const char *cpu_cpuid_prop(u_int cpu_impl); +uint32_t cpu_get_mid(u_int cpu_impl); void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/pcpu.h Sat Feb 20 23:24:19 2010 (r204152) @@ -54,6 +54,7 @@ struct pmap; u_long pc_tickref; \ u_long pc_tickadj; \ u_int pc_clock; \ + u_int pc_impl; \ u_int pc_mid; \ u_int pc_node; \ u_int pc_tlb_ctx; \ Modified: head/sys/sparc64/include/pmap.h ============================================================================== --- head/sys/sparc64/include/pmap.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/pmap.h Sat Feb 20 23:24:19 2010 (r204152) @@ -80,7 +80,7 @@ struct pmap { #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_set_memattr(m, ma) (void)0 -void pmap_bootstrap(void); +void pmap_bootstrap(u_int cpu_impl); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kenter(vm_offset_t va, vm_page_t m); void pmap_kremove(vm_offset_t); Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/smp.h Sat Feb 20 23:24:19 2010 (r204152) @@ -94,7 +94,7 @@ void cpu_mp_shutdown(void); typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); extern cpu_ipi_selected_t *cpu_ipi_selected; -void mp_init(void); +void mp_init(u_int cpu_impl); extern struct mtx ipi_mtx; extern struct ipi_cache_args ipi_cache_args; Modified: head/sys/sparc64/include/ver.h ============================================================================== --- head/sys/sparc64/include/ver.h Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/include/ver.h Sat Feb 20 23:24:19 2010 (r204152) @@ -43,24 +43,28 @@ #ifndef LOCORE -#define VER_MANUF_MASK (((1L<> VER_MANUF_SHIFT) -#define VER_IMPL(ver) \ +#define VER_IMPL(ver) \ (((ver) & VER_IMPL_MASK) >> VER_IMPL_SHIFT) -#define VER_MASK(ver) \ +#define VER_MASK(ver) \ (((ver) & VER_MASK_MASK) >> VER_MASK_SHIFT) -#define VER_MAXTL(ver) \ +#define VER_MAXTL(ver) \ (((ver) & VER_MAXTL_MASK) >> VER_MAXTL_SHIFT) -#define VER_MAXWIN(ver) \ +#define VER_MAXWIN(ver) \ (((ver) & VER_MAXWIN_MASK) >> VER_MAXWIN_SHIFT) -extern int cpu_impl; extern char sparc64_model[]; #endif /* !LOCORE */ Modified: head/sys/sparc64/sparc64/cache.c ============================================================================== --- head/sys/sparc64/sparc64/cache.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/cache.c Sat Feb 20 23:24:19 2010 (r204152) @@ -130,7 +130,7 @@ cache_init(struct pcpu *pcpu) if ((set & ~(1UL << (ffs(set) - 1))) != 0) panic("cache_init: E$ set size not a power of 2"); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + if (pcpu->pc_impl >= CPU_IMPL_ULTRASPARCIII) { cache_enable = cheetah_cache_enable; cache_flush = cheetah_cache_flush; dcache_page_inval = cheetah_dcache_page_inval; Modified: head/sys/sparc64/sparc64/cheetah.c ============================================================================== --- head/sys/sparc64/sparc64/cheetah.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/cheetah.c Sat Feb 20 23:24:19 2010 (r204152) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); * CPU-specific initialization */ void -cheetah_init(void) +cheetah_init(u_int cpu_impl) { register_t s; @@ -119,7 +119,7 @@ cheetah_init(void) * Enable level 1 caches. */ void -cheetah_cache_enable(void) +cheetah_cache_enable(u_int cpu_impl) { u_long lsu; Modified: head/sys/sparc64/sparc64/identcpu.c ============================================================================== --- head/sys/sparc64/sparc64/identcpu.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/identcpu.c Sat Feb 20 23:24:19 2010 (r204152) @@ -15,7 +15,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -34,8 +33,6 @@ static u_int cpu_freq; SYSCTL_UINT(_hw_freq, OID_AUTO, cpu, CTLFLAG_RD, &cpu_freq, 0, "CPU clock frequency"); -int cpu_impl; - void cpu_identify(u_long vers, u_int freq, u_int id) { Modified: head/sys/sparc64/sparc64/iommu.c ============================================================================== --- head/sys/sparc64/sparc64/iommu.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/iommu.c Sat Feb 20 23:24:19 2010 (r204152) @@ -130,6 +130,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -377,7 +378,7 @@ iommu_init(const char *name, struct iomm printf("%s: PROM IOTSB size: %d (%d entries)\n", name, obptsbsize, obptsbentries); if ((is->is_flags & IOMMU_PRESERVE_PROM) != 0 && - !(cpu_impl == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { + !(PCPU_GET(impl) == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { if (obptsbentries > tsbentries) panic("%s: PROM IOTSB entries exceed kernel", __func__); Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/machdep.c Sat Feb 20 23:24:19 2010 (r204152) @@ -146,7 +146,7 @@ static int cpu_use_vis = 1; cpu_block_copy_t *cpu_block_copy; cpu_block_zero_t *cpu_block_zero; -static phandle_t find_bsp(phandle_t node, uint32_t bspid); +static phandle_t find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl); void sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec); static void sparc64_shutdown_final(void *dummy, int howto); @@ -241,7 +241,7 @@ spinlock_exit(void) } static phandle_t -find_bsp(phandle_t node, uint32_t bspid) +find_bsp(phandle_t node, uint32_t bspid, u_int cpu_impl) { char type[sizeof("cpu")]; phandle_t child; @@ -250,7 +250,7 @@ find_bsp(phandle_t node, uint32_t bspid) for (; node != 0; node = OF_peer(node)) { child = OF_child(node); if (child > 0) { - child = find_bsp(child, bspid); + child = find_bsp(child, bspid, cpu_impl); if (child > 0) return (child); } else { @@ -259,7 +259,7 @@ find_bsp(phandle_t node, uint32_t bspid) continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, sizeof(cpuid)) <= 0) continue; if (cpuid == bspid) @@ -270,7 +270,7 @@ find_bsp(phandle_t node, uint32_t bspid) } const char * -cpu_cpuid_prop(void) +cpu_cpuid_prop(u_int cpu_impl) { switch (cpu_impl) { @@ -294,7 +294,7 @@ cpu_cpuid_prop(void) } uint32_t -cpu_get_mid(void) +cpu_get_mid(u_int cpu_impl) { switch (cpu_impl) { @@ -328,6 +328,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l vm_offset_t va; caddr_t kmdp; phandle_t root; + u_int cpu_impl; end = 0; kmdp = NULL; @@ -342,12 +343,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * Do CPU-specific Initialization. */ if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); + cheetah_init(cpu_impl); /* * Clear (S)TICK timer (including NPT). */ - tick_clear(); + tick_clear(cpu_impl); /* * UltraSparc II[e,i] based systems come up with the tick interrupt @@ -357,7 +358,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * enabled, causing an interrupt storm on startup since they are not * handled. */ - tick_stop(); + tick_stop(cpu_impl); /* * Set up Open Firmware entry points. @@ -399,7 +400,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_l pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_addr = (vm_offset_t)pcpu0; - pc->pc_mid = cpu_get_mid(); + pc->pc_impl = cpu_impl; + pc->pc_mid = cpu_get_mid(cpu_impl); pc->pc_tlb_ctx = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; @@ -409,7 +411,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * BSP is in the device tree in the first place). */ root = OF_peer(0); - pc->pc_node = find_bsp(root, pc->pc_mid); + pc->pc_node = find_bsp(root, pc->pc_mid, cpu_impl); if (pc->pc_node == 0) OF_exit(); if (OF_getprop(pc->pc_node, "clock-frequency", &pc->pc_clock, @@ -475,7 +477,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l panic("sparc64_init: cannot determine number of iTLB slots"); cache_init(pc); - cache_enable(); + cache_enable(cpu_impl); uma_set_align(pc->pc_cache.dc_linesize - 1); cpu_block_copy = bcopy; @@ -501,13 +503,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l } #ifdef SMP - mp_init(); + mp_init(cpu_impl); #endif /* * Initialize virtual memory and calculate physmem. */ - pmap_bootstrap(); + pmap_bootstrap(cpu_impl); /* * Initialize tunables. Modified: head/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- head/sys/sparc64/sparc64/mp_locore.S Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/mp_locore.S Sat Feb 20 23:24:19 2010 (r204152) @@ -202,17 +202,17 @@ ENTRY(mp_startup) cmp %l1, CPU_IMPL_ULTRASPARCIII bl %icc, 3f nop - mov CPU_STICKSYNC, %l1 + mov CPU_STICKSYNC, %l2 membar #StoreLoad - stw %l1, [%l0 + CSA_STATE] + stw %l2, [%l0 + CSA_STATE] -2: ldx [%l0 + CSA_STICK], %l1 - brz %l1, 2b +2: ldx [%l0 + CSA_STICK], %l2 + brz %l2, 2b nop - wr %l1, 0, %asr24 + wr %l2, 0, %asr24 3: call cpu_get_mid - nop + mov %l1, %o0 /* * Inform the boot processor we have inited. Modified: head/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/mp_machdep.c Sat Feb 20 23:24:19 2010 (r204152) @@ -119,11 +119,11 @@ static u_int cpuid_to_mid[MAXCPU]; static int isjbus; static volatile u_int shutdown_cpus; -static void ap_count(phandle_t node, u_int mid); -static void ap_start(phandle_t node, u_int mid); +static void ap_count(phandle_t node, u_int mid, u_int cpu_impl); +static void ap_start(phandle_t node, u_int mid, u_int cpu_impl); static void cpu_mp_unleash(void *v); static void foreach_ap(phandle_t node, void (*func)(phandle_t node, - u_int mid)); + u_int mid, u_int cpu_impl)); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); @@ -137,7 +137,7 @@ CTASSERT(MAXCPU <= sizeof(u_int) * NBBY) CTASSERT(MAXCPU <= sizeof(int) * NBBY); void -mp_init(void) +mp_init(u_int cpu_impl) { struct tte *tp; int i; @@ -171,11 +171,13 @@ mp_init(void) } static void -foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid)) +foreach_ap(phandle_t node, void (*func)(phandle_t node, u_int mid, + u_int cpu_impl)) { char type[sizeof("cpu")]; phandle_t child; u_int cpuid; + uint32_t cpu_impl; /* There's no need to traverse the whole OFW tree twice. */ if (mp_maxid > 0 && mp_ncpus >= mp_maxid + 1) @@ -191,12 +193,17 @@ foreach_ap(phandle_t node, void (*func)( continue; if (strcmp(type, "cpu") != 0) continue; - if (OF_getprop(node, cpu_cpuid_prop(), &cpuid, - sizeof(cpuid)) <= 0) - panic("%s: can't get module ID", __func__); + if (OF_getprop(node, "implementation#", &cpu_impl, + sizeof(cpu_impl)) <= 0) + panic("%s: couldn't determine CPU " + "implementation", __func__); + if (OF_getprop(node, cpu_cpuid_prop(cpu_impl), &cpuid, + sizeof(cpuid)) <= 0) + panic("%s: couldn't determine CPU module ID", + __func__); if (cpuid == PCPU_GET(mid)) continue; - (*func)(node, cpuid); + (*func)(node, cpuid, cpu_impl); } } } @@ -216,7 +223,7 @@ cpu_mp_setmaxid() } static void -ap_count(phandle_t node __unused, u_int mid __unused) +ap_count(phandle_t node __unused, u_int mid __unused, u_int cpu_impl __unused) { mp_maxid++; @@ -283,20 +290,20 @@ cpu_mp_start(void) } static void -ap_start(phandle_t node, u_int mid) +ap_start(phandle_t node, u_int mid, u_int cpu_impl) { volatile struct cpu_start_args *csa; struct pcpu *pc; register_t s; vm_offset_t va; - u_int clock; u_int cpuid; + uint32_t clock; if (mp_ncpus > MAXCPU) return; if (OF_getprop(node, "clock-frequency", &clock, sizeof(clock)) <= 0) - panic("%s: can't get clock", __func__); + panic("%s: couldn't determine CPU frequency", __func__); if (clock != PCPU_GET(clock)) hardclock_use_stick = 1; @@ -329,6 +336,7 @@ ap_start(phandle_t node, u_int mid) dpcpu_init((void *)kmem_alloc(kernel_map, DPCPU_SIZE), cpuid); pc->pc_addr = va; pc->pc_clock = clock; + pc->pc_impl = cpu_impl; pc->pc_mid = mid; pc->pc_node = node; @@ -401,9 +409,9 @@ cpu_mp_bootstrap(struct pcpu *pc) volatile struct cpu_start_args *csa; csa = &cpu_start_args; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) - cheetah_init(); - cache_enable(); + if (pc->pc_impl >= CPU_IMPL_ULTRASPARCIII) + cheetah_init(pc->pc_impl); + cache_enable(pc->pc_impl); pmap_map_tsb(); /* * Flush all non-locked TLB entries possibly left over by the Modified: head/sys/sparc64/sparc64/nexus.c ============================================================================== --- head/sys/sparc64/sparc64/nexus.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/nexus.c Sat Feb 20 23:24:19 2010 (r204152) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -522,7 +523,7 @@ nexus_setup_dinfo(device_t dev, phandle_ nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - if (OF_getprop(node, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + if (OF_getprop(node, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? "upa-portid" : "portid", &ign, sizeof(ign)) <= 0) { device_printf(dev, "<%s>: could not determine portid\n", ndi->ndi_obdinfo.obd_name); Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/pmap.c Sat Feb 20 23:24:19 2010 (r204152) @@ -278,7 +278,7 @@ om_cmp(const void *a, const void *b) * Bootstrap the system enough to run with virtual memory. */ void -pmap_bootstrap(void) +pmap_bootstrap(u_int cpu_impl) { struct pmap *pm; struct tte *tp; @@ -1543,7 +1543,7 @@ pmap_copy_tte(pmap_t src_pmap, pmap_t ds void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, - vm_size_t len, vm_offset_t src_addr) + vm_size_t len, vm_offset_t src_addr) { struct tte *tp; vm_offset_t va; Modified: head/sys/sparc64/sparc64/spitfire.c ============================================================================== --- head/sys/sparc64/sparc64/spitfire.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/spitfire.c Sat Feb 20 23:24:19 2010 (r204152) @@ -56,7 +56,7 @@ PMAP_STATS_VAR(spitfire_icache_npage_inv * Enable the level 1 caches. */ void -spitfire_cache_enable(void) +spitfire_cache_enable(u_int cpu_impl __unused) { u_long lsu; Modified: head/sys/sparc64/sparc64/tick.c ============================================================================== --- head/sys/sparc64/sparc64/tick.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/tick.c Sat Feb 20 23:24:19 2010 (r204152) @@ -120,7 +120,7 @@ cpu_initclocks(void) */ } else { clock = PCPU_GET(clock); - intr_setup(PIL_TICK, cpu_impl < CPU_IMPL_ULTRASPARCIII ? + intr_setup(PIL_TICK, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); set_cputicker(tick_cputicks, clock, 0); } @@ -322,7 +322,7 @@ tick_start(void) } void -tick_clear(void) +tick_clear(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) @@ -331,7 +331,7 @@ tick_clear(void) } void -tick_stop(void) +tick_stop(u_int cpu_impl) { if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Sat Feb 20 23:21:06 2010 (r204151) +++ head/sys/sparc64/sparc64/trap.c Sat Feb 20 23:24:19 2010 (r204152) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -391,7 +392,7 @@ trap(struct trapframe *tf) if (tf->tf_tpc > (u_long)fas_nofault_begin && tf->tf_tpc < (u_long)fas_nofault_end) { cache_flush(); - cache_enable(); + cache_enable(PCPU_GET(impl)); tf->tf_tpc = (u_long)fas_fault; tf->tf_tnpc = tf->tf_tpc + 4; error = 0; From owner-svn-src-all@FreeBSD.ORG Sat Feb 20 23:42:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70944106568B; Sat, 20 Feb 2010 23:42:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC2D8FC13; Sat, 20 Feb 2010 23:42:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KNgOUT053258; Sat, 20 Feb 2010 23:42:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1KNgORa053256; Sat, 20 Feb 2010 23:42:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002202342.o1KNgORa053256@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Feb 2010 23:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204153 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 23:42:24 -0000 Author: marius Date: Sat Feb 20 23:42:24 2010 New Revision: 204153 URL: http://svn.freebsd.org/changeset/base/204153 Log: Starting with UltraSPARC IV CPUs the CPU caches are described with different OFW properties. Modified: head/sys/sparc64/sparc64/cache.c Modified: head/sys/sparc64/sparc64/cache.c ============================================================================== --- head/sys/sparc64/sparc64/cache.c Sat Feb 20 23:24:19 2010 (r204152) +++ head/sys/sparc64/sparc64/cache.c Sat Feb 20 23:42:24 2010 (r204153) @@ -43,6 +43,7 @@ */ /*- * Copyright (c) 2001 by Thomas Moestl . + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,32 +90,49 @@ icache_page_inval_t *icache_page_inval; #define OF_GET(h, n, v) OF_getprop((h), (n), &(v), sizeof(v)) +static u_int cache_new_prop(u_int cpu_impl); + +static u_int +cache_new_prop(u_int cpu_impl) +{ + + switch (cpu_impl) { + case CPU_IMPL_ULTRASPARCIV: + case CPU_IMPL_ULTRASPARCIVp: + return (1); + default: + return (0); + } +} + /* - * Fill in the cache parameters using the cpu node. + * Fill in the cache parameters using the CPU node. */ void cache_init(struct pcpu *pcpu) { u_long set; + u_int use_new_prop; - if (OF_GET(pcpu->pc_node, "icache-size", - pcpu->pc_cache.ic_size) == -1 || - OF_GET(pcpu->pc_node, "icache-line-size", - pcpu->pc_cache.ic_linesize) == -1 || - OF_GET(pcpu->pc_node, "icache-associativity", - pcpu->pc_cache.ic_assoc) == -1 || - OF_GET(pcpu->pc_node, "dcache-size", - pcpu->pc_cache.dc_size) == -1 || - OF_GET(pcpu->pc_node, "dcache-line-size", - pcpu->pc_cache.dc_linesize) == -1 || - OF_GET(pcpu->pc_node, "dcache-associativity", - pcpu->pc_cache.dc_assoc) == -1 || - OF_GET(pcpu->pc_node, "ecache-size", - pcpu->pc_cache.ec_size) == -1 || - OF_GET(pcpu->pc_node, "ecache-line-size", - pcpu->pc_cache.ec_linesize) == -1 || - OF_GET(pcpu->pc_node, "ecache-associativity", - pcpu->pc_cache.ec_assoc) == -1) + use_new_prop = cache_new_prop(pcpu->pc_impl); + if (OF_GET(pcpu->pc_node, !use_new_prop ? "icache-size" : + "l1-icache-size", pcpu->pc_cache.ic_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-line-size" : + "l1-icache-line-size", pcpu->pc_cache.ic_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "icache-associativity" : + "l1-icache-associativity", pcpu->pc_cache.ic_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-size" : + "l1-dcache-size", pcpu->pc_cache.dc_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-line-size" : + "l1-dcache-line-size", pcpu->pc_cache.dc_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "dcache-associativity" : + "l1-dcache-associativity", pcpu->pc_cache.dc_assoc) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-size" : + "l2-cache-size", pcpu->pc_cache.ec_size) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-line-size" : + "l2-cache-line-size", pcpu->pc_cache.ec_linesize) == -1 || + OF_GET(pcpu->pc_node, !use_new_prop ? "ecache-associativity" : + "l2-cache-associativity", pcpu->pc_cache.ec_assoc) == -1) panic("cache_init: could not retrieve cache parameters"); set = pcpu->pc_cache.ic_size / pcpu->pc_cache.ic_assoc;