From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 02:44:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB6E106566B; Sun, 17 Apr 2011 02:44:52 +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 2353F8FC0C; Sun, 17 Apr 2011 02:44:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3H2iqII024550; Sun, 17 Apr 2011 02:44:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3H2iqUX024548; Sun, 17 Apr 2011 02:44:52 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104170244.p3H2iqUX024548@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 02:44: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: r220735 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 02:44:52 -0000 Author: rmacklem Date: Sun Apr 17 02:44:51 2011 New Revision: 220735 URL: http://svn.freebsd.org/changeset/base/220735 Log: Fix readdirplus in the experimental NFS client so that it skips over ".." to avoid a LOR race with nfs_lookup(). This fix is analagous to r138256 in the regular NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat Apr 16 23:38:35 2011 (r220734) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 02:44:51 2011 (r220735) @@ -2942,7 +2942,7 @@ nfsrpc_readdirplus(vnode_t vp, struct ui nfsquad_t cookie, ncookie; int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1; int attrflag, tryformoredirs = 1, eof = 0, gotmnton = 0; - int unlocknewvp = 0; + int isdotdot = 0, unlocknewvp = 0; long dotfileid, dotdotfileid = 0, fileno = 0; char *cp; nfsattrbit_t attrbits, dattrbits; @@ -3192,6 +3192,11 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *cp = '\0'; cp += tlen; /* points to cookie storage */ tl2 = (u_int32_t *)cp; + if (len == 2 && cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; uio_iov_base_add(uiop, (tlen + NFSX_HYPER)); uio_iov_len_add(uiop, -(tlen + NFSX_HYPER)); uio_uio_resid_add(uiop, -(tlen + NFSX_HYPER)); @@ -3269,6 +3274,22 @@ nfsrpc_readdirplus(vnode_t vp, struct ui unlocknewvp = 0; FREE((caddr_t)nfhp, M_NFSFH); np = dnp; + } else if (isdotdot != 0) { + /* + * Skip doing a nfscl_nget() call for "..". + * There's a race between acquiring the nfs + * node here and lookups that look for the + * directory being read (in the parent). + * It would try to get a lock on ".." here, + * owning the lock on the directory being + * read. Lookup will hold the lock on ".." + * and try to acquire the lock on the + * directory being read. + * If the directory is unlocked/relocked, + * then there is a LOR with the buflock + * vp is relocked. + */ + free(nfhp, M_NFSFH); } else { error = nfscl_nget(vnode_mount(vp), vp, nfhp, cnp, p, &np, NULL, LK_EXCLUSIVE); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 06:05:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602201065670; Sun, 17 Apr 2011 06:05:38 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3577F8FC14; Sun, 17 Apr 2011 06:05: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 p3H65cjI028892; Sun, 17 Apr 2011 06:05:38 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3H65cab028890; Sun, 17 Apr 2011 06:05:38 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201104170605.p3H65cab028890@svn.freebsd.org> From: Maxim Sobolev Date: Sun, 17 Apr 2011 06:05: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: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 06:05:38 -0000 Author: sobomax Date: Sun Apr 17 06:05:37 2011 New Revision: 220736 URL: http://svn.freebsd.org/changeset/base/220736 Log: If we can retrieve interface address sleep for one second and try again. This can happen during start-up, when natd starts before dhclient has a chance to receive IP address from the upstream provider. MFC after: 2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Sun Apr 17 02:44:51 2011 (r220735) +++ head/sbin/natd/natd.c Sun Apr 17 06:05:37 2011 (r220736) @@ -111,7 +111,7 @@ static void Usage (void); static char* FormatPacket (struct ip*); static void PrintPacket (struct ip*); static void SyslogPacket (struct ip*, int priority, const char *label); -static void SetAliasAddressFromIfName (const char *ifName); +static int SetAliasAddressFromIfName (const char *ifName); static void InitiateShutdown (int); static void Shutdown (int); static void RefreshAddr (int); @@ -156,6 +156,7 @@ int main (int argc, char** argv) struct sockaddr_in addr; fd_set readMask; int fdMax; + int rval; /* * Initialize packet aliasing software. * Done already here to be able to alter option bits @@ -301,8 +302,15 @@ int main (int argc, char** argv) mip->assignAliasAddr = 1; } - else - SetAliasAddressFromIfName (mip->ifName); + else { + do { + rval = SetAliasAddressFromIfName (mip->ifName); + if (rval == -2) + sleep(1); + } while (rval == -2); + if (rval != 0) + exit(1); + } } } @@ -531,7 +539,8 @@ static void DoGlobal (int fd) #if 0 if (mip->assignAliasAddr) { - SetAliasAddressFromIfName (mip->ifName); + if (SetAliasAddressFromIfName (mip->ifName) != 0) + exit(1); mip->assignAliasAddr = 0; } #endif @@ -634,10 +643,16 @@ static void DoAliasing (int fd, int dire socklen_t addrSize; struct ip* ip; char msgBuf[80]; + int rval; if (mip->assignAliasAddr) { - - SetAliasAddressFromIfName (mip->ifName); + do { + rval = SetAliasAddressFromIfName (mip->ifName); + if (rval == -2) + sleep(1); + } while (rval == -2); + if (rval != 0) + exit(1); mip->assignAliasAddr = 0; } /* @@ -867,7 +882,7 @@ static char* FormatPacket (struct ip* ip return buf; } -static void +static int SetAliasAddressFromIfName(const char *ifn) { size_t needed; @@ -951,14 +966,19 @@ SetAliasAddressFromIfName(const char *if } } } - if (sin == NULL) - errx(1, "%s: cannot get interface address", ifn); + if (sin == NULL) { + warnx("%s: cannot get interface address", ifn); + free(buf); + return -2; + } LibAliasSetAddress(mla, sin->sin_addr); syslog(LOG_INFO, "Aliasing to %s, mtu %d bytes", inet_ntoa(sin->sin_addr), mip->ifMTU); free(buf); + + return 0; } void Quit (const char* msg) From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 11:35:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BA9106566B; Sun, 17 Apr 2011 11:35:23 +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 0C78A8FC14; Sun, 17 Apr 2011 11:35: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 p3HBZMws036928; Sun, 17 Apr 2011 11:35:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HBZMI0036923; Sun, 17 Apr 2011 11:35:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104171135.p3HBZMI0036923@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Apr 2011 11:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220737 - in stable/7/sys: amd64/amd64 amd64/ia32 i386/i386 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, 17 Apr 2011 11:35:23 -0000 Author: kib Date: Sun Apr 17 11:35:22 2011 New Revision: 220737 URL: http://svn.freebsd.org/changeset/base/220737 Log: MFC r218327: Clear the padding when returning context to the usermode, for MI ucontext_t and x86 MD parts. Tested-by: Oliver Pinter Modified: stable/7/sys/amd64/amd64/machdep.c stable/7/sys/amd64/ia32/ia32_signal.c stable/7/sys/i386/i386/machdep.c stable/7/sys/kern/kern_context.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/amd64/amd64/machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/machdep.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/amd64/amd64/machdep.c Sun Apr 17 11:35:22 2011 (r220737) @@ -306,6 +306,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare, + sizeof(sf.sf_uc.uc_mcontext.mc_spare)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -327,6 +330,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ @@ -1653,6 +1657,7 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare, sizeof(mcp->mc_spare)); return (0); } Modified: stable/7/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/7/sys/amd64/ia32/ia32_signal.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/amd64/ia32/ia32_signal.c Sun Apr 17 11:35:22 2011 (r220737) @@ -158,6 +158,8 @@ ia32_get_mcontext(struct thread *td, str mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); ia32_get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -226,6 +228,7 @@ freebsd32_getcontext(struct thread *td, PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(&uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -345,6 +348,11 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi sf.sf_uc.uc_mcontext.mc_eflags = regs->tf_rflags; sf.sf_uc.uc_mcontext.mc_esp = regs->tf_rsp; sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss; + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -362,6 +370,7 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; @@ -463,6 +472,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -482,6 +492,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; Modified: stable/7/sys/i386/i386/machdep.c ============================================================================== --- stable/7/sys/i386/i386/machdep.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/i386/i386/machdep.c Sun Apr 17 11:35:22 2011 (r220737) @@ -342,12 +342,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; @@ -461,6 +463,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -480,6 +487,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -596,6 +604,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare1, + sizeof(sf.sf_uc.uc_mcontext.mc_spare1)); + bzero(sf.sf_uc.uc_mcontext.mc_spare2, + sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -617,6 +630,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -2716,6 +2730,8 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -2763,6 +2779,7 @@ get_fpcontext(struct thread *td, mcontex #ifndef DEV_NPX mcp->mc_fpformat = _MC_FPFMT_NODEV; mcp->mc_ownedfp = _MC_FPOWNED_NONE; + bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else union savefpu *addr; Modified: stable/7/sys/kern/kern_context.c ============================================================================== --- stable/7/sys/kern/kern_context.c Sun Apr 17 06:05:37 2011 (r220736) +++ stable/7/sys/kern/kern_context.c Sun Apr 17 11:35:22 2011 (r220737) @@ -71,6 +71,7 @@ getcontext(struct thread *td, struct get PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -109,6 +110,7 @@ swapcontext(struct thread *td, struct sw ret = EINVAL; else { get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + bzero(uc.__spare__, sizeof(uc.__spare__)); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 13:46:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 439C41065670; Sun, 17 Apr 2011 13:46:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30BB18FC13; Sun, 17 Apr 2011 13:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HDkEV2039599; Sun, 17 Apr 2011 13:46:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HDkEhN039597; Sun, 17 Apr 2011 13:46:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104171346.p3HDkEhN039597@svn.freebsd.org> From: Adrian Chadd Date: Sun, 17 Apr 2011 13:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220738 - 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, 17 Apr 2011 13:46:14 -0000 Author: adrian Date: Sun Apr 17 13:46:13 2011 New Revision: 220738 URL: http://svn.freebsd.org/changeset/base/220738 Log: Mark the PHY as inactive before the chip is reset. It's also marked inactive by the initvals, and enabled after the baseband/PLL has been configured, but before the RF registers have been programmed. The origin and reason for this particular change is currently unknown. Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 17 11:35:22 2011 (r220737) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 17 13:46:13 2011 (r220738) @@ -62,6 +62,7 @@ static HAL_BOOL ar5416SetPowerPerRateTab uint16_t twiceMaxRegulatoryPower, uint16_t powerLimit); static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan); +static void ar5416MarkPhyInactive(struct ath_hal *ah); /* * Places the device in and out of reset and then places sane @@ -148,6 +149,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO if (AR_SREV_MERLIN_20_OR_LATER(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)) tsf = ar5212GetTsf64(ah); + /* Mark PHY as inactive; marked active in ar5416InitBB() */ + ar5416MarkPhyInactive(ah); + if (!ar5416ChipReset(ah, chan)) { HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); FAIL(HAL_EIO); @@ -2493,3 +2497,8 @@ ar5416EepromSetAddac(struct ath_hal *ah, #undef XPA_LVL_FREQ } +static void +ar5416MarkPhyInactive(struct ath_hal *ah) +{ + OS_REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS); +} From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 14:10:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAE0D106566B; Sun, 17 Apr 2011 14:10:12 +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 CCF7D8FC20; Sun, 17 Apr 2011 14:10: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 p3HEACul040157; Sun, 17 Apr 2011 14:10:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HEACd3040154; Sun, 17 Apr 2011 14:10:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104171410.p3HEACd3040154@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 14:10: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: r220739 - in head/sys/fs: nfs 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, 17 Apr 2011 14:10:13 -0000 Author: rmacklem Date: Sun Apr 17 14:10:12 2011 New Revision: 220739 URL: http://svn.freebsd.org/changeset/base/220739 Log: Change some defaults in the experimental NFS client to be the same as the regular NFS client for NFSv3. The main one is making use of a reserved port# the default. Also, set the retry limit for TCP the same and fix the code so that it doesn't disable readdirplus for NFSv4. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Sun Apr 17 13:46:13 2011 (r220738) +++ head/sys/fs/nfs/nfs.h Sun Apr 17 14:10:12 2011 (r220739) @@ -56,6 +56,7 @@ #define NFSV4_UPCALLRETRY 4 /* Number of retries before failure */ #define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */ #define NFS_RETRANS 10 /* Num of retrans for soft mounts */ +#define NFS_RETRANS_TCP 2 /* Num of retrans for TCP soft mounts */ #define NFS_MAXGRPS 16 /* Max. size of groups list */ #define NFS_TRYLATERDEL 15 /* Maximum delay timeout (sec) */ #ifndef NFS_REMOVETIMEO Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 17 13:46:13 2011 (r220738) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 17 14:10:12 2011 (r220739) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -558,14 +559,29 @@ nfs_decode_args(struct mount *mp, struct if (argp->sotype == SOCK_STREAM) { nmp->nm_flag &= ~NFSMNT_NOCONN; nmp->nm_timeo = NFS_MAXTIMEO; + if ((argp->flags & NFSMNT_NFSV4) != 0) + nmp->nm_retry = INT_MAX; + else + nmp->nm_retry = NFS_RETRANS_TCP; } - /* Also clear RDIRPLUS if not NFSv3, it crashes some servers */ - if ((argp->flags & NFSMNT_NFSV3) == 0) + /* Also clear RDIRPLUS if NFSv2, it crashes some servers */ + if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) { + argp->flags &= ~NFSMNT_RDIRPLUS; nmp->nm_flag &= ~NFSMNT_RDIRPLUS; + } + + /* Clear NFSMNT_RESVPORT for NFSv4, since it is not required. */ + if ((argp->flags & NFSMNT_NFSV4) != 0) { + argp->flags &= ~NFSMNT_RESVPORT; + nmp->nm_flag &= ~NFSMNT_RESVPORT; + } + /* Re-bind if rsrvd port requested and wasn't on one */ + adjsock = !(nmp->nm_flag & NFSMNT_RESVPORT) + && (argp->flags & NFSMNT_RESVPORT); /* Also re-bind if we're switching to/from a connected UDP socket */ - adjsock = ((nmp->nm_flag & NFSMNT_NOCONN) != + adjsock |= ((nmp->nm_flag & NFSMNT_NOCONN) != (argp->flags & NFSMNT_NOCONN)); /* Update flags atomically. Don't change the lock bits. */ @@ -710,7 +726,7 @@ nfs_mount(struct mount *mp) .proto = 0, .fh = NULL, .fhsize = 0, - .flags = 0, + .flags = NFSMNT_RESVPORT, .wsize = NFS_WSIZE, .rsize = NFS_RSIZE, .readdirsize = NFS_READDIRSIZE, From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 14:38:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015A91065673; Sun, 17 Apr 2011 14:38:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E35ED8FC12; Sun, 17 Apr 2011 14:38: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 p3HEcBQ9040747; Sun, 17 Apr 2011 14:38:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HEcB0J040745; Sun, 17 Apr 2011 14:38:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104171438.p3HEcB0J040745@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 17 Apr 2011 14:38: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: r220740 - 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, 17 Apr 2011 14:38:12 -0000 Author: jilles Date: Sun Apr 17 14:38:11 2011 New Revision: 220740 URL: http://svn.freebsd.org/changeset/base/220740 Log: ktrace: Log the code for all signals (PSIG events). The code provides information on how the signal was generated. Formerly, the code was only logged for traps, much like only signal handlers for traps received a meaningful si_code before FreeBSD 7.0. In rare cases, no information is available and 0 is still logged. MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Apr 17 14:10:12 2011 (r220739) +++ head/sys/kern/kern_sig.c Sun Apr 17 14:38:11 2011 (r220740) @@ -1262,7 +1262,7 @@ kern_sigtimedwait(struct thread *td, sig mtx_lock(&ps->ps_mtx); action = ps->ps_sigact[_SIG_IDX(sig)]; mtx_unlock(&ps->ps_mtx); - ktrpsig(sig, action, &td->td_sigmask, 0); + ktrpsig(sig, action, &td->td_sigmask, ksi->ksi_code); } #endif if (sig == SIGKILL) @@ -2716,7 +2716,7 @@ postsig(sig) #ifdef KTRACE if (KTRPOINT(td, KTR_PSIG)) ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ? - &td->td_oldsigmask : &td->td_sigmask, 0); + &td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code); #endif if (p->p_stops & S_SIG) { mtx_unlock(&ps->ps_mtx); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 15:09:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B16106566B; Sun, 17 Apr 2011 15:09:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9371F8FC14; Sun, 17 Apr 2011 15:09: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 p3HF94bd041396; Sun, 17 Apr 2011 15:09:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HF945q041395; Sun, 17 Apr 2011 15:09:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201104171509.p3HF945q041395@svn.freebsd.org> From: Dimitry Andric Date: Sun, 17 Apr 2011 15:09: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: r220741 - in head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer: BugReporter PathSensitive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 15:09:04 -0000 Author: dim Date: Sun Apr 17 15:09:04 2011 New Revision: 220741 URL: http://svn.freebsd.org/changeset/base/220741 Log: Cleanup some left-over empty directories in contrib/llvm. Deleted: head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/BugReporter/ head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/PathSensitive/ From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 16:04:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3F05106564A; Sun, 17 Apr 2011 16:04:39 +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 9216B8FC23; Sun, 17 Apr 2011 16:04: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 p3HG4dWf042619; Sun, 17 Apr 2011 16:04:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HG4d0G042617; Sun, 17 Apr 2011 16:04:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104171604.p3HG4d0G042617@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 17 Apr 2011 16:04: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: r220742 - 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, 17 Apr 2011 16:04:39 -0000 Author: jilles Date: Sun Apr 17 16:04:39 2011 New Revision: 220742 URL: http://svn.freebsd.org/changeset/base/220742 Log: Allow using CMSG_NXTHDR with -Wcast-align. If various checks are omitted, the CMSG_NXTHDR macro expands to (struct cmsghdr *)((char *)(cmsg) + \ _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len)) Although there is no alignment problem (assuming cmsg is properly aligned and _ALIGN is correct), this violates -Wcast-align on strict-alignment architectures. Therefore an intermediate cast to void * is appropriate here. There is no workaround other than not using -Wcast-align. MFC after: 2 weeks Modified: head/sys/sys/socket.h Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Sun Apr 17 15:09:04 2011 (r220741) +++ head/sys/sys/socket.h Sun Apr 17 16:04:39 2011 (r220742) @@ -515,7 +515,7 @@ struct sockcred { _ALIGN(sizeof(struct cmsghdr)) > \ (char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \ (struct cmsghdr *)0 : \ - (struct cmsghdr *)((char *)(cmsg) + \ + (struct cmsghdr *)(void *)((char *)(cmsg) + \ _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) /* From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 16:07:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3FC91065675; Sun, 17 Apr 2011 16:07:08 +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 C286C8FC2A; Sun, 17 Apr 2011 16:07: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 p3HG78dj042720; Sun, 17 Apr 2011 16:07:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HG78Mf042718; Sun, 17 Apr 2011 16:07:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104171607.p3HG78Mf042718@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Apr 2011 16:07: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: r220743 - 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: Sun, 17 Apr 2011 16:07:08 -0000 Author: bz Date: Sun Apr 17 16:07:08 2011 New Revision: 220743 URL: http://svn.freebsd.org/changeset/base/220743 Log: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Reported by: Pete French (petefrench ingresso.co.uk on stable) Reported by: bz, simon on Y! cluster Reported by: kib PR: kern/151908 MFC after: 3 days Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sun Apr 17 16:04:39 2011 (r220742) +++ head/sys/netinet6/nd6_nbr.c Sun Apr 17 16:07:08 2011 (r220743) @@ -340,7 +340,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -350,7 +350,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: if (ifa != NULL) ifa_free(ifa); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 16:18:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C4D51065672; Sun, 17 Apr 2011 16:18:46 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3FDA8FC22; Sun, 17 Apr 2011 16:18: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 p3HGIjcx042990; Sun, 17 Apr 2011 16:18:45 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HGIj6i042986; Sun, 17 Apr 2011 16:18:45 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201104171618.p3HGIj6i042986@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 17 Apr 2011 16:18: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: r220744 - in head/sbin: hastctl hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 16:18:46 -0000 Author: trociny Date: Sun Apr 17 16:18:45 2011 New Revision: 220744 URL: http://svn.freebsd.org/changeset/base/220744 Log: Remove hast_proto_recv(). It was used only in one place, where hast_proto_recv_hdr() may be used. This also fixes the issue (introduced by r220523) with hastctl, which crashed on assert in hast_proto_recv_data(). Suggested and approved by: pjd (mentor) Modified: head/sbin/hastctl/hastctl.c head/sbin/hastd/hast_proto.c head/sbin/hastd/hast_proto.h Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Sun Apr 17 16:07:08 2011 (r220743) +++ head/sbin/hastctl/hastctl.c Sun Apr 17 16:18:45 2011 (r220744) @@ -491,7 +491,7 @@ main(int argc, char *argv[]) } nv_free(nv); /* ...and receive reply. */ - if (hast_proto_recv(NULL, controlconn, &nv, NULL, 0) < 0) { + if (hast_proto_recv_hdr(controlconn, &nv) < 0) { pjdlog_exit(EX_UNAVAILABLE, "cannot receive reply from hastd via %s", cfg->hc_controladdr); Modified: head/sbin/hastd/hast_proto.c ============================================================================== --- head/sbin/hastd/hast_proto.c Sun Apr 17 16:07:08 2011 (r220743) +++ head/sbin/hastd/hast_proto.c Sun Apr 17 16:18:45 2011 (r220744) @@ -219,21 +219,3 @@ end: free(dptr); return (ret); } - -int -hast_proto_recv(const struct hast_resource *res, struct proto_conn *conn, - struct nv **nvp, void *data, size_t size) -{ - struct nv *nv; - int ret; - - ret = hast_proto_recv_hdr(conn, &nv); - if (ret < 0) - return (ret); - ret = hast_proto_recv_data(res, conn, nv, data, size); - if (ret < 0) - nv_free(nv); - else - *nvp = nv; - return (ret); -} Modified: head/sbin/hastd/hast_proto.h ============================================================================== --- head/sbin/hastd/hast_proto.h Sun Apr 17 16:07:08 2011 (r220743) +++ head/sbin/hastd/hast_proto.h Sun Apr 17 16:18:45 2011 (r220744) @@ -39,8 +39,6 @@ int hast_proto_send(const struct hast_resource *res, struct proto_conn *conn, struct nv *nv, const void *data, size_t size); -int hast_proto_recv(const struct hast_resource *res, struct proto_conn *conn, - struct nv **nvp, void *data, size_t size); int hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp); int hast_proto_recv_data(const struct hast_resource *res, struct proto_conn *conn, struct nv *nv, void *data, size_t size); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 16:31:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C26F81065670; Sun, 17 Apr 2011 16:31:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B09748FC13; Sun, 17 Apr 2011 16:31: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 p3HGVLvp043310; Sun, 17 Apr 2011 16:31:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HGVLss043308; Sun, 17 Apr 2011 16:31:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104171631.p3HGVLss043308@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 17 Apr 2011 16:31: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: r220745 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 16:31:21 -0000 Author: glebius Date: Sun Apr 17 16:31:21 2011 New Revision: 220745 URL: http://svn.freebsd.org/changeset/base/220745 Log: Fix error where error variable was assigned result of comparison, instead of function return value. Submitted by: Przemyslaw Frasunek MFC after: 4 days Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sun Apr 17 16:18:45 2011 (r220744) +++ head/sys/netgraph/ng_base.c Sun Apr 17 16:31:21 2011 (r220745) @@ -596,7 +596,7 @@ ng_make_node(const char *typename, node_ */ if (type->constructor != NULL) { if ((error = ng_make_node_common(type, nodepp)) == 0) { - if ((error = ((*type->constructor)(*nodepp)) != 0)) { + if ((error = ((*type->constructor)(*nodepp))) != 0) { NG_NODE_UNREF(*nodepp); } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 16:35:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08BB0106564A; Sun, 17 Apr 2011 16:35:17 +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 D0C508FC08; Sun, 17 Apr 2011 16:35: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 p3HGZGBN043433; Sun, 17 Apr 2011 16:35:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HGZGjH043430; Sun, 17 Apr 2011 16:35:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104171635.p3HGZGjH043430@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Apr 2011 16:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220746 - in head/sys: conf 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: Sun, 17 Apr 2011 16:35:17 -0000 Author: bz Date: Sun Apr 17 16:35:16 2011 New Revision: 220746 URL: http://svn.freebsd.org/changeset/base/220746 Log: Make in_proto.c dependent on either inet or inet6. While it does not provide any functionality for IPv6, it provides the sysctl nodes for net.inet.* that a lot of functionality shared between IPv4 and IPv6 depends on. We cannot change these anymore without breaking a lot of management and tuning. In case of IPv6 only, we compile out everything but the sysctl node declarations. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC After: 5 days Modified: head/sys/conf/files head/sys/netinet/in_proto.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Apr 17 16:31:21 2011 (r220745) +++ head/sys/conf/files Sun Apr 17 16:35:16 2011 (r220746) @@ -2653,7 +2653,7 @@ netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 -netinet/in_proto.c optional inet \ +netinet/in_proto.c optional inet | inet6 \ compile-with "${NORMAL_C} -I$S/contrib/pf" netinet/in_rmx.c optional inet netinet/ip_divert.c optional inet ipdivert ipfirewall Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Sun Apr 17 16:31:21 2011 (r220745) +++ head/sys/netinet/in_proto.c Sun Apr 17 16:35:16 2011 (r220746) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipx.h" #include "opt_mrouting.h" #include "opt_ipsec.h" +#include "opt_inet.h" #include "opt_inet6.h" #include "opt_pf.h" #include "opt_sctp.h" @@ -50,6 +51,13 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * While this file provides the domain and protocol switch tables for IPv4, it + * also provides the sysctl node declarations for net.inet.* often shared with + * IPv6 for common features or by upper layer protocols. In case of no IPv4 + * support compile out everything but these sysctl nodes. + */ +#ifdef INET #include #include #ifdef RADIX_MPATH @@ -372,6 +380,7 @@ struct domain inetdomain = { }; VNET_DOMAIN_SET(inet); +#endif /* INET */ SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0, "Internet Family"); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 17:00:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E941065673; Sun, 17 Apr 2011 17:00:56 +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 1F0218FC14; Sun, 17 Apr 2011 17:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HH0us0044028; Sun, 17 Apr 2011 17:00:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HH0tjI044023; Sun, 17 Apr 2011 17:00:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104171700.p3HH0tjI044023@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Apr 2011 17:00:55 +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: r220747 - in vendor/dialog/dist: . package package/debian package/debian/source po samples X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 17:00:56 -0000 Author: nwhitehorn Date: Sun Apr 17 17:00:55 2011 New Revision: 220747 URL: http://svn.freebsd.org/changeset/base/220747 Log: Update dialog to 20110302 version. Added: vendor/dialog/dist/argv.c vendor/dialog/dist/package/ vendor/dialog/dist/package/debian/ vendor/dialog/dist/package/debian/changelog vendor/dialog/dist/package/debian/compat vendor/dialog/dist/package/debian/control vendor/dialog/dist/package/debian/copyright vendor/dialog/dist/package/debian/docs vendor/dialog/dist/package/debian/rules (contents, props changed) vendor/dialog/dist/package/debian/source/ vendor/dialog/dist/package/debian/source/format vendor/dialog/dist/package/debian/watch vendor/dialog/dist/package/dialog.spec vendor/dialog/dist/po/sl.po vendor/dialog/dist/prgbox.c vendor/dialog/dist/rename.sh (contents, props changed) vendor/dialog/dist/samples/msgbox-utf8 (contents, props changed) vendor/dialog/dist/samples/pause-both (contents, props changed) vendor/dialog/dist/samples/pause-extra (contents, props changed) vendor/dialog/dist/samples/prgbox (contents, props changed) vendor/dialog/dist/samples/prgbox2 (contents, props changed) vendor/dialog/dist/samples/programbox (contents, props changed) vendor/dialog/dist/samples/programbox2 (contents, props changed) vendor/dialog/dist/samples/shortlist (contents, props changed) vendor/dialog/dist/samples/textbox-both (contents, props changed) vendor/dialog/dist/samples/textbox-help (contents, props changed) Modified: vendor/dialog/dist/CHANGES vendor/dialog/dist/VERSION vendor/dialog/dist/aclocal.m4 vendor/dialog/dist/arrows.c vendor/dialog/dist/buttons.c vendor/dialog/dist/calendar.c vendor/dialog/dist/checklist.c vendor/dialog/dist/columns.c vendor/dialog/dist/config.guess vendor/dialog/dist/config.sub vendor/dialog/dist/configure vendor/dialog/dist/configure.in vendor/dialog/dist/dialog-config.in vendor/dialog/dist/dialog.1 vendor/dialog/dist/dialog.3 vendor/dialog/dist/dialog.c vendor/dialog/dist/dialog.h vendor/dialog/dist/dlg_colors.h vendor/dialog/dist/fselect.c vendor/dialog/dist/guage.c vendor/dialog/dist/headers-sh.in vendor/dialog/dist/inputstr.c vendor/dialog/dist/makefile.in vendor/dialog/dist/menubox.c vendor/dialog/dist/mixedgauge.c vendor/dialog/dist/pause.c vendor/dialog/dist/po/ar.po vendor/dialog/dist/po/bg.po vendor/dialog/dist/po/ca.po vendor/dialog/dist/po/cy.po vendor/dialog/dist/po/da.po vendor/dialog/dist/po/de.po vendor/dialog/dist/po/dialog.pot vendor/dialog/dist/po/eo.po vendor/dialog/dist/po/es.po vendor/dialog/dist/po/eu.po vendor/dialog/dist/po/fi.po vendor/dialog/dist/po/fr.po vendor/dialog/dist/po/ga.po vendor/dialog/dist/po/gl.po vendor/dialog/dist/po/hr.po vendor/dialog/dist/po/id.po vendor/dialog/dist/po/is.po vendor/dialog/dist/po/it.po vendor/dialog/dist/po/ja.po vendor/dialog/dist/po/ku.po vendor/dialog/dist/po/lt.po vendor/dialog/dist/po/lv.po vendor/dialog/dist/po/makefile.inn vendor/dialog/dist/po/ms.po vendor/dialog/dist/po/nl.po vendor/dialog/dist/po/pl.po vendor/dialog/dist/po/pt_BR.po vendor/dialog/dist/po/ru.po vendor/dialog/dist/po/sq.po vendor/dialog/dist/po/sv.po vendor/dialog/dist/po/sw.po vendor/dialog/dist/po/th.po vendor/dialog/dist/po/zh_CN.po vendor/dialog/dist/po/zh_TW.po vendor/dialog/dist/progressbox.c vendor/dialog/dist/samples/debian.rc vendor/dialog/dist/samples/infobox5 vendor/dialog/dist/samples/infobox6 vendor/dialog/dist/samples/setup-vars vendor/dialog/dist/samples/slackware.rc vendor/dialog/dist/samples/sourcemage.rc vendor/dialog/dist/samples/suse.rc vendor/dialog/dist/samples/whiptail.rc vendor/dialog/dist/tailbox.c vendor/dialog/dist/textbox.c vendor/dialog/dist/timebox.c vendor/dialog/dist/trace.c vendor/dialog/dist/ui_getc.c vendor/dialog/dist/util.c Modified: vendor/dialog/dist/CHANGES ============================================================================== --- vendor/dialog/dist/CHANGES Sun Apr 17 16:35:16 2011 (r220746) +++ vendor/dialog/dist/CHANGES Sun Apr 17 17:00:55 2011 (r220747) @@ -1,9 +1,77 @@ --- $Id: CHANGES,v 1.300 2010/04/28 21:27:22 tom Exp $ +-- $Id: CHANGES,v 1.333 2011/03/02 10:06:37 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2011/03/02 + + add --prgbox and --programbox (adapted from patch by David Boyd). + + add sl.po from + http://translationproject.org/latest/dialog/ + + fix timeouts from 2011/01/18, which were being interpreted as + milliseconds rather than seconds (report by Luis Moreira). + +2011/01/18 + + fix inconsistency in return-codes for textbox when help-button is + used by making dlg_exit_buttoncode() a wrapper for + dlg_ok_buttoncode(). + + modify pause widget to use dlg_ok_buttoncode(), so help-button works. + + correct two infobox sample scripts, which did not pass extra + command-line parameters due to quoting problems. + + add a limit-check to the timebox widget (patch by Garrett Cooper). + + modify --trace option to also trace the command-line parameters. + + account for combining characters when wrapping text (Debian #570634). + + correct handling of SIGWINCH in gauge widget (Debian #305705). + + add gauge_color, to make guage's progress-bar distinct from + title_color (request by Dominic Derdau). + + update fi.po from + http://translationproject.org/latest/dialog/ + as well as resync line-numbers in the other po-files. + + modify configure script and dialog program to build with NetBSD's + wide-character curses functions, including workarounds for its + incorrect WACS_xxx definitions. Some of the UTF-8 examples work. + + add back-tab for traversal of tailboxbg widgets, for symmetry with + tab-traversal. + + reduce flicker in tailboxbg by checking if the input file size has + changed. + + modify internals of callbacks to avoid blocking reads of their + associated files by keyboard input. + + add command-line option --no-mouse, to suppress use of mouse. + + add configure option --enable-header-subdir to allow the header files + to be installed into a subdirectory named for the package. + + modify dlg_restore_vars() to retain the updated values of + input_result and input_length, eliminating the need for a caller to + provide their own user buffer (prompted by report by Thiago Bimbatti + Felicio). + + add a null-pointer check in show_result() for + dialog_vars.input_result, and ensure it is set to null after freeing + (prompted by report by Thiago Bimbatti Felicio). + + change order of -I options in CPPFLAGS (report by Michel Feldheim) + + modify pause-widget so that it no longer exits when an unrecognized + key is pressed (patch by Creidieki M Crouch). + + add --with-package option to configure script to allow renaming + of the dialog program and library, to support the package scripts. + + add Debian and RPM package scripts for test-builds. + + several improvements to configure script: + + quote params of ifelse() + + change obsolete ${name-value} to standard ${name:-value} + + use new macros CF_ADD_LIB/CF_ADD_LIBS to enforce consistency. + + AM_GNU_GETTEXT, drop $MKINSTALLDIRS, use "mkdir -p" consistently. + + CF_ADD_SUBDIR_PATH, workaround - if $prefix was not mkdir'd yet, no + directories were added. + + CF_BUNDLED_INTL, add --with-textdomain option, to use with lynx-dev + package + + CF_FIND_LINKAGE, simplify save/restore of $LIBS + + CF_GCC_WARNINGS, fix for Mac OS X (compiler makes conftest.dSYM + directory) + + CF_HEADER_PATH, don't search for variations of everything in the + current include-path + + CF_WITH_CURSES_DIR, move the calls to CF_ADD_INCDIR and + CF_ADD_LIBDIR for the curses-directory here, from + CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even + with the default checking, e.g., no --with-ncurses, etc. + + updated config.guess, config.sub + 2010/04/28 + several improvements to configure script: + modify CF_CURSES_TERM_H to handle cases such as cygwin where @@ -278,7 +346,7 @@ to it: + make --program-prefix, etc., work in configure script, e.g., to make program install as "cdialog". This does not alter the library name. + add install-bin, install-man (and uninstall) rules to makefile. - + updates for configure script macros (originally vile, lynx, xterm): + + updates for configure script macros (originally vile, lynx, xterm): AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, CF_CURSES_CPPFLAGS, CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, @@ -407,7 +475,7 @@ to it: + fix marker in textbox.c to make it disappear at the top of the file (report by Patrick J. Volkerding). + fix marker shown in arrows.c for checklists, etc., which was "(+)" - where it should have been "(-)" (report/patch by Patrick J. + where it should have been "(-)" (report/patch by Patrick J. Volkerding). + fix --input-fd (changes in glibc since 2003 made dialog hang on exit due to the way dialog updated stdin). Modified: vendor/dialog/dist/VERSION ============================================================================== --- vendor/dialog/dist/VERSION Sun Apr 17 16:35:16 2011 (r220746) +++ vendor/dialog/dist/VERSION Sun Apr 17 17:00:55 2011 (r220747) @@ -1 +1 @@ -7:1:0 1.1 20100428 +9:0:0 1.1 20110302 Modified: vendor/dialog/dist/aclocal.m4 ============================================================================== --- vendor/dialog/dist/aclocal.m4 Sun Apr 17 16:35:16 2011 (r220746) +++ vendor/dialog/dist/aclocal.m4 Sun Apr 17 17:00:55 2011 (r220747) @@ -1,13 +1,37 @@ dnl macros used for DIALOG configure script -dnl Copyright 1999-2009,2010 -- Thomas E. Dickey +dnl $Id: aclocal.m4,v 1.80 2011/01/18 23:17:01 tom Exp $ +dnl --------------------------------------------------------------------------- +dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the +dnl "Software"), to deal in the Software without restriction, including +dnl without limitation the rights to use, copy, modify, merge, publish, +dnl distribute, distribute with modifications, sublicense, and/or sell +dnl copies of the Software, and to permit persons to whom the Software is +dnl furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name(s) of the above copyright +dnl holders shall not be used in advertising or otherwise to promote the +dnl sale, use or other dealings in this Software without prior written +dnl authorization. dnl dnl see dnl http://invisible-island.net/autoconf/ -dnl -dnl $Id: aclocal.m4,v 1.75 2010/04/28 20:36:28 tom Exp $ dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_GNU_GETTEXT version: 11 updated: 2004/01/26 20:58:40 +dnl AM_GNU_GETTEXT version: 12 updated: 2010/06/19 07:02:11 dnl -------------- dnl Usage: Just like AM_WITH_NLS, which see. AC_DEFUN([AM_GNU_GETTEXT], @@ -68,25 +92,6 @@ strdup strtoul tsearch __argz_count __ar fi fi - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but ($top_srcdir). - dnl Try to locate it. - dnl changed mkinstalldirs to mkdirs.sh for Lynx /je spath 1998-Aug-21 - dnl added check for separate locations of scripts -mirabile 2004-Jan-18 - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh" - fi - if test -n "$GNUSYSTEM_AUX_DIR" ; then - if test -e "${GNUSYSTEM_AUX_DIR}/mkinstalldirs"; then - MKINSTALLDIRS="${GNUSYSTEM_AUX_DIR}/mkinstalldirs" - fi - fi - AC_SUBST(MKINSTALLDIRS) - dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) @@ -277,7 +282,7 @@ fi AC_SUBST($1)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl AM_WITH_NLS version: 23 updated: 2009/01/11 19:52:42 +dnl AM_WITH_NLS version: 24 updated: 2010/06/20 09:24:28 dnl ----------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -369,7 +374,7 @@ AC_DEFUN([AM_WITH_NLS], CATOBJEXT=NONE cf_save_LIBS_1="$LIBS" - LIBS="$LIBICONV $LIBS" + CF_ADD_LIBS($LIBICONV) AC_CACHE_CHECK([for libintl.h and gettext()], cf_cv_func_gettext,[ CF_FIND_LINKAGE(CF__INTL_HEAD, CF__INTL_BODY, @@ -597,7 +602,7 @@ define(CF_AC_PREREQ, AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 9 updated: 2010/01/09 11:05:50 +dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -667,17 +672,17 @@ esac done if test -n "$cf_new_cflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi @@ -685,7 +690,7 @@ AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_INCDIR version: 12 updated: 2009/01/18 10:00:47 +dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57 dnl ------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's dnl redundant. We don't normally need to add -I/usr/local/include for gcc, @@ -728,7 +733,7 @@ if test -n "$1" ; then if test "$cf_have_incdir" = no ; then CF_VERBOSE(adding $cf_add_incdir to include-path) - ifelse($2,,CPPFLAGS,$2)="$ifelse($2,,CPPFLAGS,$2) -I$cf_add_incdir" + ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir" cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break @@ -742,7 +747,15 @@ if test -n "$1" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_LIBDIR version: 8 updated: 2009/01/18 10:01:08 +dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05 +dnl ---------- +dnl Add a library, used to enforce consistency. +dnl +dnl $1 = library to add, without the "-l" +dnl $2 = variable to update (default $LIBS) +AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIBDIR version: 9 updated: 2010/05/26 16:44:57 dnl ------------- dnl Adds to the library-path dnl @@ -771,13 +784,21 @@ if test -n "$1" ; then fi if test "$cf_have_libdir" = no ; then CF_VERBOSE(adding $cf_add_libdir to library-path) - ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,$2)" + ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])" fi fi done fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05 +dnl ----------- +dnl Add one or more libraries, used to enforce consistency. +dnl +dnl $1 = libraries to add, with the "-l", etc. +dnl $2 = variable to update (default $LIBS) +AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl +dnl --------------------------------------------------------------------------- dnl CF_ADD_OPTIONAL_PATH version: 1 updated: 2007/07/29 12:33:33 dnl -------------------- dnl Add an optional search-path to the compile/link variables. @@ -827,7 +848,7 @@ $2]) done ]) dnl --------------------------------------------------------------------------- -dnl CF_ADD_SUBDIR_PATH version: 2 updated: 2007/07/29 10:12:59 +dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12 dnl ------------------ dnl Append to a search-list for a nonstandard header/lib-file dnl $1 = the variable to return as result @@ -839,7 +860,7 @@ AC_DEFUN([CF_ADD_SUBDIR_PATH], [ test "$4" != "$5" && \ test -d "$4" && \ -ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) { +ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { test -n "$verbose" && echo " ... testing for $3-directories under $4" test -d $4/$3 && $1="[$]$1 $4/$3" test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2" @@ -883,7 +904,7 @@ ifelse($5,,[ :],$5) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41 +dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42 dnl ------------- dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus dnl values. @@ -895,18 +916,18 @@ dnl $3 = action to perform if option is dnl $4 = action if perform if option is default dnl $5 = default option value (either 'yes' or 'no') AC_DEFUN([CF_ARG_OPTION], -[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes) +[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) if test "$enableval" != "$5" ; then -ifelse($3,,[ :]dnl -,[ $3]) ifelse($4,,,[ +ifelse([$3],,[ :]dnl +,[ $3]) ifelse([$4],,,[ else $4]) - fi],[enableval=$5 ifelse($4,,,[ + fi],[enableval=$5 ifelse([$4],,,[ $4 ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUNDLED_INTL version: 14 updated: 2010/01/17 20:37:27 +dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05 dnl --------------- dnl Top-level macro for configuring an application with a bundled copy of dnl the intl and po directories for gettext. @@ -920,12 +941,15 @@ dnl GT_NO - "#" comment if buildi dnl INTLDIR_MAKE - to make ./intl directory dnl MSG_DIR_MAKE - to make ./po directory dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories -dnl Defines +dnl +dnl Defines: dnl HAVE_LIBGETTEXT_H if we're using ./intl +dnl NLS_TEXTDOMAIN dnl dnl Environment: dnl ALL_LINGUAS if set, lists the root names of the ".po" files. dnl CONFIG_H assumed to be "config.h" +dnl PACKAGE must be set, used as default for textdomain dnl VERSION may be set, otherwise extract from "VERSION" file. dnl AC_DEFUN([CF_BUNDLED_INTL],[ @@ -937,9 +961,13 @@ dnl rather than $LC_ALL test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'` # Allow override of "config.h" definition: -: ${CONFIG_H=config.h} +: ${CONFIG_H:=config.h} AC_SUBST(CONFIG_H) +if test -z "$PACKAGE" ; then + AC_MSG_ERROR([[CF_BUNDLED_INTL] used without setting [PACKAGE] variable]) +fi + if test -z "$VERSION" ; then if test -f $srcdir/VERSION ; then VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1` @@ -951,6 +979,15 @@ AC_SUBST(VERSION) AM_GNU_GETTEXT(,,,[$2]) +if test "$USE_NLS" = yes ; then + AC_ARG_WITH(textdomain, + [ --with-textdomain=PKG NLS text-domain (default is package name)], + [NLS_TEXTDOMAIN=$withval], + [NLS_TEXTDOMAIN=$PACKAGE]) + AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN") + AC_SUBST(NLS_TEXTDOMAIN) +fi + INTLDIR_MAKE= MSG_DIR_MAKE= SUB_MAKEFILE= @@ -1055,21 +1092,21 @@ if test ".$system_name" != ".$cf_cv_syst fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57 +dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], [ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo], [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test $cf_cv_chtype_decl = yes ; then AC_DEFINE(HAVE_TYPE_CHTYPE) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; long x = foo], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) @@ -1116,7 +1153,7 @@ CF_CURSES_HEADER CF_TERM_HEADER ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_FUNCS version: 14 updated: 2009/07/16 19:34:55 +dnl CF_CURSES_FUNCS version: 15 updated: 2010/10/23 15:52:32 dnl --------------- dnl Curses-functions are a little complicated, since a lot of them are macros. AC_DEFUN([CF_CURSES_FUNCS], @@ -1136,7 +1173,7 @@ do [ #ifndef ${cf_func} long foo = (long)(&${cf_func}); -${cf_cv_main_return-return}(foo == 0); +${cf_cv_main_return:-return}(foo == 0); #endif ], [cf_result=yes], @@ -1182,7 +1219,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 29 updated: 2009/01/06 19:34:57 +dnl CF_CURSES_LIBS version: 32 updated: 2011/01/16 17:43:15 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1190,7 +1227,7 @@ AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) -AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], +AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto("?", 0,0)], cf_result=yes, cf_result=no) @@ -1199,27 +1236,39 @@ AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then case $host_os in #(vi freebsd*) #(vi - AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) + AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) ;; hpux10.*) #(vi AC_CHECK_LIB(cur_colr,initscr,[ - LIBS="-lcur_colr $LIBS" + CF_ADD_LIBS(-lcur_colr) ac_cv_func_initscr=yes ],[ AC_CHECK_LIB(Hcurses,initscr,[ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. - LIBS="-lHcurses $LIBS" + CF_ADD_LIBS(-lHcurses) CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" ac_cv_func_initscr=yes ])]) ;; -linux*) # Suse Linux does not follow /usr/lib convention - CF_ADD_LIBDIR(/lib) +linux*) + case `arch` in + x86_64) + if test -d /lib64 + then + CF_ADD_LIBDIR(/lib64) + else + CF_ADD_LIBDIR(/lib) + fi + ;; + *) + CF_ADD_LIBDIR(/lib) + ;; + esac ;; sunos3*|sunos4*) if test -d /usr/5lib ; then CF_ADD_LIBDIR(/usr/5lib) - LIBS="$LIBS -lcurses -ltermcap" + CF_ADD_LIBS(-lcurses -ltermcap) fi ac_cv_func_initscr=yes ;; @@ -1230,7 +1279,7 @@ if test ".$ac_cv_func_initscr" != .yes ; cf_term_lib="" cf_curs_lib="" - if test ".${cf_cv_ncurses_version-no}" != .no + if test ".${cf_cv_ncurses_version:-no}" != .no then cf_check_list="ncurses curses cursesX" else @@ -1257,7 +1306,7 @@ if test ".$ac_cv_func_initscr" != .yes ; LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=no]) @@ -1267,12 +1316,12 @@ if test ".$ac_cv_func_initscr" != .yes ; : elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto((char *)0, 0, 0);], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=error]) @@ -1284,7 +1333,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 7 updated: 2010/01/24 18:40:06 +dnl CF_CURSES_TERM_H version: 8 updated: 2010/10/23 15:54:49 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -1299,11 +1348,11 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_he # If we found , look for , but always look # for if we do not find the variant. for cf_header in \ - `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \ + `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \ term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <${cf_header}>], [WINDOW *x], [cf_cv_term_header=$cf_header @@ -1318,7 +1367,7 @@ no) for cf_header in ncurses/term.h ncursesw/term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #ifdef NCURSES_VERSION #include <${cf_header}> #else @@ -1346,6 +1395,63 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59 +dnl ------------------ +dnl Check for likely values of wacs_map[]. +AC_DEFUN([CF_CURSES_WACS_MAP], +[ +AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ + cf_cv_curses_wacs_map=unknown + for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char + do + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [void *foo = &($name['k'])], + [cf_cv_curses_wacs_map=$name + break]) + done]) + +test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59 +dnl ---------------------- +dnl Do a check to see if the WACS_xxx constants are defined compatibly with +dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx +dnl constants is broken since those constants do not point to cchar_t's. +AC_DEFUN([CF_CURSES_WACS_SYMBOLS], +[ +AC_REQUIRE([CF_CURSES_WACS_MAP]) + +AC_CACHE_CHECK(for wide alternate character constants, cf_cv_curses_wacs_symbols,[ +cf_cv_curses_wacs_symbols=no +if test "$cf_cv_curses_wacs_map" != unknown +then + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS; + $cf_cv_curses_wacs_map['k'] = *WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +else + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +fi +]) + +test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -1388,6 +1494,30 @@ AC_SUBST(SHOW_CC) AC_SUBST(ECHO_CC) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_DISABLE_LIBTOOL_VERSION version: 1 updated: 2010/05/15 15:45:59 +dnl -------------------------- +dnl Check if we should use the libtool 1.5 feature "-version-number" instead of +dnl the older "-version-info" feature. The newer feature allows us to use +dnl version numbering on shared libraries which make them compatible with +dnl various systems. +AC_DEFUN([CF_DISABLE_LIBTOOL_VERSION], +[ +AC_MSG_CHECKING(if libtool -version-number should be used) +CF_ARG_DISABLE(libtool-version, + [ --disable-libtool-version enable to use libtool's incompatible naming scheme], + [cf_libtool_version=no], + [cf_libtool_version=yes]) +AC_MSG_RESULT($cf_libtool_version) + +if test "$cf_libtool_version" = yes ; then + LIBTOOL_VERSION="-version-number" +else + LIBTOOL_VERSION="-version-info" +fi + +AC_SUBST(LIBTOOL_VERSION) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DISABLE_RPATH_HACK version: 1 updated: 2010/04/11 10:54:00 dnl --------------------- dnl The rpath-hack makes it simpler to build programs, particularly with the @@ -1489,7 +1619,7 @@ fi ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIND_LINKAGE version: 16 updated: 2010/04/21 06:20:50 +dnl CF_FIND_LINKAGE version: 19 updated: 2010/05/29 16:31:02 dnl --------------- dnl Find a library (specifically the linkage used in the code fragment), dnl searching for it if it is not already in the library path. @@ -1518,18 +1648,23 @@ cf_cv_library_path_$3= CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)]) +cf_save_LIBS="$LIBS" + AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes + cf_cv_header_path_$3=/usr/include + cf_cv_library_path_$3=/usr/lib ],[ -cf_save_LIBS="$LIBS" LIBS="-l$3 $7 $cf_save_LIBS" AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes + cf_cv_header_path_$3=/usr/include + cf_cv_library_path_$3=/usr/lib cf_cv_library_file_$3="-l$3" ],[ - cf_cv_find_linkage_$3=no + cf_cv_find_linkage_$3=no LIBS="$cf_save_LIBS" CF_VERBOSE(find linkage for $3 library) @@ -1591,7 +1726,6 @@ AC_TRY_LINK([$1],[$2],[ ]) fi done - LIBS="$cf_save_LIBS" CPPFLAGS="$cf_save_CPPFLAGS" LDFLAGS="$cf_save_LDFLAGS" fi @@ -1602,11 +1736,13 @@ AC_TRY_LINK([$1],[$2],[ ],$7) ]) +LIBS="$cf_save_LIBS" + if test "$cf_cv_find_linkage_$3" = yes ; then ifelse([$4],,[ CF_ADD_INCDIR($cf_cv_header_path_$3) CF_ADD_LIBDIR($cf_cv_library_path_$3) - LIBS="-l$3 $LIBS" + CF_ADD_LIB($3) ],[$4]) else ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) @@ -1653,7 +1789,7 @@ if test $cf_cv_type_unionwait = yes; the fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56 +dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1680,7 +1816,7 @@ if test "$GCC" = yes then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext < conftest.$ac_ext </dev/null | sed -e 's,[[ ]]*$,,'` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[[ ]]*$,,'` case "$cf_result" in .*k) - cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` case "$cf_result" in .*CC=*) cf_cv_makeflags= ;; @@ -2259,7 +2396,7 @@ CF_EOF AC_SUBST(cf_cv_makeflags) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKE_TAGS version: 5 updated: 2010/04/03 20:07:32 +dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have dnl a monocase filesystem. @@ -2269,10 +2406,10 @@ AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) AC_CHECK_PROGS(CTAGS, exctags ctags) AC_CHECK_PROGS(ETAGS, exetags etags) -AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS-ctags}, yes, no) +AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no) if test "$cf_cv_mixedcase" = yes ; then - AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS-etags}, yes, no) + AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no) else MAKE_UPPER_TAGS=no fi @@ -2296,7 +2433,7 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MATH_LIB version: 6 updated: 2009/12/19 13:46:49 +dnl CF_MATH_LIB version: 8 updated: 2010/05/29 16:31:02 dnl ----------- dnl Checks for libraries. At least one UNIX system, Apple Macintosh dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler @@ -2309,13 +2446,13 @@ AC_CACHE_CHECK(if -lm needed for math fu #include #include ], - [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)], + [double x = rand(); printf("result = %g\n", ]ifelse([$2],,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])]) if test "$cf_cv_need_libm" = yes then ifelse($1,,[ - LIBS="-lm $LIBS" + CF_ADD_LIB(m) ],[$1=-lm]) fi ]) @@ -2386,12 +2523,12 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12 +dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ -echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC +echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_CC_CHECK version: 4 updated: 2007/07/29 10:39:05 @@ -2427,10 +2564,10 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 6 updated: 2010/04/28 06:02:16 +dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 dnl ----------------- dnl Tie together the configure-script macros for ncurses. -dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis. +dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. dnl Allow that to be overridden using the $NCURSES_CONFIG environment variable. dnl dnl $1 is the root library name (default: "ncurses") @@ -2444,7 +2581,7 @@ AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncucon if test "$NCURSES_CONFIG" != none ; then CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`" -LIBS="`$NCURSES_CONFIG --libs` $LIBS" +CF_ADD_LIBS(`$NCURSES_CONFIG --libs`) # even with config script, some packages use no-override for curses.h CF_CURSES_HEADER(ifelse($1,,ncurses,$1)) @@ -2467,7 +2604,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1)) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20 +dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38 dnl ------------------- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting dnl the CPPFLAGS variable so we can include its header. @@ -2496,7 +2633,7 @@ cf_ncuhdr_root=ifelse($1,,ncurses,$1) test -n "$cf_cv_curses_dir" && \ test "$cf_cv_curses_dir" != "no" && { \ - CF_ADD_INCDIR($cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root) + CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root) } AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ @@ -2584,7 +2721,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_LIBS version: 13 updated: 2007/07/29 10:29:20 +dnl CF_NCURSES_LIBS version: 16 updated: 2010/11/20 17:02:38 dnl --------------- dnl Look for the ncurses library. This is a little complicated on Linux, dnl because it may be linked with the gpm (general purpose mouse) library. @@ -2620,15 +2757,14 @@ freebsd*) ;; esac -LIBS="$cf_ncurses_LIBS $LIBS" +CF_ADD_LIBS($cf_ncurses_LIBS) if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) then - CF_ADD_LIBDIR($cf_cv_curses_dir/lib) - LIBS="-l$cf_nculib_root $LIBS" + CF_ADD_LIBS(-l$cf_nculib_root) else CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, - [#include <${cf_cv_ncurses_header-curses.h}>], + [#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], initscr) fi @@ -2642,7 +2778,7 @@ if test -n "$cf_ncurses_LIBS" ; then LIBS="$q" fi done - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) @@ -2653,7 +2789,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncul AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55 +dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -2666,7 +2802,7 @@ AC_CACHE_CHECK(for ncurses version, cf_c cf_tempfile=out$$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 17:01:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C5A1065674; Sun, 17 Apr 2011 17:01: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 C4C798FC14; Sun, 17 Apr 2011 17:01: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 p3HH1iwi044092; Sun, 17 Apr 2011 17:01:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HH1iI8044091; Sun, 17 Apr 2011 17:01:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104171701.p3HH1iI8044091@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Apr 2011 17:01:44 +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: r220748 - vendor/dialog/dialog-1.1-20110302 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 17:01:45 -0000 Author: nwhitehorn Date: Sun Apr 17 17:01:44 2011 New Revision: 220748 URL: http://svn.freebsd.org/changeset/base/220748 Log: Tag dialog 1.1-20110302. Added: vendor/dialog/dialog-1.1-20110302/ - copied from r220747, vendor/dialog/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 17:28:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4D5D1065675; Sun, 17 Apr 2011 17:28:17 +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 CFF6C8FC1D; Sun, 17 Apr 2011 17:28: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 p3HHSHpd044710; Sun, 17 Apr 2011 17:28:17 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HHSHxt044705; Sun, 17 Apr 2011 17:28:17 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104171728.p3HHSHxt044705@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Apr 2011 17:28: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: r220749 - in head: contrib/dialog contrib/dialog/package contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 17:28:18 -0000 Author: nwhitehorn Date: Sun Apr 17 17:28:17 2011 New Revision: 220749 URL: http://svn.freebsd.org/changeset/base/220749 Log: Update dialog to version 1.1-20110302. Added: head/contrib/dialog/argv.c - copied unchanged from r220748, vendor/dialog/dist/argv.c head/contrib/dialog/package/ - copied from r220748, vendor/dialog/dist/package/ head/contrib/dialog/po/sl.po - copied unchanged from r220748, vendor/dialog/dist/po/sl.po head/contrib/dialog/prgbox.c - copied unchanged from r220748, vendor/dialog/dist/prgbox.c head/contrib/dialog/rename.sh - copied unchanged from r220748, vendor/dialog/dist/rename.sh head/contrib/dialog/samples/msgbox-utf8 - copied unchanged from r220748, vendor/dialog/dist/samples/msgbox-utf8 head/contrib/dialog/samples/pause-both - copied unchanged from r220748, vendor/dialog/dist/samples/pause-both head/contrib/dialog/samples/pause-extra - copied unchanged from r220748, vendor/dialog/dist/samples/pause-extra head/contrib/dialog/samples/prgbox - copied unchanged from r220748, vendor/dialog/dist/samples/prgbox head/contrib/dialog/samples/prgbox2 - copied unchanged from r220748, vendor/dialog/dist/samples/prgbox2 head/contrib/dialog/samples/programbox - copied unchanged from r220748, vendor/dialog/dist/samples/programbox head/contrib/dialog/samples/programbox2 - copied unchanged from r220748, vendor/dialog/dist/samples/programbox2 head/contrib/dialog/samples/shortlist - copied unchanged from r220748, vendor/dialog/dist/samples/shortlist head/contrib/dialog/samples/textbox-both - copied unchanged from r220748, vendor/dialog/dist/samples/textbox-both head/contrib/dialog/samples/textbox-help - copied unchanged from r220748, vendor/dialog/dist/samples/textbox-help Modified: head/contrib/dialog/CHANGES head/contrib/dialog/VERSION head/contrib/dialog/aclocal.m4 head/contrib/dialog/arrows.c head/contrib/dialog/buttons.c head/contrib/dialog/calendar.c head/contrib/dialog/checklist.c head/contrib/dialog/columns.c head/contrib/dialog/config.guess head/contrib/dialog/config.sub head/contrib/dialog/configure head/contrib/dialog/configure.in head/contrib/dialog/dialog-config.in head/contrib/dialog/dialog.1 head/contrib/dialog/dialog.3 head/contrib/dialog/dialog.c head/contrib/dialog/dialog.h head/contrib/dialog/dlg_colors.h head/contrib/dialog/fselect.c head/contrib/dialog/guage.c head/contrib/dialog/headers-sh.in head/contrib/dialog/inputstr.c head/contrib/dialog/makefile.in head/contrib/dialog/menubox.c head/contrib/dialog/mixedgauge.c head/contrib/dialog/pause.c head/contrib/dialog/po/ar.po head/contrib/dialog/po/bg.po head/contrib/dialog/po/ca.po head/contrib/dialog/po/cy.po head/contrib/dialog/po/da.po head/contrib/dialog/po/de.po head/contrib/dialog/po/dialog.pot head/contrib/dialog/po/eo.po head/contrib/dialog/po/es.po head/contrib/dialog/po/eu.po head/contrib/dialog/po/fi.po head/contrib/dialog/po/fr.po head/contrib/dialog/po/ga.po head/contrib/dialog/po/gl.po head/contrib/dialog/po/hr.po head/contrib/dialog/po/id.po head/contrib/dialog/po/is.po head/contrib/dialog/po/it.po head/contrib/dialog/po/ja.po head/contrib/dialog/po/ku.po head/contrib/dialog/po/lt.po head/contrib/dialog/po/lv.po head/contrib/dialog/po/makefile.inn head/contrib/dialog/po/ms.po head/contrib/dialog/po/nl.po head/contrib/dialog/po/pl.po head/contrib/dialog/po/pt_BR.po head/contrib/dialog/po/ru.po head/contrib/dialog/po/sq.po head/contrib/dialog/po/sv.po head/contrib/dialog/po/sw.po head/contrib/dialog/po/th.po head/contrib/dialog/po/zh_CN.po head/contrib/dialog/po/zh_TW.po head/contrib/dialog/progressbox.c head/contrib/dialog/samples/debian.rc head/contrib/dialog/samples/infobox5 head/contrib/dialog/samples/infobox6 head/contrib/dialog/samples/setup-vars head/contrib/dialog/samples/slackware.rc head/contrib/dialog/samples/sourcemage.rc head/contrib/dialog/samples/suse.rc head/contrib/dialog/samples/whiptail.rc head/contrib/dialog/tailbox.c head/contrib/dialog/textbox.c head/contrib/dialog/timebox.c head/contrib/dialog/trace.c head/contrib/dialog/ui_getc.c head/contrib/dialog/util.c head/gnu/lib/libdialog/Makefile Directory Properties: head/contrib/dialog/ (props changed) Modified: head/contrib/dialog/CHANGES ============================================================================== --- head/contrib/dialog/CHANGES Sun Apr 17 17:01:44 2011 (r220748) +++ head/contrib/dialog/CHANGES Sun Apr 17 17:28:17 2011 (r220749) @@ -1,9 +1,77 @@ --- $Id: CHANGES,v 1.300 2010/04/28 21:27:22 tom Exp $ +-- $Id: CHANGES,v 1.333 2011/03/02 10:06:37 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2011/03/02 + + add --prgbox and --programbox (adapted from patch by David Boyd). + + add sl.po from + http://translationproject.org/latest/dialog/ + + fix timeouts from 2011/01/18, which were being interpreted as + milliseconds rather than seconds (report by Luis Moreira). + +2011/01/18 + + fix inconsistency in return-codes for textbox when help-button is + used by making dlg_exit_buttoncode() a wrapper for + dlg_ok_buttoncode(). + + modify pause widget to use dlg_ok_buttoncode(), so help-button works. + + correct two infobox sample scripts, which did not pass extra + command-line parameters due to quoting problems. + + add a limit-check to the timebox widget (patch by Garrett Cooper). + + modify --trace option to also trace the command-line parameters. + + account for combining characters when wrapping text (Debian #570634). + + correct handling of SIGWINCH in gauge widget (Debian #305705). + + add gauge_color, to make guage's progress-bar distinct from + title_color (request by Dominic Derdau). + + update fi.po from + http://translationproject.org/latest/dialog/ + as well as resync line-numbers in the other po-files. + + modify configure script and dialog program to build with NetBSD's + wide-character curses functions, including workarounds for its + incorrect WACS_xxx definitions. Some of the UTF-8 examples work. + + add back-tab for traversal of tailboxbg widgets, for symmetry with + tab-traversal. + + reduce flicker in tailboxbg by checking if the input file size has + changed. + + modify internals of callbacks to avoid blocking reads of their + associated files by keyboard input. + + add command-line option --no-mouse, to suppress use of mouse. + + add configure option --enable-header-subdir to allow the header files + to be installed into a subdirectory named for the package. + + modify dlg_restore_vars() to retain the updated values of + input_result and input_length, eliminating the need for a caller to + provide their own user buffer (prompted by report by Thiago Bimbatti + Felicio). + + add a null-pointer check in show_result() for + dialog_vars.input_result, and ensure it is set to null after freeing + (prompted by report by Thiago Bimbatti Felicio). + + change order of -I options in CPPFLAGS (report by Michel Feldheim) + + modify pause-widget so that it no longer exits when an unrecognized + key is pressed (patch by Creidieki M Crouch). + + add --with-package option to configure script to allow renaming + of the dialog program and library, to support the package scripts. + + add Debian and RPM package scripts for test-builds. + + several improvements to configure script: + + quote params of ifelse() + + change obsolete ${name-value} to standard ${name:-value} + + use new macros CF_ADD_LIB/CF_ADD_LIBS to enforce consistency. + + AM_GNU_GETTEXT, drop $MKINSTALLDIRS, use "mkdir -p" consistently. + + CF_ADD_SUBDIR_PATH, workaround - if $prefix was not mkdir'd yet, no + directories were added. + + CF_BUNDLED_INTL, add --with-textdomain option, to use with lynx-dev + package + + CF_FIND_LINKAGE, simplify save/restore of $LIBS + + CF_GCC_WARNINGS, fix for Mac OS X (compiler makes conftest.dSYM + directory) + + CF_HEADER_PATH, don't search for variations of everything in the + current include-path + + CF_WITH_CURSES_DIR, move the calls to CF_ADD_INCDIR and + CF_ADD_LIBDIR for the curses-directory here, from + CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even + with the default checking, e.g., no --with-ncurses, etc. + + updated config.guess, config.sub + 2010/04/28 + several improvements to configure script: + modify CF_CURSES_TERM_H to handle cases such as cygwin where @@ -278,7 +346,7 @@ to it: + make --program-prefix, etc., work in configure script, e.g., to make program install as "cdialog". This does not alter the library name. + add install-bin, install-man (and uninstall) rules to makefile. - + updates for configure script macros (originally vile, lynx, xterm): + + updates for configure script macros (originally vile, lynx, xterm): AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, CF_CURSES_CPPFLAGS, CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, @@ -407,7 +475,7 @@ to it: + fix marker in textbox.c to make it disappear at the top of the file (report by Patrick J. Volkerding). + fix marker shown in arrows.c for checklists, etc., which was "(+)" - where it should have been "(-)" (report/patch by Patrick J. + where it should have been "(-)" (report/patch by Patrick J. Volkerding). + fix --input-fd (changes in glibc since 2003 made dialog hang on exit due to the way dialog updated stdin). Modified: head/contrib/dialog/VERSION ============================================================================== --- head/contrib/dialog/VERSION Sun Apr 17 17:01:44 2011 (r220748) +++ head/contrib/dialog/VERSION Sun Apr 17 17:28:17 2011 (r220749) @@ -1 +1 @@ -7:1:0 1.1 20100428 +9:0:0 1.1 20110302 Modified: head/contrib/dialog/aclocal.m4 ============================================================================== --- head/contrib/dialog/aclocal.m4 Sun Apr 17 17:01:44 2011 (r220748) +++ head/contrib/dialog/aclocal.m4 Sun Apr 17 17:28:17 2011 (r220749) @@ -1,13 +1,37 @@ dnl macros used for DIALOG configure script -dnl Copyright 1999-2009,2010 -- Thomas E. Dickey +dnl $Id: aclocal.m4,v 1.80 2011/01/18 23:17:01 tom Exp $ +dnl --------------------------------------------------------------------------- +dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the +dnl "Software"), to deal in the Software without restriction, including +dnl without limitation the rights to use, copy, modify, merge, publish, +dnl distribute, distribute with modifications, sublicense, and/or sell +dnl copies of the Software, and to permit persons to whom the Software is +dnl furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name(s) of the above copyright +dnl holders shall not be used in advertising or otherwise to promote the +dnl sale, use or other dealings in this Software without prior written +dnl authorization. dnl dnl see dnl http://invisible-island.net/autoconf/ -dnl -dnl $Id: aclocal.m4,v 1.75 2010/04/28 20:36:28 tom Exp $ dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_GNU_GETTEXT version: 11 updated: 2004/01/26 20:58:40 +dnl AM_GNU_GETTEXT version: 12 updated: 2010/06/19 07:02:11 dnl -------------- dnl Usage: Just like AM_WITH_NLS, which see. AC_DEFUN([AM_GNU_GETTEXT], @@ -68,25 +92,6 @@ strdup strtoul tsearch __argz_count __ar fi fi - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but ($top_srcdir). - dnl Try to locate it. - dnl changed mkinstalldirs to mkdirs.sh for Lynx /je spath 1998-Aug-21 - dnl added check for separate locations of scripts -mirabile 2004-Jan-18 - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh" - fi - if test -n "$GNUSYSTEM_AUX_DIR" ; then - if test -e "${GNUSYSTEM_AUX_DIR}/mkinstalldirs"; then - MKINSTALLDIRS="${GNUSYSTEM_AUX_DIR}/mkinstalldirs" - fi - fi - AC_SUBST(MKINSTALLDIRS) - dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) @@ -277,7 +282,7 @@ fi AC_SUBST($1)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl AM_WITH_NLS version: 23 updated: 2009/01/11 19:52:42 +dnl AM_WITH_NLS version: 24 updated: 2010/06/20 09:24:28 dnl ----------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -369,7 +374,7 @@ AC_DEFUN([AM_WITH_NLS], CATOBJEXT=NONE cf_save_LIBS_1="$LIBS" - LIBS="$LIBICONV $LIBS" + CF_ADD_LIBS($LIBICONV) AC_CACHE_CHECK([for libintl.h and gettext()], cf_cv_func_gettext,[ CF_FIND_LINKAGE(CF__INTL_HEAD, CF__INTL_BODY, @@ -597,7 +602,7 @@ define(CF_AC_PREREQ, AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 9 updated: 2010/01/09 11:05:50 +dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -667,17 +672,17 @@ esac done if test -n "$cf_new_cflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) CFLAGS="$CFLAGS $cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) CPPFLAGS="$CPPFLAGS $cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then - ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) + ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi @@ -685,7 +690,7 @@ AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_INCDIR version: 12 updated: 2009/01/18 10:00:47 +dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57 dnl ------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's dnl redundant. We don't normally need to add -I/usr/local/include for gcc, @@ -728,7 +733,7 @@ if test -n "$1" ; then if test "$cf_have_incdir" = no ; then CF_VERBOSE(adding $cf_add_incdir to include-path) - ifelse($2,,CPPFLAGS,$2)="$ifelse($2,,CPPFLAGS,$2) -I$cf_add_incdir" + ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir" cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break @@ -742,7 +747,15 @@ if test -n "$1" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_LIBDIR version: 8 updated: 2009/01/18 10:01:08 +dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05 +dnl ---------- +dnl Add a library, used to enforce consistency. +dnl +dnl $1 = library to add, without the "-l" +dnl $2 = variable to update (default $LIBS) +AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIBDIR version: 9 updated: 2010/05/26 16:44:57 dnl ------------- dnl Adds to the library-path dnl @@ -771,13 +784,21 @@ if test -n "$1" ; then fi if test "$cf_have_libdir" = no ; then CF_VERBOSE(adding $cf_add_libdir to library-path) - ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,$2)" + ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])" fi fi done fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05 +dnl ----------- +dnl Add one or more libraries, used to enforce consistency. +dnl +dnl $1 = libraries to add, with the "-l", etc. +dnl $2 = variable to update (default $LIBS) +AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl +dnl --------------------------------------------------------------------------- dnl CF_ADD_OPTIONAL_PATH version: 1 updated: 2007/07/29 12:33:33 dnl -------------------- dnl Add an optional search-path to the compile/link variables. @@ -827,7 +848,7 @@ $2]) done ]) dnl --------------------------------------------------------------------------- -dnl CF_ADD_SUBDIR_PATH version: 2 updated: 2007/07/29 10:12:59 +dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12 dnl ------------------ dnl Append to a search-list for a nonstandard header/lib-file dnl $1 = the variable to return as result @@ -839,7 +860,7 @@ AC_DEFUN([CF_ADD_SUBDIR_PATH], [ test "$4" != "$5" && \ test -d "$4" && \ -ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) { +ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { test -n "$verbose" && echo " ... testing for $3-directories under $4" test -d $4/$3 && $1="[$]$1 $4/$3" test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2" @@ -883,7 +904,7 @@ ifelse($5,,[ :],$5) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41 +dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42 dnl ------------- dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus dnl values. @@ -895,18 +916,18 @@ dnl $3 = action to perform if option is dnl $4 = action if perform if option is default dnl $5 = default option value (either 'yes' or 'no') AC_DEFUN([CF_ARG_OPTION], -[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes) +[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) if test "$enableval" != "$5" ; then -ifelse($3,,[ :]dnl -,[ $3]) ifelse($4,,,[ +ifelse([$3],,[ :]dnl +,[ $3]) ifelse([$4],,,[ else $4]) - fi],[enableval=$5 ifelse($4,,,[ + fi],[enableval=$5 ifelse([$4],,,[ $4 ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUNDLED_INTL version: 14 updated: 2010/01/17 20:37:27 +dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05 dnl --------------- dnl Top-level macro for configuring an application with a bundled copy of dnl the intl and po directories for gettext. @@ -920,12 +941,15 @@ dnl GT_NO - "#" comment if buildi dnl INTLDIR_MAKE - to make ./intl directory dnl MSG_DIR_MAKE - to make ./po directory dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories -dnl Defines +dnl +dnl Defines: dnl HAVE_LIBGETTEXT_H if we're using ./intl +dnl NLS_TEXTDOMAIN dnl dnl Environment: dnl ALL_LINGUAS if set, lists the root names of the ".po" files. dnl CONFIG_H assumed to be "config.h" +dnl PACKAGE must be set, used as default for textdomain dnl VERSION may be set, otherwise extract from "VERSION" file. dnl AC_DEFUN([CF_BUNDLED_INTL],[ @@ -937,9 +961,13 @@ dnl rather than $LC_ALL test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'` # Allow override of "config.h" definition: -: ${CONFIG_H=config.h} +: ${CONFIG_H:=config.h} AC_SUBST(CONFIG_H) +if test -z "$PACKAGE" ; then + AC_MSG_ERROR([[CF_BUNDLED_INTL] used without setting [PACKAGE] variable]) +fi + if test -z "$VERSION" ; then if test -f $srcdir/VERSION ; then VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1` @@ -951,6 +979,15 @@ AC_SUBST(VERSION) AM_GNU_GETTEXT(,,,[$2]) +if test "$USE_NLS" = yes ; then + AC_ARG_WITH(textdomain, + [ --with-textdomain=PKG NLS text-domain (default is package name)], + [NLS_TEXTDOMAIN=$withval], + [NLS_TEXTDOMAIN=$PACKAGE]) + AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN") + AC_SUBST(NLS_TEXTDOMAIN) +fi + INTLDIR_MAKE= MSG_DIR_MAKE= SUB_MAKEFILE= @@ -1055,21 +1092,21 @@ if test ".$system_name" != ".$cf_cv_syst fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57 +dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], [ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo], [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test $cf_cv_chtype_decl = yes ; then AC_DEFINE(HAVE_TYPE_CHTYPE) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; long x = foo], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) @@ -1116,7 +1153,7 @@ CF_CURSES_HEADER CF_TERM_HEADER ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_FUNCS version: 14 updated: 2009/07/16 19:34:55 +dnl CF_CURSES_FUNCS version: 15 updated: 2010/10/23 15:52:32 dnl --------------- dnl Curses-functions are a little complicated, since a lot of them are macros. AC_DEFUN([CF_CURSES_FUNCS], @@ -1136,7 +1173,7 @@ do [ #ifndef ${cf_func} long foo = (long)(&${cf_func}); -${cf_cv_main_return-return}(foo == 0); +${cf_cv_main_return:-return}(foo == 0); #endif ], [cf_result=yes], @@ -1182,7 +1219,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 29 updated: 2009/01/06 19:34:57 +dnl CF_CURSES_LIBS version: 32 updated: 2011/01/16 17:43:15 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1190,7 +1227,7 @@ AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) -AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], +AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto("?", 0,0)], cf_result=yes, cf_result=no) @@ -1199,27 +1236,39 @@ AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then case $host_os in #(vi freebsd*) #(vi - AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) + AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) ;; hpux10.*) #(vi AC_CHECK_LIB(cur_colr,initscr,[ - LIBS="-lcur_colr $LIBS" + CF_ADD_LIBS(-lcur_colr) ac_cv_func_initscr=yes ],[ AC_CHECK_LIB(Hcurses,initscr,[ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. - LIBS="-lHcurses $LIBS" + CF_ADD_LIBS(-lHcurses) CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" ac_cv_func_initscr=yes ])]) ;; -linux*) # Suse Linux does not follow /usr/lib convention - CF_ADD_LIBDIR(/lib) +linux*) + case `arch` in + x86_64) + if test -d /lib64 + then + CF_ADD_LIBDIR(/lib64) + else + CF_ADD_LIBDIR(/lib) + fi + ;; + *) + CF_ADD_LIBDIR(/lib) + ;; + esac ;; sunos3*|sunos4*) if test -d /usr/5lib ; then CF_ADD_LIBDIR(/usr/5lib) - LIBS="$LIBS -lcurses -ltermcap" + CF_ADD_LIBS(-lcurses -ltermcap) fi ac_cv_func_initscr=yes ;; @@ -1230,7 +1279,7 @@ if test ".$ac_cv_func_initscr" != .yes ; cf_term_lib="" cf_curs_lib="" - if test ".${cf_cv_ncurses_version-no}" != .no + if test ".${cf_cv_ncurses_version:-no}" != .no then cf_check_list="ncurses curses cursesX" else @@ -1257,7 +1306,7 @@ if test ".$ac_cv_func_initscr" != .yes ; LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=no]) @@ -1267,12 +1316,12 @@ if test ".$ac_cv_func_initscr" != .yes ; : elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto((char *)0, 0, 0);], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=error]) @@ -1284,7 +1333,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 7 updated: 2010/01/24 18:40:06 +dnl CF_CURSES_TERM_H version: 8 updated: 2010/10/23 15:54:49 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -1299,11 +1348,11 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_he # If we found , look for , but always look # for if we do not find the variant. for cf_header in \ - `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \ + `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \ term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <${cf_header}>], [WINDOW *x], [cf_cv_term_header=$cf_header @@ -1318,7 +1367,7 @@ no) for cf_header in ncurses/term.h ncursesw/term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #ifdef NCURSES_VERSION #include <${cf_header}> #else @@ -1346,6 +1395,63 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59 +dnl ------------------ +dnl Check for likely values of wacs_map[]. +AC_DEFUN([CF_CURSES_WACS_MAP], +[ +AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ + cf_cv_curses_wacs_map=unknown + for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char + do + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [void *foo = &($name['k'])], + [cf_cv_curses_wacs_map=$name + break]) + done]) + +test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59 +dnl ---------------------- +dnl Do a check to see if the WACS_xxx constants are defined compatibly with +dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx +dnl constants is broken since those constants do not point to cchar_t's. +AC_DEFUN([CF_CURSES_WACS_SYMBOLS], +[ +AC_REQUIRE([CF_CURSES_WACS_MAP]) + +AC_CACHE_CHECK(for wide alternate character constants, cf_cv_curses_wacs_symbols,[ +cf_cv_curses_wacs_symbols=no +if test "$cf_cv_curses_wacs_map" != unknown +then + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS; + $cf_cv_curses_wacs_map['k'] = *WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +else + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +fi +]) + +test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -1388,6 +1494,30 @@ AC_SUBST(SHOW_CC) AC_SUBST(ECHO_CC) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_DISABLE_LIBTOOL_VERSION version: 1 updated: 2010/05/15 15:45:59 +dnl -------------------------- +dnl Check if we should use the libtool 1.5 feature "-version-number" instead of +dnl the older "-version-info" feature. The newer feature allows us to use +dnl version numbering on shared libraries which make them compatible with +dnl various systems. +AC_DEFUN([CF_DISABLE_LIBTOOL_VERSION], +[ +AC_MSG_CHECKING(if libtool -version-number should be used) +CF_ARG_DISABLE(libtool-version, + [ --disable-libtool-version enable to use libtool's incompatible naming scheme], + [cf_libtool_version=no], + [cf_libtool_version=yes]) +AC_MSG_RESULT($cf_libtool_version) + +if test "$cf_libtool_version" = yes ; then + LIBTOOL_VERSION="-version-number" +else + LIBTOOL_VERSION="-version-info" +fi + +AC_SUBST(LIBTOOL_VERSION) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DISABLE_RPATH_HACK version: 1 updated: 2010/04/11 10:54:00 dnl --------------------- dnl The rpath-hack makes it simpler to build programs, particularly with the @@ -1489,7 +1619,7 @@ fi ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FIND_LINKAGE version: 16 updated: 2010/04/21 06:20:50 +dnl CF_FIND_LINKAGE version: 19 updated: 2010/05/29 16:31:02 dnl --------------- dnl Find a library (specifically the linkage used in the code fragment), dnl searching for it if it is not already in the library path. @@ -1518,18 +1648,23 @@ cf_cv_library_path_$3= CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)]) +cf_save_LIBS="$LIBS" + AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes + cf_cv_header_path_$3=/usr/include + cf_cv_library_path_$3=/usr/lib ],[ -cf_save_LIBS="$LIBS" LIBS="-l$3 $7 $cf_save_LIBS" AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes + cf_cv_header_path_$3=/usr/include + cf_cv_library_path_$3=/usr/lib cf_cv_library_file_$3="-l$3" ],[ - cf_cv_find_linkage_$3=no + cf_cv_find_linkage_$3=no LIBS="$cf_save_LIBS" CF_VERBOSE(find linkage for $3 library) @@ -1591,7 +1726,6 @@ AC_TRY_LINK([$1],[$2],[ ]) fi done - LIBS="$cf_save_LIBS" CPPFLAGS="$cf_save_CPPFLAGS" LDFLAGS="$cf_save_LDFLAGS" fi @@ -1602,11 +1736,13 @@ AC_TRY_LINK([$1],[$2],[ ],$7) ]) +LIBS="$cf_save_LIBS" + if test "$cf_cv_find_linkage_$3" = yes ; then ifelse([$4],,[ CF_ADD_INCDIR($cf_cv_header_path_$3) CF_ADD_LIBDIR($cf_cv_library_path_$3) - LIBS="-l$3 $LIBS" + CF_ADD_LIB($3) ],[$4]) else ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) @@ -1653,7 +1789,7 @@ if test $cf_cv_type_unionwait = yes; the fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56 +dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1680,7 +1816,7 @@ if test "$GCC" = yes then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext < conftest.$ac_ext </dev/null | sed -e 's,[[ ]]*$,,'` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[[ ]]*$,,'` case "$cf_result" in .*k) - cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` case "$cf_result" in .*CC=*) cf_cv_makeflags= ;; @@ -2259,7 +2396,7 @@ CF_EOF AC_SUBST(cf_cv_makeflags) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKE_TAGS version: 5 updated: 2010/04/03 20:07:32 +dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have dnl a monocase filesystem. @@ -2269,10 +2406,10 @@ AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) AC_CHECK_PROGS(CTAGS, exctags ctags) AC_CHECK_PROGS(ETAGS, exetags etags) -AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS-ctags}, yes, no) +AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no) if test "$cf_cv_mixedcase" = yes ; then - AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS-etags}, yes, no) + AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no) else MAKE_UPPER_TAGS=no fi @@ -2296,7 +2433,7 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MATH_LIB version: 6 updated: 2009/12/19 13:46:49 +dnl CF_MATH_LIB version: 8 updated: 2010/05/29 16:31:02 dnl ----------- dnl Checks for libraries. At least one UNIX system, Apple Macintosh dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler @@ -2309,13 +2446,13 @@ AC_CACHE_CHECK(if -lm needed for math fu #include #include ], - [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)], + [double x = rand(); printf("result = %g\n", ]ifelse([$2],,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])]) if test "$cf_cv_need_libm" = yes then ifelse($1,,[ - LIBS="-lm $LIBS" + CF_ADD_LIB(m) ],[$1=-lm]) fi ]) @@ -2386,12 +2523,12 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12 +dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ -echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC +echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_CC_CHECK version: 4 updated: 2007/07/29 10:39:05 @@ -2427,10 +2564,10 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 6 updated: 2010/04/28 06:02:16 +dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 dnl ----------------- dnl Tie together the configure-script macros for ncurses. -dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis. +dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. dnl Allow that to be overridden using the $NCURSES_CONFIG environment variable. dnl dnl $1 is the root library name (default: "ncurses") @@ -2444,7 +2581,7 @@ AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncucon if test "$NCURSES_CONFIG" != none ; then CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`" -LIBS="`$NCURSES_CONFIG --libs` $LIBS" +CF_ADD_LIBS(`$NCURSES_CONFIG --libs`) # even with config script, some packages use no-override for curses.h CF_CURSES_HEADER(ifelse($1,,ncurses,$1)) @@ -2467,7 +2604,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1)) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20 +dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38 dnl ------------------- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting dnl the CPPFLAGS variable so we can include its header. @@ -2496,7 +2633,7 @@ cf_ncuhdr_root=ifelse($1,,ncurses,$1) test -n "$cf_cv_curses_dir" && \ test "$cf_cv_curses_dir" != "no" && { \ - CF_ADD_INCDIR($cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root) + CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root) } AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ @@ -2584,7 +2721,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_LIBS version: 13 updated: 2007/07/29 10:29:20 +dnl CF_NCURSES_LIBS version: 16 updated: 2010/11/20 17:02:38 dnl --------------- dnl Look for the ncurses library. This is a little complicated on Linux, dnl because it may be linked with the gpm (general purpose mouse) library. @@ -2620,15 +2757,14 @@ freebsd*) ;; esac -LIBS="$cf_ncurses_LIBS $LIBS" +CF_ADD_LIBS($cf_ncurses_LIBS) if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) then - CF_ADD_LIBDIR($cf_cv_curses_dir/lib) - LIBS="-l$cf_nculib_root $LIBS" + CF_ADD_LIBS(-l$cf_nculib_root) else CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, - [#include <${cf_cv_ncurses_header-curses.h}>], + [#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], initscr) fi @@ -2642,7 +2778,7 @@ if test -n "$cf_ncurses_LIBS" ; then LIBS="$q" fi done - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) @@ -2653,7 +2789,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncul AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55 +dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -2666,7 +2802,7 @@ AC_CACHE_CHECK(for ncurses version, cf_c cf_tempfile=out$$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 17:30:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66EBD106564A; Sun, 17 Apr 2011 17:30: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 555C18FC15; Sun, 17 Apr 2011 17: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 p3HHUTBB044801; Sun, 17 Apr 2011 17:30:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HHUTll044799; Sun, 17 Apr 2011 17:30:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104171730.p3HHUTll044799@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Apr 2011 17: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: r220750 - head/contrib/dialog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 17:30:29 -0000 Author: nwhitehorn Date: Sun Apr 17 17:30:29 2011 New Revision: 220750 URL: http://svn.freebsd.org/changeset/base/220750 Log: Make dialog's --prgbox option actually work. Modified: head/contrib/dialog/prgbox.c Modified: head/contrib/dialog/prgbox.c ============================================================================== --- head/contrib/dialog/prgbox.c Sun Apr 17 17:28:17 2011 (r220749) +++ head/contrib/dialog/prgbox.c Sun Apr 17 17:30:29 2011 (r220750) @@ -33,8 +33,7 @@ dlg_popen(const char *command, const cha FILE *result = 0; int fd[2]; int pid; - char *blob; - char **argv; + const char *argv[4]; if ((*type == 'r' || *type != 'w') && pipe(fd) == 0) { switch (pid = fork()) { @@ -63,11 +62,11 @@ dlg_popen(const char *command, const cha * given command. Also, it needs the command to be parsed into * tokens. */ - if ((blob = malloc(4 + strlen(command))) != 0) { - sprintf(blob, "-c %s", command); - argv = dlg_string_to_argv(blob); - execvp("sh", argv); - } + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = command; + argv[3] = NULL; + execvp("sh", (char **)argv); _exit(127); /* NOTREACHED */ default: /* parent */ From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 18:56:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36691065674; Sun, 17 Apr 2011 18:56:17 +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 B85298FC0C; Sun, 17 Apr 2011 18:56: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 p3HIuHJA046816; Sun, 17 Apr 2011 18:56:17 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HIuH4Z046813; Sun, 17 Apr 2011 18:56:17 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104171856.p3HIuH4Z046813@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 18:56: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: r220751 - in head/sys/fs: nfs 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, 17 Apr 2011 18:56:18 -0000 Author: rmacklem Date: Sun Apr 17 18:56:17 2011 New Revision: 220751 URL: http://svn.freebsd.org/changeset/base/220751 Log: Fix up some of the sysctls for the experimental NFS client so that they use the same names as the regular client. Also add string descriptions for them. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun Apr 17 17:30:29 2011 (r220750) +++ head/sys/fs/nfs/nfs_commonport.c Sun Apr 17 18:56:17 2011 (r220751) @@ -70,11 +70,15 @@ static int nfs_realign_test; static int nfs_realign_count; SYSCTL_NODE(_vfs, OID_AUTO, newnfs, CTLFLAG_RW, 0, "New NFS filesystem"); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, newnfs_realign_test, CTLFLAG_RW, &nfs_realign_test, 0, ""); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, newnfs_realign_count, CTLFLAG_RW, &nfs_realign_count, 0, ""); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs4acl_enable, CTLFLAG_RW, &nfsrv_useacl, 0, ""); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, + 0, "Number of realign tests done"); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, + 0, "Number of mbuf realignments done"); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs4acl_enable, CTLFLAG_RW, &nfsrv_useacl, + 0, "Enable NFSv4 ACLs"); SYSCTL_STRING(_vfs_newnfs, OID_AUTO, callback_addr, CTLFLAG_RW, - nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), ""); + nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), + "NFSv4 callback addr for server to use"); /* * Defines for malloc Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 17:30:29 2011 (r220750) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 18:56:17 2011 (r220751) @@ -219,7 +219,7 @@ SYSCTL_INT(_vfs_newnfs, OID_AUTO, clean_ &nfs_clean_pages_on_close, 0, "NFS clean dirty pages on close"); int newnfs_directio_enable = 0; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_enable, CTLFLAG_RW, +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); /* @@ -234,7 +234,7 @@ SYSCTL_INT(_vfs_newnfs, OID_AUTO, direct * meaningful. */ int newnfs_directio_allow_mmap = 1; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_allow_mmap, CTLFLAG_RW, +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_directio_allow_mmap, CTLFLAG_RW, &newnfs_directio_allow_mmap, 0, "Enable mmaped IO on file with O_DIRECT opens"); #if 0 From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 20:01:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50886106566B; Sun, 17 Apr 2011 20:01:33 +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 418E38FC13; Sun, 17 Apr 2011 20:01: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 p3HK1Xj1048135; Sun, 17 Apr 2011 20:01:33 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HK1XT1048133; Sun, 17 Apr 2011 20:01:33 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104172001.p3HK1XT1048133@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 20:01: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: r220752 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 20:01:33 -0000 Author: rmacklem Date: Sun Apr 17 20:01:32 2011 New Revision: 220752 URL: http://svn.freebsd.org/changeset/base/220752 Log: Get rid of the "nfscl: consider increasing kern.ipc.maxsockbuf" message that was generated when doing experimental NFS client mounts. I put that message in because the krpc would hang with the default size for mounts that used large rsize/wsize values. Since the bug that caused these hangs was fixed by r213756, I think the message is no longer needed. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Sun Apr 17 18:56:17 2011 (r220751) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sun Apr 17 20:01:32 2011 (r220752) @@ -143,7 +143,7 @@ newnfs_connect(struct nfsmount *nmp, str CLIENT *client; struct netconfig *nconf; struct socket *so; - int one = 1, retries, error, printsbmax = 0; + int one = 1, retries, error; struct thread *td = curthread; /* @@ -202,13 +202,8 @@ newnfs_connect(struct nfsmount *nmp, str return (error); } do { - if (error != 0 && pktscale > 2) { + if (error != 0 && pktscale > 2) pktscale--; - if (printsbmax == 0) { - printf("nfscl: consider increasing kern.ipc.maxsockbuf\n"); - printsbmax = 1; - } - } if (nrp->nr_sotype == SOCK_DGRAM) { if (nmp != NULL) { sndreserve = (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 20:42:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF27C1065672; Sun, 17 Apr 2011 20:42:40 +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 AFD608FC0A; Sun, 17 Apr 2011 20:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3HKgecG049043; Sun, 17 Apr 2011 20:42:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HKgems049041; Sun, 17 Apr 2011 20:42:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104172042.p3HKgems049041@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 17 Apr 2011 20:42: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: r220753 - head/usr.sbin/bsdinstall/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: Sun, 17 Apr 2011 20:42:40 -0000 Author: nwhitehorn Date: Sun Apr 17 20:42:40 2011 New Revision: 220753 URL: http://svn.freebsd.org/changeset/base/220753 Log: Update to reflect net install changes. Modified: head/usr.sbin/bsdinstall/scripts/jail Modified: head/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- head/usr.sbin/bsdinstall/scripts/jail Sun Apr 17 20:01:32 2011 (r220752) +++ head/usr.sbin/bsdinstall/scripts/jail Sun Apr 17 20:42:40 2011 (r220753) @@ -27,28 +27,51 @@ # $FreeBSD$ echo "Begun Installation at $(date)" > $BSDINSTALL_LOG - export BSDINSTALL_CHROOT=$1 -export DISTRIBUTIONS="kernel.txz base.txz doc.txz games.txz" -[ `uname -p` = amd64 -o `uname -p` = powerpc64 ] && export DISTRIBUTIONS="$DISTRIBUTIONS lib32.txz" error() { dialog --backtitle "FreeBSD Installer" --title "Abort" \ --no-label "Exit" --yes-label "Restart" --yesno \ - "You have canceled an installation step. Would you like to restart the installation or exit the installer?" 0 0 + "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 if [ $? -ne 0 ]; then exit else - test -f $PATH_FSTAB && bsdinstall umount - exec $0 + exec $0 $BSDINSTALL_CHROOT fi } rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +mkdir -p $1 || error + +test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR -trap error SIGINT # SIGINT is bad +if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then + exec 3>&1 + BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + MIRROR_BUTTON=$? + exec 3>&- + test $MIRROR_BUTTON -eq 0 || error + export BSDINSTALL_DISTSITE + fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error +fi + +export DISTRIBUTIONS="base.txz" +if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then + DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` + + exec 3>&1 + EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \ + --backtitle "FreeBSD Installer" \ + --title "Distribution Select" --nocancel --separate-output \ + --checklist "Choose optional system components to install:" \ + 0 0 0 \ + 2>&1 1>&3) + for dist in $EXTRA_DISTS; do + export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" + done +fi FETCH_DISTRIBUTIONS="" for dist in $DISTRIBUTIONS; do @@ -56,19 +79,26 @@ for dist in $DISTRIBUTIONS; do FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist" fi done +FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space + +if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then + exec 3>&1 + BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + MIRROR_BUTTON=$? + exec 3>&- + test $MIRROR_BUTTON -eq 0 || error + export BSDINSTALL_DISTSITE +fi -if [ ! -z $FETCH_DISTRIBUTIONS ]; then - ALL_DISTRIBUTIONS=$DISTRIBUTIONS - DISTRIBUTIONS=$FETCH_DISTRIBUTIONS +if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then bsdinstall distfetch || error - DISTRIBUTIONS=$ALL_DISTRIBUTIONS fi +bsdinstall checksum || error bsdinstall distextract || error bsdinstall rootpass || error trap true SIGINT # This section is optional -bsdinstall time bsdinstall services dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ @@ -77,6 +107,8 @@ dialog --backtitle "FreeBSD Installer" - trap error SIGINT # SIGINT is bad again bsdinstall config || error +cp /etc/resolv.conf $1/etc +cp /etc/localtime $1/etc echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 20:44:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926FD1065672; Sun, 17 Apr 2011 20:44:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D9C8FC16; Sun, 17 Apr 2011 20:44: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 p3HKi2Ek049123; Sun, 17 Apr 2011 20:44:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HKi2qk049121; Sun, 17 Apr 2011 20:44:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201104172044.p3HKi2qk049121@svn.freebsd.org> From: Dimitry Andric Date: Sun, 17 Apr 2011 20:44: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: r220754 - head/contrib/llvm/tools/clang/lib/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 20:44:02 -0000 Author: dim Date: Sun Apr 17 20:44:02 2011 New Revision: 220754 URL: http://svn.freebsd.org/changeset/base/220754 Log: For clang, make -mno-mmx imply -mno-3dnow. This is what gcc does. Submitted by: arundel Obtained from: http://llvm.org/viewvc/llvm-project?view=rev&revision=129665 Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Apr 17 20:42:40 2011 (r220753) +++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Sun Apr 17 20:44:02 2011 (r220754) @@ -1133,7 +1133,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["avx"] = true; } else { if (Name == "mmx") - Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = + Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = + Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = false; else if (Name == "sse") Features["sse"] = Features["sse2"] = Features["sse3"] = @@ -1146,12 +1147,10 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["sse42"] = false; else if (Name == "ssse3") Features["ssse3"] = Features["sse41"] = Features["sse42"] = false; - else if (Name == "sse4") + else if (Name == "sse4" || Name == "sse4.1") Features["sse41"] = Features["sse42"] = false; else if (Name == "sse4.2") Features["sse42"] = false; - else if (Name == "sse4.1") - Features["sse41"] = Features["sse42"] = false; else if (Name == "3dnow") Features["3dnow"] = Features["3dnowa"] = false; else if (Name == "3dnowa") From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 21:03:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E4C106566B; Sun, 17 Apr 2011 21:03:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 122108FC16; Sun, 17 Apr 2011 21:03: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 p3HL3Nup049577; Sun, 17 Apr 2011 21:03:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HL3Ntb049564; Sun, 17 Apr 2011 21:03:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201104172103.p3HL3Ntb049564@svn.freebsd.org> From: Dimitry Andric Date: Sun, 17 Apr 2011 21:03: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: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 21:03:24 -0000 Author: dim Date: Sun Apr 17 21:03:23 2011 New Revision: 220755 URL: http://svn.freebsd.org/changeset/base/220755 Log: Remove libobjc and other Objective-C related components, as these are extremely outdated, and not used by anything in the base system. Silence from: current@ Deleted: head/contrib/gcc/doc/objc.texi head/contrib/gcc/objc/ head/contrib/libobjc/ head/gnu/lib/libobjc/ head/gnu/usr.bin/cc/cc1obj/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/gcc/doc/cpp.1 head/contrib/gcc/doc/cpp.texi head/contrib/gcc/doc/cppenv.texi head/contrib/gcc/doc/cppinternals.texi head/contrib/gcc/doc/cppopts.texi head/contrib/gcc/doc/extend.texi head/contrib/gcc/doc/frontends.texi head/contrib/gcc/doc/gcc.1 head/contrib/gcc/doc/gcc.texi head/contrib/gcc/doc/invoke.texi head/contrib/gcc/doc/sourcebuild.texi head/contrib/gcc/doc/standards.texi head/contrib/gcc/doc/tm.texi head/etc/mtree/BSD.include.dist head/gnu/lib/Makefile head/gnu/usr.bin/cc/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile head/gnu/usr.bin/cc/doc/Makefile head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.libnames.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Apr 17 20:44:02 2011 (r220754) +++ head/Makefile.inc1 Sun Apr 17 21:03:23 2011 (r220755) @@ -306,7 +306,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR PATH=${TMPPATH} \ CC="${CC} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \ - OBJC="${OBJC} ${LIB32FLAGS}" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Apr 17 20:44:02 2011 (r220754) +++ head/ObsoleteFiles.inc Sun Apr 17 21:03:23 2011 (r220755) @@ -38,6 +38,26 @@ # xargs -n1 | sort | uniq -d; # done +# 20110417: removal of Objective-C support +OLD_FILES+=usr/include/objc/encoding.h +OLD_FILES+=usr/include/objc/hash.h +OLD_FILES+=usr/include/objc/NXConstStr.h +OLD_FILES+=usr/include/objc/objc-api.h +OLD_FILES+=usr/include/objc/objc-decls.h +OLD_FILES+=usr/include/objc/objc-list.h +OLD_FILES+=usr/include/objc/objc.h +OLD_FILES+=usr/include/objc/Object.h +OLD_FILES+=usr/include/objc/Protocol.h +OLD_FILES+=usr/include/objc/runtime.h +OLD_FILES+=usr/include/objc/sarray.h +OLD_FILES+=usr/include/objc/thr.h +OLD_FILES+=usr/include/objc/typedstream.h +OLD_FILES+=usr/lib/libobjc.a +OLD_FILES+=usr/lib/libobjc.so +OLD_FILES+=usr/lib/libobjc_p.a +OLD_FILES+=usr/libexec/cc1obj +OLD_LIBS+=usr/lib/libobjc.so.4 +OLD_DIRS+=usr/include/objc # 20110224: sticky.8 -> sticky.7 OLD_FILES+=usr/share/man/man8/sticky.8.gz # 20110220: new clang import which bumps version from 2.8 to 2.9 Modified: head/contrib/gcc/doc/cpp.1 ============================================================================== --- head/contrib/gcc/doc/cpp.1 Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/cpp.1 Sun Apr 17 21:03:23 2011 (r220755) @@ -153,14 +153,14 @@ before compilation. It is called a macr you to define \fImacros\fR, which are brief abbreviations for longer constructs. .PP -The C preprocessor is intended to be used only with C, \*(C+, and -Objective-C source code. In the past, it has been abused as a general -text processor. It will choke on input which does not obey C's lexical -rules. For example, apostrophes will be interpreted as the beginning of -character constants, and cause errors. Also, you cannot rely on it -preserving characteristics of the input which are not significant to -C\-family languages. If a Makefile is preprocessed, all the hard tabs -will be removed, and the Makefile will not work. +The C preprocessor is intended to be used only with C and \*(C+ source +code. In the past, it has been abused as a general text processor. It +will choke on input which does not obey C's lexical rules. For +example, apostrophes will be interpreted as the beginning of character +constants, and cause errors. Also, you cannot rely on it preserving +characteristics of the input which are not significant to C\-family +languages. If a Makefile is preprocessed, all the hard tabs will be +removed, and the Makefile will not work. .PP Having said that, you can often get away with using cpp on things which are not C. Other Algol-ish programming languages are often safe @@ -482,19 +482,16 @@ header files. .PD 0 .IP "\fB\-x c++\fR" 4 .IX Item "-x c++" -.IP "\fB\-x objective-c\fR" 4 -.IX Item "-x objective-c" .IP "\fB\-x assembler-with-cpp\fR" 4 .IX Item "-x assembler-with-cpp" .PD -Specify the source language: C, \*(C+, Objective\-C, or assembly. This has -nothing to do with standards conformance or extensions; it merely -selects which base syntax to expect. If you give none of these options, -cpp will deduce the language from the extension of the source file: -\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common -extensions for \*(C+ and assembly are also recognized. If cpp does not -recognize the extension, it will treat the file as C; this is the most -generic mode. +Specify the source language: C, \*(C+, or assembly. This has nothing +to do with standards conformance or extensions; it merely selects which +base syntax to expect. If you give none of these options, cpp will +deduce the language from the extension of the source file: \&\fB.c\fR, +\fB.cc\fR, or \fB.S\fR. Some other common extensions for \*(C+ and +assembly are also recognized. If cpp does not recognize the extension, +it will treat the file as C; this is the most generic mode. .Sp \&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option which selected both the language and the standards conformance level. @@ -854,8 +851,6 @@ configuration of \s-1GCC\s0. .IX Item "C_INCLUDE_PATH" .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 .IX Item "CPLUS_INCLUDE_PATH" -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 -.IX Item "OBJC_INCLUDE_PATH" .PD Each variable's value is a list of directories separated by a special character, much like \fB\s-1PATH\s0\fR, in which to look for header files. Modified: head/contrib/gcc/doc/cpp.texi ============================================================================== --- head/contrib/gcc/doc/cpp.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/cpp.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -72,9 +72,9 @@ This manual contains no Invariant Sectio @ifnottex @node Top @top -The C preprocessor implements the macro language used to transform C, -C++, and Objective-C programs before they are compiled. It can also be -useful on its own. +The C preprocessor implements the macro language used to transform C +and C++ programs before they are compiled. It can also be useful on +its own. @menu * Overview:: @@ -186,14 +186,14 @@ before compilation. It is called a macr you to define @dfn{macros}, which are brief abbreviations for longer constructs. -The C preprocessor is intended to be used only with C, C++, and -Objective-C source code. In the past, it has been abused as a general -text processor. It will choke on input which does not obey C's lexical -rules. For example, apostrophes will be interpreted as the beginning of -character constants, and cause errors. Also, you cannot rely on it -preserving characteristics of the input which are not significant to -C-family languages. If a Makefile is preprocessed, all the hard tabs -will be removed, and the Makefile will not work. +The C preprocessor is intended to be used only with C and C++ source +code. In the past, it has been abused as a general text processor. It +will choke on input which does not obey C's lexical rules. For +example, apostrophes will be interpreted as the beginning of character +constants, and cause errors. Also, you cannot rely on it preserving +characteristics of the input which are not significant to C-family +languages. If a Makefile is preprocessed, all the hard tabs will be +removed, and the Makefile will not work. Having said that, you can often get away with using cpp on things which are not C@. Other Algol-ish programming languages are often safe @@ -1878,7 +1878,7 @@ the 1999 revision of the C standard. Su not yet complete. This macro is not defined if the @option{-traditional-cpp} option is -used, nor when compiling C++ or Objective-C@. +used, nor when compiling C++. @item __STDC_HOSTED__ This macro is defined, with value 1, if the compiler's target is a @@ -1895,11 +1895,6 @@ GNU C++ compiler is not yet fully confor instead. It is hoped to complete the implementation of standard C++ in the near future. -@item __OBJC__ -This macro is defined, with value 1, when the Objective-C compiler is in -use. You can use @code{__OBJC__} to test whether a header is compiled -by a C compiler or a Objective-C compiler. - @item __ASSEMBLER__ This macro is defined with value 1 when preprocessing assembly language. @@ -1921,9 +1916,9 @@ underscores. @itemx __GNUC_MINOR__ @itemx __GNUC_PATCHLEVEL__ These macros are defined by all GNU compilers that use the C -preprocessor: C, C++, and Objective-C@. Their values are the major -version, minor version, and patch level of the compiler, as integer -constants. For example, GCC 3.2.1 will define @code{__GNUC__} to 3, +preprocessor: C and C++. Their values are the major version, minor +version, and patch level of the compiler, as integer constants. For +example, GCC 3.2.1 will define @code{__GNUC__} to 3, @code{__GNUC_MINOR__} to 2, and @code{__GNUC_PATCHLEVEL__} to 1. These macros are also defined if you invoke the preprocessor directly. @@ -2125,12 +2120,6 @@ general, user code should not need to ma purpose of this macro is to ease implementation of the C++ runtime library provided with G++. -@item __NEXT_RUNTIME__ -This macro is defined, with value 1, if (and only if) the NeXT runtime -(as in @option{-fnext-runtime}) is in use for Objective-C@. If the GNU -runtime is used, this macro is not defined, so that you can use this -macro to determine which runtime (NeXT or GNU) is being used. - @item __LP64__ @itemx _LP64 These macros are defined, with value 1, if (and only if) the compilation @@ -3433,11 +3422,10 @@ produce no output, rather than a line of @node Preprocessor Output @chapter Preprocessor Output -When the C preprocessor is used with the C, C++, or Objective-C -compilers, it is integrated into the compiler and communicates a stream -of binary tokens directly to the compiler's parser. However, it can -also be used in the more conventional standalone mode, where it produces -textual output. +When the C preprocessor is used with the C or C++ compilers, it is +integrated into the compiler and communicates a stream of binary tokens +directly to the compiler's parser. However, it can also be used in the +more conventional standalone mode, where it produces textual output. @c FIXME: Document the library interface. @cindex output format @@ -4053,33 +4041,13 @@ You can also make or cancel assertions u @node Obsolete once-only headers @subsection Obsolete once-only headers -CPP supports two more ways of indicating that a header file should be -read only once. Neither one is as portable as a wrapper @samp{#ifndef}, -and we recommend you do not use them in new programs. - -@findex #import -In the Objective-C language, there is a variant of @samp{#include} -called @samp{#import} which includes a file, but does so at most once. -If you use @samp{#import} instead of @samp{#include}, then you don't -need the conditionals inside the header file to prevent multiple -inclusion of the contents. GCC permits the use of @samp{#import} in C -and C++ as well as Objective-C@. However, it is not in standard C or C++ -and should therefore not be used by portable programs. - -@samp{#import} is not a well designed feature. It requires the users of -a header file to know that it should only be included once. It is much -better for the header file's implementor to write the file so that users -don't need to know this. Using a wrapper @samp{#ifndef} accomplishes -this goal. - -In the present implementation, a single use of @samp{#import} will -prevent the file from ever being read again, by either @samp{#import} or -@samp{#include}. You should not rely on this; do not use both -@samp{#import} and @samp{#include} to refer to the same header file. - -Another way to prevent a header file from being included more than once -is with the @samp{#pragma once} directive. If @samp{#pragma once} is -seen when scanning a header file, that file will never be read again, no +CPP supports one more way of indicating that a header file should be +read only once. This is not as portable as a wrapper @samp{#ifndef}, +and we recommend you do not use it in new programs. + +A way to prevent a header file from being included more than once is +with the @samp{#pragma once} directive. If @samp{#pragma once} is seen +when scanning a header file, that file will never be read again, no matter what. @samp{#pragma once} does not have the problems that @samp{#import} does, Modified: head/contrib/gcc/doc/cppenv.texi ============================================================================== --- head/contrib/gcc/doc/cppenv.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/cppenv.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -14,9 +14,6 @@ @item CPATH @itemx C_INCLUDE_PATH @itemx CPLUS_INCLUDE_PATH -@itemx OBJC_INCLUDE_PATH -@c Commented out until ObjC++ is part of GCC: -@c @itemx OBJCPLUS_INCLUDE_PATH Each variable's value is a list of directories separated by a special character, much like @env{PATH}, in which to look for header files. The special character, @code{PATH_SEPARATOR}, is target-dependent and Modified: head/contrib/gcc/doc/cppinternals.texi ============================================================================== --- head/contrib/gcc/doc/cppinternals.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/cppinternals.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -72,10 +72,10 @@ into another language, under the above c The GNU C preprocessor is implemented as a library, @dfn{cpplib}, so it can be easily shared between -a stand-alone preprocessor, and a preprocessor integrated with the C, -C++ and Objective-C front ends. It is also available for use by other -programs, though this is not recommended as its exposed interface has -not yet reached a point of reasonable stability. +a stand-alone preprocessor, and a preprocessor integrated with the C +and C++ front ends. It is also available for use by other programs, +though this is not recommended as its exposed interface has not yet +reached a point of reasonable stability. The library has been written to be re-entrant, so that it can be used to preprocess many files simultaneously if necessary. It has also been @@ -91,7 +91,7 @@ the way they have. @menu * Conventions:: Conventions used in the code. -* Lexer:: The combined C, C++ and Objective-C Lexer. +* Lexer:: The combined C and C++ Lexer. * Hash Nodes:: All identifiers are entered into a hash table. * Macro Expansion:: Macro expansion algorithm. * Token Spacing:: Spacing and paste avoidance issues. @@ -131,12 +131,12 @@ behavior. @section Overview The lexer is contained in the file @file{lex.c}. It is a hand-coded -lexer, and not implemented as a state machine. It can understand C, C++ -and Objective-C source code, and has been extended to allow reasonably -successful preprocessing of assembly language. The lexer does not make -an initial pass to strip out trigraphs and escaped newlines, but handles -them as they are encountered in a single pass of the input file. It -returns preprocessing tokens individually, not a line at a time. +lexer, and not implemented as a state machine. It can understand C and +C++ source code, and has been extended to allow reasonably successful +preprocessing of assembly language. The lexer does not make an initial +pass to strip out trigraphs and escaped newlines, but handles them as +they are encountered in a single pass of the input file. It returns +preprocessing tokens individually, not a line at a time. It is mostly transparent to users of the library, since the library's interface for obtaining the next token, @code{cpp_get_token}, takes care @@ -303,9 +303,9 @@ don't allow the terminators of header na @samp{"} or @samp{>} terminates the header name. Interpretation of some character sequences depends upon whether we are -lexing C, C++ or Objective-C, and on the revision of the standard in -force. For example, @samp{::} is a single token in C++, but in C it is -two separate @samp{:} tokens and almost certainly a syntax error. Such +lexing C or C++, and on the revision of the standard in force. For +example, @samp{::} is a single token in C++, but in C it is two +separate @samp{:} tokens and almost certainly a syntax error. Such cases are handled by @code{_cpp_lex_direct} based upon command-line flags stored in the @code{cpp_options} structure. Modified: head/contrib/gcc/doc/cppopts.texi ============================================================================== --- head/contrib/gcc/doc/cppopts.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/cppopts.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -347,17 +347,15 @@ current directory. @end ifclear @item -x c @itemx -x c++ -@itemx -x objective-c @itemx -x assembler-with-cpp @opindex x -Specify the source language: C, C++, Objective-C, or assembly. This has -nothing to do with standards conformance or extensions; it merely -selects which base syntax to expect. If you give none of these options, -cpp will deduce the language from the extension of the source file: -@samp{.c}, @samp{.cc}, @samp{.m}, or @samp{.S}. Some other common -extensions for C++ and assembly are also recognized. If cpp does not -recognize the extension, it will treat the file as C; this is the most -generic mode. +Specify the source language: C, C++, or assembly. This has nothing to +do with standards conformance or extensions; it merely selects which +base syntax to expect. If you give none of these options, cpp will +deduce the language from the extension of the source file: @samp{.c}, +@samp{.cc}, or @samp{.S}. Some other common extensions for C++ and +assembly are also recognized. If cpp does not recognize the extension, +it will treat the file as C; this is the most generic mode. @emph{Note:} Previous versions of cpp accepted a @option{-lang} option which selected both the language and the standards conformance level. Modified: head/contrib/gcc/doc/extend.texi ============================================================================== --- head/contrib/gcc/doc/extend.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/extend.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -16,9 +16,9 @@ any of these features is used.) To test features in conditional compilation, check for a predefined macro @code{__GNUC__}, which is always defined under GCC@. -These extensions are available in C and Objective-C@. Most of them are -also available in C++. @xref{C++ Extensions,,Extensions to the -C++ Language}, for extensions that apply @emph{only} to C++. +These extensions are available in C. Most of them are also available +in C++. @xref{C++ Extensions,,Extensions to the C++ Language}, for +extensions that apply @emph{only} to C++. Some features that are in ISO C99 but not C89 or C++ are also, as extensions, accepted by GCC in C89 mode and in C++. @@ -1716,8 +1716,6 @@ been called. Functions with these attri initializing data that will be used implicitly during the execution of the program. -These attributes are not currently implemented for Objective-C@. - @item deprecated @cindex @code{deprecated} attribute. The @code{deprecated} attribute results in a warning if the function @@ -2605,9 +2603,9 @@ Preprocessing Directives, cpp, The GNU C This section describes the syntax with which @code{__attribute__} may be used, and the constructs to which attribute specifiers bind, for the C -language. Some details may vary for C++ and Objective-C@. Because of -infelicities in the grammar for attributes, some forms described here -may not be successfully parsed in all cases. +language. Some details may vary for C++. Because of infelicities in +the grammar for attributes, some forms described here may not be +successfully parsed in all cases. There are some problems with the semantics of attributes in C++. For example, there are no manglings for attributes, although they may affect @@ -9896,9 +9894,8 @@ The Solaris target supports @code{#pragm Increase the minimum alignment of each @var{variable} to @var{alignment}. This is the same as GCC's @code{aligned} attribute @pxref{Variable Attributes}). Macro expansion occurs on the arguments to this pragma -when compiling C and Objective-C. It does not currently occur when -compiling C++, but this is a bug which may be fixed in a future -release. +when compiling C. It does not currently occur when compiling C++, but +this is a bug which may be fixed in a future release. @item fini (@var{function} [, @var{function}]...) @cindex pragma, fini Modified: head/contrib/gcc/doc/frontends.texi ============================================================================== --- head/contrib/gcc/doc/frontends.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/frontends.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -12,13 +12,10 @@ @cindex Ada @cindex Fortran @cindex Java -@cindex Objective-C -@cindex Objective-C++ @cindex treelang GCC stands for ``GNU Compiler Collection''. GCC is an integrated distribution of compilers for several major programming languages. These -languages currently include C, C++, Objective-C, Objective-C++, Java, -Fortran, and Ada. +languages currently include C, C++, Java, Fortran, and Ada. The abbreviation @dfn{GCC} has multiple meanings in common use. The current official meaning is ``GNU Compiler Collection'', which refers @@ -59,5 +56,4 @@ have been implemented as ``preprocessors level language such as C@. None of the compilers included in GCC are implemented this way; they all generate machine code directly. This sort of preprocessor should not be confused with the @dfn{C -preprocessor}, which is an integral feature of the C, C++, Objective-C -and Objective-C++ languages. +preprocessor}, which is an integral feature of the C and C++ languages. Modified: head/contrib/gcc/doc/gcc.1 ============================================================================== --- head/contrib/gcc/doc/gcc.1 Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/gcc.1 Sun Apr 17 21:03:23 2011 (r220755) @@ -219,22 +219,6 @@ in the following sections. \&\-Wno\-non\-template\-friend \-Wold\-style\-cast \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions \&\-Wsign\-promo\fR -.IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4 -.IX Item "Objective-C and Objective- Language Options" -\&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR -\&\fB\-fgnu\-runtime \-fnext\-runtime -\&\-fno\-nil\-receivers -\&\-fobjc\-call\-cxx\-cdtors -\&\-fobjc\-direct\-dispatch -\&\-fobjc\-exceptions -\&\-fobjc\-gc -\&\-freplace\-objc\-classes -\&\-fzero\-link -\&\-gen\-decls -\&\-Wassign\-intercept -\&\-Wno\-protocol \-Wselector -\&\-Wstrict\-selector\-match -\&\-Wundeclared\-selector\fR .IP "\fILanguage Independent Options\fR" 4 .IX Item "Language Independent Options" \&\fB\-fmessage\-length=\fR\fIn\fR @@ -815,29 +799,9 @@ C source code which should not be prepro .IP "\fIfile\fR\fB.ii\fR" 4 .IX Item "file.ii" \&\*(C+ source code which should not be preprocessed. -.IP "\fIfile\fR\fB.m\fR" 4 -.IX Item "file.m" -Objective-C source code. Note that you must link with the \fIlibobjc\fR -library to make an Objective-C program work. -.IP "\fIfile\fR\fB.mi\fR" 4 -.IX Item "file.mi" -Objective-C source code which should not be preprocessed. -.IP "\fIfile\fR\fB.mm\fR" 4 -.IX Item "file.mm" -.PD 0 -.IP "\fIfile\fR\fB.M\fR" 4 -.IX Item "file.M" -.PD -Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR -library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers -to a literal capital M. -.IP "\fIfile\fR\fB.mii\fR" 4 -.IX Item "file.mii" -Objective\-\*(C+ source code which should not be preprocessed. .IP "\fIfile\fR\fB.h\fR" 4 .IX Item "file.h" -C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a -precompiled header. +C, or \*(C+ header file to be turned into a precompiled header. .IP "\fIfile\fR\fB.cc\fR" 4 .IX Item "file.cc" .PD 0 @@ -857,16 +821,6 @@ precompiled header. \&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR, the last two letters must both be literally \fBx\fR. Likewise, \&\fB.C\fR refers to a literal capital C. -.IP "\fIfile\fR\fB.mm\fR" 4 -.IX Item "file.mm" -.PD 0 -.IP "\fIfile\fR\fB.M\fR" 4 -.IX Item "file.M" -.PD -Objective\-\*(C+ source code which must be preprocessed. -.IP "\fIfile\fR\fB.mii\fR" 4 -.IX Item "file.mii" -Objective\-\*(C+ source code which should not be preprocessed. .IP "\fIfile\fR\fB.hh\fR" 4 .IX Item "file.hh" .PD 0 @@ -941,8 +895,6 @@ the next \fB\-x\fR option. Possible val .Vb 9 \& c c-header c-cpp-output \& c++ c++-header c++-cpp-output -\& objective-c objective-c-header objective-c-cpp-output -\& objective-c++ objective-c++-header objective-c++-cpp-output \& assembler assembler-with-cpp \& ada \& f95 f95-cpp-input @@ -1095,8 +1047,7 @@ languages; or options that are meaningfu .Sh "Options Controlling C Dialect" .IX Subsection "Options Controlling C Dialect" The following options control the dialect of C (or languages derived -from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler -accepts: +from C, such as \*(C+) that the compiler accepts: .IP "\fB\-ansi\fR" 4 .IX Item "-ansi" In C mode, support all \s-1ISO\s0 C90 programs. In \*(C+ mode, @@ -1840,251 +1791,6 @@ unsignedness, but the standard mandates .Sp In this example, G++ will synthesize a default \fBA& operator = (const A&);\fR, while cfront will use the user-defined \fBoperator =\fR. -.Sh "Options Controlling Objective-C and Objective\-\*(C+ Dialects" -.IX Subsection "Options Controlling Objective-C and Objective- Dialects" -(\s-1NOTE:\s0 This manual does not describe the Objective-C and Objective\-\*(C+ -languages themselves. See -.PP -This section describes the command-line options that are only meaningful -for Objective-C and Objective\-\*(C+ programs, but you can also use most of -the language-independent \s-1GNU\s0 compiler options. -For example, you might compile a file \f(CW\*(C`some_class.m\*(C'\fR like this: -.PP -.Vb 1 -\& gcc -g -fgnu-runtime -O -c some_class.m -.Ve -.PP -In this example, \fB\-fgnu\-runtime\fR is an option meant only for -Objective-C and Objective\-\*(C+ programs; you can use the other options with -any language supported by \s-1GCC\s0. -.PP -Note that since Objective-C is an extension of the C language, Objective-C -compilations may also use options specific to the C front-end (e.g., -\&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations may use -\&\*(C+\-specific options (e.g., \fB\-Wabi\fR). -.PP -Here is a list of options that are \fIonly\fR for compiling Objective-C -and Objective\-\*(C+ programs: -.IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4 -.IX Item "-fconstant-string-class=class-name" -Use \fIclass-name\fR as the name of the class to instantiate for each -literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default -class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 runtime is being used, and -\&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being used (see below). The -\&\fB\-fconstant\-cfstrings\fR option, if also present, will override the -\&\fB\-fconstant\-string\-class\fR setting and cause \f(CW\*(C`@"..."\*(C'\fR literals -to be laid out as constant CoreFoundation strings. -.IP "\fB\-fgnu\-runtime\fR" 4 -.IX Item "-fgnu-runtime" -Generate object code compatible with the standard \s-1GNU\s0 Objective-C -runtime. This is the default for most types of systems. -.IP "\fB\-fnext\-runtime\fR" 4 -.IX Item "-fnext-runtime" -Generate output compatible with the NeXT runtime. This is the default -for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X. The macro -\&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only if) this option is -used. -.IP "\fB\-fno\-nil\-receivers\fR" 4 -.IX Item "-fno-nil-receivers" -Assume that all Objective-C message dispatches (e.g., -\&\f(CW\*(C`[receiver message:arg]\*(C'\fR) in this translation unit ensure that the receiver -is not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the runtime -to be used. Currently, this option is only available in conjunction with -the NeXT runtime on Mac \s-1OS\s0 X 10.3 and later. -.IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4 -.IX Item "-fobjc-call-cxx-cdtors" -For each Objective-C class, check if any of its instance variables is a -\&\*(C+ object with a non-trivial default constructor. If so, synthesize a -special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method that will run -non-trivial default constructors on any such instance variables, in order, -and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable -is a \*(C+ object with a non-trivial destructor, and if so, synthesize a -special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method that will run -all such default destructors, in reverse order. -.Sp -The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and/or \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods -thusly generated will only operate on instance variables declared in the -current Objective-C class, and not those inherited from superclasses. It -is the responsibility of the Objective-C runtime to invoke all such methods -in an object's inheritance hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods -will be invoked by the runtime immediately after a new object -instance is allocated; the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods will -be invoked immediately before the runtime deallocates an object instance. -.Sp -As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 and later has -support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and -\&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods. -.IP "\fB\-fobjc\-direct\-dispatch\fR" 4 -.IX Item "-fobjc-direct-dispatch" -Allow fast jumps to the message dispatcher. On Darwin this is -accomplished via the comm page. -.IP "\fB\-fobjc\-exceptions\fR" 4 -.IX Item "-fobjc-exceptions" -Enable syntactic support for structured exception handling in Objective\-C, -similar to what is offered by \*(C+ and Java. This option is -unavailable in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.2 and -earlier. -.Sp -.Vb 23 -\& @try { -\& ... -\& @throw expr; -\& ... -\& } -\& @catch (AnObjCClass *exc) { -\& ... -\& @throw expr; -\& ... -\& @throw; -\& ... -\& } -\& @catch (AnotherClass *exc) { -\& ... -\& } -\& @catch (id allOthers) { -\& ... -\& } -\& @finally { -\& ... -\& @throw expr; -\& ... -\& } -.Ve -.Sp -The \f(CW@throw\fR statement may appear anywhere in an Objective-C or -Objective\-\*(C+ program; when used inside of a \f(CW@catch\fR block, the -\&\f(CW@throw\fR may appear without an argument (as shown above), in which case -the object caught by the \f(CW@catch\fR will be rethrown. -.Sp -Note that only (pointers to) Objective-C objects may be thrown and -caught using this scheme. When an object is thrown, it will be caught -by the nearest \f(CW@catch\fR clause capable of handling objects of that type, -analogously to how \f(CW\*(C`catch\*(C'\fR blocks work in \*(C+ and Java. A -\&\f(CW\*(C`@catch(id ...)\*(C'\fR clause (as shown above) may also be provided to catch -any and all Objective-C exceptions not caught by previous \f(CW@catch\fR -clauses (if any). -.Sp -The \f(CW@finally\fR clause, if present, will be executed upon exit from the -immediately preceding \f(CW\*(C`@try ... @catch\*(C'\fR section. This will happen -regardless of whether any exceptions are thrown, caught or rethrown -inside the \f(CW\*(C`@try ... @catch\*(C'\fR section, analogously to the behavior -of the \f(CW\*(C`finally\*(C'\fR clause in Java. -.Sp -There are several caveats to using the new exception mechanism: -.RS 4 -.IP "*" 4 -Although currently designed to be binary compatible with \f(CW\*(C`NS_HANDLER\*(C'\fR\-style -idioms provided by the \f(CW\*(C`NSException\*(C'\fR class, the new -exceptions can only be used on Mac \s-1OS\s0 X 10.3 (Panther) and later -systems, due to additional functionality needed in the (NeXT) Objective-C -runtime. -.IP "*" 4 -As mentioned above, the new exceptions do not support handling -types other than Objective-C objects. Furthermore, when used from -Objective\-\*(C+, the Objective-C exception model does not interoperate with \*(C+ -exceptions at this time. This means you cannot \f(CW@throw\fR an exception -from Objective-C and \f(CW\*(C`catch\*(C'\fR it in \*(C+, or vice versa -(i.e., \f(CW\*(C`throw ... @catch\*(C'\fR). -.RE -.RS 4 -.Sp -The \fB\-fobjc\-exceptions\fR switch also enables the use of synchronization -blocks for thread-safe execution: -.Sp -.Vb 3 -\& @synchronized (ObjCClass *guard) { -\& ... -\& } -.Ve -.Sp -Upon entering the \f(CW@synchronized\fR block, a thread of execution shall -first check whether a lock has been placed on the corresponding \f(CW\*(C`guard\*(C'\fR -object by another thread. If it has, the current thread shall wait until -the other thread relinquishes its lock. Once \f(CW\*(C`guard\*(C'\fR becomes available, -the current thread will place its own lock on it, execute the code contained in -the \f(CW@synchronized\fR block, and finally relinquish the lock (thereby -making \f(CW\*(C`guard\*(C'\fR available to other threads). -.Sp -Unlike Java, Objective-C does not allow for entire methods to be marked -\&\f(CW@synchronized\fR. Note that throwing exceptions out of -\&\f(CW@synchronized\fR blocks is allowed, and will cause the guarding object -to be unlocked properly. -.RE -.IP "\fB\-fobjc\-gc\fR" 4 -.IX Item "-fobjc-gc" -Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+ programs. -.IP "\fB\-freplace\-objc\-classes\fR" 4 -.IX Item "-freplace-objc-classes" -Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in -the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at -run time instead. This is used in conjunction with the Fix-and-Continue -debugging mode, where the object file in question may be recompiled and -dynamically reloaded in the course of program execution, without the need -to restart the program itself. Currently, Fix-and-Continue functionality -is only available in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.3 -and later. -.IP "\fB\-fzero\-link\fR" 4 -.IX Item "-fzero-link" -When compiling for the NeXT runtime, the compiler ordinarily replaces calls -to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at -compile time) with static class references that get initialized at load time, -which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag -suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR -to be retained. This is useful in Zero-Link debugging mode, since it allows -for individual class implementations to be modified during program execution. -.IP "\fB\-gen\-decls\fR" 4 -.IX Item "-gen-decls" -Dump interface declarations for all classes seen in the source file to a -file named \fI\fIsourcename\fI.decl\fR. -.IP "\fB\-Wassign\-intercept\fR" 4 -.IX Item "-Wassign-intercept" -Warn whenever an Objective-C assignment is being intercepted by the -garbage collector. -.IP "\fB\-Wno\-protocol\fR" 4 -.IX Item "-Wno-protocol" -If a class is declared to implement a protocol, a warning is issued for -every method in the protocol that is not implemented by the class. The -default behavior is to issue a warning for every method not explicitly -implemented in the class, even if a method implementation is inherited -from the superclass. If you use the \fB\-Wno\-protocol\fR option, then -methods inherited from the superclass are considered to be implemented, -and no warning is issued for them. -.IP "\fB\-Wselector\fR" 4 -.IX Item "-Wselector" -Warn if multiple methods of different types for the same selector are -found during compilation. The check is performed on the list of methods -in the final stage of compilation. Additionally, a check is performed -for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR -expression, and a corresponding method for that selector has been found -during compilation. Because these checks scan the method table only at -the end of compilation, these warnings are not produced if the final -stage of compilation is not reached, for example because an error is -found during compilation, or because the \fB\-fsyntax\-only\fR option is -being used. -.IP "\fB\-Wstrict\-selector\-match\fR" 4 -.IX Item "-Wstrict-selector-match" -Warn if multiple methods with differing argument and/or return types are -found for a given selector when attempting to send a message using this -selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag -is off (which is the default behavior), the compiler will omit such warnings -if any differences found are confined to types which share the same size -and alignment. -.IP "\fB\-Wundeclared\-selector\fR" 4 -.IX Item "-Wundeclared-selector" -Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an -undeclared selector is found. A selector is considered undeclared if no -method with that name has been declared before the -\&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in an -\&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly in -an \f(CW@implementation\fR section. This option always performs its -checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found, -while \fB\-Wselector\fR only performs its checks in the final stage of -compilation. This also enforces the coding style convention -that methods and selectors must be declared before being used. -.IP "\fB\-print\-objc\-runtime\-info\fR" 4 -.IX Item "-print-objc-runtime-info" -Generate C header describing the largest structure that is passed by -value, if any. .Sh "Options to Control Diagnostic Messages Formatting" .IX Subsection "Options to Control Diagnostic Messages Formatting" Traditionally, diagnostic messages have been formatted irrespective of @@ -2136,8 +1842,7 @@ two forms, whichever is not the default. .PP The following options control the amount and kinds of warnings produced by \s-1GCC\s0; for further, language-specific options also refer to -\&\fB\*(C+ Dialect Options\fR and \fBObjective-C and Objective\-\*(C+ Dialect -Options\fR. +\&\fB\*(C+ Dialect Options\fR. .IP "\fB\-fsyntax\-only\fR" 4 .IX Item "-fsyntax-only" Check the code for syntax errors, but don't do anything beyond that. @@ -2287,8 +1992,8 @@ requiring a non-null value by the \f(CW\ .Sp \&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. It can be disabled with the \fB\-Wno\-nonnull\fR option. -.IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 -.IX Item "-Winit-self (C, , Objective-C and Objective- only)" +.IP "\fB\-Winit\-self\fR (C, \*(C+ only)" 4 +.IX Item "-Winit-self (C, only)" Warn about uninitialized variables which are initialized with themselves. Note this option can only be used with the \fB\-Wuninitialized\fR option, which in turn only works with \fB\-O1\fR and above. @@ -2339,8 +2044,8 @@ bracketed, but that for \fBb\fR is fully .Ve .Sp This warning is enabled by \fB\-Wall\fR. -.IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 -.IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- only)" +.IP "\fB\-Wmissing\-include\-dirs\fR (C and \*(C+ only)" 4 +.IX Item "-Wmissing-include-dirs (C, only)" Warn if a user-supplied include directory does not exist. .IP "\fB\-Wparentheses\fR" 4 .IX Item "-Wparentheses" @@ -2675,8 +2380,7 @@ All of the above \fB\-W\fR options combi warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning), even in conjunction with macros. This also enables some language-specific -warnings described in \fB\*(C+ Dialect Options\fR and -\&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR. +warnings described in \fB\*(C+ Dialect Options\fR. .PP The following \fB\-W...\fR options are not implied by \fB\-Wall\fR. Some of them warn about constructions that users generally do not @@ -3224,8 +2928,8 @@ itself is likely to take inordinate amou .IP "\fB\-Wpointer\-sign\fR" 4 .IX Item "-Wpointer-sign" Warn for pointer argument passing or assignment with different signedness. -This option is only supported for C and Objective\-C. It is implied by -\&\fB\-Wall\fR and by \fB\-pedantic\fR, which can be disabled with +This option is only supported for C. It is implied by \&\fB\-Wall\fR +and by \fB\-pedantic\fR, which can be disabled with \&\fB\-Wno\-pointer\-sign\fR. .IP "\fB\-Werror\fR" 4 .IX Item "-Werror" @@ -6294,12 +5998,10 @@ current directory. .PD 0 .IP "\fB\-x c++\fR" 4 .IX Item "-x c++" -.IP "\fB\-x objective-c\fR" 4 -.IX Item "-x objective-c" .IP "\fB\-x assembler-with-cpp\fR" 4 .IX Item "-x assembler-with-cpp" .PD -Specify the source language: C, \*(C+, Objective\-C, or assembly. This has +Specify the source language: C, \*(C+, or assembly. This has nothing to do with standards conformance or extensions; it merely selects which base syntax to expect. If you give none of these options, cpp will deduce the language from the extension of the source file: @@ -6728,10 +6430,6 @@ ordinary object file, it is linked in th difference between using an \fB\-l\fR option and specifying a file name is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR and searches several directories. -.IP "\fB\-lobjc\fR" 4 -.IX Item "-lobjc" -You need this special case of the \fB\-l\fR option in order to -link an Objective-C or Objective\-\*(C+ program. .IP "\fB\-nostartfiles\fR" 4 .IX Item "-nostartfiles" Do not use the standard system startup files when linking. @@ -13035,8 +12733,6 @@ preprocessor. .IX Item "C_INCLUDE_PATH" .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 .IX Item "CPLUS_INCLUDE_PATH" -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 -.IX Item "OBJC_INCLUDE_PATH" .PD Each variable's value is a list of directories separated by a special character, much like \fB\s-1PATH\s0\fR, in which to look for header files. Modified: head/contrib/gcc/doc/gcc.texi ============================================================================== --- head/contrib/gcc/doc/gcc.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/gcc.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -129,7 +129,6 @@ Introduction, gccint, GNU Compiler Colle * C Implementation:: How GCC implements the ISO C specification. * C Extensions:: GNU extensions to the C language family. * C++ Extensions:: GNU extensions to the C++ language. -* Objective-C:: GNU Objective-C runtime features. * Compatibility:: Binary Compatibility * Gcov:: @command{gcov}---a test coverage program. * Trouble:: If you have trouble using GCC. @@ -154,7 +153,6 @@ Introduction, gccint, GNU Compiler Colle @include invoke.texi @include implement-c.texi @include extend.texi -@include objc.texi @include compat.texi @include gcov.texi @include trouble.texi Modified: head/contrib/gcc/doc/invoke.texi ============================================================================== --- head/contrib/gcc/doc/invoke.texi Sun Apr 17 20:44:02 2011 (r220754) +++ head/contrib/gcc/doc/invoke.texi Sun Apr 17 21:03:23 2011 (r220755) @@ -124,8 +124,6 @@ only one of these two forms, whichever o * Invoking G++:: Compiling C++ programs. * C Dialect Options:: Controlling the variant of C language compiled. * C++ Dialect Options:: Variations on C++. -* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C - and Objective-C++. * Language Independent Options:: Controlling how diagnostics should be formatted. * Warning Options:: How picky should the compiler be? @@ -195,24 +193,6 @@ in the following sections. -Woverloaded-virtual -Wno-pmf-conversions @gol -Wsign-promo} -@item Objective-C and Objective-C++ Language Options -@xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling -Objective-C and Objective-C++ Dialects}. -@gccoptlist{-fconstant-string-class=@var{class-name} @gol --fgnu-runtime -fnext-runtime @gol --fno-nil-receivers @gol --fobjc-call-cxx-cdtors @gol --fobjc-direct-dispatch @gol --fobjc-exceptions @gol --fobjc-gc @gol --freplace-objc-classes @gol --fzero-link @gol --gen-decls @gol --Wassign-intercept @gol --Wno-protocol -Wselector @gol --Wstrict-selector-match @gol --Wundeclared-selector} - @item Language Independent Options @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. @gccoptlist{-fmessage-length=@var{n} @gol @@ -795,8 +775,6 @@ See S/390 and zSeries Options. or preprocessed source. * C Dialect Options:: Controlling the variant of C language compiled. * C++ Dialect Options:: Variations on C++. -* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C - and Objective-C++. * Language Independent Options:: Controlling how diagnostics should be formatted. * Warning Options:: How picky should the compiler be? @@ -837,25 +815,8 @@ C source code which should not be prepro @item @var{file}.ii C++ source code which should not be preprocessed. -@item @var{file}.m -Objective-C source code. Note that you must link with the @file{libobjc} -library to make an Objective-C program work. - -@item @var{file}.mi -Objective-C source code which should not be preprocessed. - -@item @var{file}.mm -@itemx @var{file}.M -Objective-C++ source code. Note that you must link with the @file{libobjc} -library to make an Objective-C++ program work. Note that @samp{.M} refers -to a literal capital M@. - -@item @var{file}.mii -Objective-C++ source code which should not be preprocessed. - @item @var{file}.h -C, C++, Objective-C or Objective-C++ header file to be turned into a -precompiled header. +C, or C++ header file to be turned into a precompiled header. @item @var{file}.cc @itemx @var{file}.cp @@ -868,13 +829,6 @@ C++ source code which must be preprocess the last two letters must both be literally @samp{x}. Likewise, @samp{.C} refers to a literal capital C@. -@item @var{file}.mm -@itemx @var{file}.M -Objective-C++ source code which must be preprocessed. - -@item @var{file}.mii -Objective-C++ source code which should not be preprocessed. - @item @var{file}.hh @itemx @var{file}.H C++ header file to be turned into a precompiled header. @@ -946,8 +900,6 @@ the next @option{-x} option. Possible v @smallexample c c-header c-cpp-output c++ c++-header c++-cpp-output -objective-c objective-c-header objective-c-cpp-output -objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f95 f95-cpp-input @@ -1121,8 +1073,7 @@ explanations of options that are meaning @cindex options, dialect The following options control the dialect of C (or languages derived -from C, such as C++, Objective-C and Objective-C++) that the compiler -accepts: +from C, such as C++) that the compiler accepts: @table @gcctabopt @cindex ANSI support @@ -1955,278 +1906,6 @@ In this example, G++ will synthesize a d (const A&);}, while cfront will use the user-defined @samp{operator =}. @end table -@node Objective-C and Objective-C++ Dialect Options -@section Options Controlling Objective-C and Objective-C++ Dialects - -@cindex compiler options, Objective-C and Objective-C++ -@cindex Objective-C and Objective-C++ options, command line -@cindex options, Objective-C and Objective-C++ -(NOTE: This manual does not describe the Objective-C and Objective-C++ -languages themselves. See @xref{Standards,,Language Standards -Supported by GCC}, for references.) - -This section describes the command-line options that are only meaningful -for Objective-C and Objective-C++ programs, but you can also use most of -the language-independent GNU compiler options. -For example, you might compile a file @code{some_class.m} like this: - -@smallexample -gcc -g -fgnu-runtime -O -c some_class.m -@end smallexample - -@noindent -In this example, @option{-fgnu-runtime} is an option meant only for -Objective-C and Objective-C++ programs; you can use the other options with -any language supported by GCC@. - -Note that since Objective-C is an extension of the C language, Objective-C -compilations may also use options specific to the C front-end (e.g., -@option{-Wtraditional}). Similarly, Objective-C++ compilations may use -C++-specific options (e.g., @option{-Wabi}). - -Here is a list of options that are @emph{only} for compiling Objective-C *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 21:11:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75FC1065687; Sun, 17 Apr 2011 21:11:55 +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 C87F58FC14; Sun, 17 Apr 2011 21:11: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 p3HLBtMQ049808; Sun, 17 Apr 2011 21:11:55 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HLBtxV049806; Sun, 17 Apr 2011 21:11:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104172111.p3HLBtxV049806@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 17 Apr 2011 21:11: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: r220756 - 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: Sun, 17 Apr 2011 21:11:55 -0000 Author: jilles Date: Sun Apr 17 21:11:55 2011 New Revision: 220756 URL: http://svn.freebsd.org/changeset/base/220756 Log: kdump: Show code for signals where the default action was taken. This information is available as of kernel r220740. Trace files from older kernels will always have 0. MFC after: 1 week Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sun Apr 17 21:03:23 2011 (r220755) +++ head/usr.bin/kdump/kdump.c Sun Apr 17 21:11:55 2011 (r220756) @@ -1134,7 +1134,7 @@ ktrpsig(struct ktr_psig *psig) else (void)printf("SIG %d ", psig->signo); if (psig->action == SIG_DFL) - (void)printf("SIG_DFL\n"); + (void)printf("SIG_DFL code=0x%x\n", psig->code); else { (void)printf("caught handler=0x%lx mask=0x%x code=0x%x\n", (u_long)psig->action, psig->mask.__bits[0], psig->code); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 21:52:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A591065672; Sun, 17 Apr 2011 21:52:58 +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 065AC8FC08; Sun, 17 Apr 2011 21:52: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 p3HLqvmp050679; Sun, 17 Apr 2011 21:52:57 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HLqvFA050676; Sun, 17 Apr 2011 21:52:57 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104172152.p3HLqvFA050676@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 17 Apr 2011 21:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220757 - stable/8/usr.bin/logger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 21:52:58 -0000 Author: edwin Date: Sun Apr 17 21:52:57 2011 New Revision: 220757 URL: http://svn.freebsd.org/changeset/base/220757 Log: MFC of r220448 When specifying the -t option (send tag in front of message), this tag should also be forwarded to the remote logging host, not only when the logging is done locally. PR: bin/154324 Submitted by: Callum Gibson Modified: stable/8/usr.bin/logger/logger.1 stable/8/usr.bin/logger/logger.c Directory Properties: stable/8/usr.bin/logger/ (props changed) Modified: stable/8/usr.bin/logger/logger.1 ============================================================================== --- stable/8/usr.bin/logger/logger.1 Sun Apr 17 21:11:55 2011 (r220756) +++ stable/8/usr.bin/logger/logger.1 Sun Apr 17 21:52:57 2011 (r220757) @@ -106,7 +106,8 @@ facility. The default is ``user.notice.'' .It Fl t Ar tag Mark every line in the log with the specified -.Ar tag . +.Ar tag +rather than the default of current login name. .It Ar message Write the message to log; if not specified, and the .Fl f Modified: stable/8/usr.bin/logger/logger.c ============================================================================== --- stable/8/usr.bin/logger/logger.c Sun Apr 17 21:11:55 2011 (r220756) +++ stable/8/usr.bin/logger/logger.c Sun Apr 17 21:52:57 2011 (r220757) @@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$"); int decode(char *, CODE *); int pencode(char *); -static void logmessage(int, const char *, const char *, const char *); +static void logmessage(int, const char *, const char *, const char *, + const char *); static void usage(void); struct socks { @@ -140,8 +141,11 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (tag == NULL) + tag = getlogin(); /* setup for logging */ - openlog(tag ? tag : getlogin(), logflags, 0); + if (host == NULL) + openlog(tag, logflags, 0); (void) fclose(stdout); /* log input line if appropriate */ @@ -152,11 +156,11 @@ main(int argc, char *argv[]) for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { len = strlen(*argv); if (p + len > endp && p > buf) { - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); p = buf; } if (len > sizeof(buf) - 1) - logmessage(pri, host, svcname, *argv++); + logmessage(pri, tag, host, svcname, *argv++); else { if (p != buf) *p++ = ' '; @@ -165,10 +169,10 @@ main(int argc, char *argv[]) } } if (p != buf) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); } else while (fgets(buf, sizeof(buf), stdin) != NULL) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); exit(0); } @@ -176,7 +180,8 @@ main(int argc, char *argv[]) * Send the message to syslog, either on the local host, or on a remote host */ void -logmessage(int pri, const char *host, const char *svcname, const char *buf) +logmessage(int pri, const char *tag, const char *host, const char *svcname, + const char *buf) { static struct socks *socks; static int nsock = 0; @@ -220,7 +225,7 @@ logmessage(int pri, const char *host, co errx(1, "socket"); } - if ((len = asprintf(&line, "<%d>%s", pri, buf)) == -1) + if ((len = asprintf(&line, "<%d>%s: %s", pri, tag, buf)) == -1) errx(1, "asprintf"); lsent = -1; From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 21:57:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCC06106564A; Sun, 17 Apr 2011 21:57:08 +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 AC5688FC13; Sun, 17 Apr 2011 21:57: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 p3HLv89V050835; Sun, 17 Apr 2011 21:57:08 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HLv8Ad050832; Sun, 17 Apr 2011 21:57:08 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104172157.p3HLv8Ad050832@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 17 Apr 2011 21:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220758 - stable/7/usr.bin/logger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2011 21:57:08 -0000 Author: edwin Date: Sun Apr 17 21:57:08 2011 New Revision: 220758 URL: http://svn.freebsd.org/changeset/base/220758 Log: MFC of r220448 When specifying the -t option (send tag in front of message), this tag should also be forwarded to the remote logging host, not only when the logging is done locally. PR: bin/154324 Submitted by: Callum Gibson Modified: stable/7/usr.bin/logger/logger.1 stable/7/usr.bin/logger/logger.c Directory Properties: stable/7/usr.bin/logger/ (props changed) Modified: stable/7/usr.bin/logger/logger.1 ============================================================================== --- stable/7/usr.bin/logger/logger.1 Sun Apr 17 21:52:57 2011 (r220757) +++ stable/7/usr.bin/logger/logger.1 Sun Apr 17 21:57:08 2011 (r220758) @@ -106,7 +106,8 @@ facility. The default is ``user.notice.'' .It Fl t Ar tag Mark every line in the log with the specified -.Ar tag . +.Ar tag +rather than the default of current login name. .It Ar message Write the message to log; if not specified, and the .Fl f Modified: stable/7/usr.bin/logger/logger.c ============================================================================== --- stable/7/usr.bin/logger/logger.c Sun Apr 17 21:52:57 2011 (r220757) +++ stable/7/usr.bin/logger/logger.c Sun Apr 17 21:57:08 2011 (r220758) @@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$"); int decode(char *, CODE *); int pencode(char *); -static void logmessage(int, const char *, const char *, const char *); +static void logmessage(int, const char *, const char *, const char *, + const char *); static void usage(void); struct socks { @@ -140,8 +141,11 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (tag == NULL) + tag = getlogin(); /* setup for logging */ - openlog(tag ? tag : getlogin(), logflags, 0); + if (host == NULL) + openlog(tag, logflags, 0); (void) fclose(stdout); /* log input line if appropriate */ @@ -152,11 +156,11 @@ main(int argc, char *argv[]) for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { len = strlen(*argv); if (p + len > endp && p > buf) { - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); p = buf; } if (len > sizeof(buf) - 1) - logmessage(pri, host, svcname, *argv++); + logmessage(pri, tag, host, svcname, *argv++); else { if (p != buf) *p++ = ' '; @@ -165,10 +169,10 @@ main(int argc, char *argv[]) } } if (p != buf) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); } else while (fgets(buf, sizeof(buf), stdin) != NULL) - logmessage(pri, host, svcname, buf); + logmessage(pri, tag, host, svcname, buf); exit(0); } @@ -176,7 +180,8 @@ main(int argc, char *argv[]) * Send the message to syslog, either on the local host, or on a remote host */ void -logmessage(int pri, const char *host, const char *svcname, const char *buf) +logmessage(int pri, const char *tag, const char *host, const char *svcname, + const char *buf) { static struct socks *socks; static int nsock = 0; @@ -220,7 +225,7 @@ logmessage(int pri, const char *host, co errx(1, "socket"); } - if ((len = asprintf(&line, "<%d>%s", pri, buf)) == -1) + if ((len = asprintf(&line, "<%d>%s: %s", pri, tag, buf)) == -1) errx(1, "asprintf"); lsent = -1; From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 22:26:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6AC1065670; Sun, 17 Apr 2011 22:26:08 +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 289B58FC0C; Sun, 17 Apr 2011 22:26: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 p3HMQ8b8051538; Sun, 17 Apr 2011 22:26:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HMQ81Y051533; Sun, 17 Apr 2011 22:26:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104172226.p3HMQ81Y051533@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 17 Apr 2011 22:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220759 - in stable/7: lib/libc/gen lib/libc/string tools/regression/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 22:26:08 -0000 Author: jilles Date: Sun Apr 17 22:26:07 2011 New Revision: 220759 URL: http://svn.freebsd.org/changeset/base/220759 Log: MFC r220376: Allow strerror(0) and strerror_r(0, ...). Of course, strerror_r() may still fail with ERANGE. Although the POSIX specification said this could fail with EINVAL and doing this likely indicates invalid use of errno, most other implementations permitted it, various POSIX testsuites require it to work (matching the older sys_errlist array) and apparently some applications depend on it. PR: standards/151316 Modified: stable/7/lib/libc/gen/errlst.c stable/7/lib/libc/string/strerror.3 stable/7/lib/libc/string/strerror.c stable/7/tools/regression/lib/libc/string/test-strerror.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/tools/regression/lib/libc/ (props changed) Modified: stable/7/lib/libc/gen/errlst.c ============================================================================== --- stable/7/lib/libc/gen/errlst.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/gen/errlst.c Sun Apr 17 22:26:07 2011 (r220759) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include const char *const sys_errlist[] = { - "Undefined error: 0", /* 0 - ENOERROR */ + "No error: 0", /* 0 - ENOERROR */ "Operation not permitted", /* 1 - EPERM */ "No such file or directory", /* 2 - ENOENT */ "No such process", /* 3 - ESRCH */ Modified: stable/7/lib/libc/string/strerror.3 ============================================================================== --- stable/7/lib/libc/string/strerror.3 Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/string/strerror.3 Sun Apr 17 22:26:07 2011 (r220759) @@ -32,7 +32,7 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 12, 2004 +.Dd April 5, 2011 .Dt STRERROR 3 .Os .Sh NAME @@ -114,6 +114,9 @@ the range 0 < .Fa errnum < .Fa sys_nerr . +The number 0 is also recognized, although applications that take advantage of +this are likely to use unspecified values of +.Va errno . .Pp If insufficient storage is provided in .Fa strerrbuf Modified: stable/7/lib/libc/string/strerror.c ============================================================================== --- stable/7/lib/libc/string/strerror.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/lib/libc/string/strerror.c Sun Apr 17 22:26:07 2011 (r220759) @@ -87,7 +87,7 @@ strerror_r(int errnum, char *strerrbuf, catd = catopen("libc", NL_CAT_LOCALE); #endif - if (errnum < 1 || errnum >= sys_nerr) { + if (errnum < 0 || errnum >= sys_nerr) { errstr(errnum, #if defined(NLS) catgets(catd, 1, 0xffff, UPREFIX), Modified: stable/7/tools/regression/lib/libc/string/test-strerror.c ============================================================================== --- stable/7/tools/regression/lib/libc/string/test-strerror.c Sun Apr 17 21:57:08 2011 (r220758) +++ stable/7/tools/regression/lib/libc/string/test-strerror.c Sun Apr 17 22:26:07 2011 (r220759) @@ -42,17 +42,12 @@ main(void) char *sret; int iret; - plan_tests(25); + plan_tests(27); /* * strerror() failure tests. */ errno = 0; - sret = strerror(0); - ok1(strcmp(sret, "Unknown error: 0") == 0); - ok1(errno == EINVAL); - - errno = 0; sret = strerror(INT_MAX); snprintf(buf, sizeof(buf), "Unknown error: %d", INT_MAX); ok1(strcmp(sret, buf) == 0); @@ -62,6 +57,11 @@ main(void) * strerror() success tests. */ errno = 0; + sret = strerror(0); + ok1(strcmp(sret, "No error: 0") == 0); + ok1(errno == 0); + + errno = 0; sret = strerror(EPERM); ok1(strcmp(sret, "Operation not permitted") == 0); ok1(errno == 0); @@ -79,8 +79,8 @@ main(void) * strerror_r() failure tests. */ memset(buf, '*', sizeof(buf)); - iret = strerror_r(0, buf, sizeof(buf)); - ok1(strcmp(buf, "Unknown error: 0") == 0); + iret = strerror_r(-1, buf, sizeof(buf)); + ok1(strcmp(buf, "Unknown error: -1") == 0); ok1(iret == EINVAL); memset(buf, '*', sizeof(buf)); @@ -117,6 +117,11 @@ main(void) * strerror_r() success tests. */ memset(buf, '*', sizeof(buf)); + iret = strerror_r(0, buf, sizeof(buf)); + ok1(strcmp(buf, "No error: 0") == 0); + ok1(iret == 0); + + memset(buf, '*', sizeof(buf)); iret = strerror_r(EDEADLK, buf, sizeof(buf)); ok1(strcmp(buf, "Resource deadlock avoided") == 0); ok1(iret == 0); From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 22:31:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6AA106564A; Sun, 17 Apr 2011 22:31: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 CDD1E8FC13; Sun, 17 Apr 2011 22:31: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 p3HMVaNE051669; Sun, 17 Apr 2011 22:31:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HMVaJd051667; Sun, 17 Apr 2011 22:31:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104172231.p3HMVaJd051667@svn.freebsd.org> From: Doug Barton Date: Sun, 17 Apr 2011 22:31: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: r220760 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 22:31:37 -0000 Author: dougb Date: Sun Apr 17 22:31:36 2011 New Revision: 220760 URL: http://svn.freebsd.org/changeset/base/220760 Log: The change in r206686 to allow the stop argument to work for a service that is running even though not _enable'd had an annoying side effect. If the service was already started at boot time by another means when the related script came around again in rcorder it would start again, regardless of _enable, because there was a valid pid. [1] So, split the test into 2 parts, one for (!rcvar && !stop), and one for (stop && !valid_pid). This preserves the behavior from r206686 while preventing the undesired side effect. PR: conf/156427 [1] Submitted by: Eugene Grosbein [1] Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sun Apr 17 22:26:07 2011 (r220759) +++ head/etc/rc.subr Sun Apr 17 22:31:36 2011 (r220760) @@ -651,7 +651,8 @@ run_rc_command() # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] || + [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 23:04:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F6E5106566B; Sun, 17 Apr 2011 23:04:04 +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 34A118FC15; Sun, 17 Apr 2011 23:04: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 p3HN44V9052339; Sun, 17 Apr 2011 23:04:04 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HN44mq052335; Sun, 17 Apr 2011 23:04:04 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104172304.p3HN44mq052335@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 23:04: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: r220761 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 23:04:04 -0000 Author: rmacklem Date: Sun Apr 17 23:04:03 2011 New Revision: 220761 URL: http://svn.freebsd.org/changeset/base/220761 Log: Add checks for MNTK_UNMOUNTF at the beginning of three functions, so that threads don't get stuck in them during a forced dismount. nfs_sync/VFS_SYNC() needs this, since it is called by dounmount() before VFS_UNMOUNT(). The nfscl_nget() case makes sure that a thread doing an VOP_OPEN() or VOP_ADVLOCK() call doesn't get blocked before attempting the RPC. Attempting RPCs don't block, since they all fail once a forced dismount is in progress. The third one at the beginning of nfsrpc_close() is done so threads don't get blocked while doing VOP_INACTIVE() as the vnodes are cleared out. With these three changes plus a change to the umount(1) command so that it doesn't do "sync()" for the forced case seem to make forced dismounts work for the experimental NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 22:31:36 2011 (r220760) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 23:04:03 2011 (r220761) @@ -567,6 +567,11 @@ nfsrpc_close(vnode_t vp, int doclose, NF if (vnode_vtype(vp) != VREG) return (0); + + /* For forced unmounts, just return. */ + if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + return (0); + if (doclose) error = nfscl_doclose(vp, &clp, p); else Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sun Apr 17 22:31:36 2011 (r220760) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Apr 17 23:04:03 2011 (r220761) @@ -692,6 +692,10 @@ nfscl_getcl(vnode_t vp, struct ucred *cr int igotlock = 0, error, trystalecnt, clidinusedelay, i; u_int16_t idlen = 0; + /* For forced unmounts, just return an error. */ + if ((vnode_mount(vp)->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + return (EPERM); + if (cred != NULL) { getcredhostuuid(cred, uuid, sizeof uuid); idlen = strlen(uuid); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 17 22:31:36 2011 (r220760) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 17 23:04:03 2011 (r220761) @@ -1386,6 +1386,10 @@ nfs_sync(struct mount *mp, int waitfor) td = curthread; + /* For a forced unmount, just return EPERM. */ + if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) + return (EPERM); + /* * Force stale buffer cache information to be flushed. */ From owner-svn-src-all@FreeBSD.ORG Sun Apr 17 23:56:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5EA4106564A; Sun, 17 Apr 2011 23:56:57 +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 A44F68FC08; Sun, 17 Apr 2011 23:56: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 p3HNuv5E053390; Sun, 17 Apr 2011 23:56:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3HNuv3T053388; Sun, 17 Apr 2011 23:56:57 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104172356.p3HNuv3T053388@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Apr 2011 23:56: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: r220762 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2011 23:56:57 -0000 Author: rmacklem Date: Sun Apr 17 23:56:57 2011 New Revision: 220762 URL: http://svn.freebsd.org/changeset/base/220762 Log: Change the mutex locking for several locations in the experimental NFS client's vnode op functions to make them compatible with the regular NFS client. I'll admit I'm not sure that the mutex locks around the assignments are needed, but the regular client has them, so I added them. Also, add handling of the case of partial attributes in setattr to be compatible with the regular client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 23:04:03 2011 (r220761) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 23:56:57 2011 (r220762) @@ -1533,6 +1533,20 @@ again: } } else if (NFS_ISV34(dvp) && (fmode & O_EXCL)) { if (nfscl_checksattr(vap, &nfsva)) { + /* + * We are normally called with only a partially + * initialized VAP. Since the NFSv3 spec says that + * the server may use the file attributes to + * store the verifier, the spec requires us to do a + * SETATTR RPC. FreeBSD servers store the verifier in + * atime, but we can't really assume that all servers + * will so we ensure that our SETATTR sets both atime + * and mtime. + */ + if (vap->va_mtime.tv_sec == VNOVAL) + vfs_timestamp(&vap->va_mtime); + if (vap->va_atime.tv_sec == VNOVAL) + vap->va_atime = vap->va_mtime; error = nfsrpc_setattr(newvp, vap, NULL, cnp->cn_cred, cnp->cn_thread, &nfsva, &attrflag, NULL); if (error && (vap->va_uid != (uid_t)VNOVAL || @@ -1620,7 +1634,9 @@ nfs_remove(struct vop_remove_args *ap) error = 0; } else if (!np->n_sillyrename) error = nfs_sillyrename(dvp, vp, cnp); + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); return (error); } @@ -1708,7 +1724,7 @@ nfs_rename(struct vop_rename_args *ap) error = 0; goto out; } - if ((error = vn_lock(fvp, LK_EXCLUSIVE))) + if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) goto out; /* @@ -1746,7 +1762,7 @@ nfs_rename(struct vop_rename_args *ap) tdvp, tvp, tcnp->cn_nameptr, tcnp->cn_namelen, tcnp->cn_cred, tcnp->cn_thread); - if (!error) { + if (error == 0 && NFS_ISV4(tdvp)) { /* * For NFSv4, check to see if it is the same name and * replace the name, if it is different. @@ -1842,18 +1858,22 @@ nfs_renamerpc(struct vnode *fdvp, struct &tattrflag, NULL, NULL); mtx_lock(&fdnp->n_mtx); fdnp->n_flag |= NMODIFIED; - mtx_unlock(&fdnp->n_mtx); - mtx_lock(&tdnp->n_mtx); - tdnp->n_flag |= NMODIFIED; - mtx_unlock(&tdnp->n_mtx); - if (fattrflag) + if (fattrflag != 0) { + mtx_unlock(&fdnp->n_mtx); (void) nfscl_loadattrcache(&fdvp, &fnfsva, NULL, NULL, 0, 1); - else + } else { fdnp->n_attrstamp = 0; - if (tattrflag) + mtx_unlock(&fdnp->n_mtx); + } + mtx_lock(&tdnp->n_mtx); + tdnp->n_flag |= NMODIFIED; + if (tattrflag != 0) { + mtx_unlock(&tdnp->n_mtx); (void) nfscl_loadattrcache(&tdvp, &tnfsva, NULL, NULL, 0, 1); - else + } else { tdnp->n_attrstamp = 0; + mtx_unlock(&tdnp->n_mtx); + } if (error && NFS_ISV4(fdvp)) error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0); return (error); @@ -1868,7 +1888,7 @@ nfs_link(struct vop_link_args *ap) struct vnode *vp = ap->a_vp; struct vnode *tdvp = ap->a_tdvp; struct componentname *cnp = ap->a_cnp; - struct nfsnode *tdnp; + struct nfsnode *np, *tdnp; struct nfsvattr nfsva, dnfsva; int error = 0, attrflag, dattrflag; @@ -1889,15 +1909,21 @@ nfs_link(struct vop_link_args *ap) tdnp = VTONFS(tdvp); mtx_lock(&tdnp->n_mtx); tdnp->n_flag |= NMODIFIED; - mtx_unlock(&tdnp->n_mtx); - if (attrflag) - (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); - else - VTONFS(vp)->n_attrstamp = 0; - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&tdnp->n_mtx); (void) nfscl_loadattrcache(&tdvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { tdnp->n_attrstamp = 0; + mtx_unlock(&tdnp->n_mtx); + } + if (attrflag) + (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); + else { + np = VTONFS(vp); + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); + } /* * If negative lookup caching is enabled, I might as well * add an entry for this node. Not necessary for correctness, @@ -1977,11 +2003,13 @@ nfs_symlink(struct vop_symlink_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } return (error); } @@ -2001,7 +2029,7 @@ nfs_mkdir(struct vop_mkdir_args *ap) struct nfsvattr nfsva, dnfsva; int error = 0, attrflag, dattrflag, ret; - if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred))) + if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) return (error); vap->va_type = VDIR; error = nfsrpc_mkdir(dvp, cnp->cn_nameptr, cnp->cn_namelen, @@ -2010,11 +2038,13 @@ nfs_mkdir(struct vop_mkdir_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } if (nfhp) { ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread, &np, NULL, LK_EXCLUSIVE); @@ -2076,11 +2106,13 @@ nfs_rmdir(struct vop_rmdir_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } cache_purge(dvp); cache_purge(vp); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 00:41:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDB71106566B; Mon, 18 Apr 2011 00:41:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC8C28FC08; Mon, 18 Apr 2011 00:41: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 p3I0fNfX054311; Mon, 18 Apr 2011 00:41:23 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I0fNHT054309; Mon, 18 Apr 2011 00:41:23 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104180041.p3I0fNHT054309@svn.freebsd.org> From: Rick Macklem Date: Mon, 18 Apr 2011 00:41: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: r220763 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 00:41:23 -0000 Author: rmacklem Date: Mon Apr 18 00:41:23 2011 New Revision: 220763 URL: http://svn.freebsd.org/changeset/base/220763 Log: Add vput() calls in two places in the experimental NFS client that would be needed if, in the future, nfscl_loadattrcache() were to return an error. Currently nfscl_loadattrcache() never returns an error, so these cases never currently happen. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 23:56:57 2011 (r220762) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 18 00:41:23 2011 (r220763) @@ -1404,9 +1404,12 @@ nfs_mknodrpc(struct vnode *dvp, struct v (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag != 0) { error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + if (error != 0) + vput(newvp); + } } if (!error) { if ((cnp->cn_flags & MAKEENTRY)) @@ -1523,7 +1526,7 @@ again: } if (error) { if (newvp != NULL) { - vrele(newvp); + vput(newvp); newvp = NULL; } if (NFS_ISV34(dvp) && (fmode & O_EXCL) && From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 01:02:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E651065670; Mon, 18 Apr 2011 01:02:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F24B68FC0A; Mon, 18 Apr 2011 01:02:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3I12hLG054777; Mon, 18 Apr 2011 01:02:43 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I12hZZ054775; Mon, 18 Apr 2011 01:02:43 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104180102.p3I12hZZ054775@svn.freebsd.org> From: Rick Macklem Date: Mon, 18 Apr 2011 01:02: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: r220764 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 01:02:44 -0000 Author: rmacklem Date: Mon Apr 18 01:02:43 2011 New Revision: 220764 URL: http://svn.freebsd.org/changeset/base/220764 Log: Add a vput() to nfs_lookitup() in the experimental NFS client for a case that will probably never happen. It can only happen if a server were to successfully lookup a file, but not return attributes for that file. Although technically allowed by the NFSv3 RFC, I doubt any server would ever do this. However, if it did, the client would have not vput()'d the new vnode when it needed to do so. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 18 00:41:23 2011 (r220763) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 18 01:02:43 2011 (r220764) @@ -2433,7 +2433,10 @@ printf("replace=%s\n",nnn); newvp = NFSTOV(np); } if (!attrflag && *npp == NULL) { - vrele(newvp); + if (newvp == dvp) + vrele(newvp); + else + vput(newvp); return (ENOENT); } if (attrflag) From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 07:39:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C036106566B; Mon, 18 Apr 2011 07:39:29 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 4EBBB8FC08; Mon, 18 Apr 2011 07:39:27 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 3394B7F3AF9; Mon, 18 Apr 2011 09:01:24 +0200 (CEST) Date: Mon, 18 Apr 2011 09:01:24 +0200 From: Roman Divacky To: Dimitry Andric Message-ID: <20110418070124.GA67934@freebsd.org> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104172103.p3HL3Ntb049564@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 07:39:29 -0000 please mark this in src/UPDATING, maybe bump freebsd_version too? On Sun, Apr 17, 2011 at 09:03:23PM +0000, Dimitry Andric wrote: > Author: dim > Date: Sun Apr 17 21:03:23 2011 > New Revision: 220755 > URL: http://svn.freebsd.org/changeset/base/220755 > > Log: > Remove libobjc and other Objective-C related components, as these are > extremely outdated, and not used by anything in the base system. > > Silence from: current@ > > Deleted: > head/contrib/gcc/doc/objc.texi > head/contrib/gcc/objc/ > head/contrib/libobjc/ > head/gnu/lib/libobjc/ > head/gnu/usr.bin/cc/cc1obj/ > Modified: > head/Makefile.inc1 > head/ObsoleteFiles.inc > head/contrib/gcc/doc/cpp.1 > head/contrib/gcc/doc/cpp.texi > head/contrib/gcc/doc/cppenv.texi > head/contrib/gcc/doc/cppinternals.texi > head/contrib/gcc/doc/cppopts.texi > head/contrib/gcc/doc/extend.texi > head/contrib/gcc/doc/frontends.texi > head/contrib/gcc/doc/gcc.1 > head/contrib/gcc/doc/gcc.texi > head/contrib/gcc/doc/invoke.texi > head/contrib/gcc/doc/sourcebuild.texi > head/contrib/gcc/doc/standards.texi > head/contrib/gcc/doc/tm.texi > head/etc/mtree/BSD.include.dist > head/gnu/lib/Makefile > head/gnu/usr.bin/cc/Makefile > head/gnu/usr.bin/cc/cc_tools/Makefile > head/gnu/usr.bin/cc/doc/Makefile > head/share/mk/bsd.dep.mk > head/share/mk/bsd.lib.mk > head/share/mk/bsd.libnames.mk > head/share/mk/bsd.own.mk > head/share/mk/bsd.prog.mk > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Sun Apr 17 20:44:02 2011 (r220754) > +++ head/Makefile.inc1 Sun Apr 17 21:03:23 2011 (r220755) > @@ -306,7 +306,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR > PATH=${TMPPATH} \ > CC="${CC} ${LIB32FLAGS}" \ > CXX="${CXX} ${LIB32FLAGS}" \ > - OBJC="${OBJC} ${LIB32FLAGS}" \ > LIBDIR=/usr/lib32 \ > SHLIBDIR=/usr/lib32 > > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sun Apr 17 20:44:02 2011 (r220754) > +++ head/ObsoleteFiles.inc Sun Apr 17 21:03:23 2011 (r220755) > @@ -38,6 +38,26 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20110417: removal of Objective-C support > +OLD_FILES+=usr/include/objc/encoding.h > +OLD_FILES+=usr/include/objc/hash.h > +OLD_FILES+=usr/include/objc/NXConstStr.h > +OLD_FILES+=usr/include/objc/objc-api.h > +OLD_FILES+=usr/include/objc/objc-decls.h > +OLD_FILES+=usr/include/objc/objc-list.h > +OLD_FILES+=usr/include/objc/objc.h > +OLD_FILES+=usr/include/objc/Object.h > +OLD_FILES+=usr/include/objc/Protocol.h > +OLD_FILES+=usr/include/objc/runtime.h > +OLD_FILES+=usr/include/objc/sarray.h > +OLD_FILES+=usr/include/objc/thr.h > +OLD_FILES+=usr/include/objc/typedstream.h > +OLD_FILES+=usr/lib/libobjc.a > +OLD_FILES+=usr/lib/libobjc.so > +OLD_FILES+=usr/lib/libobjc_p.a > +OLD_FILES+=usr/libexec/cc1obj > +OLD_LIBS+=usr/lib/libobjc.so.4 > +OLD_DIRS+=usr/include/objc > # 20110224: sticky.8 -> sticky.7 > OLD_FILES+=usr/share/man/man8/sticky.8.gz > # 20110220: new clang import which bumps version from 2.8 to 2.9 > > Modified: head/contrib/gcc/doc/cpp.1 > ============================================================================== > --- head/contrib/gcc/doc/cpp.1 Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/cpp.1 Sun Apr 17 21:03:23 2011 (r220755) > @@ -153,14 +153,14 @@ before compilation. It is called a macr > you to define \fImacros\fR, which are brief abbreviations for longer > constructs. > .PP > -The C preprocessor is intended to be used only with C, \*(C+, and > -Objective-C source code. In the past, it has been abused as a general > -text processor. It will choke on input which does not obey C's lexical > -rules. For example, apostrophes will be interpreted as the beginning of > -character constants, and cause errors. Also, you cannot rely on it > -preserving characteristics of the input which are not significant to > -C\-family languages. If a Makefile is preprocessed, all the hard tabs > -will be removed, and the Makefile will not work. > +The C preprocessor is intended to be used only with C and \*(C+ source > +code. In the past, it has been abused as a general text processor. It > +will choke on input which does not obey C's lexical rules. For > +example, apostrophes will be interpreted as the beginning of character > +constants, and cause errors. Also, you cannot rely on it preserving > +characteristics of the input which are not significant to C\-family > +languages. If a Makefile is preprocessed, all the hard tabs will be > +removed, and the Makefile will not work. > .PP > Having said that, you can often get away with using cpp on things which > are not C. Other Algol-ish programming languages are often safe > @@ -482,19 +482,16 @@ header files. > .PD 0 > .IP "\fB\-x c++\fR" 4 > .IX Item "-x c++" > -.IP "\fB\-x objective-c\fR" 4 > -.IX Item "-x objective-c" > .IP "\fB\-x assembler-with-cpp\fR" 4 > .IX Item "-x assembler-with-cpp" > .PD > -Specify the source language: C, \*(C+, Objective\-C, or assembly. This has > -nothing to do with standards conformance or extensions; it merely > -selects which base syntax to expect. If you give none of these options, > -cpp will deduce the language from the extension of the source file: > -\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common > -extensions for \*(C+ and assembly are also recognized. If cpp does not > -recognize the extension, it will treat the file as C; this is the most > -generic mode. > +Specify the source language: C, \*(C+, or assembly. This has nothing > +to do with standards conformance or extensions; it merely selects which > +base syntax to expect. If you give none of these options, cpp will > +deduce the language from the extension of the source file: \&\fB.c\fR, > +\fB.cc\fR, or \fB.S\fR. Some other common extensions for \*(C+ and > +assembly are also recognized. If cpp does not recognize the extension, > +it will treat the file as C; this is the most generic mode. > .Sp > \&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option > which selected both the language and the standards conformance level. > @@ -854,8 +851,6 @@ configuration of \s-1GCC\s0. > .IX Item "C_INCLUDE_PATH" > .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 > .IX Item "CPLUS_INCLUDE_PATH" > -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 > -.IX Item "OBJC_INCLUDE_PATH" > .PD > Each variable's value is a list of directories separated by a special > character, much like \fB\s-1PATH\s0\fR, in which to look for header files. > > Modified: head/contrib/gcc/doc/cpp.texi > ============================================================================== > --- head/contrib/gcc/doc/cpp.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/cpp.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -72,9 +72,9 @@ This manual contains no Invariant Sectio > @ifnottex > @node Top > @top > -The C preprocessor implements the macro language used to transform C, > -C++, and Objective-C programs before they are compiled. It can also be > -useful on its own. > +The C preprocessor implements the macro language used to transform C > +and C++ programs before they are compiled. It can also be useful on > +its own. > > @menu > * Overview:: > @@ -186,14 +186,14 @@ before compilation. It is called a macr > you to define @dfn{macros}, which are brief abbreviations for longer > constructs. > > -The C preprocessor is intended to be used only with C, C++, and > -Objective-C source code. In the past, it has been abused as a general > -text processor. It will choke on input which does not obey C's lexical > -rules. For example, apostrophes will be interpreted as the beginning of > -character constants, and cause errors. Also, you cannot rely on it > -preserving characteristics of the input which are not significant to > -C-family languages. If a Makefile is preprocessed, all the hard tabs > -will be removed, and the Makefile will not work. > +The C preprocessor is intended to be used only with C and C++ source > +code. In the past, it has been abused as a general text processor. It > +will choke on input which does not obey C's lexical rules. For > +example, apostrophes will be interpreted as the beginning of character > +constants, and cause errors. Also, you cannot rely on it preserving > +characteristics of the input which are not significant to C-family > +languages. If a Makefile is preprocessed, all the hard tabs will be > +removed, and the Makefile will not work. > > Having said that, you can often get away with using cpp on things which > are not C@. Other Algol-ish programming languages are often safe > @@ -1878,7 +1878,7 @@ the 1999 revision of the C standard. Su > not yet complete. > > This macro is not defined if the @option{-traditional-cpp} option is > -used, nor when compiling C++ or Objective-C@. > +used, nor when compiling C++. > > @item __STDC_HOSTED__ > This macro is defined, with value 1, if the compiler's target is a > @@ -1895,11 +1895,6 @@ GNU C++ compiler is not yet fully confor > instead. It is hoped to complete the implementation of standard C++ > in the near future. > > -@item __OBJC__ > -This macro is defined, with value 1, when the Objective-C compiler is in > -use. You can use @code{__OBJC__} to test whether a header is compiled > -by a C compiler or a Objective-C compiler. > - > @item __ASSEMBLER__ > This macro is defined with value 1 when preprocessing assembly > language. > @@ -1921,9 +1916,9 @@ underscores. > @itemx __GNUC_MINOR__ > @itemx __GNUC_PATCHLEVEL__ > These macros are defined by all GNU compilers that use the C > -preprocessor: C, C++, and Objective-C@. Their values are the major > -version, minor version, and patch level of the compiler, as integer > -constants. For example, GCC 3.2.1 will define @code{__GNUC__} to 3, > +preprocessor: C and C++. Their values are the major version, minor > +version, and patch level of the compiler, as integer constants. For > +example, GCC 3.2.1 will define @code{__GNUC__} to 3, > @code{__GNUC_MINOR__} to 2, and @code{__GNUC_PATCHLEVEL__} to 1. These > macros are also defined if you invoke the preprocessor directly. > > @@ -2125,12 +2120,6 @@ general, user code should not need to ma > purpose of this macro is to ease implementation of the C++ runtime > library provided with G++. > > -@item __NEXT_RUNTIME__ > -This macro is defined, with value 1, if (and only if) the NeXT runtime > -(as in @option{-fnext-runtime}) is in use for Objective-C@. If the GNU > -runtime is used, this macro is not defined, so that you can use this > -macro to determine which runtime (NeXT or GNU) is being used. > - > @item __LP64__ > @itemx _LP64 > These macros are defined, with value 1, if (and only if) the compilation > @@ -3433,11 +3422,10 @@ produce no output, rather than a line of > @node Preprocessor Output > @chapter Preprocessor Output > > -When the C preprocessor is used with the C, C++, or Objective-C > -compilers, it is integrated into the compiler and communicates a stream > -of binary tokens directly to the compiler's parser. However, it can > -also be used in the more conventional standalone mode, where it produces > -textual output. > +When the C preprocessor is used with the C or C++ compilers, it is > +integrated into the compiler and communicates a stream of binary tokens > +directly to the compiler's parser. However, it can also be used in the > +more conventional standalone mode, where it produces textual output. > @c FIXME: Document the library interface. > > @cindex output format > @@ -4053,33 +4041,13 @@ You can also make or cancel assertions u > @node Obsolete once-only headers > @subsection Obsolete once-only headers > > -CPP supports two more ways of indicating that a header file should be > -read only once. Neither one is as portable as a wrapper @samp{#ifndef}, > -and we recommend you do not use them in new programs. > - > -@findex #import > -In the Objective-C language, there is a variant of @samp{#include} > -called @samp{#import} which includes a file, but does so at most once. > -If you use @samp{#import} instead of @samp{#include}, then you don't > -need the conditionals inside the header file to prevent multiple > -inclusion of the contents. GCC permits the use of @samp{#import} in C > -and C++ as well as Objective-C@. However, it is not in standard C or C++ > -and should therefore not be used by portable programs. > - > -@samp{#import} is not a well designed feature. It requires the users of > -a header file to know that it should only be included once. It is much > -better for the header file's implementor to write the file so that users > -don't need to know this. Using a wrapper @samp{#ifndef} accomplishes > -this goal. > - > -In the present implementation, a single use of @samp{#import} will > -prevent the file from ever being read again, by either @samp{#import} or > -@samp{#include}. You should not rely on this; do not use both > -@samp{#import} and @samp{#include} to refer to the same header file. > - > -Another way to prevent a header file from being included more than once > -is with the @samp{#pragma once} directive. If @samp{#pragma once} is > -seen when scanning a header file, that file will never be read again, no > +CPP supports one more way of indicating that a header file should be > +read only once. This is not as portable as a wrapper @samp{#ifndef}, > +and we recommend you do not use it in new programs. > + > +A way to prevent a header file from being included more than once is > +with the @samp{#pragma once} directive. If @samp{#pragma once} is seen > +when scanning a header file, that file will never be read again, no > matter what. > > @samp{#pragma once} does not have the problems that @samp{#import} does, > > Modified: head/contrib/gcc/doc/cppenv.texi > ============================================================================== > --- head/contrib/gcc/doc/cppenv.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/cppenv.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -14,9 +14,6 @@ > @item CPATH > @itemx C_INCLUDE_PATH > @itemx CPLUS_INCLUDE_PATH > -@itemx OBJC_INCLUDE_PATH > -@c Commented out until ObjC++ is part of GCC: > -@c @itemx OBJCPLUS_INCLUDE_PATH > Each variable's value is a list of directories separated by a special > character, much like @env{PATH}, in which to look for header files. > The special character, @code{PATH_SEPARATOR}, is target-dependent and > > Modified: head/contrib/gcc/doc/cppinternals.texi > ============================================================================== > --- head/contrib/gcc/doc/cppinternals.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/cppinternals.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -72,10 +72,10 @@ into another language, under the above c > > The GNU C preprocessor is > implemented as a library, @dfn{cpplib}, so it can be easily shared between > -a stand-alone preprocessor, and a preprocessor integrated with the C, > -C++ and Objective-C front ends. It is also available for use by other > -programs, though this is not recommended as its exposed interface has > -not yet reached a point of reasonable stability. > +a stand-alone preprocessor, and a preprocessor integrated with the C > +and C++ front ends. It is also available for use by other programs, > +though this is not recommended as its exposed interface has not yet > +reached a point of reasonable stability. > > The library has been written to be re-entrant, so that it can be used > to preprocess many files simultaneously if necessary. It has also been > @@ -91,7 +91,7 @@ the way they have. > > @menu > * Conventions:: Conventions used in the code. > -* Lexer:: The combined C, C++ and Objective-C Lexer. > +* Lexer:: The combined C and C++ Lexer. > * Hash Nodes:: All identifiers are entered into a hash table. > * Macro Expansion:: Macro expansion algorithm. > * Token Spacing:: Spacing and paste avoidance issues. > @@ -131,12 +131,12 @@ behavior. > > @section Overview > The lexer is contained in the file @file{lex.c}. It is a hand-coded > -lexer, and not implemented as a state machine. It can understand C, C++ > -and Objective-C source code, and has been extended to allow reasonably > -successful preprocessing of assembly language. The lexer does not make > -an initial pass to strip out trigraphs and escaped newlines, but handles > -them as they are encountered in a single pass of the input file. It > -returns preprocessing tokens individually, not a line at a time. > +lexer, and not implemented as a state machine. It can understand C and > +C++ source code, and has been extended to allow reasonably successful > +preprocessing of assembly language. The lexer does not make an initial > +pass to strip out trigraphs and escaped newlines, but handles them as > +they are encountered in a single pass of the input file. It returns > +preprocessing tokens individually, not a line at a time. > > It is mostly transparent to users of the library, since the library's > interface for obtaining the next token, @code{cpp_get_token}, takes care > @@ -303,9 +303,9 @@ don't allow the terminators of header na > @samp{"} or @samp{>} terminates the header name. > > Interpretation of some character sequences depends upon whether we are > -lexing C, C++ or Objective-C, and on the revision of the standard in > -force. For example, @samp{::} is a single token in C++, but in C it is > -two separate @samp{:} tokens and almost certainly a syntax error. Such > +lexing C or C++, and on the revision of the standard in force. For > +example, @samp{::} is a single token in C++, but in C it is two > +separate @samp{:} tokens and almost certainly a syntax error. Such > cases are handled by @code{_cpp_lex_direct} based upon command-line > flags stored in the @code{cpp_options} structure. > > > Modified: head/contrib/gcc/doc/cppopts.texi > ============================================================================== > --- head/contrib/gcc/doc/cppopts.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/cppopts.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -347,17 +347,15 @@ current directory. > @end ifclear > @item -x c > @itemx -x c++ > -@itemx -x objective-c > @itemx -x assembler-with-cpp > @opindex x > -Specify the source language: C, C++, Objective-C, or assembly. This has > -nothing to do with standards conformance or extensions; it merely > -selects which base syntax to expect. If you give none of these options, > -cpp will deduce the language from the extension of the source file: > -@samp{.c}, @samp{.cc}, @samp{.m}, or @samp{.S}. Some other common > -extensions for C++ and assembly are also recognized. If cpp does not > -recognize the extension, it will treat the file as C; this is the most > -generic mode. > +Specify the source language: C, C++, or assembly. This has nothing to > +do with standards conformance or extensions; it merely selects which > +base syntax to expect. If you give none of these options, cpp will > +deduce the language from the extension of the source file: @samp{.c}, > +@samp{.cc}, or @samp{.S}. Some other common extensions for C++ and > +assembly are also recognized. If cpp does not recognize the extension, > +it will treat the file as C; this is the most generic mode. > > @emph{Note:} Previous versions of cpp accepted a @option{-lang} option > which selected both the language and the standards conformance level. > > Modified: head/contrib/gcc/doc/extend.texi > ============================================================================== > --- head/contrib/gcc/doc/extend.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/extend.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -16,9 +16,9 @@ any of these features is used.) To test > features in conditional compilation, check for a predefined macro > @code{__GNUC__}, which is always defined under GCC@. > > -These extensions are available in C and Objective-C@. Most of them are > -also available in C++. @xref{C++ Extensions,,Extensions to the > -C++ Language}, for extensions that apply @emph{only} to C++. > +These extensions are available in C. Most of them are also available > +in C++. @xref{C++ Extensions,,Extensions to the C++ Language}, for > +extensions that apply @emph{only} to C++. > > Some features that are in ISO C99 but not C89 or C++ are also, as > extensions, accepted by GCC in C89 mode and in C++. > @@ -1716,8 +1716,6 @@ been called. Functions with these attri > initializing data that will be used implicitly during the execution of > the program. > > -These attributes are not currently implemented for Objective-C@. > - > @item deprecated > @cindex @code{deprecated} attribute. > The @code{deprecated} attribute results in a warning if the function > @@ -2605,9 +2603,9 @@ Preprocessing Directives, cpp, The GNU C > > This section describes the syntax with which @code{__attribute__} may be > used, and the constructs to which attribute specifiers bind, for the C > -language. Some details may vary for C++ and Objective-C@. Because of > -infelicities in the grammar for attributes, some forms described here > -may not be successfully parsed in all cases. > +language. Some details may vary for C++. Because of infelicities in > +the grammar for attributes, some forms described here may not be > +successfully parsed in all cases. > > There are some problems with the semantics of attributes in C++. For > example, there are no manglings for attributes, although they may affect > @@ -9896,9 +9894,8 @@ The Solaris target supports @code{#pragm > Increase the minimum alignment of each @var{variable} to @var{alignment}. > This is the same as GCC's @code{aligned} attribute @pxref{Variable > Attributes}). Macro expansion occurs on the arguments to this pragma > -when compiling C and Objective-C. It does not currently occur when > -compiling C++, but this is a bug which may be fixed in a future > -release. > +when compiling C. It does not currently occur when compiling C++, but > +this is a bug which may be fixed in a future release. > > @item fini (@var{function} [, @var{function}]...) > @cindex pragma, fini > > Modified: head/contrib/gcc/doc/frontends.texi > ============================================================================== > --- head/contrib/gcc/doc/frontends.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/frontends.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -12,13 +12,10 @@ > @cindex Ada > @cindex Fortran > @cindex Java > -@cindex Objective-C > -@cindex Objective-C++ > @cindex treelang > GCC stands for ``GNU Compiler Collection''. GCC is an integrated > distribution of compilers for several major programming languages. These > -languages currently include C, C++, Objective-C, Objective-C++, Java, > -Fortran, and Ada. > +languages currently include C, C++, Java, Fortran, and Ada. > > The abbreviation @dfn{GCC} has multiple meanings in common use. The > current official meaning is ``GNU Compiler Collection'', which refers > @@ -59,5 +56,4 @@ have been implemented as ``preprocessors > level language such as C@. None of the compilers included in GCC are > implemented this way; they all generate machine code directly. This > sort of preprocessor should not be confused with the @dfn{C > -preprocessor}, which is an integral feature of the C, C++, Objective-C > -and Objective-C++ languages. > +preprocessor}, which is an integral feature of the C and C++ languages. > > Modified: head/contrib/gcc/doc/gcc.1 > ============================================================================== > --- head/contrib/gcc/doc/gcc.1 Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/gcc.1 Sun Apr 17 21:03:23 2011 (r220755) > @@ -219,22 +219,6 @@ in the following sections. > \&\-Wno\-non\-template\-friend \-Wold\-style\-cast > \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions > \&\-Wsign\-promo\fR > -.IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4 > -.IX Item "Objective-C and Objective- Language Options" > -\&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR > -\&\fB\-fgnu\-runtime \-fnext\-runtime > -\&\-fno\-nil\-receivers > -\&\-fobjc\-call\-cxx\-cdtors > -\&\-fobjc\-direct\-dispatch > -\&\-fobjc\-exceptions > -\&\-fobjc\-gc > -\&\-freplace\-objc\-classes > -\&\-fzero\-link > -\&\-gen\-decls > -\&\-Wassign\-intercept > -\&\-Wno\-protocol \-Wselector > -\&\-Wstrict\-selector\-match > -\&\-Wundeclared\-selector\fR > .IP "\fILanguage Independent Options\fR" 4 > .IX Item "Language Independent Options" > \&\fB\-fmessage\-length=\fR\fIn\fR > @@ -815,29 +799,9 @@ C source code which should not be prepro > .IP "\fIfile\fR\fB.ii\fR" 4 > .IX Item "file.ii" > \&\*(C+ source code which should not be preprocessed. > -.IP "\fIfile\fR\fB.m\fR" 4 > -.IX Item "file.m" > -Objective-C source code. Note that you must link with the \fIlibobjc\fR > -library to make an Objective-C program work. > -.IP "\fIfile\fR\fB.mi\fR" 4 > -.IX Item "file.mi" > -Objective-C source code which should not be preprocessed. > -.IP "\fIfile\fR\fB.mm\fR" 4 > -.IX Item "file.mm" > -.PD 0 > -.IP "\fIfile\fR\fB.M\fR" 4 > -.IX Item "file.M" > -.PD > -Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR > -library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers > -to a literal capital M. > -.IP "\fIfile\fR\fB.mii\fR" 4 > -.IX Item "file.mii" > -Objective\-\*(C+ source code which should not be preprocessed. > .IP "\fIfile\fR\fB.h\fR" 4 > .IX Item "file.h" > -C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a > -precompiled header. > +C, or \*(C+ header file to be turned into a precompiled header. > .IP "\fIfile\fR\fB.cc\fR" 4 > .IX Item "file.cc" > .PD 0 > @@ -857,16 +821,6 @@ precompiled header. > \&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR, > the last two letters must both be literally \fBx\fR. Likewise, > \&\fB.C\fR refers to a literal capital C. > -.IP "\fIfile\fR\fB.mm\fR" 4 > -.IX Item "file.mm" > -.PD 0 > -.IP "\fIfile\fR\fB.M\fR" 4 > -.IX Item "file.M" > -.PD > -Objective\-\*(C+ source code which must be preprocessed. > -.IP "\fIfile\fR\fB.mii\fR" 4 > -.IX Item "file.mii" > -Objective\-\*(C+ source code which should not be preprocessed. > .IP "\fIfile\fR\fB.hh\fR" 4 > .IX Item "file.hh" > .PD 0 > @@ -941,8 +895,6 @@ the next \fB\-x\fR option. Possible val > .Vb 9 > \& c c-header c-cpp-output > \& c++ c++-header c++-cpp-output > -\& objective-c objective-c-header objective-c-cpp-output > -\& objective-c++ objective-c++-header objective-c++-cpp-output > \& assembler assembler-with-cpp > \& ada > \& f95 f95-cpp-input > @@ -1095,8 +1047,7 @@ languages; or options that are meaningfu > .Sh "Options Controlling C Dialect" > .IX Subsection "Options Controlling C Dialect" > The following options control the dialect of C (or languages derived > -from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler > -accepts: > +from C, such as \*(C+) that the compiler accepts: > .IP "\fB\-ansi\fR" 4 > .IX Item "-ansi" > In C mode, support all \s-1ISO\s0 C90 programs. In \*(C+ mode, > @@ -1840,251 +1791,6 @@ unsignedness, but the standard mandates > .Sp > In this example, G++ will synthesize a default \fBA& operator = > (const A&);\fR, while cfront will use the user-defined \fBoperator =\fR. > -.Sh "Options Controlling Objective-C and Objective\-\*(C+ Dialects" > -.IX Subsection "Options Controlling Objective-C and Objective- Dialects" > -(\s-1NOTE:\s0 This manual does not describe the Objective-C and Objective\-\*(C+ > -languages themselves. See > -.PP > -This section describes the command-line options that are only meaningful > -for Objective-C and Objective\-\*(C+ programs, but you can also use most of > -the language-independent \s-1GNU\s0 compiler options. > -For example, you might compile a file \f(CW\*(C`some_class.m\*(C'\fR like this: > -.PP > -.Vb 1 > -\& gcc -g -fgnu-runtime -O -c some_class.m > -.Ve > -.PP > -In this example, \fB\-fgnu\-runtime\fR is an option meant only for > -Objective-C and Objective\-\*(C+ programs; you can use the other options with > -any language supported by \s-1GCC\s0. > -.PP > -Note that since Objective-C is an extension of the C language, Objective-C > -compilations may also use options specific to the C front-end (e.g., > -\&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations may use > -\&\*(C+\-specific options (e.g., \fB\-Wabi\fR). > -.PP > -Here is a list of options that are \fIonly\fR for compiling Objective-C > -and Objective\-\*(C+ programs: > -.IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4 > -.IX Item "-fconstant-string-class=class-name" > -Use \fIclass-name\fR as the name of the class to instantiate for each > -literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default > -class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 runtime is being used, and > -\&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being used (see below). The > -\&\fB\-fconstant\-cfstrings\fR option, if also present, will override the > -\&\fB\-fconstant\-string\-class\fR setting and cause \f(CW\*(C`@"..."\*(C'\fR literals > -to be laid out as constant CoreFoundation strings. > -.IP "\fB\-fgnu\-runtime\fR" 4 > -.IX Item "-fgnu-runtime" > -Generate object code compatible with the standard \s-1GNU\s0 Objective-C > -runtime. This is the default for most types of systems. > -.IP "\fB\-fnext\-runtime\fR" 4 > -.IX Item "-fnext-runtime" > -Generate output compatible with the NeXT runtime. This is the default > -for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X. The macro > -\&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only if) this option is > -used. > -.IP "\fB\-fno\-nil\-receivers\fR" 4 > -.IX Item "-fno-nil-receivers" > -Assume that all Objective-C message dispatches (e.g., > -\&\f(CW\*(C`[receiver message:arg]\*(C'\fR) in this translation unit ensure that the receiver > -is not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the runtime > -to be used. Currently, this option is only available in conjunction with > -the NeXT runtime on Mac \s-1OS\s0 X 10.3 and later. > -.IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4 > -.IX Item "-fobjc-call-cxx-cdtors" > -For each Objective-C class, check if any of its instance variables is a > -\&\*(C+ object with a non-trivial default constructor. If so, synthesize a > -special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method that will run > -non-trivial default constructors on any such instance variables, in order, > -and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable > -is a \*(C+ object with a non-trivial destructor, and if so, synthesize a > -special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method that will run > -all such default destructors, in reverse order. > -.Sp > -The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and/or \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods > -thusly generated will only operate on instance variables declared in the > -current Objective-C class, and not those inherited from superclasses. It > -is the responsibility of the Objective-C runtime to invoke all such methods > -in an object's inheritance hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods > -will be invoked by the runtime immediately after a new object > -instance is allocated; the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods will > -be invoked immediately before the runtime deallocates an object instance. > -.Sp > -As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 and later has > -support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and > -\&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods. > -.IP "\fB\-fobjc\-direct\-dispatch\fR" 4 > -.IX Item "-fobjc-direct-dispatch" > -Allow fast jumps to the message dispatcher. On Darwin this is > -accomplished via the comm page. > -.IP "\fB\-fobjc\-exceptions\fR" 4 > -.IX Item "-fobjc-exceptions" > -Enable syntactic support for structured exception handling in Objective\-C, > -similar to what is offered by \*(C+ and Java. This option is > -unavailable in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.2 and > -earlier. > -.Sp > -.Vb 23 > -\& @try { > -\& ... > -\& @throw expr; > -\& ... > -\& } > -\& @catch (AnObjCClass *exc) { > -\& ... > -\& @throw expr; > -\& ... > -\& @throw; > -\& ... > -\& } > -\& @catch (AnotherClass *exc) { > -\& ... > -\& } > -\& @catch (id allOthers) { > -\& ... > -\& } > -\& @finally { > -\& ... > -\& @throw expr; > -\& ... > -\& } > -.Ve > -.Sp > -The \f(CW@throw\fR statement may appear anywhere in an Objective-C or > -Objective\-\*(C+ program; when used inside of a \f(CW@catch\fR block, the > -\&\f(CW@throw\fR may appear without an argument (as shown above), in which case > -the object caught by the \f(CW@catch\fR will be rethrown. > -.Sp > -Note that only (pointers to) Objective-C objects may be thrown and > -caught using this scheme. When an object is thrown, it will be caught > -by the nearest \f(CW@catch\fR clause capable of handling objects of that type, > -analogously to how \f(CW\*(C`catch\*(C'\fR blocks work in \*(C+ and Java. A > -\&\f(CW\*(C`@catch(id ...)\*(C'\fR clause (as shown above) may also be provided to catch > -any and all Objective-C exceptions not caught by previous \f(CW@catch\fR > -clauses (if any). > -.Sp > -The \f(CW@finally\fR clause, if present, will be executed upon exit from the > -immediately preceding \f(CW\*(C`@try ... @catch\*(C'\fR section. This will happen > -regardless of whether any exceptions are thrown, caught or rethrown > -inside the \f(CW\*(C`@try ... @catch\*(C'\fR section, analogously to the behavior > -of the \f(CW\*(C`finally\*(C'\fR clause in Java. > -.Sp > -There are several caveats to using the new exception mechanism: > -.RS 4 > -.IP "*" 4 > -Although currently designed to be binary compatible with \f(CW\*(C`NS_HANDLER\*(C'\fR\-style > -idioms provided by the \f(CW\*(C`NSException\*(C'\fR class, the new > -exceptions can only be used on Mac \s-1OS\s0 X 10.3 (Panther) and later > -systems, due to additional functionality needed in the (NeXT) Objective-C > -runtime. > -.IP "*" 4 > -As mentioned above, the new exceptions do not support handling > -types other than Objective-C objects. Furthermore, when used from > -Objective\-\*(C+, the Objective-C exception model does not interoperate with \*(C+ > -exceptions at this time. This means you cannot \f(CW@throw\fR an exception > -from Objective-C and \f(CW\*(C`catch\*(C'\fR it in \*(C+, or vice versa > -(i.e., \f(CW\*(C`throw ... @catch\*(C'\fR). > -.RE > -.RS 4 > -.Sp > -The \fB\-fobjc\-exceptions\fR switch also enables the use of synchronization > -blocks for thread-safe execution: > -.Sp > -.Vb 3 > -\& @synchronized (ObjCClass *guard) { > -\& ... > -\& } > -.Ve > -.Sp > -Upon entering the \f(CW@synchronized\fR block, a thread of execution shall > -first check whether a lock has been placed on the corresponding \f(CW\*(C`guard\*(C'\fR > -object by another thread. If it has, the current thread shall wait until > -the other thread relinquishes its lock. Once \f(CW\*(C`guard\*(C'\fR becomes available, > -the current thread will place its own lock on it, execute the code contained in > -the \f(CW@synchronized\fR block, and finally relinquish the lock (thereby > -making \f(CW\*(C`guard\*(C'\fR available to other threads). > -.Sp > -Unlike Java, Objective-C does not allow for entire methods to be marked > -\&\f(CW@synchronized\fR. Note that throwing exceptions out of > -\&\f(CW@synchronized\fR blocks is allowed, and will cause the guarding object > -to be unlocked properly. > -.RE > -.IP "\fB\-fobjc\-gc\fR" 4 > -.IX Item "-fobjc-gc" > -Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+ programs. > -.IP "\fB\-freplace\-objc\-classes\fR" 4 > -.IX Item "-freplace-objc-classes" > -Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in > -the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at > -run time instead. This is used in conjunction with the Fix-and-Continue > -debugging mode, where the object file in question may be recompiled and > -dynamically reloaded in the course of program execution, without the need > -to restart the program itself. Currently, Fix-and-Continue functionality > -is only available in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.3 > -and later. > -.IP "\fB\-fzero\-link\fR" 4 > -.IX Item "-fzero-link" > -When compiling for the NeXT runtime, the compiler ordinarily replaces calls > -to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at > -compile time) with static class references that get initialized at load time, > -which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag > -suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR > -to be retained. This is useful in Zero-Link debugging mode, since it allows > -for individual class implementations to be modified during program execution. > -.IP "\fB\-gen\-decls\fR" 4 > -.IX Item "-gen-decls" > -Dump interface declarations for all classes seen in the source file to a > -file named \fI\fIsourcename\fI.decl\fR. > -.IP "\fB\-Wassign\-intercept\fR" 4 > -.IX Item "-Wassign-intercept" > -Warn whenever an Objective-C assignment is being intercepted by the > -garbage collector. > -.IP "\fB\-Wno\-protocol\fR" 4 > -.IX Item "-Wno-protocol" > -If a class is declared to implement a protocol, a warning is issued for > -every method in the protocol that is not implemented by the class. The > -default behavior is to issue a warning for every method not explicitly > -implemented in the class, even if a method implementation is inherited > -from the superclass. If you use the \fB\-Wno\-protocol\fR option, then > -methods inherited from the superclass are considered to be implemented, > -and no warning is issued for them. > -.IP "\fB\-Wselector\fR" 4 > -.IX Item "-Wselector" > -Warn if multiple methods of different types for the same selector are > -found during compilation. The check is performed on the list of methods > -in the final stage of compilation. Additionally, a check is performed > -for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR > -expression, and a corresponding method for that selector has been found > -during compilation. Because these checks scan the method table only at > -the end of compilation, these warnings are not produced if the final > -stage of compilation is not reached, for example because an error is > -found during compilation, or because the \fB\-fsyntax\-only\fR option is > -being used. > -.IP "\fB\-Wstrict\-selector\-match\fR" 4 > -.IX Item "-Wstrict-selector-match" > -Warn if multiple methods with differing argument and/or return types are > -found for a given selector when attempting to send a message using this > -selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag > -is off (which is the default behavior), the compiler will omit such warnings > -if any differences found are confined to types which share the same size > -and alignment. > -.IP "\fB\-Wundeclared\-selector\fR" 4 > -.IX Item "-Wundeclared-selector" > -Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an > -undeclared selector is found. A selector is considered undeclared if no > -method with that name has been declared before the > -\&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in an > -\&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly in > -an \f(CW@implementation\fR section. This option always performs its > -checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found, > -while \fB\-Wselector\fR only performs its checks in the final stage of > -compilation. This also enforces the coding style convention > -that methods and selectors must be declared before being used. > -.IP "\fB\-print\-objc\-runtime\-info\fR" 4 > -.IX Item "-print-objc-runtime-info" > -Generate C header describing the largest structure that is passed by > -value, if any. > .Sh "Options to Control Diagnostic Messages Formatting" > .IX Subsection "Options to Control Diagnostic Messages Formatting" > Traditionally, diagnostic messages have been formatted irrespective of > @@ -2136,8 +1842,7 @@ two forms, whichever is not the default. > .PP > The following options control the amount and kinds of warnings produced > by \s-1GCC\s0; for further, language-specific options also refer to > -\&\fB\*(C+ Dialect Options\fR and \fBObjective-C and Objective\-\*(C+ Dialect > -Options\fR. > +\&\fB\*(C+ Dialect Options\fR. > .IP "\fB\-fsyntax\-only\fR" 4 > .IX Item "-fsyntax-only" > Check the code for syntax errors, but don't do anything beyond that. > @@ -2287,8 +1992,8 @@ requiring a non-null value by the \f(CW\ > .Sp > \&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. It > can be disabled with the \fB\-Wno\-nonnull\fR option. > -.IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 > -.IX Item "-Winit-self (C, , Objective-C and Objective- only)" > +.IP "\fB\-Winit\-self\fR (C, \*(C+ only)" 4 > +.IX Item "-Winit-self (C, only)" > Warn about uninitialized variables which are initialized with themselves. > Note this option can only be used with the \fB\-Wuninitialized\fR option, > which in turn only works with \fB\-O1\fR and above. > @@ -2339,8 +2044,8 @@ bracketed, but that for \fBb\fR is fully > .Ve > .Sp > This warning is enabled by \fB\-Wall\fR. > -.IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 > -.IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- only)" > +.IP "\fB\-Wmissing\-include\-dirs\fR (C and \*(C+ only)" 4 > +.IX Item "-Wmissing-include-dirs (C, only)" > Warn if a user-supplied include directory does not exist. > .IP "\fB\-Wparentheses\fR" 4 > .IX Item "-Wparentheses" > @@ -2675,8 +2380,7 @@ All of the above \fB\-W\fR options combi > warnings about constructions that some users consider questionable, and > that are easy to avoid (or modify to prevent the warning), even in > conjunction with macros. This also enables some language-specific > -warnings described in \fB\*(C+ Dialect Options\fR and > -\&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR. > +warnings described in \fB\*(C+ Dialect Options\fR. > .PP > The following \fB\-W...\fR options are not implied by \fB\-Wall\fR. > Some of them warn about constructions that users generally do not > @@ -3224,8 +2928,8 @@ itself is likely to take inordinate amou > .IP "\fB\-Wpointer\-sign\fR" 4 > .IX Item "-Wpointer-sign" > Warn for pointer argument passing or assignment with different signedness. > -This option is only supported for C and Objective\-C. It is implied by > -\&\fB\-Wall\fR and by \fB\-pedantic\fR, which can be disabled with > +This option is only supported for C. It is implied by \&\fB\-Wall\fR > +and by \fB\-pedantic\fR, which can be disabled with > \&\fB\-Wno\-pointer\-sign\fR. > .IP "\fB\-Werror\fR" 4 > .IX Item "-Werror" > @@ -6294,12 +5998,10 @@ current directory. > .PD 0 > .IP "\fB\-x c++\fR" 4 > .IX Item "-x c++" > -.IP "\fB\-x objective-c\fR" 4 > -.IX Item "-x objective-c" > .IP "\fB\-x assembler-with-cpp\fR" 4 > .IX Item "-x assembler-with-cpp" > .PD > -Specify the source language: C, \*(C+, Objective\-C, or assembly. This has > +Specify the source language: C, \*(C+, or assembly. This has > nothing to do with standards conformance or extensions; it merely > selects which base syntax to expect. If you give none of these options, > cpp will deduce the language from the extension of the source file: > @@ -6728,10 +6430,6 @@ ordinary object file, it is linked in th > difference between using an \fB\-l\fR option and specifying a file name > is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR > and searches several directories. > -.IP "\fB\-lobjc\fR" 4 > -.IX Item "-lobjc" > -You need this special case of the \fB\-l\fR option in order to > -link an Objective-C or Objective\-\*(C+ program. > .IP "\fB\-nostartfiles\fR" 4 > .IX Item "-nostartfiles" > Do not use the standard system startup files when linking. > @@ -13035,8 +12733,6 @@ preprocessor. > .IX Item "C_INCLUDE_PATH" > .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 > .IX Item "CPLUS_INCLUDE_PATH" > -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 > -.IX Item "OBJC_INCLUDE_PATH" > .PD > Each variable's value is a list of directories separated by a special > character, much like \fB\s-1PATH\s0\fR, in which to look for header files. > > Modified: head/contrib/gcc/doc/gcc.texi > ============================================================================== > --- head/contrib/gcc/doc/gcc.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/gcc.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -129,7 +129,6 @@ Introduction, gccint, GNU Compiler Colle > * C Implementation:: How GCC implements the ISO C specification. > * C Extensions:: GNU extensions to the C language family. > * C++ Extensions:: GNU extensions to the C++ language. > -* Objective-C:: GNU Objective-C runtime features. > * Compatibility:: Binary Compatibility > * Gcov:: @command{gcov}---a test coverage program. > * Trouble:: If you have trouble using GCC. > @@ -154,7 +153,6 @@ Introduction, gccint, GNU Compiler Colle > @include invoke.texi > @include implement-c.texi > @include extend.texi > -@include objc.texi > @include compat.texi > @include gcov.texi > @include trouble.texi > > Modified: head/contrib/gcc/doc/invoke.texi > ============================================================================== > --- head/contrib/gcc/doc/invoke.texi Sun Apr 17 20:44:02 2011 (r220754) > +++ head/contrib/gcc/doc/invoke.texi Sun Apr 17 21:03:23 2011 (r220755) > @@ -124,8 +124,6 @@ only one of these two forms, whichever o > * Invoking G++:: Compiling C++ programs. > * C Dialect Options:: Controlling the variant of C language compiled. > * C++ Dialect Options:: Variations on C++. > -* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C > - and Objective-C++. > * Language Independent Options:: Controlling how diagnostics should be > formatted. > * Warning Options:: How picky should the compiler be? > @@ -195,24 +193,6 @@ in the following sections. > -Woverloaded-virtual -Wno-pmf-conversions @gol > -Wsign-promo} > > -@item Objective-C and Objective-C++ Language Options > -@xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling > -Objective-C and Objective-C++ Dialects}. > -@gccoptlist{-fconstant-string-class=@var{class-name} @gol > --fgnu-runtime -fnext-runtime @gol > --fno-nil-receivers @gol > --fobjc-call-cxx-cdtors @gol > --fobjc-direct-dispatch @gol > --fobjc-exceptions @gol > --fobjc-gc @gol > --freplace-objc-classes @gol > --fzero-link @gol > --gen-decls @gol > --Wassign-intercept @gol > --Wno-protocol -Wselector @gol > --Wstrict-selector-match @gol > --Wundeclared-selector} > - > @item Language Independent Options > @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. > @gccoptlist{-fmessage-length=@var{n} @gol > @@ -795,8 +775,6 @@ See S/390 and zSeries Options. > or preprocessed source. > * C Dialect Options:: Controlling the variant of C language compiled. > * C++ Dialect Options:: Variations on C++. > -* Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C > - and Objective-C++. > * Language Independent Options:: Controlling how diagnostics should be > formatted. > * Warning Options:: How picky should the compiler be? > @@ -837,25 +815,8 @@ C source code which should not be prepro > @item @var{file}.ii > C++ source code which should not be preprocessed. > > -@item @var{file}.m > -Objective-C source code. Note that you must link with the @file{libobjc} > -library to make an Objective-C program work. > - > -@item @var{file}.mi > -Objective-C source code which should not be preprocessed. > - > -@item @var{file}.mm > -@itemx @var{file}.M > -Objective-C++ source code. Note that you must link with the @file{libobjc} > -library to make an Objective-C++ program work. Note that @samp{.M} refers > -to a literal capital M@. > - > -@item @var{file}.mii > -Objective-C++ source code which should not be preprocessed. > - > @item @var{file}.h > -C, C++, Objective-C or Objective-C++ header file to be turned into a > -precompiled header. > +C, or C++ header file to be turned into a precompiled header. > > @item @var{file}.cc > @itemx @var{file}.cp > @@ -868,13 +829,6 @@ C++ source code which must be preprocess > the last two letters must both be literally @samp{x}. Likewise, > @samp{.C} refers to a literal capital C@. > > -@item @var{file}.mm > -@itemx @var{file}.M > -Objective-C++ source code which must be preprocessed. > - > -@item @var{file}.mii > -Objective-C++ source code which should not be preprocessed. > - > @item @var{file}.hh > @itemx @var{file}.H > C++ header file to be turned into a precompiled header. > @@ -946,8 +900,6 @@ the next @option{-x} option. Possible v > @smallexample > c c-header c-cpp-output > c++ c++-header c++-cpp-output > -objective-c objective-c-header objective-c-cpp-output > -objective-c++ objective-c++-header objective-c++-cpp-output > assembler assembler-with-cpp > ada > f95 f95-cpp-input > @@ -1121,8 +1073,7 @@ explanations of options that are meaning > @cindex options, dialect > > The following options control the dialect of C (or languages derived > -from C, such as C++, Objective-C and Objective-C++) that the compiler > -accepts: > +from C, such as C++) that the compiler accepts: > > @table @gcctabopt > @cindex ANSI support > @@ -1955,278 +1906,6 @@ In this example, G++ will synthesize a d > (const A&);}, while cfront will use the user-defined @samp{operator =}. > @end table > > -@node Objective-C and Objective-C++ Dialect Options > -@section Options Controlling Objective-C and Objective-C++ Dialects > - > -@cindex compiler options, Objective-C and Objective-C++ > -@cindex Objective-C and Objective-C++ options, command line > -@cindex options, Objective-C and Objective-C++ > -(NOTE: This manual does not describe the Objective-C and Objective-C++ > -languages themselves. See @xref{Standards,,Language Standards > -Supported by GCC}, for references.) > - > -This section describes the command-line options that are only meaningful > -for Objective-C and Objective-C++ programs, but you can also use most of > -the language-independent GNU compiler options. > -For example, you might compile a file @code{some_class.m} like this: > - > -@smallexample > -gcc -g -fgnu-runtime -O -c some_class.m > -@end smallexample > - > -@noindent > -In this example, @option{-fgnu-runtime} is an option meant only for > -Objective-C and Objective-C++ programs; you can use the other options with > -any language supported by GCC@. > - > -Note that since Objective-C is an extension of the C language, Objective-C > -compilations may also use options specific to the C front-end (e.g., > -@option{-Wtraditional}). Similarly, Objective-C++ compilations may use > -C++-specific options (e.g., @option{-Wabi}). > - > -Here is a list of options that are @emph{only} for compiling Objective-C > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 08:01:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60FCD1065674; Mon, 18 Apr 2011 08:01:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id EFF848FC13; Mon, 18 Apr 2011 08:01:25 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3I81Hn5076815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2011 11:01:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3I81GgK032569; Mon, 18 Apr 2011 11:01:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3I81GfE032568; Mon, 18 Apr 2011 11:01:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 Apr 2011 11:01:16 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20110418080116.GW48734@deviant.kiev.zoral.com.ua> References: <201104172304.p3HN44mq052335@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="szdyR02yM8NCQUEm" Content-Disposition: inline In-Reply-To: <201104172304.p3HN44mq052335@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220761 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 08:01:26 -0000 --szdyR02yM8NCQUEm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 17, 2011 at 11:04:04PM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Sun Apr 17 23:04:03 2011 > New Revision: 220761 > URL: http://svn.freebsd.org/changeset/base/220761 >=20 > Log: > Add checks for MNTK_UNMOUNTF at the beginning of three > functions, so that threads don't get stuck in them during > a forced dismount. nfs_sync/VFS_SYNC() needs this, since it is > called by dounmount() before VFS_UNMOUNT(). The nfscl_nget() > case makes sure that a thread doing an VOP_OPEN() or > VOP_ADVLOCK() call doesn't get blocked before attempting > the RPC. Attempting RPCs don't block, since they all > fail once a forced dismount is in progress. > The third one at the beginning of nfsrpc_close() > is done so threads don't get blocked while doing VOP_INACTIVE() > as the vnodes are cleared out. > With these three changes plus a change to the umount(1) > command so that it doesn't do "sync()" for the forced case > seem to make forced dismounts work for the experimental NFS > client. > =20 > MFC after: 2 weeks >=20 > Modified: > head/sys/fs/nfsclient/nfs_clrpcops.c > head/sys/fs/nfsclient/nfs_clstate.c > head/sys/fs/nfsclient/nfs_clvfsops.c >=20 > Modified: head/sys/fs/nfsclient/nfs_clrpcops.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/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 22:31:36 2011 (r22076= 0) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 23:04:03 2011 (r22076= 1) > @@ -567,6 +567,11 @@ nfsrpc_close(vnode_t vp, int doclose, NF > =20 > if (vnode_vtype(vp) !=3D VREG) > return (0); > + > + /* For forced unmounts, just return. */ > + if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) !=3D 0) > + return (0); > + Is there anything that would prevent the MNTK_UNMOUNTF flag from being set immediately after the test returned success ? Usually, the tests for MNTK_UNMOUNTF are bugs. I coould see how terminating the RPCs would be useful for forced unmounts, but do not think that preventing entry into close would help. > if (doclose) > error =3D nfscl_doclose(vp, &clp, p); > else >=20 --szdyR02yM8NCQUEm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2r78wACgkQC3+MBN1Mb4hKTQCg8IKS2khsSP6wDZDpptqWZhkw 2hoAn1rlDJiQyIzoLbPbArJ82JAxwg/S =XNcI -----END PGP SIGNATURE----- --szdyR02yM8NCQUEm-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 08:49:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 932AD1065670; Mon, 18 Apr 2011 08:49:25 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81B8B8FC08; Mon, 18 Apr 2011 08:49: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 p3I8nP1f064527; Mon, 18 Apr 2011 08:49:25 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I8nPrR064525; Mon, 18 Apr 2011 08:49:25 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104180849.p3I8nPrR064525@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 18 Apr 2011 08:49: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: r220765 - stable/8/lib/libdevstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 08:49:25 -0000 Author: pluknet Date: Mon Apr 18 08:49:25 2011 New Revision: 220765 URL: http://svn.freebsd.org/changeset/base/220765 Log: MFC r220319: Do not increment num_args if strsep(3) returned an empty field. That fixes devstat_buildmatch(3) crashes with certain strings. Reported by: arundel Modified: stable/8/lib/libdevstat/devstat.c Directory Properties: stable/8/lib/libdevstat/ (props changed) Modified: stable/8/lib/libdevstat/devstat.c ============================================================================== --- stable/8/lib/libdevstat/devstat.c Mon Apr 18 01:02:43 2011 (r220764) +++ stable/8/lib/libdevstat/devstat.c Mon Apr 18 08:49:25 2011 (r220765) @@ -1014,11 +1014,12 @@ devstat_buildmatch(char *match_str, stru * Break the (comma delimited) input string out into separate strings. */ for (tempstr = tstr, num_args = 0; - (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5); - num_args++) - if (**tempstr != '\0') + (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5);) + if (**tempstr != '\0') { + num_args++; if (++tempstr >= &tstr[5]) break; + } /* The user gave us too many type arguments */ if (num_args > 3) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 08:53:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58183106564A; Mon, 18 Apr 2011 08:53:23 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 469248FC16; Mon, 18 Apr 2011 08:53: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 p3I8rNqJ064659; Mon, 18 Apr 2011 08:53:23 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I8rN58064657; Mon, 18 Apr 2011 08:53:23 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104180853.p3I8rN58064657@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 18 Apr 2011 08:53:23 +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: r220766 - stable/7/lib/libdevstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 08:53:23 -0000 Author: pluknet Date: Mon Apr 18 08:53:22 2011 New Revision: 220766 URL: http://svn.freebsd.org/changeset/base/220766 Log: MFC r220319: Do not increment num_args if strsep(3) returned an empty field. That fixes devstat_buildmatch(3) crashes with certain strings. Reported by: arundel Modified: stable/7/lib/libdevstat/devstat.c Directory Properties: stable/7/lib/libdevstat/ (props changed) Modified: stable/7/lib/libdevstat/devstat.c ============================================================================== --- stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:49:25 2011 (r220765) +++ stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:53:22 2011 (r220766) @@ -1014,11 +1014,12 @@ devstat_buildmatch(char *match_str, stru * Break the (comma delimited) input string out into separate strings. */ for (tempstr = tstr, num_args = 0; - (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5); - num_args++) - if (**tempstr != '\0') + (*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5);) + if (**tempstr != '\0') { + num_args++; if (++tempstr >= &tstr[5]) break; + } /* The user gave us too many type arguments */ if (num_args > 3) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 09:10:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8B7A106566C; Mon, 18 Apr 2011 09:10:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7D398FC18; Mon, 18 Apr 2011 09:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3I9ARTc065052; Mon, 18 Apr 2011 09:10:27 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I9ARJh065050; Mon, 18 Apr 2011 09:10:27 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104180910.p3I9ARJh065050@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 18 Apr 2011 09:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220767 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 09:10:27 -0000 Author: ae Date: Mon Apr 18 09:10:27 2011 New Revision: 220767 URL: http://svn.freebsd.org/changeset/base/220767 Log: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius MFC after: 1 week Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c ============================================================================== --- head/sys/netgraph/ng_patch.c Mon Apr 18 08:53:22 2011 (r220766) +++ head/sys/netgraph/ng_patch.c Mon Apr 18 09:10:27 2011 (r220767) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 09:12:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B80C8106564A; Mon, 18 Apr 2011 09:12:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A452B8FC0C; Mon, 18 Apr 2011 09:12: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 p3I9CSwS065181; Mon, 18 Apr 2011 09:12:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I9CSqE065139; Mon, 18 Apr 2011 09:12:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104180912.p3I9CSqE065139@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 09:12: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: r220768 - in head/sys/netgraph: . atm/ccatm atm/sscfu atm/sscop atm/uni bluetooth/hci bluetooth/l2cap netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 09:12:28 -0000 Author: glebius Date: Mon Apr 18 09:12:27 2011 New Revision: 220768 URL: http://svn.freebsd.org/changeset/base/220768 Log: Node constructor methods are supposed to be called in syscall context always. Convert nodes to consistently use M_WAITOK flag for memory allocation. Reviewed by: julian Modified: head/sys/netgraph/atm/ccatm/ng_ccatm.c head/sys/netgraph/atm/sscfu/ng_sscfu.c head/sys/netgraph/atm/sscop/ng_sscop.c head/sys/netgraph/atm/uni/ng_uni.c head/sys/netgraph/bluetooth/hci/ng_hci_main.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/ng_UI.c head/sys/netgraph/ng_async.c head/sys/netgraph/ng_atmllc.c head/sys/netgraph/ng_bridge.c head/sys/netgraph/ng_car.c head/sys/netgraph/ng_cisco.c head/sys/netgraph/ng_device.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_etf.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_frame_relay.c head/sys/netgraph/ng_gif_demux.c head/sys/netgraph/ng_hub.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_ksocket.c head/sys/netgraph/ng_l2tp.c head/sys/netgraph/ng_lmi.c head/sys/netgraph/ng_mppc.c head/sys/netgraph/ng_nat.c head/sys/netgraph/ng_one2many.c head/sys/netgraph/ng_pipe.c head/sys/netgraph/ng_ppp.c head/sys/netgraph/ng_pppoe.c head/sys/netgraph/ng_pptpgre.c head/sys/netgraph/ng_rfc1490.c head/sys/netgraph/ng_sample.c head/sys/netgraph/ng_source.c head/sys/netgraph/ng_split.c head/sys/netgraph/ng_sppp.c head/sys/netgraph/ng_tee.c head/sys/netgraph/ng_tty.c head/sys/netgraph/ng_vjc.c head/sys/netgraph/ng_vlan.c Modified: head/sys/netgraph/atm/ccatm/ng_ccatm.c ============================================================================== --- head/sys/netgraph/atm/ccatm/ng_ccatm.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/ccatm/ng_ccatm.c Mon Apr 18 09:12:27 2011 (r220768) @@ -348,9 +348,7 @@ ng_ccatm_constructor(node_p node) { struct ccnode *priv; - priv = malloc(sizeof(*priv), M_NG_CCATM, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_CCATM, M_WAITOK | M_ZERO); priv->node = node; priv->data = cc_create(&cc_funcs); Modified: head/sys/netgraph/atm/sscfu/ng_sscfu.c ============================================================================== --- head/sys/netgraph/atm/sscfu/ng_sscfu.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/sscfu/ng_sscfu.c Mon Apr 18 09:12:27 2011 (r220768) @@ -538,8 +538,7 @@ ng_sscfu_constructor(node_p node) { struct priv *priv; - if ((priv = malloc(sizeof(*priv), M_NG_SSCFU, M_NOWAIT|M_ZERO)) == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_SSCFU, M_WAITOK | M_ZERO); if ((priv->sscf = sscfu_create(node, &sscfu_funcs)) == NULL) { free(priv, M_NG_SSCFU); Modified: head/sys/netgraph/atm/sscop/ng_sscop.c ============================================================================== --- head/sys/netgraph/atm/sscop/ng_sscop.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/sscop/ng_sscop.c Mon Apr 18 09:12:27 2011 (r220768) @@ -246,8 +246,7 @@ ng_sscop_constructor(node_p node) { struct priv *p; - if ((p = malloc(sizeof(*p), M_NG_SSCOP, M_NOWAIT | M_ZERO)) == NULL) - return (ENOMEM); + p = malloc(sizeof(*p), M_NG_SSCOP, M_WAITOK | M_ZERO); if ((p->sscop = sscop_create(node, &sscop_funcs)) == NULL) { free(p, M_NG_SSCOP); Modified: head/sys/netgraph/atm/uni/ng_uni.c ============================================================================== --- head/sys/netgraph/atm/uni/ng_uni.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/uni/ng_uni.c Mon Apr 18 09:12:27 2011 (r220768) @@ -223,8 +223,7 @@ ng_uni_constructor(node_p node) { struct priv *priv; - if ((priv = malloc(sizeof(*priv), M_NG_UNI, M_NOWAIT | M_ZERO)) == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_UNI, M_WAITOK | M_ZERO); if ((priv->uni = uni_create(node, &uni_funcs)) == NULL) { free(priv, M_NG_UNI); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Mon Apr 18 09:12:27 2011 (r220768) @@ -109,10 +109,7 @@ ng_hci_constructor(node_p node) { ng_hci_unit_p unit = NULL; - unit = malloc(sizeof(*unit), M_NETGRAPH_HCI, - M_NOWAIT | M_ZERO); - if (unit == NULL) - return (ENOMEM); + unit = malloc(sizeof(*unit), M_NETGRAPH_HCI, M_WAITOK | M_ZERO); unit->node = node; unit->debug = NG_HCI_WARN_LEVEL; Modified: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c ============================================================================== --- head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c Mon Apr 18 09:12:27 2011 (r220768) @@ -113,10 +113,7 @@ ng_l2cap_constructor(node_p node) ng_l2cap_p l2cap = NULL; /* Create new L2CAP node */ - l2cap = malloc(sizeof(*l2cap), - M_NETGRAPH_L2CAP, M_NOWAIT|M_ZERO); - if (l2cap == NULL) - return (ENOMEM); + l2cap = malloc(sizeof(*l2cap), M_NETGRAPH_L2CAP, M_WAITOK | M_ZERO); l2cap->node = node; l2cap->debug = NG_L2CAP_WARN_LEVEL; Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:12:27 2011 (r220768) @@ -223,10 +223,7 @@ ng_netflow_constructor(node_p node) int error = 0, i; /* Initialize private data */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT); - if (priv == NULL) - return (ENOMEM); - bzero(priv, sizeof(*priv)); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_UI.c ============================================================================== --- head/sys/netgraph/ng_UI.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_UI.c Mon Apr 18 09:12:27 2011 (r220768) @@ -103,10 +103,7 @@ ng_UI_constructor(node_p node) priv_p priv; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) { - return (ENOMEM); - } + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); return (0); } Modified: head/sys/netgraph/ng_async.c ============================================================================== --- head/sys/netgraph/ng_async.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_async.c Mon Apr 18 09:12:27 2011 (r220768) @@ -183,25 +183,15 @@ nga_constructor(node_p node) { sc_p sc; - sc = malloc(sizeof(*sc), M_NETGRAPH_ASYNC, M_NOWAIT | M_ZERO); - if (sc == NULL) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH_ASYNC, M_WAITOK | M_ZERO); sc->amode = MODE_HUNT; sc->cfg.accm = ~0; sc->cfg.amru = NG_ASYNC_DEFAULT_MRU; sc->cfg.smru = NG_ASYNC_DEFAULT_MRU; sc->abuf = malloc(ASYNC_BUF_SIZE(sc->cfg.smru), - M_NETGRAPH_ASYNC, M_NOWAIT); - if (sc->abuf == NULL) - goto fail; + M_NETGRAPH_ASYNC, M_WAITOK); sc->sbuf = malloc(SYNC_BUF_SIZE(sc->cfg.amru), - M_NETGRAPH_ASYNC, M_NOWAIT); - if (sc->sbuf == NULL) { - free(sc->abuf, M_NETGRAPH_ASYNC); -fail: - free(sc, M_NETGRAPH_ASYNC); - return (ENOMEM); - } + M_NETGRAPH_ASYNC, M_WAITOK); NG_NODE_SET_PRIVATE(node, sc); sc->node = node; return (0); Modified: head/sys/netgraph/ng_atmllc.c ============================================================================== --- head/sys/netgraph/ng_atmllc.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_atmllc.c Mon Apr 18 09:12:27 2011 (r220768) @@ -80,12 +80,7 @@ ng_atmllc_constructor(node_p node) { struct ng_atmllc_priv *priv; - priv = malloc(sizeof(*priv), M_NETGRAPH, - M_NOWAIT | M_ZERO); - if (priv == NULL) { - return (ENOMEM); - } - + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); return (0); Modified: head/sys/netgraph/ng_bridge.c ============================================================================== --- head/sys/netgraph/ng_bridge.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_bridge.c Mon Apr 18 09:12:27 2011 (r220768) @@ -309,18 +309,12 @@ ng_bridge_constructor(node_p node) priv_p priv; /* Allocate and initialize private info */ - priv = malloc(sizeof(*priv), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_BRIDGE, M_WAITOK | M_ZERO); ng_callout_init(&priv->timer); /* Allocate and initialize hash table, etc. */ priv->tab = malloc(MIN_BUCKETS * sizeof(*priv->tab), - M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO); - if (priv->tab == NULL) { - free(priv, M_NETGRAPH_BRIDGE); - return (ENOMEM); - } + M_NETGRAPH_BRIDGE, M_WAITOK | M_ZERO); priv->numBuckets = MIN_BUCKETS; priv->hashMask = MIN_BUCKETS - 1; priv->conf.debugLevel = 1; Modified: head/sys/netgraph/ng_car.c ============================================================================== --- head/sys/netgraph/ng_car.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_car.c Mon Apr 18 09:12:27 2011 (r220768) @@ -186,9 +186,7 @@ ng_car_constructor(node_p node) priv_p priv; /* Initialize private descriptor. */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); priv->node = node; Modified: head/sys/netgraph/ng_cisco.c ============================================================================== --- head/sys/netgraph/ng_cisco.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_cisco.c Mon Apr 18 09:12:27 2011 (r220768) @@ -193,9 +193,7 @@ cisco_constructor(node_p node) { sc_p sc; - sc = malloc(sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (sc == NULL) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO); ng_callout_init(&sc->handle); NG_NODE_SET_PRIVATE(node, sc); Modified: head/sys/netgraph/ng_device.c ============================================================================== --- head/sys/netgraph/ng_device.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_device.c Mon Apr 18 09:12:27 2011 (r220768) @@ -163,9 +163,7 @@ ng_device_constructor(node_p node) DBG; - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); /* Allocate unit number */ priv->unit = alloc_unr(ngd_unit); Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_eiface.c Mon Apr 18 09:12:27 2011 (r220768) @@ -343,9 +343,7 @@ ng_eiface_constructor(node_p node) u_char eaddr[6] = {0,0,0,0,0,0}; /* Allocate node and interface private structures */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); ifp = priv->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { Modified: head/sys/netgraph/ng_etf.c ============================================================================== --- head/sys/netgraph/ng_etf.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_etf.c Mon Apr 18 09:12:27 2011 (r220768) @@ -180,10 +180,7 @@ ng_etf_constructor(node_p node) int i; /* Initialize private descriptor */ - privdata = malloc(sizeof(*privdata), M_NETGRAPH_ETF, - M_NOWAIT | M_ZERO); - if (privdata == NULL) - return (ENOMEM); + privdata = malloc(sizeof(*privdata), M_NETGRAPH_ETF, M_WAITOK | M_ZERO); for (i = 0; i < HASHSIZE; i++) { LIST_INIT((privdata->hashtable + i)); } Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_fec.c Mon Apr 18 09:12:27 2011 (r220768) @@ -1197,9 +1197,7 @@ ng_fec_constructor(node_p node) int error = 0; /* Allocate node and interface private structures */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); ifp = priv->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { Modified: head/sys/netgraph/ng_frame_relay.c ============================================================================== --- head/sys/netgraph/ng_frame_relay.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_frame_relay.c Mon Apr 18 09:12:27 2011 (r220768) @@ -212,9 +212,7 @@ ngfrm_constructor(node_p node) { sc_p sc; - sc = malloc(sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (!sc) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO); sc->addrlen = 2; /* default */ /* Link the node and our private info */ Modified: head/sys/netgraph/ng_gif_demux.c ============================================================================== --- head/sys/netgraph/ng_gif_demux.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_gif_demux.c Mon Apr 18 09:12:27 2011 (r220768) @@ -233,10 +233,7 @@ ng_gif_demux_constructor(node_p node) priv_p priv; /* Allocate and initialize private info */ - priv = malloc(sizeof(*priv), M_NETGRAPH_GIF_DEMUX, - M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_GIF_DEMUX, M_WAITOK | M_ZERO); priv->node = node; NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_hub.c ============================================================================== --- head/sys/netgraph/ng_hub.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_hub.c Mon Apr 18 09:12:27 2011 (r220768) @@ -86,9 +86,7 @@ ng_hub_constructor(node_p node) priv_p priv; /* Allocate and initialize private info */ - priv = malloc(sizeof(*priv), M_NETGRAPH_HUB, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_HUB, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); return (0); Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_iface.c Mon Apr 18 09:12:27 2011 (r220768) @@ -531,9 +531,7 @@ ng_iface_constructor(node_p node) priv_p priv; /* Allocate node and interface private structures */ - priv = malloc(sizeof(*priv), M_NETGRAPH_IFACE, M_NOWAIT|M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_IFACE, M_WAITOK | M_ZERO); ifp = if_alloc(IFT_PROPVIRTUAL); if (ifp == NULL) { free(priv, M_NETGRAPH_IFACE); Modified: head/sys/netgraph/ng_ksocket.c ============================================================================== --- head/sys/netgraph/ng_ksocket.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_ksocket.c Mon Apr 18 09:12:27 2011 (r220768) @@ -523,10 +523,7 @@ ng_ksocket_constructor(node_p node) priv_p priv; /* Allocate private structure */ - priv = malloc(sizeof(*priv), - M_NETGRAPH_KSOCKET, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_KSOCKET, M_WAITOK | M_ZERO); LIST_INIT(&priv->embryos); /* cross link them */ Modified: head/sys/netgraph/ng_l2tp.c ============================================================================== --- head/sys/netgraph/ng_l2tp.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_l2tp.c Mon Apr 18 09:12:27 2011 (r220768) @@ -361,9 +361,7 @@ ng_l2tp_constructor(node_p node) int i; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH_L2TP, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_L2TP, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); priv->node = node; Modified: head/sys/netgraph/ng_lmi.c ============================================================================== --- head/sys/netgraph/ng_lmi.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_lmi.c Mon Apr 18 09:12:27 2011 (r220768) @@ -185,9 +185,7 @@ nglmi_constructor(node_p node) { sc_p sc; - sc = malloc(sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (sc == NULL) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, sc); sc->node = node; Modified: head/sys/netgraph/ng_mppc.c ============================================================================== --- head/sys/netgraph/ng_mppc.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_mppc.c Mon Apr 18 09:12:27 2011 (r220768) @@ -201,9 +201,7 @@ ng_mppc_constructor(node_p node) priv_p priv; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH_MPPC, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_MPPC, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_nat.c ============================================================================== --- head/sys/netgraph/ng_nat.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_nat.c Mon Apr 18 09:12:27 2011 (r220768) @@ -272,10 +272,7 @@ ng_nat_constructor(node_p node) priv_p priv; /* Initialize private descriptor. */ - priv = malloc(sizeof(*priv), M_NETGRAPH, - M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); /* Init aliasing engine. */ priv->lib = LibAliasInit(NULL); Modified: head/sys/netgraph/ng_one2many.c ============================================================================== --- head/sys/netgraph/ng_one2many.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_one2many.c Mon Apr 18 09:12:27 2011 (r220768) @@ -187,9 +187,7 @@ ng_one2many_constructor(node_p node) priv_p priv; /* Allocate and initialize private info */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); priv->conf.xmitAlg = NG_ONE2MANY_XMIT_ROUNDROBIN; priv->conf.failAlg = NG_ONE2MANY_FAIL_MANUAL; Modified: head/sys/netgraph/ng_pipe.c ============================================================================== --- head/sys/netgraph/ng_pipe.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_pipe.c Mon Apr 18 09:12:27 2011 (r220768) @@ -253,9 +253,7 @@ ngp_constructor(node_p node) { priv_p priv; - priv = malloc(sizeof(*priv), M_NG_PIPE, M_ZERO | M_NOWAIT); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_PIPE, M_ZERO | M_WAITOK); NG_NODE_SET_PRIVATE(node, priv); /* Mark node as single-threaded */ Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_ppp.c Mon Apr 18 09:12:27 2011 (r220768) @@ -490,9 +490,7 @@ ng_ppp_constructor(node_p node) int i; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH_PPP, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_PPP, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_pppoe.c ============================================================================== --- head/sys/netgraph/ng_pppoe.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_pppoe.c Mon Apr 18 09:12:27 2011 (r220768) @@ -611,9 +611,7 @@ ng_pppoe_constructor(node_p node) int i; /* Initialize private descriptor. */ - privp = malloc(sizeof(*privp), M_NETGRAPH_PPPOE, M_NOWAIT | M_ZERO); - if (privp == NULL) - return (ENOMEM); + privp = malloc(sizeof(*privp), M_NETGRAPH_PPPOE, M_WAITOK | M_ZERO); /* Link structs together; this counts as our one reference to *node. */ NG_NODE_SET_PRIVATE(node, privp); Modified: head/sys/netgraph/ng_pptpgre.c ============================================================================== --- head/sys/netgraph/ng_pptpgre.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_pptpgre.c Mon Apr 18 09:12:27 2011 (r220768) @@ -281,9 +281,7 @@ ng_pptpgre_constructor(node_p node) int i; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_rfc1490.c ============================================================================== --- head/sys/netgraph/ng_rfc1490.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_rfc1490.c Mon Apr 18 09:12:27 2011 (r220768) @@ -165,9 +165,7 @@ ng_rfc1490_constructor(node_p node) priv_p priv; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); /* Initialize to default encapsulation method - ietf-ip */ priv->enc = ng_rfc1490_encaps; Modified: head/sys/netgraph/ng_sample.c ============================================================================== --- head/sys/netgraph/ng_sample.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_sample.c Mon Apr 18 09:12:27 2011 (r220768) @@ -154,10 +154,7 @@ ng_xxx_constructor(node_p node) int i; /* Initialize private descriptor */ - privdata = malloc(sizeof(*privdata), M_NETGRAPH, - M_NOWAIT | M_ZERO); - if (privdata == NULL) - return (ENOMEM); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); for (i = 0; i < XXX_NUM_DLCIS; i++) { privdata->channel[i].dlci = -2; privdata->channel[i].channel = i; Modified: head/sys/netgraph/ng_source.c ============================================================================== --- head/sys/netgraph/ng_source.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_source.c Mon Apr 18 09:12:27 2011 (r220768) @@ -273,9 +273,7 @@ ng_source_constructor(node_p node) { sc_p sc; - sc = malloc(sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (sc == NULL) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, sc); sc->node = node; Modified: head/sys/netgraph/ng_split.c ============================================================================== --- head/sys/netgraph/ng_split.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_split.c Mon Apr 18 09:12:27 2011 (r220768) @@ -85,9 +85,7 @@ ng_split_constructor(node_p node) priv_p priv; /* Allocate node */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_ZERO | M_NOWAIT); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_ZERO | M_WAITOK); /* Link together node and private info */ NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_sppp.c ============================================================================== --- head/sys/netgraph/ng_sppp.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_sppp.c Mon Apr 18 09:12:27 2011 (r220768) @@ -248,9 +248,7 @@ ng_sppp_constructor (node_p node) int error = 0; /* Allocate node and interface private structures */ - priv = malloc (sizeof(*priv), M_NETGRAPH_SPPP, M_NOWAIT|M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH_SPPP, M_WAITOK | M_ZERO); ifp = if_alloc(IFT_PPP); if (ifp == NULL) { Modified: head/sys/netgraph/ng_tee.c ============================================================================== --- head/sys/netgraph/ng_tee.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_tee.c Mon Apr 18 09:12:27 2011 (r220768) @@ -153,9 +153,7 @@ ng_tee_constructor(node_p node) { sc_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_NOWAIT|M_ZERO); - if (privdata == NULL) - return (ENOMEM); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); return (0); Modified: head/sys/netgraph/ng_tty.c ============================================================================== --- head/sys/netgraph/ng_tty.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_tty.c Mon Apr 18 09:12:27 2011 (r220768) @@ -156,9 +156,7 @@ ngt_constructor(node_p node) sc_p sc; /* Allocate private structure */ - sc = malloc(sizeof(*sc), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (sc == NULL) - return (ENOMEM); + sc = malloc(sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, sc); sc->node = node; Modified: head/sys/netgraph/ng_vjc.c ============================================================================== --- head/sys/netgraph/ng_vjc.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_vjc.c Mon Apr 18 09:12:27 2011 (r220768) @@ -243,9 +243,7 @@ ng_vjc_constructor(node_p node) priv_p priv; /* Allocate private structure */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); Modified: head/sys/netgraph/ng_vlan.c ============================================================================== --- head/sys/netgraph/ng_vlan.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/ng_vlan.c Mon Apr 18 09:12:27 2011 (r220768) @@ -161,9 +161,7 @@ ng_vlan_constructor(node_p node) priv_p priv; int i; - priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); for (i = 0; i < HASHSIZE; i++) LIST_INIT(&priv->hashtable[i]); NG_NODE_SET_PRIVATE(node, priv); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 09:14:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 750011065674; Mon, 18 Apr 2011 09:14:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 497E08FC18; Mon, 18 Apr 2011 09:14: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 p3I9EO4K065254; Mon, 18 Apr 2011 09:14:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3I9EOXs065250; Mon, 18 Apr 2011 09:14:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104180914.p3I9EOXs065250@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 09:14: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: r220769 - head/sys/netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 09:14:24 -0000 Author: glebius Date: Mon Apr 18 09:14:23 2011 New Revision: 220769 URL: http://svn.freebsd.org/changeset/base/220769 Log: ng_netflow_cache_init() can be void. Modified: head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/netgraph/netflow/netflow.c ============================================================================== --- head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:14:23 2011 (r220769) @@ -503,7 +503,7 @@ hash6_insert(priv_p priv, struct flow6_h */ /* Allocate memory and set up flow cache */ -int +void ng_netflow_cache_init(priv_p priv) { struct flow_hash_entry *hsh; @@ -546,8 +546,6 @@ ng_netflow_cache_init(priv_p priv) ng_netflow_v9_cache_init(priv); CTR0(KTR_NET, "ng_netflow startup()"); - - return (0); } /* Initialize new FIB table for v5 and v9 */ Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:14:23 2011 (r220769) @@ -220,7 +220,7 @@ static int ng_netflow_constructor(node_p node) { priv_p priv; - int error = 0, i; + int i; /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); @@ -241,8 +241,7 @@ ng_netflow_constructor(node_p node) callout_init(&priv->exp_callout, CALLOUT_MPSAFE); /* Allocate memory and set up flow cache */ - if ((error = ng_netflow_cache_init(priv))) - return (error); + ng_netflow_cache_init(priv); return (0); } Modified: head/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:14:23 2011 (r220769) @@ -458,7 +458,7 @@ struct flow6_hash_entry { ((t) << 3)) /* 8 */ /* Prototypes for netflow.c */ -int ng_netflow_cache_init(priv_p); +void ng_netflow_cache_init(priv_p); void ng_netflow_cache_flush(priv_p); int ng_netflow_fib_init(priv_p priv, int fib); void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 09:17:24 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A69106566B; Mon, 18 Apr 2011 09:17:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id B41868FC0C; Mon, 18 Apr 2011 09:17:23 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p3I9HMuS028430; Mon, 18 Apr 2011 13:17:22 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p3I9HM6T028429; Mon, 18 Apr 2011 13:17:22 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 18 Apr 2011 13:17:22 +0400 From: Gleb Smirnoff To: Philip Paeps Message-ID: <20110418091722.GG16958@FreeBSD.org> References: <201104151337.p3FDbhgW071344@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201104151337.p3FDbhgW071344@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220653 - in head/sys: . arm/mv/orion boot/fdt/dts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 09:17:24 -0000 On Fri, Apr 15, 2011 at 01:37:43PM +0000, Philip Paeps wrote: P> Author: philip P> Date: Fri Apr 15 13:37:43 2011 P> New Revision: 220653 P> URL: http://svn.freebsd.org/changeset/base/220653 P> P> Log: P> Add basic support for the Marvell Orion TS-7800. P> P> Submitted by: Kristof Provost P> P> Added: P> head/sys/arm/mv/orion/files.ts7800 (contents, props changed) P> head/sys/arm/mv/orion/std.ts7800 (contents, props changed) P> head/sys/boot/fdt/dts/ts7800.dts (contents, props changed) P> head/sys/files.ts7800 (contents, props changed) ^^^^^^^^^^^^^^^^^^^^^ Should this be in the root of kernel sources? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 09:48:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C3C61065672 for ; Mon, 18 Apr 2011 09:48:40 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from wilson.telenet-ops.be (wilson.telenet-ops.be [195.130.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0388FC0A for ; Mon, 18 Apr 2011 09:48:40 +0000 (UTC) Received: from jacques.telenet-ops.be (unknown [195.130.132.50]) by wilson.telenet-ops.be (Postfix) with ESMTP id 39C337091C for ; Mon, 18 Apr 2011 11:36:16 +0200 (CEST) Received: from triton.sigsegv.be ([94.225.212.114]) by jacques.telenet-ops.be with bizsmtp id YxcE1g00A2UfDsW0JxcEmG; Mon, 18 Apr 2011 11:36:14 +0200 Received: from nereid (nereid.neptune.sigsegv.be [IPv6:2001:470:c8f4:0:200:ff:fe00:8]) by triton.sigsegv.be (Postfix) with SMTP id 2F9381C1B2; Mon, 18 Apr 2011 11:36:13 +0200 (CEST) Received: by nereid (sSMTP sendmail emulation); Mon, 18 Apr 2011 11:36:13 +0200 Date: Mon, 18 Apr 2011 11:36:11 +0200 From: Kristof Provost To: Gleb Smirnoff Message-ID: <20110418093611.GC12608@nereid> References: <201104151337.p3FDbhgW071344@svn.freebsd.org> <20110418091722.GG16958@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110418091722.GG16958@FreeBSD.org> X-PGP-Fingerprint: E114 D9EA 909E D469 8F57 17A5 7D15 91C6 9EFA F286 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Philip Paeps Subject: Re: svn commit: r220653 - in head/sys: . arm/mv/orion boot/fdt/dts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 09:48:40 -0000 On 2011-04-18 13:17:22 (+0400), Gleb Smirnoff wrote: > On Fri, Apr 15, 2011 at 01:37:43PM +0000, Philip Paeps wrote: > P> Author: philip > P> Date: Fri Apr 15 13:37:43 2011 > P> New Revision: 220653 > P> URL: http://svn.freebsd.org/changeset/base/220653 > P> > P> Log: > P> Add basic support for the Marvell Orion TS-7800. > P> > P> Submitted by: Kristof Provost > P> > P> Added: > P> head/sys/arm/mv/orion/files.ts7800 (contents, props changed) > P> head/sys/arm/mv/orion/std.ts7800 (contents, props changed) > P> head/sys/boot/fdt/dts/ts7800.dts (contents, props changed) > P> head/sys/files.ts7800 (contents, props changed) > ^^^^^^^^^^^^^^^^^^^^^ > > Should this be in the root of kernel sources? > No, it shouldn't. It belongs in sys/arm/mv/orion/. I suspect something went wrong with the conversion of the patch. It seems to have beed added twice. I shall hold Philips beer hostage until this is fixed. Regards, Kristof From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 10:25:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C520D106564A; Mon, 18 Apr 2011 10:25:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7F68FC08; Mon, 18 Apr 2011 10:25: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 p3IAPs7H066821; Mon, 18 Apr 2011 10:25:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IAPsvI066818; Mon, 18 Apr 2011 10:25:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201104181025.p3IAPsvI066818@svn.freebsd.org> From: Dimitry Andric Date: Mon, 18 Apr 2011 10:25: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: r220770 - in 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: Mon, 18 Apr 2011 10:25:54 -0000 Author: dim Date: Mon Apr 18 10:25:54 2011 New Revision: 220770 URL: http://svn.freebsd.org/changeset/base/220770 Log: After removing libobjc and other Objective-C components in r220755, belatedly bump __FreeBSD_version, and add a note to UPDATING. Reminded by: rdivacky Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Apr 18 09:14:23 2011 (r220769) +++ head/UPDATING Mon Apr 18 10:25:54 2011 (r220770) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110418: + The GNU Objective-C runtime library (libobjc), and other Objective-C + related components have been removed from the base system. If you + require an Objective-C library, please use one of the available ports. + 20110331: ath(4) has been split into bus- and device- modules. if_ath contains the HAL, the TX rate control and the network device code. if_ath_pci Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Apr 18 09:14:23 2011 (r220769) +++ head/sys/sys/param.h Mon Apr 18 10:25:54 2011 (r220770) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900035 /* Master, propagated to newvers */ +#define __FreeBSD_version 900036 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 11:25:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E67651065670; Mon, 18 Apr 2011 11:25: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 B91AA8FC19; Mon, 18 Apr 2011 11:25: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 p3IBPDi5070129; Mon, 18 Apr 2011 11:25:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IBPDus070127; Mon, 18 Apr 2011 11:25:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181125.p3IBPDus070127@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 11:25: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: r220771 - stable/8/sys/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: Mon, 18 Apr 2011 11:25:14 -0000 Author: mav Date: Mon Apr 18 11:25:13 2011 New Revision: 220771 URL: http://svn.freebsd.org/changeset/base/220771 Log: Rework change made at r203146. Instead of reporting all wire errors as SCSI status errors to CAM (that was wrong, as it too often turned retriable wire errors into non-retriable REQUEST SENSE errors), do it only for STALL errors on control pipe of the CBI devices. STALL on control pipe is just a one of the ways to report error for CBI devices. PR: usb/150401, usb/154593. Reviewed by: hselasky Modified: 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) Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Mon Apr 18 10:25:54 2011 (r220770) +++ stable/8/sys/dev/usb/storage/umass.c Mon Apr 18 11:25:13 2011 (r220771) @@ -1850,9 +1850,23 @@ umass_t_cbi_command_callback(struct usb_ break; default: /* Error */ - umass_tr_error(xfer, error); - /* skip reset */ - sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; + /* + * STALL on the control pipe can be result of the command error. + * Attempt to clear this STALL same as for bulk pipe also + * results in command completion interrupt, but ASC/ASCQ there + * look like not always valid, so don't bother about it. + */ + if ((error == USB_ERR_STALLED) || + (sc->sc_transfer.callback == &umass_cam_cb)) { + sc->sc_transfer.ccb = NULL; + (sc->sc_transfer.callback) + (sc, ccb, sc->sc_transfer.data_len, + STATUS_CMD_UNKNOWN); + } else { + umass_tr_error(xfer, error); + /* skip reset */ + sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; + } break; } } @@ -2606,17 +2620,9 @@ umass_cam_cb(struct umass_softc *sc, uni /* * The wire protocol failed and will hopefully have * recovered. We return an error to CAM and let CAM - * retry the command if necessary. In case of SCSI IO - * commands we ask the CAM layer to check the - * condition first. This is a quick hack to make - * certain devices work. + * retry the command if necessary. */ - if (ccb->ccb_h.func_code == XPT_SCSI_IO) { - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; - ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; - } else { - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - } + ccb->ccb_h.status = CAM_REQ_CMP_ERR; xpt_done(ccb); break; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 12:15:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A559106566B; Mon, 18 Apr 2011 12:15:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45C2D8FC16; Mon, 18 Apr 2011 12:15: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 p3ICFikG071350; Mon, 18 Apr 2011 12:15:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ICFiVr071342; Mon, 18 Apr 2011 12:15:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104181215.p3ICFiVr071342@svn.freebsd.org> From: Adrian Chadd Date: Mon, 18 Apr 2011 12:15: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: r220772 - in head/sys/dev/ath: . ath_hal 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, 18 Apr 2011 12:15:44 -0000 Author: adrian Date: Mon Apr 18 12:15:43 2011 New Revision: 220772 URL: http://svn.freebsd.org/changeset/base/220772 Log: Add global TX timeout handling. The global TX timeout counter increments whenever a frame is ready to be transmitted and the medium is busy. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/ath_hal/ah.h Mon Apr 18 12:15:43 2011 (r220772) @@ -123,6 +123,7 @@ typedef enum { HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */ HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */ + HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Apr 18 12:15:43 2011 (r220772) @@ -275,6 +275,8 @@ ar5416GetCapability(struct ath_hal *ah, uint32_t capability, uint32_t *result) { switch (type) { + case HAL_CAP_GTXTO: + return HAL_OK; /* All AR5416+ supports Global TX Timeout */ case HAL_CAP_BB_HANG: switch (capability) { case HAL_BB_HANG_RIFS: Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Apr 18 12:15:43 2011 (r220772) @@ -605,10 +605,8 @@ ar5416InitUserSettings(struct ath_hal *a ar5212SetCTSTimeout(ah, ahp->ah_ctstimeout); if (AH_PRIVATE(ah)->ah_diagreg != 0) OS_REG_WRITE(ah, AR_DIAG_SW, AH_PRIVATE(ah)->ah_diagreg); -#if 0 /* XXX Todo */ - if (ahp->ah_globaltxtimeout != (u_int) -1) - ar5416SetGlobalTxTimeout(ah, ahp->ah_globaltxtimeout); -#endif + if (AH5416(ah)->ah_globaltxtimeout != (u_int) -1) + ar5416SetGlobalTxTimeout(ah, AH5416(ah)->ah_globaltxtimeout); } static void Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 12:15:43 2011 (r220772) @@ -1355,6 +1355,8 @@ ath_intr(void *arg) sc->sc_stats.ast_bmiss++; taskqueue_enqueue(sc->sc_tq, &sc->sc_bmisstask); } + if (status & HAL_INT_GTT) + sc->sc_stats.ast_tx_timeout++; if (status & HAL_INT_MIB) { sc->sc_stats.ast_mib++; /* @@ -1559,6 +1561,10 @@ ath_init(void *arg) if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; + /* Enable global TX timeout statistics if available */ + if (ath_hal_gtxto_supported(ah)) + sc->sc_imask |= (HAL_INT_GTT & HAL_INT_BMISC); + ifp->if_drv_flags |= IFF_DRV_RUNNING; callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc); ath_hal_intrset(ah, sc->sc_imask); Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/if_ath_sysctl.c Mon Apr 18 12:15:43 2011 (r220772) @@ -705,6 +705,8 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD, &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_timeout", CTLFLAG_RD, + &sc->sc_stats.ast_tx_timeout, 0, "TX Global Timeout"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/if_athioctl.h Mon Apr 18 12:15:43 2011 (r220772) @@ -129,7 +129,8 @@ struct ath_stats { u_int32_t ast_rx_hi_rx_chain; u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ u_int32_t ast_rx_hitqueueend; - u_int32_t ast_pad[2]; + u_int32_t ast_tx_timeout; /* Global TX timeout */ + u_int32_t ast_pad[1]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/if_athvar.h Mon Apr 18 12:15:43 2011 (r220772) @@ -649,6 +649,8 @@ void ath_intr(void *); (ath_hal_getcapability(_ah, HAP_CAP_SPLIT_4KB_TRANS, 0, NULL) == HAL_OK) #define ath_hal_self_linked_final_rxdesc(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, 0, NULL) == HAL_OK) +#define ath_hal_gtxto_supported(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_GTXTO, 0, NULL) == HAL_OK) #define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \ ((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq))) From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 12:18:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E084106566B; Mon, 18 Apr 2011 12:18: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 E37EC8FC1A; Mon, 18 Apr 2011 12: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 p3ICIREr071454; Mon, 18 Apr 2011 12:18:27 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ICIRwT071452; Mon, 18 Apr 2011 12:18:27 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104181218.p3ICIRwT071452@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 18 Apr 2011 12:18: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: r220773 - stable/8/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: Mon, 18 Apr 2011 12:18:28 -0000 Author: bz Date: Mon Apr 18 12:18:27 2011 New Revision: 220773 URL: http://svn.freebsd.org/changeset/base/220773 Log: MFC r220743: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Tested by: Pete French (petefrench ingresso.co.uk on stable) Reported by: Pete French (petefrench ingresso.co.uk on stable) Reported by: bz, simon on Y! cluster Reported by: kib PR: kern/151908 X-Early-MFC: yes Modified: stable/8/sys/netinet6/nd6_nbr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/8/sys/netinet6/nd6_nbr.c Mon Apr 18 12:15:43 2011 (r220772) +++ stable/8/sys/netinet6/nd6_nbr.c Mon Apr 18 12:18:27 2011 (r220773) @@ -339,7 +339,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -349,7 +349,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: if (ifa != NULL) ifa_free(ifa); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 12:27:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59E391065673; Mon, 18 Apr 2011 12:27:58 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE588FC15; Mon, 18 Apr 2011 12:27: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 p3ICRwfK071687; Mon, 18 Apr 2011 12:27:58 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ICRwHJ071685; Mon, 18 Apr 2011 12:27:58 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201104181227.p3ICRwHJ071685@svn.freebsd.org> From: Philip Paeps Date: Mon, 18 Apr 2011 12:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220774 - in head/sys: . arm/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, 18 Apr 2011 12:27:58 -0000 Author: philip Date: Mon Apr 18 12:27:57 2011 New Revision: 220774 URL: http://svn.freebsd.org/changeset/base/220774 Log: Delete mistakenly added sys/files.ts7800 Add mistakenly forgotten sys/arm/conf/TS7800 Not sure how this happened. Apologies for the repo-churn. Submitted by: glebius Pointy hat to: philip Added: head/sys/arm/conf/TS7800 (contents, props changed) Deleted: head/sys/files.ts7800 Added: head/sys/arm/conf/TS7800 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/TS7800 Mon Apr 18 12:27:57 2011 (r220774) @@ -0,0 +1,80 @@ +# +# Custom kernel for the TS-7800 board. +# +# $FreeBSD$ +# + +ident TS7800 +include "../mv/orion/std.ts7800" + +options SOC_MV_ORION +makeoptions MODULES_OVERRIDE="" + +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + +# Debugging +options ALT_BREAK_TO_DEBUGGER +options DDB +options KDB +options GDB # Support remote GDB. + +device mvs +device pci + +# Pseudo devices +device md +device loop +device pty +device random + +# Serial ports +device uart + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device e1000phy +device bpf +options HZ=1000 + +# USB +device usb +device ehci +device umass +device scbus +device pass +device da + +# SATA +device ata +device atadisk + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=ts7800.dts + From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 12:32:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E577106566C; Mon, 18 Apr 2011 12:32:07 +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 29D208FC08; Mon, 18 Apr 2011 12:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3ICW7eG071810; Mon, 18 Apr 2011 12:32:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ICW75Q071808; Mon, 18 Apr 2011 12:32:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104181232.p3ICW75Q071808@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 18 Apr 2011 12:32: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: r220775 - stable/7/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: Mon, 18 Apr 2011 12:32:07 -0000 Author: bz Date: Mon Apr 18 12:32:06 2011 New Revision: 220775 URL: http://svn.freebsd.org/changeset/base/220775 Log: MFC r220743: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Tested by: Pete French (petefrench ingresso.co.uk) Reported by: Pete French (petefrench ingresso.co.uk on stable) Reported by: bz, simon on Y! cluster Reported by: kib PR: kern/151908 X-Early-MFC: yes Modified: stable/7/sys/netinet6/nd6_nbr.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/netinet6/nd6_nbr.c ============================================================================== --- stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:27:57 2011 (r220774) +++ stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:32:06 2011 (r220775) @@ -327,7 +327,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -337,7 +337,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: m_freem(m); return; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 13:09:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21EF4106564A; Mon, 18 Apr 2011 13:09:34 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from emx.nitro.dk (emx.nitro.dk [IPv6:2a01:4f8:120:7384::102]) by mx1.freebsd.org (Postfix) with ESMTP id A9F9F8FC18; Mon, 18 Apr 2011 13:09:33 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id AA07312E3; Mon, 18 Apr 2011 13:09:32 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id 5EkEcf8sYXQF; Mon, 18 Apr 2011 13:09:29 +0000 (UTC) Received: from [192.168.4.23] (unknown [90.184.171.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id 6525712E2; Mon, 18 Apr 2011 13:09:28 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Simon L. B. Nielsen" In-Reply-To: <201104181218.p3ICIRwT071452@svn.freebsd.org> Date: Mon, 18 Apr 2011 15:09:26 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <23EBF5B9-38C5-4EEE-8BA1-10B1A9FA735E@nitro.dk> References: <201104181218.p3ICIRwT071452@svn.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1084) 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: r220773 - stable/8/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: Mon, 18 Apr 2011 13:09:34 -0000 On 18 Apr 2011, at 14:18, Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Apr 18 12:18:27 2011 > New Revision: 220773 > URL: http://svn.freebsd.org/changeset/base/220773 >=20 > Log: > MFC r220743: >=20 > Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously = always > passing the cached proxydl reference (sockaddr_dl initialized or = not) to > nd6_na_output(). nd6_na_output() will thus assume a proxy NA. = Revert to > conditionally passing either &proxydl or NULL if no proxy case = desired. Thanks for the quick fix! > Tested by: ipv6gw and ref9-i386 FWIW, ipv6gw is also running stable/8 so the patch bz MFC'ed has been = running in production for a day or so. --=20 Simon L. B. Nielsen From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 13:20:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDBE2106566B; Mon, 18 Apr 2011 13:20:54 +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 CA2D18FC0C; Mon, 18 Apr 2011 13:20:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3IDKsxT072922; Mon, 18 Apr 2011 13:20:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IDKskI072920; Mon, 18 Apr 2011 13:20:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104181320.p3IDKskI072920@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 18 Apr 2011 13:20: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: r220776 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 13:20:55 -0000 Author: nwhitehorn Date: Mon Apr 18 13:20:54 2011 New Revision: 220776 URL: http://svn.freebsd.org/changeset/base/220776 Log: Mention the memstick target here. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon Apr 18 12:32:06 2011 (r220775) +++ head/release/Makefile Mon Apr 18 13:20:54 2011 (r220776) @@ -4,6 +4,7 @@ # # User-driven targets: # cdrom: Builds release CD-ROM media (release.iso) +# memstick: Builds memory stick image (memstick) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area # install: Copies all release media into ${DESTDIR} From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 13:34:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2969F106566C; Mon, 18 Apr 2011 13:34: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 159B48FC16; Mon, 18 Apr 2011 13:34: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 p3IDYVIp073306; Mon, 18 Apr 2011 13:34:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IDYVDh073304; Mon, 18 Apr 2011 13:34:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181334.p3IDYVDh073304@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 13:34: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: r220777 - 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: Mon, 18 Apr 2011 13:34:32 -0000 Author: mav Date: Mon Apr 18 13:34:31 2011 New Revision: 220777 URL: http://svn.freebsd.org/changeset/base/220777 Log: - Tune different wait loops to cut some more milliseconds from reset time. - Do not call ahci_start() before device signature received. It is required by the specification and caused non-fatal reset timeouts on AMD chipsets. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Apr 18 13:20:54 2011 (r220776) +++ head/sys/dev/ahci/ahci.c Mon Apr 18 13:34:31 2011 (r220777) @@ -1747,11 +1747,11 @@ ahci_execute_transaction(struct ahci_slo if (ccb->ccb_h.func_code == XPT_ATA_IO && (ccb->ataio.cmd.command == ATA_DEVICE_RESET || (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))) { - int count, timeout = ccb->ccb_h.timeout; + int count, timeout = ccb->ccb_h.timeout * 100; enum ahci_err_type et = AHCI_ERR_NONE; for (count = 0; count < timeout; count++) { - DELAY(1000); + DELAY(10); if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot))) break; if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) { @@ -1787,7 +1787,7 @@ ahci_execute_transaction(struct ahci_slo (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); + DELAY(10); if (count++ >= timeout) { device_printf(dev, "device is not " "ready after soft-reset: " @@ -2305,8 +2305,8 @@ ahci_stop(device_t dev) /* Wait for activity stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "stopping AHCI engine failed\n"); break; } @@ -2328,8 +2328,8 @@ ahci_clo(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd); timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "executing CLO failed\n"); break; } @@ -2350,8 +2350,8 @@ ahci_stop_fr(device_t dev) /* Wait for FIS reception stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "stopping AHCI FR engine failed\n"); break; } @@ -2408,11 +2408,11 @@ ahci_reset_to(void *arg) if (ahci_wait_ready(dev, ch->resetting == 0 ? -1 : 0, (310 - ch->resetting) * 100) == 0) { ch->resetting = 0; + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); return; } if (ch->resetting == 0) { - ahci_stop(dev); ahci_clo(dev); ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); @@ -2495,7 +2495,6 @@ ahci_reset(device_t dev) else ch->resetting = 310; } - ahci_start(dev, 1); ch->devices = 1; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, @@ -2507,8 +2506,10 @@ ahci_reset(device_t dev) AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (ch->resetting) callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, dev); - else + else { + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); + } } static int @@ -2569,7 +2570,7 @@ ahci_sata_connect(struct ahci_channel *c int timeout; /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 100 ; timeout++) { + for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && @@ -2582,9 +2583,9 @@ ahci_sata_connect(struct ahci_channel *c } return (0); } - DELAY(1000); + DELAY(100); } - if (timeout >= 100) { + if (timeout >= 1000) { if (bootverbose) { device_printf(ch->dev, "SATA connect timeout status=%08x\n", status); @@ -2592,8 +2593,8 @@ ahci_sata_connect(struct ahci_channel *c return (0); } if (bootverbose) { - device_printf(ch->dev, "SATA connect time=%dms status=%08x\n", - timeout, status); + device_printf(ch->dev, "SATA connect time=%dus status=%08x\n", + timeout * 100, status); } /* Clear SATA error register */ ATA_OUTL(ch->r_mem, AHCI_P_SERR, 0xffffffff); @@ -2625,11 +2626,10 @@ ahci_sata_phy_reset(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_RESET | val | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER); - DELAY(5000); + DELAY(1000); ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); - DELAY(5000); if (!ahci_sata_connect(ch)) { if (ch->caps & AHCI_CAP_SSS) { val = ATA_INL(ch->r_mem, AHCI_P_CMD); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 13:59:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A446B106564A; Mon, 18 Apr 2011 13:59:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90F048FC0A; Mon, 18 Apr 2011 13:59: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 p3IDxupR073862; Mon, 18 Apr 2011 13:59:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IDxuKD073859; Mon, 18 Apr 2011 13:59:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181359.p3IDxuKD073859@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 13:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220778 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 13:59:56 -0000 Author: mav Date: Mon Apr 18 13:59:56 2011 New Revision: 220778 URL: http://svn.freebsd.org/changeset/base/220778 Log: Remove some used variables. Found with: Clang Static Analyzer Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Mon Apr 18 13:34:31 2011 (r220777) +++ head/sys/cam/ata/ata_da.c Mon Apr 18 13:59:56 2011 (r220778) @@ -274,7 +274,6 @@ adaopen(struct disk *dp) { struct cam_periph *periph; struct ada_softc *softc; - int unit; int error; periph = (struct cam_periph *)dp->d_drv1; @@ -293,13 +292,12 @@ adaopen(struct disk *dp) return (error); } - unit = periph->unit_number; softc = (struct ada_softc *)periph->softc; softc->flags |= ADA_FLAG_OPEN; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adaopen: disk=%s%d (unit %d)\n", dp->d_name, dp->d_unit, - unit)); + periph->unit_number)); if ((softc->flags & ADA_FLAG_PACK_INVALID) != 0) { /* Invalidate our pack information. */ @@ -1314,11 +1312,6 @@ adadone(struct cam_periph *periph, union static int adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct ada_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct ada_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Mon Apr 18 13:34:31 2011 (r220777) +++ head/sys/cam/ata/ata_pmp.c Mon Apr 18 13:59:56 2011 (r220778) @@ -215,12 +215,9 @@ pmprelease(struct cam_periph *periph, in static void pmponinvalidate(struct cam_periph *periph) { - struct pmp_softc *softc; struct cam_path *dpath; int i; - softc = (struct pmp_softc *)periph->softc; - /* * De-register any async callbacks. */ @@ -548,7 +545,7 @@ pmpdone(struct cam_periph *periph, union struct ccb_trans_settings cts; struct pmp_softc *softc; struct ccb_ataio *ataio; - struct cam_path *path, *dpath; + struct cam_path *dpath; u_int32_t priority, res; int i; @@ -557,7 +554,6 @@ pmpdone(struct cam_periph *periph, union CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("pmpdone\n")); - path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -583,10 +579,10 @@ pmpdone(struct cam_periph *periph, union switch (softc->state) { case PMP_STATE_PORTS: - softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + softc->pm_ports = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; /* This PMP declares 6 ports, while only 5 of them are real. * Port 5 is enclosure management bridge port, which has implementation * problems, causing probe faults. Hide it for now. */ @@ -650,10 +646,10 @@ pmpdone(struct cam_periph *periph, union xpt_schedule(periph, priority); return; case PMP_STATE_CHECK: - res = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + res = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || (res & 0x600) != 0) { if (bootverbose) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:03:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A690106564A; Mon, 18 Apr 2011 14:03:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDF18FC0A; Mon, 18 Apr 2011 14:03: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 p3IE36Id073988; Mon, 18 Apr 2011 14:03:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IE36ai073985; Mon, 18 Apr 2011 14:03:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104181403.p3IE36ai073985@svn.freebsd.org> From: Adrian Chadd Date: Mon, 18 Apr 2011 14:03: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: r220779 - in 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, 18 Apr 2011 14:03:06 -0000 Author: adrian Date: Mon Apr 18 14:03:05 2011 New Revision: 220779 URL: http://svn.freebsd.org/changeset/base/220779 Log: Rework the Global TX timeout handling to look more like ath9k. It correctly now sets the AR_IMR BCNMISC register, along with the GTT register in AR_IMR_S2. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Mon Apr 18 13:59:56 2011 (r220778) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Mon Apr 18 14:03:05 2011 (r220779) @@ -234,14 +234,20 @@ ar5416SetInterrupts(struct ath_hal *ah, mask2 |= AR_IMR_S2_DTIMSYNC; if (ints & HAL_INT_CABEND) mask2 |= (AR_IMR_S2_CABEND ); - if (ints & HAL_INT_GTT) - mask2 |= AR_IMR_S2_GTT; if (ints & HAL_INT_CST) mask2 |= AR_IMR_S2_CST; if (ints & HAL_INT_TSFOOR) mask2 |= AR_IMR_S2_TSFOOR; } + if (ints & (HAL_INT_GTT | HAL_INT_CST)) { + mask |= AR_IMR_BCNMISC; + if (ints & HAL_INT_GTT) + mask2 |= AR_IMR_S2_GTT; + if (ints & HAL_INT_CST) + mask2 |= AR_IMR_S2_CST; + } + /* Write the new IMR and store off our SW copy. */ HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: new IMR 0x%x\n", __func__, mask); OS_REG_WRITE(ah, AR_IMR, mask); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 18 13:59:56 2011 (r220778) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:03:05 2011 (r220779) @@ -1563,7 +1563,10 @@ ath_init(void *arg) /* Enable global TX timeout statistics if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= (HAL_INT_GTT & HAL_INT_BMISC); + sc->sc_imask |= HAL_INT_GTT; + + DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", + __func__, sc->sc_imask); ifp->if_drv_flags |= IFF_DRV_RUNNING; callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:03:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7120C1065689; Mon, 18 Apr 2011 14:03:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6118FC21; Mon, 18 Apr 2011 14:03: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 p3IE3b3r074033; Mon, 18 Apr 2011 14:03:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IE3bWp074031; Mon, 18 Apr 2011 14:03:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104181403.p3IE3bWp074031@svn.freebsd.org> From: Adrian Chadd Date: Mon, 18 Apr 2011 14:03: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: r220780 - 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: Mon, 18 Apr 2011 14:03:37 -0000 Author: adrian Date: Mon Apr 18 14:03:37 2011 New Revision: 220780 URL: http://svn.freebsd.org/changeset/base/220780 Log: Bump pad, I'm adding more statistics. Modified: head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:03:05 2011 (r220779) +++ head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:03:37 2011 (r220780) @@ -130,7 +130,7 @@ struct ath_stats { u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ u_int32_t ast_rx_hitqueueend; u_int32_t ast_tx_timeout; /* Global TX timeout */ - u_int32_t ast_pad[1]; + u_int32_t ast_pad[16]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:05:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0603E1065673; Mon, 18 Apr 2011 14:05:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E73568FC0C; Mon, 18 Apr 2011 14:05: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 p3IE5QFa074113; Mon, 18 Apr 2011 14:05:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IE5QCe074111; Mon, 18 Apr 2011 14:05:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104181405.p3IE5QCe074111@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 14:05: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: r220781 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 14:05:27 -0000 Author: glebius Date: Mon Apr 18 14:05:26 2011 New Revision: 220781 URL: http://svn.freebsd.org/changeset/base/220781 Log: Further cleanup of node creation path from M_NOWAIT usage. Modified: head/sys/netgraph/ng_sppp.c Modified: head/sys/netgraph/ng_sppp.c ============================================================================== --- head/sys/netgraph/ng_sppp.c Mon Apr 18 14:03:37 2011 (r220780) +++ head/sys/netgraph/ng_sppp.c Mon Apr 18 14:05:26 2011 (r220781) @@ -108,7 +108,7 @@ static unsigned char ng_units_in_use = 0 * Find the first free unit number for a new interface. * Increase the size of the unit bitmap as necessary. */ -static __inline int +static __inline void ng_sppp_get_unit (int *unit) { int index, bit; @@ -122,9 +122,7 @@ ng_sppp_get_unit (int *unit) newlen = (2 * ng_sppp_units_len) + sizeof (*ng_sppp_units); newarray = malloc (newlen * sizeof (*ng_sppp_units), - M_NETGRAPH_SPPP, M_NOWAIT); - if (newarray == NULL) - return (ENOMEM); + M_NETGRAPH_SPPP, M_WAITOK); bcopy (ng_sppp_units, newarray, ng_sppp_units_len * sizeof (*ng_sppp_units)); bzero (newarray + ng_sppp_units_len, @@ -142,7 +140,6 @@ ng_sppp_get_unit (int *unit) ng_sppp_units[index] |= (1 << bit); *unit = (index * NBBY) + bit; ng_units_in_use++; - return (0); } /* @@ -262,12 +259,7 @@ ng_sppp_constructor (node_p node) priv->ifp = ifp; /* Get an interface unit number */ - if ((error = ng_sppp_get_unit(&priv->unit)) != 0) { - free (pp, M_NETGRAPH_SPPP); - free (priv, M_NETGRAPH_SPPP); - return (error); - } - + ng_sppp_get_unit(&priv->unit); /* Link together node and private info */ NG_NODE_SET_PRIVATE (node, priv); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:06:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9D81065670; Mon, 18 Apr 2011 14:06:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0120C8FC13; Mon, 18 Apr 2011 14:06: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 p3IE6IJI074171; Mon, 18 Apr 2011 14:06:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IE6ITm074167; Mon, 18 Apr 2011 14:06:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104181406.p3IE6ITm074167@svn.freebsd.org> From: Adrian Chadd Date: Mon, 18 Apr 2011 14:06: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: r220782 - 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: Mon, 18 Apr 2011 14:06:19 -0000 Author: adrian Date: Mon Apr 18 14:06:18 2011 New Revision: 220782 URL: http://svn.freebsd.org/changeset/base/220782 Log: Add TX carrier sense timeout statistics. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 18 14:05:26 2011 (r220781) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:06:18 2011 (r220782) @@ -1357,6 +1357,8 @@ ath_intr(void *arg) } if (status & HAL_INT_GTT) sc->sc_stats.ast_tx_timeout++; + if (status & HAL_INT_CST) + sc->sc_stats.ast_tx_cst++; if (status & HAL_INT_MIB) { sc->sc_stats.ast_mib++; /* @@ -1561,9 +1563,9 @@ ath_init(void *arg) if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; - /* Enable global TX timeout statistics if available */ + /* Enable global TX timeout and carrier sense timeout if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= HAL_INT_GTT; + sc->sc_imask |= (HAL_INT_GTT | HAL_INT_CST); DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", __func__, sc->sc_imask); Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Mon Apr 18 14:05:26 2011 (r220781) +++ head/sys/dev/ath/if_ath_sysctl.c Mon Apr 18 14:06:18 2011 (r220782) @@ -707,6 +707,8 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_timeout", CTLFLAG_RD, &sc->sc_stats.ast_tx_timeout, 0, "TX Global Timeout"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_cst", CTLFLAG_RD, + &sc->sc_stats.ast_tx_cst, 0, "TX Carrier Sense Timeout"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:05:26 2011 (r220781) +++ head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:06:18 2011 (r220782) @@ -130,6 +130,7 @@ struct ath_stats { u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ u_int32_t ast_rx_hitqueueend; u_int32_t ast_tx_timeout; /* Global TX timeout */ + u_int32_t ast_tx_cst; /* Carrier sense timeout */ u_int32_t ast_pad[16]; }; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:07:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFE041065670; Mon, 18 Apr 2011 14:07:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D07F8FC13; Mon, 18 Apr 2011 14:07: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 p3IE71ka074221; Mon, 18 Apr 2011 14:07:01 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IE71jK074219; Mon, 18 Apr 2011 14:07:01 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104181407.p3IE71jK074219@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 14:07: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: r220783 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 14:07:01 -0000 Author: glebius Date: Mon Apr 18 14:07:01 2011 New Revision: 220783 URL: http://svn.freebsd.org/changeset/base/220783 Log: Finish last change. Pointy hat to: glebius Modified: head/sys/netgraph/ng_sppp.c Modified: head/sys/netgraph/ng_sppp.c ============================================================================== --- head/sys/netgraph/ng_sppp.c Mon Apr 18 14:06:18 2011 (r220782) +++ head/sys/netgraph/ng_sppp.c Mon Apr 18 14:07:01 2011 (r220783) @@ -242,7 +242,6 @@ ng_sppp_constructor (node_p node) struct sppp *pp; struct ifnet *ifp; priv_p priv; - int error = 0; /* Allocate node and interface private structures */ priv = malloc(sizeof(*priv), M_NETGRAPH_SPPP, M_WAITOK | M_ZERO); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:14:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E292106566B; Mon, 18 Apr 2011 14:14:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFA958FC08; Mon, 18 Apr 2011 14:14: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 p3IEEsc2074415; Mon, 18 Apr 2011 14:14:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IEEsD6074413; Mon, 18 Apr 2011 14:14:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104181414.p3IEEsD6074413@svn.freebsd.org> From: Adrian Chadd Date: Mon, 18 Apr 2011 14:14: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: r220784 - 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: Mon, 18 Apr 2011 14:14:55 -0000 Author: adrian Date: Mon Apr 18 14:14:54 2011 New Revision: 220784 URL: http://svn.freebsd.org/changeset/base/220784 Log: For now, only enable GTT. CST is firing very frequently during local tests; I'll figure out what's going on before re-enabling this as it does add to the interrupt load. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 18 14:07:01 2011 (r220783) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:14:54 2011 (r220784) @@ -1565,7 +1565,7 @@ ath_init(void *arg) /* Enable global TX timeout and carrier sense timeout if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= (HAL_INT_GTT | HAL_INT_CST); + sc->sc_imask |= HAL_INT_GTT; DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", __func__, sc->sc_imask); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:15:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 814921065673; Mon, 18 Apr 2011 14:15:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EFF68FC12; Mon, 18 Apr 2011 14:15: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 p3IEFqs1074472; Mon, 18 Apr 2011 14:15:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IEFqXH074470; Mon, 18 Apr 2011 14:15:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181415.p3IEFqXH074470@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 14:15: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: r220785 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 14:15:52 -0000 Author: mav Date: Mon Apr 18 14:15:52 2011 New Revision: 220785 URL: http://svn.freebsd.org/changeset/base/220785 Log: Remove some used variables. Found with: Clang Static Analyzer Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Apr 18 14:14:54 2011 (r220784) +++ head/sys/cam/cam_xpt.c Mon Apr 18 14:15:52 2011 (r220785) @@ -2521,12 +2521,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_DEV_NOT_THERE; } else { struct ccb_getdev *cgd; - struct cam_eb *bus; - struct cam_et *tar; cgd = &start_ccb->cgd; - bus = cgd->ccb_h.path->bus; - tar = cgd->ccb_h.path->target; cgd->protocol = dev->protocol; cgd->inq_data = dev->inq_data; cgd->ident_data = dev->ident_data; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 14:34:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A662410656D0; Mon, 18 Apr 2011 14:34:10 +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 9327F8FC0C; Mon, 18 Apr 2011 14:34: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 p3IEYAu7074889; Mon, 18 Apr 2011 14:34:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IEYAdU074887; Mon, 18 Apr 2011 14:34:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181434.p3IEYAdU074887@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 14:34: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: r220786 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 14:34:10 -0000 Author: mav Date: Mon Apr 18 14:34:10 2011 New Revision: 220786 URL: http://svn.freebsd.org/changeset/base/220786 Log: Remove always false "< 0" check for unsgined int variable. This check is also duplicate, as the value was already checked for 0 before decrementing. Reported by: rpaulo Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Mon Apr 18 14:15:52 2011 (r220785) +++ head/sys/cam/cam_periph.c Mon Apr 18 14:34:10 2011 (r220786) @@ -527,8 +527,6 @@ cam_periph_invalidate(struct cam_periph xpt_lock_buses(); if (periph->refcount == 0) camperiphfree(periph); - else if (periph->refcount < 0) - printf("cam_invalidate_periph: refcount < 0!!\n"); xpt_unlock_buses(); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 15:30:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B11AB106564A; Mon, 18 Apr 2011 15:30:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8426C8FC16; Mon, 18 Apr 2011 15:30: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 p3IFUP12076222; Mon, 18 Apr 2011 15:30:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IFUPt8076220; Mon, 18 Apr 2011 15:30:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104181530.p3IFUPt8076220@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 15:30: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: r220787 - 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, 18 Apr 2011 15:30:25 -0000 Author: glebius Date: Mon Apr 18 15:30:25 2011 New Revision: 220787 URL: http://svn.freebsd.org/changeset/base/220787 Log: It is already seven years since mbuf allocator uses same M_WAITOK/M_NOWAIT flags as malloc(9). Update manual page. Submitted by: Vadim Goncharov Modified: head/share/man/man9/mbuf.9 Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Mon Apr 18 14:34:10 2011 (r220786) +++ head/share/man/man9/mbuf.9 Mon Apr 18 15:30:25 2011 (r220787) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2010 +.Dd April 18, 2011 .Dt MBUF 9 .Os .\" @@ -371,9 +371,9 @@ on failure. The .Fa how argument is to be set to -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT . +.Dv M_NOWAIT . It specifies whether the caller is willing to block if necessary. A number of other functions and macros related to .Vt mbufs @@ -381,15 +381,16 @@ have the same argument because they may at some point need to allocate new .Vt mbufs . .Pp -Programmers should be careful not to confuse the +Historical .Vt mbuf -allocation flag -.Dv M_DONTWAIT -with the -.Xr malloc 9 -allocation flag, -.Dv M_NOWAIT . -They are not the same. +allocator (See +.Sx HISTORY +section) used allocation flags +.Dv M_WAIT +and +.Dv M_DONTWAIT . +These constants are kept for compatibility +and their use in new code is discouraged. .It Fn MGETHDR mbuf how type Allocate an .Vt mbuf @@ -964,9 +965,9 @@ Upon success, the original chain will be chain will be returned. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. .Pp This function is especially useful in network drivers, where @@ -982,9 +983,9 @@ The original mbuf chain is always reclai count of any shared mbuf clusters is decremented. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. As a side-effect of this process the returned mbuf chain may be compacted. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 15:55:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2321065674; Mon, 18 Apr 2011 15:55:02 +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 70DDC8FC17; Mon, 18 Apr 2011 15:55: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 p3IFt238076791; Mon, 18 Apr 2011 15:55:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IFt2AP076790; Mon, 18 Apr 2011 15:55:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201104181555.p3IFt2AP076790@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 18 Apr 2011 15:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220788 - stable/8/sys/compat/x86bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 15:55:02 -0000 Author: jkim Date: Mon Apr 18 15:55:02 2011 New Revision: 220788 URL: http://svn.freebsd.org/changeset/base/220788 Log: MFC: r219430 Remove custom interrupt dispatcher. This is a pointless micro-optimization and it may cause problems if SS and SP are modified by real-mode code. Modified: stable/8/sys/compat/x86bios/x86bios.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/x86bios/x86bios.c ============================================================================== --- stable/8/sys/compat/x86bios/x86bios.c Mon Apr 18 15:30:25 2011 (r220787) +++ stable/8/sys/compat/x86bios/x86bios.c Mon Apr 18 15:55:02 2011 (r220788) @@ -291,25 +291,6 @@ x86bios_emu_outl(struct x86emu *emu, uin outl(port, val); } -static void -x86bios_emu_get_intr(struct x86emu *emu, int intno) -{ - uint16_t *sp; - uint32_t iv; - - emu->x86.R_SP -= 6; - - sp = (uint16_t *)((vm_offset_t)x86bios_seg + emu->x86.R_SP); - sp[0] = htole16(emu->x86.R_IP); - sp[1] = htole16(emu->x86.R_CS); - sp[2] = htole16(emu->x86.R_FLG); - - iv = x86bios_get_intr(intno); - emu->x86.R_IP = iv & 0xffff; - emu->x86.R_CS = (iv >> 16) & 0xffff; - emu->x86.R_FLG &= ~(F_IF | F_TF); -} - void * x86bios_alloc(uint32_t *offset, size_t size) { @@ -567,7 +548,6 @@ x86bios_unmap_mem(void) static void x86bios_init(void *arg __unused) { - int i; mtx_init(&x86bios_lock, "x86bios lock", NULL, MTX_SPIN); @@ -598,9 +578,6 @@ x86bios_init(void *arg __unused) x86bios_emu.emu_outb = x86bios_emu_outb; x86bios_emu.emu_outw = x86bios_emu_outw; x86bios_emu.emu_outl = x86bios_emu_outl; - - for (i = 0; i < 256; i++) - x86bios_emu._x86emu_intrTab[i] = x86bios_emu_get_intr; } static void From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 16:00:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C70E106564A; Mon, 18 Apr 2011 16:00: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 7A8188FC0C; Mon, 18 Apr 2011 16:00: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 p3IG0kD9076969; Mon, 18 Apr 2011 16:00:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IG0k5k076966; Mon, 18 Apr 2011 16:00:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181600.p3IG0k5k076966@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 16:00: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: r220789 - 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: Mon, 18 Apr 2011 16:00:46 -0000 Author: mav Date: Mon Apr 18 16:00:46 2011 New Revision: 220789 URL: http://svn.freebsd.org/changeset/base/220789 Log: Handle ready timeout during polled operation same as done in mvs(4) before. 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 Mon Apr 18 15:55:02 2011 (r220788) +++ head/sys/dev/ahci/ahci.c Mon Apr 18 16:00:46 2011 (r220789) @@ -2856,4 +2856,9 @@ ahcipoll(struct cam_sim *sim) struct ahci_channel *ch = (struct ahci_channel *)cam_sim_softc(sim); ahci_ch_intr(ch->dev); + if (ch->resetting != 0 && + (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) { + ch->resetpolldiv = 1000; + ahci_reset_to(ch->dev); + } } Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Apr 18 15:55:02 2011 (r220788) +++ head/sys/dev/ahci/ahci.h Mon Apr 18 16:00:46 2011 (r220789) @@ -414,6 +414,7 @@ struct ahci_channel { int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ int resetting; /* Hard-reset in progress. */ + int resetpolldiv; /* Hard-reset poll divider. */ int listening; /* SUD bit is cleared. */ union ccb *frozen; /* Frozen command */ struct callout pm_timer; /* Power management events */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 16:16:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4CDE106564A; Mon, 18 Apr 2011 16:16:00 +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 19EA88FC18; Mon, 18 Apr 2011 16: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 p3IGG0q8077297; Mon, 18 Apr 2011 16:16:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IGFxvc077295; Mon, 18 Apr 2011 16:15:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104181615.p3IGFxvc077295@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Apr 2011 16:15: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: r220790 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 16:16:01 -0000 Author: mav Date: Mon Apr 18 16:15:59 2011 New Revision: 220790 URL: http://svn.freebsd.org/changeset/base/220790 Log: Reduce geom_raid log verbosity. Modified: head/sys/geom/raid/g_raid.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Mon Apr 18 16:00:46 2011 (r220789) +++ head/sys/geom/raid/g_raid.c Mon Apr 18 16:15:59 2011 (r220790) @@ -55,7 +55,7 @@ u_int g_raid_aggressive_spare = 0; TUNABLE_INT("kern.geom.raid.aggressive_spare", &g_raid_aggressive_spare); SYSCTL_UINT(_kern_geom_raid, OID_AUTO, aggressive_spare, CTLFLAG_RW, &g_raid_aggressive_spare, 0, "Use disks without metadata as spare"); -u_int g_raid_debug = 2; +u_int g_raid_debug = 0; TUNABLE_INT("kern.geom.raid.debug", &g_raid_debug); SYSCTL_UINT(_kern_geom_raid, OID_AUTO, debug, CTLFLAG_RW, &g_raid_debug, 0, "Debug level"); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 16:32:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF0BD106566C; Mon, 18 Apr 2011 16:32:22 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAAC48FC0A; Mon, 18 Apr 2011 16:32: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 p3IGWMUX077732; Mon, 18 Apr 2011 16:32:22 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IGWM5v077720; Mon, 18 Apr 2011 16:32:22 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104181632.p3IGWM5v077720@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 18 Apr 2011 16:32: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: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 16:32:23 -0000 Author: mdf Date: Mon Apr 18 16:32:22 2011 New Revision: 220791 URL: http://svn.freebsd.org/changeset/base/220791 Log: Add the posix_fallocate(2) syscall. The default implementation in vop_stdallocate() is filesystem agnostic and will run as slow as a read/write loop in userspace; however, it serves to correctly implement the functionality for filesystems that do not implement a VOP_ALLOCATE. Note that __FreeBSD_version was already bumped today to 900036 for any ports which would like to use this function. Also reserve space in the syscall table for posix_fadvise(2). Reviewed by: -arch (previous version) Added: head/lib/libc/sys/posix_fallocate.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master head/sys/kern/vfs_default.c head/sys/kern/vfs_syscalls.c head/sys/kern/vnode_if.src head/sys/sys/fcntl.h head/sys/sys/vnode.h Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Apr 18 16:15:59 2011 (r220790) +++ head/lib/libc/sys/Makefile.inc Mon Apr 18 16:32:22 2011 (r220791) @@ -96,7 +96,7 @@ MAN+= abort2.2 accept.2 access.2 acct.2 mq_setattr.2 \ msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \ msync.2 munmap.2 nanosleep.2 nfssvc.2 ntp_adjtime.2 open.2 \ - pathconf.2 pipe.2 poll.2 posix_openpt.2 profil.2 \ + pathconf.2 pipe.2 poll.2 posix_fallocate.2 posix_openpt.2 profil.2 \ pselect.2 ptrace.2 quotactl.2 \ read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \ rtprio.2 Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Mon Apr 18 16:15:59 2011 (r220790) +++ head/lib/libc/sys/Symbol.map Mon Apr 18 16:32:22 2011 (r220791) @@ -364,6 +364,7 @@ FBSD_1.2 { cap_enter; cap_getmode; getloginclass; + posix_fallocate; rctl_get_racct; rctl_get_rules; rctl_get_limits; Added: head/lib/libc/sys/posix_fallocate.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/posix_fallocate.2 Mon Apr 18 16:32:22 2011 (r220791) @@ -0,0 +1,146 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 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 REGENTS 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 REGENTS 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. +.\" +.\" @(#)open.2 8.2 (Berkeley) 11/16/93 +.\" $FreeBSD$ +.\" +.Dd April 13, 2011 +.Dt POSIX_FALLOCATE 2 +.Os +.Sh NAME +.Nm posix_fallocate +.Nd pre-allocate storage for a range in a file +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In fcntl.h +.Ft int +.Fn posix_fallocate "int fd" "off_t offset" "off_t len" +.Sh DESCRIPTION +Required storage for the range +.Fa offset +to +.Fa offset + +.Fa len +in the file referenced by +.Fa fd +is guarateed to be allocated upon successful return. +That is, if +.Fn posix_fallocate +returns successfully, subsequent writes to the specified file data +will not fail due to lack of free space on the file system storage +media. +Any existing file data in the specified range is unmodified. +If +.Fa offset + +.Fa len +is beyond the current file size, then +.Fn posix_fallocate +will adjust the file size to +.Fa offset + +.Fa len . +Otherwise, the file size will not be changed. +.Pp +Space allocated by +.Fn posix_fallocate +will be freed by a successful call to +.Xr creat 2 +or +.Xr open 2 +that truncates the size of the file. +Space allocated via +.Fn posix_fallocate +may be freed by a successful call to +.Xr ftruncate 2 +that reduces the file size to a size smaller than +.Fa offset + +.Fa len . +.Pp +.Sh RETURN VALUES +If successful, +.Fn posix_fallocate +returns zero. +It returns -1 on failure, and sets +.Va errno +to indicate the error. +.Sh ERRORS +Possible failure conditions: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument is not a valid file descriptor. +.It Bq Er EBADF +The +.Fa fd +argument references a file that was opened without write permission. +.It Bq Er EFBIG +The value of +.Fa offset + +.Fa len +is greater than the maximum file size. +.It Bq Er EINTR +A signal was caught during execution. +.It Bq Er EINVAL +The +.Fa len +argument was zero or the +.Fa offset +argument was less than zero. +.It Bq Er EIO +An I/O error occurred while reading from or writing to a file system. +.It Bq Er ENODEV +The +.Fa fd +argument does not refer to a regular file. +.It Bq Er ENOSPC +There is insufficient free space remaining on the file system storage +media. +.It Bq Er ESPIPE +The +.Fa fd +argument is associated with a pipe or FIFO. +.El +.Sh SEE ALSO +.Xr creat 2 , +.Xr ftruncate 2 , +.Xr open 2 , +.Xr unlink 2 +.Sh STANDARDS +The +.Fn posix_fallocate +system call conforms to +.St -p1003.1-2004 . +.Sh HISTORY +The +.Fn posix_fallocate +function appeared in +.Fx 9.0 . +.Sh AUTHORS +.Fn posix_fallocate +and this manual page were initially written by +.An Matthew Fleming Aq mdf@FreeBSD.org . Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Apr 18 16:32:22 2011 (r220791) @@ -2790,3 +2790,15 @@ freebsd32_kldstat(struct thread *td, str bcopy(&stat.pathname[0], &stat32.pathname[0], sizeof(stat.pathname)); return (copyout(&stat32, uap->stat, version)); } + +int +freebsd32_posix_fallocate(struct thread *td, + struct freebsd32_posix_fallocate_args *uap) +{ + struct posix_fallocate_args ap; + + ap.fd = uap->fd; + ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32)); + return (posix_fallocate(td, &ap)); +} Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/compat/freebsd32/syscalls.master Mon Apr 18 16:32:22 2011 (r220791) @@ -986,3 +986,7 @@ 529 AUE_NULL NOPROTO { int rctl_remove_rule(const void *inbufp, \ size_t inbuflen, void *outbufp, \ size_t outbuflen); } +530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd,\ + uint32_t offsetlo, uint32_t offsethi,\ + uint32_t lenlo, uint32_t lenhi); } +531 AUE_NULL UNIMPL posix_fadvise Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/kern/syscalls.master Mon Apr 18 16:32:22 2011 (r220791) @@ -944,5 +944,8 @@ 529 AUE_NULL STD { int rctl_remove_rule(const void *inbufp, \ size_t inbuflen, void *outbufp, \ size_t outbuflen); } +530 AUE_NULL STD { int posix_fallocate(int fd, \ + off_t offset, off_t len); } +531 AUE_NULL UNIMPL posix_fadvise ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/kern/vfs_default.c Mon Apr 18 16:32:22 2011 (r220791) @@ -99,6 +99,7 @@ struct vop_vector default_vnodeops = { .vop_advlock = vop_stdadvlock, .vop_advlockasync = vop_stdadvlockasync, .vop_advlockpurge = vop_stdadvlockpurge, + .vop_allocate = vop_stdallocate, .vop_bmap = vop_stdbmap, .vop_close = VOP_NULL, .vop_fsync = VOP_NULL, @@ -855,6 +856,136 @@ out: return (error); } +int +vop_stdallocate(struct vop_allocate_args *ap) +{ +#ifdef __notyet__ + struct statfs sfs; +#endif + struct iovec aiov; + struct vattr vattr, *vap; + struct uio auio; + off_t len, cur, offset; + uint8_t *buf; + struct thread *td; + struct vnode *vp; + size_t iosize; + int error, locked; + + buf = NULL; + error = 0; + locked = 1; + td = curthread; + vap = &vattr; + vp = ap->a_vp; + len = ap->a_len; + offset = ap->a_offset; + + error = VOP_GETATTR(vp, vap, td->td_ucred); + if (error != 0) + goto out; + iosize = vap->va_blocksize; + if (iosize == 0) + iosize = BLKDEV_IOSIZE; + if (iosize > MAXPHYS) + iosize = MAXPHYS; + buf = malloc(iosize, M_TEMP, M_WAITOK); + +#ifdef __notyet__ + /* + * Check if the filesystem sets f_maxfilesize; if not use + * VOP_SETATTR to perform the check. + */ + error = VFS_STATFS(vp->v_mount, &sfs, td); + if (error != 0) + goto out; + if (sfs.f_maxfilesize) { + if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || + offset + len > sfs.f_maxfilesize) { + error = EFBIG; + goto out; + } + } else +#endif + if (offset + len > vap->va_size) { + VATTR_NULL(vap); + vap->va_size = offset + len; + error = VOP_SETATTR(vp, vap, td->td_ucred); + if (error != 0) + goto out; + } + + while (len > 0) { + if (should_yield()) { + VOP_UNLOCK(vp, 0); + locked = 0; + kern_yield(-1); + error = vn_lock(vp, LK_EXCLUSIVE); + if (error != 0) + break; + locked = 1; + error = VOP_GETATTR(vp, vap, td->td_ucred); + if (error != 0) + break; + } + + /* + * Read and write back anything below the nominal file + * size. There's currently no way outside the filesystem + * to know whether this area is sparse or not. + */ + cur = iosize; + if ((offset % iosize) != 0) + cur -= (offset % iosize); + if (cur > len) + cur = len; + if (offset < vap->va_size) { + aiov.iov_base = buf; + aiov.iov_len = cur; + auio.uio_iov = &aiov; + auio.uio_iovcnt = 1; + auio.uio_offset = offset; + auio.uio_resid = cur; + auio.uio_segflg = UIO_SYSSPACE; + auio.uio_rw = UIO_READ; + auio.uio_td = td; + error = VOP_READ(vp, &auio, 0, td->td_ucred); + if (error != 0) + break; + if (auio.uio_resid > 0) { + bzero(buf + cur - auio.uio_resid, + auio.uio_resid); + } + } else { + bzero(buf, cur); + } + + aiov.iov_base = buf; + aiov.iov_len = cur; + auio.uio_iov = &aiov; + auio.uio_iovcnt = 1; + auio.uio_offset = offset; + auio.uio_resid = cur; + auio.uio_segflg = UIO_SYSSPACE; + auio.uio_rw = UIO_WRITE; + auio.uio_td = td; + + error = VOP_WRITE(vp, &auio, 0, td->td_ucred); + if (error != 0) + break; + + len -= cur; + offset += cur; + } + + out: + KASSERT(locked || error != 0, ("How'd I get unlocked with no error?")); + if (locked && error != 0) + VOP_UNLOCK(vp, 0); + free(buf, M_TEMP); + return (error); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/kern/vfs_syscalls.c Mon Apr 18 16:32:22 2011 (r220791) @@ -4671,3 +4671,83 @@ out: VFS_UNLOCK_GIANT(vfslocked); return (error); } + +static int +kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len) +{ + struct file *fp; + struct mount *mp; + struct vnode *vp; + int error, vfslocked, vnlocked; + + fp = NULL; + mp = NULL; + vfslocked = 0; + vnlocked = 0; + error = fget(td, fd, &fp); + if (error != 0) + goto out; + + switch (fp->f_type) { + case DTYPE_VNODE: + break; + case DTYPE_PIPE: + case DTYPE_FIFO: + error = ESPIPE; + goto out; + default: + error = ENODEV; + goto out; + } + if ((fp->f_flag & FWRITE) == 0) { + error = EBADF; + goto out; + } + vp = fp->f_vnode; + if (vp->v_type != VREG) { + error = ENODEV; + goto out; + } + if (offset < 0 || len <= 0) { + error = EINVAL; + goto out; + } + /* Check for wrap. */ + if (offset > OFF_MAX - len) { + error = EFBIG; + goto out; + } + + bwillwrite(); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + error = vn_start_write(vp, &mp, V_WAIT | PCATCH); + if (error != 0) + goto out; + error = vn_lock(vp, LK_EXCLUSIVE); + if (error != 0) + goto out; + vnlocked = 1; +#ifdef MAC + error = mac_vnode_check_write(td->td_ucred, fp->f_cred, vp); + if (error != 0) + goto out; +#endif + error = VOP_ALLOCATE(vp, offset, len); + if (error != 0) + vnlocked = 0; + out: + if (vnlocked) + VOP_UNLOCK(vp, 0); + vn_finished_write(mp); + VFS_UNLOCK_GIANT(vfslocked); + if (fp != NULL) + fdrop(fp, td); + return (error); +} + +int +posix_fallocate(struct thread *td, struct posix_fallocate_args *uap) +{ + + return (kern_posix_fallocate(td, uap->fd, uap->offset, uap->len)); +} Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/kern/vnode_if.src Mon Apr 18 16:32:22 2011 (r220791) @@ -608,6 +608,7 @@ vop_vptofh { IN struct fid *fhp; }; + %% vptocnp vp L L L %% vptocnp vpp - U - @@ -618,3 +619,12 @@ vop_vptocnp { INOUT char *buf; INOUT int *buflen; }; + + +%% allocate vp E E U + +vop_allocate { + IN struct vnode *vp; + IN off_t offset; + IN off_t len; +}; Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/sys/fcntl.h Mon Apr 18 16:32:22 2011 (r220791) @@ -278,7 +278,7 @@ struct oflock { #endif /* - * XXX missing posix_fadvise() and posix_fallocate(), and POSIX_FADV_* macros. + * XXX missing posix_fadvise() and POSIX_FADV_* macros. */ #ifndef _KERNEL @@ -289,6 +289,9 @@ int fcntl(int, int, ...); #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 int openat(int, const char *, int, ...); #endif +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 +int posix_fallocate(int, off_t, off_t); +#endif #if __BSD_VISIBLE int flock(int, int); #endif Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Apr 18 16:15:59 2011 (r220790) +++ head/sys/sys/vnode.h Mon Apr 18 16:32:22 2011 (r220791) @@ -689,6 +689,7 @@ int vop_stdaccessx(struct vop_accessx_ar int vop_stdadvlock(struct vop_advlock_args *ap); int vop_stdadvlockasync(struct vop_advlockasync_args *ap); int vop_stdadvlockpurge(struct vop_advlockpurge_args *ap); +int vop_stdallocate(struct vop_allocate_args *ap); int vop_stdpathconf(struct vop_pathconf_args *); int vop_stdpoll(struct vop_poll_args *); int vop_stdvptocnp(struct vop_vptocnp_args *ap); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 16:32:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B30E1065688; Mon, 18 Apr 2011 16:32:48 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3803C8FC17; Mon, 18 Apr 2011 16:32: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 p3IGWmKH077784; Mon, 18 Apr 2011 16:32:48 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IGWlre077772; Mon, 18 Apr 2011 16:32:47 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104181632.p3IGWlre077772@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 18 Apr 2011 16:32: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: r220792 - in head/sys: compat/freebsd32 kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 16:32:48 -0000 Author: mdf Date: Mon Apr 18 16:32:47 2011 New Revision: 220792 URL: http://svn.freebsd.org/changeset/base/220792 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_proto.h Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -568,6 +568,13 @@ struct freebsd32_pselect_args { char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)]; }; +struct freebsd32_posix_fallocate_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offsetlo_l_[PADL_(uint32_t)]; uint32_t offsetlo; char offsetlo_r_[PADR_(uint32_t)]; + char offsethi_l_[PADL_(uint32_t)]; uint32_t offsethi; char offsethi_r_[PADR_(uint32_t)]; + char lenlo_l_[PADL_(uint32_t)]; uint32_t lenlo; char lenlo_r_[PADR_(uint32_t)]; + char lenhi_l_[PADL_(uint32_t)]; uint32_t lenhi; char lenhi_r_[PADR_(uint32_t)]; +}; #if !defined(PAD64_REQUIRED) && defined(__powerpc__) #define PAD64_REQUIRED #endif @@ -676,6 +683,7 @@ int freebsd32_semctl(struct thread *, st int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); +int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); #ifdef COMPAT_43 @@ -1042,6 +1050,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT +#define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ #define FREEBSD32_SYS_syscall 0 @@ -421,4 +421,5 @@ #define FREEBSD32_SYS_rctl_get_limits 527 #define FREEBSD32_SYS_rctl_add_rule 528 #define FREEBSD32_SYS_rctl_remove_rule 529 -#define FREEBSD32_SYS_MAXSYSCALL 530 +#define FREEBSD32_SYS_freebsd32_posix_fallocate 530 +#define FREEBSD32_SYS_MAXSYSCALL 532 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ const char *freebsd32_syscallnames[] = { @@ -553,4 +553,6 @@ const char *freebsd32_syscallnames[] = { "rctl_get_limits", /* 527 = rctl_get_limits */ "rctl_add_rule", /* 528 = rctl_add_rule */ "rctl_remove_rule", /* 529 = rctl_remove_rule */ + "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ + "#531", /* 531 = posix_fadvise */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ #include "opt_compat.h" @@ -590,4 +590,6 @@ struct sysent freebsd32_sysent[] = { { AS(rctl_get_limits_args), (sy_call_t *)rctl_get_limits, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 527 = rctl_get_limits */ { AS(rctl_add_rule_args), (sy_call_t *)rctl_add_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */ { AS(rctl_remove_rule_args), (sy_call_t *)rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ + { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 531 = posix_fadvise */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3007,6 +3007,17 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* freebsd32_posix_fallocate */ + case 530: { + struct freebsd32_posix_fallocate_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = p->offsetlo; /* uint32_t */ + uarg[2] = p->offsethi; /* uint32_t */ + uarg[3] = p->lenlo; /* uint32_t */ + uarg[4] = p->lenhi; /* uint32_t */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -8018,6 +8029,28 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* freebsd32_posix_fallocate */ + case 530: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "uint32_t"; + break; + default: + break; + }; + break; default: break; }; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/kern/init_sysent.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 220163 2011-03-30 17:48:15Z trasz + * created from FreeBSD */ #include "opt_compat.h" @@ -564,4 +564,6 @@ struct sysent sysent[] = { { AS(rctl_get_limits_args), (sy_call_t *)rctl_get_limits, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 527 = rctl_get_limits */ { AS(rctl_add_rule_args), (sy_call_t *)rctl_add_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */ { AS(rctl_remove_rule_args), (sy_call_t *)rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ + { AS(posix_fallocate_args), (sy_call_t *)posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = posix_fallocate */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 531 = posix_fadvise */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/kern/syscalls.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 220163 2011-03-30 17:48:15Z trasz + * created from FreeBSD */ const char *syscallnames[] = { @@ -537,4 +537,6 @@ const char *syscallnames[] = { "rctl_get_limits", /* 527 = rctl_get_limits */ "rctl_add_rule", /* 528 = rctl_add_rule */ "rctl_remove_rule", /* 529 = rctl_remove_rule */ + "posix_fallocate", /* 530 = posix_fallocate */ + "#531", /* 531 = posix_fadvise */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/kern/systrace_args.c Mon Apr 18 16:32:47 2011 (r220792) @@ -3185,6 +3185,15 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* posix_fallocate */ + case 530: { + struct posix_fallocate_args *p = params; + iarg[0] = p->fd; /* int */ + iarg[1] = p->offset; /* off_t */ + iarg[2] = p->len; /* off_t */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -8473,6 +8482,22 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* posix_fallocate */ + case 530: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "off_t"; + break; + case 2: + p = "off_t"; + break; + default: + break; + }; + break; default: break; }; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/sys/syscall.h Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 220163 2011-03-30 17:48:15Z trasz + * created from FreeBSD */ #define SYS_syscall 0 @@ -440,4 +440,5 @@ #define SYS_rctl_get_limits 527 #define SYS_rctl_add_rule 528 #define SYS_rctl_remove_rule 529 -#define SYS_MAXSYSCALL 530 +#define SYS_posix_fallocate 530 +#define SYS_MAXSYSCALL 532 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/sys/syscall.mk Mon Apr 18 16:32:47 2011 (r220792) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 220163 2011-03-30 17:48:15Z trasz +# created from FreeBSD MIASM = \ syscall.o \ exit.o \ @@ -388,4 +388,5 @@ MIASM = \ rctl_get_rules.o \ rctl_get_limits.o \ rctl_add_rule.o \ - rctl_remove_rule.o + rctl_remove_rule.o \ + posix_fallocate.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/sys/sysproto.h Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 220163 2011-03-30 17:48:15Z trasz + * created from FreeBSD */ #ifndef _SYS_SYSPROTO_H_ @@ -1708,6 +1708,11 @@ struct rctl_remove_rule_args { char outbufp_l_[PADL_(void *)]; void * outbufp; char outbufp_r_[PADR_(void *)]; char outbuflen_l_[PADL_(size_t)]; size_t outbuflen; char outbuflen_r_[PADR_(size_t)]; }; +struct posix_fallocate_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; + char len_l_[PADL_(off_t)]; off_t len; char len_r_[PADR_(off_t)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -2078,6 +2083,7 @@ int rctl_get_rules(struct thread *, stru int rctl_get_limits(struct thread *, struct rctl_get_limits_args *); int rctl_add_rule(struct thread *, struct rctl_add_rule_args *); int rctl_remove_rule(struct thread *, struct rctl_remove_rule_args *); +int posix_fallocate(struct thread *, struct posix_fallocate_args *); #ifdef COMPAT_43 @@ -2762,6 +2768,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_rctl_get_limits AUE_NULL #define SYS_AUE_rctl_add_rule AUE_NULL #define SYS_AUE_rctl_remove_rule AUE_NULL +#define SYS_AUE_posix_fallocate AUE_NULL #undef PAD_ #undef PADL_ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 16:40:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF835106566B; Mon, 18 Apr 2011 16:40:47 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDECE8FC13; Mon, 18 Apr 2011 16:40: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 p3IGeljY077987; Mon, 18 Apr 2011 16:40:47 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IGelCL077985; Mon, 18 Apr 2011 16:40:47 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104181640.p3IGelCL077985@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 18 Apr 2011 16:40: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: r220793 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 16:40:47 -0000 Author: mdf Date: Mon Apr 18 16:40:47 2011 New Revision: 220793 URL: http://svn.freebsd.org/changeset/base/220793 Log: Fix a copy/paste whitespace error. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Apr 18 16:32:47 2011 (r220792) +++ head/sys/kern/vfs_syscalls.c Mon Apr 18 16:40:47 2011 (r220793) @@ -4699,10 +4699,10 @@ kern_posix_fallocate(struct thread *td, error = ENODEV; goto out; } - if ((fp->f_flag & FWRITE) == 0) { - error = EBADF; + if ((fp->f_flag & FWRITE) == 0) { + error = EBADF; goto out; - } + } vp = fp->f_vnode; if (vp->v_type != VREG) { error = ENODEV; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 17:15:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1505106564A; Mon, 18 Apr 2011 17:15:16 +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 8FCEC8FC0A; Mon, 18 Apr 2011 17:15:15 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3IH6jYk040301 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 18 Apr 2011 11:06:46 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110418070124.GA67934@freebsd.org> Date: Mon, 18 Apr 2011 11:06:42 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> To: Roman Divacky X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 18 Apr 2011 11:06:49 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 17:15:17 -0000 On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > please mark this in src/UPDATING, maybe bump freebsd_version too? Please do not bump freebsd_version just for this. Ports wishing to know = can go off the last bump, if there are any. Every freebsd_version bump forces rebuilding all modules and such and is = a pita. Warner >=20 > On Sun, Apr 17, 2011 at 09:03:23PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Sun Apr 17 21:03:23 2011 >> New Revision: 220755 >> URL: http://svn.freebsd.org/changeset/base/220755 >>=20 >> Log: >> Remove libobjc and other Objective-C related components, as these = are >> extremely outdated, and not used by anything in the base system. >>=20 >> Silence from: current@ >>=20 >> Deleted: >> head/contrib/gcc/doc/objc.texi >> head/contrib/gcc/objc/ >> head/contrib/libobjc/ >> head/gnu/lib/libobjc/ >> head/gnu/usr.bin/cc/cc1obj/ >> Modified: >> head/Makefile.inc1 >> head/ObsoleteFiles.inc >> head/contrib/gcc/doc/cpp.1 >> head/contrib/gcc/doc/cpp.texi >> head/contrib/gcc/doc/cppenv.texi >> head/contrib/gcc/doc/cppinternals.texi >> head/contrib/gcc/doc/cppopts.texi >> head/contrib/gcc/doc/extend.texi >> head/contrib/gcc/doc/frontends.texi >> head/contrib/gcc/doc/gcc.1 >> head/contrib/gcc/doc/gcc.texi >> head/contrib/gcc/doc/invoke.texi >> head/contrib/gcc/doc/sourcebuild.texi >> head/contrib/gcc/doc/standards.texi >> head/contrib/gcc/doc/tm.texi >> head/etc/mtree/BSD.include.dist >> head/gnu/lib/Makefile >> head/gnu/usr.bin/cc/Makefile >> head/gnu/usr.bin/cc/cc_tools/Makefile >> head/gnu/usr.bin/cc/doc/Makefile >> head/share/mk/bsd.dep.mk >> head/share/mk/bsd.lib.mk >> head/share/mk/bsd.libnames.mk >> head/share/mk/bsd.own.mk >> head/share/mk/bsd.prog.mk >>=20 >> Modified: head/Makefile.inc1 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/Makefile.inc1 Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/Makefile.inc1 Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -306,7 +306,6 @@ LIB32WMAKEENV+=3D MAKEOBJDIRPREFIX=3D${OBJTR= >> PATH=3D${TMPPATH} \ >> CC=3D"${CC} ${LIB32FLAGS}" \ >> CXX=3D"${CXX} ${LIB32FLAGS}" \ >> - OBJC=3D"${OBJC} ${LIB32FLAGS}" \ >> LIBDIR=3D/usr/lib32 \ >> SHLIBDIR=3D/usr/lib32 >>=20 >>=20 >> Modified: head/ObsoleteFiles.inc >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/ObsoleteFiles.inc Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/ObsoleteFiles.inc Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -38,6 +38,26 @@ >> # xargs -n1 | sort | uniq -d; >> # done >>=20 >> +# 20110417: removal of Objective-C support >> +OLD_FILES+=3Dusr/include/objc/encoding.h >> +OLD_FILES+=3Dusr/include/objc/hash.h >> +OLD_FILES+=3Dusr/include/objc/NXConstStr.h >> +OLD_FILES+=3Dusr/include/objc/objc-api.h >> +OLD_FILES+=3Dusr/include/objc/objc-decls.h >> +OLD_FILES+=3Dusr/include/objc/objc-list.h >> +OLD_FILES+=3Dusr/include/objc/objc.h >> +OLD_FILES+=3Dusr/include/objc/Object.h >> +OLD_FILES+=3Dusr/include/objc/Protocol.h >> +OLD_FILES+=3Dusr/include/objc/runtime.h >> +OLD_FILES+=3Dusr/include/objc/sarray.h >> +OLD_FILES+=3Dusr/include/objc/thr.h >> +OLD_FILES+=3Dusr/include/objc/typedstream.h >> +OLD_FILES+=3Dusr/lib/libobjc.a >> +OLD_FILES+=3Dusr/lib/libobjc.so >> +OLD_FILES+=3Dusr/lib/libobjc_p.a >> +OLD_FILES+=3Dusr/libexec/cc1obj >> +OLD_LIBS+=3Dusr/lib/libobjc.so.4 >> +OLD_DIRS+=3Dusr/include/objc >> # 20110224: sticky.8 -> sticky.7 >> OLD_FILES+=3Dusr/share/man/man8/sticky.8.gz >> # 20110220: new clang import which bumps version from 2.8 to 2.9 >>=20 >> Modified: head/contrib/gcc/doc/cpp.1 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/cpp.1 Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/cpp.1 Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -153,14 +153,14 @@ before compilation. It is called a macr >> you to define \fImacros\fR, which are brief abbreviations for longer >> constructs. >> .PP >> -The C preprocessor is intended to be used only with C, \*(C+, and >> -Objective-C source code. In the past, it has been abused as a = general >> -text processor. It will choke on input which does not obey C's = lexical >> -rules. For example, apostrophes will be interpreted as the = beginning of >> -character constants, and cause errors. Also, you cannot rely on it >> -preserving characteristics of the input which are not significant to >> -C\-family languages. If a Makefile is preprocessed, all the hard = tabs >> -will be removed, and the Makefile will not work. >> +The C preprocessor is intended to be used only with C and \*(C+ = source >> +code. In the past, it has been abused as a general text processor. = It >> +will choke on input which does not obey C's lexical rules. For >> +example, apostrophes will be interpreted as the beginning of = character >> +constants, and cause errors. Also, you cannot rely on it preserving >> +characteristics of the input which are not significant to C\-family >> +languages. If a Makefile is preprocessed, all the hard tabs will be >> +removed, and the Makefile will not work. >> .PP >> Having said that, you can often get away with using cpp on things = which >> are not C. Other Algol-ish programming languages are often safe >> @@ -482,19 +482,16 @@ header files. >> .PD 0 >> .IP "\fB\-x c++\fR" 4 >> .IX Item "-x c++" >> -.IP "\fB\-x objective-c\fR" 4 >> -.IX Item "-x objective-c" >> .IP "\fB\-x assembler-with-cpp\fR" 4 >> .IX Item "-x assembler-with-cpp" >> .PD >> -Specify the source language: C, \*(C+, Objective\-C, or assembly. = This has >> -nothing to do with standards conformance or extensions; it merely >> -selects which base syntax to expect. If you give none of these = options, >> -cpp will deduce the language from the extension of the source file: >> -\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common >> -extensions for \*(C+ and assembly are also recognized. If cpp does = not >> -recognize the extension, it will treat the file as C; this is the = most >> -generic mode. >> +Specify the source language: C, \*(C+, or assembly. This has = nothing >> +to do with standards conformance or extensions; it merely selects = which >> +base syntax to expect. If you give none of these options, cpp will >> +deduce the language from the extension of the source file: = \&\fB.c\fR, >> +\fB.cc\fR, or \fB.S\fR. Some other common extensions for \*(C+ and >> +assembly are also recognized. If cpp does not recognize the = extension, >> +it will treat the file as C; this is the most generic mode. >> .Sp >> \&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option >> which selected both the language and the standards conformance level. >> @@ -854,8 +851,6 @@ configuration of \s-1GCC\s0. >> .IX Item "C_INCLUDE_PATH" >> .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 >> .IX Item "CPLUS_INCLUDE_PATH" >> -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 >> -.IX Item "OBJC_INCLUDE_PATH" >> .PD >> Each variable's value is a list of directories separated by a special >> character, much like \fB\s-1PATH\s0\fR, in which to look for header = files. >>=20 >> Modified: head/contrib/gcc/doc/cpp.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/cpp.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/cpp.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -72,9 +72,9 @@ This manual contains no Invariant Sectio >> @ifnottex >> @node Top >> @top >> -The C preprocessor implements the macro language used to transform = C, >> -C++, and Objective-C programs before they are compiled. It can also = be >> -useful on its own. >> +The C preprocessor implements the macro language used to transform C >> +and C++ programs before they are compiled. It can also be useful on >> +its own. >>=20 >> @menu >> * Overview:: >> @@ -186,14 +186,14 @@ before compilation. It is called a macr >> you to define @dfn{macros}, which are brief abbreviations for longer >> constructs. >>=20 >> -The C preprocessor is intended to be used only with C, C++, and >> -Objective-C source code. In the past, it has been abused as a = general >> -text processor. It will choke on input which does not obey C's = lexical >> -rules. For example, apostrophes will be interpreted as the = beginning of >> -character constants, and cause errors. Also, you cannot rely on it >> -preserving characteristics of the input which are not significant to >> -C-family languages. If a Makefile is preprocessed, all the hard = tabs >> -will be removed, and the Makefile will not work. >> +The C preprocessor is intended to be used only with C and C++ source >> +code. In the past, it has been abused as a general text processor. = It >> +will choke on input which does not obey C's lexical rules. For >> +example, apostrophes will be interpreted as the beginning of = character >> +constants, and cause errors. Also, you cannot rely on it preserving >> +characteristics of the input which are not significant to C-family >> +languages. If a Makefile is preprocessed, all the hard tabs will be >> +removed, and the Makefile will not work. >>=20 >> Having said that, you can often get away with using cpp on things = which >> are not C@. Other Algol-ish programming languages are often safe >> @@ -1878,7 +1878,7 @@ the 1999 revision of the C standard. Su >> not yet complete. >>=20 >> This macro is not defined if the @option{-traditional-cpp} option is >> -used, nor when compiling C++ or Objective-C@. >> +used, nor when compiling C++. >>=20 >> @item __STDC_HOSTED__ >> This macro is defined, with value 1, if the compiler's target is a >> @@ -1895,11 +1895,6 @@ GNU C++ compiler is not yet fully confor >> instead. It is hoped to complete the implementation of standard C++ >> in the near future. >>=20 >> -@item __OBJC__ >> -This macro is defined, with value 1, when the Objective-C compiler = is in >> -use. You can use @code{__OBJC__} to test whether a header is = compiled >> -by a C compiler or a Objective-C compiler. >> - >> @item __ASSEMBLER__ >> This macro is defined with value 1 when preprocessing assembly >> language. >> @@ -1921,9 +1916,9 @@ underscores. >> @itemx __GNUC_MINOR__ >> @itemx __GNUC_PATCHLEVEL__ >> These macros are defined by all GNU compilers that use the C >> -preprocessor: C, C++, and Objective-C@. Their values are the major >> -version, minor version, and patch level of the compiler, as integer >> -constants. For example, GCC 3.2.1 will define @code{__GNUC__} to 3, >> +preprocessor: C and C++. Their values are the major version, minor >> +version, and patch level of the compiler, as integer constants. For >> +example, GCC 3.2.1 will define @code{__GNUC__} to 3, >> @code{__GNUC_MINOR__} to 2, and @code{__GNUC_PATCHLEVEL__} to 1. = These >> macros are also defined if you invoke the preprocessor directly. >>=20 >> @@ -2125,12 +2120,6 @@ general, user code should not need to ma >> purpose of this macro is to ease implementation of the C++ runtime >> library provided with G++. >>=20 >> -@item __NEXT_RUNTIME__ >> -This macro is defined, with value 1, if (and only if) the NeXT = runtime >> -(as in @option{-fnext-runtime}) is in use for Objective-C@. If the = GNU >> -runtime is used, this macro is not defined, so that you can use this >> -macro to determine which runtime (NeXT or GNU) is being used. >> - >> @item __LP64__ >> @itemx _LP64 >> These macros are defined, with value 1, if (and only if) the = compilation >> @@ -3433,11 +3422,10 @@ produce no output, rather than a line of >> @node Preprocessor Output >> @chapter Preprocessor Output >>=20 >> -When the C preprocessor is used with the C, C++, or Objective-C >> -compilers, it is integrated into the compiler and communicates a = stream >> -of binary tokens directly to the compiler's parser. However, it can >> -also be used in the more conventional standalone mode, where it = produces >> -textual output. >> +When the C preprocessor is used with the C or C++ compilers, it is >> +integrated into the compiler and communicates a stream of binary = tokens >> +directly to the compiler's parser. However, it can also be used in = the >> +more conventional standalone mode, where it produces textual output. >> @c FIXME: Document the library interface. >>=20 >> @cindex output format >> @@ -4053,33 +4041,13 @@ You can also make or cancel assertions u >> @node Obsolete once-only headers >> @subsection Obsolete once-only headers >>=20 >> -CPP supports two more ways of indicating that a header file should = be >> -read only once. Neither one is as portable as a wrapper = @samp{#ifndef}, >> -and we recommend you do not use them in new programs. >> - >> -@findex #import >> -In the Objective-C language, there is a variant of @samp{#include} >> -called @samp{#import} which includes a file, but does so at most = once. >> -If you use @samp{#import} instead of @samp{#include}, then you don't >> -need the conditionals inside the header file to prevent multiple >> -inclusion of the contents. GCC permits the use of @samp{#import} in = C >> -and C++ as well as Objective-C@. However, it is not in standard C = or C++ >> -and should therefore not be used by portable programs. >> - >> -@samp{#import} is not a well designed feature. It requires the = users of >> -a header file to know that it should only be included once. It is = much >> -better for the header file's implementor to write the file so that = users >> -don't need to know this. Using a wrapper @samp{#ifndef} = accomplishes >> -this goal. >> - >> -In the present implementation, a single use of @samp{#import} will >> -prevent the file from ever being read again, by either = @samp{#import} or >> -@samp{#include}. You should not rely on this; do not use both >> -@samp{#import} and @samp{#include} to refer to the same header file. >> - >> -Another way to prevent a header file from being included more than = once >> -is with the @samp{#pragma once} directive. If @samp{#pragma once} = is >> -seen when scanning a header file, that file will never be read = again, no >> +CPP supports one more way of indicating that a header file should be >> +read only once. This is not as portable as a wrapper = @samp{#ifndef}, >> +and we recommend you do not use it in new programs. >> + >> +A way to prevent a header file from being included more than once is >> +with the @samp{#pragma once} directive. If @samp{#pragma once} is = seen >> +when scanning a header file, that file will never be read again, no >> matter what. >>=20 >> @samp{#pragma once} does not have the problems that @samp{#import} = does, >>=20 >> Modified: head/contrib/gcc/doc/cppenv.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/cppenv.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/cppenv.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -14,9 +14,6 @@ >> @item CPATH >> @itemx C_INCLUDE_PATH >> @itemx CPLUS_INCLUDE_PATH >> -@itemx OBJC_INCLUDE_PATH >> -@c Commented out until ObjC++ is part of GCC: >> -@c @itemx OBJCPLUS_INCLUDE_PATH >> Each variable's value is a list of directories separated by a special >> character, much like @env{PATH}, in which to look for header files. >> The special character, @code{PATH_SEPARATOR}, is target-dependent and >>=20 >> Modified: head/contrib/gcc/doc/cppinternals.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/cppinternals.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/cppinternals.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -72,10 +72,10 @@ into another language, under the above c >>=20 >> The GNU C preprocessor is >> implemented as a library, @dfn{cpplib}, so it can be easily shared = between >> -a stand-alone preprocessor, and a preprocessor integrated with the = C, >> -C++ and Objective-C front ends. It is also available for use by = other >> -programs, though this is not recommended as its exposed interface = has >> -not yet reached a point of reasonable stability. >> +a stand-alone preprocessor, and a preprocessor integrated with the C >> +and C++ front ends. It is also available for use by other programs, >> +though this is not recommended as its exposed interface has not yet >> +reached a point of reasonable stability. >>=20 >> The library has been written to be re-entrant, so that it can be used >> to preprocess many files simultaneously if necessary. It has also = been >> @@ -91,7 +91,7 @@ the way they have. >>=20 >> @menu >> * Conventions:: Conventions used in the code. >> -* Lexer:: The combined C, C++ and Objective-C Lexer. >> +* Lexer:: The combined C and C++ Lexer. >> * Hash Nodes:: All identifiers are entered into a hash = table. >> * Macro Expansion:: Macro expansion algorithm. >> * Token Spacing:: Spacing and paste avoidance issues. >> @@ -131,12 +131,12 @@ behavior. >>=20 >> @section Overview >> The lexer is contained in the file @file{lex.c}. It is a hand-coded >> -lexer, and not implemented as a state machine. It can understand C, = C++ >> -and Objective-C source code, and has been extended to allow = reasonably >> -successful preprocessing of assembly language. The lexer does not = make >> -an initial pass to strip out trigraphs and escaped newlines, but = handles >> -them as they are encountered in a single pass of the input file. It >> -returns preprocessing tokens individually, not a line at a time. >> +lexer, and not implemented as a state machine. It can understand C = and >> +C++ source code, and has been extended to allow reasonably = successful >> +preprocessing of assembly language. The lexer does not make an = initial >> +pass to strip out trigraphs and escaped newlines, but handles them = as >> +they are encountered in a single pass of the input file. It returns >> +preprocessing tokens individually, not a line at a time. >>=20 >> It is mostly transparent to users of the library, since the library's >> interface for obtaining the next token, @code{cpp_get_token}, takes = care >> @@ -303,9 +303,9 @@ don't allow the terminators of header na >> @samp{"} or @samp{>} terminates the header name. >>=20 >> Interpretation of some character sequences depends upon whether we = are >> -lexing C, C++ or Objective-C, and on the revision of the standard in >> -force. For example, @samp{::} is a single token in C++, but in C it = is >> -two separate @samp{:} tokens and almost certainly a syntax error. = Such >> +lexing C or C++, and on the revision of the standard in force. For >> +example, @samp{::} is a single token in C++, but in C it is two >> +separate @samp{:} tokens and almost certainly a syntax error. Such >> cases are handled by @code{_cpp_lex_direct} based upon command-line >> flags stored in the @code{cpp_options} structure. >>=20 >>=20 >> Modified: head/contrib/gcc/doc/cppopts.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/cppopts.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/cppopts.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -347,17 +347,15 @@ current directory. >> @end ifclear >> @item -x c >> @itemx -x c++ >> -@itemx -x objective-c >> @itemx -x assembler-with-cpp >> @opindex x >> -Specify the source language: C, C++, Objective-C, or assembly. This = has >> -nothing to do with standards conformance or extensions; it merely >> -selects which base syntax to expect. If you give none of these = options, >> -cpp will deduce the language from the extension of the source file: >> -@samp{.c}, @samp{.cc}, @samp{.m}, or @samp{.S}. Some other common >> -extensions for C++ and assembly are also recognized. If cpp does = not >> -recognize the extension, it will treat the file as C; this is the = most >> -generic mode. >> +Specify the source language: C, C++, or assembly. This has nothing = to >> +do with standards conformance or extensions; it merely selects which >> +base syntax to expect. If you give none of these options, cpp will >> +deduce the language from the extension of the source file: = @samp{.c}, >> +@samp{.cc}, or @samp{.S}. Some other common extensions for C++ and >> +assembly are also recognized. If cpp does not recognize the = extension, >> +it will treat the file as C; this is the most generic mode. >>=20 >> @emph{Note:} Previous versions of cpp accepted a @option{-lang} = option >> which selected both the language and the standards conformance level. >>=20 >> Modified: head/contrib/gcc/doc/extend.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/extend.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/extend.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -16,9 +16,9 @@ any of these features is used.) To test >> features in conditional compilation, check for a predefined macro >> @code{__GNUC__}, which is always defined under GCC@. >>=20 >> -These extensions are available in C and Objective-C@. Most of them = are >> -also available in C++. @xref{C++ Extensions,,Extensions to the >> -C++ Language}, for extensions that apply @emph{only} to C++. >> +These extensions are available in C. Most of them are also = available >> +in C++. @xref{C++ Extensions,,Extensions to the C++ Language}, for >> +extensions that apply @emph{only} to C++. >>=20 >> Some features that are in ISO C99 but not C89 or C++ are also, as >> extensions, accepted by GCC in C89 mode and in C++. >> @@ -1716,8 +1716,6 @@ been called. Functions with these attri >> initializing data that will be used implicitly during the execution = of >> the program. >>=20 >> -These attributes are not currently implemented for Objective-C@. >> - >> @item deprecated >> @cindex @code{deprecated} attribute. >> The @code{deprecated} attribute results in a warning if the function >> @@ -2605,9 +2603,9 @@ Preprocessing Directives, cpp, The GNU C >>=20 >> This section describes the syntax with which @code{__attribute__} may = be >> used, and the constructs to which attribute specifiers bind, for the = C >> -language. Some details may vary for C++ and Objective-C@. Because = of >> -infelicities in the grammar for attributes, some forms described = here >> -may not be successfully parsed in all cases. >> +language. Some details may vary for C++. Because of infelicities = in >> +the grammar for attributes, some forms described here may not be >> +successfully parsed in all cases. >>=20 >> There are some problems with the semantics of attributes in C++. For >> example, there are no manglings for attributes, although they may = affect >> @@ -9896,9 +9894,8 @@ The Solaris target supports @code{#pragm >> Increase the minimum alignment of each @var{variable} to = @var{alignment}. >> This is the same as GCC's @code{aligned} attribute @pxref{Variable >> Attributes}). Macro expansion occurs on the arguments to this pragma >> -when compiling C and Objective-C. It does not currently occur when >> -compiling C++, but this is a bug which may be fixed in a future >> -release. >> +when compiling C. It does not currently occur when compiling C++, = but >> +this is a bug which may be fixed in a future release. >>=20 >> @item fini (@var{function} [, @var{function}]...) >> @cindex pragma, fini >>=20 >> Modified: head/contrib/gcc/doc/frontends.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/frontends.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/frontends.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -12,13 +12,10 @@ >> @cindex Ada >> @cindex Fortran >> @cindex Java >> -@cindex Objective-C >> -@cindex Objective-C++ >> @cindex treelang >> GCC stands for ``GNU Compiler Collection''. GCC is an integrated >> distribution of compilers for several major programming languages. = These >> -languages currently include C, C++, Objective-C, Objective-C++, = Java, >> -Fortran, and Ada. >> +languages currently include C, C++, Java, Fortran, and Ada. >>=20 >> The abbreviation @dfn{GCC} has multiple meanings in common use. The >> current official meaning is ``GNU Compiler Collection'', which refers >> @@ -59,5 +56,4 @@ have been implemented as ``preprocessors >> level language such as C@. None of the compilers included in GCC are >> implemented this way; they all generate machine code directly. This >> sort of preprocessor should not be confused with the @dfn{C >> -preprocessor}, which is an integral feature of the C, C++, = Objective-C >> -and Objective-C++ languages. >> +preprocessor}, which is an integral feature of the C and C++ = languages. >>=20 >> Modified: head/contrib/gcc/doc/gcc.1 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/gcc.1 Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/gcc.1 Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -219,22 +219,6 @@ in the following sections. >> \&\-Wno\-non\-template\-friend \-Wold\-style\-cast=20 >> \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions=20 >> \&\-Wsign\-promo\fR >> -.IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4 >> -.IX Item "Objective-C and Objective- Language Options" >> -\&\fB\-fconstant\-string\-class=3D\fR\fIclass-name\fR=20 >> -\&\fB\-fgnu\-runtime \-fnext\-runtime=20 >> -\&\-fno\-nil\-receivers=20 >> -\&\-fobjc\-call\-cxx\-cdtors=20 >> -\&\-fobjc\-direct\-dispatch=20 >> -\&\-fobjc\-exceptions=20 >> -\&\-fobjc\-gc=20 >> -\&\-freplace\-objc\-classes=20 >> -\&\-fzero\-link=20 >> -\&\-gen\-decls=20 >> -\&\-Wassign\-intercept=20 >> -\&\-Wno\-protocol \-Wselector=20 >> -\&\-Wstrict\-selector\-match=20 >> -\&\-Wundeclared\-selector\fR >> .IP "\fILanguage Independent Options\fR" 4 >> .IX Item "Language Independent Options" >> \&\fB\-fmessage\-length=3D\fR\fIn\fR =20 >> @@ -815,29 +799,9 @@ C source code which should not be prepro >> .IP "\fIfile\fR\fB.ii\fR" 4 >> .IX Item "file.ii" >> \&\*(C+ source code which should not be preprocessed. >> -.IP "\fIfile\fR\fB.m\fR" 4 >> -.IX Item "file.m" >> -Objective-C source code. Note that you must link with the = \fIlibobjc\fR >> -library to make an Objective-C program work. >> -.IP "\fIfile\fR\fB.mi\fR" 4 >> -.IX Item "file.mi" >> -Objective-C source code which should not be preprocessed. >> -.IP "\fIfile\fR\fB.mm\fR" 4 >> -.IX Item "file.mm" >> -.PD 0 >> -.IP "\fIfile\fR\fB.M\fR" 4 >> -.IX Item "file.M" >> -.PD >> -Objective\-\*(C+ source code. Note that you must link with the = \fIlibobjc\fR >> -library to make an Objective\-\*(C+ program work. Note that = \fB.M\fR refers >> -to a literal capital M. >> -.IP "\fIfile\fR\fB.mii\fR" 4 >> -.IX Item "file.mii" >> -Objective\-\*(C+ source code which should not be preprocessed. >> .IP "\fIfile\fR\fB.h\fR" 4 >> .IX Item "file.h" >> -C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned = into a >> -precompiled header. >> +C, or \*(C+ header file to be turned into a precompiled header. >> .IP "\fIfile\fR\fB.cc\fR" 4 >> .IX Item "file.cc" >> .PD 0 >> @@ -857,16 +821,6 @@ precompiled header. >> \&\*(C+ source code which must be preprocessed. Note that in = \fB.cxx\fR, >> the last two letters must both be literally \fBx\fR. Likewise, >> \&\fB.C\fR refers to a literal capital C. >> -.IP "\fIfile\fR\fB.mm\fR" 4 >> -.IX Item "file.mm" >> -.PD 0 >> -.IP "\fIfile\fR\fB.M\fR" 4 >> -.IX Item "file.M" >> -.PD >> -Objective\-\*(C+ source code which must be preprocessed. >> -.IP "\fIfile\fR\fB.mii\fR" 4 >> -.IX Item "file.mii" >> -Objective\-\*(C+ source code which should not be preprocessed. >> .IP "\fIfile\fR\fB.hh\fR" 4 >> .IX Item "file.hh" >> .PD 0 >> @@ -941,8 +895,6 @@ the next \fB\-x\fR option. Possible val >> .Vb 9 >> \& c c-header c-cpp-output >> \& c++ c++-header c++-cpp-output >> -\& objective-c objective-c-header objective-c-cpp-output >> -\& objective-c++ objective-c++-header = objective-c++-cpp-output >> \& assembler assembler-with-cpp >> \& ada >> \& f95 f95-cpp-input >> @@ -1095,8 +1047,7 @@ languages; or options that are meaningfu >> .Sh "Options Controlling C Dialect" >> .IX Subsection "Options Controlling C Dialect" >> The following options control the dialect of C (or languages derived >> -from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the = compiler >> -accepts: >> +from C, such as \*(C+) that the compiler accepts: >> .IP "\fB\-ansi\fR" 4 >> .IX Item "-ansi" >> In C mode, support all \s-1ISO\s0 C90 programs. In \*(C+ mode, >> @@ -1840,251 +1791,6 @@ unsignedness, but the standard mandates=20 >> .Sp >> In this example, G++ will synthesize a default \fBA& operator =3D >> (const A&);\fR, while cfront will use the user-defined \fBoperator = =3D\fR. >> -.Sh "Options Controlling Objective-C and Objective\-\*(C+ Dialects" >> -.IX Subsection "Options Controlling Objective-C and Objective- = Dialects" >> -(\s-1NOTE:\s0 This manual does not describe the Objective-C and = Objective\-\*(C+ >> -languages themselves. See=20 >> -.PP >> -This section describes the command-line options that are only = meaningful >> -for Objective-C and Objective\-\*(C+ programs, but you can also use = most of >> -the language-independent \s-1GNU\s0 compiler options. >> -For example, you might compile a file \f(CW\*(C`some_class.m\*(C'\fR = like this: >> -.PP >> -.Vb 1 >> -\& gcc -g -fgnu-runtime -O -c some_class.m >> -.Ve >> -.PP >> -In this example, \fB\-fgnu\-runtime\fR is an option meant only for >> -Objective-C and Objective\-\*(C+ programs; you can use the other = options with >> -any language supported by \s-1GCC\s0. >> -.PP >> -Note that since Objective-C is an extension of the C language, = Objective-C >> -compilations may also use options specific to the C front-end (e.g., >> -\&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations = may use >> -\&\*(C+\-specific options (e.g., \fB\-Wabi\fR). >> -.PP >> -Here is a list of options that are \fIonly\fR for compiling = Objective-C >> -and Objective\-\*(C+ programs: >> -.IP "\fB\-fconstant\-string\-class=3D\fR\fIclass-name\fR" 4 >> -.IX Item "-fconstant-string-class=3Dclass-name" >> -Use \fIclass-name\fR as the name of the class to instantiate for = each >> -literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. = The default >> -class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 = runtime is being used, and >> -\&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being = used (see below). The >> -\&\fB\-fconstant\-cfstrings\fR option, if also present, will = override the >> -\&\fB\-fconstant\-string\-class\fR setting and cause = \f(CW\*(C`@"..."\*(C'\fR literals >> -to be laid out as constant CoreFoundation strings. >> -.IP "\fB\-fgnu\-runtime\fR" 4 >> -.IX Item "-fgnu-runtime" >> -Generate object code compatible with the standard \s-1GNU\s0 = Objective-C >> -runtime. This is the default for most types of systems. >> -.IP "\fB\-fnext\-runtime\fR" 4 >> -.IX Item "-fnext-runtime" >> -Generate output compatible with the NeXT runtime. This is the = default >> -for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X. The = macro >> -\&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only = if) this option is >> -used. >> -.IP "\fB\-fno\-nil\-receivers\fR" 4 >> -.IX Item "-fno-nil-receivers" >> -Assume that all Objective-C message dispatches (e.g., >> -\&\f(CW\*(C`[receiver message:arg]\*(C'\fR) in this translation unit = ensure that the receiver >> -is not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry = points in the runtime >> -to be used. Currently, this option is only available in conjunction = with >> -the NeXT runtime on Mac \s-1OS\s0 X 10.3 and later. >> -.IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4 >> -.IX Item "-fobjc-call-cxx-cdtors" >> -For each Objective-C class, check if any of its instance variables = is a >> -\&\*(C+ object with a non-trivial default constructor. If so, = synthesize a >> -special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method = that will run >> -non-trivial default constructors on any such instance variables, in = order, >> -and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any = instance variable >> -is a \*(C+ object with a non-trivial destructor, and if so, = synthesize a >> -special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method that will = run >> -all such default destructors, in reverse order. >> -.Sp >> -The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and/or \f(CW\*(C`\- = (void) .cxx_destruct\*(C'\fR methods >> -thusly generated will only operate on instance variables declared in = the >> -current Objective-C class, and not those inherited from = superclasses. It >> -is the responsibility of the Objective-C runtime to invoke all such = methods >> -in an object's inheritance hierarchy. The \f(CW\*(C`\- (id) = .cxx_construct\*(C'\fR methods >> -will be invoked by the runtime immediately after a new object >> -instance is allocated; the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR = methods will >> -be invoked immediately before the runtime deallocates an object = instance. >> -.Sp >> -As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 = and later has >> -support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR = and >> -\&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods. >> -.IP "\fB\-fobjc\-direct\-dispatch\fR" 4 >> -.IX Item "-fobjc-direct-dispatch" >> -Allow fast jumps to the message dispatcher. On Darwin this is >> -accomplished via the comm page. >> -.IP "\fB\-fobjc\-exceptions\fR" 4 >> -.IX Item "-fobjc-exceptions" >> -Enable syntactic support for structured exception handling in = Objective\-C, >> -similar to what is offered by \*(C+ and Java. This option is >> -unavailable in conjunction with the NeXT runtime on Mac \s-1OS\s0 X = 10.2 and >> -earlier. >> -.Sp >> -.Vb 23 >> -\& @try { >> -\& ... >> -\& @throw expr; >> -\& ... >> -\& } >> -\& @catch (AnObjCClass *exc) { >> -\& ... >> -\& @throw expr; >> -\& ... >> -\& @throw; >> -\& ... >> -\& } >> -\& @catch (AnotherClass *exc) { >> -\& ... >> -\& } >> -\& @catch (id allOthers) { >> -\& ... >> -\& } >> -\& @finally { >> -\& ... >> -\& @throw expr; >> -\& ... >> -\& } >> -.Ve >> -.Sp >> -The \f(CW@throw\fR statement may appear anywhere in an Objective-C = or >> -Objective\-\*(C+ program; when used inside of a \f(CW@catch\fR = block, the >> -\&\f(CW@throw\fR may appear without an argument (as shown above), in = which case >> -the object caught by the \f(CW@catch\fR will be rethrown. >> -.Sp >> -Note that only (pointers to) Objective-C objects may be thrown and >> -caught using this scheme. When an object is thrown, it will be = caught >> -by the nearest \f(CW@catch\fR clause capable of handling objects of = that type, >> -analogously to how \f(CW\*(C`catch\*(C'\fR blocks work in \*(C+ and = Java. A >> -\&\f(CW\*(C`@catch(id ...)\*(C'\fR clause (as shown above) may also = be provided to catch >> -any and all Objective-C exceptions not caught by previous = \f(CW@catch\fR >> -clauses (if any). >> -.Sp >> -The \f(CW@finally\fR clause, if present, will be executed upon exit = from the >> -immediately preceding \f(CW\*(C`@try ... @catch\*(C'\fR section. = This will happen >> -regardless of whether any exceptions are thrown, caught or rethrown >> -inside the \f(CW\*(C`@try ... @catch\*(C'\fR section, analogously to = the behavior >> -of the \f(CW\*(C`finally\*(C'\fR clause in Java. >> -.Sp >> -There are several caveats to using the new exception mechanism: >> -.RS 4 >> -.IP "*" 4 >> -Although currently designed to be binary compatible with = \f(CW\*(C`NS_HANDLER\*(C'\fR\-style >> -idioms provided by the \f(CW\*(C`NSException\*(C'\fR class, the new >> -exceptions can only be used on Mac \s-1OS\s0 X 10.3 (Panther) and = later >> -systems, due to additional functionality needed in the (NeXT) = Objective-C >> -runtime. >> -.IP "*" 4 >> -As mentioned above, the new exceptions do not support handling >> -types other than Objective-C objects. Furthermore, when used from >> -Objective\-\*(C+, the Objective-C exception model does not = interoperate with \*(C+ >> -exceptions at this time. This means you cannot \f(CW@throw\fR an = exception >> -from Objective-C and \f(CW\*(C`catch\*(C'\fR it in \*(C+, or vice = versa >> -(i.e., \f(CW\*(C`throw ... @catch\*(C'\fR). >> -.RE >> -.RS 4 >> -.Sp >> -The \fB\-fobjc\-exceptions\fR switch also enables the use of = synchronization >> -blocks for thread-safe execution: >> -.Sp >> -.Vb 3 >> -\& @synchronized (ObjCClass *guard) { >> -\& ... >> -\& } >> -.Ve >> -.Sp >> -Upon entering the \f(CW@synchronized\fR block, a thread of execution = shall >> -first check whether a lock has been placed on the corresponding = \f(CW\*(C`guard\*(C'\fR >> -object by another thread. If it has, the current thread shall wait = until >> -the other thread relinquishes its lock. Once = \f(CW\*(C`guard\*(C'\fR becomes available, >> -the current thread will place its own lock on it, execute the code = contained in >> -the \f(CW@synchronized\fR block, and finally relinquish the lock = (thereby >> -making \f(CW\*(C`guard\*(C'\fR available to other threads). >> -.Sp >> -Unlike Java, Objective-C does not allow for entire methods to be = marked >> -\&\f(CW@synchronized\fR. Note that throwing exceptions out of >> -\&\f(CW@synchronized\fR blocks is allowed, and will cause the = guarding object >> -to be unlocked properly. >> -.RE >> -.IP "\fB\-fobjc\-gc\fR" 4 >> -.IX Item "-fobjc-gc" >> -Enable garbage collection (\s-1GC\s0) in Objective-C and = Objective\-\*(C+ programs. >> -.IP "\fB\-freplace\-objc\-classes\fR" 4 >> -.IX Item "-freplace-objc-classes" >> -Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to = statically link in >> -the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load = it in at >> -run time instead. This is used in conjunction with the = Fix-and-Continue >> -debugging mode, where the object file in question may be recompiled = and >> -dynamically reloaded in the course of program execution, without the = need >> -to restart the program itself. Currently, Fix-and-Continue = functionality >> -is only available in conjunction with the NeXT runtime on Mac = \s-1OS\s0 X 10.3 >> -and later. >> -.IP "\fB\-fzero\-link\fR" 4 >> -.IX Item "-fzero-link" >> -When compiling for the NeXT runtime, the compiler ordinarily = replaces calls >> -to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the = class is known at >> -compile time) with static class references that get initialized at = load time, >> -which improves run-time performance. Specifying the = \fB\-fzero\-link\fR flag >> -suppresses this behavior and causes calls to = \f(CW\*(C`objc_getClass("...")\*(C'\fR >> -to be retained. This is useful in Zero-Link debugging mode, since = it allows >> -for individual class implementations to be modified during program = execution. >> -.IP "\fB\-gen\-decls\fR" 4 >> -.IX Item "-gen-decls" >> -Dump interface declarations for all classes seen in the source file = to a >> -file named \fI\fIsourcename\fI.decl\fR. >> -.IP "\fB\-Wassign\-intercept\fR" 4 >> -.IX Item "-Wassign-intercept" >> -Warn whenever an Objective-C assignment is being intercepted by the >> -garbage collector. >> -.IP "\fB\-Wno\-protocol\fR" 4 >> -.IX Item "-Wno-protocol" >> -If a class is declared to implement a protocol, a warning is issued = for >> -every method in the protocol that is not implemented by the class. = The >> -default behavior is to issue a warning for every method not = explicitly >> -implemented in the class, even if a method implementation is = inherited >> -from the superclass. If you use the \fB\-Wno\-protocol\fR option, = then >> -methods inherited from the superclass are considered to be = implemented, >> -and no warning is issued for them. >> -.IP "\fB\-Wselector\fR" 4 >> -.IX Item "-Wselector" >> -Warn if multiple methods of different types for the same selector = are >> -found during compilation. The check is performed on the list of = methods >> -in the final stage of compilation. Additionally, a check is = performed >> -for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR >> -expression, and a corresponding method for that selector has been = found >> -during compilation. Because these checks scan the method table only = at >> -the end of compilation, these warnings are not produced if the final >> -stage of compilation is not reached, for example because an error is >> -found during compilation, or because the \fB\-fsyntax\-only\fR = option is >> -being used. >> -.IP "\fB\-Wstrict\-selector\-match\fR" 4 >> -.IX Item "-Wstrict-selector-match" >> -Warn if multiple methods with differing argument and/or return types = are >> -found for a given selector when attempting to send a message using = this >> -selector to a receiver of type \f(CW\*(C`id\*(C'\fR or = \f(CW\*(C`Class\*(C'\fR. When this flag >> -is off (which is the default behavior), the compiler will omit such = warnings >> -if any differences found are confined to types which share the same = size >> -and alignment. >> -.IP "\fB\-Wundeclared\-selector\fR" 4 >> -.IX Item "-Wundeclared-selector" >> -Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to = an >> -undeclared selector is found. A selector is considered undeclared = if no >> -method with that name has been declared before the >> -\&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in = an >> -\&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly = in >> -an \f(CW@implementation\fR section. This option always performs its >> -checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is = found, >> -while \fB\-Wselector\fR only performs its checks in the final stage = of >> -compilation. This also enforces the coding style convention >> -that methods and selectors must be declared before being used. >> -.IP "\fB\-print\-objc\-runtime\-info\fR" 4 >> -.IX Item "-print-objc-runtime-info" >> -Generate C header describing the largest structure that is passed by >> -value, if any. >> .Sh "Options to Control Diagnostic Messages Formatting" >> .IX Subsection "Options to Control Diagnostic Messages Formatting" >> Traditionally, diagnostic messages have been formatted irrespective = of >> @@ -2136,8 +1842,7 @@ two forms, whichever is not the default. >> .PP >> The following options control the amount and kinds of warnings = produced >> by \s-1GCC\s0; for further, language-specific options also refer to >> -\&\fB\*(C+ Dialect Options\fR and \fBObjective-C and = Objective\-\*(C+ Dialect >> -Options\fR. >> +\&\fB\*(C+ Dialect Options\fR. >> .IP "\fB\-fsyntax\-only\fR" 4 >> .IX Item "-fsyntax-only" >> Check the code for syntax errors, but don't do anything beyond that. >> @@ -2287,8 +1992,8 @@ requiring a non-null value by the \f(CW\ >> .Sp >> \&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. = It >> can be disabled with the \fB\-Wno\-nonnull\fR option. >> -.IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ = only)" 4 >> -.IX Item "-Winit-self (C, , Objective-C and Objective- only)" >> +.IP "\fB\-Winit\-self\fR (C, \*(C+ only)" 4 >> +.IX Item "-Winit-self (C, only)" >> Warn about uninitialized variables which are initialized with = themselves. >> Note this option can only be used with the \fB\-Wuninitialized\fR = option, >> which in turn only works with \fB\-O1\fR and above. >> @@ -2339,8 +2044,8 @@ bracketed, but that for \fBb\fR is fully >> .Ve >> .Sp >> This warning is enabled by \fB\-Wall\fR. >> -.IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and = Objective\-\*(C+ only)" 4 >> -.IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- = only)" >> +.IP "\fB\-Wmissing\-include\-dirs\fR (C and \*(C+ only)" 4 >> +.IX Item "-Wmissing-include-dirs (C, only)" >> Warn if a user-supplied include directory does not exist. >> .IP "\fB\-Wparentheses\fR" 4 >> .IX Item "-Wparentheses" >> @@ -2675,8 +2380,7 @@ All of the above \fB\-W\fR options combi >> warnings about constructions that some users consider questionable, = and >> that are easy to avoid (or modify to prevent the warning), even in >> conjunction with macros. This also enables some language-specific >> -warnings described in \fB\*(C+ Dialect Options\fR and >> -\&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR. >> +warnings described in \fB\*(C+ Dialect Options\fR. >> .PP >> The following \fB\-W...\fR options are not implied by \fB\-Wall\fR. >> Some of them warn about constructions that users generally do not >> @@ -3224,8 +2928,8 @@ itself is likely to take inordinate amou >> .IP "\fB\-Wpointer\-sign\fR" 4 >> .IX Item "-Wpointer-sign" >> Warn for pointer argument passing or assignment with different = signedness. >> -This option is only supported for C and Objective\-C. It is implied = by >> -\&\fB\-Wall\fR and by \fB\-pedantic\fR, which can be disabled with >> +This option is only supported for C. It is implied by = \&\fB\-Wall\fR >> +and by \fB\-pedantic\fR, which can be disabled with >> \&\fB\-Wno\-pointer\-sign\fR. >> .IP "\fB\-Werror\fR" 4 >> .IX Item "-Werror" >> @@ -6294,12 +5998,10 @@ current directory. >> .PD 0 >> .IP "\fB\-x c++\fR" 4 >> .IX Item "-x c++" >> -.IP "\fB\-x objective-c\fR" 4 >> -.IX Item "-x objective-c" >> .IP "\fB\-x assembler-with-cpp\fR" 4 >> .IX Item "-x assembler-with-cpp" >> .PD >> -Specify the source language: C, \*(C+, Objective\-C, or assembly. = This has >> +Specify the source language: C, \*(C+, or assembly. This has >> nothing to do with standards conformance or extensions; it merely >> selects which base syntax to expect. If you give none of these = options, >> cpp will deduce the language from the extension of the source file: >> @@ -6728,10 +6430,6 @@ ordinary object file, it is linked in th >> difference between using an \fB\-l\fR option and specifying a file = name >> is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR >> and searches several directories. >> -.IP "\fB\-lobjc\fR" 4 >> -.IX Item "-lobjc" >> -You need this special case of the \fB\-l\fR option in order to >> -link an Objective-C or Objective\-\*(C+ program. >> .IP "\fB\-nostartfiles\fR" 4 >> .IX Item "-nostartfiles" >> Do not use the standard system startup files when linking. >> @@ -13035,8 +12733,6 @@ preprocessor. >> .IX Item "C_INCLUDE_PATH" >> .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 >> .IX Item "CPLUS_INCLUDE_PATH" >> -.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 >> -.IX Item "OBJC_INCLUDE_PATH" >> .PD >> Each variable's value is a list of directories separated by a special >> character, much like \fB\s-1PATH\s0\fR, in which to look for header = files. >>=20 >> Modified: head/contrib/gcc/doc/gcc.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/gcc.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/gcc.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -129,7 +129,6 @@ Introduction, gccint, GNU Compiler Colle >> * C Implementation:: How GCC implements the ISO C specification. >> * C Extensions:: GNU extensions to the C language family. >> * C++ Extensions:: GNU extensions to the C++ language. >> -* Objective-C:: GNU Objective-C runtime features. >> * Compatibility:: Binary Compatibility >> * Gcov:: @command{gcov}---a test coverage program. >> * Trouble:: If you have trouble using GCC. >> @@ -154,7 +153,6 @@ Introduction, gccint, GNU Compiler Colle >> @include invoke.texi >> @include implement-c.texi >> @include extend.texi >> -@include objc.texi >> @include compat.texi >> @include gcov.texi >> @include trouble.texi >>=20 >> Modified: head/contrib/gcc/doc/invoke.texi >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/contrib/gcc/doc/invoke.texi Sun Apr 17 20:44:02 2011 = (r220754) >> +++ head/contrib/gcc/doc/invoke.texi Sun Apr 17 21:03:23 2011 = (r220755) >> @@ -124,8 +124,6 @@ only one of these two forms, whichever o >> * Invoking G++:: Compiling C++ programs. >> * C Dialect Options:: Controlling the variant of C language = compiled. >> * C++ Dialect Options:: Variations on C++. >> -* Objective-C and Objective-C++ Dialect Options:: Variations on = Objective-C >> - and Objective-C++. >> * Language Independent Options:: Controlling how diagnostics should = be >> formatted. >> * Warning Options:: How picky should the compiler be? >> @@ -195,24 +193,6 @@ in the following sections. >> -Woverloaded-virtual -Wno-pmf-conversions @gol >> -Wsign-promo} >>=20 >> -@item Objective-C and Objective-C++ Language Options >> -@xref{Objective-C and Objective-C++ Dialect Options,,Options = Controlling >> -Objective-C and Objective-C++ Dialects}. >> -@gccoptlist{-fconstant-string-class=3D@var{class-name} @gol >> --fgnu-runtime -fnext-runtime @gol >> --fno-nil-receivers @gol >> --fobjc-call-cxx-cdtors @gol >> --fobjc-direct-dispatch @gol >> --fobjc-exceptions @gol >> --fobjc-gc @gol >> --freplace-objc-classes @gol >> --fzero-link @gol >> --gen-decls @gol >> --Wassign-intercept @gol >> --Wno-protocol -Wselector @gol >> --Wstrict-selector-match @gol >> --Wundeclared-selector} >> - >> @item Language Independent Options >> @xref{Language Independent Options,,Options to Control Diagnostic = Messages Formatting}. >> @gccoptlist{-fmessage-length=3D@var{n} @gol >> @@ -795,8 +775,6 @@ See S/390 and zSeries Options. >> or preprocessed source. >> * C Dialect Options:: Controlling the variant of C language = compiled. >> * C++ Dialect Options:: Variations on C++. >> -* Objective-C and Objective-C++ Dialect Options:: Variations on = Objective-C >> - and Objective-C++. >> * Language Independent Options:: Controlling how diagnostics should = be >> formatted. >> * Warning Options:: How picky should the compiler be? >> @@ -837,25 +815,8 @@ C source code which should not be prepro >> @item @var{file}.ii >> C++ source code which should not be preprocessed. >>=20 >> -@item @var{file}.m >> -Objective-C source code. Note that you must link with the = @file{libobjc} >> -library to make an Objective-C program work. >> - >> -@item @var{file}.mi >> -Objective-C source code which should not be preprocessed. >> - >> -@item @var{file}.mm >> -@itemx @var{file}.M >> -Objective-C++ source code. Note that you must link with the = @file{libobjc} >> -library to make an Objective-C++ program work. Note that @samp{.M} = refers >> -to a literal capital M@. >> - >> -@item @var{file}.mii >> -Objective-C++ source code which should not be preprocessed. >> - >> @item @var{file}.h >> -C, C++, Objective-C or Objective-C++ header file to be turned into a >> -precompiled header. >> +C, or C++ header file to be turned into a precompiled header. >>=20 >> @item @var{file}.cc >> @itemx @var{file}.cp >> @@ -868,13 +829,6 @@ C++ source code which must be preprocess >> the last two letters must both be literally @samp{x}. Likewise, >> @samp{.C} refers to a literal capital C@. >>=20 >> -@item @var{file}.mm >> -@itemx @var{file}.M >> -Objective-C++ source code which must be preprocessed. >> - >> -@item @var{file}.mii >> -Objective-C++ source code which should not be preprocessed. >> - >> @item @var{file}.hh >> @itemx @var{file}.H >> C++ header file to be turned into a precompiled header. >> @@ -946,8 +900,6 @@ the next @option{-x} option. Possible v >> @smallexample >> c c-header c-cpp-output >> c++ c++-header c++-cpp-output >> -objective-c objective-c-header objective-c-cpp-output >> -objective-c++ objective-c++-header objective-c++-cpp-output >> assembler assembler-with-cpp >> ada >> f95 f95-cpp-input >> @@ -1121,8 +1073,7 @@ explanations of options that are meaning >> @cindex options, dialect >>=20 >> The following options control the dialect of C (or languages derived >> -from C, such as C++, Objective-C and Objective-C++) that the = compiler >> -accepts: >> +from C, such as C++) that the compiler accepts: >>=20 >> @table @gcctabopt >> @cindex ANSI support >> @@ -1955,278 +1906,6 @@ In this example, G++ will synthesize a d >> (const A&);}, while cfront will use the user-defined @samp{operator = =3D}. >> @end table >>=20 >> -@node Objective-C and Objective-C++ Dialect Options >> -@section Options Controlling Objective-C and Objective-C++ Dialects >> - >> -@cindex compiler options, Objective-C and Objective-C++ >> -@cindex Objective-C and Objective-C++ options, command line >> -@cindex options, Objective-C and Objective-C++ >> -(NOTE: This manual does not describe the Objective-C and = Objective-C++ >> -languages themselves. See @xref{Standards,,Language Standards >> -Supported by GCC}, for references.) >> - >> -This section describes the command-line options that are only = meaningful >> -for Objective-C and Objective-C++ programs, but you can also use = most of >> -the language-independent GNU compiler options. >> -For example, you might compile a file @code{some_class.m} like this: >> - >> -@smallexample >> -gcc -g -fgnu-runtime -O -c some_class.m >> -@end smallexample >> - >> -@noindent >> -In this example, @option{-fgnu-runtime} is an option meant only for >> -Objective-C and Objective-C++ programs; you can use the other = options with >> -any language supported by GCC@. >> - >> -Note that since Objective-C is an extension of the C language, = Objective-C >> -compilations may also use options specific to the C front-end (e.g., >> -@option{-Wtraditional}). Similarly, Objective-C++ compilations may = use >> -C++-specific options (e.g., @option{-Wabi}). >> - >> -Here is a list of options that are @emph{only} for compiling = Objective-C >>=20 >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 17:43:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7C2B106564A; Mon, 18 Apr 2011 17:43:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5F488FC12; Mon, 18 Apr 2011 17:43: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 p3IHhGT8079438; Mon, 18 Apr 2011 17:43:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IHhGBf079436; Mon, 18 Apr 2011 17:43:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201104181743.p3IHhGBf079436@svn.freebsd.org> From: John Baldwin Date: Mon, 18 Apr 2011 17:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220794 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 17:43:17 -0000 Author: jhb Date: Mon Apr 18 17:43:16 2011 New Revision: 220794 URL: http://svn.freebsd.org/changeset/base/220794 Log: When checking to see if a window update should be sent to the remote peer, don't force a window update if the window would not actually grow due to window scaling. Specifically, if the window scaling factor is larger than 2 * MSS, then after the local reader has drained 2 * MSS bytes from the socket, a window update can end up advertising the same window. If this happens, the supposed window update actually ends up being a duplicate ACK. This can result in an excessive number of duplicate ACKs when using a higher maximum socket buffer size. Reviewed by: bz MFC after: 1 month Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Apr 18 16:40:47 2011 (r220793) +++ head/sys/netinet/tcp_output.c Mon Apr 18 17:43:16 2011 (r220794) @@ -564,11 +564,19 @@ after_sack_rexmit: long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); + /* + * If the new window size ends up being the same as the old + * size when it is scaled, then don't force a window update. + */ + if ((tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale == + (adv + tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale) + goto dontupdate; if (adv >= (long) (2 * tp->t_maxseg)) goto send; if (2 * adv >= (long) so->so_rcv.sb_hiwat) goto send; } +dontupdate: /* * Send if we owe the peer an ACK, RST, SYN, or urgent data. ACKNOW From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 17:55:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A82A91065672; Mon, 18 Apr 2011 17:55:18 +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 7E9908FC13; Mon, 18 Apr 2011 17:55:18 +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 35B9046B35; Mon, 18 Apr 2011 13:55:18 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B511D8A01B; Mon, 18 Apr 2011 13:55:17 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 18 Apr 2011 13:06:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104181334.p3IDYVDh073304@svn.freebsd.org> In-Reply-To: <201104181334.p3IDYVDh073304@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201104181306.58172.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 18 Apr 2011 13:55:17 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220777 - 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: Mon, 18 Apr 2011 17:55:18 -0000 On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: > Author: mav > Date: Mon Apr 18 13:34:31 2011 > New Revision: 220777 > URL: http://svn.freebsd.org/changeset/base/220777 > > Log: > - Tune different wait loops to cut some more milliseconds from reset time. > - Do not call ahci_start() before device signature received. It is required > by the specification and caused non-fatal reset timeouts on AMD chipsets. Do you have to use DELAY() here rather than a blocking sleep via pause()? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:13:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C5C1065672; Mon, 18 Apr 2011 18:13:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id DBC398FC1B; Mon, 18 Apr 2011 18:13:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p3IIDEWk034328; Mon, 18 Apr 2011 22:13:14 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p3IIDEJN034327; Mon, 18 Apr 2011 22:13:14 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 18 Apr 2011 22:13:14 +0400 From: Gleb Smirnoff To: Maxim Sobolev Message-ID: <20110418181314.GL16958@FreeBSD.org> References: <201104170605.p3H65cab028890@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201104170605.p3H65cab028890@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 18:13:16 -0000 On Sun, Apr 17, 2011 at 06:05:38AM +0000, Maxim Sobolev wrote: M> Author: sobomax M> Date: Sun Apr 17 06:05:37 2011 M> New Revision: 220736 M> URL: http://svn.freebsd.org/changeset/base/220736 M> M> Log: M> If we can retrieve interface address sleep for one second and try again. M> This can happen during start-up, when natd starts before dhclient has a M> chance to receive IP address from the upstream provider. M> M> MFC after: 2 weeks This looks like a hack and better place for this hack would be shell scripts rather than nat daemon. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:15:11 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DBED1065670; Mon, 18 Apr 2011 18:15:11 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 200468FC18; Mon, 18 Apr 2011 18:15:10 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id D3D3845CA6; Mon, 18 Apr 2011 20:15:09 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B9B3845C9B; Mon, 18 Apr 2011 20:15:04 +0200 (CEST) Date: Mon, 18 Apr 2011 20:14:56 +0200 From: Pawel Jakub Dawidek To: Warner Losh Message-ID: <20110418181456.GB3097@garage.freebsd.pl> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline In-Reply-To: <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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, Roman Divacky , src-committers@FreeBSD.org, Dimitry Andric , svn-src-all@FreeBSD.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 18:15:11 -0000 --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: >=20 > On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >=20 > > please mark this in src/UPDATING, maybe bump freebsd_version too? >=20 > Please do not bump freebsd_version just for this. Ports wishing to know = can go off the last bump, if there are any. >=20 > Every freebsd_version bump forces rebuilding all modules and such and is = a pita. I agree that this is a PITA, but there also should be a way to force module load even on version bump. This is PITA especially for developers. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --24zk1gE8NUlDmwG9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2sf58ACgkQForvXbEpPzTKxQCg3NkfDEiCiJX8FyPM4QgIyxC6 o/YAoIJUWB9XGe+iCTaPyklbjI0/H5/j =EX26 -----END PGP SIGNATURE----- --24zk1gE8NUlDmwG9-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:18:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D63851065670; Mon, 18 Apr 2011 18:18:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3AFA8FC0C; Mon, 18 Apr 2011 18:18: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 p3III7Lw080250; Mon, 18 Apr 2011 18:18:07 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3III7D0080245; Mon, 18 Apr 2011 18:18:07 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104181818.p3III7D0080245@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 18 Apr 2011 18:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220795 - stable/8/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 18:18:08 -0000 Author: np Date: Mon Apr 18 18:18:07 2011 New Revision: 220795 URL: http://svn.freebsd.org/changeset/base/220795 Log: MFC r220643: There is no need to request a tx credit flush if such a request is already pending. Modified: stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/8/sys/dev/cxgbe/adapter.h Mon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/adapter.h Mon Apr 18 18:18:07 2011 (r220795) @@ -260,7 +260,7 @@ enum { /* eq flags */ EQ_ALLOCATED = (1 << 1), /* firmware resources allocated */ EQ_STARTED = (1 << 2), /* started */ - EQ_STALLED = (1 << 3), /* currently stalled */ + EQ_CRFLUSHED = (1 << 3), /* expecting an update from SGE */ }; /* Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Mon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/t4_main.c Mon Apr 18 18:18:07 2011 (r220795) @@ -2673,6 +2673,7 @@ cxgbe_txq_start(void *arg, int count) struct sge_txq *txq = arg; TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_CRFLUSHED; txq_start(txq->ifp, txq); TXQ_UNLOCK(txq); } Modified: stable/8/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_sge.c Mon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/t4_sge.c Mon Apr 18 18:18:07 2011 (r220795) @@ -876,7 +876,7 @@ doorbell: * WR that reduced it to 0 so we don't need another flush (we don't have * any descriptor for a flush WR anyway, duh). */ - if (m && eq->avail > 0) + if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) write_eqflush_wr(eq); txq->m = m; @@ -1882,8 +1882,11 @@ write_txpkt_wr(struct port_info *pi, str wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKT_WR) | V_FW_WR_IMMDLEN(ctrl)); ctrl = V_FW_WR_LEN16(howmany(nflits, 2)); - if (eq->avail == ndesc) + if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) { ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ; + eq->flags |= EQ_CRFLUSHED; + } + wr->equiq_to_len16 = htobe32(ctrl); wr->r3 = 0; @@ -2071,8 +2074,10 @@ write_txpkts_wr(struct sge_txq *txq, str wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR) | V_FW_WR_IMMDLEN(0)); /* immdlen does not matter in this WR */ ctrl = V_FW_WR_LEN16(howmany(txpkts->nflits, 2)); - if (eq->avail == ndesc) + if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) { ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ; + eq->flags |= EQ_CRFLUSHED; + } wr->equiq_to_len16 = htobe32(ctrl); wr->plen = htobe16(txpkts->plen); wr->npkt = txpkts->npkt; @@ -2083,7 +2088,7 @@ write_txpkts_wr(struct sge_txq *txq, str txsd = &eq->sdesc[eq->pidx]; txsd->desc_used = ndesc; - KASSERT(eq->avail >= ndesc, ("%s: out ouf descriptors", __func__)); + KASSERT(eq->avail >= ndesc, ("%s: out of descriptors", __func__)); eq->pending += ndesc; eq->avail -= ndesc; @@ -2384,6 +2389,7 @@ write_eqflush_wr(struct sge_eq *eq) txsd->desc_used = 1; txsd->map_used = 0; + eq->flags |= EQ_CRFLUSHED; eq->pending++; eq->avail--; if (++eq->pidx == eq->cap) @@ -2438,6 +2444,10 @@ handle_sge_egr_update(struct adapter *sc struct port_info *pi; txq = (void *)s->eqmap[qid - s->eq_start]; + + KASSERT(txq->eq.flags & EQ_CRFLUSHED, + ("%s: tx queue %p not expecting an update.", __func__, txq)); + pi = txq->ifp->if_softc; taskqueue_enqueue(pi->tq, &txq->resume_tx); txq->egr_update++; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:19:14 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id B4BC51065677; Mon, 18 Apr 2011 18:19:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5FAA315336C; Mon, 18 Apr 2011 18:18:09 +0000 (UTC) Message-ID: <4DAC8060.2070002@FreeBSD.org> Date: Mon, 18 Apr 2011 11:18:08 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> <20110418181456.GB3097@garage.freebsd.pl> In-Reply-To: <20110418181456.GB3097@garage.freebsd.pl> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Roman Divacky , Dimitry Andric , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Warner Losh Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 18:19:14 -0000 On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: > On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: >> >> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >> >>> please mark this in src/UPDATING, maybe bump freebsd_version too? >> >> Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. >> >> Every freebsd_version bump forces rebuilding all modules and such and is a pita. > > I agree that this is a PITA, but there also should be a way to force > module load even on version bump. This is PITA especially for > developers. .... who make up a tiny percentage of the FreeBSD user community. Seriously? We're going to whine because version bumps cause a little extra compile time? -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:22:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B894106567E; Mon, 18 Apr 2011 18:22:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09BC08FC1A; Mon, 18 Apr 2011 18:22: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 p3IIMANj080389; Mon, 18 Apr 2011 18:22:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IIMA7S080387; Mon, 18 Apr 2011 18:22:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104181822.p3IIMA7S080387@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 18:22: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: r220796 - 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: Mon, 18 Apr 2011 18:22:11 -0000 Author: glebius Date: Mon Apr 18 18:22:10 2011 New Revision: 220796 URL: http://svn.freebsd.org/changeset/base/220796 Log: Pullup up to TCP header length before matching against 'tcpopts'. PR: kern/156180 Reviewed by: luigi Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Mon Apr 18 18:18:07 2011 (r220795) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Apr 18 18:22:10 2011 (r220796) @@ -913,9 +913,10 @@ ipfw_chk(struct ip_fw_args *args) * pointer might become stale after other pullups (but we never use it * this way). */ -#define PULLUP_TO(_len, p, T) \ +#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) +#define PULLUP_LEN(_len, p, T) \ do { \ - int x = (_len) + sizeof(T); \ + int x = (_len) + T; \ if ((m)->m_len < x) { \ args->m = m = m_pullup(m, x); \ if (m == NULL) \ @@ -1600,6 +1601,7 @@ do { \ break; case O_TCPOPTS: + PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2)); match = (proto == IPPROTO_TCP && offset == 0 && tcpopts_match(TCP(ulp), cmd)); break; @@ -2233,6 +2235,7 @@ do { \ } } /* end of inner loop, scan opcodes */ +#undef PULLUP_LEN if (done) break; From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:51:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6FB106566C; Mon, 18 Apr 2011 18:51:45 +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 D00D58FC0A; Mon, 18 Apr 2011 18:51:44 +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 7CEFD46B39; Mon, 18 Apr 2011 14:51:44 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F2B5B8A027; Mon, 18 Apr 2011 14:51:43 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Mon, 18 Apr 2011 14:48:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> In-Reply-To: <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104181448.39401.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 18 Apr 2011 14:51:44 -0400 (EDT) Cc: svn-src-head@freebsd.org, Roman Divacky , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 18:51:45 -0000 On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: > > On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > > > please mark this in src/UPDATING, maybe bump freebsd_version too? > > Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. > > Every freebsd_version bump forces rebuilding all modules and such and is a pita. No, what it breaks is building a module with a newer source tree than your running kernel and trying to kldload it. That is never really supported, but the kernel only notices when a version bump happens. The real fix there is to run a kernel + modules that are in sync on test boxes. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 18:55:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 053B61065673; Mon, 18 Apr 2011 18:55:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC7258FC14; Mon, 18 Apr 2011 18:55: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 p3IItRwk081182; Mon, 18 Apr 2011 18:55:27 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IItRoL081180; Mon, 18 Apr 2011 18:55:27 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201104181855.p3IItRoL081180@svn.freebsd.org> From: John Baldwin Date: Mon, 18 Apr 2011 18:55: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: r220797 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 18:55:28 -0000 Author: jhb Date: Mon Apr 18 18:55:27 2011 New Revision: 220797 URL: http://svn.freebsd.org/changeset/base/220797 Log: MFC 220430,220431,220452,220460: If a system call does not request a full interrupt return, use a fast path via the sysretq instruction to return from the system call. This resolves most of the performance regression in system call microbenchmarks between 7 and 8 on amd64. While here, trim an instruction (and memory access) from the doreti path and fix a typo in a comment. Modified: stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Mon Apr 18 18:22:10 2011 (r220796) +++ stable/8/sys/amd64/amd64/exception.S Mon Apr 18 18:55:27 2011 (r220797) @@ -339,6 +339,9 @@ IDTVEC(prot) * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. * swapgs gives us access to our PCPU space only. + * + * We do not support invoking this from a custom %cs or %ss (e.g. using + * entries from an LDT). */ IDTVEC(fast_syscall) swapgs @@ -379,7 +382,38 @@ IDTVEC(fast_syscall) FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp,%rdi call syscall - movq PCPU(CURPCB),%rax +1: movq PCPU(CURPCB),%rax + /* Disable interrupts before testing PCB_FULL_IRET. */ + cli + testl $PCB_FULL_IRET,PCB_FLAGS(%rax) + jnz 3f + /* Check for and handle AST's on return to userland. */ + movq PCPU(CURTHREAD),%rax + testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) + je 2f + sti + movq %rsp, %rdi + call ast + jmp 1b +2: /* Restore preserved registers. */ + MEXITCOUNT + movq TF_RDI(%rsp),%rdi /* bonus; preserve arg 1 */ + movq TF_RSI(%rsp),%rsi /* bonus: preserve arg 2 */ + movq TF_RDX(%rsp),%rdx /* return value 2 */ + movq TF_RAX(%rsp),%rax /* return value 1 */ + movq TF_RBX(%rsp),%rbx /* C preserved */ + movq TF_RBP(%rsp),%rbp /* C preserved */ + movq TF_R12(%rsp),%r12 /* C preserved */ + movq TF_R13(%rsp),%r13 /* C preserved */ + movq TF_R14(%rsp),%r14 /* C preserved */ + movq TF_R15(%rsp),%r15 /* C preserved */ + movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ + movq TF_RIP(%rsp),%rcx /* original %rip */ + movq TF_RSP(%rsp),%r9 /* user stack pointer */ + movq %r9,%rsp /* original %rsp */ + swapgs + sysretq +3: /* Requested full context restore, use doreti for that. */ MEXITCOUNT jmp doreti @@ -628,7 +662,7 @@ doreti: doreti_ast: /* * Check for ASTs atomically with returning. Disabling CPU - * interrupts provides sufficient locking eve in the SMP case, + * interrupts provides sufficient locking even in the SMP case, * since we will be informed of any new ASTs by an IPI. */ cli @@ -649,8 +683,7 @@ doreti_ast: */ doreti_exit: MEXITCOUNT - movq PCPU(CURTHREAD),%r8 - movq TD_PCB(%r8),%r8 + movq PCPU(CURPCB),%r8 /* * Do not reload segment registers for kernel. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:02:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39A44106564A; Mon, 18 Apr 2011 19:02:42 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDD18FC13; Mon, 18 Apr 2011 19:02: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 p3IJ2f6J081372; Mon, 18 Apr 2011 19:02:41 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IJ2fCY081370; Mon, 18 Apr 2011 19:02:41 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104181902.p3IJ2fCY081370@svn.freebsd.org> From: Matthew D Fleming Date: Mon, 18 Apr 2011 19:02: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: r220798 - 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, 18 Apr 2011 19:02:42 -0000 Author: mdf Date: Mon Apr 18 19:02:41 2011 New Revision: 220798 URL: http://svn.freebsd.org/changeset/base/220798 Log: Fix a few acpi sysctls that want "IK" formatting to specify CTLTYPE_INT. This got broken after r217586. Pointy hat: to me Tested by: David Wolfskill < davit AT catwhisker DOT org > Modified: head/sys/dev/acpica/acpi_thermal.c Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Mon Apr 18 18:55:27 2011 (r220797) +++ head/sys/dev/acpica/acpi_thermal.c Mon Apr 18 19:02:41 2011 (r220798) @@ -257,10 +257,10 @@ acpi_tz_attach(device_t dev) sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, oidname, CTLFLAG_RD, 0, ""); - SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, - sizeof(sc->tz_temperature), "IK", - "current thermal zone temperature"); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_temperature, 0, sysctl_handle_int, + "IK", "current thermal zone temperature"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", "cooling is active"); @@ -286,9 +286,9 @@ acpi_tz_attach(device_t dev) sc, offsetof(struct acpi_tz_softc, tz_zone.crt), acpi_tz_temp_sysctl, "IK", "critical temp setpoint (shutdown now)"); - SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, - sizeof(sc->tz_zone.ac), "IK", ""); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_zone.ac, 0, sysctl_handle_int, "IK", ""); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:20:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96DAC106566B; Mon, 18 Apr 2011 19:20:47 +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 855EA8FC12; Mon, 18 Apr 2011 19:20:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3IJKlS6081775; Mon, 18 Apr 2011 19:20:47 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IJKlVv081773; Mon, 18 Apr 2011 19:20:47 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201104181920.p3IJKlVv081773@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 18 Apr 2011 19:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220799 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 19:20:47 -0000 Author: trasz Date: Mon Apr 18 19:20:47 2011 New Revision: 220799 URL: http://svn.freebsd.org/changeset/base/220799 Log: Document problems with -d/-w and the fact that -X is the default. Suggested by: arundel@ Reviewed by: arundel@ Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Mon Apr 18 19:02:41 2011 (r220798) +++ head/bin/ps/ps.1 Mon Apr 18 19:20:47 2011 (r220799) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 16, 2011 +.Dd April 18, 2011 .Dt PS 1 .Os .Sh NAME @@ -130,7 +130,10 @@ If either of the and .Fl r options are also used, they control how sibling processes are sorted -relative to eachother. +relative to each other. +Note that this option has no effect if the +.Dq command +column is not the last column displayed. .It Fl e Display the environment as well. .It Fl f @@ -244,9 +247,13 @@ If the option is specified more than once, .Nm will use as many columns as necessary without regard for your window size. +Note that this option has no effect if the +.Dq command +column is not the last column displayed. .It Fl X When displaying processes matched by other options, skip any processes which do not have a controlling terminal. +This is the default behaviour. .It Fl x When displaying processes matched by other options, include processes which do not have a controlling terminal. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:28:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED6FF106564A; Mon, 18 Apr 2011 19:28:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAE78FC13; Mon, 18 Apr 2011 19:28:15 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3IJSBtf051806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2011 22:28:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3IJSA5R027163; Mon, 18 Apr 2011 22:28:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3IJSAc2027162; Mon, 18 Apr 2011 22:28:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 Apr 2011 22:28:10 +0300 From: Kostik Belousov To: Matthew D Fleming Message-ID: <20110418192810.GX48734@deviant.kiev.zoral.com.ua> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FT/vNgDLxVq4t/AU" Content-Disposition: inline In-Reply-To: <201104181632.p3IGWM5v077720@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 19:28:17 -0000 --FT/vNgDLxVq4t/AU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 04:32:22PM +0000, Matthew D Fleming wrote: > Author: mdf > Date: Mon Apr 18 16:32:22 2011 > New Revision: 220791 > URL: http://svn.freebsd.org/changeset/base/220791 >=20 > Log: > Add the posix_fallocate(2) syscall. The default implementation in > vop_stdallocate() is filesystem agnostic and will run as slow as a > read/write loop in userspace; however, it serves to correctly > implement the functionality for filesystems that do not implement a > VOP_ALLOCATE. > =20 > Note that __FreeBSD_version was already bumped today to 900036 for any > ports which would like to use this function. > =20 > Also reserve space in the syscall table for posix_fadvise(2). > =20 > Reviewed by: -arch (previous version) Thank you for taking the remarks into consideration. > =20 > +int > +vop_stdallocate(struct vop_allocate_args *ap) > +{ > +#ifdef __notyet__ > + struct statfs sfs; > +#endif > + struct iovec aiov; > + struct vattr vattr, *vap; > + struct uio auio; > + off_t len, cur, offset; > + uint8_t *buf; > + struct thread *td; > + struct vnode *vp; > + size_t iosize; > + int error, locked; > + > + buf =3D NULL; > + error =3D 0; > + locked =3D 1; > + td =3D curthread; > + vap =3D &vattr; > + vp =3D ap->a_vp; > + len =3D ap->a_len; > + offset =3D ap->a_offset; > + > + error =3D VOP_GETATTR(vp, vap, td->td_ucred); > + if (error !=3D 0) > + goto out; > + iosize =3D vap->va_blocksize; > + if (iosize =3D=3D 0) > + iosize =3D BLKDEV_IOSIZE; > + if (iosize > MAXPHYS) > + iosize =3D MAXPHYS; > + buf =3D malloc(iosize, M_TEMP, M_WAITOK); > + > +#ifdef __notyet__ > + /* > + * Check if the filesystem sets f_maxfilesize; if not use > + * VOP_SETATTR to perform the check. > + */ > + error =3D VFS_STATFS(vp->v_mount, &sfs, td); > + if (error !=3D 0) > + goto out; > + if (sfs.f_maxfilesize) { > + if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || > + offset + len > sfs.f_maxfilesize) { > + error =3D EFBIG; > + goto out; > + } > + } else > +#endif > + if (offset + len > vap->va_size) { > + VATTR_NULL(vap); > + vap->va_size =3D offset + len; > + error =3D VOP_SETATTR(vp, vap, td->td_ucred); > + if (error !=3D 0) > + goto out; > + } I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will do auto-extend as needed. Also, see below. > + > + while (len > 0) { > + if (should_yield()) { > + VOP_UNLOCK(vp, 0); > + locked =3D 0; > + kern_yield(-1); Please note that, despite dropping the vnode lock, the snapshot creation is still blocked at this point, due to previous vn_start_write(). If doing vn_finished_write() there, then bwillwrite() before next iteration is desired. > + error =3D vn_lock(vp, LK_EXCLUSIVE); > + if (error !=3D 0) > + break; > + locked =3D 1; > + error =3D VOP_GETATTR(vp, vap, td->td_ucred); > + if (error !=3D 0) > + break; > + } > + > + /* > + * Read and write back anything below the nominal file > + * size. There's currently no way outside the filesystem > + * to know whether this area is sparse or not. > + */ > + cur =3D iosize; > + if ((offset % iosize) !=3D 0) > + cur -=3D (offset % iosize); > + if (cur > len) > + cur =3D len; > + if (offset < vap->va_size) { > + aiov.iov_base =3D buf; > + aiov.iov_len =3D cur; > + auio.uio_iov =3D &aiov; > + auio.uio_iovcnt =3D 1; > + auio.uio_offset =3D offset; > + auio.uio_resid =3D cur; > + auio.uio_segflg =3D UIO_SYSSPACE; > + auio.uio_rw =3D UIO_READ; > + auio.uio_td =3D td; > + error =3D VOP_READ(vp, &auio, 0, td->td_ucred); > + if (error !=3D 0) > + break; > + if (auio.uio_resid > 0) { > + bzero(buf + cur - auio.uio_resid, > + auio.uio_resid); > + } > + } else { > + bzero(buf, cur); > + } Wouldn't VOP_SETATTR() at the start of the function mostly prevent this bzero from executing ? > + > + aiov.iov_base =3D buf; > + aiov.iov_len =3D cur; > + auio.uio_iov =3D &aiov; > + auio.uio_iovcnt =3D 1; > + auio.uio_offset =3D offset; > + auio.uio_resid =3D cur; > + auio.uio_segflg =3D UIO_SYSSPACE; > + auio.uio_rw =3D UIO_WRITE; > + auio.uio_td =3D td; > + > + error =3D VOP_WRITE(vp, &auio, 0, td->td_ucred); > + if (error !=3D 0) > + break; > + > + len -=3D cur; > + offset +=3D cur; > + } > + > + out: > + KASSERT(locked || error !=3D 0, ("How'd I get unlocked with no error?")= ); > + if (locked && error !=3D 0) > + VOP_UNLOCK(vp, 0); > + free(buf, M_TEMP); > + return (error); > +} I estimated what it would take to do the optimized implementation for UFS, and I think that the following change would allow to lessen the code duplication much. What if the vnode lock drop and looping be handled by the syscall, instead of the vop implementation ? In other words, allow the VOP_ALLOCATE() to allocate less then requested, and return the allocated amount to the caller. The loop would be centralized then, freeing fs from doing the dance. Also, if fs considers that suitable, it would do a whole allocation in one run. --FT/vNgDLxVq4t/AU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2skMoACgkQC3+MBN1Mb4jHIwCgpCqlFUXXeEEMX1WNBJN+ulTm Rq0AnRKY8W0QQDL+ehilruivUg3J/Ot1 =+QkD -----END PGP SIGNATURE----- --FT/vNgDLxVq4t/AU-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:32:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1CFB1065672; Mon, 18 Apr 2011 19:32:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8908B8FC13; Mon, 18 Apr 2011 19:32:19 +0000 (UTC) Received: by bwz12 with SMTP id 12so5646502bwz.13 for ; Mon, 18 Apr 2011 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=NmRMQYUyPhglFqsDlbsRySMvoC/d9COQ90sS0V2xYFE=; b=Vyr3Yi/CV9SO3qjlgb717iOTOfSqsfSz7DN+5dsBzblg5n9ZllpCjpOzr8hclCP+t+ 2ACjFJg1Bwne8yhcpeAHwqndhAa0bOHCLdTOK78PfLAfakZvQHN7WseuCrnJ3GROd+b+ FNZQ10r1HwpLZBRpm4c47ce+5MuM2+Tog8DzI= 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:content-type:content-transfer-encoding; b=o6TevkoB3hk4tg9ypKIKIT2hOe242ZKx0oB1gFIfDRd8757kAincb24+5m22oueIIy 4TEiFFr5XhoU1i8OCxpXk92Y6al0ho1tqcfkvlqSu5jozCuhWAyjul3jx7Sms2ktpAb4 nDJPeEd0LuOku1xrXZOljOWUDS9wuS6QWlsSI= Received: by 10.204.189.74 with SMTP id dd10mr361706bkb.174.1303155138255; Mon, 18 Apr 2011 12:32:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id b6sm3437125bkb.10.2011.04.18.12.32.16 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 12:32:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DAC91BF.7050102@FreeBSD.org> Date: Mon, 18 Apr 2011 22:32:15 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <201104181334.p3IDYVDh073304@svn.freebsd.org> <201104181306.58172.jhb@freebsd.org> In-Reply-To: <201104181306.58172.jhb@freebsd.org> 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: r220777 - 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: Mon, 18 Apr 2011 19:32:20 -0000 On 18.04.2011 20:06, John Baldwin wrote: > On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: >> Author: mav >> Date: Mon Apr 18 13:34:31 2011 >> New Revision: 220777 >> URL: http://svn.freebsd.org/changeset/base/220777 >> >> Log: >> - Tune different wait loops to cut some more milliseconds from reset time. >> - Do not call ahci_start() before device signature received. It is required >> by the specification and caused non-fatal reset timeouts on AMD chipsets. > > Do you have to use DELAY() here rather than a blocking sleep via pause()? At the moment I would say yes. These paths are called from CAM while holding SIM lock. CAM may not like if I drop the lock in the middle of the call. Also during recovery those functions could be called from the callout and interrupt threads. In that case even dropping the lock won't allow thread to sleep. I will think more about possibilities to refactor the code to replace some DELAYs with callouts, but requirement to keep functionality in polled mode doesn't make the task easier. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:42:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B548106566C; Mon, 18 Apr 2011 19:42:38 +0000 (UTC) (envelope-from yanegomi@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 D53E28FC15; Mon, 18 Apr 2011 19:42:37 +0000 (UTC) Received: by pwj8 with SMTP id 8so3101733pwj.13 for ; Mon, 18 Apr 2011 12:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Z3kM/MO964Xm37dkeWXpZMez+bX+39wwKZnyQrQhOB0=; b=CXpX0fjl2oDB7WmmomkwPpIPLIJBZvFpUlrYpbcAfn24MJWkcFu53zjQ/00+ZEypZw crgMIlLo5JDsV2jtqIJZ4kBgrpcelJAnMm7L3S4RlABvqZ0KcqthKcE/4GhT8ObMId5M sxPxEOyU3UlnmcwyOuTOFcnLLIbE0sKR5tTew= 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=CPWcHUNviHn2sM+jaAo1vgrUronMCkuSWVf8Ivk3fspYbn2FXdMWGgxHA+l1L1/lKf EeGrk3CVRCSaymuanbw9sUQdwou32CaKAIe1Jug1K8JNiRyb8MIvP8oODBeaF2tdtJGf AMmyMSQYuE8Tw0GMHhjV31QEo3k2S2gteVYw8= MIME-Version: 1.0 Received: by 10.68.2.132 with SMTP id 4mr7353764pbu.11.1303155757401; Mon, 18 Apr 2011 12:42:37 -0700 (PDT) Received: by 10.68.42.3 with HTTP; Mon, 18 Apr 2011 12:42:37 -0700 (PDT) In-Reply-To: <20110418181314.GL16958@FreeBSD.org> References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> Date: Mon, 18 Apr 2011 12:42:37 -0700 Message-ID: From: Garrett Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Maxim Sobolev , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 19:42:38 -0000 2011/4/18 Gleb Smirnoff : > On Sun, Apr 17, 2011 at 06:05:38AM +0000, Maxim Sobolev wrote: > M> Author: sobomax > M> Date: Sun Apr 17 06:05:37 2011 > M> New Revision: 220736 > M> URL: http://svn.freebsd.org/changeset/base/220736 > M> > M> Log: > M> =A0 If we can retrieve interface address sleep for one second and try = again. > M> =A0 This can happen during start-up, when natd starts before dhclient = has a > M> =A0 chance to receive IP address from the upstream provider. > M> > M> =A0 MFC after: 2 weeks > > This looks like a hack and better place for this hack would be shell > scripts rather than nat daemon. +1 -- in particular because this will affect all cases, and not just the dhclient-acquired IP external NIC case as the above commit message notes. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 19:48:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AB201065678; Mon, 18 Apr 2011 19:48:06 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA458FC17; Mon, 18 Apr 2011 19:48:05 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 19F5245EA7; Mon, 18 Apr 2011 21:48:04 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 86BCA45EAA; Mon, 18 Apr 2011 21:47:58 +0200 (CEST) Date: Mon, 18 Apr 2011 21:47:50 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20110418194750.GD3097@garage.freebsd.pl> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OaZoDhBhXzo6bW1J" Content-Disposition: inline In-Reply-To: <20110418192810.GX48734@deviant.kiev.zoral.com.ua> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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, Matthew D Fleming , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 19:48:06 -0000 --OaZoDhBhXzo6bW1J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 10:28:10PM +0300, Kostik Belousov wrote: > > + if (offset + len > vap->va_size) { > > + VATTR_NULL(vap); > > + vap->va_size =3D offset + len; > > + error =3D VOP_SETATTR(vp, vap, td->td_ucred); > > + if (error !=3D 0) > > + goto out; > > + } > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > do auto-extend as needed. Also, see below. Yeah, also when we extend file size we could skip reading zeros. > > + if (offset < vap->va_size) { [...] > > + } else { > > + bzero(buf, cur); > > + } > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > this bzero from executing ? Once we drop the vnode lock, the file size can change under us, no? > I estimated what it would take to do the optimized implementation for UFS, > and I think that the following change would allow to lessen the code > duplication much. >=20 > What if the vnode lock drop and looping be handled by the syscall, instead > of the vop implementation ? In other words, allow the VOP_ALLOCATE() > to allocate less then requested, and return the allocated amount to > the caller. The loop would be centralized then, freeing fs from doing > the dance. Also, if fs considers that suitable, it would do a whole > allocation in one run. I'd still go with SEEK_DATA/SEEK_HOLE loop as I suggested on arch@. If you would like to spend time on it, having SEEK_DATA/SEEK_HOLE support in UFS would be beneficial for other purposes too. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --OaZoDhBhXzo6bW1J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2slWUACgkQForvXbEpPzQOEgCg15ceghLKdon8khGcub0z2pwg 3n8AnipfpoOnf6hpQ3nut1gvoRT/W+F6 =69mP -----END PGP SIGNATURE----- --OaZoDhBhXzo6bW1J-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:02:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24617106564A; Mon, 18 Apr 2011 20:02:23 +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 B26BC8FC1B; Mon, 18 Apr 2011 20:02:22 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3IJxmkf041932 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 18 Apr 2011 13:59:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DAC8060.2070002@FreeBSD.org> Date: Mon, 18 Apr 2011 13:59:45 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <92422863-8655-4FDE-A1E9-5EE1F46DA5BC@bsdimp.com> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> <20110418181456.GB3097@garage.freebsd.pl> <4DAC8060.2070002@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 18 Apr 2011 13:59:50 -0600 (MDT) Cc: src-committers@FreeBSD.org, Pawel Jakub Dawidek , Roman Divacky , Dimitry Andric , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 20:02:23 -0000 On Apr 18, 2011, at 12:18 PM, Doug Barton wrote: > On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: >> On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: >>>=20 >>> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >>>=20 >>>> please mark this in src/UPDATING, maybe bump freebsd_version too? >>>=20 >>> Please do not bump freebsd_version just for this. Ports wishing to = know can go off the last bump, if there are any. >>>=20 >>> Every freebsd_version bump forces rebuilding all modules and such = and is a pita. >>=20 >> I agree that this is a PITA, but there also should be a way to force >> module load even on version bump. This is PITA especially for >> developers. >=20 > .... who make up a tiny percentage of the FreeBSD user community. = Seriously? We're going to whine because version bumps cause a little = extra compile time? The problem usually manifests itself when I got to debug a new problem, = load a driver and find I have to rebuild everything else to use it, = which forces an extra reboot on the machine in question. Sometimes this = can be quite disruptive to other things that machine is doing. In this case, there was a new kernel thing just after, so it turned out = OK. But let's not gratuitously bump the version since the granularity = we have already allows the ports to make good choices on when to leave = something in or out. Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:07:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D821065670; Mon, 18 Apr 2011 20:07:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFB7D8FC15; Mon, 18 Apr 2011 20:07: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 p3IK7863082794; Mon, 18 Apr 2011 20:07:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IK78GW082790; Mon, 18 Apr 2011 20:07:08 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104182007.p3IK78GW082790@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 20:07: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: r220800 - in head/sys: netgraph netinet/ipfw netinet/libalias X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 20:07:09 -0000 Author: glebius Date: Mon Apr 18 20:07:08 2011 New Revision: 220800 URL: http://svn.freebsd.org/changeset/base/220800 Log: LibAliasInit() should allocate memory with M_WAITOK flag. Modify it and its callers. Modified: head/sys/netgraph/ng_nat.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/libalias/alias_db.c Modified: head/sys/netgraph/ng_nat.c ============================================================================== --- head/sys/netgraph/ng_nat.c Mon Apr 18 19:20:47 2011 (r220799) +++ head/sys/netgraph/ng_nat.c Mon Apr 18 20:07:08 2011 (r220800) @@ -276,10 +276,6 @@ ng_nat_constructor(node_p node) /* Init aliasing engine. */ priv->lib = LibAliasInit(NULL); - if (priv->lib == NULL) { - free(priv, M_NETGRAPH); - return (ENOMEM); - } /* Set same ports on. */ (void )LibAliasSetMode(priv->lib, PKT_ALIAS_SAME_PORTS, Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Mon Apr 18 19:20:47 2011 (r220799) +++ head/sys/netinet/ipfw/ip_fw_nat.c Mon Apr 18 20:07:08 2011 (r220800) @@ -359,28 +359,17 @@ ipfw_nat_cfg(struct sockopt *sopt) IPFW_WLOCK(chain); ptr = lookup_nat(&chain->nat, ser_n->id); if (ptr == NULL) { + IPFW_WUNLOCK(chain); /* New rule: allocate and init new instance. */ - ptr = malloc(sizeof(struct cfg_nat), - M_IPFW, M_NOWAIT | M_ZERO); - if (ptr == NULL) { - IPFW_WUNLOCK(chain); - free(buf, M_IPFW); - return (ENOSPC); - } + ptr = malloc(sizeof(struct cfg_nat), M_IPFW, M_WAITOK | M_ZERO); ptr->lib = LibAliasInit(NULL); - if (ptr->lib == NULL) { - IPFW_WUNLOCK(chain); - free(ptr, M_IPFW); - free(buf, M_IPFW); - return (EINVAL); - } LIST_INIT(&ptr->redir_chain); } else { /* Entry already present: temporarly unhook it. */ LIST_REMOVE(ptr, _next); flush_nat_ptrs(chain, ser_n->id); + IPFW_WUNLOCK(chain); } - IPFW_WUNLOCK(chain); /* * Basic nat configuration. @@ -407,6 +396,10 @@ ipfw_nat_cfg(struct sockopt *sopt) add_redir_spool_cfg(&buf[(sizeof(struct cfg_nat))], ptr); free(buf, M_IPFW); IPFW_WLOCK(chain); + /* + * XXXGL race here: another ipfw_nat_cfg() may already inserted + * entry with the same ser_n->id. + */ LIST_INSERT_HEAD(&chain->nat, ptr, _next); IPFW_WUNLOCK(chain); return (0); Modified: head/sys/netinet/libalias/alias_db.c ============================================================================== --- head/sys/netinet/libalias/alias_db.c Mon Apr 18 19:20:47 2011 (r220799) +++ head/sys/netinet/libalias/alias_db.c Mon Apr 18 20:07:08 2011 (r220800) @@ -2490,9 +2490,14 @@ LibAliasInit(struct libalias *la) #endif if (la == NULL) { +#ifdef _KERNEL +#undef malloc /* XXX: ugly */ + la = malloc(sizeof *la, M_ALIAS, M_WAITOK | M_ZERO); +#else la = calloc(sizeof *la, 1); if (la == NULL) return (la); +#endif #ifndef _KERNEL /* kernel cleans up on module unload */ if (LIST_EMPTY(&instancehead)) From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:09:58 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1E94106564A; Mon, 18 Apr 2011 20:09:58 +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 7929D8FC08; Mon, 18 Apr 2011 20:09:58 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3IK2CPu041974 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 18 Apr 2011 14:02:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201104181448.39401.jhb@freebsd.org> Date: Mon, 18 Apr 2011 14:02:10 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <20110418070124.GA67934@freebsd.org> <8204A257-C8F6-4DCA-99EC-BE48BD9C84E7@bsdimp.com> <201104181448.39401.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 18 Apr 2011 14:02:15 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, Roman Divacky , src-committers@FreeBSD.org, Dimitry Andric , svn-src-all@FreeBSD.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 20:09:58 -0000 On Apr 18, 2011, at 12:48 PM, John Baldwin wrote: > On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: >>=20 >> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >>=20 >>> please mark this in src/UPDATING, maybe bump freebsd_version too? >>=20 >> Please do not bump freebsd_version just for this. Ports wishing to = know can go off the last bump, if there are any. >>=20 >> Every freebsd_version bump forces rebuilding all modules and such and = is a pita. >=20 > No, what it breaks is building a module with a newer source tree than = your > running kernel and trying to kldload it. That is never really = supported, > but the kernel only notices when a version bump happens. The real fix = there > is to run a kernel + modules that are in sync on test boxes. The problem is that this is a technical solution that precludes me from = saying "look, I know that this will be OK, so let me do it" I know = nothing has changed that would cause a problem. Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:13:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59F88106566C; Mon, 18 Apr 2011 20:13:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id B519A8FC17; Mon, 18 Apr 2011 20:13:06 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3IKD2Ff054822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2011 23:13:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3IKD2qt027527; Mon, 18 Apr 2011 23:13:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3IKD2d1027526; Mon, 18 Apr 2011 23:13:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 Apr 2011 23:13:02 +0300 From: Kostik Belousov To: mdf@freebsd.org Message-ID: <20110418201302.GY48734@deviant.kiev.zoral.com.ua> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UC+RhZhEc8lcmajv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 20:13:07 -0000 --UC+RhZhEc8lcmajv Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 12:49:38PM -0700, mdf@freebsd.org wrote: > On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov w= rote: > > On Mon, Apr 18, 2011 at 04:32:22PM +0000, Matthew D Fleming wrote: > >> Author: mdf > >> Date: Mon Apr 18 16:32:22 2011 > >> New Revision: 220791 > >> URL: http://svn.freebsd.org/changeset/base/220791 > >> > >> Log: > >> =9A Add the posix_fallocate(2) syscall. =9AThe default implementation = in > >> =9A vop_stdallocate() is filesystem agnostic and will run as slow as a > >> =9A read/write loop in userspace; however, it serves to correctly > >> =9A implement the functionality for filesystems that do not implement a > >> =9A VOP_ALLOCATE. > >> > >> =9A Note that __FreeBSD_version was already bumped today to 900036 for= any > >> =9A ports which would like to use this function. > >> > >> =9A Also reserve space in the syscall table for posix_fadvise(2). >=20 > >> +#ifdef __notyet__ > >> + =9A =9A /* > >> + =9A =9A =9A* Check if the filesystem sets f_maxfilesize; if not use > >> + =9A =9A =9A* VOP_SETATTR to perform the check. > >> + =9A =9A =9A*/ > >> + =9A =9A error =3D VFS_STATFS(vp->v_mount, &sfs, td); > >> + =9A =9A if (error !=3D 0) > >> + =9A =9A =9A =9A =9A =9A goto out; > >> + =9A =9A if (sfs.f_maxfilesize) { > >> + =9A =9A =9A =9A =9A =9A if (offset > sfs.f_maxfilesize || len > sfs.= f_maxfilesize || > >> + =9A =9A =9A =9A =9A =9A =9A =9A offset + len > sfs.f_maxfilesize) { > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A error =3D EFBIG; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A goto out; > >> + =9A =9A =9A =9A =9A =9A } > >> + =9A =9A } else > >> +#endif > >> + =9A =9A if (offset + len > vap->va_size) { > >> + =9A =9A =9A =9A =9A =9A VATTR_NULL(vap); > >> + =9A =9A =9A =9A =9A =9A vap->va_size =3D offset + len; > >> + =9A =9A =9A =9A =9A =9A error =3D VOP_SETATTR(vp, vap, td->td_ucred); > >> + =9A =9A =9A =9A =9A =9A if (error !=3D 0) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A goto out; > >> + =9A =9A } > > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > > do auto-extend as needed. Also, see below. >=20 > The need is, as commented, to return EFBIG when the new file size will > be larger than the FS supports. Without this code, passing in > something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem > out of space. Handling max file size and not overflowing the fs are different things. VOP_WRITE() will handle file size on its own too. I see no problem with exhausting free space if this is what user asked for. >=20 > >> + > >> + =9A =9A while (len > 0) { > >> + =9A =9A =9A =9A =9A =9A if (should_yield()) { > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A VOP_UNLOCK(vp, 0); > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A locked =3D 0; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A kern_yield(-1); > > Please note that, despite dropping the vnode lock, the snapshot creation > > is still blocked at this point, due to previous vn_start_write(). > > > > If doing vn_finished_write() there, then bwillwrite() before > > next iteration is desired. > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A error =3D vn_lock(vp, LK_EXC= LUSIVE); > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A if (error !=3D 0) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A locked =3D 1; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A error =3D VOP_GETATTR(vp, va= p, td->td_ucred); > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A if (error !=3D 0) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; > >> + =9A =9A =9A =9A =9A =9A } > >> + > >> + =9A =9A =9A =9A =9A =9A /* > >> + =9A =9A =9A =9A =9A =9A =9A* Read and write back anything below the = nominal file > >> + =9A =9A =9A =9A =9A =9A =9A* size. =9AThere's currently no way outsi= de the filesystem > >> + =9A =9A =9A =9A =9A =9A =9A* to know whether this area is sparse or = not. > >> + =9A =9A =9A =9A =9A =9A =9A*/ > >> + =9A =9A =9A =9A =9A =9A cur =3D iosize; > >> + =9A =9A =9A =9A =9A =9A if ((offset % iosize) !=3D 0) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A cur -=3D (offset % iosize); > >> + =9A =9A =9A =9A =9A =9A if (cur > len) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A cur =3D len; > >> + =9A =9A =9A =9A =9A =9A if (offset < vap->va_size) { > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A aiov.iov_base =3D buf; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A aiov.iov_len =3D cur; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_iov =3D &aiov; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_iovcnt =3D 1; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_offset =3D offset; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_resid =3D cur; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_segflg =3D UIO_SYSS= PACE; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_rw =3D UIO_READ; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio.uio_td =3D td; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A error =3D VOP_READ(vp, &auio= , 0, td->td_ucred); > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A if (error !=3D 0) > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A break; > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A if (auio.uio_resid > 0) { > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A bzero(buf + = cur - auio.uio_resid, > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A auio= .uio_resid); > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A } > >> + =9A =9A =9A =9A =9A =9A } else { > >> + =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A bzero(buf, cur); > >> + =9A =9A =9A =9A =9A =9A } > > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > > this bzero from executing ? >=20 > Yes. If struct statfs had a member indicating the file system's max > file size, then the extend wouldn't be necessary. We have that > feature locally, but it's only implemented for ufs and our custom file > system, and it requires an ABI change so it's a bit of work to > upstream. And as with most of those things, it's hard to find the > time to upstream it outside of work hours. >=20 > > I estimated what it would take to do the optimized implementation for U= FS, > > and I think that the following change would allow to lessen the code > > duplication much. > > > > What if the vnode lock drop and looping be handled by the syscall, inst= ead > > of the vop implementation ? In other words, allow the VOP_ALLOCATE() > > to =9Aallocate less then requested, and return the allocated amount to > > the caller. The loop would be centralized then, freeing fs from doing > > the dance. Also, if fs considers that suitable, it would do a whole > > allocation in one run. >=20 > I like this idea. Perhaps input to the vop should be pointers to > offset and len, and the vop can change them as it iterates? Otherwise > the return code must be overloaded to distinguish between an error > code and the len that has been handled so far. And, I think the VOP > interface must return int, so there would be no way to indicate that > more than 2GB had been allocated. >=20 > So something in the kernel like: > while ((error =3D VOP_ALLOCATE(vp, &offset, &len)) =3D=3D EAGAIN) { > VOP_UNLOCK(vp, 0); > /* XXX unlock other resources */ > maybe_yield(); > bwillwrite(); > /* XXX vn_start_write dance */ > error =3D VOP_LOCK(vp, LK_EXCLUSIVE); > } Exactly. I would not even bother to return EAGAIN, just 0, and the need to retry the loop can be determined by len being non-zero. Also, by rearranging the loop, we can avoid the duplication of calls to bwillwrite, vn_start_write, vn_lock etc. for (;;) { /* All error handling is removed for convenience */ bwillwrite(); vn_start_write(); vn_lock(); VOP_ALLOCATE(vp, &offset, &len); VOP_UNLOCK(); vn_finished_write(); if (len =3D=3D 0) break; yield(); } >=20 > Cheers, > matthew --UC+RhZhEc8lcmajv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2sm04ACgkQC3+MBN1Mb4g83wCgt/Wfj5af9rhuGwPP6287phXX p0YAn1rtl6ou7yaYNd7dDocwsRVEZ8Ny =VatD -----END PGP SIGNATURE----- --UC+RhZhEc8lcmajv-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:14:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7A9106564A; Mon, 18 Apr 2011 20:14:55 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id D2B538FC14; Mon, 18 Apr 2011 20:14:54 +0000 (UTC) Received: by wyf23 with SMTP id 23so5224170wyf.13 for ; Mon, 18 Apr 2011 13:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZoEtvvR6L/yqyCKCwxtYIkC2T1oZrHOMBiLLYfC/dSw=; b=lHE+fgm7yl1jig5s/Q6AhFSCmat9Eh/qzkR+OJwNlX8XHZCc4+iNTDe56WYS1z+BES pLTMjf6FzXlo/O7fDQnQH1oP+c1lzf5I9EzpgDWqSaVrQfJhvGAuCTXL4F4Swk4yQv0G hRzcapIfw4/YxPX/ty8LmseT6pCzR0CClX5UA= 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=f3dfx+jIWmXRA3ynHXHhlNEdFTOtDgd+BrMmPcH8C/sObK/moEAewVaXUt6faY3Aj+ FuhgmZZ2EaBZ3BKsFcU4oFc5HQ7sJ+axgOhTAEwhajuup6Cd4qafGIKN+T/WE4JbYrK7 QzDnmUDnJw6su935vLZi72oKqbLuDZhOnOpNM= MIME-Version: 1.0 Received: by 10.216.120.144 with SMTP id p16mr357944weh.10.1303156178891; Mon, 18 Apr 2011 12:49:38 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.9.67 with HTTP; Mon, 18 Apr 2011 12:49:38 -0700 (PDT) In-Reply-To: <20110418192810.GX48734@deviant.kiev.zoral.com.ua> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> Date: Mon, 18 Apr 2011 12:49:38 -0700 X-Google-Sender-Auth: eUOV2by3w2lDNGjdOa7DtuY8uA4 Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov 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: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 20:14:55 -0000 On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov wro= te: > On Mon, Apr 18, 2011 at 04:32:22PM +0000, Matthew D Fleming wrote: >> Author: mdf >> Date: Mon Apr 18 16:32:22 2011 >> New Revision: 220791 >> URL: http://svn.freebsd.org/changeset/base/220791 >> >> Log: >> =A0 Add the posix_fallocate(2) syscall. =A0The default implementation in >> =A0 vop_stdallocate() is filesystem agnostic and will run as slow as a >> =A0 read/write loop in userspace; however, it serves to correctly >> =A0 implement the functionality for filesystems that do not implement a >> =A0 VOP_ALLOCATE. >> >> =A0 Note that __FreeBSD_version was already bumped today to 900036 for a= ny >> =A0 ports which would like to use this function. >> >> =A0 Also reserve space in the syscall table for posix_fadvise(2). >> +#ifdef __notyet__ >> + =A0 =A0 /* >> + =A0 =A0 =A0* Check if the filesystem sets f_maxfilesize; if not use >> + =A0 =A0 =A0* VOP_SETATTR to perform the check. >> + =A0 =A0 =A0*/ >> + =A0 =A0 error =3D VFS_STATFS(vp->v_mount, &sfs, td); >> + =A0 =A0 if (error !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 goto out; >> + =A0 =A0 if (sfs.f_maxfilesize) { >> + =A0 =A0 =A0 =A0 =A0 =A0 if (offset > sfs.f_maxfilesize || len > sfs.f_= maxfilesize || >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 offset + len > sfs.f_maxfilesize) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D EFBIG; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out; >> + =A0 =A0 =A0 =A0 =A0 =A0 } >> + =A0 =A0 } else >> +#endif >> + =A0 =A0 if (offset + len > vap->va_size) { >> + =A0 =A0 =A0 =A0 =A0 =A0 VATTR_NULL(vap); >> + =A0 =A0 =A0 =A0 =A0 =A0 vap->va_size =3D offset + len; >> + =A0 =A0 =A0 =A0 =A0 =A0 error =3D VOP_SETATTR(vp, vap, td->td_ucred); >> + =A0 =A0 =A0 =A0 =A0 =A0 if (error !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out; >> + =A0 =A0 } > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > do auto-extend as needed. Also, see below. The need is, as commented, to return EFBIG when the new file size will be larger than the FS supports. Without this code, passing in something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem out of space. >> + >> + =A0 =A0 while (len > 0) { >> + =A0 =A0 =A0 =A0 =A0 =A0 if (should_yield()) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 VOP_UNLOCK(vp, 0); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 locked =3D 0; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 kern_yield(-1); > Please note that, despite dropping the vnode lock, the snapshot creation > is still blocked at this point, due to previous vn_start_write(). > > If doing vn_finished_write() there, then bwillwrite() before > next iteration is desired. >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D vn_lock(vp, LK_EXCLU= SIVE); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 locked =3D 1; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D VOP_GETATTR(vp, vap,= td->td_ucred); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; >> + =A0 =A0 =A0 =A0 =A0 =A0 } >> + >> + =A0 =A0 =A0 =A0 =A0 =A0 /* >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* Read and write back anything below the no= minal file >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* size. =A0There's currently no way outside= the filesystem >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* to know whether this area is sparse or no= t. >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0*/ >> + =A0 =A0 =A0 =A0 =A0 =A0 cur =3D iosize; >> + =A0 =A0 =A0 =A0 =A0 =A0 if ((offset % iosize) !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cur -=3D (offset % iosize); >> + =A0 =A0 =A0 =A0 =A0 =A0 if (cur > len) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cur =3D len; >> + =A0 =A0 =A0 =A0 =A0 =A0 if (offset < vap->va_size) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 aiov.iov_base =3D buf; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 aiov.iov_len =3D cur; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_iov =3D &aiov; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_iovcnt =3D 1; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_offset =3D offset; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_resid =3D cur; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_segflg =3D UIO_SYSSPA= CE; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_rw =3D UIO_READ; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.uio_td =3D td; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D VOP_READ(vp, &auio, = 0, td->td_ucred); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error !=3D 0) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (auio.uio_resid > 0) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(buf + cu= r - auio.uio_resid, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 auio.u= io_resid); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> + =A0 =A0 =A0 =A0 =A0 =A0 } else { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(buf, cur); >> + =A0 =A0 =A0 =A0 =A0 =A0 } > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > this bzero from executing ? Yes. If struct statfs had a member indicating the file system's max file size, then the extend wouldn't be necessary. We have that feature locally, but it's only implemented for ufs and our custom file system, and it requires an ABI change so it's a bit of work to upstream. And as with most of those things, it's hard to find the time to upstream it outside of work hours. > I estimated what it would take to do the optimized implementation for UFS= , > and I think that the following change would allow to lessen the code > duplication much. > > What if the vnode lock drop and looping be handled by the syscall, instea= d > of the vop implementation ? In other words, allow the VOP_ALLOCATE() > to =A0allocate less then requested, and return the allocated amount to > the caller. The loop would be centralized then, freeing fs from doing > the dance. Also, if fs considers that suitable, it would do a whole > allocation in one run. I like this idea. Perhaps input to the vop should be pointers to offset and len, and the vop can change them as it iterates? Otherwise the return code must be overloaded to distinguish between an error code and the len that has been handled so far. And, I think the VOP interface must return int, so there would be no way to indicate that more than 2GB had been allocated. So something in the kernel like: while ((error =3D VOP_ALLOCATE(vp, &offset, &len)) =3D=3D EAGAIN) { VOP_UNLOCK(vp, 0); /* XXX unlock other resources */ maybe_yield(); bwillwrite(); /* XXX vn_start_write dance */ error =3D VOP_LOCK(vp, LK_EXCLUSIVE); } Cheers, matthew From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:17:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60441106566C; Mon, 18 Apr 2011 20:17:01 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9349D8FC25; Mon, 18 Apr 2011 20:17:00 +0000 (UTC) Received: by wyf23 with SMTP id 23so5226367wyf.13 for ; Mon, 18 Apr 2011 13:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0zqWqd7xybPfBEgPx46OpwEgIhAK87x7TjPdure9DiM=; b=WBxUrJDFNELTHZ0dk1d2thIQZSTaO8kyTIAaULxYPqVx2Q9hNwGVPWhZUIPEpFOQU+ 2Sa7GAwyB9ziuyNCkHOvjSXvzi5vmdHz/q1cdALO/9CtUa52OfjB+ZMQP2epwznYkW8Y +YudWNP3RzuGkhCCwRHTmg67mL9PIGVagJnpM= 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=T41se7nst1uuAX5P5r/9+GwIE78oi4VhV3r/xPtWXfaq7hyT01D1BEVPNKOHMNQ1Hw wuBI35tVdTie0MRSL12czhDn6TrqnO0vg587m8PWLtiaAUU91HUvku+daxfm8nzTMV7K qtQwNwB7XGV+gkfDKjlG8TE07Rqz5Cv6eK0R4= MIME-Version: 1.0 Received: by 10.216.134.207 with SMTP id s57mr5348388wei.25.1303156331275; Mon, 18 Apr 2011 12:52:11 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.9.67 with HTTP; Mon, 18 Apr 2011 12:52:11 -0700 (PDT) In-Reply-To: <20110418194750.GD3097@garage.freebsd.pl> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> <20110418194750.GD3097@garage.freebsd.pl> Date: Mon, 18 Apr 2011 12:52:11 -0700 X-Google-Sender-Auth: g8t2ffNqCWDfmdEIVZ8rTjyz89g Message-ID: From: mdf@FreeBSD.org To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 20:17:01 -0000 On Mon, Apr 18, 2011 at 12:47 PM, Pawel Jakub Dawidek wro= te: > On Mon, Apr 18, 2011 at 10:28:10PM +0300, Kostik Belousov wrote: >> > + =A0 if (offset + len > vap->va_size) { >> > + =A0 =A0 =A0 =A0 =A0 VATTR_NULL(vap); >> > + =A0 =A0 =A0 =A0 =A0 vap->va_size =3D offset + len; >> > + =A0 =A0 =A0 =A0 =A0 error =3D VOP_SETATTR(vp, vap, td->td_ucred); >> > + =A0 =A0 =A0 =A0 =A0 if (error !=3D 0) >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out; >> > + =A0 } >> I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will >> do auto-extend as needed. Also, see below. > > Yeah, also when we extend file size we could skip reading zeros. > >> > + =A0 =A0 =A0 =A0 =A0 if (offset < vap->va_size) { > [...] >> > + =A0 =A0 =A0 =A0 =A0 } else { >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(buf, cur); >> > + =A0 =A0 =A0 =A0 =A0 } >> Wouldn't VOP_SETATTR() at the start of the function mostly prevent >> this bzero from executing ? > > Once we drop the vnode lock, the file size can change under us, no? Yes, which is why the VOP_GETATTR is re-run. The SETATTR doesn't need to be re-run, since the purpose was just to check that offset + len is less than the filesystem's maximum supported file size. >> I estimated what it would take to do the optimized implementation for UF= S, >> and I think that the following change would allow to lessen the code >> duplication much. >> >> What if the vnode lock drop and looping be handled by the syscall, inste= ad >> of the vop implementation ? In other words, allow the VOP_ALLOCATE() >> to =A0allocate less then requested, and return the allocated amount to >> the caller. The loop would be centralized then, freeing fs from doing >> the dance. Also, if fs considers that suitable, it would do a whole >> allocation in one run. > > I'd still go with SEEK_DATA/SEEK_HOLE loop as I suggested on arch@. > If you would like to spend time on it, having SEEK_DATA/SEEK_HOLE > support in UFS would be beneficial for other purposes too. Well, if we had this functionality it could be used. I'd like the framework but the filesystems need modification to support it. We want it for OneFS at Isilon so eventually when I get to this part of the project I'll have some wrapper code if someone doesn't get there first. Cheers, matthew From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:19:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 65FF9106566C; Mon, 18 Apr 2011 20:19:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D7E1D1607AD; Mon, 18 Apr 2011 20:19:35 +0000 (UTC) Message-ID: <4DAC9CD7.9020205@FreeBSD.org> Date: Mon, 18 Apr 2011 13:19:35 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alexander Motin References: <201104181359.p3IDxuKD073859@svn.freebsd.org> In-Reply-To: <201104181359.p3IDxuKD073859@svn.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 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 Subject: Re: svn commit: r220778 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 20:19:36 -0000 On 04/18/2011 06:59, Alexander Motin wrote: > Remove some used variables. If they are used, perhaps they should not be removed? :) -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:20:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F07A1065670; Mon, 18 Apr 2011 20:20:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 935F98FC0A; Mon, 18 Apr 2011 20:20:36 +0000 (UTC) Received: by bwz12 with SMTP id 12so5700159bwz.13 for ; Mon, 18 Apr 2011 13:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature: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=7CPQoLjsH0uKzP+lj7pU97KX7PFJ3p90QyoZqx+Pbbc=; b=dUnH5fuhgRKCawaHtOt2uf0GiRitPVcSS90/eDmBSHA0QEe+0dbrhMaiaBH0xLvHeG 9V9lV3BMnkngY+/iUeEKSaVMRH5xMPH9rFBZD8X0bcMjYD4zWzQqQsGcVl/p9rnVGfza VPOAwow7P9laMm9DvRnc5iBFkoEN3bv8GEv80= 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=rZi1mSnSpf9dpYNQu8Ntgg5VLcZcRwWP6e8nAIKu8T8tEUZNk4drkqfO/MAYtRrdz5 aFeFTNGGF+21vuiOXxTge6iuSL4PPlsPK0NsDhJaDTo5QSNHoNXvJiy1OYNYfrWMsV92 GddLT1h3cw4bWgUzI0yLwIKPwSc7jNQBhsJuY= Received: by 10.204.17.11 with SMTP id q11mr293136bka.131.1303158034956; Mon, 18 Apr 2011 13:20:34 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y22sm2638237bku.20.2011.04.18.13.20.33 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 13:20:34 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DAC9D03.4000403@FreeBSD.org> Date: Mon, 18 Apr 2011 23:20:19 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Doug Barton References: <201104181359.p3IDxuKD073859@svn.freebsd.org> <4DAC9CD7.9020205@FreeBSD.org> In-Reply-To: <4DAC9CD7.9020205@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220778 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 20:20:37 -0000 Doug Barton wrote: > On 04/18/2011 06:59, Alexander Motin wrote: >> Remove some used variables. > > If they are used, perhaps they should not be removed? :) :) Unused. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:28:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613041065677; Mon, 18 Apr 2011 20:28:08 +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 4453E8FC1C; Mon, 18 Apr 2011 20:28: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 p3IKS89D083280; Mon, 18 Apr 2011 20:28:08 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IKS80P083277; Mon, 18 Apr 2011 20:28:08 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104182028.p3IKS80P083277@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Apr 2011 20:28: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: r220801 - head/sbin/conscontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 20:28:08 -0000 Author: ru Date: Mon Apr 18 20:28:07 2011 New Revision: 220801 URL: http://svn.freebsd.org/changeset/base/220801 Log: Changed "conscontrol unset" to accept an existing virtual console device as an argument. Unsetting virtual console using /dev/console seems to have never worked. MFC after: 3 days Modified: head/sbin/conscontrol/conscontrol.8 head/sbin/conscontrol/conscontrol.c Modified: head/sbin/conscontrol/conscontrol.8 ============================================================================== --- head/sbin/conscontrol/conscontrol.8 Mon Apr 18 20:07:08 2011 (r220800) +++ head/sbin/conscontrol/conscontrol.8 Mon Apr 18 20:28:07 2011 (r220801) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2001 +.Dd April 14, 2011 .Dt CONSCONTROL 8 .Os .Sh NAME @@ -40,7 +40,7 @@ .Cm add | delete .Ar console .Nm -.Cm set Ar console | Cm unset +.Cm set | unset Ar console .Sh DESCRIPTION The .Nm @@ -91,7 +91,7 @@ the name of the directory may be omitted Change the state of console muting. All console output is suppressed when console muting is .Cm on . -.It Cm set Ar console | Cm unset +.It Cm set | unset Ar console Set or unset the virtual console. When unset, output from the system, such as the kernel .Xr printf 9 , Modified: head/sbin/conscontrol/conscontrol.c ============================================================================== --- head/sbin/conscontrol/conscontrol.c Mon Apr 18 20:07:08 2011 (r220800) +++ head/sbin/conscontrol/conscontrol.c Mon Apr 18 20:28:07 2011 (r220801) @@ -50,7 +50,7 @@ usage(void) "usage: conscontrol [list]", " conscontrol mute on | off", " conscontrol add | delete console", - " conscontrol set console | unset"); + " conscontrol set | unset console"); exit(1); } @@ -153,28 +153,16 @@ consdel(char *devnam) } static void -consset(char *devnam) +consset(char *devnam, int flag) { - int ttyfd, flag = 1; + int ttyfd; ttyfd = open(devnam, O_RDONLY); if (ttyfd == -1) err(1, "opening %s", devnam); if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not set %s as virtual console", devnam); - close(ttyfd); -} - -static void -consunset(void) -{ - int ttyfd, flag = 0; - - ttyfd = open(DEVDIR "console", O_RDONLY); - if (ttyfd == -1) - err(1, "opening virtual console"); - if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not unset virtual console"); + err(1, "could not %s %s as virtual console", + flag ? "set" : "unset", devnam); close(ttyfd); } @@ -188,9 +176,7 @@ main(int argc, char **argv) argv += optind; if (argc > 0 && strcmp(argv[0], "list") != 0) { - if (argc == 1 && strcmp(argv[0], "unset") == 0) - consunset(); - else if (argc != 2) + if (argc != 2) usage(); else if (strcmp(argv[0], "mute") == 0) consmute(argv[1]); @@ -199,7 +185,9 @@ main(int argc, char **argv) else if (strcmp(argv[0], "delete") == 0) consdel(argv[1]); else if (strcmp(argv[0], "set") == 0) - consset(argv[1]); + consset(argv[1], 1); + else if (strcmp(argv[0], "unset") == 0) + consset(argv[1], 0); else usage(); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 20:38:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4EC61065670; Mon, 18 Apr 2011 20:38:33 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2836D8FC0C; Mon, 18 Apr 2011 20:38:32 +0000 (UTC) Received: by wwc33 with SMTP id 33so6080316wwc.31 for ; Mon, 18 Apr 2011 13:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FJY3xesls86/dYyw1S/r6u7CLlMqOdyqgMAA2l47ZfI=; b=Y2KODYXDO+Hi9JlUjLbOmWbQrborouAPZMmZGbs0It3/XjaS3gSzeOcA+Ltcd/KckG 3oXkoP3CDuCkNrGeZeer4N/6uOuSgaWDbDQjdh1nzNXuIsNg9m60gn4iVudBu8PO04nx OplJMm3WLmjI75yT/sBweaecgQcNt5CBy3VuM= 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=UiT6jqH2ta/6uYSKCDzTvTeZdNSRXpIedu1QsXXBkxyv4dcgiheRlDz8VMfhsHz5Z3 rSSkKiZoJ8t2hyouT1BJWygcXD5CKrKiz/e3yM1PHcSEr4G9NACGQW+ezsw7dQALV7RJ 8ZtSYXSmzJj2DjXOGu2zvrayxgVUaJQL++Jeg= MIME-Version: 1.0 Received: by 10.216.134.207 with SMTP id s57mr5388644wei.25.1303159112166; Mon, 18 Apr 2011 13:38:32 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.9.67 with HTTP; Mon, 18 Apr 2011 13:38:32 -0700 (PDT) In-Reply-To: <20110418201302.GY48734@deviant.kiev.zoral.com.ua> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> <20110418201302.GY48734@deviant.kiev.zoral.com.ua> Date: Mon, 18 Apr 2011 13:38:32 -0700 X-Google-Sender-Auth: ZTAnSJErVqYWo5yaUuKdifcJtjo Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov 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: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 20:38:34 -0000 2011/4/18 Kostik Belousov : > On Mon, Apr 18, 2011 at 12:49:38PM -0700, mdf@freebsd.org wrote: >> On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov = wrote: >> > On Mon, Apr 18, 2011 at 04:32:22PM +0000, Matthew D Fleming wrote: >> >> Author: mdf >> >> Date: Mon Apr 18 16:32:22 2011 >> >> New Revision: 220791 >> >> URL: http://svn.freebsd.org/changeset/base/220791 >> >> >> >> Log: >> >> =A0 Add the posix_fallocate(2) syscall. =A0The default implementation= in >> >> =A0 vop_stdallocate() is filesystem agnostic and will run as slow as = a >> >> =A0 read/write loop in userspace; however, it serves to correctly >> >> =A0 implement the functionality for filesystems that do not implement= a >> >> =A0 VOP_ALLOCATE. >> >> >> >> =A0 Note that __FreeBSD_version was already bumped today to 900036 fo= r any >> >> =A0 ports which would like to use this function. >> >> >> >> =A0 Also reserve space in the syscall table for posix_fadvise(2). >> The need is, as commented, to return EFBIG when the new file size will >> be larger than the FS supports. =A0Without this code, passing in >> something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem >> out of space. > Handling max file size and not overflowing the fs are different things. > VOP_WRITE() will handle file size on its own too. I see no problem with > exhausting free space if this is what user asked for. This violates the standard, though, since it would return ENOSPC instead of EFBIG. Also, this is just the default implementation. I'm adding a second VOP_SETATTR in vop_stdallocate() to restore the file size after extending, which will let the implementation use bzero/VOP_WRITE instead of VOP_READ/VOP_WRITE when past the original EOF. This is more of an issue when calling the vop iteratively, since subsequent calls don't know what the "correct" file size is. Cheers, matthew From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 21:13:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3ACC106566C; Mon, 18 Apr 2011 21:13:54 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 55F998FC15; Mon, 18 Apr 2011 21:13:53 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id BBE7945CAC; Mon, 18 Apr 2011 23:13:52 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id CD60C45C9F; Mon, 18 Apr 2011 23:13:47 +0200 (CEST) Date: Mon, 18 Apr 2011 23:13:38 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20110418211338.GE3097@garage.freebsd.pl> References: <201104181632.p3IGWM5v077720@svn.freebsd.org> <20110418192810.GX48734@deviant.kiev.zoral.com.ua> <20110418201302.GY48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9l24NVCWtSuIVIod" Content-Disposition: inline In-Reply-To: <20110418201302.GY48734@deviant.kiev.zoral.com.ua> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern 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: Mon, 18 Apr 2011 21:13:54 -0000 --9l24NVCWtSuIVIod Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 18, 2011 at 11:13:02PM +0300, Kostik Belousov wrote: > > The need is, as commented, to return EFBIG when the new file size will > > be larger than the FS supports. Without this code, passing in > > something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem > > out of space. > Handling max file size and not overflowing the fs are different things. > VOP_WRITE() will handle file size on its own too. I see no problem with > exhausting free space if this is what user asked for. This makes me wonder that current implementation isn't atomic. If we get out of space error, we won't shrink the file back. Even if we could shirk it at the end, we won't be able to put holes in the middle of it. Not sure if this is a big issue, but one doesn't expect from rename(2) to create new link and not remove old one. All in all, making it atomic would be impossible currently for various reasons (we can't put holes back and we can crash in the middle). --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --9l24NVCWtSuIVIod Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2sqYIACgkQForvXbEpPzTjGQCfSbyqXKuJ9xea+AywbJunzN4N 2B0AnRr26vcLXlffiUIRKWS6JFt8eOP7 =/LJv -----END PGP SIGNATURE----- --9l24NVCWtSuIVIod-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 21:15:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06E69106564A; Mon, 18 Apr 2011 21:15:02 +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 C69488FC1A; Mon, 18 Apr 2011 21:15:01 +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 66FBE46B42; Mon, 18 Apr 2011 17:15:01 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EDD7E8A01B; Mon, 18 Apr 2011 17:15:00 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Mon, 18 Apr 2011 17:05:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <201104181448.39401.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104181705.18809.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 18 Apr 2011 17:15:01 -0400 (EDT) Cc: svn-src-head@freebsd.org, Roman Divacky , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 21:15:02 -0000 On Monday, April 18, 2011 4:02:10 pm Warner Losh wrote: > > On Apr 18, 2011, at 12:48 PM, John Baldwin wrote: > > > On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: > >> > >> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > >> > >>> please mark this in src/UPDATING, maybe bump freebsd_version too? > >> > >> Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. > >> > >> Every freebsd_version bump forces rebuilding all modules and such and is a pita. > > > > No, what it breaks is building a module with a newer source tree than your > > running kernel and trying to kldload it. That is never really supported, > > but the kernel only notices when a version bump happens. The real fix there > > is to run a kernel + modules that are in sync on test boxes. > > The problem is that this is a technical solution that precludes me from saying "look, I know that this will be OK, so let me do it" I know nothing has changed that would cause a problem. We could easily support some sort of cpp #define to disable the automatic MODULE_DEPEND() on the kernel. Then you could use 'make DEBUG_FLAGS="-DDISABLE_KERNEL_VERSION"' or whatever the variable is called when building your kernel modules. You could even have a DISABLE_KERNEL_VERSION make variable that adds that to CFLAGS in bsd.kmod.mk and then set it to yes in your /etc/make.conf. However, for normal users I think the precaution against loading an 8.x kld on 7 is worth it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 21:18:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9BAB1065670; Mon, 18 Apr 2011 21:18:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B66338FC0A; Mon, 18 Apr 2011 21:18: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 p3ILIMCB084298; Mon, 18 Apr 2011 21:18:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ILIMUp084291; Mon, 18 Apr 2011 21:18:22 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104182118.p3ILIMUp084291@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 21:18: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: r220802 - head/sbin/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: Mon, 18 Apr 2011 21:18:22 -0000 Author: glebius Date: Mon Apr 18 21:18:22 2011 New Revision: 220802 URL: http://svn.freebsd.org/changeset/base/220802 Log: Whitespace fixes. Checked with: md5, diff -w Modified: head/sbin/ipfw/altq.c head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipv6.c head/sbin/ipfw/main.c head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/altq.c ============================================================================== --- head/sbin/ipfw/altq.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/altq.c Mon Apr 18 21:18:22 2011 (r220802) @@ -45,7 +45,7 @@ /* * Map between current altq queue id numbers and names. */ -static TAILQ_HEAD(, pf_altq) altq_entries = +static TAILQ_HEAD(, pf_altq) altq_entries = TAILQ_HEAD_INITIALIZER(altq_entries); void @@ -139,13 +139,13 @@ altq_qid_to_name(u_int32_t qid) void print_altq_cmd(ipfw_insn_altq *altqptr) { - if (altqptr) { - const char *qname; + if (altqptr) { + const char *qname; - qname = altq_qid_to_name(altqptr->qid); - if (qname == NULL) - printf(" altq ?<%u>", altqptr->qid); - else - printf(" altq %s", qname); - } + qname = altq_qid_to_name(altqptr->qid); + if (qname == NULL) + printf(" altq ?<%u>", altqptr->qid); + else + printf(" altq %s", qname); + } } Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/dummynet.c Mon Apr 18 21:18:22 2011 (r220802) @@ -418,25 +418,25 @@ ipfw_delete_pipe(int do_pipe, int i) * We can model the additional delay with an empirical curve * that represents its distribution. * - * cumulative probability - * 1.0 ^ - * | - * L +-- loss-level x - * | ****** - * | * - * | ***** - * | * - * | ** - * | * - * +-------*-------------------> - * delay + * cumulative probability + * 1.0 ^ + * | + * L +-- loss-level x + * | ****** + * | * + * | ***** + * | * + * | ** + * | * + * +-------*-------------------> + * delay * * The empirical curve may have both vertical and horizontal lines. * Vertical lines represent constant delay for a range of * probabilities; horizontal lines correspond to a discontinuty * in the delay distribution: the link will use the largest delay * for a given probability. - * + * * To pass the curve to dummynet, we must store the parameters * in a file as described below, and issue the command * @@ -449,9 +449,9 @@ ipfw_delete_pipe(int do_pipe, int i) * the number of samples used in the internal * representation (2..1024; default 100); * - * loss-level L + * loss-level L * The probability above which packets are lost. - * (0.0 <= L <= 1.0, default 1.0 i.e. no loss); + * (0.0 <= L <= 1.0, default 1.0 i.e. no loss); * * name identifier * Optional a name (listed by "ipfw pipe show") @@ -472,18 +472,18 @@ ipfw_delete_pipe(int do_pipe, int i) * the curve as needed. * * Example of a profile file: - - name bla_bla_bla - samples 100 - loss-level 0.86 - prob delay - 0 200 # minimum overhead is 200ms - 0.5 200 - 0.5 300 - 0.8 1000 - 0.9 1300 - 1 1300 - + + name bla_bla_bla + samples 100 + loss-level 0.86 + prob delay + 0 200 # minimum overhead is 200ms + 0.5 200 + 0.5 300 + 0.8 1000 + 0.9 1300 + 1 1300 + * Internally, we will convert the curve to a fixed number of * samples, and when it is time to transmit a packet we will * model the extra delay as extra bits in the packet. @@ -613,7 +613,7 @@ load_extra_delays(const char *filename, if (f == NULL) err(EX_UNAVAILABLE, "fopen: %s", filename); - while (fgets(line, ED_MAX_LINE_LEN, f)) { /* read commands */ + while (fgets(line, ED_MAX_LINE_LEN, f)) { /* read commands */ char *s, *cur = line, *name = NULL, *arg = NULL; ++lineno; @@ -740,7 +740,7 @@ load_extra_delays(const char *filename, /* * configuration of pipes, schedulers, flowsets. * When we configure a new scheduler, an empty pipe is created, so: - * + * * do_pipe = 1 -> "pipe N config ..." only for backward compatibility * sched N+Delta type fifo sched_mask ... * pipe N+Delta @@ -955,7 +955,7 @@ ipfw_config_pipe(int ac, char **av) mask->addr_type = 6; pa6 = &mask->dst_ip6; break; - + case TOK_SRCIP6: mask->addr_type = 6; pa6 = &mask->src_ip6; Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/ipfw2.c Mon Apr 18 21:18:22 2011 (r220802) @@ -210,7 +210,7 @@ static struct _s_x rule_actions[] = { { "unreach", TOK_UNREACH }, { "check-state", TOK_CHECKSTATE }, { "//", TOK_COMMENT }, - { "nat", TOK_NAT }, + { "nat", TOK_NAT }, { "reass", TOK_REASS }, { "setfib", TOK_SETFIB }, { NULL, 0 } /* terminator */ @@ -380,8 +380,8 @@ do_cmd(int optname, void *optval, uintpt if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || optname == IP_FW_ADD || optname == IP_FW_TABLE_LIST || - optname == IP_FW_TABLE_GETSIZE || - optname == IP_FW_NAT_GET_CONFIG || + optname == IP_FW_TABLE_GETSIZE || + optname == IP_FW_NAT_GET_CONFIG || optname < 0 || optname == IP_FW_NAT_GET_LOG) { if (optname < 0) @@ -1028,7 +1028,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt /* * first print actions */ - for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule); + for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule); l > 0 ; l -= F_LEN(cmd), cmd += F_LEN(cmd)) { switch(cmd->opcode) { case O_CHECK_STATE: @@ -1158,7 +1158,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt /* * then print the body. */ - for (l = rule->act_ofs, cmd = rule->cmd ; + for (l = rule->act_ofs, cmd = rule->cmd ; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { if ((cmd->len & F_OR) || (cmd->len & F_NOT)) continue; @@ -1182,7 +1182,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt if (co.comment_only) comment = "..."; - for (l = rule->act_ofs, cmd = rule->cmd ; + for (l = rule->act_ofs, cmd = rule->cmd ; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { /* useful alias */ ipfw_insn_u32 *cmd32 = (ipfw_insn_u32 *)cmd; @@ -1569,7 +1569,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt } } show_prerequisites(&flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP - | HAVE_IP, 0); + | HAVE_IP, 0); if (comment) printf(" // %s", comment); printf("\n"); @@ -2198,7 +2198,6 @@ n2mask(struct in6_addr *mask, int n) } return; } - /* * helper function to process a set of flags and set bits in the @@ -2229,9 +2228,9 @@ fill_flags(ipfw_insn *cmd, enum ipfw_opc *which |= (uint8_t)val; p = q; } - cmd->opcode = opcode; - cmd->len = (cmd->len & (F_NOT | F_OR)) | 1; - cmd->arg1 = (set & 0xff) | ( (clear & 0xff) << 8); + cmd->opcode = opcode; + cmd->len = (cmd->len & (F_NOT | F_OR)) | 1; + cmd->arg1 = (set & 0xff) | ( (clear & 0xff) << 8); } @@ -2289,7 +2288,7 @@ ipfw_delete(char *av[]) * fill the interface structure. We do not check the name as we can * create interfaces dynamically, so checking them at insert time * makes relatively little sense. - * Interface names containing '*', '?', or '[' are assumed to be shell + * Interface names containing '*', '?', or '[' are assumed to be shell * patterns which match interfaces. */ static void @@ -2817,7 +2816,7 @@ chkarg: "illegal forwarding port ``%s''", s); p->sa.sin_port = (u_short)i; } - if (_substrcmp(*av, "tablearg") == 0) + if (_substrcmp(*av, "tablearg") == 0) p->sa.sin_addr.s_addr = INADDR_ANY; else lookup_host(*av, &(p->sa.sin_addr)); @@ -2837,7 +2836,7 @@ chkarg: action->opcode = O_SETFIB; NEED1("missing fib number"); - action->arg1 = strtoul(*av, NULL, 10); + action->arg1 = strtoul(*av, NULL, 10); if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(EX_DATAERR, "fibs not suported.\n"); if (action->arg1 >= numfibs) /* Temporary */ @@ -3144,7 +3143,7 @@ read_options: errx(EX_USAGE, "+missing \")\"\n"); open_par = 0; prev = NULL; - break; + break; case TOK_IN: fill_cmd(cmd, O_IN, 0, 0); @@ -3829,10 +3828,10 @@ ipfw_table_handler(int ac, char *av[]) if (strchr(*av, (int)'.') == NULL && isdigit(**av)) { ent.value = strtoul(*av, NULL, 0); } else { - if (lookup_host(*av, (struct in_addr *)&tval) == 0) { + if (lookup_host(*av, (struct in_addr *)&tval) == 0) { /* The value must be stored in host order * * so that the values < 65k can be distinguished */ - ent.value = ntohl(tval); + ent.value = ntohl(tval); } else { errx(EX_NOHOST, "hostname ``%s'' unknown", *av); } @@ -3851,7 +3850,7 @@ ipfw_table_handler(int ac, char *av[]) if (do_cmd(IP_FW_TABLE_ADD, &ent, sizeof(ent)) < 0) err(EX_OSERR, - "setsockopt(IP_FW_TABLE_ADD)"); + "setsockopt(IP_FW_TABLE_ADD)"); } } } else if (_substrcmp(*av, "flush") == 0) { Modified: head/sbin/ipfw/ipv6.c ============================================================================== --- head/sbin/ipfw/ipv6.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/ipv6.c Mon Apr 18 21:18:22 2011 (r220802) @@ -76,7 +76,7 @@ print_unreach6_code(uint16_t code) printf("unreach6 %u", code); } -/* +/* * Print the ip address contained in a command. */ void @@ -90,43 +90,43 @@ print_ip6(ipfw_insn_ip6 *cmd, char const printf("%s%s ", cmd->o.len & F_NOT ? " not": "", s); if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { - printf("me6"); - return; + printf("me6"); + return; } if (cmd->o.opcode == O_IP6) { - printf(" ip6"); - return; + printf(" ip6"); + return; } /* - * len == 4 indicates a single IP, whereas lists of 1 or more - * addr/mask pairs have len = (2n+1). We convert len to n so we - * use that to count the number of entries. - */ + * len == 4 indicates a single IP, whereas lists of 1 or more + * addr/mask pairs have len = (2n+1). We convert len to n so we + * use that to count the number of entries. + */ for (len = len / 4; len > 0; len -= 2, a += 2) { - int mb = /* mask length */ - (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? - 128 : contigmask((uint8_t *)&(a[1]), 128); - - if (mb == 128 && co.do_resolv) - he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); - if (he != NULL) /* resolved to name */ - printf("%s", he->h_name); - else if (mb == 0) /* any */ - printf("any"); - else { /* numeric IP followed by some kind of mask */ - if (inet_ntop(AF_INET6, a, trad, sizeof( trad ) ) == NULL) - printf("Error ntop in print_ip6\n"); - printf("%s", trad ); - if (mb < 0) /* XXX not really legal... */ - printf(":%s", - inet_ntop(AF_INET6, &a[1], trad, sizeof(trad))); - else if (mb < 128) - printf("/%d", mb); - } - if (len > 2) - printf(","); + int mb = /* mask length */ + (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? + 128 : contigmask((uint8_t *)&(a[1]), 128); + + if (mb == 128 && co.do_resolv) + he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); + if (he != NULL) /* resolved to name */ + printf("%s", he->h_name); + else if (mb == 0) /* any */ + printf("any"); + else { /* numeric IP followed by some kind of mask */ + if (inet_ntop(AF_INET6, a, trad, sizeof( trad ) ) == NULL) + printf("Error ntop in print_ip6\n"); + printf("%s", trad ); + if (mb < 0) /* XXX not really legal... */ + printf(":%s", + inet_ntop(AF_INET6, &a[1], trad, sizeof(trad))); + else if (mb < 128) + printf("/%d", mb); + } + if (len > 2) + printf(","); } } @@ -137,20 +137,20 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, ch bzero(cmd, sizeof(*cmd)); while (*av) { - if (*av == ',') - av++; - type = strtoul(av, &av, 0); - if (*av != ',' && *av != '\0') - errx(EX_DATAERR, "invalid ICMP6 type"); + if (*av == ',') + av++; + type = strtoul(av, &av, 0); + if (*av != ',' && *av != '\0') + errx(EX_DATAERR, "invalid ICMP6 type"); /* * XXX: shouldn't this be 0xFF? I can't see any reason why * we shouldn't be able to filter all possiable values * regardless of the ability of the rest of the kernel to do * anything useful with them. */ - if (type > ICMP6_MAXTYPE) - errx(EX_DATAERR, "ICMP6 type out of range"); - cmd->d[type / 32] |= ( 1 << (type % 32)); + if (type > ICMP6_MAXTYPE) + errx(EX_DATAERR, "ICMP6 type out of range"); + cmd->d[type / 32] |= ( 1 << (type % 32)); } cmd->o.opcode = O_ICMP6TYPE; cmd->o.len |= F_INSN_SIZE(ipfw_insn_icmp6); @@ -165,12 +165,12 @@ print_icmp6types(ipfw_insn_u32 *cmd) printf(" ip6 icmp6types"); for (i = 0; i < 7; i++) - for (j=0; j < 32; ++j) { - if ( (cmd->d[i] & (1 << (j))) == 0) - continue; - printf("%c%d", sep, (i*32 + j)); - sep = ','; - } + for (j=0; j < 32; ++j) { + if ( (cmd->d[i] & (1 << (j))) == 0) + continue; + printf("%c%d", sep, (i*32 + j)); + sep = ','; + } } void @@ -181,9 +181,9 @@ print_flow6id( ipfw_insn_u32 *cmd) printf(" flow-id "); for( i=0; i < limit; ++i) { - if (i == limit - 1) - sep = ' '; - printf("%d%c", cmd->d[i], sep); + if (i == limit - 1) + sep = ' '; + printf("%d%c", cmd->d[i], sep); } } @@ -193,11 +193,11 @@ static struct _s_x ext6hdrcodes[] = { { "hopopt", EXT_HOPOPTS }, { "route", EXT_ROUTING }, { "dstopt", EXT_DSTOPTS }, - { "ah", EXT_AH }, - { "esp", EXT_ESP }, + { "ah", EXT_AH }, + { "esp", EXT_ESP }, { "rthdr0", EXT_RTHDR0 }, { "rthdr2", EXT_RTHDR2 }, - { NULL, 0 } + { NULL, 0 } }; /* fills command for the extension header filtering */ @@ -210,48 +210,48 @@ fill_ext6hdr( ipfw_insn *cmd, char *av) cmd->arg1 = 0; while(s) { - av = strsep( &s, ",") ; - tok = match_token(ext6hdrcodes, av); - switch (tok) { - case EXT_FRAGMENT: - cmd->arg1 |= EXT_FRAGMENT; - break; - - case EXT_HOPOPTS: - cmd->arg1 |= EXT_HOPOPTS; - break; - - case EXT_ROUTING: - cmd->arg1 |= EXT_ROUTING; - break; - - case EXT_DSTOPTS: - cmd->arg1 |= EXT_DSTOPTS; - break; - - case EXT_AH: - cmd->arg1 |= EXT_AH; - break; - - case EXT_ESP: - cmd->arg1 |= EXT_ESP; - break; - - case EXT_RTHDR0: - cmd->arg1 |= EXT_RTHDR0; - break; - - case EXT_RTHDR2: - cmd->arg1 |= EXT_RTHDR2; - break; - - default: - errx( EX_DATAERR, "invalid option for ipv6 exten header" ); - break; - } + av = strsep( &s, ",") ; + tok = match_token(ext6hdrcodes, av); + switch (tok) { + case EXT_FRAGMENT: + cmd->arg1 |= EXT_FRAGMENT; + break; + + case EXT_HOPOPTS: + cmd->arg1 |= EXT_HOPOPTS; + break; + + case EXT_ROUTING: + cmd->arg1 |= EXT_ROUTING; + break; + + case EXT_DSTOPTS: + cmd->arg1 |= EXT_DSTOPTS; + break; + + case EXT_AH: + cmd->arg1 |= EXT_AH; + break; + + case EXT_ESP: + cmd->arg1 |= EXT_ESP; + break; + + case EXT_RTHDR0: + cmd->arg1 |= EXT_RTHDR0; + break; + + case EXT_RTHDR2: + cmd->arg1 |= EXT_RTHDR2; + break; + + default: + errx( EX_DATAERR, "invalid option for ipv6 exten header" ); + break; + } } if (cmd->arg1 == 0 ) - return 0; + return 0; cmd->opcode = O_EXT_HDR; cmd->len |= F_INSN_SIZE( ipfw_insn ); return 1; @@ -264,35 +264,35 @@ print_ext6hdr( ipfw_insn *cmd ) printf(" extension header:"); if (cmd->arg1 & EXT_FRAGMENT ) { - printf("%cfragmentation", sep); - sep = ','; + printf("%cfragmentation", sep); + sep = ','; } if (cmd->arg1 & EXT_HOPOPTS ) { - printf("%chop options", sep); - sep = ','; + printf("%chop options", sep); + sep = ','; } if (cmd->arg1 & EXT_ROUTING ) { - printf("%crouting options", sep); - sep = ','; + printf("%crouting options", sep); + sep = ','; } if (cmd->arg1 & EXT_RTHDR0 ) { - printf("%crthdr0", sep); - sep = ','; + printf("%crthdr0", sep); + sep = ','; } if (cmd->arg1 & EXT_RTHDR2 ) { - printf("%crthdr2", sep); - sep = ','; + printf("%crthdr2", sep); + sep = ','; } if (cmd->arg1 & EXT_DSTOPTS ) { - printf("%cdestination options", sep); - sep = ','; + printf("%cdestination options", sep); + sep = ','; } if (cmd->arg1 & EXT_AH ) { - printf("%cauthentication header", sep); - sep = ','; + printf("%cauthentication header", sep); + sep = ','; } if (cmd->arg1 & EXT_ESP ) { - printf("%cencapsulated security payload", sep); + printf("%cencapsulated security payload", sep); } } @@ -318,9 +318,9 @@ lookup_host6 (char *host, struct in6_add * any matches any IP6. Actually returns an empty instruction. * me returns O_IP6_*_ME * - * 03f1::234:123:0342 single IP6 addres - * 03f1::234:123:0342/24 address/mask - * 03f1::234:123:0342/24,03f1::234:123:0343/ List of address + * 03f1::234:123:0342 single IP6 addres + * 03f1::234:123:0342/24 address/mask + * 03f1::234:123:0342/24,03f1::234:123:0343/ List of address * * Set of address (as in ipv6) not supported because ipv6 address * are typically random past the initial prefix. Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/main.c Mon Apr 18 21:18:22 2011 (r220802) @@ -357,7 +357,7 @@ ipfw_main(int oldac, char **oldav) co.do_nat = 0; co.do_pipe = 0; if (!strncmp(*av, "nat", strlen(*av))) - co.do_nat = 1; + co.do_nat = 1; else if (!strncmp(*av, "pipe", strlen(*av))) co.do_pipe = 1; else if (_substrcmp(*av, "queue") == 0) @@ -426,7 +426,7 @@ ipfw_main(int oldac, char **oldav) else if (_substrcmp(*av, "resetlog") == 0) ipfw_zero(ac, av, 1 /* IP_FW_RESETLOG */); else if (_substrcmp(*av, "print") == 0 || - _substrcmp(*av, "list") == 0) + _substrcmp(*av, "list") == 0) ipfw_list(ac, av, do_acct); else if (_substrcmp(*av, "show") == 0) ipfw_list(ac, av, 1 /* show counters */); @@ -591,7 +591,7 @@ main(int ac, char *av[]) ret = WSAStartup(wVersionRequested, &wsaData); if (ret != 0) { /* Tell the user that we could not find a usable */ - /* Winsock DLL. */ + /* Winsock DLL. */ printf("WSAStartup failed with error: %d\n", ret); return 1; } Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Mon Apr 18 20:28:07 2011 (r220801) +++ head/sbin/ipfw/nat.c Mon Apr 18 21:18:22 2011 (r220802) @@ -47,15 +47,15 @@ #include static struct _s_x nat_params[] = { - { "ip", TOK_IP }, - { "if", TOK_IF }, - { "log", TOK_ALOG }, - { "deny_in", TOK_DENY_INC }, - { "same_ports", TOK_SAME_PORTS }, - { "unreg_only", TOK_UNREG_ONLY }, - { "reset", TOK_RESET_ADDR }, - { "reverse", TOK_ALIAS_REV }, - { "proxy_only", TOK_PROXY_ONLY }, + { "ip", TOK_IP }, + { "if", TOK_IF }, + { "log", TOK_ALOG }, + { "deny_in", TOK_DENY_INC }, + { "same_ports", TOK_SAME_PORTS }, + { "unreg_only", TOK_UNREG_ONLY }, + { "reset", TOK_RESET_ADDR }, + { "reverse", TOK_ALIAS_REV }, + { "proxy_only", TOK_PROXY_ONLY }, { "redirect_addr", TOK_REDIR_ADDR }, { "redirect_port", TOK_REDIR_PORT }, { "redirect_proto", TOK_REDIR_PROTO }, @@ -63,10 +63,10 @@ static struct _s_x nat_params[] = { }; -/* +/* * Search for interface with name "ifn", and fill n accordingly: * - * n->ip ip address of interface "ifn" + * n->ip ip address of interface "ifn" * n->if_name copy of interface name "ifn" */ static void @@ -163,25 +163,25 @@ set_addr_dynamic(const char *ifn, struct free(buf); } -/* +/* * XXX - The following functions, macros and definitions come from natd.c: - * it would be better to move them outside natd.c, in a file - * (redirect_support.[ch]?) shared by ipfw and natd, but for now i can live + * it would be better to move them outside natd.c, in a file + * (redirect_support.[ch]?) shared by ipfw and natd, but for now i can live * with it. */ /* * Definition of a port range, and macros to deal with values. * FORMAT: HI 16-bits == first port in range, 0 == all ports. - * LO 16-bits == number of ports in range + * LO 16-bits == number of ports in range * NOTES: - Port values are not stored in network byte order. */ #define port_range u_long -#define GETLOPORT(x) ((x) >> 0x10) -#define GETNUMPORTS(x) ((x) & 0x0000ffff) -#define GETHIPORT(x) (GETLOPORT((x)) + GETNUMPORTS((x))) +#define GETLOPORT(x) ((x) >> 0x10) +#define GETNUMPORTS(x) ((x) & 0x0000ffff) +#define GETHIPORT(x) (GETLOPORT((x)) + GETNUMPORTS((x))) /* Set y to be the low-port value in port_range variable x. */ #define SETLOPORT(x,y) ((x) = ((x) & 0x0000ffff) | ((y) << 0x10)) @@ -189,7 +189,7 @@ set_addr_dynamic(const char *ifn, struct /* Set y to be the number of ports in port_range variable x. */ #define SETNUMPORTS(x,y) ((x) = ((x) & 0xffff0000) | (y)) -static void +static void StrToAddr (const char* str, struct in_addr* addr) { struct hostent* hp; @@ -204,30 +204,30 @@ StrToAddr (const char* str, struct in_ad memcpy (addr, hp->h_addr, sizeof (struct in_addr)); } -static int +static int StrToPortRange (const char* str, const char* proto, port_range *portRange) { - char* sep; + char* sep; struct servent* sp; char* end; - u_short loPort; - u_short hiPort; + u_short loPort; + u_short hiPort; /* First see if this is a service, return corresponding port if so. */ sp = getservbyname (str,proto); if (sp) { - SETLOPORT(*portRange, ntohs(sp->s_port)); + SETLOPORT(*portRange, ntohs(sp->s_port)); SETNUMPORTS(*portRange, 1); return 0; } - + /* Not a service, see if it's a single port or port range. */ sep = strchr (str, '-'); if (sep == NULL) { - SETLOPORT(*portRange, strtol(str, &end, 10)); + SETLOPORT(*portRange, strtol(str, &end, 10)); if (end != str) { - /* Single port. */ - SETNUMPORTS(*portRange, 1); + /* Single port. */ + SETNUMPORTS(*portRange, 1); return 0; } @@ -240,15 +240,15 @@ StrToPortRange (const char* str, const c SETLOPORT(*portRange, loPort); SETNUMPORTS(*portRange, 0); /* Error by default */ if (loPort <= hiPort) - SETNUMPORTS(*portRange, hiPort - loPort + 1); + SETNUMPORTS(*portRange, hiPort - loPort + 1); if (GETNUMPORTS(*portRange) == 0) - errx (EX_DATAERR, "invalid port range %s", str); + errx (EX_DATAERR, "invalid port range %s", str); return 0; } -static int +static int StrToProto (const char* str) { if (!strcmp (str, "tcp")) @@ -262,9 +262,9 @@ StrToProto (const char* str) errx (EX_DATAERR, "unknown protocol %s. Expected sctp, tcp or udp", str); } -static int -StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, - port_range *portRange) +static int +StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, + port_range *portRange) { char* ptr; @@ -281,50 +281,49 @@ StrToAddrAndPortRange (const char* str, /* End of stuff taken from natd.c. */ -#define INC_ARGCV() do { \ - (*_av)++; \ - (*_ac)--; \ - av = *_av; \ - ac = *_ac; \ +#define INC_ARGCV() do { \ + (*_av)++; \ + (*_ac)--; \ + av = *_av; \ + ac = *_ac; \ } while(0) -/* - * The next 3 functions add support for the addr, port and proto redirect and - * their logic is loosely based on SetupAddressRedirect(), SetupPortRedirect() +/* + * The next 3 functions add support for the addr, port and proto redirect and + * their logic is loosely based on SetupAddressRedirect(), SetupPortRedirect() * and SetupProtoRedirect() from natd.c. * - * Every setup_* function fills at least one redirect entry - * (struct cfg_redir) and zero or more server pool entry (struct cfg_spool) + * Every setup_* function fills at least one redirect entry + * (struct cfg_redir) and zero or more server pool entry (struct cfg_spool) * in buf. - * + * * The format of data in buf is: - * * - * cfg_nat cfg_redir cfg_spool ...... cfg_spool + * cfg_nat cfg_redir cfg_spool ...... cfg_spool * * ------------------------------------- ------------ * | | .....X ... | | | | ..... * ------------------------------------- ...... ------------ - * ^ + * ^ * spool_cnt n=0 ...... n=(X-1) * * len points to the amount of available space in buf * space counts the memory consumed by every function * - * XXX - Every function get all the argv params so it + * XXX - Every function get all the argv params so it * has to check, in optional parameters, that the next - * args is a valid option for the redir entry and not - * another token. Only redir_port and redir_proto are + * args is a valid option for the redir entry and not + * another token. Only redir_port and redir_proto are * affected by this. */ static int setup_redir_addr(char *spool_buf, unsigned int len, - int *_ac, char ***_av) + int *_ac, char ***_av) { char **av, *sep; /* Token separator. */ /* Temporary buffer used to hold server pool ip's. */ - char tmp_spool_buf[NAT_BUF_LEN]; + char tmp_spool_buf[NAT_BUF_LEN]; int ac, space, lsnat; struct cfg_redir *r; struct cfg_spool *tmp; @@ -339,11 +338,11 @@ setup_redir_addr(char *spool_buf, unsign spool_buf = &spool_buf[SOF_REDIR]; space = SOF_REDIR; len -= SOF_REDIR; - } else - goto nospace; + } else + goto nospace; r->mode = REDIR_ADDR; /* Extract local address. */ - if (ac == 0) + if (ac == 0) errx(EX_DATAERR, "redirect_addr: missing local address"); sep = strchr(*av, ','); if (sep) { /* LSNAT redirection syntax. */ @@ -351,12 +350,12 @@ setup_redir_addr(char *spool_buf, unsign /* Preserve av, copy spool servers to tmp_spool_buf. */ strncpy(tmp_spool_buf, *av, strlen(*av)+1); lsnat = 1; - } else + } else StrToAddr(*av, &r->laddr); INC_ARGCV(); /* Extract public address. */ - if (ac == 0) + if (ac == 0) errx(EX_DATAERR, "redirect_addr: missing public address"); StrToAddr(*av, &r->paddr); INC_ARGCV(); @@ -385,7 +384,7 @@ nospace: static int setup_redir_port(char *spool_buf, unsigned int len, - int *_ac, char ***_av) + int *_ac, char ***_av) { char **av, *sep, *protoName; char tmp_spool_buf[NAT_BUF_LEN]; @@ -407,8 +406,8 @@ setup_redir_port(char *spool_buf, unsign spool_buf = &spool_buf[SOF_REDIR]; space = SOF_REDIR; len -= SOF_REDIR; - } else - goto nospace; + } else + goto nospace; r->mode = REDIR_PORT; /* * Extract protocol. @@ -436,8 +435,8 @@ setup_redir_port(char *spool_buf, unsign lsnat = 1; } else { /* - * The sctp nat does not allow the port numbers to be mapped to - * new port numbers. Therefore, no ports are to be specified + * The sctp nat does not allow the port numbers to be mapped to + * new port numbers. Therefore, no ports are to be specified * in the target port field. */ if (r->proto == IPPROTO_SCTP) { @@ -448,7 +447,7 @@ setup_redir_port(char *spool_buf, unsign else StrToAddr(*av, &r->laddr); } else { - if (StrToAddrAndPortRange (*av, &r->laddr, protoName, + if (StrToAddrAndPortRange (*av, &r->laddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port:" "invalid local port range"); @@ -467,14 +466,14 @@ setup_redir_port(char *spool_buf, unsign sep = strchr (*av, ':'); if (sep) { - if (StrToAddrAndPortRange (*av, &r->paddr, protoName, + if (StrToAddrAndPortRange (*av, &r->paddr, protoName, &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port:" "invalid public port range"); } else { r->paddr.s_addr = INADDR_ANY; if (StrToPortRange (*av, protoName, &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port:" "invalid public port range"); } @@ -489,19 +488,19 @@ setup_redir_port(char *spool_buf, unsign /* * Extract remote address and optionally port. */ - /* + /* * NB: isalpha(**av) => we've to check that next parameter is really an * option for this redirect entry, else stop here processing arg[cv]. */ - if (ac != 0 && !isalpha(**av)) { + if (ac != 0 && !isalpha(**av)) { sep = strchr (*av, ':'); if (sep) { - if (StrToAddrAndPortRange (*av, &r->raddr, protoName, + if (StrToAddrAndPortRange (*av, &r->raddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port:" "invalid remote port range"); } else { - SETLOPORT(portRange, 0); + SETLOPORT(portRange, 0); SETNUMPORTS(portRange, 1); StrToAddr (*av, &r->raddr); } @@ -514,17 +513,17 @@ setup_redir_port(char *spool_buf, unsign r->rport = GETLOPORT(portRange); r->rport_cnt = GETNUMPORTS(portRange); - /* + /* * Make sure port ranges match up, then add the redirect ports. */ if (numLocalPorts != r->pport_cnt) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port:" "port ranges must be equal in size"); /* Remote port range is allowed to be '0' which means all ports. */ - if (r->rport_cnt != numLocalPorts && + if (r->rport_cnt != numLocalPorts && (r->rport_cnt != 1 || r->rport != 0)) - errx(EX_DATAERR, "redirect_port: remote port must" + errx(EX_DATAERR, "redirect_port: remote port must" "be 0 or equal to local port range in size"); /* @@ -553,7 +552,7 @@ setup_redir_port(char *spool_buf, unsign tmp->port = r->pport; } } else { - if (StrToAddrAndPortRange(sep, &tmp->addr, + if (StrToAddrAndPortRange(sep, &tmp->addr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port:" "invalid local port range"); @@ -576,7 +575,7 @@ nospace: static int setup_redir_proto(char *spool_buf, unsigned int len, - int *_ac, char ***_av) + int *_ac, char ***_av) { char **av; int ac, space; @@ -591,7 +590,7 @@ setup_redir_proto(char *spool_buf, unsig *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 21:24:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0DCE106564A; Mon, 18 Apr 2011 21:24:42 +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 DDCFC8FC1F; Mon, 18 Apr 2011 21:24: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 p3ILOgcB084467; Mon, 18 Apr 2011 21:24:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ILOgX7084462; Mon, 18 Apr 2011 21:24:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104182124.p3ILOgX7084462@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 18 Apr 2011 21:24: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: r220803 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 21:24:43 -0000 Author: kib Date: Mon Apr 18 21:24:42 2011 New Revision: 220803 URL: http://svn.freebsd.org/changeset/base/220803 Log: Make pmap_invalidate_cache_range() available for consumption on amd64. Add pmap_invalidate_cache_pages() method on x86. It flushes the CPU cache for the set of pages, which are not neccessary mapped. Since its supposed use is to prepare the move of the pages ownership to a device that does not snoop all CPU accesses to the main memory (read GPU in GMCH), do not rely on CPU self-snoop feature. amd64 implementation takes advantage of the direct map. On i386, extract the helper pmap_flush_page() from pmap_page_set_memattr(), and use it to make a temporary mapping of the flushed page. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Apr 18 21:18:22 2011 (r220802) +++ head/sys/amd64/amd64/pmap.c Mon Apr 18 21:24:42 2011 (r220803) @@ -239,7 +239,6 @@ static vm_page_t pmap_enter_quick_locked vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); -static void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); @@ -1105,7 +1104,9 @@ pmap_update_pde(pmap_t pmap, vm_offset_t } #endif /* !SMP */ -static void +#define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) + +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) { @@ -1117,7 +1118,7 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < 2 * 1024 * 1024) { + eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -1142,6 +1143,34 @@ pmap_invalidate_cache_range(vm_offset_t } /* + * Remove the specified set of pages from the data and instruction caches. + * + * In contrast to pmap_invalidate_cache_range(), this function does not + * rely on the CPU's self-snoop feature, because it is intended for use + * when moving pages into a different cache domain. + */ +void +pmap_invalidate_cache_pages(vm_page_t *pages, int count) +{ + vm_offset_t daddr, eva; + int i; + + if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || + (cpu_feature & CPUID_CLFSH) == 0) + pmap_invalidate_cache(); + else { + mfence(); + for (i = 0; i < count; i++) { + daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); + eva = daddr + PAGE_SIZE; + for (; daddr < eva; daddr += cpu_clflush_line_size) + clflush(daddr); + } + mfence(); + } +} + +/* * Are we current address space or kernel? */ static __inline int Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Mon Apr 18 21:18:22 2011 (r220802) +++ head/sys/amd64/include/pmap.h Mon Apr 18 21:24:42 2011 (r220803) @@ -328,6 +328,8 @@ void pmap_invalidate_page(pmap_t, vm_off void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); +void pmap_invalidate_cache_pages(vm_page_t *pages, int count); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); #endif /* _KERNEL */ Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Apr 18 21:18:22 2011 (r220802) +++ head/sys/i386/i386/pmap.c Mon Apr 18 21:24:42 2011 (r220803) @@ -297,6 +297,7 @@ static boolean_t pmap_enter_pde(pmap_t p vm_prot_t prot); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); +static void pmap_flush_page(vm_page_t m); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); @@ -1136,6 +1137,8 @@ pmap_update_pde(pmap_t pmap, vm_offset_t } #endif /* !SMP */ +#define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) + void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) { @@ -1148,7 +1151,7 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < 2 * 1024 * 1024) { + eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -1172,6 +1175,20 @@ pmap_invalidate_cache_range(vm_offset_t } } +void +pmap_invalidate_cache_pages(vm_page_t *pages, int count) +{ + int i; + + if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || + (cpu_feature & CPUID_CLFSH) == 0) { + pmap_invalidate_cache(); + } else { + for (i = 0; i < count; i++) + pmap_flush_page(pages[i]); + } +} + /* * Are we current address space or kernel? N.B. We return FALSE when * a pmap's page table is in use because a kernel thread is borrowing @@ -4825,8 +4842,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) { - struct sysmaps *sysmaps; - vm_offset_t sva, eva; m->md.pat_mode = ma; if ((m->flags & PG_FICTITIOUS) != 0) @@ -4849,25 +4864,42 @@ pmap_page_set_memattr(vm_page_t m, vm_me * invalidation. In the worst case, whole cache is flushed by * pmap_invalidate_cache_range(). */ - if ((cpu_feature & (CPUID_SS|CPUID_CLFSH)) == CPUID_CLFSH) { + if ((cpu_feature & CPUID_SS) == 0) + pmap_flush_page(m); +} + +static void +pmap_flush_page(vm_page_t m) +{ + struct sysmaps *sysmaps; + vm_offset_t sva, eva; + + if ((cpu_feature & CPUID_CLFSH) != 0) { sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) - panic("pmap_page_set_memattr: CMAP2 busy"); + panic("pmap_flush_page: CMAP2 busy"); sched_pin(); *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M | pmap_cache_bits(m->md.pat_mode, 0); invlcaddr(sysmaps->CADDR2); sva = (vm_offset_t)sysmaps->CADDR2; eva = sva + PAGE_SIZE; - } else - sva = eva = 0; /* gcc */ - pmap_invalidate_cache_range(sva, eva); - if (sva != 0) { + + /* + * Use mfence despite the ordering implied by + * mtx_{un,}lock() because clflush is not guaranteed + * to be ordered by any other instruction. + */ + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflush(sva); + mfence(); *sysmaps->CMAP2 = 0; sched_unpin(); mtx_unlock(&sysmaps->lock); - } + } else + pmap_invalidate_cache(); } /* Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Mon Apr 18 21:18:22 2011 (r220802) +++ head/sys/i386/include/pmap.h Mon Apr 18 21:24:42 2011 (r220803) @@ -522,7 +522,8 @@ void pmap_invalidate_page(pmap_t, vm_off void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); -void pmap_invalidate_cache_range(vm_offset_t, vm_offset_t); +void pmap_invalidate_cache_pages(vm_page_t *pages, int count); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 21:58:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5B9F106564A; Mon, 18 Apr 2011 21:58:25 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 35FA98FC0A; Mon, 18 Apr 2011 21:58:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAACsrE2DaFvO/2dsb2JhbACET6FpiG+sM5B9gSmDTnoEjgA X-IronPort-AV: E=Sophos;i="4.64,235,1301889600"; d="scan'208";a="117867522" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 18 Apr 2011 17:29:10 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id F006CB3F2D; Mon, 18 Apr 2011 17:29:10 -0400 (EDT) Date: Mon, 18 Apr 2011 17:29:10 -0400 (EDT) From: Rick Macklem To: Kostik Belousov Message-ID: <1505925744.242012.1303162150923.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110418080116.GW48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220761 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 21:58:25 -0000 > On Sun, Apr 17, 2011 at 11:04:04PM +0000, Rick Macklem wrote: > > Author: rmacklem > > Date: Sun Apr 17 23:04:03 2011 > > New Revision: 220761 > > URL: http://svn.freebsd.org/changeset/base/220761 > > > > Log: > > Add checks for MNTK_UNMOUNTF at the beginning of three > > functions, so that threads don't get stuck in them during > > a forced dismount. nfs_sync/VFS_SYNC() needs this, since it is > > called by dounmount() before VFS_UNMOUNT(). The nfscl_nget() > > case makes sure that a thread doing an VOP_OPEN() or > > VOP_ADVLOCK() call doesn't get blocked before attempting > > the RPC. Attempting RPCs don't block, since they all > > fail once a forced dismount is in progress. > > The third one at the beginning of nfsrpc_close() > > is done so threads don't get blocked while doing VOP_INACTIVE() > > as the vnodes are cleared out. > > With these three changes plus a change to the umount(1) > > command so that it doesn't do "sync()" for the forced case > > seem to make forced dismounts work for the experimental NFS > > client. > > > > MFC after: 2 weeks > > > > Modified: > > head/sys/fs/nfsclient/nfs_clrpcops.c > > head/sys/fs/nfsclient/nfs_clstate.c > > head/sys/fs/nfsclient/nfs_clvfsops.c > > > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > > ============================================================================== > > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 22:31:36 2011 > > (r220760) > > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 23:04:03 2011 > > (r220761) > > @@ -567,6 +567,11 @@ nfsrpc_close(vnode_t vp, int doclose, NF > > > > if (vnode_vtype(vp) != VREG) > > return (0); > > + > > + /* For forced unmounts, just return. */ > > + if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) > > + return (0); > > + > Is there anything that would prevent the MNTK_UNMOUNTF flag from being > set immediately after the test returned success ? > > Usually, the tests for MNTK_UNMOUNTF are bugs. I coould see how > terminating > the RPCs would be useful for forced unmounts, but do not think that > preventing entry into close would help. > I think you are correct, in that the one in nfsrpc_close() is harmless, but not needed. (I suspect I added it to fix a crash and then didn't realize that it's the one in nfscl_getcl() that matters.) Basically, ncl_inactive() would call nfsrpc_close() which calls nfscl_doclose() which calls nfscl_getcl(), so when nfscl_getcl() returns failure, that should be sufficient. As for the nfscl_getcl() one, I don't think it is currently quite right either. The problem is a race with nfscl_umount(), which gets called from nfs_unmount(). It goes like this: - for a forced dismount, nfs_unmount(): - cancels all in-progress RPCs plus all new RPC attempts will fail {newnfs_nmcancelreqs() does this } - calls nfscl_umount() --> nfscl_umount() gets the exclusive lock for open/lock state modifications. - igotlock = nfsv4_lock(&clp->nfsc_lock,...); This will delay while any refcnt (shared lock) on nfsc_lock is held. - once this exclusive lock is acquired, it zaps the state information (any RPC attempts simply fail, due to the above) - in nfscl_getcl(), it gets a refcnt (shared lock) on nfsc_lock, so once that happens, the above will block until it is released. --> My mistake was putting the test for MNTK_UNMOUNTF above that point in nfscl_getcl(), so there is a race if it is set after the test, but before acquiring the refcnt on nfsc_lock. Thanks for pointing this out so I took another look. I'll either revert the patch or add one that fixes the above. (ie. move the test in nfscl_getcl() down and probably get rid of the one in nfsrpc_close(), since the test in nfscl_getcl() should be sufficient.) rick From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:04:48 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CF63106566C; Mon, 18 Apr 2011 22:04:48 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 12CD48FC13; Mon, 18 Apr 2011 22:04:47 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QBwFI-00085T-5P; Mon, 18 Apr 2011 14:44:36 -0700 Message-ID: <4DACB0C3.6000804@FreeBSD.org> Date: Mon, 18 Apr 2011 14:44:35 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Gleb Smirnoff References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> In-Reply-To: <20110418181314.GL16958@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 22:04:48 -0000 On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: > This looks like a hack and better place for this hack would be shell > scripts rather than nat daemon. Well, I am not sure how would you apply shell script in such case. The problem with the original code is that natd just silently exits, leaving machine without a network connection. For some reason this problem started after upgrade from 7.4 to 8.2, perhaps there is some changes in the dhclient which allows it to run is parallel with other start-up activity. And I don't see any problem with natd waiting indefinitely on the interface to acquire IP address, it's no better and no worse than the current behavior when the natd simply bails out. -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:04:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A5A51065670; Mon, 18 Apr 2011 22:04:49 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id D26588FC14; Mon, 18 Apr 2011 22:04:48 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QBwHE-00085d-88; Mon, 18 Apr 2011 14:46:36 -0700 Message-ID: <4DACB13B.9070306@FreeBSD.org> Date: Mon, 18 Apr 2011 14:46:35 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Garrett Cooper References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 22:04:49 -0000 On 4/18/2011 12:42 PM, Garrett Cooper wrote: > +1 -- in particular because this will affect all cases, and not > just the dhclient-acquired IP external NIC case as the above commit > message notes. Well, as I already said I don't see any problem with natd waiting on interface to get IP address in all cases. This is no better or no worse than just bailing out, except it will make things working automatically once IP address has been provisioned. -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:09:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24E93106566B; Mon, 18 Apr 2011 22:09:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1205F8FC1E; Mon, 18 Apr 2011 22:09: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 p3IM939w085559; Mon, 18 Apr 2011 22:09:03 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3IM93oq085554; Mon, 18 Apr 2011 22:09:03 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104182209.p3IM93oq085554@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 18 Apr 2011 22:09: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: r220804 - head/sbin/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: Mon, 18 Apr 2011 22:09:04 -0000 Author: glebius Date: Mon Apr 18 22:09:03 2011 New Revision: 220804 URL: http://svn.freebsd.org/changeset/base/220804 Log: More whitespace fixes. Checked with: md5, diff -x -w Modified: head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Mon Apr 18 21:24:42 2011 (r220803) +++ head/sbin/ipfw/dummynet.c Mon Apr 18 22:09:03 2011 (r220804) @@ -284,7 +284,7 @@ flush_buf(char *buf) printf("%s\n", buf); buf[0] = '\0'; } - + /* * generic list routine. We expect objects in a specific order, i.e. * PIPES AND SCHEDULERS: Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Apr 18 21:24:42 2011 (r220803) +++ head/sbin/ipfw/ipfw2.c Mon Apr 18 22:09:03 2011 (r220804) @@ -435,7 +435,7 @@ match_value(struct _s_x *p, int value) int _substrcmp(const char *str1, const char* str2) { - + if (strncmp(str1, str2, strlen(str1)) != 0) return 1; @@ -463,7 +463,7 @@ _substrcmp(const char *str1, const char* int _substrcmp2(const char *str1, const char* str2, const char* str3) { - + if (strncmp(str1, str2, strlen(str2)) != 0) return 1; @@ -1123,7 +1123,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_NAT: PRINT_UINT_ARG("nat ", cmd->arg1); break; - + case O_SETFIB: PRINT_UINT_ARG("setfib ", cmd->arg1); break; @@ -1131,7 +1131,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_REASS: printf("reass"); break; - + default: printf("** unrecognized action %d len %d ", cmd->opcode, cmd->len); @@ -1168,7 +1168,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt } else if (cmd->opcode == O_IP6) { flags |= HAVE_PROTO6; break; - } + } } if (rule->_pad & 1) { /* empty rules before options */ if (!co.do_compact) { @@ -1625,7 +1625,7 @@ show_dyn_ipfw(ipfw_dyn_rule *d, int pcwi sizeof(buf)), d->id.dst_port); } else printf(" UNKNOWN <-> UNKNOWN\n"); - + printf("\n"); } @@ -2762,7 +2762,7 @@ ipfw_add(char *av[]) goto chkarg; case TOK_TEE: action->opcode = O_TEE; -chkarg: +chkarg: if (!av[0]) errx(EX_USAGE, "missing argument for %s", *(av - 1)); if (isdigit(**av)) { @@ -2848,7 +2848,7 @@ chkarg: case TOK_REASS: action->opcode = O_REASS; break; - + default: errx(EX_DATAERR, "invalid action %s\n", av[-1]); } @@ -3196,7 +3196,7 @@ read_options: fill_icmptypes((ipfw_insn_u32 *)cmd, *av); av++; break; - + case TOK_ICMP6TYPES: NEED1("icmptypes requires list of types"); fill_icmp6types((ipfw_insn_icmp6 *)cmd, *av); @@ -3432,7 +3432,7 @@ read_options: av++; } break; - + case TOK_DSTIP6: NEED1("missing destination IP6"); if (add_dstip6(cmd, *av)) { Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Mon Apr 18 21:24:42 2011 (r220803) +++ head/sbin/ipfw/ipfw2.h Mon Apr 18 22:09:03 2011 (r220804) @@ -183,7 +183,7 @@ enum tokens { TOK_PROXY_ONLY, TOK_REDIR_ADDR, TOK_REDIR_PORT, - TOK_REDIR_PROTO, + TOK_REDIR_PROTO, TOK_IPV6, TOK_FLOWID, Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Mon Apr 18 21:24:42 2011 (r220803) +++ head/sbin/ipfw/nat.c Mon Apr 18 22:09:03 2011 (r220804) @@ -54,7 +54,7 @@ static struct _s_x nat_params[] = { { "same_ports", TOK_SAME_PORTS }, { "unreg_only", TOK_UNREG_ONLY }, { "reset", TOK_RESET_ADDR }, - { "reverse", TOK_ALIAS_REV }, + { "reverse", TOK_ALIAS_REV }, { "proxy_only", TOK_PROXY_ONLY }, { "redirect_addr", TOK_REDIR_ADDR }, { "redirect_port", TOK_REDIR_PORT }, @@ -84,9 +84,9 @@ set_addr_dynamic(const char *ifn, struct mib[0] = CTL_NET; mib[1] = PF_ROUTE; mib[2] = 0; - mib[3] = AF_INET; + mib[3] = AF_INET; mib[4] = NET_RT_IFLIST; - mib[5] = 0; + mib[5] = 0; /* * Get interface data. */ @@ -212,7 +212,7 @@ StrToPortRange (const char* str, const c char* end; u_short loPort; u_short hiPort; - + /* First see if this is a service, return corresponding port if so. */ sp = getservbyname (str,proto); if (sp) { @@ -325,8 +325,8 @@ setup_redir_addr(char *spool_buf, unsign /* Temporary buffer used to hold server pool ip's. */ char tmp_spool_buf[NAT_BUF_LEN]; int ac, space, lsnat; - struct cfg_redir *r; - struct cfg_spool *tmp; + struct cfg_redir *r; + struct cfg_spool *tmp; av = *_av; ac = *_ac; @@ -351,7 +351,7 @@ setup_redir_addr(char *spool_buf, unsign strncpy(tmp_spool_buf, *av, strlen(*av)+1); lsnat = 1; } else - StrToAddr(*av, &r->laddr); + StrToAddr(*av, &r->laddr); INC_ARGCV(); /* Extract public address. */ @@ -362,13 +362,13 @@ setup_redir_addr(char *spool_buf, unsign /* Setup LSNAT server pool. */ if (sep) { - sep = strtok(tmp_spool_buf, ","); + sep = strtok(tmp_spool_buf, ","); while (sep != NULL) { - tmp = (struct cfg_spool *)spool_buf; + tmp = (struct cfg_spool *)spool_buf; if (len < SOF_SPOOL) goto nospace; len -= SOF_SPOOL; - space += SOF_SPOOL; + space += SOF_SPOOL; StrToAddr(sep, &tmp->addr); tmp->port = ~0; r->spool_cnt++; @@ -392,13 +392,13 @@ setup_redir_port(char *spool_buf, unsign struct cfg_redir *r; struct cfg_spool *tmp; u_short numLocalPorts; - port_range portRange; + port_range portRange; av = *_av; ac = *_ac; space = 0; lsnat = 0; - numLocalPorts = 0; + numLocalPorts = 0; if (len >= SOF_REDIR) { r = (struct cfg_redir *)spool_buf; @@ -415,7 +415,7 @@ setup_redir_port(char *spool_buf, unsign if (ac == 0) errx (EX_DATAERR, "redirect_port: missing protocol"); r->proto = StrToProto(*av); - protoName = *av; + protoName = *av; INC_ARGCV(); /* @@ -456,7 +456,7 @@ setup_redir_port(char *spool_buf, unsign numLocalPorts = GETNUMPORTS(portRange); } } - INC_ARGCV(); + INC_ARGCV(); /* * Extract public port and optionally address. @@ -487,7 +487,7 @@ setup_redir_port(char *spool_buf, unsign /* * Extract remote address and optionally port. - */ + */ /* * NB: isalpha(**av) => we've to check that next parameter is really an * option for this redirect entry, else stop here processing arg[cv]. @@ -562,7 +562,7 @@ setup_redir_port(char *spool_buf, unsign "this context"); tmp->port = GETLOPORT(portRange); } - r->spool_cnt++; + r->spool_cnt++; /* Point to the next possible cfg_spool. */ spool_buf = &spool_buf[SOF_SPOOL]; sep = strtok(NULL, ","); @@ -581,7 +581,7 @@ setup_redir_proto(char *spool_buf, unsig int ac, space; struct protoent *protoent; struct cfg_redir *r; - + av = *_av; ac = *_ac; if (len >= SOF_REDIR) { @@ -595,7 +595,7 @@ setup_redir_proto(char *spool_buf, unsig r->mode = REDIR_PROTO; /* * Extract protocol. - */ + */ if (ac == 0) errx(EX_DATAERR, "redirect_proto: missing protocol"); @@ -606,7 +606,7 @@ setup_redir_proto(char *spool_buf, unsig r->proto = protoent->p_proto; INC_ARGCV(); - + /* * Extract local address. */ @@ -616,28 +616,28 @@ setup_redir_proto(char *spool_buf, unsig StrToAddr(*av, &r->laddr); INC_ARGCV(); - + /* * Extract optional public address. */ if (ac == 0) { - r->paddr.s_addr = INADDR_ANY; - r->raddr.s_addr = INADDR_ANY; + r->paddr.s_addr = INADDR_ANY; + r->raddr.s_addr = INADDR_ANY; } else { /* see above in setup_redir_port() */ if (!isalpha(**av)) { - StrToAddr(*av, &r->paddr); + StrToAddr(*av, &r->paddr); INC_ARGCV(); - + /* * Extract optional remote address. - */ + */ /* see above in setup_redir_port() */ if (ac!=0 && !isalpha(**av)) { StrToAddr(*av, &r->raddr); INC_ARGCV(); } - } + } } return (space); nospace: @@ -765,7 +765,7 @@ ipfw_config_nat(int ac, char **av) struct cfg_nat *n; /* Nat instance configuration. */ int i, len, off, tok; char *id, buf[NAT_BUF_LEN]; /* Buffer for serialized data. */ - + len = NAT_BUF_LEN; /* Offset in buf: save space for n at the beginning. */ off = sizeof(*n); @@ -777,7 +777,7 @@ ipfw_config_nat(int ac, char **av) if (ac && isdigit(**av)) { id = *av; i = atoi(*av); - ac--; av++; + ac--; av++; n->id = i; } else errx(EX_DATAERR, "missing nat id"); @@ -894,7 +894,7 @@ ipfw_show_nat(int ac, char **av) frule = lrule = strtoul(av[0], &endptr, 10); if (*endptr == '-') lrule = strtoul(endptr+1, &endptr, 10); - if (lrule == 0) + if (lrule == 0) err(EX_USAGE, "invalid rule number: %s", av[0]); do_rule = 1; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:09:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3471A1065675; Mon, 18 Apr 2011 22:09:49 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 092A38FC0C; Mon, 18 Apr 2011 22:09:48 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QBwdf-00089p-T9; Mon, 18 Apr 2011 15:09:48 -0700 Message-ID: <4DACB6AA.2030407@FreeBSD.org> Date: Mon, 18 Apr 2011 15:09:46 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Garrett Cooper References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB13B.9070306@FreeBSD.org> In-Reply-To: <4DACB13B.9070306@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 22:09:49 -0000 On 4/18/2011 2:46 PM, Maxim Sobolev wrote: > Well, as I already said I don't see any problem with natd waiting on > interface to get IP address in all cases. This is no better or no worse > than just bailing out, except it will make things working automatically > once IP address has been provisioned. Garrett, Gleb, One way to resolve this would be to add a new flag for the natd, which will enable the new behaviour and set that flag from the rc.d/natd, so anybody else who relies on the natd exiting on no address condition can have it as well. What do you think? -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:14:40 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9F8F106564A; Mon, 18 Apr 2011 22:14:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 450338FC08; Mon, 18 Apr 2011 22:14:40 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p3IMEdRB036142; Tue, 19 Apr 2011 02:14:39 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p3IMEdnm036141; Tue, 19 Apr 2011 02:14:39 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 19 Apr 2011 02:14:38 +0400 From: Gleb Smirnoff To: Maxim Sobolev Message-ID: <20110418221438.GB34767@FreeBSD.org> References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4DACB0C3.6000804@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 22:14:40 -0000 On Mon, Apr 18, 2011 at 02:44:35PM -0700, Maxim Sobolev wrote: M> On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: M> > This looks like a hack and better place for this hack would be shell M> > scripts rather than nat daemon. M> M> Well, I am not sure how would you apply shell script in such case. The M> problem with the original code is that natd just silently exits, leaving M> machine without a network connection. For some reason this problem M> started after upgrade from 7.4 to 8.2, perhaps there is some changes in M> the dhclient which allows it to run is parallel with other start-up M> activity. M> M> And I don't see any problem with natd waiting indefinitely on the M> interface to acquire IP address, it's no better and no worse than the M> current behavior when the natd simply bails out. Hack can be applied to /etc/rc.d/natd, and better do it locally, not in FreeBSD svn. Example for such hack that is waiting for network in rc.d script can be found here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/quagga/files/quagga.sh.in?rev=1.18 See how $quagga_wait_for works. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:26:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DD83106566C; Mon, 18 Apr 2011 22:26:53 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id EC4918FC18; Mon, 18 Apr 2011 22:26:52 +0000 (UTC) Received: by pzk27 with SMTP id 27so3015840pzk.13 for ; Mon, 18 Apr 2011 15:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=w95NYcDnay39c9LUnC2Q1hiVSVRsHnAiABMIxVUVpiI=; b=tTm5GKpgqNM5aKYO1XvZDvY83G5jTjDYPxA7A0rf0fv9eclWO03pDnLrw/ITs9Mxwp PNjKD8yf0FnAqfpDpQQ3rZoSLz1OF5/TPZz/bNc87ddLiHzPjx/3huLc0xWOuJeGqlSb 9EARXFBNXrR4vQWyQr9TXkUqpv4zuzfdsmHCw= 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; b=wmiLZpVScIR2/+vsU6E2NuLwix9ikouKsJaQCZYU3R94i00Ob7DHU4P0VXNS+HVRcB 2mcmE3xTMJkDn8JypdryrUxFrtyUeRh5f9dyojOJwTZof6xe8b89fLxEJwew8H8xGOxq H9X2gTvw4fdsM5N4D3zr8Ib53RCZVgl3126Ho= MIME-Version: 1.0 Received: by 10.68.2.132 with SMTP id 4mr7558747pbu.11.1303165612635; Mon, 18 Apr 2011 15:26:52 -0700 (PDT) Received: by 10.68.42.3 with HTTP; Mon, 18 Apr 2011 15:26:52 -0700 (PDT) In-Reply-To: <4DACB0C3.6000804@FreeBSD.org> References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> Date: Mon, 18 Apr 2011 15:26:52 -0700 Message-ID: From: Garrett Cooper To: Maxim Sobolev Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 22:26:53 -0000 2011/4/18 Maxim Sobolev : > On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: >> >> This looks like a hack and better place for this hack would be shell >> scripts rather than nat daemon. > > Well, I am not sure how would you apply shell script in such case. The > problem with the original code is that natd just silently exits, leaving > machine without a network connection. For some reason this problem started > after upgrade from 7.4 to 8.2, perhaps there is some changes in the dhclient > which allows it to run is parallel with other start-up activity. I've seen the problem that you've attempted to fix here before at home, and it actually occurred between 8.1 and 8.2. I merely hacked things to work at home in the rc script because I didn't want to muck around with natd's C sources. > And I don't see any problem with natd waiting indefinitely on the interface > to acquire IP address, it's no better and no worse than the current behavior > when the natd simply bails out. If it does this when backgrounded, that seems ok. If it blocks foregrounded like this, that's not acceptable. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 22:40:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE81E10656D8; Mon, 18 Apr 2011 22:40:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 60E108FC17; Mon, 18 Apr 2011 22:40:23 +0000 (UTC) Received: by pzk27 with SMTP id 27so3023809pzk.13 for ; Mon, 18 Apr 2011 15:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=UL8x+NW0Vw0xhFS0PR4iEacb4APlFHZqtZ8QTA+/oDo=; b=AsMdk2h3ctKrXcYn7QIqO0GWS06Ism342O+rwXu+377pSivgZXaO0FHPG25g5udbnF L4daigA4KTTRbuxrqfSWqzLz3zwJEYHxtQL8qJOZe5oDNfdIGJTmS3D7QEUnKiqtKhVW 0q9fc+Oe+qqLN1HJokS2vJHbAXFQIcsXbfCaU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=CC8flPZJjbFvDnFnOWQL81UCIFcErPjJcEPJv2/ZQUe8y5PnD3ziIf3OpQhXTscKKJ Hs34AaKCAimQz4G1whJkJ8otbh3sUmo7MpXDYjLekTNgtkK27JiEsGzkGOOZUSXPgoTg MXJizFNwp5YH9uYg3A9drvQTSBVphaixh5zB4= Received: by 10.68.49.103 with SMTP id t7mr7321571pbn.330.1303164791619; Mon, 18 Apr 2011 15:13:11 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id u6sm2549100pbq.43.2011.04.18.15.13.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2011 15:13:10 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 18 Apr 2011 15:12:19 -0700 From: YongHyeon PYUN Date: Mon, 18 Apr 2011 15:12:19 -0700 To: Maxim Sobolev Message-ID: <20110418221219.GC1637@michelle.cdnetworks.com> References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DACB0C3.6000804@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 22:40:23 -0000 On Mon, Apr 18, 2011 at 02:44:35PM -0700, Maxim Sobolev wrote: > On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: > >This looks like a hack and better place for this hack would be shell > >scripts rather than nat daemon. > > Well, I am not sure how would you apply shell script in such case. The > problem with the original code is that natd just silently exits, leaving > machine without a network connection. For some reason this problem > started after upgrade from 7.4 to 8.2, perhaps there is some changes in > the dhclient which allows it to run is parallel with other start-up > activity. > SYNCDHCP may restore old behavior of dhclient. > And I don't see any problem with natd waiting indefinitely on the > interface to acquire IP address, it's no better and no worse than the > current behavior when the natd simply bails out. > > -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:12:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50D741065672; Mon, 18 Apr 2011 23:12:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 244D08FC0C; Mon, 18 Apr 2011 23:12: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 p3INCgdO086923; Mon, 18 Apr 2011 23:12:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3INCgin086921; Mon, 18 Apr 2011 23:12:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201104182312.p3INCgin086921@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 18 Apr 2011 23:12: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: r220805 - 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, 18 Apr 2011 23:12:42 -0000 Author: jkim Date: Mon Apr 18 23:12:41 2011 New Revision: 220805 URL: http://svn.freebsd.org/changeset/base/220805 Log: Do not assume PM timer GAS type is I/O or memory. It may be an unsupported type, i. e., a broken table. Also, do not hardcode ACPI timer frequency in device description. Modified: head/sys/dev/acpica/acpi_timer.c Modified: head/sys/dev/acpica/acpi_timer.c ============================================================================== --- head/sys/dev/acpica/acpi_timer.c Mon Apr 18 22:09:03 2011 (r220804) +++ head/sys/dev/acpica/acpi_timer.c Mon Apr 18 23:12:41 2011 (r220805) @@ -130,9 +130,17 @@ acpi_timer_identify(driver_t *driver, de } acpi_timer_dev = dev; + switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; + case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; + default: + return_VOID; + } rid = 0; - rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; rlen = AcpiGbl_FADT.PmTimerLength; rstart = AcpiGbl_FADT.XPmTimerBlock.Address; if (bus_set_resource(dev, rtype, rid, rstart, rlen)) @@ -152,9 +160,17 @@ acpi_timer_probe(device_t dev) if (dev != acpi_timer_dev) return (ENXIO); + switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; + case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; + default: + return (ENXIO); + } rid = 0; - rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); if (acpi_timer_reg == NULL) { device_printf(dev, "couldn't allocate resource (%s 0x%lx)\n", @@ -195,8 +211,9 @@ acpi_timer_probe(device_t dev) } tc_init(&acpi_timer_timecounter); - sprintf(desc, "%d-bit timer at 3.579545MHz", - (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) ? 32 : 24); + sprintf(desc, "%d-bit timer at %u.%06uMHz", + (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) != 0 ? 32 : 24, + acpi_timer_frequency / 1000000, acpi_timer_frequency % 1000000); device_set_desc_copy(dev, desc); /* Release the resource, we'll allocate it again during attach. */ @@ -211,9 +228,17 @@ acpi_timer_attach(device_t dev) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; + case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; + default: + return (ENXIO); + } rid = 0; - rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); if (acpi_timer_reg == NULL) return (ENXIO); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:15:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D803106566C; Mon, 18 Apr 2011 23:15:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B8178FC0A; Mon, 18 Apr 2011 23:15: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 p3INFUIR087023; Mon, 18 Apr 2011 23:15:30 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3INFTnH087021; Mon, 18 Apr 2011 23:15:29 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201104182315.p3INFTnH087021@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 18 Apr 2011 23:15: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: r220806 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 23:15:30 -0000 Author: sobomax Date: Mon Apr 18 23:15:29 2011 New Revision: 220806 URL: http://svn.freebsd.org/changeset/base/220806 Log: Only wait for the IP to appear on the interface if natd is running in the background. Suggested by: Garrett Cooper Use EAGAIN instead of magic value of -2 to report this condition from the SetAliasAddressFromIfName routine. MFC after: 2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Mon Apr 18 23:12:41 2011 (r220805) +++ head/sbin/natd/natd.c Mon Apr 18 23:15:29 2011 (r220806) @@ -305,9 +305,9 @@ int main (int argc, char** argv) else { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (rval == -2) + if (background != 0 && rval == EAGAIN) sleep(1); - } while (rval == -2); + } while (background != 0 && rval == EAGAIN); if (rval != 0) exit(1); } @@ -648,9 +648,9 @@ static void DoAliasing (int fd, int dire if (mip->assignAliasAddr) { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (rval == -2) + if (background != 0 && rval == EAGAIN) sleep(1); - } while (rval == -2); + } while (background != 0 && rval == EAGAIN); if (rval != 0) exit(1); mip->assignAliasAddr = 0; @@ -969,7 +969,7 @@ SetAliasAddressFromIfName(const char *if if (sin == NULL) { warnx("%s: cannot get interface address", ifn); free(buf); - return -2; + return EAGAIN; } LibAliasSetAddress(mla, sin->sin_addr); From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:17:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1F49106564A; Mon, 18 Apr 2011 23:17:26 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id A5D588FC13; Mon, 18 Apr 2011 23:17:26 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QBxh7-0008NT-Hj; Mon, 18 Apr 2011 16:17:25 -0700 Message-ID: <4DACC684.7070301@FreeBSD.org> Date: Mon, 18 Apr 2011 16:17:24 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Garrett Cooper References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 23:17:26 -0000 On 4/18/2011 3:26 PM, Garrett Cooper wrote: >> And I don't see any problem with natd waiting indefinitely on the interface >> to acquire IP address, it's no better and no worse than the current behavior >> when the natd simply bails out. > > If it does this when backgrounded, that seems ok. If it blocks > foregrounded like this, that's not acceptable. Makes sense. I've checked in the patch, thanks! -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:19:12 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C057106564A; Mon, 18 Apr 2011 23:19:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 78CBF8FC1C; Mon, 18 Apr 2011 23:19:10 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3INIwku024689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 09:19:02 +1000 Date: Tue, 19 Apr 2011 09:18:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201104181705.18809.jhb@freebsd.org> Message-ID: <20110419091317.C2406@besplex.bde.org> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <201104181448.39401.jhb@freebsd.org> <201104181705.18809.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, Roman Divacky , Dimitry Andric , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Warner Losh Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 23:19:12 -0000 On Mon, 18 Apr 2011, John Baldwin wrote: > On Monday, April 18, 2011 4:02:10 pm Warner Losh wrote: >> The problem is that this is a technical solution that precludes me from saying "look, I know that this will be OK, so let me do it" I know > nothing has changed that would cause a problem. > > We could easily support some sort of cpp #define to disable the automatic > MODULE_DEPEND() on the kernel. Then you could use > > 'make DEBUG_FLAGS="-DDISABLE_KERNEL_VERSION"' > > or whatever the variable is called when building your kernel modules. You > could even have a DISABLE_KERNEL_VERSION make variable that adds that to > CFLAGS in bsd.kmod.mk and then set it to yes in your /etc/make.conf. > > However, for normal users I think the precaution against loading an 8.x kld > on 7 is worth it. I prefer never loading an a.x kld on b and wouldn't mind if it were enforced (rm -rf /sys/modules...) :-). FreeBSD cluster machines all do this (by expletively undeleting the definition of NO_MODULES so that /boot/kernel has no modules). Modules may still be useful for debugging. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:24:55 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4459E106566C; Mon, 18 Apr 2011 23:24:55 +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 D21D78FC0A; Mon, 18 Apr 2011 23:24:53 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3INOpLi009402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 09:24:51 +1000 Date: Tue, 19 Apr 2011 09:24:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin In-Reply-To: <4DAC91BF.7050102@FreeBSD.org> Message-ID: <20110419091915.G2406@besplex.bde.org> References: <201104181334.p3IDYVDh073304@svn.freebsd.org> <201104181306.58172.jhb@freebsd.org> <4DAC91BF.7050102@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, John Baldwin Subject: Re: svn commit: r220777 - 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: Mon, 18 Apr 2011 23:24:55 -0000 On Mon, 18 Apr 2011, Alexander Motin wrote: > On 18.04.2011 20:06, John Baldwin wrote: >> On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: >>> Author: mav >>> Date: Mon Apr 18 13:34:31 2011 >>> New Revision: 220777 >>> URL: http://svn.freebsd.org/changeset/base/220777 >>> >>> Log: >>> - Tune different wait loops to cut some more milliseconds from reset >>> time. >>> - Do not call ahci_start() before device signature received. It is >>> required >>> by the specification and caused non-fatal reset timeouts on AMD >>> chipsets. >> >> Do you have to use DELAY() here rather than a blocking sleep via pause()? > > At the moment I would say yes. These paths are called from CAM while holding > SIM lock. CAM may not like if I drop the lock in the middle of the call. Also > during recovery those functions could be called from the callout and > interrupt threads. In that case even dropping the lock won't allow thread to > sleep. More than before you reduced the delays. There seems to be no interrupt for reset, and it may be impossible for a timer to interrupt after only ~10 usec like some of the reduced delays use. > I will think more about possibilities to refactor the code to replace some > DELAYs with callouts, but requirement to keep functionality in polled mode > doesn't make the task easier. This means that callouts cannot work. Dumps should start with a reset which should run entirely in polled mode, like the entired dump. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:34:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98B621065731; Mon, 18 Apr 2011 23:34:34 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id CDBCE8FC0C; Mon, 18 Apr 2011 23:34:33 +0000 (UTC) Received: from [4.59.13.245] (helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1QBxxa-0008QM-T3; Mon, 18 Apr 2011 16:34:27 -0700 Message-ID: <4DACCA7E.9090907@FreeBSD.org> Date: Mon, 18 Apr 2011 16:34:22 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pyunyh@gmail.com References: <201104170605.p3H65cab028890@svn.freebsd.org> <20110418181314.GL16958@FreeBSD.org> <4DACB0C3.6000804@FreeBSD.org> <20110418221219.GC1637@michelle.cdnetworks.com> In-Reply-To: <20110418221219.GC1637@michelle.cdnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r220736 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 23:34:34 -0000 On 4/18/2011 3:12 PM, YongHyeon PYUN wrote: > SYNCDHCP may restore old behavior of dhclient. Thanks, but I would rather not. -dynamic kinda suggests that the interface can go up and down, so if natd running in the background can handle this condition gracefully instead of silently exit this would be a better approach IMHO. -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:34:39 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 718DA1065702; Mon, 18 Apr 2011 23:34:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id E547F8FC18; Mon, 18 Apr 2011 23:34:38 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3INYZlL014206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 09:34:36 +1000 Date: Tue, 19 Apr 2011 09:34:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin In-Reply-To: <4DAC9D03.4000403@FreeBSD.org> Message-ID: <20110419092526.Y2406@besplex.bde.org> References: <201104181359.p3IDxuKD073859@svn.freebsd.org> <4DAC9CD7.9020205@FreeBSD.org> <4DAC9D03.4000403@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, Doug Barton , src-committers@FreeBSD.org Subject: Re: svn commit: r220778 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 23:34:39 -0000 On Mon, 18 Apr 2011, Alexander Motin wrote: > Doug Barton wrote: >> On 04/18/2011 06:59, Alexander Motin wrote: >>> Remove some used variables. >> >> If they are used, perhaps they should not be removed? :) > > :) Unused. Nah, they were used (to initialize them), but this use of them was not used, so its only effect was to break the gcc warning about them being unused. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:35:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE5E11065672; Mon, 18 Apr 2011 23:35:16 +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 C1A9D8FC25; Mon, 18 Apr 2011 23:35: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 p3INZG9R088154; Mon, 18 Apr 2011 23:35:16 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3INZGv6088150; Mon, 18 Apr 2011 23:35:16 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104182335.p3INZGv6088150@svn.freebsd.org> From: Rick Macklem Date: Mon, 18 Apr 2011 23:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220807 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 23:35:17 -0000 Author: rmacklem Date: Mon Apr 18 23:35:16 2011 New Revision: 220807 URL: http://svn.freebsd.org/changeset/base/220807 Log: Revert r220761 since, as kib@ pointed out, the case of adding the check to nfsrpc_close() isn't useful. Also, the check in nfscl_getcl() must be more involved, since it needs to check before and after the acquisition of the refcnt on nfsc_lock, while the mutex that protects the client state data is held. Modified: head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 18 23:35:16 2011 (r220807) @@ -567,11 +567,6 @@ nfsrpc_close(vnode_t vp, int doclose, NF if (vnode_vtype(vp) != VREG) return (0); - - /* For forced unmounts, just return. */ - if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (0); - if (doclose) error = nfscl_doclose(vp, &clp, p); else Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 18 23:35:16 2011 (r220807) @@ -692,10 +692,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr int igotlock = 0, error, trystalecnt, clidinusedelay, i; u_int16_t idlen = 0; - /* For forced unmounts, just return an error. */ - if ((vnode_mount(vp)->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (EPERM); - if (cred != NULL) { getcredhostuuid(cred, uuid, sizeof uuid); idlen = strlen(uuid); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 18 23:35:16 2011 (r220807) @@ -1386,10 +1386,6 @@ nfs_sync(struct mount *mp, int waitfor) td = curthread; - /* For a forced unmount, just return EPERM. */ - if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (EPERM); - /* * Force stale buffer cache information to be flushed. */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 18 23:45:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E27471065670; Mon, 18 Apr 2011 23:45:50 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D06E58FC15; Mon, 18 Apr 2011 23:45: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 p3INjowF088488; Mon, 18 Apr 2011 23:45:50 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3INjo7Y088486; Mon, 18 Apr 2011 23:45:50 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201104182345.p3INjo7Y088486@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 18 Apr 2011 23:45: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: r220808 - head/sbin/natd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 18 Apr 2011 23:45:51 -0000 Author: sobomax Date: Mon Apr 18 23:45:50 2011 New Revision: 220808 URL: http://svn.freebsd.org/changeset/base/220808 Log: Furthermore condition IP waiting behaviour also on -dynamic flag. This should preserve POLA in all other cases (foreground || non-dynamic). MFC after: 2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Mon Apr 18 23:35:16 2011 (r220807) +++ head/sbin/natd/natd.c Mon Apr 18 23:45:50 2011 (r220808) @@ -305,9 +305,11 @@ int main (int argc, char** argv) else { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); } @@ -648,9 +650,11 @@ static void DoAliasing (int fd, int dire if (mip->assignAliasAddr) { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); mip->assignAliasAddr = 0; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 00:47:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A268106564A; Tue, 19 Apr 2011 00:47:27 +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 37C1C8FC15; Tue, 19 Apr 2011 00:47: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 p3J0lRtl089779; Tue, 19 Apr 2011 00:47:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J0lRX1089777; Tue, 19 Apr 2011 00:47:27 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104190047.p3J0lRX1089777@svn.freebsd.org> From: Rick Macklem Date: Tue, 19 Apr 2011 00:47: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: r220809 - head/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 00:47:27 -0000 Author: rmacklem Date: Tue Apr 19 00:47:26 2011 New Revision: 220809 URL: http://svn.freebsd.org/changeset/base/220809 Log: Add stablerestart(5) to the See Also list for nfsd(8). This is a content change. Suggested by: Jeremy Chadwick MFC after: 2 weeks Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Mon Apr 18 23:45:50 2011 (r220808) +++ head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 00:47:26 2011 (r220809) @@ -201,7 +201,8 @@ just do a .Xr nfsiod 8 , .Xr nfsrevoke 8 , .Xr nfsuserd 8 , -.Xr rpcbind 8 +.Xr rpcbind 8 , +.Xr stablerestart 5 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 01:09:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6A8C106564A; Tue, 19 Apr 2011 01:09:51 +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 AA1998FC13; Tue, 19 Apr 2011 01:09: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 p3J19pDx090242; Tue, 19 Apr 2011 01:09:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J19peB090240; Tue, 19 Apr 2011 01:09:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104190109.p3J19peB090240@svn.freebsd.org> From: Rick Macklem Date: Tue, 19 Apr 2011 01:09: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: r220810 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 01:09:51 -0000 Author: rmacklem Date: Tue Apr 19 01:09:51 2011 New Revision: 220810 URL: http://svn.freebsd.org/changeset/base/220810 Log: Fix up handling of the nfsmount structure in read and write within the experimental NFS client. Mostly add mutex locking and use the same rsize, wsize during the operation by keeping a local copy of it. This is another change that brings it closer to the regular NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Apr 19 00:47:26 2011 (r220809) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Apr 19 01:09:51 2011 (r220810) @@ -1284,16 +1284,22 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u struct nfsrv_descript nfsd; struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct nfsrv_descript *nd = &nfsd; + int rsize; *attrflagp = 0; tsiz = uio_uio_resid(uiop); - if (uiop->uio_offset + tsiz > 0xffffffff && - !NFSHASNFSV3OR4(nmp)) + NFSLOCKMNT(nmp); + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { + /* XXX Needs overflow/negative check for uio_offset */ + NFSUNLOCKMNT(nmp); return (EFBIG); + } + rsize = nmp->nm_rsize; + NFSUNLOCKMNT(nmp); nd->nd_mrep = NULL; while (tsiz > 0) { *attrflagp = 0; - len = (tsiz > nmp->nm_rsize) ? nmp->nm_rsize : tsiz; + len = (tsiz > rsize) ? rsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_READ, vp); if (nd->nd_flag & ND_NFSV4) nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID); @@ -1333,7 +1339,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); eof = fxdr_unsigned(int, *tl); } - NFSM_STRSIZ(retlen, nmp->nm_rsize); + NFSM_STRSIZ(retlen, rsize); error = nfsm_mbufuio(nd, uiop, retlen); if (error) goto nfsmout; @@ -1457,8 +1463,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio * *attrflagp = 0; tsiz = uio_uio_resid(uiop); NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > 0xffffffff && - !NFSHASNFSV3OR4(nmp)) { + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { NFSUNLOCKMNT(nmp); return (EFBIG); } @@ -1467,11 +1472,6 @@ nfsrpc_writerpc(vnode_t vp, struct uio * nd->nd_mrep = NULL; /* NFSv2 sometimes does a write with */ nd->nd_repstat = 0; /* uio_resid == 0, so the while is not done */ while (tsiz > 0) { - nmp = VFSTONFS(vnode_mount(vp)); - if (nmp == NULL) { - error = ENXIO; - goto nfsmout; - } *attrflagp = 0; len = (tsiz > wsize) ? wsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_WRITE, vp); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 05:09:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 674AF106564A; Tue, 19 Apr 2011 05:09:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53CCC8FC14; Tue, 19 Apr 2011 05:09: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 p3J59HXH095236; Tue, 19 Apr 2011 05:09:17 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J59HA2095234; Tue, 19 Apr 2011 05:09:17 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104190509.p3J59HA2095234@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 19 Apr 2011 05:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220811 - stable/8/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: Tue, 19 Apr 2011 05:09:17 -0000 Author: ae Date: Tue Apr 19 05:09:17 2011 New Revision: 220811 URL: http://svn.freebsd.org/changeset/base/220811 Log: MFC r220568: Restore previous behaviour - always match rule when we doing tagging, even when tag is already exists. Reported by: Vadim Goncharov Modified: stable/8/sys/netinet/ipfw/ip_fw2.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 19 01:09:51 2011 (r220810) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 19 05:09:17 2011 (r220811) @@ -1793,10 +1793,13 @@ do { \ if (mtag != NULL) m_tag_delete(m, mtag); match = 0; - } else if (mtag == NULL) { - if ((mtag = m_tag_alloc(MTAG_IPFW, - tag, 0, M_NOWAIT)) != NULL) - m_tag_prepend(m, mtag); + } else { + if (mtag == NULL) { + mtag = m_tag_alloc( MTAG_IPFW, + tag, 0, M_NOWAIT); + if (mtag != NULL) + m_tag_prepend(m, mtag); + } match = 1; } break; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 05:59:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB71106566B; Tue, 19 Apr 2011 05:59:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AB2D8FC12; Tue, 19 Apr 2011 05:59:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J5xbYb096322; Tue, 19 Apr 2011 05:59:37 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J5xbWs096320; Tue, 19 Apr 2011 05:59:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104190559.p3J5xbWs096320@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 19 Apr 2011 05:59: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: r220812 - 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: Tue, 19 Apr 2011 05:59:37 -0000 Author: ae Date: Tue Apr 19 05:59:37 2011 New Revision: 220812 URL: http://svn.freebsd.org/changeset/base/220812 Log: Use M_WAITOK instead M_WAIT for malloc. Remove unneded checks. MFC after: 1 week Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 05:09:17 2011 (r220811) +++ head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 05:59:37 2011 (r220812) @@ -1836,9 +1836,7 @@ dummynet_get(struct sockopt *sopt, void #endif if (l > sizeof(r)) { /* request larger than default, allocate buffer */ - cmd = malloc(l, M_DUMMYNET, M_WAIT); - if (cmd == NULL) - return ENOMEM; //XXX + cmd = malloc(l, M_DUMMYNET, M_WAITOK); error = sooptcopyin(sopt, cmd, l, l); sopt->sopt_valsize = sopt_valsize; if (error) @@ -1894,10 +1892,6 @@ dummynet_get(struct sockopt *sopt, void have = need; start = malloc(have, M_DUMMYNET, M_WAITOK | M_ZERO); - if (start == NULL) { - error = ENOMEM; - goto done; - } } if (start == NULL) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:23:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E25106564A; Tue, 19 Apr 2011 07:23:16 +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 869FB8FC20; Tue, 19 Apr 2011 07: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 p3J7NGL9098082; Tue, 19 Apr 2011 07:23:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7NG5Y098078; Tue, 19 Apr 2011 07:23:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190723.p3J7NG5Y098078@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 07:23: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: r220813 - in stable/8/sys: netinet 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: Tue, 19 Apr 2011 07:23:16 -0000 Author: bz Date: Tue Apr 19 07:23:16 2011 New Revision: 220813 URL: http://svn.freebsd.org/changeset/base/220813 Log: MFC r219579: Merge the two identical implementations for local port selections from in_pcbbind_setup() and in6_pcbsetport() in a single in_pcb_lport(). Modified: stable/8/sys/netinet/in_pcb.c stable/8/sys/netinet/in_pcb.h stable/8/sys/netinet6/in6_src.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in_pcb.c ============================================================================== --- stable/8/sys/netinet/in_pcb.c Tue Apr 19 05:59:37 2011 (r220812) +++ stable/8/sys/netinet/in_pcb.c Tue Apr 19 07:23:16 2011 (r220813) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_ipsec.h" +#include "opt_inet.h" #include "opt_inet6.h" #include @@ -73,6 +74,7 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include +#include #endif /* INET6 */ @@ -271,6 +273,124 @@ in_pcbbind(struct inpcb *inp, struct soc return (0); } +#if defined(INET) || defined(INET6) +int +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int wild) +{ + struct inpcbinfo *pcbinfo; + struct inpcb *tmpinp; + unsigned short *lastport; + int count, dorandom, error; + u_short aux, first, last, lport; +#ifdef INET + struct in_addr laddr; +#endif + + pcbinfo = inp->inp_pcbinfo; + + /* + * Because no actual state changes occur here, a global write lock on + * the pcbinfo isn't required. + */ + INP_INFO_LOCK_ASSERT(pcbinfo); + INP_LOCK_ASSERT(inp); + + if (inp->inp_flags & INP_HIGHPORT) { + first = V_ipport_hifirstauto; /* sysctl */ + last = V_ipport_hilastauto; + lastport = &pcbinfo->ipi_lasthi; + } else if (inp->inp_flags & INP_LOWPORT) { + error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); + if (error) + return (error); + first = V_ipport_lowfirstauto; /* 1023 */ + last = V_ipport_lowlastauto; /* 600 */ + lastport = &pcbinfo->ipi_lastlow; + } else { + first = V_ipport_firstauto; /* sysctl */ + last = V_ipport_lastauto; + lastport = &pcbinfo->ipi_lastport; + } + /* + * For UDP, use random port allocation as long as the user + * allows it. For TCP (and as of yet unknown) connections, + * use random port allocation only if the user allows it AND + * ipport_tick() allows it. + */ + if (V_ipport_randomized && + (!V_ipport_stoprandom || pcbinfo == &V_udbinfo)) + dorandom = 1; + else + dorandom = 0; + /* + * It makes no sense to do random port allocation if + * we have the only port available. + */ + if (first == last) + dorandom = 0; + /* Make sure to not include UDP packets in the count. */ + if (pcbinfo != &V_udbinfo) + V_ipport_tcpallocs++; + /* + * Instead of having two loops further down counting up or down + * make sure that first is always <= last and go with only one + * code path implementing all logic. + */ + if (first > last) { + aux = first; + first = last; + last = aux; + } + +#ifdef INET + /* Make the compiler happy. */ + laddr.s_addr = 0; + if ((inp->inp_vflag & INP_IPV4) != 0) { + KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", + __func__, inp)); + laddr = *laddrp; + } +#endif + lport = *lportp; + + if (dorandom) + *lastport = first + (arc4random() % (last - first)); + + count = last - first; + + do { + if (count-- < 0) /* completely used? */ + return (EADDRNOTAVAIL); + ++*lastport; + if (*lastport < first || *lastport > last) + *lastport = first; + lport = htons(*lastport); + +#ifdef INET6 + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, wild, cred); +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, wild, cred); +#endif + } while (tmpinp != NULL); + +#ifdef INET + if ((inp->inp_vflag & INP_IPV4) != 0) + laddrp->s_addr = laddr.s_addr; +#endif + *lportp = lport; + + return (0); +} +#endif /* INET || INET6 */ + /* * Set up a bind operation on a PCB, performing port allocation * as required, but do not actually modify the PCB. Callers can @@ -285,14 +405,12 @@ in_pcbbind_setup(struct inpcb *inp, stru u_short *lportp, struct ucred *cred) { struct socket *so = inp->inp_socket; - unsigned short *lastport; struct sockaddr_in *sin; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; int wild = 0, reuseport = (so->so_options & SO_REUSEPORT); int error; - int dorandom; /* * Because no actual state changes occur here, a global write lock on @@ -417,72 +535,10 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - u_short first, last, aux; - int count; - - if (inp->inp_flags & INP_HIGHPORT) { - first = V_ipport_hifirstauto; /* sysctl */ - last = V_ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, - PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = V_ipport_lowfirstauto; /* 1023 */ - last = V_ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = V_ipport_firstauto; /* sysctl */ - last = V_ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (V_ipport_randomized && - (!V_ipport_stoprandom || pcbinfo == &V_udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &V_udbinfo) - V_ipport_tcpallocs++; - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - */ - if (first > last) { - aux = first; - first = last; - last = aux; - } - - if (dorandom) - *lastport = first + - (arc4random() % (last - first)); - - count = last - first; + error = in_pcb_lport(inp, &laddr, &lport, cred, wild); + if (error != 0) + return (error); - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in_pcblookup_local(pcbinfo, laddr, - lport, wild, cred)); } *laddrp = laddr.s_addr; *lportp = lport; Modified: stable/8/sys/netinet/in_pcb.h ============================================================================== --- stable/8/sys/netinet/in_pcb.h Tue Apr 19 05:59:37 2011 (r220812) +++ stable/8/sys/netinet/in_pcb.h Tue Apr 19 07:23:16 2011 (r220813) @@ -486,6 +486,8 @@ extern struct callout ipport_tick_callou void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, + struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: stable/8/sys/netinet6/in6_src.c ============================================================================== --- stable/8/sys/netinet6/in6_src.c Tue Apr 19 05:59:37 2011 (r220812) +++ stable/8/sys/netinet6/in6_src.c Tue Apr 19 07:23:16 2011 (r220813) @@ -850,9 +850,11 @@ int in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) { struct socket *so = inp->inp_socket; - u_int16_t lport = 0, first, last, *lastport; - int count, error, wild = 0, dorandom; + u_int16_t lport = 0; + int error, wild = 0; +#ifdef INVARIANTS struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; +#endif INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); @@ -868,71 +870,9 @@ in6_pcbsetport(struct in6_addr *laddr, s inp->inp_flags |= INP_ANONPORT; - if (inp->inp_flags & INP_HIGHPORT) { - first = V_ipport_hifirstauto; /* sysctl */ - last = V_ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = V_ipport_lowfirstauto; /* 1023 */ - last = V_ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = V_ipport_firstauto; /* sysctl */ - last = V_ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (V_ipport_randomized && - (!V_ipport_stoprandom || pcbinfo == &V_udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &V_udbinfo) - V_ipport_tcpallocs++; - - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - */ - if (first > last) { - u_int16_t aux; - - aux = first; - first = last; - last = aux; - } - - if (dorandom) - *lastport = first + (arc4random() % (last - first)); - - count = last - first; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in6_pcblookup_local(pcbinfo, &inp->in6p_laddr, - lport, wild, cred)); + error = in_pcb_lport(inp, NULL, &lport, cred, wild); + if (error != 0) + return (error); inp->inp_lport = lport; if (in_pcbinshash(inp) != 0) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:30:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA22010656D0; Tue, 19 Apr 2011 07:30: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 D8F928FC16; Tue, 19 Apr 2011 07:30: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 p3J7UMRI098289; Tue, 19 Apr 2011 07:30:22 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7UMWo098287; Tue, 19 Apr 2011 07:30:22 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201104190730.p3J7UMWo098287@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 19 Apr 2011 07:30: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: r220814 - head/sys/modules/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 07:30:23 -0000 Author: uqs Date: Tue Apr 19 07:30:22 2011 New Revision: 220814 URL: http://svn.freebsd.org/changeset/base/220814 Log: Fix make buildworld -DMODULES_WITH_WORLD after r220454. Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Tue Apr 19 07:23:16 2011 (r220813) +++ head/sys/modules/cam/Makefile Tue Apr 19 07:30:22 2011 (r220814) @@ -8,6 +8,7 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h +SRCS+= opt_ada.h SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:36:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881DB1065670; Tue, 19 Apr 2011 07:36:53 +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 5CEC28FC08; Tue, 19 Apr 2011 07:36: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 p3J7arGa098477; Tue, 19 Apr 2011 07:36:53 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7arv5098475; Tue, 19 Apr 2011 07:36:53 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104190736.p3J7arv5098475@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 19 Apr 2011 07:36: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: r220815 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 07:36:53 -0000 Author: ru Date: Tue Apr 19 07:36:53 2011 New Revision: 220815 URL: http://svn.freebsd.org/changeset/base/220815 Log: MFC r220595: - Fixed nfs_printf() to use vprintf(). - Fixed vfs.nfs.acdebug sysctl's description. - Fixed panic when compiled with NFS_ACDEBUG. Modified: stable/8/sys/nfsclient/nfs_subs.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Tue Apr 19 07:30:22 2011 (r220814) +++ stable/8/sys/nfsclient/nfs_subs.c Tue Apr 19 07:36:53 2011 (r220815) @@ -442,7 +442,7 @@ nfs_printf(const char *fmt, ...) mtx_lock(&Giant); va_start(ap, fmt); - printf(fmt, ap); + vprintf(fmt, ap); va_end(ap); mtx_unlock(&Giant); } @@ -656,7 +656,7 @@ out: SYSCTL_DECL(_vfs_nfs); static int nfs_acdebug; SYSCTL_INT(_vfs_nfs, OID_AUTO, acdebug, CTLFLAG_RW, &nfs_acdebug, 0, - "Toggle acdebug (access cache debug) flag"); + "Toggle acdebug (attribute cache debug) flag"); #endif /* @@ -713,6 +713,9 @@ nfs_getattrcache(struct vnode *vp, struc if ((time_second - np->n_attrstamp) >= timeo) { nfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); +#ifdef NFS_ACDEBUG + mtx_unlock(&Giant); /* nfs_printf() */ +#endif KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); return (ENOENT); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:44:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEE93106566B; Tue, 19 Apr 2011 07:44:12 +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 BD0D38FC13; Tue, 19 Apr 2011 07:44: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 p3J7iCMB098670; Tue, 19 Apr 2011 07:44:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7iC8d098668; Tue, 19 Apr 2011 07:44:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104190744.p3J7iC8d098668@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 19 Apr 2011 07:44: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: r220816 - stable/8/sys/dev/ipmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 07:44:12 -0000 Author: ru Date: Tue Apr 19 07:44:12 2011 New Revision: 220816 URL: http://svn.freebsd.org/changeset/base/220816 Log: MFC r220614: Fixed firmware revision decoding: - the major is 7-bit binary encoded - the minor is BCD encoded PR: kern/151586 Modified: stable/8/sys/dev/ipmi/ipmi.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ipmi/ipmi.c ============================================================================== --- stable/8/sys/dev/ipmi/ipmi.c Tue Apr 19 07:36:53 2011 (r220815) +++ stable/8/sys/dev/ipmi/ipmi.c Tue Apr 19 07:44:12 2011 (r220816) @@ -713,10 +713,10 @@ ipmi_startup(void *arg) return; } - device_printf(dev, "IPMI device rev. %d, firmware rev. %d.%d, " + device_printf(dev, "IPMI device rev. %d, firmware rev. %d.%d%d, " "version %d.%d\n", req->ir_reply[1] & 0x0f, - req->ir_reply[2] & 0x0f, req->ir_reply[4], + req->ir_reply[2] & 0x7f, req->ir_reply[3] >> 4, req->ir_reply[3] & 0x0f, req->ir_reply[4] & 0x0f, req->ir_reply[4] >> 4); ipmi_free_request(req); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:45:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B974106566B; Tue, 19 Apr 2011 07:45:55 +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 487148FC16; Tue, 19 Apr 2011 07:45: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 p3J7jtGI098741; Tue, 19 Apr 2011 07:45:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7jt8S098737; Tue, 19 Apr 2011 07:45:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190745.p3J7jt8S098737@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 07:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220817 - in stable/7/sys: netinet 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: Tue, 19 Apr 2011 07:45:55 -0000 Author: bz Date: Tue Apr 19 07:45:54 2011 New Revision: 220817 URL: http://svn.freebsd.org/changeset/base/220817 Log: MFC r219579: Merge the two (logically) identical implementations for local port selections from in_pcbbind_setup() and in6_pcbsetport() in a single in_pcb_lport(). Modified: stable/7/sys/netinet/in_pcb.c stable/7/sys/netinet/in_pcb.h stable/7/sys/netinet6/in6_src.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:45:54 2011 (r220817) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_ipsec.h" +#include "opt_inet.h" #include "opt_inet6.h" #include "opt_mac.h" @@ -73,6 +74,7 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include +#include #endif /* INET6 */ @@ -257,6 +259,124 @@ in_pcbbind(struct inpcb *inp, struct soc return (0); } +#if defined(INET) || defined(INET6) +int +in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp, + struct ucred *cred, int wild) +{ + struct inpcbinfo *pcbinfo; + struct inpcb *tmpinp; + unsigned short *lastport; + int count, dorandom, error; + u_short aux, first, last, lport; +#ifdef INET + struct in_addr laddr; +#endif + + pcbinfo = inp->inp_pcbinfo; + + /* + * Because no actual state changes occur here, a global write lock on + * the pcbinfo isn't required. + */ + INP_INFO_LOCK_ASSERT(pcbinfo); + INP_LOCK_ASSERT(inp); + + if (inp->inp_flags & INP_HIGHPORT) { + first = ipport_hifirstauto; /* sysctl */ + last = ipport_hilastauto; + lastport = &pcbinfo->ipi_lasthi; + } else if (inp->inp_flags & INP_LOWPORT) { + error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); + if (error) + return (error); + first = ipport_lowfirstauto; /* 1023 */ + last = ipport_lowlastauto; /* 600 */ + lastport = &pcbinfo->ipi_lastlow; + } else { + first = ipport_firstauto; /* sysctl */ + last = ipport_lastauto; + lastport = &pcbinfo->ipi_lastport; + } + /* + * For UDP, use random port allocation as long as the user + * allows it. For TCP (and as of yet unknown) connections, + * use random port allocation only if the user allows it AND + * ipport_tick() allows it. + */ + if (ipport_randomized && + (!ipport_stoprandom || pcbinfo == &udbinfo)) + dorandom = 1; + else + dorandom = 0; + /* + * It makes no sense to do random port allocation if + * we have the only port available. + */ + if (first == last) + dorandom = 0; + /* Make sure to not include UDP packets in the count. */ + if (pcbinfo != &udbinfo) + ipport_tcpallocs++; + /* + * Instead of having two loops further down counting up or down + * make sure that first is always <= last and go with only one + * code path implementing all logic. + */ + if (first > last) { + aux = first; + first = last; + last = aux; + } + +#ifdef INET + /* Make the compiler happy. */ + laddr.s_addr = 0; + if ((inp->inp_vflag & INP_IPV4) != 0) { + KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", + __func__, inp)); + laddr = *laddrp; + } +#endif + lport = *lportp; + + if (dorandom) + *lastport = first + (arc4random() % (last - first)); + + count = last - first; + + do { + if (count-- < 0) /* completely used? */ + return (EADDRNOTAVAIL); + ++*lastport; + if (*lastport < first || *lastport > last) + *lastport = first; + lport = htons(*lastport); + +#ifdef INET6 + if ((inp->inp_vflag & INP_IPV6) != 0) + tmpinp = in6_pcblookup_local(pcbinfo, + &inp->in6p_laddr, lport, wild, cred); +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + tmpinp = in_pcblookup_local(pcbinfo, laddr, + lport, wild, cred); +#endif + } while (tmpinp != NULL); + +#ifdef INET + if ((inp->inp_vflag & INP_IPV4) != 0) + laddrp->s_addr = laddr.s_addr; +#endif + *lportp = lport; + + return (0); +} +#endif /* INET || INET6 */ + /* * Set up a bind operation on a PCB, performing port allocation * as required, but do not actually modify the PCB. Callers can @@ -271,14 +391,12 @@ in_pcbbind_setup(struct inpcb *inp, stru u_short *lportp, struct ucred *cred) { struct socket *so = inp->inp_socket; - unsigned short *lastport; struct sockaddr_in *sin; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct in_addr laddr; u_short lport = 0; int wild = 0, reuseport = (so->so_options & SO_REUSEPORT); int error; - int dorandom; /* * Because no actual state changes occur here, a global write lock on @@ -397,91 +515,9 @@ in_pcbbind_setup(struct inpcb *inp, stru if (*lportp != 0) lport = *lportp; if (lport == 0) { - u_short first, last; - int count; - - if (inp->inp_flags & INP_HIGHPORT) { - first = ipport_hifirstauto; /* sysctl */ - last = ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, - PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = ipport_lowfirstauto; /* 1023 */ - last = ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = ipport_firstauto; /* sysctl */ - last = ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (ipport_randomized && - (!ipport_stoprandom || pcbinfo == &udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &udbinfo) - ipport_tcpallocs++; - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - * - * We split the two cases (up and down) so that the direction - * is not being tested on each round of the loop. - */ - if (first > last) { - /* - * counting down - */ - if (dorandom) - *lastport = first - - (arc4random() % (first - last)); - count = first - last; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - --*lastport; - if (*lastport > first || *lastport < last) - *lastport = first; - lport = htons(*lastport); - } while (in_pcblookup_local(pcbinfo, laddr, lport, - wild, cred)); - } else { - /* - * counting up - */ - if (dorandom) - *lastport = first + - (arc4random() % (last - first)); - count = last - first; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in_pcblookup_local(pcbinfo, laddr, lport, - wild, cred)); - } + error = in_pcb_lport(inp, &laddr, &lport, cred, wild); + if (error != 0) + return (error); } *laddrp = laddr.s_addr; *lportp = lport; Modified: stable/7/sys/netinet/in_pcb.h ============================================================================== --- stable/7/sys/netinet/in_pcb.h Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet/in_pcb.h Tue Apr 19 07:45:54 2011 (r220817) @@ -496,6 +496,8 @@ extern struct callout ipport_tick_callou void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, + struct ucred *, int); int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); Modified: stable/7/sys/netinet6/in6_src.c ============================================================================== --- stable/7/sys/netinet6/in6_src.c Tue Apr 19 07:44:12 2011 (r220816) +++ stable/7/sys/netinet6/in6_src.c Tue Apr 19 07:45:54 2011 (r220817) @@ -783,9 +783,11 @@ int in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred) { struct socket *so = inp->inp_socket; - u_int16_t lport = 0, first, last, *lastport; - int count, error, wild = 0, dorandom; + u_int16_t lport = 0; + int error, wild = 0; +#ifdef INVARIANTS struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; +#endif INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); @@ -801,71 +803,9 @@ in6_pcbsetport(struct in6_addr *laddr, s inp->inp_flags |= INP_ANONPORT; - if (inp->inp_flags & INP_HIGHPORT) { - first = ipport_hifirstauto; /* sysctl */ - last = ipport_hilastauto; - lastport = &pcbinfo->ipi_lasthi; - } else if (inp->inp_flags & INP_LOWPORT) { - error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, 0); - if (error) - return error; - first = ipport_lowfirstauto; /* 1023 */ - last = ipport_lowlastauto; /* 600 */ - lastport = &pcbinfo->ipi_lastlow; - } else { - first = ipport_firstauto; /* sysctl */ - last = ipport_lastauto; - lastport = &pcbinfo->ipi_lastport; - } - - /* - * For UDP, use random port allocation as long as the user - * allows it. For TCP (and as of yet unknown) connections, - * use random port allocation only if the user allows it AND - * ipport_tick() allows it. - */ - if (ipport_randomized && - (!ipport_stoprandom || pcbinfo == &udbinfo)) - dorandom = 1; - else - dorandom = 0; - /* - * It makes no sense to do random port allocation if - * we have the only port available. - */ - if (first == last) - dorandom = 0; - /* Make sure to not include UDP packets in the count. */ - if (pcbinfo != &udbinfo) - ipport_tcpallocs++; - - /* - * Instead of having two loops further down counting up or down - * make sure that first is always <= last and go with only one - * code path implementing all logic. - */ - if (first > last) { - u_int16_t aux; - - aux = first; - first = last; - last = aux; - } - - if (dorandom) - *lastport = first + (arc4random() % (last - first)); - - count = last - first; - - do { - if (count-- < 0) /* completely used? */ - return (EADDRNOTAVAIL); - ++*lastport; - if (*lastport < first || *lastport > last) - *lastport = first; - lport = htons(*lastport); - } while (in6_pcblookup_local(pcbinfo, &inp->in6p_laddr, - lport, wild, cred)); + error = in_pcb_lport(inp, NULL, &lport, cred, wild); + if (error != 0) + return (error); inp->inp_lport = lport; if (in_pcbinshash(inp) != 0) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:49:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CBCA106566B; Tue, 19 Apr 2011 07:49:58 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5E28FC08; Tue, 19 Apr 2011 07:49: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 p3J7nwTj098882; Tue, 19 Apr 2011 07:49:58 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7nw2T098880; Tue, 19 Apr 2011 07:49:58 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201104190749.p3J7nw2T098880@svn.freebsd.org> From: Andreas Tobler Date: Tue, 19 Apr 2011 07:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220818 - 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: Tue, 19 Apr 2011 07:49:58 -0000 Author: andreast Date: Tue Apr 19 07:49:58 2011 New Revision: 220818 URL: http://svn.freebsd.org/changeset/base/220818 Log: Add leading zeros when printing the physical memory chunks on __powerpc64__. Approved by: nwhitehorn (mentor) Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Tue Apr 19 07:45:54 2011 (r220817) +++ head/sys/powerpc/aim/machdep.c Tue Apr 19 07:49:58 2011 (r220818) @@ -202,7 +202,7 @@ cpu_startup(void *dummy) phys_avail[indx + 1] - phys_avail[indx]; #ifdef __powerpc64__ - printf("0x%16lx - 0x%16lx, %ld bytes (%ld pages)\n", + printf("0x%016lx - 0x%016lx, %ld bytes (%ld pages)\n", #else printf("0x%08x - 0x%08x, %d bytes (%ld pages)\n", #endif From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:53:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 074AE106564A; Tue, 19 Apr 2011 07:53:05 +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 E97788FC08; Tue, 19 Apr 2011 07:53: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 p3J7r40C099014; Tue, 19 Apr 2011 07:53:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7r4aE099012; Tue, 19 Apr 2011 07:53:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190753.p3J7r4aE099012@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 07:53: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: r220819 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 07:53:05 -0000 Author: bz Date: Tue Apr 19 07:53:04 2011 New Revision: 220819 URL: http://svn.freebsd.org/changeset/base/220819 Log: MFC r219779: Properly check for an IPv4 socket after r219579. In some cases as udp6_connect() without an earlier bind(2) to an address, v4-mapped sockets allowed and a non mapped destination address, we can end up here with both v4 and v6 indicated: inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO) In that case however laddrp is NULL as the IPv6 path does not pass in a copy currently. Reported by: Pawel Worach (pawel.worach gmail.com) Tested by: Pawel Worach (pawel.worach gmail.com) Modified: stable/8/sys/netinet/in_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in_pcb.c ============================================================================== --- stable/8/sys/netinet/in_pcb.c Tue Apr 19 07:49:58 2011 (r220818) +++ stable/8/sys/netinet/in_pcb.c Tue Apr 19 07:53:04 2011 (r220819) @@ -346,7 +346,7 @@ in_pcb_lport(struct inpcb *inp, struct i #ifdef INET /* Make the compiler happy. */ laddr.s_addr = 0; - if ((inp->inp_vflag & INP_IPV4) != 0) { + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; @@ -382,7 +382,7 @@ in_pcb_lport(struct inpcb *inp, struct i } while (tmpinp != NULL); #ifdef INET - if ((inp->inp_vflag & INP_IPV4) != 0) + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) laddrp->s_addr = laddr.s_addr; #endif *lportp = lport; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 07:54:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 984AB106566C; Tue, 19 Apr 2011 07:54:21 +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 865148FC08; Tue, 19 Apr 2011 07:54: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 p3J7sLkp099078; Tue, 19 Apr 2011 07:54:21 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J7sL5q099076; Tue, 19 Apr 2011 07:54:21 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104190754.p3J7sL5q099076@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 19 Apr 2011 07:54: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: r220820 - stable/8/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 07:54:21 -0000 Author: ru Date: Tue Apr 19 07:54:21 2011 New Revision: 220820 URL: http://svn.freebsd.org/changeset/base/220820 Log: MFC r220596: Show client's access cache statistics. Modified: stable/8/usr.bin/nfsstat/nfsstat.c Directory Properties: stable/8/usr.bin/nfsstat/ (props changed) Modified: stable/8/usr.bin/nfsstat/nfsstat.c ============================================================================== --- stable/8/usr.bin/nfsstat/nfsstat.c Tue Apr 19 07:53:04 2011 (r220819) +++ stable/8/usr.bin/nfsstat/nfsstat.c Tue Apr 19 07:54:21 2011 (r220820) @@ -325,14 +325,15 @@ intpr(int clientOnly, int serverOnly) nfsstats.write_bios); printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); - printf(" %9.9s %9.9s\n", "DirE Hits", "Misses"); + printf(" %9.9s %9.9s %9.9s %9.9s\n", "DirE Hits", "Misses", "Accs Hits", "Misses"); printf("%9d %9d %9d %9d", nfsstats.biocache_readlinks-nfsstats.readlink_bios, nfsstats.readlink_bios, nfsstats.biocache_readdirs-nfsstats.readdir_bios, nfsstats.readdir_bios); - printf(" %9d %9d\n", - nfsstats.direofcache_hits, nfsstats.direofcache_misses); + printf(" %9d %9d %9d %9d\n", + nfsstats.direofcache_hits, nfsstats.direofcache_misses, + nfsstats.accesscache_hits, nfsstats.accesscache_misses); } if (serverOnly && !nfsrvstatsp) { printf("Server not present!\n"); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:00:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6521106567B; Tue, 19 Apr 2011 08:00:44 +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 C48508FC12; Tue, 19 Apr 2011 08:00: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 p3J80io2099306; Tue, 19 Apr 2011 08:00:44 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J80iP6099304; Tue, 19 Apr 2011 08:00:44 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190800.p3J80iP6099304@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220821 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:00:44 -0000 Author: bz Date: Tue Apr 19 08:00:44 2011 New Revision: 220821 URL: http://svn.freebsd.org/changeset/base/220821 Log: MFC r219779: Properly check for an IPv4 socket after r219579. In some cases as udp6_connect() without an earlier bind(2) to an address, v4-mapped sockets allowed and a non mapped destination address, we can end up here with both v4 and v6 indicated: inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO) In that case however laddrp is NULL as the IPv6 path does not pass in a copy currently. Reported by: Pawel Worach (pawel.worach gmail.com) Tested by: Pawel Worach (pawel.worach gmail.com) Modified: stable/7/sys/netinet/in_pcb.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Tue Apr 19 07:54:21 2011 (r220820) +++ stable/7/sys/netinet/in_pcb.c Tue Apr 19 08:00:44 2011 (r220821) @@ -332,7 +332,7 @@ in_pcb_lport(struct inpcb *inp, struct i #ifdef INET /* Make the compiler happy. */ laddr.s_addr = 0; - if ((inp->inp_vflag & INP_IPV4) != 0) { + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", __func__, inp)); laddr = *laddrp; @@ -368,7 +368,7 @@ in_pcb_lport(struct inpcb *inp, struct i } while (tmpinp != NULL); #ifdef INET - if ((inp->inp_vflag & INP_IPV4) != 0) + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) laddrp->s_addr = laddr.s_addr; #endif *lportp = lport; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:01:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A02C106566B; Tue, 19 Apr 2011 08:01:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37E528FC12; Tue, 19 Apr 2011 08:01: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 p3J81Ijk099371; Tue, 19 Apr 2011 08:01:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J81Ijx099367; Tue, 19 Apr 2011 08:01:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104190801.p3J81Ijx099367@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 08:01: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: r220822 - in head/sys/dev: ahci mvs siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:01:18 -0000 Author: mav Date: Tue Apr 19 08:01:17 2011 New Revision: 220822 URL: http://svn.freebsd.org/changeset/base/220822 Log: Properly handle memory allocation errors during error recovery. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Apr 19 08:00:44 2011 (r220821) +++ head/sys/dev/ahci/ahci.c Tue Apr 19 08:01:17 2011 (r220822) @@ -2132,7 +2132,6 @@ ahci_issue_recovery(device_t dev) struct ccb_scsiio *csio; int i; - ch->recoverycmd = 1; /* Find some holden command. */ for (i = 0; i < ch->numslots; i++) { if (ch->hold[i]) @@ -2140,8 +2139,20 @@ ahci_issue_recovery(device_t dev) } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate READ LOG command"); - return; /* XXX */ + device_printf(dev, "Unable allocate recovery command\n"); +completeall: + /* We can't do anything -- complete holden commands. */ + for (i = 0; i < ch->numslots; i++) { + if (ch->hold[i] == NULL) + continue; + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL; + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + } + ahci_reset(dev); + return; } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ if (ccb->ccb_h.func_code == XPT_ATA_IO) { @@ -2154,8 +2165,9 @@ ahci_issue_recovery(device_t dev) ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT); if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + device_printf(dev, + "Unable allocate memory for READ LOG command\n"); + goto completeall; } ataio->dxfer_len = 512; bzero(&ataio->cmd, sizeof(ataio->cmd)); @@ -2183,6 +2195,7 @@ ahci_issue_recovery(device_t dev) csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } /* Freeze SIM while doing recovery. */ + ch->recoverycmd = 1; xpt_freeze_simq(ch->sim, 1); ahci_begin_transaction(dev, ccb); } Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Tue Apr 19 08:00:44 2011 (r220821) +++ head/sys/dev/mvs/mvs.c Tue Apr 19 08:01:17 2011 (r220822) @@ -1781,7 +1781,6 @@ mvs_issue_recovery(device_t dev) struct ccb_scsiio *csio; int i; - ch->recoverycmd = 1; /* Find some holden command. */ for (i = 0; i < MVS_MAX_SLOTS; i++) { if (ch->hold[i]) @@ -1789,8 +1788,20 @@ mvs_issue_recovery(device_t dev) } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate READ LOG command"); - return; /* XXX */ + device_printf(dev, "Unable allocate recovery command\n"); +completeall: + /* We can't do anything -- complete holden commands. */ + for (i = 0; i < MVS_MAX_SLOTS; i++) { + if (ch->hold[i] == NULL) + continue; + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL; + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + } + mvs_reset(dev); + return; } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ if (ccb->ccb_h.func_code == XPT_ATA_IO) { @@ -1803,8 +1814,9 @@ mvs_issue_recovery(device_t dev) ataio->data_ptr = malloc(512, M_MVS, M_NOWAIT); if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + device_printf(dev, + "Unable allocate memory for READ LOG command\n"); + goto completeall; } ataio->dxfer_len = 512; bzero(&ataio->cmd, sizeof(ataio->cmd)); @@ -1831,7 +1843,8 @@ mvs_issue_recovery(device_t dev) csio->cdb_io.cdb_bytes[0] = 0x03; csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } - /* Freeze SIM while doing READ LOG EXT. */ + /* Freeze SIM while doing recovery. */ + ch->recoverycmd = 1; xpt_freeze_simq(ch->sim, 1); mvs_begin_transaction(dev, ccb); } Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Tue Apr 19 08:00:44 2011 (r220821) +++ head/sys/dev/siis/siis.c Tue Apr 19 08:01:17 2011 (r220822) @@ -1373,11 +1373,22 @@ siis_issue_recovery(device_t dev) } if (i == SIIS_MAX_SLOTS) return; - ch->recoverycmd = 1; ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate READ LOG command"); - return; /* XXX */ + device_printf(dev, "Unable allocate recovery command\n"); +completeall: + /* We can't do anything -- complete holden commands. */ + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + if (ch->hold[i] == NULL) + continue; + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL; + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + } + siis_reset(dev); + return; } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ if (ccb->ccb_h.func_code == XPT_ATA_IO) { @@ -1390,8 +1401,9 @@ siis_issue_recovery(device_t dev) ataio->data_ptr = malloc(512, M_SIIS, M_NOWAIT); if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + device_printf(dev, + "Unable allocate memory for READ LOG command\n"); + goto completeall; } ataio->dxfer_len = 512; bzero(&ataio->cmd, sizeof(ataio->cmd)); @@ -1418,6 +1430,7 @@ siis_issue_recovery(device_t dev) csio->cdb_io.cdb_bytes[0] = 0x03; csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } + ch->recoverycmd = 1; siis_begin_transaction(dev, ccb); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:17:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E77E1065672; Tue, 19 Apr 2011 08:17:21 +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 E64578FC19; Tue, 19 Apr 2011 08:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3J8HKG0099731; Tue, 19 Apr 2011 08:17:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8HKgS099729; Tue, 19 Apr 2011 08:17:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190817.p3J8HKgS099729@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220823 - stable/8/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: Tue, 19 Apr 2011 08:17:21 -0000 Author: bz Date: Tue Apr 19 08:17:20 2011 New Revision: 220823 URL: http://svn.freebsd.org/changeset/base/220823 Log: MFC r220462: After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP some more. Similar to what we do for TCP check for v4-mapped addresses and then handle them or the normal v6 address case. For either set inp_vflags before calling into the pcb connect function so that we have an unambiguous view in case we need to set the local address or port. Looked at: tuexen (as part of more) Modified: stable/8/sys/netinet6/udp6_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/8/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:01:17 2011 (r220822) +++ stable/8/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:20 2011 (r220823) @@ -909,43 +909,41 @@ udp6_connect(struct socket *so, struct s INP_INFO_WLOCK(&V_udbinfo); INP_WLOCK(inp); - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && - IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { struct sockaddr_in sin; + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) { + error = EINVAL; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; } in6_sin6_2_sin(&sin, sin6); + inp->inp_vflag |= INP_IPV4; + inp->inp_vflag &= ~INP_IPV6; error = prison_remote_ip4(td->td_ucred, &sin.sin_addr); if (error != 0) goto out; error = in_pcbconnect(inp, (struct sockaddr *)&sin, td->td_ucred); - if (error == 0) { - inp->inp_vflag |= INP_IPV4; - inp->inp_vflag &= ~INP_IPV6; + if (error == 0) soisconnected(so); - } goto out; } if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { error = EISCONN; goto out; } + inp->inp_vflag &= ~INP_IPV4; + inp->inp_vflag |= INP_IPV6; error = prison_remote_ip6(td->td_ucred, &sin6->sin6_addr); if (error != 0) goto out; error = in6_pcbconnect(inp, nam, td->td_ucred); - if (error == 0) { - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { - /* should be non mapped addr */ - inp->inp_vflag &= ~INP_IPV4; - inp->inp_vflag |= INP_IPV6; - } + if (error == 0) soisconnected(so); - } out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_udbinfo); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:17:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FBB91065674; Tue, 19 Apr 2011 08:17:37 +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 132D58FC12; Tue, 19 Apr 2011 08:17: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 p3J8Havr099771; Tue, 19 Apr 2011 08:17:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8Ha2V099769; Tue, 19 Apr 2011 08:17:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190817.p3J8Ha2V099769@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220824 - stable/7/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: Tue, 19 Apr 2011 08:17:37 -0000 Author: bz Date: Tue Apr 19 08:17:36 2011 New Revision: 220824 URL: http://svn.freebsd.org/changeset/base/220824 Log: MFC r220462: After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP some more. Similar to what we do for TCP check for v4-mapped addresses and then handle them or the normal v6 address case. For either set inp_vflags before calling into the pcb connect function so that we have an unambiguous view in case we need to set the local address or port. Looked at: tuexen (as part of more) Modified: stable/7/sys/netinet6/udp6_usrreq.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/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:20 2011 (r220823) +++ stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:36 2011 (r220824) @@ -850,43 +850,41 @@ udp6_connect(struct socket *so, struct s INP_INFO_WLOCK(&udbinfo); INP_WLOCK(inp); - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && - IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { struct sockaddr_in sin; + if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) { + error = EINVAL; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; } in6_sin6_2_sin(&sin, sin6); + inp->inp_vflag |= INP_IPV4; + inp->inp_vflag &= ~INP_IPV6; error = prison_remote_ip4(td->td_ucred, &sin.sin_addr); if (error != 0) goto out; error = in_pcbconnect(inp, (struct sockaddr *)&sin, td->td_ucred); - if (error == 0) { - inp->inp_vflag |= INP_IPV4; - inp->inp_vflag &= ~INP_IPV6; + if (error == 0) soisconnected(so); - } goto out; } if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { error = EISCONN; goto out; } + inp->inp_vflag &= ~INP_IPV4; + inp->inp_vflag |= INP_IPV6; error = prison_remote_ip6(td->td_ucred, &sin6->sin6_addr); if (error != 0) goto out; error = in6_pcbconnect(inp, nam, td->td_ucred); - if (error == 0) { - if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { - /* should be non mapped addr */ - inp->inp_vflag &= ~INP_IPV4; - inp->inp_vflag |= INP_IPV6; - } + if (error == 0) soisconnected(so); - } out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&udbinfo); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:29:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B62E1065670; Tue, 19 Apr 2011 08: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 5F3438FC1C; Tue, 19 Apr 2011 08: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 p3J8TS9V000158; Tue, 19 Apr 2011 08: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 p3J8TSDG000156; Tue, 19 Apr 2011 08:29:28 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190829.p3J8TSDG000156@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220825 - stable/8/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: Tue, 19 Apr 2011 08:29:28 -0000 Author: bz Date: Tue Apr 19 08:29:28 2011 New Revision: 220825 URL: http://svn.freebsd.org/changeset/base/220825 Log: MFC r220463: Remove a check in udp6_send() that prevented v4-mapped v6 addresses from working. We store v4 and v6 addresses as a union but for v4-mapped addresses only store the 32bits w/o the ::ffff: word. That failed the check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1 and the IN6_IS_ADDR_V4MAPPED() never worked here. Given we can hardly get here with an unbound local address or invalid inp_vflags remove the check. Reported by: tuexen Reviewed by: tuexen Modified: stable/8/sys/netinet6/udp6_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/8/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:17:36 2011 (r220824) +++ stable/8/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:29:28 2011 (r220825) @@ -1045,18 +1045,6 @@ udp6_send(struct socket *so, int flags, if (hasv4addr) { struct pr_usrreqs *pru; - if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && - !IN6_IS_ADDR_V4MAPPED(&inp->in6p_laddr)) { - /* - * When remote addr is IPv4-mapped address, - * local addr should not be an IPv6 address; - * since you cannot determine how to map IPv6 - * source address to IPv4. - */ - error = EINVAL; - goto out; - } - /* * XXXRW: We release UDP-layer locks before calling * udp_send() in order to avoid recursion. However, @@ -1080,7 +1068,6 @@ udp6_send(struct socket *so, int flags, mac_inpcb_create_mbuf(inp, m); #endif error = udp6_output(inp, m, addr, control, td); -out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_udbinfo); return (error); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:35:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A201065670; Tue, 19 Apr 2011 08:35:07 +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 566018FC14; Tue, 19 Apr 2011 08:35: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 p3J8Z7Ek000386; Tue, 19 Apr 2011 08:35:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8Z787000384; Tue, 19 Apr 2011 08:35:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190835.p3J8Z787000384@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:35: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: r220826 - stable/7/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: Tue, 19 Apr 2011 08:35:07 -0000 Author: bz Date: Tue Apr 19 08:35:07 2011 New Revision: 220826 URL: http://svn.freebsd.org/changeset/base/220826 Log: MFC r220463: Remove a check in udp6_send() that prevented v4-mapped v6 addresses from working. We store v4 and v6 addresses as a union but for v4-mapped addresses only store the 32bits w/o the ::ffff: word. That failed the check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1 and the IN6_IS_ADDR_V4MAPPED() never worked here. Given we can hardly get here with an unbound local address or invalid inp_vflags remove the check. Reported by: tuexen Reviewed by: tuexen Modified: stable/7/sys/netinet6/udp6_usrreq.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/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:29:28 2011 (r220825) +++ stable/7/sys/netinet6/udp6_usrreq.c Tue Apr 19 08:35:07 2011 (r220826) @@ -986,18 +986,6 @@ udp6_send(struct socket *so, int flags, if (hasv4addr) { struct pr_usrreqs *pru; - if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && - !IN6_IS_ADDR_V4MAPPED(&inp->in6p_laddr)) { - /* - * When remote addr is IPv4-mapped address, - * local addr should not be an IPv6 address; - * since you cannot determine how to map IPv6 - * source address to IPv4. - */ - error = EINVAL; - goto out; - } - /* * XXXRW: We release UDP-layer locks before calling * udp_send() in order to avoid recursion. However, @@ -1021,7 +1009,6 @@ udp6_send(struct socket *so, int flags, mac_create_mbuf_from_inpcb(inp, m); #endif error = udp6_output(inp, m, addr, control, td); -out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&udbinfo); return (error); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:56:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C4CB106566C; Tue, 19 Apr 2011 08:56:10 +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 EE7CF8FC16; Tue, 19 Apr 2011 08:56: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 p3J8u9o4000901; Tue, 19 Apr 2011 08:56:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8u9i4000899; Tue, 19 Apr 2011 08:56:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190856.p3J8u9i4000899@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220827 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:56:10 -0000 Author: bz Date: Tue Apr 19 08:56:09 2011 New Revision: 220827 URL: http://svn.freebsd.org/changeset/base/220827 Log: MFC r220619: The mbuf_frag_size always was and is file local and not queried from base user space tools via kvm. Mark it static. Modified: stable/7/sys/netinet/ip_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_output.c ============================================================================== --- stable/7/sys/netinet/ip_output.c Tue Apr 19 08:35:07 2011 (r220826) +++ stable/7/sys/netinet/ip_output.c Tue Apr 19 08:56:09 2011 (r220827) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); u_short ip_id; #ifdef MBUF_STRESS_TEST -int mbuf_frag_size = 0; +static int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); #endif From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 08:56:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A94E61065674; Tue, 19 Apr 2011 08:56:26 +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 974D68FC1B; Tue, 19 Apr 2011 08:56: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 p3J8uQNT000944; Tue, 19 Apr 2011 08:56:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3J8uQWw000942; Tue, 19 Apr 2011 08:56:26 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104190856.p3J8uQWw000942@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 19 Apr 2011 08:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220828 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 08:56:26 -0000 Author: bz Date: Tue Apr 19 08:56:26 2011 New Revision: 220828 URL: http://svn.freebsd.org/changeset/base/220828 Log: MFC r220619: The mbuf_frag_size always was and is file local and not queried from base user space tools via kvm. Mark it static. Modified: stable/8/sys/netinet/ip_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Tue Apr 19 08:56:09 2011 (r220827) +++ stable/8/sys/netinet/ip_output.c Tue Apr 19 08:56:26 2011 (r220828) @@ -93,7 +93,7 @@ __FBSDID("$FreeBSD$"); VNET_DEFINE(u_short, ip_id); #ifdef MBUF_STRESS_TEST -int mbuf_frag_size = 0; +static int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); #endif From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 10:51:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CC20106564A; Tue, 19 Apr 2011 10:51:20 +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 2B0C78FC16; Tue, 19 Apr 2011 10:51: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 p3JApKxH005245; Tue, 19 Apr 2011 10:51:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JApK98005241; Tue, 19 Apr 2011 10:51:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191051.p3JApK98005241@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 10:51: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: r220829 - in head/sys/dev: ahci mvs siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 10:51:20 -0000 Author: mav Date: Tue Apr 19 10:51:19 2011 New Revision: 220829 URL: http://svn.freebsd.org/changeset/base/220829 Log: According to specification. device should respond to COMRESET with COMINIT in no more then 10ms. If we detected no device presence within that time, there is no reason to wait longer. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Apr 19 08:56:26 2011 (r220828) +++ head/sys/dev/ahci/ahci.c Tue Apr 19 10:51:19 2011 (r220829) @@ -2580,11 +2580,13 @@ static int ahci_sata_connect(struct ahci_channel *ch) { u_int32_t status; - int timeout; + int timeout, found = 0; /* Wait up to 100ms for "connect well" */ for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); + if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) + found = 1; 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)) @@ -2596,12 +2598,15 @@ ahci_sata_connect(struct ahci_channel *c } return (0); } + if (found == 0 && timeout >= 100) + break; DELAY(100); } - if (timeout >= 1000) { + if (timeout >= 1000 || !found) { if (bootverbose) { - device_printf(ch->dev, "SATA connect timeout status=%08x\n", - status); + device_printf(ch->dev, + "SATA connect timeout time=%dus status=%08x\n", + timeout * 100, status); } return (0); } Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Tue Apr 19 08:56:26 2011 (r220828) +++ head/sys/dev/mvs/mvs.c Tue Apr 19 10:51:19 2011 (r220829) @@ -2102,11 +2102,13 @@ static int mvs_sata_connect(struct mvs_channel *ch) { u_int32_t status; - int timeout; + int timeout, found = 0; /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 100 ; timeout++) { + for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, SATA_SS); + if ((status & SATA_SS_DET_MASK) != SATA_SS_DET_NO_DEVICE) + found = 1; if (((status & SATA_SS_DET_MASK) == SATA_SS_DET_PHY_ONLINE) && ((status & SATA_SS_SPD_MASK) != SATA_SS_SPD_NO_SPEED) && ((status & SATA_SS_IPM_MASK) == SATA_SS_IPM_ACTIVE)) @@ -2118,18 +2120,21 @@ mvs_sata_connect(struct mvs_channel *ch) } return (0); } - DELAY(1000); + if (found == 0 && timeout >= 100) + break; + DELAY(100); } - if (timeout >= 100) { + if (timeout >= 1000 || !found) { if (bootverbose) { - device_printf(ch->dev, "SATA connect timeout status=%08x\n", - status); + device_printf(ch->dev, + "SATA connect timeout time=%dus status=%08x\n", + timeout * 100, status); } return (0); } if (bootverbose) { - device_printf(ch->dev, "SATA connect time=%dms status=%08x\n", - timeout, status); + device_printf(ch->dev, "SATA connect time=%dus status=%08x\n", + timeout * 100, status); } /* Clear SATA error register */ ATA_OUTL(ch->r_mem, SATA_SE, 0xffffffff); @@ -2155,11 +2160,10 @@ mvs_sata_phy_reset(device_t dev) ATA_OUTL(ch->r_mem, SATA_SC, SATA_SC_DET_RESET | val | SATA_SC_IPM_DIS_PARTIAL | SATA_SC_IPM_DIS_SLUMBER); - DELAY(5000); + DELAY(1000); ATA_OUTL(ch->r_mem, SATA_SC, SATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (SATA_SC_IPM_DIS_PARTIAL | SATA_SC_IPM_DIS_SLUMBER))); - DELAY(5000); if (!mvs_sata_connect(ch)) { if (ch->pm_level > 0) ATA_OUTL(ch->r_mem, SATA_SC, SATA_SC_DET_DISABLE); Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Tue Apr 19 08:56:26 2011 (r220828) +++ head/sys/dev/siis/siis.c Tue Apr 19 10:51:19 2011 (r220829) @@ -1540,10 +1540,10 @@ siis_devreset(device_t dev) ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_DEV_RESET); while (((val = ATA_INL(ch->r_mem, SIIS_P_STS)) & SIIS_P_CTL_DEV_RESET) != 0) { - DELAY(1000); - if (timeout++ > 100) { - device_printf(dev, "device reset stuck (timeout %dms) " - "status = %08x\n", timeout, val); + DELAY(100); + if (timeout++ > 1000) { + device_printf(dev, "device reset stuck " + "(timeout 100ms) status = %08x\n", val); return (EBUSY); } } @@ -1731,27 +1731,39 @@ static int siis_sata_connect(struct siis_channel *ch) { u_int32_t status; - int timeout; + int timeout, found = 0; /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 100 ; timeout++) { + for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, SIIS_P_SSTS); + if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) + found = 1; 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)) break; - DELAY(1000); + if ((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_OFFLINE) { + if (bootverbose) { + device_printf(ch->dev, "SATA offline status=%08x\n", + status); + } + return (0); + } + if (found == 0 && timeout >= 100) + break; + DELAY(100); } - if (timeout >= 100) { + if (timeout >= 1000 || !found) { if (bootverbose) { - device_printf(ch->dev, "SATA connect timeout status=%08x\n", - status); + device_printf(ch->dev, + "SATA connect timeout time=%dus status=%08x\n", + timeout * 100, status); } return (0); } if (bootverbose) { - device_printf(ch->dev, "SATA connect time=%dms status=%08x\n", - timeout, status); + device_printf(ch->dev, "SATA connect time=%dus status=%08x\n", + timeout * 100, status); } /* Clear SATA error register */ ATA_OUTL(ch->r_mem, SIIS_P_SERR, 0xffffffff); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 10:57:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5EDB106564A; Tue, 19 Apr 2011 10:57:40 +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 9431C8FC0A; Tue, 19 Apr 2011 10:57:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3JAveZf005418; Tue, 19 Apr 2011 10:57:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JAveNb005411; Tue, 19 Apr 2011 10:57:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191057.p3JAveNb005411@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 10:57: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: r220830 - in head/sys/dev: ahci mvs siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 10:57:40 -0000 Author: mav Date: Tue Apr 19 10:57:40 2011 New Revision: 220830 URL: http://svn.freebsd.org/changeset/base/220830 Log: Fix some English grammar. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/mvs/mvs.c head/sys/dev/mvs/mvs.h head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/ahci/ahci.c Tue Apr 19 10:57:40 2011 (r220830) @@ -2132,16 +2132,16 @@ ahci_issue_recovery(device_t dev) struct ccb_scsiio *csio; int i; - /* Find some holden command. */ + /* Find some held command. */ for (i = 0; i < ch->numslots; i++) { if (ch->hold[i]) break; } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate recovery command\n"); + device_printf(dev, "Unable to allocate recovery command\n"); completeall: - /* We can't do anything -- complete holden commands. */ + /* We can't do anything -- complete held commands. */ for (i = 0; i < ch->numslots; i++) { if (ch->hold[i] == NULL) continue; @@ -2166,7 +2166,7 @@ completeall: if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); device_printf(dev, - "Unable allocate memory for READ LOG command\n"); + "Unable to allocate memory for READ LOG command\n"); goto completeall; } ataio->dxfer_len = 512; Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/ahci/ahci.h Tue Apr 19 10:57:40 2011 (r220830) @@ -408,7 +408,7 @@ struct ahci_channel { 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 numhslots; /* Number of held slots */ int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/mvs/mvs.c Tue Apr 19 10:57:40 2011 (r220830) @@ -1781,16 +1781,16 @@ mvs_issue_recovery(device_t dev) struct ccb_scsiio *csio; int i; - /* Find some holden command. */ + /* Find some held command. */ for (i = 0; i < MVS_MAX_SLOTS; i++) { if (ch->hold[i]) break; } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate recovery command\n"); + device_printf(dev, "Unable to allocate recovery command\n"); completeall: - /* We can't do anything -- complete holden commands. */ + /* We can't do anything -- complete held commands. */ for (i = 0; i < MVS_MAX_SLOTS; i++) { if (ch->hold[i] == NULL) continue; @@ -1815,7 +1815,7 @@ completeall: if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); device_printf(dev, - "Unable allocate memory for READ LOG command\n"); + "Unable to allocate memory for READ LOG command\n"); goto completeall; } ataio->dxfer_len = 512; Modified: head/sys/dev/mvs/mvs.h ============================================================================== --- head/sys/dev/mvs/mvs.h Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/mvs/mvs.h Tue Apr 19 10:57:40 2011 (r220830) @@ -538,7 +538,7 @@ struct mvs_channel { struct mvs_slot slot[MVS_MAX_SLOTS]; union ccb *hold[MVS_MAX_SLOTS]; - int holdtag[MVS_MAX_SLOTS]; /* Tags used for holden commands. */ + int holdtag[MVS_MAX_SLOTS]; /* Tags used for held commands. */ struct mtx mtx; /* state lock */ int devices; /* What is present */ int pm_present; /* PM presence reported */ @@ -556,7 +556,7 @@ struct mvs_channel { int numdslots; /* Number of DMA slots */ int numtslots; /* Number of NCQ slots */ int numtslotspd[16];/* Number of NCQ slots per dev */ - int numhslots; /* Number of holden slots */ + int numhslots; /* Number of held slots */ int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/siis/siis.c Tue Apr 19 10:57:40 2011 (r220830) @@ -1366,7 +1366,7 @@ siis_issue_recovery(device_t dev) struct ccb_scsiio *csio; int i; - /* Find some holden command. */ + /* Find some held command. */ for (i = 0; i < SIIS_MAX_SLOTS; i++) { if (ch->hold[i]) break; @@ -1375,9 +1375,9 @@ siis_issue_recovery(device_t dev) return; ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable allocate recovery command\n"); + device_printf(dev, "Unable to allocate recovery command\n"); completeall: - /* We can't do anything -- complete holden commands. */ + /* We can't do anything -- complete held commands. */ for (i = 0; i < SIIS_MAX_SLOTS; i++) { if (ch->hold[i] == NULL) continue; @@ -1402,7 +1402,7 @@ completeall: if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); device_printf(dev, - "Unable allocate memory for READ LOG command\n"); + "Unable to allocate memory for READ LOG command\n"); goto completeall; } ataio->dxfer_len = 512; @@ -1601,7 +1601,7 @@ siis_reset(device_t dev) /* XXX; Commands in loading state. */ siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT); } - /* Finish all holden commands as-is. */ + /* Finish all held commands as-is. */ for (i = 0; i < SIIS_MAX_SLOTS; i++) { if (!ch->hold[i]) continue; Modified: head/sys/dev/siis/siis.h ============================================================================== --- head/sys/dev/siis/siis.h Tue Apr 19 10:51:19 2011 (r220829) +++ head/sys/dev/siis/siis.h Tue Apr 19 10:57:40 2011 (r220830) @@ -387,7 +387,7 @@ struct siis_channel { uint32_t toslots; /* Slots in timeout */ int numrslots; /* Number of running slots */ int numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */ - int numhslots; /* Number of holden slots */ + int numhslots; /* Number of held slots */ int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int recovery; /* Some slots are in error */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 11:29:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F7E1065678; Tue, 19 Apr 2011 11:29:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60928FC15; Tue, 19 Apr 2011 11:29: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 p3JBT9ir006183; Tue, 19 Apr 2011 11:29:09 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JBT9Sb006181; Tue, 19 Apr 2011 11:29:09 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104191129.p3JBT9Sb006181@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 19 Apr 2011 11:29: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: r220831 - 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: Tue, 19 Apr 2011 11:29:09 -0000 Author: ae Date: Tue Apr 19 11:29:09 2011 New Revision: 220831 URL: http://svn.freebsd.org/changeset/base/220831 Log: ipdn_bound_var() functions is designed to bound a variable between specified minimum and maximum. In case when specified default value is out of bounds it does not work as expected and does not limit variable. Check that default value is in range and limit it if needed. Also bump max_hash_size value to 65536 to correspond with manual page. PR: kern/152887 MFC after: 2 weeks Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 10:57:40 2011 (r220830) +++ head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 11:29:09 2011 (r220831) @@ -108,6 +108,10 @@ ipdn_bound_var(int *v, int dflt, int lo, { int oldv = *v; const char *op = NULL; + if (dflt < lo) + dflt = lo; + if (dflt > hi) + dflt = hi; if (oldv < lo) { *v = dflt; op = "Bump"; @@ -2128,7 +2132,7 @@ ip_dn_init(void) dn_cfg.red_max_pkt_size = 1500; /* default max packet size */ /* hash tables */ - dn_cfg.max_hash_size = 1024; /* max in the hash tables */ + dn_cfg.max_hash_size = 65536; /* max in the hash tables */ dn_cfg.hash_size = 64; /* default hash size */ /* create hash tables for schedulers and flowsets. From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 11:33:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 647A51065670; Tue, 19 Apr 2011 11:33:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 393018FC0C; Tue, 19 Apr 2011 11:33:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3JBXe9F006320; Tue, 19 Apr 2011 11:33:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JBXeUA006318; Tue, 19 Apr 2011 11:33:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104191133.p3JBXeUA006318@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 19 Apr 2011 11:33: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: r220832 - 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: Tue, 19 Apr 2011 11:33:40 -0000 Author: ae Date: Tue Apr 19 11:33:39 2011 New Revision: 220832 URL: http://svn.freebsd.org/changeset/base/220832 Log: Add sysctl handlers for net.inet.ip.dummynet.hash_size, .pipe_byte_limit and .pipe_slot_limit oids to prevent to set incorrect values. MFC after: 2 weeks Modified: head/sys/netinet/ipfw/ip_dn_io.c Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Tue Apr 19 11:29:09 2011 (r220831) +++ head/sys/netinet/ipfw/ip_dn_io.c Tue Apr 19 11:33:39 2011 (r220832) @@ -108,14 +108,58 @@ SYSCTL_NODE(_net_inet_ip, OID_AUTO, dumm //#define DC(x) (&(VNET_NAME(_base_dn_cfg).x)) #define DC(x) (&(dn_cfg.x)) /* parameters */ -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, - CTLFLAG_RW, DC(hash_size), 0, "Default hash table size"); -SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, - CTLFLAG_RW, DC(slot_limit), 0, - "Upper limit in slots for pipe queue."); -SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, - CTLFLAG_RW, DC(byte_limit), 0, - "Upper limit in bytes for pipe queue."); + +static int +sysctl_hash_size(SYSCTL_HANDLER_ARGS) +{ + int error, value; + + value = dn_cfg.hash_size; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (value < 16 || value > 65536) + return (EINVAL); + dn_cfg.hash_size = value; + return (0); +} + +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, hash_size, + CTLTYPE_INT | CTLFLAG_RW, 0, 0, sysctl_hash_size, + "I", "Default hash table size"); + +static int +sysctl_limits(SYSCTL_HANDLER_ARGS) +{ + int error; + long value; + + if (arg2 != 0) + value = dn_cfg.slot_limit; + else + value = dn_cfg.byte_limit; + error = sysctl_handle_long(oidp, &value, 0, req); + + if (error != 0 || req->newptr == NULL) + return (error); + if (arg2 != 0) { + if (value < 1) + return (EINVAL); + dn_cfg.slot_limit = value; + } else { + if (value < 1500) + return (EINVAL); + dn_cfg.byte_limit = value; + } + return (0); +} + +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, + CTLTYPE_LONG | CTLFLAG_RW, 0, 1, sysctl_limits, + "L", "Upper limit in slots for pipe queue."); +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, + CTLTYPE_LONG | CTLFLAG_RW, 0, 0, sysctl_limits, + "L", "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 12:40:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35C9A106564A; Tue, 19 Apr 2011 12:40:31 +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 060878FC08; Tue, 19 Apr 2011 12:40:31 +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 9425946B42; Tue, 19 Apr 2011 08:40:30 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 322BE8A01B; Tue, 19 Apr 2011 08:40:30 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Tue, 19 Apr 2011 08:40:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <4DAC8060.2070002@FreeBSD.org> <92422863-8655-4FDE-A1E9-5EE1F46DA5BC@bsdimp.com> In-Reply-To: <92422863-8655-4FDE-A1E9-5EE1F46DA5BC@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104190840.29535.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 19 Apr 2011 08:40:30 -0400 (EDT) Cc: Doug Barton , Pawel Jakub Dawidek , Roman Divacky , Dimitry Andric , src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 12:40:31 -0000 On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: > > On Apr 18, 2011, at 12:18 PM, Doug Barton wrote: > > > On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: > >> On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: > >>> > >>> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > >>> > >>>> please mark this in src/UPDATING, maybe bump freebsd_version too? > >>> > >>> Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. > >>> > >>> Every freebsd_version bump forces rebuilding all modules and such and is a pita. > >> > >> I agree that this is a PITA, but there also should be a way to force > >> module load even on version bump. This is PITA especially for > >> developers. > > > > .... who make up a tiny percentage of the FreeBSD user community. Seriously? We're going to whine because version bumps cause a little extra compile time? > > The problem usually manifests itself when I got to debug a new problem, load a driver and find I have to rebuild everything else to use it, which forces an extra reboot on the machine in question. Sometimes this can be quite disruptive to other things that machine is doing. But that is only true if your source tree doesn't match your installed world. If the new driver is standalone and you build it as a module, it will use the headers from /sys and will work fine. If the new driver is part of the source tree, you do not have to upgrade the entire world, just build a kernel + moduleset, install that to /boot/foo and reboot into the foo kernel. Yes, that can require a reboot, but lots of kernel development requires reboots. > In this case, there was a new kernel thing just after, so it turned out OK. But let's not gratuitously bump the version since the granularity we have already allows the ports to make good choices on when to leave something in or out. Except that that directly contradicts our previously established policy that these version bumps are cheap and that we should do more of them (this came up a few years ago when we changed the policy so that the new "stable" branch after a release starts at N + 500 (e.g. 802500) rather than N + 100 to give more room for version bumps on current). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 13:19:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5DB7106566B; Tue, 19 Apr 2011 13:19:13 +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 952F78FC0A; Tue, 19 Apr 2011 13:19: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 p3JDJD0v008721; Tue, 19 Apr 2011 13:19:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JDJD68008719; Tue, 19 Apr 2011 13:19:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104191319.p3JDJD68008719@svn.freebsd.org> From: Rick Macklem Date: Tue, 19 Apr 2011 13:19: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: r220833 - head/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 13:19:13 -0000 Author: rmacklem Date: Tue Apr 19 13:19:13 2011 New Revision: 220833 URL: http://svn.freebsd.org/changeset/base/220833 Log: Revert r220809 since it put the entry in the wrong place in the list and didn't change the date. Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 11:33:39 2011 (r220832) +++ head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 13:19:13 2011 (r220833) @@ -201,8 +201,7 @@ just do a .Xr nfsiod 8 , .Xr nfsrevoke 8 , .Xr nfsuserd 8 , -.Xr rpcbind 8 , -.Xr stablerestart 5 +.Xr rpcbind 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 13:54:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DBAD1065670; Tue, 19 Apr 2011 13:54:51 +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 7CDCB8FC16; Tue, 19 Apr 2011 13: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 p3JDspnD009773; Tue, 19 Apr 2011 13:54:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JDspwJ009770; Tue, 19 Apr 2011 13:54:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201104191354.p3JDspwJ009770@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 19 Apr 2011 13: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: r220834 - head/usr.sbin/bsdinstall/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: Tue, 19 Apr 2011 13:54:51 -0000 Author: nwhitehorn Date: Tue Apr 19 13:54:51 2011 New Revision: 220834 URL: http://svn.freebsd.org/changeset/base/220834 Log: Fix mirror selection, which was broken by stderr redirection. Reported by: Garrett Cooper Modified: head/usr.sbin/bsdinstall/scripts/auto head/usr.sbin/bsdinstall/scripts/jail Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Tue Apr 19 13:19:13 2011 (r220833) +++ head/usr.sbin/bsdinstall/scripts/auto Tue Apr 19 13:54:51 2011 (r220834) @@ -83,7 +83,7 @@ fi if [ -n "$FETCH_DISTRIBUTIONS" ]; then exec 3>&1 - BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- test $MIRROR_BUTTON -eq 0 || error Modified: head/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- head/usr.sbin/bsdinstall/scripts/jail Tue Apr 19 13:19:13 2011 (r220833) +++ head/usr.sbin/bsdinstall/scripts/jail Tue Apr 19 13:54:51 2011 (r220834) @@ -49,7 +49,7 @@ test ! -d $BSDINSTALL_DISTDIR && mkdir - if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then exec 3>&1 - BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- test $MIRROR_BUTTON -eq 0 || error From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 14:28:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0541106566B; Tue, 19 Apr 2011 14:28:25 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id C41AC8FC1B; Tue, 19 Apr 2011 14:28:24 +0000 (UTC) Received: by wyf23 with SMTP id 23so5940790wyf.13 for ; Tue, 19 Apr 2011 07:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=5VbRzvwAqc4wDCyk/STFdPQVsebEdp7b2Vi6k8QQLHg=; b=QRsMCH+rK099Ap1wA97YT8qCzQkt6KGTfikVsnuBEYPrslCL0kvp6iUotwIbcKUdKJ bf/3Hhbt4Vw+/UaYxWovDo8uWqAvXVk6xX3GXlVWsZBRrMTXHSZ1PwgwdYGyZkem8SFG HXThPIL7/+BN6tdI/Se9/UArJGkSXua4rE9i8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=mwE3GUow10BGeha+TrTGwq1fev5IhtQUQopIqXcKC6svBXbRHf8cM82bt8A7BD8qhS sWIoZdx+pFapYKSHewrN38qFZnsvFelcRIxIRh7tM4YuYMsnV8e9eTCRx0DMEgr2SrMF TQyG5xJ9rNlZtXzstlQSkfqYFdoHbGAz6yQcM= MIME-Version: 1.0 Received: by 10.216.245.6 with SMTP id n6mr1354655wer.40.1303223303658; Tue, 19 Apr 2011 07:28:23 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.9.67 with HTTP; Tue, 19 Apr 2011 07:28:23 -0700 (PDT) In-Reply-To: <201104190840.29535.jhb@freebsd.org> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <4DAC8060.2070002@FreeBSD.org> <92422863-8655-4FDE-A1E9-5EE1F46DA5BC@bsdimp.com> <201104190840.29535.jhb@freebsd.org> Date: Tue, 19 Apr 2011 07:28:23 -0700 X-Google-Sender-Auth: MaX_zQOF9H4Sf3jFBoWugWiTXK8 Message-ID: From: mdf@FreeBSD.org To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 14:28:25 -0000 Trimming since I have a mostly-unrelated question... On Tue, Apr 19, 2011 at 5:40 AM, John Baldwin wrote: > On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: >> In this case, there was a new kernel thing just after, so it turned out OK. >> But let's not gratuitously bump the version since the granularity we have >> already allows the ports to make good choices on when to leave something in or >> out. > > Except that that directly contradicts our previously established policy that > these version bumps are cheap and that we should do more of them (this came up > a few years ago when we changed the policy so that the new "stable" branch > after a release starts at N + 500 (e.g. 802500) rather than N + 100 to give > more room for version bumps on current). I thought I remembered reading (within the past 2 years) that __FreeBSD_version should not be incremented more than once a day, since there was a limit of 100 before the version minor number was affected. Did I get the polarity backwards and that was the old policy? Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 15:03:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 487501065674; Tue, 19 Apr 2011 15:03:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36B0E8FC15; Tue, 19 Apr 2011 15:03: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 p3JF3C4Y011368; Tue, 19 Apr 2011 15:03:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JF3Cck011366; Tue, 19 Apr 2011 15:03:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104191503.p3JF3Cck011366@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 19 Apr 2011 15:03: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: r220835 - head/sbin/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: Tue, 19 Apr 2011 15:03:12 -0000 Author: glebius Date: Tue Apr 19 15:03:12 2011 New Revision: 220835 URL: http://svn.freebsd.org/changeset/base/220835 Log: Rewrite NAT configuration parser, so that memory allocation size is calculated dynamically. PR: kern/143653 Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Tue Apr 19 13:54:51 2011 (r220834) +++ head/sbin/ipfw/nat.c Tue Apr 19 15:03:12 2011 (r220835) @@ -281,13 +281,6 @@ StrToAddrAndPortRange (const char* str, /* End of stuff taken from natd.c. */ -#define INC_ARGCV() do { \ - (*_av)++; \ - (*_ac)--; \ - av = *_av; \ - ac = *_ac; \ -} while(0) - /* * The next 3 functions add support for the addr, port and proto redirect and * their logic is loosely based on SetupAddressRedirect(), SetupPortRedirect() @@ -318,121 +311,107 @@ StrToAddrAndPortRange (const char* str, */ static int -setup_redir_addr(char *spool_buf, unsigned int len, - int *_ac, char ***_av) +estimate_redir_addr(int *ac, char ***av) +{ + size_t space = sizeof(struct cfg_redir); + char *sep; + + if ((sep = strtok(**av, ",")) != NULL) { + space += sizeof(struct cfg_spool); + while ((sep = strtok(NULL, ",")) != NULL) + space += sizeof(struct cfg_spool); + } + + return (space); +} + +static int +setup_redir_addr(char *buf, int *ac, char ***av) { - char **av, *sep; /* Token separator. */ - /* Temporary buffer used to hold server pool ip's. */ - char tmp_spool_buf[NAT_BUF_LEN]; - int ac, space, lsnat; struct cfg_redir *r; - struct cfg_spool *tmp; + char *sep; + size_t space; - av = *_av; - ac = *_ac; - space = 0; - lsnat = 0; - if (len >= SOF_REDIR) { - r = (struct cfg_redir *)spool_buf; - /* Skip cfg_redir at beginning of buf. */ - spool_buf = &spool_buf[SOF_REDIR]; - space = SOF_REDIR; - len -= SOF_REDIR; - } else - goto nospace; + r = (struct cfg_redir *)buf; r->mode = REDIR_ADDR; - /* Extract local address. */ - if (ac == 0) - errx(EX_DATAERR, "redirect_addr: missing local address"); - sep = strchr(*av, ','); - if (sep) { /* LSNAT redirection syntax. */ - r->laddr.s_addr = INADDR_NONE; - /* Preserve av, copy spool servers to tmp_spool_buf. */ - strncpy(tmp_spool_buf, *av, strlen(*av)+1); - lsnat = 1; - } else - StrToAddr(*av, &r->laddr); - INC_ARGCV(); + /* Skip cfg_redir at beginning of buf. */ + buf = &buf[sizeof(struct cfg_redir)]; + space = sizeof(struct cfg_redir); - /* Extract public address. */ - if (ac == 0) - errx(EX_DATAERR, "redirect_addr: missing public address"); - StrToAddr(*av, &r->paddr); - INC_ARGCV(); + /* Extract local address. */ + if ((sep = strtok(**av, ",")) != NULL) { + struct cfg_spool *spool; - /* Setup LSNAT server pool. */ - if (sep) { - sep = strtok(tmp_spool_buf, ","); + /* Setup LSNAT server pool. */ + r->laddr.s_addr = INADDR_NONE; while (sep != NULL) { - tmp = (struct cfg_spool *)spool_buf; - if (len < SOF_SPOOL) - goto nospace; - len -= SOF_SPOOL; - space += SOF_SPOOL; - StrToAddr(sep, &tmp->addr); - tmp->port = ~0; + spool = (struct cfg_spool *)buf; + space += sizeof(struct cfg_spool); + StrToAddr(sep, &spool->addr); + spool->port = ~0; r->spool_cnt++; /* Point to the next possible cfg_spool. */ - spool_buf = &spool_buf[SOF_SPOOL]; + buf = &buf[sizeof(struct cfg_spool)]; sep = strtok(NULL, ","); } + } else + StrToAddr(**av, &r->laddr); + (*av)++; (*ac)--; + + /* Extract public address. */ + StrToAddr(**av, &r->paddr); + (*av)++; (*ac)--; + + return (space); +} + +static int +estimate_redir_port(int *ac, char ***av) +{ + size_t space = sizeof(struct cfg_redir); + char *sep; + + if ((sep = strtok(**av, ",")) != NULL) { + space += sizeof(struct cfg_spool); + while ((sep = strtok(NULL, ",")) != NULL) + space += sizeof(struct cfg_spool); } - return(space); -nospace: - errx(EX_DATAERR, "redirect_addr: buf is too small\n"); + + return (space); } static int -setup_redir_port(char *spool_buf, unsigned int len, - int *_ac, char ***_av) +setup_redir_port(char *buf, int *ac, char ***av) { - char **av, *sep, *protoName; - char tmp_spool_buf[NAT_BUF_LEN]; - int ac, space, lsnat; struct cfg_redir *r; - struct cfg_spool *tmp; + char *sep, *protoName, *lsnat = NULL; + size_t space; u_short numLocalPorts; port_range portRange; - av = *_av; - ac = *_ac; - space = 0; - lsnat = 0; numLocalPorts = 0; - if (len >= SOF_REDIR) { - r = (struct cfg_redir *)spool_buf; - /* Skip cfg_redir at beginning of buf. */ - spool_buf = &spool_buf[SOF_REDIR]; - space = SOF_REDIR; - len -= SOF_REDIR; - } else - goto nospace; + r = (struct cfg_redir *)buf; r->mode = REDIR_PORT; + /* Skip cfg_redir at beginning of buf. */ + buf = &buf[sizeof(struct cfg_redir)]; + space = sizeof(struct cfg_redir); + /* * Extract protocol. */ - if (ac == 0) - errx (EX_DATAERR, "redirect_port: missing protocol"); - r->proto = StrToProto(*av); - protoName = *av; - INC_ARGCV(); + r->proto = StrToProto(**av); + protoName = **av; + (*av)++; (*ac)--; /* * Extract local address. */ - if (ac == 0) - errx (EX_DATAERR, "redirect_port: missing local address"); - - sep = strchr(*av, ','); - /* LSNAT redirection syntax. */ - if (sep) { + if ((sep = strchr(**av, ',')) != NULL) { r->laddr.s_addr = INADDR_NONE; r->lport = ~0; numLocalPorts = 1; - /* Preserve av, copy spool servers to tmp_spool_buf. */ - strncpy(tmp_spool_buf, *av, strlen(*av)+1); - lsnat = 1; + lsnat = **av; } else { /* * The sctp nat does not allow the port numbers to be mapped to @@ -440,40 +419,36 @@ setup_redir_port(char *spool_buf, unsign * in the target port field. */ if (r->proto == IPPROTO_SCTP) { - if (strchr (*av, ':')) + if (strchr(**av, ':')) errx(EX_DATAERR, "redirect_port:" - "port numbers do not change in sctp, so do not " - "specify them as part of the target"); + "port numbers do not change in sctp, so do " + "not specify them as part of the target"); else - StrToAddr(*av, &r->laddr); + StrToAddr(**av, &r->laddr); } else { - if (StrToAddrAndPortRange (*av, &r->laddr, protoName, - &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + if (StrToAddrAndPortRange(**av, &r->laddr, protoName, + &portRange) != 0) + errx(EX_DATAERR, "redirect_port: " "invalid local port range"); r->lport = GETLOPORT(portRange); numLocalPorts = GETNUMPORTS(portRange); } } - INC_ARGCV(); + (*av)++; (*ac)--; /* * Extract public port and optionally address. */ - if (ac == 0) - errx (EX_DATAERR, "redirect_port: missing public port"); - - sep = strchr (*av, ':'); - if (sep) { - if (StrToAddrAndPortRange (*av, &r->paddr, protoName, + if ((sep = strchr(**av, ':')) != NULL) { + if (StrToAddrAndPortRange(**av, &r->paddr, protoName, &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port: " "invalid public port range"); } else { r->paddr.s_addr = INADDR_ANY; - if (StrToPortRange (*av, protoName, &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + if (StrToPortRange(**av, protoName, &portRange) != 0) + errx(EX_DATAERR, "redirect_port: " "invalid public port range"); } @@ -483,7 +458,7 @@ setup_redir_port(char *spool_buf, unsign r->lport = r->pport; } r->pport_cnt = GETNUMPORTS(portRange); - INC_ARGCV(); + (*av)++; (*ac)--; /* * Extract remote address and optionally port. @@ -492,19 +467,18 @@ setup_redir_port(char *spool_buf, unsign * NB: isalpha(**av) => we've to check that next parameter is really an * option for this redirect entry, else stop here processing arg[cv]. */ - if (ac != 0 && !isalpha(**av)) { - sep = strchr (*av, ':'); - if (sep) { - if (StrToAddrAndPortRange (*av, &r->raddr, protoName, + if (*ac != 0 && !isalpha(***av)) { + if ((sep = strchr(**av, ':')) != NULL) { + if (StrToAddrAndPortRange(**av, &r->raddr, protoName, &portRange) != 0) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port: " "invalid remote port range"); } else { SETLOPORT(portRange, 0); SETNUMPORTS(portRange, 1); - StrToAddr (*av, &r->raddr); + StrToAddr(**av, &r->raddr); } - INC_ARGCV(); + (*av)++; (*ac)--; } else { SETLOPORT(portRange, 0); SETNUMPORTS(portRange, 1); @@ -517,7 +491,7 @@ setup_redir_port(char *spool_buf, unsign * Make sure port ranges match up, then add the redirect ports. */ if (numLocalPorts != r->pport_cnt) - errx(EX_DATAERR, "redirect_port:" + errx(EX_DATAERR, "redirect_port: " "port ranges must be equal in size"); /* Remote port range is allowed to be '0' which means all ports. */ @@ -526,20 +500,18 @@ setup_redir_port(char *spool_buf, unsign errx(EX_DATAERR, "redirect_port: remote port must" "be 0 or equal to local port range in size"); - /* - * Setup LSNAT server pool. - */ - if (lsnat) { - sep = strtok(tmp_spool_buf, ","); + /* Setup LSNAT server pool. */ + if (lsnat != NULL) { + struct cfg_spool *spool; + + sep = strtok(lsnat, ","); while (sep != NULL) { - tmp = (struct cfg_spool *)spool_buf; - if (len < SOF_SPOOL) - goto nospace; - len -= SOF_SPOOL; - space += SOF_SPOOL; + spool = (struct cfg_spool *)buf; + space += sizeof(struct cfg_spool); /* - * The sctp nat does not allow the port numbers to be mapped to new port numbers - * Therefore, no ports are to be specified in the target port field + * The sctp nat does not allow the port numbers to + * be mapped to new port numbers. Therefore, no ports + * are to be specified in the target port field. */ if (r->proto == IPPROTO_SCTP) { if (strchr (sep, ':')) { @@ -548,11 +520,11 @@ setup_redir_port(char *spool_buf, unsign "sctp, so do not specify them as " "part of the target"); } else { - StrToAddr(sep, &tmp->addr); - tmp->port = r->pport; + StrToAddr(sep, &spool->addr); + spool->port = r->pport; } } else { - if (StrToAddrAndPortRange(sep, &tmp->addr, + if (StrToAddrAndPortRange(sep, &spool->addr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port:" "invalid local port range"); @@ -560,88 +532,73 @@ setup_redir_port(char *spool_buf, unsign errx(EX_DATAERR, "redirect_port: " "local port must be single in " "this context"); - tmp->port = GETLOPORT(portRange); + spool->port = GETLOPORT(portRange); } r->spool_cnt++; /* Point to the next possible cfg_spool. */ - spool_buf = &spool_buf[SOF_SPOOL]; + buf = &buf[sizeof(struct cfg_spool)]; sep = strtok(NULL, ","); } } + return (space); -nospace: - errx(EX_DATAERR, "redirect_port: buf is too small\n"); } static int -setup_redir_proto(char *spool_buf, unsigned int len, - int *_ac, char ***_av) +setup_redir_proto(char *buf, int *ac, char ***av) { - char **av; - int ac, space; - struct protoent *protoent; struct cfg_redir *r; + struct protoent *protoent; + size_t space; - av = *_av; - ac = *_ac; - if (len >= SOF_REDIR) { - r = (struct cfg_redir *)spool_buf; - /* Skip cfg_redir at beginning of buf. */ - spool_buf = &spool_buf[SOF_REDIR]; - space = SOF_REDIR; - len -= SOF_REDIR; - } else - goto nospace; + r = (struct cfg_redir *)buf; r->mode = REDIR_PROTO; + /* Skip cfg_redir at beginning of buf. */ + buf = &buf[sizeof(struct cfg_redir)]; + space = sizeof(struct cfg_redir); + /* * Extract protocol. */ - if (ac == 0) - errx(EX_DATAERR, "redirect_proto: missing protocol"); - - protoent = getprotobyname(*av); + protoent = getprotobyname(**av); if (protoent == NULL) - errx(EX_DATAERR, "redirect_proto: unknown protocol %s", *av); + errx(EX_DATAERR, "redirect_proto: unknown protocol %s", **av); else r->proto = protoent->p_proto; - INC_ARGCV(); + (*av)++; (*ac)--; /* * Extract local address. */ - if (ac == 0) - errx(EX_DATAERR, "redirect_proto: missing local address"); - else - StrToAddr(*av, &r->laddr); + StrToAddr(**av, &r->laddr); - INC_ARGCV(); + (*av)++; (*ac)--; /* * Extract optional public address. */ - if (ac == 0) { + if (*ac == 0) { r->paddr.s_addr = INADDR_ANY; r->raddr.s_addr = INADDR_ANY; } else { /* see above in setup_redir_port() */ - if (!isalpha(**av)) { - StrToAddr(*av, &r->paddr); - INC_ARGCV(); + if (!isalpha(***av)) { + StrToAddr(**av, &r->paddr); + (*av)++; (*ac)--; /* * Extract optional remote address. */ /* see above in setup_redir_port() */ - if (ac!=0 && !isalpha(**av)) { - StrToAddr(*av, &r->raddr); - INC_ARGCV(); + if (*ac != 0 && !isalpha(***av)) { + StrToAddr(**av, &r->raddr); + (*av)++; (*ac)--; } } } + return (space); -nospace: - errx(EX_DATAERR, "redirect_proto: buf is too small\n"); } static void @@ -763,27 +720,76 @@ void ipfw_config_nat(int ac, char **av) { struct cfg_nat *n; /* Nat instance configuration. */ - int i, len, off, tok; - char *id, buf[NAT_BUF_LEN]; /* Buffer for serialized data. */ - - len = NAT_BUF_LEN; - /* Offset in buf: save space for n at the beginning. */ - off = sizeof(*n); - memset(buf, 0, sizeof(buf)); - n = (struct cfg_nat *)buf; + int i, off, tok, ac1; + char *id, *buf, **av1; + size_t len; av++; ac--; /* Nat id. */ if (ac && isdigit(**av)) { id = *av; - i = atoi(*av); ac--; av++; - n->id = i; } else errx(EX_DATAERR, "missing nat id"); if (ac == 0) errx(EX_DATAERR, "missing option"); + len = sizeof(struct cfg_nat); + ac1 = ac; + av1 = av; + while (ac1 > 0) { + tok = match_token(nat_params, *av1); + ac1--; av1++; + switch (tok) { + case TOK_IP: + case TOK_IF: + ac1--; av1++; + break; + case TOK_ALOG: + case TOK_DENY_INC: + case TOK_SAME_PORTS: + case TOK_UNREG_ONLY: + case TOK_RESET_ADDR: + case TOK_ALIAS_REV: + case TOK_PROXY_ONLY: + break; + case TOK_REDIR_ADDR: + if (ac1 < 2) + errx(EX_DATAERR, "redirect_addr: " + "not enough arguments"); + len += estimate_redir_addr(&ac1, &av1); + av1 += 2; ac1 -= 2; + break; + case TOK_REDIR_PORT: + if (ac1 < 3) + errx(EX_DATAERR, "redirect_port: " + "not enough arguments"); + av1++; ac1--; + len += estimate_redir_port(&ac1, &av1); + av1 += 2; ac1 -= 2; + break; + case TOK_REDIR_PROTO: + if (ac1 < 2) + errx(EX_DATAERR, "redirect_proto: " + "not enough arguments"); + len += sizeof(struct cfg_redir); + av1 += 2; ac1 -= 2; + break; + default: + errx(EX_DATAERR, "unrecognised option ``%s''", av1[-1]); + } + } + + if ((buf = malloc(len)) == NULL) + errx(EX_OSERR, "malloc failed"); + + /* Offset in buf: save space for n at the beginning. */ + off = sizeof(*n); + memset(buf, 0, len); + n = (struct cfg_nat *)buf; + i = atoi(id); + n->id = i; + while (ac > 0) { tok = match_token(nat_params, *av); ac--; av++; @@ -832,21 +838,18 @@ ipfw_config_nat(int ac, char **av) case TOK_REDIR_PROTO: switch (tok) { case TOK_REDIR_ADDR: - i = setup_redir_addr(&buf[off], len, &ac, &av); + i = setup_redir_addr(&buf[off], &ac, &av); break; case TOK_REDIR_PORT: - i = setup_redir_port(&buf[off], len, &ac, &av); + i = setup_redir_port(&buf[off], &ac, &av); break; case TOK_REDIR_PROTO: - i = setup_redir_proto(&buf[off], len, &ac, &av); + i = setup_redir_proto(&buf[off], &ac, &av); break; } n->redir_cnt++; off += i; - len -= i; break; - default: - errx(EX_DATAERR, "unrecognised option ``%s''", av[-1]); } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 15:05:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CCA0106566C; Tue, 19 Apr 2011 15:05:13 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C53F8FC08; Tue, 19 Apr 2011 15:05: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 p3JF5DxC011445; Tue, 19 Apr 2011 15:05:13 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JF5DAX011443; Tue, 19 Apr 2011 15:05:13 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104191505.p3JF5DAX011443@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Apr 2011 15:05: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: r220836 - head/sys/arm/xscale/i8134x X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 15:05:13 -0000 Author: pluknet Date: Tue Apr 19 15:05:12 2011 New Revision: 220836 URL: http://svn.freebsd.org/changeset/base/220836 Log: Call init_param1() much earlier, so that msgbufsize is non-zero when we want to map and use the msgbuf. Reviewed by: cognet MFC after: 1 week Modified: head/sys/arm/xscale/i8134x/crb_machdep.c Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Tue Apr 19 15:03:12 2011 (r220835) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Tue Apr 19 15:05:12 2011 (r220836) @@ -196,6 +196,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0x00200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -389,8 +392,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = 0; phys_avail[i] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 15:06:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60222106566B; Tue, 19 Apr 2011 15:06:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EE5D8FC0C; Tue, 19 Apr 2011 15:06: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 p3JF6Yj0011513; Tue, 19 Apr 2011 15:06:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JF6YFJ011509; Tue, 19 Apr 2011 15:06:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104191506.p3JF6YFJ011509@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 19 Apr 2011 15:06: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: r220837 - in 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: Tue, 19 Apr 2011 15:06:34 -0000 Author: glebius Date: Tue Apr 19 15:06:33 2011 New Revision: 220837 URL: http://svn.freebsd.org/changeset/base/220837 Log: - Rewrite functions that copyin/out NAT configuration, so that they calculate required memory size dynamically. - Fix races on chain re-lock. - Introduce new field to ip_fw_chain - generation count. Now utilized only in the NAT configuration, but can be utilized wider in ipfw. - Get rid of NAT_BUF_LEN in ip_fw.h PR: kern/143653 Modified: head/sys/netinet/ip_fw.h head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_private.h Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Tue Apr 19 15:05:12 2011 (r220836) +++ head/sys/netinet/ip_fw.h Tue Apr 19 15:06:33 2011 (r220837) @@ -383,8 +383,6 @@ struct cfg_redir { }; #endif -#define NAT_BUF_LEN 1024 - #ifdef IPFW_INTERNAL /* Nat configuration data struct. */ struct cfg_nat { Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Tue Apr 19 15:05:12 2011 (r220836) +++ head/sys/netinet/ipfw/ip_fw_nat.c Tue Apr 19 15:06:33 2011 (r220837) @@ -138,7 +138,7 @@ del_redir_spool_cfg(struct cfg_nat *n, s } } -static int +static void add_redir_spool_cfg(char *buf, struct cfg_nat *ptr) { struct cfg_redir *r, *ser_r; @@ -199,7 +199,6 @@ add_redir_spool_cfg(char *buf, struct cf /* And finally hook this redir entry. */ LIST_INSERT_HEAD(&ptr->redir_chain, r, _next); } - return (1); } static int @@ -344,20 +343,28 @@ lookup_nat(struct nat_list *l, int nat_i static int ipfw_nat_cfg(struct sockopt *sopt) { - struct cfg_nat *ptr, *ser_n; + struct cfg_nat *cfg, *ptr; char *buf; struct ip_fw_chain *chain = &V_layer3_chain; + int gencnt, len, error = 0; - buf = malloc(NAT_BUF_LEN, M_IPFW, M_WAITOK | M_ZERO); - sooptcopyin(sopt, buf, NAT_BUF_LEN, sizeof(struct cfg_nat)); - ser_n = (struct cfg_nat *)buf; + len = sopt->sopt_valsize; + buf = malloc(len, M_TEMP, M_WAITOK | M_ZERO); + if ((error = sooptcopyin(sopt, buf, len, sizeof(struct cfg_nat))) != 0) + goto out; + + cfg = (struct cfg_nat *)buf; + if (cfg->id < 0) { + error = EINVAL; + goto out; + } - /* check valid parameter ser_n->id > 0 ? */ /* * Find/create nat rule. */ IPFW_WLOCK(chain); - ptr = lookup_nat(&chain->nat, ser_n->id); + gencnt = chain->gencnt; + ptr = lookup_nat(&chain->nat, cfg->id); if (ptr == NULL) { IPFW_WUNLOCK(chain); /* New rule: allocate and init new instance. */ @@ -365,27 +372,27 @@ ipfw_nat_cfg(struct sockopt *sopt) ptr->lib = LibAliasInit(NULL); LIST_INIT(&ptr->redir_chain); } else { - /* Entry already present: temporarly unhook it. */ + /* Entry already present: temporarily unhook it. */ LIST_REMOVE(ptr, _next); - flush_nat_ptrs(chain, ser_n->id); + flush_nat_ptrs(chain, cfg->id); IPFW_WUNLOCK(chain); } /* * Basic nat configuration. */ - ptr->id = ser_n->id; + ptr->id = cfg->id; /* * XXX - what if this rule doesn't nat any ip and just * redirect? * do we set aliasaddress to 0.0.0.0? */ - ptr->ip = ser_n->ip; - ptr->redir_cnt = ser_n->redir_cnt; - ptr->mode = ser_n->mode; - LibAliasSetMode(ptr->lib, ser_n->mode, ser_n->mode); + ptr->ip = cfg->ip; + ptr->redir_cnt = cfg->redir_cnt; + ptr->mode = cfg->mode; + LibAliasSetMode(ptr->lib, cfg->mode, cfg->mode); LibAliasSetAddress(ptr->lib, ptr->ip); - memcpy(ptr->if_name, ser_n->if_name, IF_NAMESIZE); + memcpy(ptr->if_name, cfg->if_name, IF_NAMESIZE); /* * Redir and LSNAT configuration. @@ -394,15 +401,19 @@ ipfw_nat_cfg(struct sockopt *sopt) del_redir_spool_cfg(ptr, &ptr->redir_chain); /* Add new entries. */ add_redir_spool_cfg(&buf[(sizeof(struct cfg_nat))], ptr); - free(buf, M_IPFW); + IPFW_WLOCK(chain); - /* - * XXXGL race here: another ipfw_nat_cfg() may already inserted - * entry with the same ser_n->id. - */ + /* Extra check to avoid race with another ipfw_nat_cfg() */ + if (gencnt != chain->gencnt && + ((cfg = lookup_nat(&chain->nat, ptr->id)) != NULL)) + LIST_REMOVE(cfg, _next); LIST_INSERT_HEAD(&chain->nat, ptr, _next); + chain->gencnt++; IPFW_WUNLOCK(chain); - return (0); + +out: + free(buf, M_TEMP); + return (error); } static int @@ -432,52 +443,61 @@ ipfw_nat_del(struct sockopt *sopt) static int ipfw_nat_get_cfg(struct sockopt *sopt) { - uint8_t *data; + struct ip_fw_chain *chain = &V_layer3_chain; struct cfg_nat *n; struct cfg_redir *r; struct cfg_spool *s; - int nat_cnt, off; - struct ip_fw_chain *chain; - int err = ENOSPC; + char *data; + int gencnt, nat_cnt, len, error; - chain = &V_layer3_chain; nat_cnt = 0; - off = sizeof(nat_cnt); + len = sizeof(nat_cnt); - data = malloc(NAT_BUF_LEN, M_IPFW, M_WAITOK | M_ZERO); IPFW_RLOCK(chain); - /* Serialize all the data. */ +retry: + gencnt = chain->gencnt; + /* Estimate memory amount */ LIST_FOREACH(n, &chain->nat, _next) { nat_cnt++; - if (off + SOF_NAT >= NAT_BUF_LEN) - goto nospace; - bcopy(n, &data[off], SOF_NAT); - off += SOF_NAT; + len += sizeof(struct cfg_nat); + LIST_FOREACH(r, &n->redir_chain, _next) { + len += sizeof(struct cfg_redir); + LIST_FOREACH(s, &r->spool_chain, _next) + len += sizeof(struct cfg_spool); + } + } + IPFW_RUNLOCK(chain); + + data = malloc(len, M_TEMP, M_WAITOK | M_ZERO); + bcopy(&nat_cnt, data, sizeof(nat_cnt)); + + nat_cnt = 0; + len = sizeof(nat_cnt); + + IPFW_RLOCK(chain); + if (gencnt != chain->gencnt) { + free(data, M_TEMP); + goto retry; + } + /* Serialize all the data. */ + LIST_FOREACH(n, &chain->nat, _next) { + bcopy(n, &data[len], sizeof(struct cfg_nat)); + len += sizeof(struct cfg_nat); LIST_FOREACH(r, &n->redir_chain, _next) { - if (off + SOF_REDIR >= NAT_BUF_LEN) - goto nospace; - bcopy(r, &data[off], SOF_REDIR); - off += SOF_REDIR; + bcopy(r, &data[len], sizeof(struct cfg_redir)); + len += sizeof(struct cfg_redir); LIST_FOREACH(s, &r->spool_chain, _next) { - if (off + SOF_SPOOL >= NAT_BUF_LEN) - goto nospace; - bcopy(s, &data[off], SOF_SPOOL); - off += SOF_SPOOL; + bcopy(s, &data[len], sizeof(struct cfg_spool)); + len += sizeof(struct cfg_spool); } } } - err = 0; /* all good */ -nospace: IPFW_RUNLOCK(chain); - if (err == 0) { - bcopy(&nat_cnt, data, sizeof(nat_cnt)); - sooptcopyout(sopt, data, NAT_BUF_LEN); - } else { - printf("serialized data buffer not big enough:" - "please increase NAT_BUF_LEN\n"); - } - free(data, M_IPFW); - return (err); + + error = sooptcopyout(sopt, data, len); + free(data, M_TEMP); + + return (error); } static int Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Tue Apr 19 15:05:12 2011 (r220836) +++ head/sys/netinet/ipfw/ip_fw_private.h Tue Apr 19 15:06:33 2011 (r220837) @@ -225,6 +225,7 @@ struct ip_fw_chain { struct rwlock uh_lock; /* lock for upper half */ #endif uint32_t id; /* ruleset id */ + uint32_t gencnt; /* generation count */ }; struct sockopt; /* used by tcp_var.h */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 15:30:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A45D1065670; Tue, 19 Apr 2011 15:30:59 +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 D23148FC12; Tue, 19 Apr 2011 15:30:58 +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 6F56046B55; Tue, 19 Apr 2011 11:30:58 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0D7648A01B; Tue, 19 Apr 2011 11:30:58 -0400 (EDT) From: John Baldwin To: mdf@freebsd.org Date: Tue, 19 Apr 2011 11:29:30 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <201104190840.29535.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104191129.30602.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 19 Apr 2011 11:30:58 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 15:30:59 -0000 On Tuesday, April 19, 2011 10:28:23 am mdf@freebsd.org wrote: > Trimming since I have a mostly-unrelated question... > > On Tue, Apr 19, 2011 at 5:40 AM, John Baldwin wrote: > > On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: > >> In this case, there was a new kernel thing just after, so it turned out OK. > >> But let's not gratuitously bump the version since the granularity we have > >> already allows the ports to make good choices on when to leave something in or > >> out. > > > > Except that that directly contradicts our previously established policy that > > these version bumps are cheap and that we should do more of them (this came up > > a few years ago when we changed the policy so that the new "stable" branch > > after a release starts at N + 500 (e.g. 802500) rather than N + 100 to give > > more room for version bumps on current). > > I thought I remembered reading (within the past 2 years) that > __FreeBSD_version should not be incremented more than once a day, > since there was a limit of 100 before the version minor number was > affected. Did I get the polarity backwards and that was the old > policy? Well, I would avoid more than once a day still, but the 100 limit is now 500 in 8.0 and later (we had more than 100 bumps during 8.0-current which resulted in a discussion where we chose to raise the limit to 500 rather than discourage bumps in current). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:10:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9638F1065676; Tue, 19 Apr 2011 16:10:08 +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 855878FC17; Tue, 19 Apr 2011 16:10: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 p3JGA8IX013133; Tue, 19 Apr 2011 16:10:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGA8t3013131; Tue, 19 Apr 2011 16:10:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191610.p3JGA8t3013131@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220838 - 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: Tue, 19 Apr 2011 16:10:08 -0000 Author: mav Date: Tue Apr 19 16:10:08 2011 New Revision: 220838 URL: http://svn.freebsd.org/changeset/base/220838 Log: MFC r214989: When requesting sense data for SIM not doing it automatically (such as ATAPI or USB), request only as much data as requested by consumer. On the way back -- report how much sense data we have actually received. Modified: stable/8/sys/cam/cam_periph.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Tue Apr 19 15:06:33 2011 (r220837) +++ stable/8/sys/cam/cam_periph.c Tue Apr 19 16:10:08 2011 (r220838) @@ -1055,6 +1055,7 @@ camperiphsensedone(struct cam_periph *pe saved_ccb->ccb_h.status |= CAM_AUTOSENSE_FAIL; } + saved_ccb->csio.sense_resid = done_ccb->csio.resid; bcopy(saved_ccb, done_ccb, sizeof(union ccb)); xpt_free_ccb(saved_ccb); break; @@ -1211,7 +1212,7 @@ camperiphdone(struct cam_periph *periph, scsi_request_sense(&done_ccb->csio, /*retries*/1, camperiphsensedone, &save_ccb->csio.sense_data, - sizeof(save_ccb->csio.sense_data), + save_ccb->csio.sense_len, CAM_TAG_ACTION_NONE, /*sense_len*/SSD_FULL_SIZE, /*timeout*/5000); @@ -1602,7 +1603,7 @@ camperiphscsisenseerror(union ccb *ccb, scsi_request_sense(&ccb->csio, /*retries*/1, camperiphsensedone, &orig_ccb->csio.sense_data, - sizeof(orig_ccb->csio.sense_data), + orig_ccb->csio.sense_len, CAM_TAG_ACTION_NONE, /*sense_len*/SSD_FULL_SIZE, /*timeout*/5000); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:20:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D278F1065675; Tue, 19 Apr 2011 16:20:55 +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 C237C8FC1C; Tue, 19 Apr 2011 16: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 p3JGKtlD013427; Tue, 19 Apr 2011 16:20:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGKtGE013425; Tue, 19 Apr 2011 16:20:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201104191620.p3JGKtGE013425@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 19 Apr 2011 16:20: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: r220839 - head/sys/i386/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:20:55 -0000 Author: jkim Date: Tue Apr 19 16:20:55 2011 New Revision: 220839 URL: http://svn.freebsd.org/changeset/base/220839 Log: Add suspend/resume event handlers for apm(4) as well. Modified: head/sys/i386/bios/apm.c Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Tue Apr 19 16:10:08 2011 (r220838) +++ head/sys/i386/bios/apm.c Tue Apr 19 16:20:55 2011 (r220839) @@ -484,16 +484,16 @@ apm_do_suspend(void) apm_op_inprog = 0; sc->suspends = sc->suspend_countdown = 0; + EVENTHANDLER_INVOKE(power_suspend); + /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since * non-MPSAFE drivers need this. */ mtx_lock(&Giant); error = DEVICE_SUSPEND(root_bus); - if (error) { - mtx_unlock(&Giant); - return; - } + if (error) + goto backout; apm_execute_hook(hook[APM_HOOK_SUSPEND]); if (apm_suspend_system(PMST_SUSPEND) == 0) { @@ -504,8 +504,9 @@ apm_do_suspend(void) apm_execute_hook(hook[APM_HOOK_RESUME]); DEVICE_RESUME(root_bus); } +backout: mtx_unlock(&Giant); - return; + EVENTHANDLER_INVOKE(power_resume); } static void @@ -612,7 +613,7 @@ apm_resume(void) mtx_lock(&Giant); DEVICE_RESUME(root_bus); mtx_unlock(&Giant); - return; + EVENTHANDLER_INVOKE(power_resume); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:21:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8936106566C; Tue, 19 Apr 2011 16:21:57 +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 8DBAB8FC15; Tue, 19 Apr 2011 16:21: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 p3JGLvS7013486; Tue, 19 Apr 2011 16:21:57 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGLvWw013483; Tue, 19 Apr 2011 16:21:57 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201104191621.p3JGLvWw013483@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 19 Apr 2011 16:21: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: r220840 - head/usr.sbin/bluetooth/l2control X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:21:57 -0000 Author: emax Date: Tue Apr 19 16:21:57 2011 New Revision: 220840 URL: http://svn.freebsd.org/changeset/base/220840 Log: Improve the man page and l2control's usage() a bit. Submitted by: arundel MFC after: 1 week Modified: head/usr.sbin/bluetooth/l2control/l2control.8 head/usr.sbin/bluetooth/l2control/l2control.c Modified: head/usr.sbin/bluetooth/l2control/l2control.8 ============================================================================== --- head/usr.sbin/bluetooth/l2control/l2control.8 Tue Apr 19 16:20:55 2011 (r220839) +++ head/usr.sbin/bluetooth/l2control/l2control.8 Tue Apr 19 16:21:57 2011 (r220840) @@ -25,7 +25,7 @@ .\" $Id: l2control.8,v 1.5 2003/05/21 00:53:00 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd April 9, 2011 .Dt L2CONTROL 8 .Os .Sh NAME @@ -34,25 +34,27 @@ .Sh SYNOPSIS .Nm .Op Fl hn -.Fl a Ar BD_ADDR +.Fl a Ar local .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm -utility connects to the local device with the specified BD_ADDR and attempts -to send the specified command. +utility connects to the local device with the specified BD_ADDR or name +and attempts to send the specified command. The .Nm utility will print results to the standard output and error messages to -the standard error. +the standard error output. .Pp The options are as follows: .Bl -tag -width indent -.It Fl a Ar BD_ADDR -Connect to the local device with the specified BD_ADDR. +.It Fl a Ar local +Connect to the local device with the specified BD_ADDR or name. Example: -.Fl a Li 00:01:02:03:04:05 . +.Fl a Li 00:01:02:03:04:05 +or +.Fl a Li bt_device . .It Fl h Display usage message and exit. .It Fl n @@ -62,10 +64,10 @@ Normally attempts to resolve Bluetooth addresses, and display them symbolically. .It Ar command One of the supported commands (see below). -Special command +The special command .Cm help -can be used to obtain the list of all supported commands. -To get more information about specific command use +can be used to obtain a list of all supported commands. +To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. @@ -92,4 +94,4 @@ are: .Xr ng_l2cap 4 , .Xr l2ping 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq emax@FreeBSD.org Modified: head/usr.sbin/bluetooth/l2control/l2control.c ============================================================================== --- head/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 19 16:20:55 2011 (r220839) +++ head/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 19 16:21:57 2011 (r220840) @@ -207,7 +207,14 @@ print_l2cap_command(struct l2cap_command static void usage(void) { - fprintf(stdout, "Usage: l2control -a BD_ADDR [-n] [-h] cmd [p1] [..]]\n"); + fprintf(stderr, "Usage: l2control [-hn] -a local cmd [params ..]\n"); + fprintf(stderr, "Where:\n"); + fprintf(stderr, " -a local Specify local device to connect to\n"); + fprintf(stderr, " -h Display this message\n"); + fprintf(stderr, " -n Show addresses as numbers\n"); + fprintf(stderr, " cmd Supported command " \ + "(see l2control help)\n"); + fprintf(stderr, " params Optional command parameters\n"); exit(255); } /* usage */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:23:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C861065673; Tue, 19 Apr 2011 16:23:08 +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 0075E8FC12; Tue, 19 Apr 2011 16:23: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 p3JGN7bg013565; Tue, 19 Apr 2011 16:23:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGN7O3013560; Tue, 19 Apr 2011 16:23:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191623.p3JGN7O3013560@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220841 - in stable/8: share/man/man4 sys/cam/ata sys/conf sys/modules/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 16:23:08 -0000 Author: mav Date: Tue Apr 19 16:23:07 2011 New Revision: 220841 URL: http://svn.freebsd.org/changeset/base/220841 Log: MFC r220412, r220414, r220454, r220618, r220814: - Make ada(4) driver to control device write cache, same as ata(4) does. Add kern.cam.ada.write_cache sysctl/tunable to control it alike hw.ata.wc. - Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching on per-device basis. - While adding support for per-device sysctls, merge from graid branch support for ADA_TEST_FAILURE kernel option, which opens few more sysctl, allowing to simulate read and write errors for testing purposes. Modified: stable/8/share/man/man4/ada.4 stable/8/sys/cam/ata/ata_da.c stable/8/sys/conf/options stable/8/sys/modules/cam/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Apr 19 16:21:57 2011 (r220840) +++ stable/8/share/man/man4/ada.4 Tue Apr 19 16:23:07 2011 (r220841) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2010 +.Dd April 8, 2011 .Dt ADA 4 .Os .Sh NAME @@ -101,7 +101,7 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 -.It kern.cam.ada.retry_count +.It Va kern.cam.ada.retry_count .Pp This variable determines how many times the .Nm @@ -111,18 +111,27 @@ the .Nm driver dump routine. This value currently defaults to 4. -.It kern.cam.ada.default_timeout +.It Va kern.cam.ada.default_timeout .Pp This variable determines how long the .Nm driver will wait before timing out an outstanding command. The units for this value are seconds, and the default is currently 30 seconds. -.It kern.cam.ada.spindown_shutdown +.It Va kern.cam.ada.spindown_shutdown .Pp This variable determines whether to spin-down disks when shutting down. Set to 1 to enable spin-down, 0 to disable. The default is currently enabled. +.It Va kern.cam.ada.write_cache +.It Va kern.cam.ada. Ns Ar X Ns Va .write_cache +.Pp +These variables determines whether device write cache should be enabled +globally or per-device or disabled. +Set to 1 to enable write cache, 0 to disable, -1 to leave it as-is. +Values modified in runtime take effect only after device reset. +The global default is currently enabled. +The per-device default is to leave it as-is (follow global setting). .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Tue Apr 19 16:21:57 2011 (r220840) +++ stable/8/sys/cam/ata/ata_da.c Tue Apr 19 16:23:07 2011 (r220841) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ada.h" + #include #ifdef _KERNEL @@ -66,6 +68,7 @@ __FBSDID("$FreeBSD$"); #define ATA_MAX_28BIT_LBA 268435455UL typedef enum { + ADA_STATE_WCACHE, ADA_STATE_NORMAL } ada_state; @@ -89,6 +92,7 @@ typedef enum { } ada_quirks; typedef enum { + ADA_CCB_WCACHE = 0x01, ADA_CCB_BUFFER_IO = 0x03, ADA_CCB_WAITING = 0x04, ADA_CCB_DUMP = 0x05, @@ -125,6 +129,13 @@ struct ada_softc { int outstanding_cmds; int trim_max_ranges; int trim_running; + int write_cache; +#ifdef ADA_TEST_FAILURE + int force_read_error; + int force_write_error; + int periodic_read_error; + int periodic_read_count; +#endif struct disk_params params; struct disk *disk; struct task sysctl_task; @@ -186,6 +197,10 @@ static void adashutdown(void *arg, int #define ADA_DEFAULT_SPINDOWN_SHUTDOWN 1 #endif +#ifndef ADA_DEFAULT_WRITE_CACHE +#define ADA_DEFAULT_WRITE_CACHE 1 +#endif + /* * Most platforms map firmware geometry to actual, but some don't. If * not overridden, default to nothing. @@ -198,6 +213,7 @@ static int ada_retry_count = ADA_DEFAULT static int ada_default_timeout = ADA_DEFAULT_TIMEOUT; static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED; static int ada_spindown_shutdown = ADA_DEFAULT_SPINDOWN_SHUTDOWN; +static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE; SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); @@ -213,6 +229,9 @@ TUNABLE_INT("kern.cam.ada.ada_send_order SYSCTL_INT(_kern_cam_ada, OID_AUTO, spindown_shutdown, CTLFLAG_RW, &ada_spindown_shutdown, 0, "Spin down upon shutdown"); TUNABLE_INT("kern.cam.ada.spindown_shutdown", &ada_spindown_shutdown); +SYSCTL_INT(_kern_cam_ada, OID_AUTO, write_cache, CTLFLAG_RW, + &ada_write_cache, 0, "Enable disk write cache"); +TUNABLE_INT("kern.cam.ada.write_cache", &ada_write_cache); /* * ADA_ORDEREDTAG_INTERVAL determines how often, relative @@ -568,6 +587,7 @@ adaasync(void *callback_arg, u_int32_t c struct cam_path *path, void *arg) { struct cam_periph *periph; + struct ada_softc *softc; periph = (struct cam_periph *)callback_arg; switch (code) { @@ -600,6 +620,28 @@ adaasync(void *callback_arg, u_int32_t c "due to status 0x%x\n", status); break; } + case AC_SENT_BDR: + case AC_BUS_RESET: + { + struct ccb_getdev cgd; + + softc = (struct ada_softc *)periph->softc; + cam_periph_async(periph, code, path, arg); + if (ada_write_cache < 0 && softc->write_cache < 0) + break; + if (softc->state != ADA_STATE_NORMAL) + break; + xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + cgd.ccb_h.func_code = XPT_GDEV_TYPE; + xpt_action((union ccb *)&cgd); + if ((cgd.ident_data.support.command1 & ATA_SUPPORT_WRITECACHE) == 0) + break; + softc->state = ADA_STATE_WCACHE; + cam_periph_acquire(periph); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); + xpt_schedule(periph, CAM_PRIORITY_DEV); + } default: cam_periph_async(periph, code, path, arg); break; @@ -614,8 +656,12 @@ adasysctlinit(void *context, int pending char tmpstr[80], tmpstr2[80]; periph = (struct cam_periph *)context; - if (cam_periph_acquire(periph) != CAM_REQ_CMP) + + /* periph was held for us when this task was enqueued */ + if (periph->flags & CAM_PERIPH_INVALID) { + cam_periph_release(periph); return; + } softc = (struct ada_softc *)periph->softc; snprintf(tmpstr, sizeof(tmpstr), "CAM ADA unit %d", periph->unit_number); @@ -632,6 +678,28 @@ adasysctlinit(void *context, int pending return; } + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "write_cache", CTLFLAG_RW | CTLFLAG_MPSAFE, + &softc->write_cache, 0, "Enable disk write cache."); +#ifdef ADA_TEST_FAILURE + /* + * Add a 'door bell' sysctl which allows one to set it from userland + * and cause something bad to happen. For the moment, we only allow + * whacking the next read or write. + */ + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "force_read_error", CTLFLAG_RW | CTLFLAG_MPSAFE, + &softc->force_read_error, 0, + "Force a read error for the next N reads."); + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "force_write_error", CTLFLAG_RW | CTLFLAG_MPSAFE, + &softc->force_write_error, 0, + "Force a write error for the next N writes."); + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "periodic_read_error", CTLFLAG_RW | CTLFLAG_MPSAFE, + &softc->periodic_read_error, 0, + "Force a read error every N reads (don't set too low)."); +#endif cam_periph_release(periph); } @@ -691,7 +759,6 @@ adaregister(struct cam_periph *periph, v } if (cgd->ident_data.support.command2 & ATA_SUPPORT_CFA) softc->flags |= ADA_FLAG_CAN_CFA; - softc->state = ADA_STATE_NORMAL; periph->softc = softc; @@ -717,7 +784,12 @@ adaregister(struct cam_periph *periph, v /* * Register this media as a disk */ + (void)cam_periph_hold(periph, PRIBIO); mtx_unlock(periph->sim->mtx); + softc->write_cache = -1; + snprintf(announce_buf, sizeof(announce_buf), + "kern.cam.ada.%d.write_cache", periph->unit_number); + TUNABLE_INT_FETCH(announce_buf, &softc->write_cache); adagetparams(periph, cgd); softc->disk = disk_alloc(); softc->disk->d_open = adaopen; @@ -764,6 +836,7 @@ adaregister(struct cam_periph *periph, v disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); + cam_periph_unhold(periph); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), @@ -774,6 +847,14 @@ adaregister(struct cam_periph *periph, v dp->secsize, dp->heads, dp->secs_per_track, dp->cylinders); xpt_announce_periph(periph, announce_buf); + + /* + * Create our sysctl variables, now that we know + * we have successfully attached. + */ + cam_periph_acquire(periph); + taskqueue_enqueue(taskqueue_thread, &softc->sysctl_task); + /* * Add async callbacks for bus reset and * bus device reset calls. I don't bother @@ -782,7 +863,7 @@ adaregister(struct cam_periph *periph, v * them and the only alternative would be to * not attach the device on failure. */ - xpt_register_async(AC_LOST_DEVICE, + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE, adaasync, periph, periph->path); /* @@ -794,6 +875,16 @@ adaregister(struct cam_periph *periph, v (ADA_DEFAULT_TIMEOUT * hz) / ADA_ORDEREDTAG_INTERVAL, adasendorderedtag, softc); + if ((ada_write_cache >= 0 || softc->write_cache >= 0) && + cgd->ident_data.support.command1 & ATA_SUPPORT_WRITECACHE) { + softc->state = ADA_STATE_WCACHE; + cam_periph_acquire(periph); + cam_freeze_devq_arg(periph->path, + RELSIM_RELEASE_RUNLEVEL, CAM_RL_DEV + 1); + xpt_schedule(periph, CAM_PRIORITY_DEV); + } else + softc->state = ADA_STATE_NORMAL; + return(CAM_REQ_CMP); } @@ -896,7 +987,45 @@ adastart(struct cam_periph *periph, unio { uint64_t lba = bp->bio_pblkno; uint16_t count = bp->bio_bcount / softc->params.secsize; +#ifdef ADA_TEST_FAILURE + int fail = 0; + /* + * Support the failure ioctls. If the command is a + * read, and there are pending forced read errors, or + * if a write and pending write errors, then fail this + * operation with EIO. This is useful for testing + * purposes. Also, support having every Nth read fail. + * + * This is a rather blunt tool. + */ + if (bp->bio_cmd == BIO_READ) { + if (softc->force_read_error) { + softc->force_read_error--; + fail = 1; + } + if (softc->periodic_read_error > 0) { + if (++softc->periodic_read_count >= + softc->periodic_read_error) { + softc->periodic_read_count = 0; + fail = 1; + } + } + } else { + if (softc->force_write_error) { + softc->force_write_error--; + fail = 1; + } + } + if (fail) { + bp->bio_error = EIO; + bp->bio_flags |= BIO_ERROR; + biodone(bp); + xpt_release_ccb(start_ccb); + adaschedule(periph); + return; + } +#endif cam_fill_ataio(ataio, ada_retry_count, adadone, @@ -1003,6 +1132,24 @@ out: adaschedule(periph); break; } + case ADA_STATE_WCACHE: + { + cam_fill_ataio(ataio, + 1, + adadone, + CAM_DIR_NONE, + 0, + NULL, + 0, + ada_default_timeout*1000); + + ata_28bit_cmd(ataio, ATA_SETFEATURES, (softc->write_cache > 0 || + (softc->write_cache < 0 && ada_write_cache)) ? + ATA_SF_ENAB_WCACHE : ATA_SF_DIS_WCACHE, 0, 0); + start_ccb->ccb_h.ccb_state = ADA_CCB_WCACHE; + xpt_action(start_ccb); + break; + } } } @@ -1091,6 +1238,36 @@ adadone(struct cam_periph *periph, union biodone(bp); break; } + case ADA_CCB_WCACHE: + { + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (adaerror(done_ccb, 0, 0) == ERESTART) { + return; + } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + } + } + + softc->state = ADA_STATE_NORMAL; + /* + * Since our peripheral may be invalidated by an error + * above or an external event, we must release our CCB + * before releasing the reference on the peripheral. + * The peripheral will only go away once the last reference + * is removed, and we need it around for the CCB release + * operation. + */ + xpt_release_ccb(done_ccb); + cam_release_devq(periph->path, + RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_DEV + 1, FALSE); + adaschedule(periph); + cam_periph_release_locked(periph); + return; + } case ADA_CCB_WAITING: { /* Caller will release the CCB */ Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Tue Apr 19 16:21:57 2011 (r220840) +++ stable/8/sys/conf/options Tue Apr 19 16:23:07 2011 (r220841) @@ -302,6 +302,9 @@ SCSI_DELAY opt_scsi.h SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h +# Options used only in cam/ata/ata_da.c +ADA_TEST_FAILURE opt_ada.h + # Options used only in cam/scsi/scsi_cd.c CHANGER_MIN_BUSY_SECONDS opt_cd.h CHANGER_MAX_BUSY_SECONDS opt_cd.h Modified: stable/8/sys/modules/cam/Makefile ============================================================================== --- stable/8/sys/modules/cam/Makefile Tue Apr 19 16:21:57 2011 (r220840) +++ stable/8/sys/modules/cam/Makefile Tue Apr 19 16:23:07 2011 (r220841) @@ -8,6 +8,7 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h +SRCS+= opt_ada.h SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:26:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF9921065674; Tue, 19 Apr 2011 16:26:55 +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 DE9A58FC1F; Tue, 19 Apr 2011 16:26: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 p3JGQt7g013721; Tue, 19 Apr 2011 16:26:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGQtT0013719; Tue, 19 Apr 2011 16:26:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191626.p3JGQtT0013719@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:26: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: r220842 - 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: Tue, 19 Apr 2011 16:26:56 -0000 Author: mav Date: Tue Apr 19 16:26:55 2011 New Revision: 220842 URL: http://svn.freebsd.org/changeset/base/220842 Log: MFC r220616: Properly log few more ATA commands used by the kernel. Modified: stable/8/sys/cam/ata/ata_all.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/ata/ata_all.c ============================================================================== --- stable/8/sys/cam/ata/ata_all.c Tue Apr 19 16:23:07 2011 (r220841) +++ stable/8/sys/cam/ata/ata_all.c Tue Apr 19 16:26:55 2011 (r220842) @@ -72,6 +72,8 @@ char * ata_op_string(struct ata_cmd *cmd) { + if (cmd->control & 0x04) + return ("SOFT_RESET"); switch (cmd->command) { case 0x00: return ("NOP"); case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); @@ -149,6 +151,8 @@ ata_op_string(struct ata_cmd *cmd) case 0x06: return ("SETFEATURES ENABLE PUIS"); case 0x86: return ("SETFEATURES DISABLE PUIS"); case 0x07: return ("SETFEATURES SPIN-UP"); + case 0x10: return ("SETFEATURES ENABLE SATA FEATURE"); + case 0x90: return ("SETFEATURES DISABLE SATA FEATURE"); case 0xaa: return ("SETFEATURES ENABLE RCACHE"); case 0x55: return ("SETFEATURES DISABLE RCACHE"); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:29:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B2F31065670; Tue, 19 Apr 2011 16:29:56 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 788FF8FC13; Tue, 19 Apr 2011 16:29: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 p3JGTunG013835; Tue, 19 Apr 2011 16:29:56 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGTur4013827; Tue, 19 Apr 2011 16:29:56 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104191629.p3JGTur4013827@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Apr 2011 16:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220843 - in stable/8: lib/libc/gen sbin/reboot share/man/man4 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, 19 Apr 2011 16:29:56 -0000 Author: pluknet Date: Tue Apr 19 16:29:56 2011 New Revision: 220843 URL: http://svn.freebsd.org/changeset/base/220843 Log: MFC r220617: Remove vestiges of disklabel(5). Modified: stable/8/lib/libc/gen/getdiskbyname.3 stable/8/sbin/reboot/boot_i386.8 stable/8/share/man/man4/cd.4 stable/8/share/man/man4/md.4 stable/8/share/man/man4/vinum.4 stable/8/share/man/man5/disktab.5 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sbin/reboot/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) Modified: stable/8/lib/libc/gen/getdiskbyname.3 ============================================================================== --- stable/8/lib/libc/gen/getdiskbyname.3 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/lib/libc/gen/getdiskbyname.3 Tue Apr 19 16:29:56 2011 (r220843) @@ -54,7 +54,6 @@ the .Xr disktab 5 file. .Sh SEE ALSO -.Xr disklabel 5 , .Xr disktab 5 , .Xr disklabel 8 .Sh HISTORY Modified: stable/8/sbin/reboot/boot_i386.8 ============================================================================== --- stable/8/sbin/reboot/boot_i386.8 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/sbin/reboot/boot_i386.8 Tue Apr 19 16:29:56 2011 (r220843) @@ -358,9 +358,7 @@ requirement has not been adhered to. .Xr reboot 8 , .Xr shutdown 8 .Sh BUGS -The -.Xr bsdlabel 5 -format used by this version of +The bsdlabel format used by this version of .Bx is quite different from that of other architectures. Modified: stable/8/share/man/man4/cd.4 ============================================================================== --- stable/8/share/man/man4/cd.4 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/share/man/man4/cd.4 Tue Apr 19 16:29:56 2011 (r220843) @@ -112,8 +112,8 @@ drive. The disklabel is initialized with information read from the scsi inquiry commands, and should be the same as the information printed at boot. -This structure is defined in -.Xr disklabel 5 . +This structure is defined in the header file +.In sys/disklabel.h . .It Dv CDIOCCAPABILITY .Pq Li "struct ioc_capability" Retrieve information from the drive on what features it supports. @@ -498,7 +498,6 @@ None. .Sh SEE ALSO .Xr cam 4 , .Xr da 4 , -.Xr disklabel 5 , .Xr disklabel 8 , .Xr cd 9 .Sh HISTORY Modified: stable/8/share/man/man4/md.4 ============================================================================== --- stable/8/share/man/man4/md.4 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/share/man/man4/md.4 Tue Apr 19 16:29:56 2011 (r220843) @@ -81,7 +81,6 @@ disk found in the man page. Other tools will also create these images, such as NanoBSD. .Sh SEE ALSO -.Xr disklabel 5 , .Xr disklabel 8 , .Xr fdisk 8 , .Xr loader 8 , Modified: stable/8/share/man/man4/vinum.4 ============================================================================== --- stable/8/share/man/man4/vinum.4 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/share/man/man4/vinum.4 Tue Apr 19 16:29:56 2011 (r220843) @@ -359,9 +359,6 @@ They are described in the header file Conventional disk special devices have a .Em "disk label" in the second sector of the device. -See -.Xr disklabel 5 -for more details. This disk label describes the layout of the partitions within the device. .Nm @@ -842,7 +839,6 @@ The drive is not accessible. The drive is up and running. .El .Sh SEE ALSO -.Xr disklabel 5 , .Xr loader.conf 5 , .Xr disklabel 8 , .Xr gvinum 8 , Modified: stable/8/share/man/man5/disktab.5 ============================================================================== --- stable/8/share/man/man5/disktab.5 Tue Apr 19 16:26:55 2011 (r220842) +++ stable/8/share/man/man5/disktab.5 Tue Apr 19 16:29:56 2011 (r220843) @@ -134,7 +134,6 @@ file system, swap, etc) .El .Sh SEE ALSO .Xr getdiskbyname 3 , -.\" .Xr bsdlabel 5 , .Xr bsdlabel 8 , .Xr newfs 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:30:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 767F21065673; Tue, 19 Apr 2011 16:30:17 +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 660688FC1F; Tue, 19 Apr 2011 16:30: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 p3JGUH51013897; Tue, 19 Apr 2011 16:30:17 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGUHwb013895; Tue, 19 Apr 2011 16:30:17 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201104191630.p3JGUHwb013895@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 19 Apr 2011 16:30: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: r220844 - head/sys/i386/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:30:17 -0000 Author: jkim Date: Tue Apr 19 16:30:17 2011 New Revision: 220844 URL: http://svn.freebsd.org/changeset/base/220844 Log: Do not invoke resume event handlers if suspend was successful. Pointy hat to: jkim Modified: head/sys/i386/bios/apm.c Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Tue Apr 19 16:29:56 2011 (r220843) +++ head/sys/i386/bios/apm.c Tue Apr 19 16:30:17 2011 (r220844) @@ -499,11 +499,13 @@ apm_do_suspend(void) if (apm_suspend_system(PMST_SUSPEND) == 0) { sc->suspending = 1; apm_processevent(); - } else { - /* Failure, 'resume' the system again */ - apm_execute_hook(hook[APM_HOOK_RESUME]); - DEVICE_RESUME(root_bus); + mtx_unlock(&Giant); + return; } + + /* Failure, 'resume' the system again */ + apm_execute_hook(hook[APM_HOOK_RESUME]); + DEVICE_RESUME(root_bus); backout: mtx_unlock(&Giant); EVENTHANDLER_INVOKE(power_resume); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:33:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 696C61065670; Tue, 19 Apr 2011 16:33:08 +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 576578FC1E; Tue, 19 Apr 2011 16:33: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 p3JGX8OI014101; Tue, 19 Apr 2011 16:33:08 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGX8m0014098; Tue, 19 Apr 2011 16:33:08 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201104191633.p3JGX8m0014098@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 19 Apr 2011 16:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220845 - stable/8/usr.sbin/bluetooth/l2ping X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:33:08 -0000 Author: emax Date: Tue Apr 19 16:33:08 2011 New Revision: 220845 URL: http://svn.freebsd.org/changeset/base/220845 Log: MFC r220116 Do not use word 'flood' as it not entirely correct. Use better 'no delay' description. While here, replace atoi(3) with strtol(3). Submitted by: arundel Modified: stable/8/usr.sbin/bluetooth/l2ping/l2ping.8 stable/8/usr.sbin/bluetooth/l2ping/l2ping.c Directory Properties: stable/8/usr.sbin/bluetooth/l2ping/ (props changed) Modified: stable/8/usr.sbin/bluetooth/l2ping/l2ping.8 ============================================================================== --- stable/8/usr.sbin/bluetooth/l2ping/l2ping.8 Tue Apr 19 16:30:17 2011 (r220844) +++ stable/8/usr.sbin/bluetooth/l2ping/l2ping.8 Tue Apr 19 16:33:08 2011 (r220845) @@ -25,7 +25,7 @@ .\" $Id: l2ping.8,v 1.3 2003/05/21 01:00:19 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd March 29, 2011 .Dt L2PING 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Op Fl fhn .Fl a Ar remote .Op Fl c Ar count -.Op Fl i Ar delay +.Op Fl i Ar wait .Op Fl S Ar source .Op Fl s Ar size .Sh DESCRIPTION @@ -63,8 +63,7 @@ If this option is not specified, .Nm will operate until interrupted. .It Fl f -.Dq Flood -ping, i.e., no delay between packets. +Don't wait between sending each packet. .It Fl h Display usage message and exit. .It Fl i Ar wait @@ -109,7 +108,7 @@ Some implementations may not like large .Xr ng_l2cap 4 , .Xr l2control 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq emax@FreeBSD.org .Sh BUGS Could collect more statistic. Could check for duplicated, corrupted and lost packets. Modified: stable/8/usr.sbin/bluetooth/l2ping/l2ping.c ============================================================================== --- stable/8/usr.sbin/bluetooth/l2ping/l2ping.c Tue Apr 19 16:30:17 2011 (r220844) +++ stable/8/usr.sbin/bluetooth/l2ping/l2ping.c Tue Apr 19 16:33:08 2011 (r220845) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -60,11 +61,11 @@ int main(int argc, char *argv[]) { bdaddr_t src, dst; - struct hostent *he = NULL; - uint8_t *echo_data = NULL; + struct hostent *he; + uint8_t *echo_data; struct sockaddr_l2cap sa; int32_t n, s, count, wait, flood, echo_size, numeric; - char *rname = NULL; + char *endp, *rname; /* Set defaults */ memcpy(&src, NG_HCI_BDADDR_ANY, sizeof(src)); @@ -100,8 +101,8 @@ main(int argc, char *argv[]) break; case 'c': - count = atoi(optarg); - if (count <= 0) + count = strtol(optarg, &endp, 10); + if (count <= 0 || *endp != '\0') usage(); break; @@ -110,8 +111,8 @@ main(int argc, char *argv[]) break; case 'i': - wait = atoi(optarg); - if (wait <= 0) + wait = strtol(optarg, &endp, 10); + if (wait <= 0 || *endp != '\0') usage(); break; @@ -129,9 +130,10 @@ main(int argc, char *argv[]) break; case 's': - echo_size = atoi(optarg); - if (echo_size < sizeof(int32_t) || - echo_size > NG_L2CAP_MAX_ECHO_SIZE) + echo_size = strtol(optarg, &endp, 10); + if (echo_size < sizeof(int32_t) || + echo_size > NG_L2CAP_MAX_ECHO_SIZE || + *endp != '\0') usage(); break; @@ -272,12 +274,12 @@ tv2msec(struct timeval const *tvp) static void usage(void) { - fprintf(stderr, "Usage: l2ping -a bd_addr " \ - "[-S bd_addr -c count -i wait -n -s size -h]\n"); + fprintf(stderr, "Usage: l2ping [-fhn] -a remote " \ + "[-c count] [-i wait] [-S source] [-s size]\n"); fprintf(stderr, "Where:\n"); fprintf(stderr, " -a remote Specify remote device to ping\n"); fprintf(stderr, " -c count Number of packets to send\n"); - fprintf(stderr, " -f No delay (sort of flood)\n"); + fprintf(stderr, " -f No delay between packets\n"); fprintf(stderr, " -h Display this message\n"); fprintf(stderr, " -i wait Delay between packets (sec)\n"); fprintf(stderr, " -n Numeric output only\n"); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:36:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57F271065673; Tue, 19 Apr 2011 16:36:25 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46CBA8FC24; Tue, 19 Apr 2011 16:36: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 p3JGaPvJ014237; Tue, 19 Apr 2011 16:36:25 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGaPdW014233; Tue, 19 Apr 2011 16:36:25 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104191636.p3JGaPdW014233@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 19 Apr 2011 16:36: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: r220846 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 16:36:25 -0000 Author: mdf Date: Tue Apr 19 16:36:24 2011 New Revision: 220846 URL: http://svn.freebsd.org/changeset/base/220846 Log: Allow VOP_ALLOCATE to be iterative, and have kern_posix_fallocate(9) drive looping and potentially yielding. Requested by: kib Modified: head/sys/kern/vfs_default.c head/sys/kern/vfs_syscalls.c head/sys/kern/vnode_if.src Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Tue Apr 19 16:33:08 2011 (r220845) +++ head/sys/kern/vfs_default.c Tue Apr 19 16:36:24 2011 (r220846) @@ -865,25 +865,25 @@ vop_stdallocate(struct vop_allocate_args struct iovec aiov; struct vattr vattr, *vap; struct uio auio; - off_t len, cur, offset; + off_t fsize, len, cur, offset; uint8_t *buf; struct thread *td; struct vnode *vp; size_t iosize; - int error, locked; + int error; buf = NULL; error = 0; - locked = 1; td = curthread; vap = &vattr; vp = ap->a_vp; - len = ap->a_len; - offset = ap->a_offset; + len = *ap->a_len; + offset = *ap->a_offset; error = VOP_GETATTR(vp, vap, td->td_ucred); if (error != 0) goto out; + fsize = vap->va_size; iosize = vap->va_blocksize; if (iosize == 0) iosize = BLKDEV_IOSIZE; @@ -908,27 +908,22 @@ vop_stdallocate(struct vop_allocate_args } else #endif if (offset + len > vap->va_size) { + /* + * Test offset + len against the filesystem's maxfilesize. + */ VATTR_NULL(vap); vap->va_size = offset + len; error = VOP_SETATTR(vp, vap, td->td_ucred); if (error != 0) goto out; + VATTR_NULL(vap); + vap->va_size = fsize; + error = VOP_SETATTR(vp, vap, td->td_ucred); + if (error != 0) + goto out; } - while (len > 0) { - if (should_yield()) { - VOP_UNLOCK(vp, 0); - locked = 0; - kern_yield(-1); - error = vn_lock(vp, LK_EXCLUSIVE); - if (error != 0) - break; - locked = 1; - error = VOP_GETATTR(vp, vap, td->td_ucred); - if (error != 0) - break; - } - + for (;;) { /* * Read and write back anything below the nominal file * size. There's currently no way outside the filesystem @@ -939,7 +934,7 @@ vop_stdallocate(struct vop_allocate_args cur -= (offset % iosize); if (cur > len) cur = len; - if (offset < vap->va_size) { + if (offset < fsize) { aiov.iov_base = buf; aiov.iov_len = cur; auio.uio_iov = &aiov; @@ -976,12 +971,15 @@ vop_stdallocate(struct vop_allocate_args len -= cur; offset += cur; + if (len == 0) + break; + if (should_yield()) + break; } out: - KASSERT(locked || error != 0, ("How'd I get unlocked with no error?")); - if (locked && error != 0) - VOP_UNLOCK(vp, 0); + *ap->a_len = len; + *ap->a_offset = offset; free(buf, M_TEMP); return (error); } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Apr 19 16:33:08 2011 (r220845) +++ head/sys/kern/vfs_syscalls.c Tue Apr 19 16:36:24 2011 (r220846) @@ -4678,12 +4678,11 @@ kern_posix_fallocate(struct thread *td, struct file *fp; struct mount *mp; struct vnode *vp; - int error, vfslocked, vnlocked; + off_t olen, ooffset; + int error, vfslocked; fp = NULL; - mp = NULL; vfslocked = 0; - vnlocked = 0; error = fget(td, fd, &fp); if (error != 0) goto out; @@ -4718,28 +4717,44 @@ kern_posix_fallocate(struct thread *td, goto out; } - bwillwrite(); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - error = vn_start_write(vp, &mp, V_WAIT | PCATCH); - if (error != 0) - goto out; - error = vn_lock(vp, LK_EXCLUSIVE); - if (error != 0) - goto out; - vnlocked = 1; + /* Allocating blocks may take a long time, so iterate. */ + for (;;) { + olen = len; + ooffset = offset; + + bwillwrite(); + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + mp = NULL; + error = vn_start_write(vp, &mp, V_WAIT | PCATCH); + if (error != 0) { + VFS_UNLOCK_GIANT(vfslocked); + break; + } + error = vn_lock(vp, LK_EXCLUSIVE); + if (error != 0) { + vn_finished_write(mp); + VFS_UNLOCK_GIANT(vfslocked); + break; + } #ifdef MAC - error = mac_vnode_check_write(td->td_ucred, fp->f_cred, vp); - if (error != 0) - goto out; + error = mac_vnode_check_write(td->td_ucred, fp->f_cred, vp); + if (error == 0) #endif - error = VOP_ALLOCATE(vp, offset, len); - if (error != 0) - vnlocked = 0; - out: - if (vnlocked) + error = VOP_ALLOCATE(vp, &offset, &len); VOP_UNLOCK(vp, 0); - vn_finished_write(mp); - VFS_UNLOCK_GIANT(vfslocked); + vn_finished_write(mp); + VFS_UNLOCK_GIANT(vfslocked); + + if (olen + ooffset != offset + len) { + panic("offset + len changed from %jx/%jx to %jx/%jx", + ooffset, olen, offset, len); + } + if (error != 0 || len == 0) + break; + KASSERT(olen > len, ("Iteration did not make progress?")); + maybe_yield(); + } + out: if (fp != NULL) fdrop(fp, td); return (error); Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Tue Apr 19 16:33:08 2011 (r220845) +++ head/sys/kern/vnode_if.src Tue Apr 19 16:36:24 2011 (r220846) @@ -621,10 +621,10 @@ vop_vptocnp { }; -%% allocate vp E E U +%% allocate vp E E E vop_allocate { IN struct vnode *vp; - IN off_t offset; - IN off_t len; + IN off_t *offset; + IN off_t *len; }; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:39:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A855106566C; Tue, 19 Apr 2011 16:39: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 6912F8FC0C; Tue, 19 Apr 2011 16:39: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 p3JGd3LJ014362; Tue, 19 Apr 2011 16:39:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGd3oM014360; Tue, 19 Apr 2011 16:39:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191639.p3JGd3oM014360@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:39: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: r220847 - stable/8/sys/dev/ichsmb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:39:03 -0000 Author: mav Date: Tue Apr 19 16:39:03 2011 New Revision: 220847 URL: http://svn.freebsd.org/changeset/base/220847 Log: MFC r211905 (by jfv): Add support for Intel Cougar Point SMBus controller. Modified: stable/8/sys/dev/ichsmb/ichsmb_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:36:24 2011 (r220846) +++ stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:39:03 2011 (r220847) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #define ID_PCH 0x3b308086 #define ID_6300ESB 0x25a48086 #define ID_631xESB 0x269b8086 +#define ID_CPT 0x1c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -174,6 +175,9 @@ ichsmb_pci_probe(device_t dev) case ID_631xESB: device_set_desc(dev, "Intel 631xESB/6321ESB (ESB2) SMBus controller"); break; + case ID_CPT: + device_set_desc(dev, "Intel Cougar Point SMBus controller"); + break; default: return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:40:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0001065675; Tue, 19 Apr 2011 16:40:58 +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 677818FC1B; Tue, 19 Apr 2011 16: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 p3JGewdu014495; Tue, 19 Apr 2011 16:40:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGewGa014488; Tue, 19 Apr 2011 16:40:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191640.p3JGewGa014488@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16: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: r220848 - in stable/8/sys/dev: ahci ata ata/chipsets ichsmb ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 16:40:58 -0000 Author: mav Date: Tue Apr 19 16:40:58 2011 New Revision: 220848 URL: http://svn.freebsd.org/changeset/base/220848 Log: MFC r218140 (jfv): Support for the new DH89xxCC PCH chipset including: - SATA controller - Watchdog timer - SMBus controller Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ichsmb/ichsmb_pci.c stable/8/sys/dev/ichwd/ichwd.c stable/8/sys/dev/ichwd/ichwd.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:40:58 2011 (r220848) @@ -161,6 +161,7 @@ static struct { {0x1c038086, 0x00, "Intel Cougar Point", 0}, {0x1c048086, 0x00, "Intel Cougar Point", 0}, {0x1c058086, 0x00, "Intel Cougar Point", 0}, + {0x23238086, 0x00, "Intel DH89xxCC", 0}, {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ata/ata-pci.h Tue Apr 19 16:40:58 2011 (r220848) @@ -229,6 +229,7 @@ struct ata_pci_controller { #define ATA_I31244 0x32008086 #define ATA_ISCH 0x811a8086 +#define ATA_DH89XXCC 0x23238086 #define ATA_ITE_ID 0x1283 #define ATA_IT8211F 0x82111283 Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Apr 19 16:40:58 2011 (r220848) @@ -178,6 +178,7 @@ ata_intel_probe(device_t dev) { ATA_CPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Cougar Point" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, + { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_INTEL_ID) Modified: stable/8/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:40:58 2011 (r220848) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #define ID_PCH 0x3b308086 #define ID_6300ESB 0x25a48086 #define ID_631xESB 0x269b8086 +#define ID_DH89XXCC 0x23308086 #define ID_CPT 0x1c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -175,6 +176,9 @@ ichsmb_pci_probe(device_t dev) case ID_631xESB: device_set_desc(dev, "Intel 631xESB/6321ESB (ESB2) SMBus controller"); break; + case ID_DH89XXCC: + device_set_desc(dev, "Intel DH89xxCC SMBus controller"); + break; case ID_CPT: device_set_desc(dev, "Intel Cougar Point SMBus controller"); break; Modified: stable/8/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.c Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ichwd/ichwd.c Tue Apr 19 16:40:58 2011 (r220848) @@ -111,6 +111,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer", 10 }, { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 }, { DEVICEID_H55, "Intel H55 watchdog timer", 10 }, + { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: stable/8/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.h Tue Apr 19 16:39:03 2011 (r220847) +++ stable/8/sys/dev/ichwd/ichwd.h Tue Apr 19 16:40:58 2011 (r220848) @@ -64,6 +64,7 @@ struct ichwd_softc { }; #define VENDORID_INTEL 0x8086 +#define DEVICEID_DH89XXCC_LPC 0x2310 #define DEVICEID_82801AA 0x2410 #define DEVICEID_82801AB 0x2420 #define DEVICEID_82801BA 0x2440 From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:42:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A4E7106566C; Tue, 19 Apr 2011 16:42:08 +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 EB1C18FC14; Tue, 19 Apr 2011 16:42: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 p3JGg7vV014588; Tue, 19 Apr 2011 16:42:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGg7El014580; Tue, 19 Apr 2011 16:42:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191642.p3JGg7El014580@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220849 - in stable/8/sys/dev: ahci ata ata/chipsets ichsmb ichwd sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 16:42:08 -0000 Author: mav Date: Tue Apr 19 16:42:07 2011 New Revision: 220849 URL: http://svn.freebsd.org/changeset/base/220849 Log: MFC r218149 (by jfv): Support for the new Patsburg PCH chipset: - SMBus Controller - SATA Controller - HD Audio Controller - Watchdog Controller Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ichsmb/ichsmb_pci.c stable/8/sys/dev/ichwd/ichwd.c stable/8/sys/dev/ichwd/ichwd.h stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:42:07 2011 (r220849) @@ -161,7 +161,10 @@ static struct { {0x1c038086, 0x00, "Intel Cougar Point", 0}, {0x1c048086, 0x00, "Intel Cougar Point", 0}, {0x1c058086, 0x00, "Intel Cougar Point", 0}, - {0x23238086, 0x00, "Intel DH89xxCC", 0}, + {0x23238086, 0x00, "Intel DH89xxCC", 0}, + {0x1d028086, 0x00, "Intel Patsburg", 0}, + {0x1d048086, 0x00, "Intel Patsburg", 0}, + {0x1d068086, 0x00, "Intel Patsburg", 0}, {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ata/ata-pci.h Tue Apr 19 16:42:07 2011 (r220849) @@ -227,6 +227,12 @@ struct ata_pci_controller { #define ATA_CPT_S3 0x1c088086 #define ATA_CPT_S4 0x1c098086 +#define ATA_PBG_S1 0x1d008086 +#define ATA_PBG_AH1 0x1d028086 +#define ATA_PBG_R1 0x1d048086 +#define ATA_PBG_R2 0x1d068086 +#define ATA_PBG_S2 0x1d088086 + #define ATA_I31244 0x32008086 #define ATA_ISCH 0x811a8086 #define ATA_DH89XXCC 0x23238086 Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Apr 19 16:42:07 2011 (r220849) @@ -176,6 +176,11 @@ ata_intel_probe(device_t dev) { ATA_CPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Cougar Point" }, { ATA_CPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Cougar Point" }, { ATA_CPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Cougar Point" }, + { ATA_PBG_S1, 0, INTEL_6CH, 0, ATA_SA300, "Patsburg" }, + { ATA_PBG_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, + { ATA_PBG_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, + { ATA_PBG_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, + { ATA_PBG_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Patsburg" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, Modified: stable/8/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ichsmb/ichsmb_pci.c Tue Apr 19 16:42:07 2011 (r220849) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #define ID_6300ESB 0x25a48086 #define ID_631xESB 0x269b8086 #define ID_DH89XXCC 0x23308086 +#define ID_PATSBURG 0x1d228086 #define ID_CPT 0x1c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -179,6 +180,9 @@ ichsmb_pci_probe(device_t dev) case ID_DH89XXCC: device_set_desc(dev, "Intel DH89xxCC SMBus controller"); break; + case ID_PATSBURG: + device_set_desc(dev, "Intel Patsburg SMBus controller"); + break; case ID_CPT: device_set_desc(dev, "Intel Cougar Point SMBus controller"); break; Modified: stable/8/sys/dev/ichwd/ichwd.c ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.c Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ichwd/ichwd.c Tue Apr 19 16:42:07 2011 (r220849) @@ -111,7 +111,9 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer", 10 }, { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 }, { DEVICEID_H55, "Intel H55 watchdog timer", 10 }, - { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, + { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, + { DEVICEID_PATSBURG_LPC1, "Intel Patsburg watchdog timer", 10 }, + { DEVICEID_PATSBURG_LPC2, "Intel Patsburg watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: stable/8/sys/dev/ichwd/ichwd.h ============================================================================== --- stable/8/sys/dev/ichwd/ichwd.h Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/ichwd/ichwd.h Tue Apr 19 16:42:07 2011 (r220849) @@ -64,6 +64,8 @@ struct ichwd_softc { }; #define VENDORID_INTEL 0x8086 +#define DEVICEID_PATSBURG_LPC1 0x1d40 +#define DEVICEID_PATSBURG_LPC2 0x1d41 #define DEVICEID_DH89XXCC_LPC 0x2310 #define DEVICEID_82801AA 0x2410 #define DEVICEID_82801AB 0x2420 Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Tue Apr 19 16:40:58 2011 (r220848) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Tue Apr 19 16:42:07 2011 (r220849) @@ -140,6 +140,7 @@ SND_DECLARE_FILE("$FreeBSD$"); /* Intel */ #define INTEL_VENDORID 0x8086 +#define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20) #define HDA_INTEL_82801F HDA_MODEL_CONSTRUCT(INTEL, 0x2668) #define HDA_INTEL_63XXESB HDA_MODEL_CONSTRUCT(INTEL, 0x269a) #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) @@ -148,6 +149,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) +#define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -490,6 +492,7 @@ static const struct { char *desc; char flags; } hdac_devices[] = { + { HDA_INTEL_PATSBURG,"Intel Patsburg", 0 }, { HDA_INTEL_82801F, "Intel 82801F", 0 }, { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0 }, { HDA_INTEL_82801G, "Intel 82801G", 0 }, @@ -497,7 +500,8 @@ static const struct { { HDA_INTEL_82801I, "Intel 82801I", 0 }, { HDA_INTEL_82801JI, "Intel 82801JI", 0 }, { HDA_INTEL_82801JD, "Intel 82801JD", 0 }, - { HDA_INTEL_PCH, "Intel PCH", 0 }, + { HDA_INTEL_PCH, "Intel 5 Series/3400 Series", 0 }, + { HDA_INTEL_PCH2, "Intel 5 Series/3400 Series", 0 }, { HDA_INTEL_SCH, "Intel SCH", 0 }, { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI }, { HDA_NVIDIA_MCP55, "NVidia MCP55", HDAC_NO_MSI }, From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:43:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B52C106566C; Tue, 19 Apr 2011 16:43:55 +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 5ED498FC0A; Tue, 19 Apr 2011 16: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 p3JGhts3014680; Tue, 19 Apr 2011 16:43:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGhtIY014678; Tue, 19 Apr 2011 16:43:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191643.p3JGhtIY014678@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:43: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: r220850 - 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: Tue, 19 Apr 2011 16:43:55 -0000 Author: mav Date: Tue Apr 19 16:43:55 2011 New Revision: 220850 URL: http://svn.freebsd.org/changeset/base/220850 Log: MFC r218596, r218605: Disable NCQ for multiport Marvell 88SX61XX SATA controllers. Simultaneous active I/O to several disks (copying large file on ZFS) causes timeout after just a few seconds of run. Single port 88SX6111 seems like not affected. Skip reading transferred bytes count for these controllers. It works for 88SX6111, but 88SX6145 always returns zero there. Haven't tested others, but better to be safe. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:42:07 2011 (r220849) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:43:55 2011 (r220850) @@ -114,6 +114,7 @@ static struct { #define AHCI_Q_SATA2 128 #define AHCI_Q_NOBSYRES 256 #define AHCI_Q_NOAA 512 +#define AHCI_Q_NOCOUNT 1024 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -170,10 +171,14 @@ static struct { {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}, + {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 | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, + {0x614111ab, 0x00, "Marvell 88SX6141", AHCI_Q_NOFORCE | AHCI_Q_4CH | + AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, + {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | + AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, @@ -1902,12 +1907,14 @@ ahci_end_transaction(struct ahci_slot *s } else bzero(res, sizeof(*res)); if ((ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) == 0 && - (ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + (ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && + (ch->quirks & AHCI_Q_NOCOUNT) == 0) { ccb->ataio.resid = ccb->ataio.dxfer_len - le32toh(clp->bytecount); } } else { - if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && + (ch->quirks & AHCI_Q_NOCOUNT) == 0) { ccb->csio.resid = ccb->csio.dxfer_len - le32toh(clp->bytecount); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:45:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2003D106566B; Tue, 19 Apr 2011 16:45:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3FE8FC19; Tue, 19 Apr 2011 16:45: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 p3JGjuFo014792; Tue, 19 Apr 2011 16:45:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGjuRc014790; Tue, 19 Apr 2011 16:45:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191645.p3JGjuRc014790@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220851 - 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: Tue, 19 Apr 2011 16:45:57 -0000 Author: mav Date: Tue Apr 19 16:45:56 2011 New Revision: 220851 URL: http://svn.freebsd.org/changeset/base/220851 Log: MFC r219341: Add some more IDs of HighPoint RocketRAID 64x. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:43:55 2011 (r220850) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:45:56 2011 (r220851) @@ -186,7 +186,9 @@ static struct { {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, + {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, + {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:46:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECB441065675; Tue, 19 Apr 2011 16:46: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 DAF5C8FC1B; Tue, 19 Apr 2011 16:46: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 p3JGkpT9014864; Tue, 19 Apr 2011 16:46:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGkpTj014862; Tue, 19 Apr 2011 16:46:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191646.p3JGkpTj014862@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:46: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: r220852 - 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: Tue, 19 Apr 2011 16:46:52 -0000 Author: mav Date: Tue Apr 19 16:46:51 2011 New Revision: 220852 URL: http://svn.freebsd.org/changeset/base/220852 Log: MFC r220413: Add one more ID for Marvell 88SE912x chip found on Asus U3S6 card. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:45:56 2011 (r220851) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 16:46:51 2011 (r220852) @@ -179,6 +179,7 @@ static struct { AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, + {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:51:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6F8106566B; Tue, 19 Apr 2011 16:51:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 786A98FC14; Tue, 19 Apr 2011 16:51: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 p3JGpHA3015125; Tue, 19 Apr 2011 16:51:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGpHvY015122; Tue, 19 Apr 2011 16:51:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191651.p3JGpHvY015122@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220853 - 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: Tue, 19 Apr 2011 16:51:17 -0000 Author: mav Date: Tue Apr 19 16:51:17 2011 New Revision: 220853 URL: http://svn.freebsd.org/changeset/base/220853 Log: MFC r217877, r217883: Hardware supported by siis(4) allows software control over activity LEDs. Expose that functionality to led(4) OR-ing it with regular LED activity. Modified: stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Apr 19 16:46:51 2011 (r220852) +++ stable/8/sys/dev/siis/siis.c Tue Apr 19 16:51:17 2011 (r220853) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "siis.h" @@ -65,6 +66,7 @@ static int siis_ch_suspend(device_t dev) static int siis_ch_resume(device_t dev); static void siis_ch_intr_locked(void *data); static void siis_ch_intr(void *data); +static void siis_ch_led(void *priv, int onoff); static void siis_begin_transaction(device_t dev, union ccb *ccb); static void siis_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void siis_execute_transaction(struct siis_slot *slot); @@ -516,6 +518,7 @@ siis_ch_attach(device_t dev) goto err3; } mtx_unlock(&ch->mtx); + ch->led = led_create(siis_ch_led, dev, device_get_nameunit(dev)); return (0); err3: @@ -536,6 +539,7 @@ siis_ch_detach(device_t dev) { struct siis_channel *ch = device_get_softc(dev); + led_destroy(ch->led); mtx_lock(&ch->mtx); xpt_async(AC_LOST_DEVICE, ch->path, NULL); xpt_free_path(ch->path); @@ -625,6 +629,21 @@ static driver_t siisch_driver = { }; DRIVER_MODULE(siisch, siis, siisch_driver, siis_devclass, 0, 0); +static void +siis_ch_led(void *priv, int onoff) +{ + device_t dev; + struct siis_channel *ch; + + dev = (device_t)priv; + ch = device_get_softc(dev); + + if (onoff == 0) + ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_LED_ON); + else + ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_LED_ON); +} + struct siis_dc_cb_args { bus_addr_t maddr; int error; Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Tue Apr 19 16:46:51 2011 (r220852) +++ stable/8/sys/dev/siis/siis.h Tue Apr 19 16:51:17 2011 (r220853) @@ -371,6 +371,7 @@ struct siis_channel { struct ata_dma dma; /* DMA data */ struct cam_sim *sim; struct cam_path *path; + struct cdev *led; /* Activity led led(4) cdev. */ int quirks; int pm_level; /* power management level */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 16:52:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67ECF106566B; Tue, 19 Apr 2011 16:52: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 55DCE8FC1B; Tue, 19 Apr 2011 16:52: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 p3JGqaxZ015198; Tue, 19 Apr 2011 16:52:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JGqabB015196; Tue, 19 Apr 2011 16:52:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191652.p3JGqabB015196@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 16:52: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: r220854 - 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: Tue, 19 Apr 2011 16:52:36 -0000 Author: mav Date: Tue Apr 19 16:52:36 2011 New Revision: 220854 URL: http://svn.freebsd.org/changeset/base/220854 Log: MFC r220449: Add reference to led(4), supported now. Add some details about supported chips. Modified: stable/8/share/man/man4/siis.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/siis.4 ============================================================================== --- stable/8/share/man/man4/siis.4 Tue Apr 19 16:51:17 2011 (r220853) +++ stable/8/share/man/man4/siis.4 Tue Apr 19 16:52:36 2011 (r220854) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 18, 2009 +.Dd April 8, 2011 .Dt SIIS 4 .Os .Sh NAME @@ -93,6 +93,12 @@ Port Multipliers (including FIS-based sw (31 command per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. .Pp +The activity LEDs of the adapters supported by the +.Nm +driver can be controlled via the +.Xr led 4 +API for localization or status reporting purposes. +.Pp Same hardware is also supported by the atasiliconimage driver from .Xr ata 4 subsystem. @@ -101,14 +107,21 @@ given precedence as the more functional .Sh HARDWARE The .Nm -driver supports the following controllers: +driver supports the following controller chips: .Bl -bullet -compact .It -SiI3124 +SiI3124 (PCI-X 133MHz/64bit, 4 ports) .It -SiI3132 +SiI3131 (PCIe 1.0 x1, 1 port) .It -SiI3531 +SiI3132 (PCIe 1.0 x1, 2 ports) +.It +SiI3531 (PCIe 1.0 x1, 1 port) +.El +.Sh FILES +.Bl -tag -width /dev/led/siisch* +.It Pa /dev/led/siisch* +identification LED device nodes .El .Sh SEE ALSO .Xr ada 4 , @@ -116,6 +129,7 @@ SiI3531 .Xr cam 4 , .Xr cd 4 , .Xr da 4 , +.Xr led 4 , .Xr sa 4 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:01:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A07106564A; Tue, 19 Apr 2011 17:01:06 +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 03F1B8FC0A; Tue, 19 Apr 2011 17:01: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 p3JH15OX015563; Tue, 19 Apr 2011 17:01:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JH15sw015560; Tue, 19 Apr 2011 17:01:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191701.p3JH15sw015560@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220855 - 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: Tue, 19 Apr 2011 17:01:06 -0000 Author: mav Date: Tue Apr 19 17:01:05 2011 New Revision: 220855 URL: http://svn.freebsd.org/changeset/base/220855 Log: MFC r220563: Implement automatic SCSI sense fetching for ata(4) in ATA_CAM mode. Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/ata-all.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Tue Apr 19 16:52:36 2011 (r220854) +++ stable/8/sys/dev/ata/ata-all.c Tue Apr 19 17:01:05 2011 (r220855) @@ -1474,6 +1474,72 @@ ata_cam_begin_transaction(device_t dev, } } +static void +ata_cam_request_sense(device_t dev, struct ata_request *request) +{ + struct ata_channel *ch = device_get_softc(dev); + union ccb *ccb = request->ccb; + + ch->requestsense = 1; + + bzero(request, sizeof(&request)); + request->dev = NULL; + request->parent = dev; + request->unit = ccb->ccb_h.target_id; + request->data = (void *)&ccb->csio.sense_data; + request->bytecount = ccb->csio.sense_len; + request->u.atapi.ccb[0] = ATAPI_REQUEST_SENSE; + request->u.atapi.ccb[4] = ccb->csio.sense_len; + request->flags |= ATA_R_ATAPI; + if (ch->curr[ccb->ccb_h.target_id].atapi == 16) + request->flags |= ATA_R_ATAPI16; + if (ch->curr[ccb->ccb_h.target_id].mode >= ATA_DMA) + request->flags |= ATA_R_DMA; + request->flags |= ATA_R_READ; + request->transfersize = min(request->bytecount, + ch->curr[ccb->ccb_h.target_id].bytecount); + request->retries = 0; + request->timeout = (ccb->ccb_h.timeout + 999) / 1000; + callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); + request->ccb = ccb; + + ch->running = request; + ch->state = ATA_ACTIVE; + if (ch->hw.begin_transaction(request) == ATA_OP_FINISHED) { + ch->running = NULL; + ch->state = ATA_IDLE; + ata_cam_end_transaction(dev, request); + return; + } +} + +static void +ata_cam_process_sense(device_t dev, struct ata_request *request) +{ + struct ata_channel *ch = device_get_softc(dev); + union ccb *ccb = request->ccb; + int fatalerr = 0; + + ch->requestsense = 0; + + if (request->flags & ATA_R_TIMEOUT) + fatalerr = 1; + if ((request->flags & ATA_R_TIMEOUT) == 0 && + (request->status & ATA_S_ERROR) == 0 && + request->result == 0) { + ccb->ccb_h.status |= CAM_AUTOSNS_VALID; + } else { + ccb->ccb_h.status &= ~CAM_STATUS_MASK; + ccb->ccb_h.status |= CAM_AUTOSENSE_FAIL; + } + + ata_free_request(request); + xpt_done(ccb); + /* Do error recovery if needed. */ + if (fatalerr) + ata_reinit(dev); +} + void ata_cam_end_transaction(device_t dev, struct ata_request *request) { @@ -1481,6 +1547,11 @@ ata_cam_end_transaction(device_t dev, st union ccb *ccb = request->ccb; int fatalerr = 0; + if (ch->requestsense) { + ata_cam_process_sense(dev, request); + return; + } + ccb->ccb_h.status &= ~CAM_STATUS_MASK; if (request->flags & ATA_R_TIMEOUT) { xpt_freeze_simq(ch->sim, 1); @@ -1530,8 +1601,13 @@ ata_cam_end_transaction(device_t dev, st ccb->csio.dxfer_len - request->donecount; } } - ata_free_request(request); - xpt_done(ccb); + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && + (ccb->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0) + ata_cam_request_sense(dev, request); + else { + ata_free_request(request); + xpt_done(ccb); + } /* Do error recovery if needed. */ if (fatalerr) ata_reinit(dev); Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Tue Apr 19 16:52:36 2011 (r220854) +++ stable/8/sys/dev/ata/ata-all.h Tue Apr 19 17:01:05 2011 (r220855) @@ -585,8 +585,9 @@ struct ata_channel { #ifdef ATA_CAM struct cam_sim *sim; struct cam_path *path; - struct ata_cam_device user[16]; /* User-specified settings */ - struct ata_cam_device curr[16]; /* Current settings */ + struct ata_cam_device user[16]; /* User-specified settings */ + struct ata_cam_device curr[16]; /* Current settings */ + int requestsense; /* CCB waiting for SENSE. */ #endif struct callout poll_callout; /* Periodic status poll. */ }; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:04:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E305A106564A; Tue, 19 Apr 2011 17:04:58 +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 CF78E8FC13; Tue, 19 Apr 2011 17:04: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 p3JH4wAf015745; Tue, 19 Apr 2011 17:04:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JH4wXw015742; Tue, 19 Apr 2011 17:04:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191704.p3JH4wXw015742@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:04: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: r220856 - 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: Tue, 19 Apr 2011 17:04:59 -0000 Author: mav Date: Tue Apr 19 17:04:58 2011 New Revision: 220856 URL: http://svn.freebsd.org/changeset/base/220856 Log: MFC r220565: Implement automatic SCSI sense fetching for ahci(4). 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:01:05 2011 (r220855) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:04:58 2011 (r220856) @@ -91,8 +91,9 @@ static int ahci_sata_connect(struct ahci 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_issue_recovery(device_t dev); static void ahci_process_read_log(device_t dev, union ccb *ccb); +static void ahci_process_request_sense(device_t dev, union ccb *ccb); static void ahciaction(struct cam_sim *sim, union ccb *ccb); static void ahcipoll(struct cam_sim *sim); @@ -267,6 +268,12 @@ static struct { {0x00000000, 0x00, NULL, 0} }; +#define recovery_type spriv_field0 +#define RECOVERY_NONE 0 +#define RECOVERY_READ_LOG 1 +#define RECOVERY_REQUEST_SENSE 2 +#define recovery_slot spriv_field1 + static int ahci_probe(device_t dev) { @@ -1459,7 +1466,7 @@ ahci_ch_intr(void *data) * We can't reinit port if there are some other * commands active, use resume to complete them. */ - if (ch->rslots != 0) + if (ch->rslots != 0 && !ch->recoverycmd) ATA_OUTL(ch->r_mem, AHCI_P_FBS, AHCI_P_FBS_EN | AHCI_P_FBS_DEC); } /* Process NOTIFY events */ @@ -1931,7 +1938,7 @@ ahci_end_transaction(struct ahci_slot *s 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) && + if ((et != AHCI_ERR_NONE) && (!ch->recoverycmd) && !(ccb->ccb_h.status & CAM_DEV_QFRZN)) { xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -1962,7 +1969,7 @@ ahci_end_transaction(struct ahci_slot *s break; case AHCI_ERR_SATA: ch->fatalerr = 1; - if (!ch->readlog) { + if (!ch->recoverycmd) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_RELEASE_SIMQ; @@ -1970,7 +1977,7 @@ ahci_end_transaction(struct ahci_slot *s ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case AHCI_ERR_TIMEOUT: - if (!ch->readlog) { + if (!ch->recoverycmd) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_RELEASE_SIMQ; @@ -2013,10 +2020,15 @@ ahci_end_transaction(struct ahci_slot *s return; } /* If it was our READ LOG command - process it. */ - if (ch->readlog) { + if (ccb->ccb_h.recovery_type == RECOVERY_READ_LOG) { ahci_process_read_log(dev, ccb); - /* If it was NCQ command error, put result on hold. */ - } else if (et == AHCI_ERR_NCQ) { + /* If it was our REQUEST SENSE command - process it. */ + } else if (ccb->ccb_h.recovery_type == RECOVERY_REQUEST_SENSE) { + ahci_process_request_sense(dev, ccb); + /* If it was NCQ or ATAPI command error, put result on hold. */ + } else if (et == AHCI_ERR_NCQ || + ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && + (ccb->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0)) { ch->hold[slot->slot] = ccb; ch->numhslots++; } else @@ -2040,8 +2052,8 @@ ahci_end_transaction(struct ahci_slot *s ahci_start(dev, 1); } /* if there commands on hold, we can do READ LOG. */ - if (!ch->readlog && ch->numhslots) - ahci_issue_read_log(dev); + if (!ch->recoverycmd && ch->numhslots) + ahci_issue_recovery(dev); } /* If all the rest of commands are in timeout - give them chance. */ } else if ((ch->rslots & ~ch->toslots) == 0 && @@ -2056,14 +2068,15 @@ ahci_end_transaction(struct ahci_slot *s } static void -ahci_issue_read_log(device_t dev) +ahci_issue_recovery(device_t dev) { struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb; struct ccb_ataio *ataio; + struct ccb_scsiio *csio; int i; - ch->readlog = 1; + ch->recoverycmd = 1; /* Find some holden command. */ for (i = 0; i < ch->numslots; i++) { if (ch->hold[i]) @@ -2075,26 +2088,45 @@ ahci_issue_read_log(device_t dev) return; /* XXX */ } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ - ccb->ccb_h.func_code = XPT_ATA_IO; - ccb->ccb_h.flags = CAM_DIR_IN; - ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ - ataio = &ccb->ataio; - ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT); - if (ataio->data_ptr == NULL) { - xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + /* READ LOG */ + ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; + ccb->ccb_h.func_code = XPT_ATA_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + ataio = &ccb->ataio; + ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT); + if (ataio->data_ptr == NULL) { + xpt_free_ccb(ccb); + device_printf(dev, "Unable allocate memory for READ LOG command"); + return; /* XXX */ + } + ataio->dxfer_len = 512; + bzero(&ataio->cmd, sizeof(ataio->cmd)); + ataio->cmd.flags = CAM_ATAIO_48BIT; + ataio->cmd.command = 0x2F; /* READ LOG EXT */ + ataio->cmd.sector_count = 1; + ataio->cmd.sector_count_exp = 0; + ataio->cmd.lba_low = 0x10; + ataio->cmd.lba_mid = 0; + ataio->cmd.lba_mid_exp = 0; + } else { + /* REQUEST SENSE */ + ccb->ccb_h.recovery_type = RECOVERY_REQUEST_SENSE; + ccb->ccb_h.recovery_slot = i; + ccb->ccb_h.func_code = XPT_SCSI_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.status = 0; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + csio = &ccb->csio; + csio->data_ptr = (void *)&ch->hold[i]->csio.sense_data; + csio->dxfer_len = ch->hold[i]->csio.sense_len; + csio->cdb_len = 6; + bzero(&csio->cdb_io, sizeof(csio->cdb_io)); + csio->cdb_io.cdb_bytes[0] = 0x03; + csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } - ataio->dxfer_len = 512; - bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT; - ataio->cmd.command = 0x2F; /* READ LOG EXT */ - ataio->cmd.sector_count = 1; - ataio->cmd.sector_count_exp = 0; - ataio->cmd.lba_low = 0x10; - ataio->cmd.lba_mid = 0; - ataio->cmd.lba_mid_exp = 0; - /* Freeze SIM while doing READ LOG EXT. */ + /* Freeze SIM while doing recovery. */ xpt_freeze_simq(ch->sim, 1); ahci_begin_transaction(dev, ccb); } @@ -2107,7 +2139,7 @@ ahci_process_read_log(device_t dev, unio struct ata_res *res; int i; - ch->readlog = 0; + ch->recoverycmd = 0; data = ccb->ataio.data_ptr; if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP && @@ -2115,6 +2147,8 @@ ahci_process_read_log(device_t dev, unio for (i = 0; i < ch->numslots; i++) { if (!ch->hold[i]) continue; + if (ch->hold[i]->ccb_h.func_code != XPT_ATA_IO) + continue; if ((data[0] & 0x1F) == i) { res = &ch->hold[i]->ataio.res; res->status = data[2]; @@ -2145,6 +2179,8 @@ ahci_process_read_log(device_t dev, unio for (i = 0; i < ch->numslots; i++) { if (!ch->hold[i]) continue; + if (ch->hold[i]->ccb_h.func_code != XPT_ATA_IO) + continue; xpt_done(ch->hold[i]); ch->hold[i] = NULL; ch->numhslots--; @@ -2156,6 +2192,28 @@ ahci_process_read_log(device_t dev, unio } static void +ahci_process_request_sense(device_t dev, union ccb *ccb) +{ + struct ahci_channel *ch = device_get_softc(dev); + int i; + + ch->recoverycmd = 0; + + i = ccb->ccb_h.recovery_slot; + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + ch->hold[i]->ccb_h.status |= CAM_AUTOSNS_VALID; + } else { + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_AUTOSENSE_FAIL; + } + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + xpt_free_ccb(ccb); + xpt_release_simq(ch->sim, TRUE); +} + +static void ahci_start(device_t dev, int fbs) { struct ahci_channel *ch = device_get_softc(dev); @@ -2513,6 +2571,7 @@ ahciaction(struct cam_sim *sim, union cc ccb->ccb_h.status = CAM_SEL_TIMEOUT; break; } + ccb->ccb_h.recovery_type = RECOVERY_NONE; /* Check for command collision. */ if (ahci_check_collision(dev, ccb)) { /* Freeze command. */ Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Tue Apr 19 17:01:05 2011 (r220855) +++ stable/8/sys/dev/ahci/ahci.h Tue Apr 19 17:04:58 2011 (r220856) @@ -408,7 +408,7 @@ struct ahci_channel { 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 recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:06:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184E01065672; Tue, 19 Apr 2011 17:06:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047738FC0A; Tue, 19 Apr 2011 17:06: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 p3JH6hnd015832; Tue, 19 Apr 2011 17:06:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JH6hbr015829; Tue, 19 Apr 2011 17:06:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191706.p3JH6hbr015829@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:06: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: r220857 - 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: Tue, 19 Apr 2011 17:06:44 -0000 Author: mav Date: Tue Apr 19 17:06:43 2011 New Revision: 220857 URL: http://svn.freebsd.org/changeset/base/220857 Log: MFC r220566: Implement automatic SCSI sense fetching for siis(4). Fix device freeze leak on recovery request (READ LOG, REQUEST SENSE) failure. Modified: stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Apr 19 17:04:58 2011 (r220856) +++ stable/8/sys/dev/siis/siis.c Tue Apr 19 17:06:43 2011 (r220857) @@ -84,8 +84,9 @@ static int siis_wait_ready(device_t dev, static int siis_sata_connect(struct siis_channel *ch); -static void siis_issue_read_log(device_t dev); +static void siis_issue_recovery(device_t dev); static void siis_process_read_log(device_t dev, union ccb *ccb); +static void siis_process_request_sense(device_t dev, union ccb *ccb); static void siisaction(struct cam_sim *sim, union ccb *ccb); static void siispoll(struct cam_sim *sim); @@ -110,6 +111,12 @@ static struct { {0, NULL, 0, 0} }; +#define recovery_type spriv_field0 +#define RECOVERY_NONE 0 +#define RECOVERY_READ_LOG 1 +#define RECOVERY_REQUEST_SENSE 2 +#define recovery_slot spriv_field1 + static int siis_probe(device_t dev) { @@ -873,7 +880,7 @@ siis_ch_intr(void *data) // __func__, sstatus, istatus, ch->rslots, estatus, ccs, port, // ATA_INL(ch->r_mem, SIIS_P_SERR)); - if (!ch->readlog && !ch->recovery) { + if (!ch->recoverycmd && !ch->recovery) { xpt_freeze_simq(ch->sim, ch->numrslots); ch->recovery = 1; } @@ -914,7 +921,7 @@ siis_ch_intr(void *data) * We can't reinit port if there are some other * commands active, use resume to complete them. */ - if (ch->rslots != 0) + if (ch->rslots != 0 && !ch->recoverycmd) ATA_OUTL(ch->r_mem, SIIS_P_CTLSET, SIIS_P_CTL_RESUME); } else { if (estatus == SIIS_P_CMDERR_SENDFIS || @@ -1021,7 +1028,7 @@ siis_dmasetprd(void *arg, bus_dma_segmen mtx_assert(&ch->mtx, MA_OWNED); if (error) { device_printf(slot->dev, "DMA load error\n"); - if (!ch->readlog) + if (!ch->recoverycmd) xpt_freeze_simq(ch->sim, 1); siis_end_transaction(slot, SIIS_ERR_INVALID); return; @@ -1101,7 +1108,7 @@ siis_execute_transaction(struct siis_slo /* Setup the FIS for this request */ if (!siis_setup_fis(dev, ctp, ccb, slot->slot)) { device_printf(ch->dev, "Setting up SATA FIS failed\n"); - if (!ch->readlog) + if (!ch->recoverycmd) xpt_freeze_simq(ch->sim, 1); siis_end_transaction(slot, SIIS_ERR_INVALID); return; @@ -1129,7 +1136,7 @@ siis_process_timeout(device_t dev) int i; mtx_assert(&ch->mtx, MA_OWNED); - if (!ch->readlog && !ch->recovery) { + if (!ch->recoverycmd && !ch->recovery) { xpt_freeze_simq(ch->sim, ch->numrslots); ch->recovery = 1; } @@ -1251,7 +1258,7 @@ siis_end_transaction(struct siis_slot *s ccb->ccb_h.status |= CAM_RELEASE_SIMQ; } /* In case of error, freeze device for proper recovery. */ - if (et != SIIS_ERR_NONE && + if (et != SIIS_ERR_NONE && (!ch->recoverycmd) && !(ccb->ccb_h.status & CAM_DEV_QFRZN)) { xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -1310,10 +1317,15 @@ siis_end_transaction(struct siis_slot *s xpt_release_simq(ch->sim, TRUE); } /* If it was our READ LOG command - process it. */ - if (ch->readlog) { + if (ccb->ccb_h.recovery_type == RECOVERY_READ_LOG) { siis_process_read_log(dev, ccb); - /* If it was NCQ command error, put result on hold. */ - } else if (et == SIIS_ERR_NCQ) { + /* If it was our REQUEST SENSE command - process it. */ + } else if (ccb->ccb_h.recovery_type == RECOVERY_REQUEST_SENSE) { + siis_process_request_sense(dev, ccb); + /* If it was NCQ or ATAPI command error, put result on hold. */ + } else if (et == SIIS_ERR_NCQ || + ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && + (ccb->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0)) { ch->hold[slot->slot] = ccb; ch->numhslots++; } else @@ -1334,9 +1346,9 @@ siis_end_transaction(struct siis_slot *s /* if we have slots in error, we can reinit port. */ if (ch->eslots != 0) siis_portinit(dev); - /* if there commands on hold, we can do READ LOG. */ - if (!ch->readlog && ch->numhslots) - siis_issue_read_log(dev); + /* if there commands on hold, we can do recovery. */ + if (!ch->recoverycmd && ch->numhslots) + siis_issue_recovery(dev); } /* If all the reset of commands are in timeout - abort them. */ } else if ((ch->rslots & ~ch->toslots) == 0 && @@ -1345,11 +1357,12 @@ siis_end_transaction(struct siis_slot *s } static void -siis_issue_read_log(device_t dev) +siis_issue_recovery(device_t dev) { struct siis_channel *ch = device_get_softc(dev); union ccb *ccb; struct ccb_ataio *ataio; + struct ccb_scsiio *csio; int i; /* Find some holden command. */ @@ -1359,32 +1372,51 @@ siis_issue_read_log(device_t dev) } if (i == SIIS_MAX_SLOTS) return; - ch->readlog = 1; + ch->recoverycmd = 1; ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { device_printf(dev, "Unable allocate READ LOG command"); return; /* XXX */ } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ - ccb->ccb_h.func_code = XPT_ATA_IO; - ccb->ccb_h.flags = CAM_DIR_IN; - ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ - ataio = &ccb->ataio; - ataio->data_ptr = malloc(512, M_SIIS, M_NOWAIT); - if (ataio->data_ptr == NULL) { - xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + /* READ LOG */ + ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; + ccb->ccb_h.func_code = XPT_ATA_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + ataio = &ccb->ataio; + ataio->data_ptr = malloc(512, M_SIIS, M_NOWAIT); + if (ataio->data_ptr == NULL) { + xpt_free_ccb(ccb); + device_printf(dev, "Unable allocate memory for READ LOG command"); + return; /* XXX */ + } + ataio->dxfer_len = 512; + bzero(&ataio->cmd, sizeof(ataio->cmd)); + ataio->cmd.flags = CAM_ATAIO_48BIT; + ataio->cmd.command = 0x2F; /* READ LOG EXT */ + ataio->cmd.sector_count = 1; + ataio->cmd.sector_count_exp = 0; + ataio->cmd.lba_low = 0x10; + ataio->cmd.lba_mid = 0; + ataio->cmd.lba_mid_exp = 0; + } else { + /* REQUEST SENSE */ + ccb->ccb_h.recovery_type = RECOVERY_REQUEST_SENSE; + ccb->ccb_h.recovery_slot = i; + ccb->ccb_h.func_code = XPT_SCSI_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.status = 0; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + csio = &ccb->csio; + csio->data_ptr = (void *)&ch->hold[i]->csio.sense_data; + csio->dxfer_len = ch->hold[i]->csio.sense_len; + csio->cdb_len = 6; + bzero(&csio->cdb_io, sizeof(csio->cdb_io)); + csio->cdb_io.cdb_bytes[0] = 0x03; + csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } - ataio->dxfer_len = 512; - bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT; - ataio->cmd.command = 0x2F; /* READ LOG EXT */ - ataio->cmd.sector_count = 1; - ataio->cmd.sector_count_exp = 0; - ataio->cmd.lba_low = 0x10; - ataio->cmd.lba_mid = 0; - ataio->cmd.lba_mid_exp = 0; siis_begin_transaction(dev, ccb); } @@ -1396,7 +1428,7 @@ siis_process_read_log(device_t dev, unio struct ata_res *res; int i; - ch->readlog = 0; + ch->recoverycmd = 0; data = ccb->ataio.data_ptr; if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP && (data[0] & 0x80) == 0) { @@ -1447,6 +1479,27 @@ siis_process_read_log(device_t dev, unio } static void +siis_process_request_sense(device_t dev, union ccb *ccb) +{ + struct siis_channel *ch = device_get_softc(dev); + int i; + + ch->recoverycmd = 0; + + i = ccb->ccb_h.recovery_slot; + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + ch->hold[i]->ccb_h.status |= CAM_AUTOSNS_VALID; + } else { + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_AUTOSENSE_FAIL; + } + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + xpt_free_ccb(ccb); +} + +static void siis_portinit(device_t dev) { struct siis_channel *ch = device_get_softc(dev); @@ -1512,7 +1565,7 @@ siis_reset(device_t dev) xpt_freeze_simq(ch->sim, 1); if (bootverbose) device_printf(dev, "SIIS reset...\n"); - if (!ch->readlog && !ch->recovery) + if (!ch->recoverycmd && !ch->recovery) xpt_freeze_simq(ch->sim, ch->numrslots); /* Requeue frozen command. */ if (ch->frozen) { @@ -1732,6 +1785,7 @@ siisaction(struct cam_sim *sim, union cc ccb->ccb_h.status = CAM_SEL_TIMEOUT; break; } + ccb->ccb_h.recovery_type = RECOVERY_NONE; /* Check for command collision. */ if (siis_check_collision(dev, ccb)) { /* Freeze command. */ Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Tue Apr 19 17:04:58 2011 (r220856) +++ stable/8/sys/dev/siis/siis.h Tue Apr 19 17:06:43 2011 (r220857) @@ -388,7 +388,7 @@ struct siis_channel { int numrslots; /* Number of running slots */ int numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */ int numhslots; /* Number of holden slots */ - int readlog; /* Our READ LOG active */ + int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int recovery; /* Some slots are in error */ union ccb *frozen; /* Frozen command */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:08:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 481651065670; Tue, 19 Apr 2011 17:08: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 344618FC15; Tue, 19 Apr 2011 17:08: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 p3JH8Um2015917; Tue, 19 Apr 2011 17:08:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JH8Ulp015914; Tue, 19 Apr 2011 17:08:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191708.p3JH8Ulp015914@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:08: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: r220858 - stable/8/sys/dev/mvs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 17:08:30 -0000 Author: mav Date: Tue Apr 19 17:08:29 2011 New Revision: 220858 URL: http://svn.freebsd.org/changeset/base/220858 Log: MFC r220569: Implement automatic SCSI sense fetching for mvs(4). Make few improvements/changes to ATAPI PIO support to pass most of scgcheck (cdrtools) tests. Modified: stable/8/sys/dev/mvs/mvs.c stable/8/sys/dev/mvs/mvs.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/mvs/mvs.c ============================================================================== --- stable/8/sys/dev/mvs/mvs.c Tue Apr 19 17:06:43 2011 (r220857) +++ stable/8/sys/dev/mvs/mvs.c Tue Apr 19 17:08:29 2011 (r220858) @@ -85,14 +85,21 @@ static void mvs_requeue_frozen(device_t static void mvs_execute_transaction(struct mvs_slot *slot); static void mvs_end_transaction(struct mvs_slot *slot, enum mvs_err_type et); -static void mvs_issue_read_log(device_t dev); +static void mvs_issue_recovery(device_t dev); static void mvs_process_read_log(device_t dev, union ccb *ccb); +static void mvs_process_request_sense(device_t dev, union ccb *ccb); static void mvsaction(struct cam_sim *sim, union ccb *ccb); static void mvspoll(struct cam_sim *sim); MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); +#define recovery_type spriv_field0 +#define RECOVERY_NONE 0 +#define RECOVERY_READ_LOG 1 +#define RECOVERY_REQUEST_SENSE 2 +#define recovery_slot spriv_field1 + static int mvs_ch_probe(device_t dev) { @@ -821,7 +828,8 @@ mvs_legacy_intr(device_t dev) union ccb *ccb = slot->ccb; enum mvs_err_type et = MVS_ERR_NONE; int port; - u_int length; + u_int length, resid, size; + uint8_t buf[2]; uint8_t status, ireason; /* Clear interrupt and get status. */ @@ -894,6 +902,7 @@ mvs_legacy_intr(device_t dev) } else { /* ATAPI PIO */ length = ATA_INB(ch->r_mem,ATA_CYL_LSB) | (ATA_INB(ch->r_mem,ATA_CYL_MSB) << 8); + size = min(ch->transfersize, length); ireason = ATA_INB(ch->r_mem,ATA_IREASON); switch ((ireason & (ATA_I_CMD | ATA_I_IN)) | (status & ATA_S_DRQ)) { @@ -912,7 +921,10 @@ mvs_legacy_intr(device_t dev) } ATA_OUTSW_STRM(ch->r_mem, ATA_DATA, (uint16_t *)(ccb->csio.data_ptr + ch->donecount), - length / 2); + (size + 1) / 2); + for (resid = ch->transfersize + (size & 1); + resid < length; resid += sizeof(int16_t)) + ATA_OUTW(ch->r_mem, ATA_DATA, 0); ch->donecount += length; /* Set next transfer size according to HW capabilities */ ch->transfersize = min(ccb->csio.dxfer_len - ch->donecount, @@ -926,9 +938,19 @@ mvs_legacy_intr(device_t dev) et = MVS_ERR_TFE; goto end_finished; } - ATA_INSW_STRM(ch->r_mem, ATA_DATA, - (uint16_t *)(ccb->csio.data_ptr + ch->donecount), - length / 2); + if (size >= 2) { + ATA_INSW_STRM(ch->r_mem, ATA_DATA, + (uint16_t *)(ccb->csio.data_ptr + ch->donecount), + size / 2); + } + if (size & 1) { + ATA_INSW_STRM(ch->r_mem, ATA_DATA, (void*)buf, 1); + ((uint8_t *)ccb->csio.data_ptr + ch->donecount + + (size & ~1))[0] = buf[0]; + } + for (resid = ch->transfersize + (size & 1); + resid < length; resid += sizeof(int16_t)) + ATA_INW(ch->r_mem, ATA_DATA); ch->donecount += length; /* Set next transfer size according to HW capabilities */ ch->transfersize = min(ccb->csio.dxfer_len - ch->donecount, @@ -1362,8 +1384,7 @@ mvs_legacy_execute_transaction(struct mv ATA_OUTL(ch->r_mem, DMA_C, DMA_C_START | (((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) ? DMA_C_READ : 0)); - } else if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) - ch->fake_busy = 1; + } } /* Start command execution timeout */ callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000, @@ -1578,6 +1599,10 @@ mvs_end_transaction(struct mvs_slot *slo mvs_tfd_read(dev, ccb); } else bzero(res, sizeof(*res)); + } else { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && + ch->basic_dma == 0) + ccb->csio.resid = ccb->csio.dxfer_len - ch->donecount; } if (ch->numpslots == 0 || ch->basic_dma) { if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { @@ -1590,7 +1615,7 @@ mvs_end_transaction(struct mvs_slot *slo if (et != MVS_ERR_NONE) ch->eslots |= (1 << slot->slot); /* In case of error, freeze device for proper recovery. */ - if ((et != MVS_ERR_NONE) && (!ch->readlog) && + if ((et != MVS_ERR_NONE) && (!ch->recoverycmd) && !(ccb->ccb_h.status & CAM_DEV_QFRZN)) { xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -1621,7 +1646,7 @@ mvs_end_transaction(struct mvs_slot *slo break; case MVS_ERR_SATA: ch->fatalerr = 1; - if (!ch->readlog) { + if (!ch->recoverycmd) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_RELEASE_SIMQ; @@ -1629,7 +1654,7 @@ mvs_end_transaction(struct mvs_slot *slo ccb->ccb_h.status |= CAM_UNCOR_PARITY; break; case MVS_ERR_TIMEOUT: - if (!ch->readlog) { + if (!ch->recoverycmd) { xpt_freeze_simq(ch->sim, 1); ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_RELEASE_SIMQ; @@ -1671,10 +1696,15 @@ mvs_end_transaction(struct mvs_slot *slo xpt_release_simq(ch->sim, TRUE); } /* If it was our READ LOG command - process it. */ - if (ch->readlog) { + if (ccb->ccb_h.recovery_type == RECOVERY_READ_LOG) { mvs_process_read_log(dev, ccb); - /* If it was NCQ command error, put result on hold. */ - } else if (et == MVS_ERR_NCQ) { + /* If it was our REQUEST SENSE command - process it. */ + } else if (ccb->ccb_h.recovery_type == RECOVERY_REQUEST_SENSE) { + mvs_process_request_sense(dev, ccb); + /* If it was NCQ or ATAPI command error, put result on hold. */ + } else if (et == MVS_ERR_NCQ || + ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && + (ccb->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0)) { ch->hold[slot->slot] = ccb; ch->holdtag[slot->slot] = slot->tag; ch->numhslots++; @@ -1699,8 +1729,8 @@ mvs_end_transaction(struct mvs_slot *slo ch->eslots = 0; } /* if there commands on hold, we can do READ LOG. */ - if (!ch->readlog && ch->numhslots) - mvs_issue_read_log(dev); + if (!ch->recoverycmd && ch->numhslots) + mvs_issue_recovery(dev); } /* If all the rest of commands are in timeout - give them chance. */ } else if ((ch->rslots & ~ch->toslots) == 0 && @@ -1715,14 +1745,15 @@ mvs_end_transaction(struct mvs_slot *slo } static void -mvs_issue_read_log(device_t dev) +mvs_issue_recovery(device_t dev) { struct mvs_channel *ch = device_get_softc(dev); union ccb *ccb; struct ccb_ataio *ataio; + struct ccb_scsiio *csio; int i; - ch->readlog = 1; + ch->recoverycmd = 1; /* Find some holden command. */ for (i = 0; i < MVS_MAX_SLOTS; i++) { if (ch->hold[i]) @@ -1734,25 +1765,44 @@ mvs_issue_read_log(device_t dev) return; /* XXX */ } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ - ccb->ccb_h.func_code = XPT_ATA_IO; - ccb->ccb_h.flags = CAM_DIR_IN; - ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ - ataio = &ccb->ataio; - ataio->data_ptr = malloc(512, M_MVS, M_NOWAIT); - if (ataio->data_ptr == NULL) { - xpt_free_ccb(ccb); - device_printf(dev, "Unable allocate memory for READ LOG command"); - return; /* XXX */ + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + /* READ LOG */ + ccb->ccb_h.recovery_type = RECOVERY_READ_LOG; + ccb->ccb_h.func_code = XPT_ATA_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + ataio = &ccb->ataio; + ataio->data_ptr = malloc(512, M_MVS, M_NOWAIT); + if (ataio->data_ptr == NULL) { + xpt_free_ccb(ccb); + device_printf(dev, "Unable allocate memory for READ LOG command"); + return; /* XXX */ + } + ataio->dxfer_len = 512; + bzero(&ataio->cmd, sizeof(ataio->cmd)); + ataio->cmd.flags = CAM_ATAIO_48BIT; + ataio->cmd.command = 0x2F; /* READ LOG EXT */ + ataio->cmd.sector_count = 1; + ataio->cmd.sector_count_exp = 0; + ataio->cmd.lba_low = 0x10; + ataio->cmd.lba_mid = 0; + ataio->cmd.lba_mid_exp = 0; + } else { + /* REQUEST SENSE */ + ccb->ccb_h.recovery_type = RECOVERY_REQUEST_SENSE; + ccb->ccb_h.recovery_slot = i; + ccb->ccb_h.func_code = XPT_SCSI_IO; + ccb->ccb_h.flags = CAM_DIR_IN; + ccb->ccb_h.status = 0; + ccb->ccb_h.timeout = 1000; /* 1s should be enough. */ + csio = &ccb->csio; + csio->data_ptr = (void *)&ch->hold[i]->csio.sense_data; + csio->dxfer_len = ch->hold[i]->csio.sense_len; + csio->cdb_len = 6; + bzero(&csio->cdb_io, sizeof(csio->cdb_io)); + csio->cdb_io.cdb_bytes[0] = 0x03; + csio->cdb_io.cdb_bytes[4] = csio->dxfer_len; } - ataio->dxfer_len = 512; - bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT; - ataio->cmd.command = 0x2F; /* READ LOG EXT */ - ataio->cmd.sector_count = 1; - ataio->cmd.sector_count_exp = 0; - ataio->cmd.lba_low = 0x10; - ataio->cmd.lba_mid = 0; - ataio->cmd.lba_mid_exp = 0; /* Freeze SIM while doing READ LOG EXT. */ xpt_freeze_simq(ch->sim, 1); mvs_begin_transaction(dev, ccb); @@ -1766,7 +1816,7 @@ mvs_process_read_log(device_t dev, union struct ata_res *res; int i; - ch->readlog = 0; + ch->recoverycmd = 0; data = ccb->ataio.data_ptr; if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP && @@ -1819,6 +1869,28 @@ mvs_process_read_log(device_t dev, union xpt_release_simq(ch->sim, TRUE); } +static void +mvs_process_request_sense(device_t dev, union ccb *ccb) +{ + struct mvs_channel *ch = device_get_softc(dev); + int i; + + ch->recoverycmd = 0; + + i = ccb->ccb_h.recovery_slot; + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + ch->hold[i]->ccb_h.status |= CAM_AUTOSNS_VALID; + } else { + ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK; + ch->hold[i]->ccb_h.status |= CAM_AUTOSENSE_FAIL; + } + xpt_done(ch->hold[i]); + ch->hold[i] = NULL; + ch->numhslots--; + xpt_free_ccb(ccb); + xpt_release_simq(ch->sim, TRUE); +} + static int mvs_wait(device_t dev, u_int s, u_int c, int t) { @@ -2051,6 +2123,7 @@ mvsaction(struct cam_sim *sim, union ccb ccb->ccb_h.status = CAM_SEL_TIMEOUT; break; } + ccb->ccb_h.recovery_type = RECOVERY_NONE; /* Check for command collision. */ if (mvs_check_collision(dev, ccb)) { /* Freeze command. */ Modified: stable/8/sys/dev/mvs/mvs.h ============================================================================== --- stable/8/sys/dev/mvs/mvs.h Tue Apr 19 17:06:43 2011 (r220857) +++ stable/8/sys/dev/mvs/mvs.h Tue Apr 19 17:08:29 2011 (r220858) @@ -557,7 +557,7 @@ struct mvs_channel { int numtslots; /* Number of NCQ slots */ int numtslotspd[16];/* Number of NCQ slots per dev */ int numhslots; /* Number of holden slots */ - int readlog; /* Our READ LOG active */ + int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:13:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E34C81065674; Tue, 19 Apr 2011 17:13:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFF1F8FC19; Tue, 19 Apr 2011 17:13: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 p3JHDEHN016086; Tue, 19 Apr 2011 17:13:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JHDEYv016083; Tue, 19 Apr 2011 17:13:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191713.p3JHDEYv016083@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:13: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: r220859 - 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: Tue, 19 Apr 2011 17:13:15 -0000 Author: mav Date: Tue Apr 19 17:13:14 2011 New Revision: 220859 URL: http://svn.freebsd.org/changeset/base/220859 Log: MFC r220576: Refactor hard-reset implementation in ahci(4). Instead of spinning in a tight loop for up to 15 seconds, polling for device readiness while it spins up, return reset completion just after PHY reports "connect well" or 100ms connection timeout. If device was found, use callout for checking device readiness with 100ms period up to full 31 second timeout. This fixes system freeze for 5-10 seconds on drives hot plug-in. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:08:29 2011 (r220858) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:13:14 2011 (r220859) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -89,7 +90,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 int ahci_wait_ready(device_t dev, int t, int t0); static void ahci_issue_recovery(device_t dev); static void ahci_process_read_log(device_t dev, union ccb *ccb); @@ -883,6 +884,7 @@ ahci_ch_attach(device_t dev) device_get_unit(dev), "pm_level", &ch->pm_level); if (ch->pm_level > 3) callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); + callout_init_mtx(&ch->reset_timer, &ch->mtx, 0); /* Limit speed for my onboard JMicron external port. * It is not eSATA really. */ if (pci_get_devid(ctlr->dev) == 0x2363197b && @@ -999,6 +1001,11 @@ ahci_ch_detach(device_t dev) mtx_lock(&ch->mtx); xpt_async(AC_LOST_DEVICE, ch->path, NULL); + /* Forget about reset. */ + if (ch->resetting) { + ch->resetting = 0; + xpt_release_simq(ch->sim, TRUE); + } xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); @@ -1006,6 +1013,7 @@ ahci_ch_detach(device_t dev) if (ch->pm_level > 3) callout_drain(&ch->pm_timer); + callout_drain(&ch->reset_timer); bus_teardown_intr(dev, ch->r_irq, ch->ih); bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); @@ -1071,6 +1079,12 @@ ahci_ch_suspend(device_t dev) mtx_lock(&ch->mtx); xpt_freeze_simq(ch->sim, 1); + /* Forget about reset. */ + if (ch->resetting) { + ch->resetting = 0; + callout_stop(&ch->reset_timer); + xpt_release_simq(ch->sim, TRUE); + } while (ch->oslots) msleep(ch, &ch->mtx, PRIBIO, "ahcisusp", hz/100); ahci_ch_deinit(dev); @@ -2314,7 +2328,7 @@ ahci_start_fr(device_t dev) } static int -ahci_wait_ready(device_t dev, int t) +ahci_wait_ready(device_t dev, int t, int t0) { struct ahci_channel *ch = device_get_softc(dev); int timeout = 0; @@ -2322,19 +2336,50 @@ ahci_wait_ready(device_t dev, int t) while ((val = ATA_INL(ch->r_mem, AHCI_P_TFD)) & (ATA_S_BUSY | ATA_S_DRQ)) { - DELAY(1000); - if (timeout++ > t) { - device_printf(dev, "device is not ready (timeout %dms) " - "tfd = %08x\n", t, val); + if (timeout > t) { + if (t != 0) { + device_printf(dev, + "AHCI reset: device not ready after %dms " + "(tfd = %08x)\n", + MAX(t, 0) + t0, val); + } return (EBUSY); } - } + DELAY(1000); + timeout++; + } if (bootverbose) - device_printf(dev, "ready wait time=%dms\n", timeout); + device_printf(dev, "AHCI reset: device ready after %dms\n", + timeout + t0); return (0); } static void +ahci_reset_to(void *arg) +{ + device_t dev = arg; + struct ahci_channel *ch = device_get_softc(dev); + + if (ch->resetting == 0) + return; + ch->resetting--; + if (ahci_wait_ready(dev, ch->resetting == 0 ? -1 : 0, + (310 - ch->resetting) * 100) == 0) { + ch->resetting = 0; + xpt_release_simq(ch->sim, TRUE); + return; + } + if (ch->resetting == 0) { + ahci_stop(dev); + ahci_clo(dev); + ahci_start(dev, 1); + xpt_release_simq(ch->sim, TRUE); + return; + } + callout_schedule(&ch->reset_timer, hz / 10); +} + +static void ahci_reset(device_t dev) { struct ahci_channel *ch = device_get_softc(dev); @@ -2344,6 +2389,12 @@ ahci_reset(device_t dev) xpt_freeze_simq(ch->sim, 1); if (bootverbose) device_printf(dev, "AHCI reset...\n"); + /* Forget about previous reset. */ + if (ch->resetting) { + ch->resetting = 0; + callout_stop(&ch->reset_timer); + xpt_release_simq(ch->sim, TRUE); + } /* Requeue freezed command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; @@ -2384,7 +2435,7 @@ ahci_reset(device_t dev) if (!ahci_sata_phy_reset(dev)) { if (bootverbose) device_printf(dev, - "AHCI reset done: phy reset found no device\n"); + "AHCI reset: device not found\n"); ch->devices = 0; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, @@ -2392,9 +2443,15 @@ ahci_reset(device_t dev) xpt_release_simq(ch->sim, TRUE); return; } + if (bootverbose) + device_printf(dev, "AHCI reset: device found\n"); /* Wait for clearing busy status. */ - if (ahci_wait_ready(dev, 15000)) - ahci_clo(dev); + if (ahci_wait_ready(dev, dumping ? 31000 : 0, 0)) { + if (dumping) + ahci_clo(dev); + else + ch->resetting = 310; + } ahci_start(dev, 1); ch->devices = 1; /* Enable wanted port interrupts */ @@ -2404,9 +2461,10 @@ ahci_reset(device_t dev) ((ch->pm_level == 0) ? AHCI_P_IX_PRC | AHCI_P_IX_PC : 0) | AHCI_P_IX_DP | AHCI_P_IX_UF | (ctlr->ccc ? 0 : AHCI_P_IX_SDB) | AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); - if (bootverbose) - device_printf(dev, "AHCI reset done: device found\n"); - xpt_release_simq(ch->sim, TRUE); + if (ch->resetting) + callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, dev); + else + xpt_release_simq(ch->sim, TRUE); } static int Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Tue Apr 19 17:08:29 2011 (r220858) +++ stable/8/sys/dev/ahci/ahci.h Tue Apr 19 17:13:14 2011 (r220859) @@ -412,8 +412,10 @@ struct ahci_channel { int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ + int resetting; /* Hard-reset in progress. */ union ccb *frozen; /* Frozen command */ struct callout pm_timer; /* Power management events */ + struct callout reset_timer; /* Hard-reset timeout */ struct ahci_device user[16]; /* User-specified settings */ struct ahci_device curr[16]; /* Current settings */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:14:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B805106564A; Tue, 19 Apr 2011 17:14:58 +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 28A4B8FC0A; Tue, 19 Apr 2011 17:14: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 p3JHEwYm016167; Tue, 19 Apr 2011 17:14:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JHEwio016165; Tue, 19 Apr 2011 17:14:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191714.p3JHEwio016165@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:14: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: r220860 - 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: Tue, 19 Apr 2011 17:14:58 -0000 Author: mav Date: Tue Apr 19 17:14:57 2011 New Revision: 220860 URL: http://svn.freebsd.org/changeset/base/220860 Log: MFC r220591: As soon as siis_reset() doesn't waits for device readiness, but only for controller port readiness (that should set just after PHY ready signal), reduce wait time from 10s to 1s before trying more aggressive reset method. This should improve system responsibility in some failure conditions. 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) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Apr 19 17:13:14 2011 (r220859) +++ stable/8/sys/dev/siis/siis.c Tue Apr 19 17:14:57 2011 (r220860) @@ -1631,9 +1631,9 @@ retry: xpt_release_simq(ch->sim, TRUE); return; } - /* Wait for clearing busy status. */ - if (siis_wait_ready(dev, 10000)) { - device_printf(dev, "device ready timeout\n"); + /* Wait for port ready status. */ + if (siis_wait_ready(dev, 1000)) { + device_printf(dev, "port ready timeout\n"); if (!retry) { device_printf(dev, "trying full port reset ...\n"); /* Get port to the reset state. */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:41:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC1EB106566C; Tue, 19 Apr 2011 17:41:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D738E8FC15; Tue, 19 Apr 2011 17:41: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 p3JHfH9Z016933; Tue, 19 Apr 2011 17:41:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JHfHcS016925; Tue, 19 Apr 2011 17:41:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104191741.p3JHfHcS016925@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 17:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220861 - in stable/8/sys: cam cam/ata dev/ahci dev/mvs dev/siis 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: Tue, 19 Apr 2011 17:41:18 -0000 Author: mav Date: Tue Apr 19 17:41:17 2011 New Revision: 220861 URL: http://svn.freebsd.org/changeset/base/220861 Log: MFC r220602: Improve SATA Asynchronous Notification feature support in CAM: - make SATA SIMs announce capabilities to handle SDB with Notification bit; - make PMP driver honor this SIMs capability; - make SATA XPT to negotiate and enable this feature for ATAPI devices. This feature allows supporting SATA ATAPI devices to inform system about some events happened, that may require attention. In my case this allows LG GH22LS50 SATA DVR-RW drive to report tray open/close events. Events reported to CAM in form of AC_SCSI_AEN async. Further they could be used as a hints for checking device status and reporting media change to upper layers, for example, via spoiling mechanism of GEOM. Modified: stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam_ccb.h stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/mvs/mvs.c stable/8/sys/dev/siis/siis.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) Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/cam/ata/ata_pmp.c Tue Apr 19 17:41:17 2011 (r220861) @@ -533,7 +533,8 @@ pmpstart(struct cam_periph *periph, unio /*data_ptr*/NULL, /*dxfer_len*/0, pmp_default_timeout * 1000); - ata_pm_write_cmd(ataio, 0x60, 15, 0xf); + ata_pm_write_cmd(ataio, 0x60, 15, 0x07 | + ((softc->caps & CTS_SATA_CAPS_H_AN) ? 0x08 : 0)); break; default: break; @@ -672,7 +673,9 @@ pmpdone(struct cam_periph *periph, union cts.xport_specific.sata.revision = (res & 0x0f0) >> 4; cts.xport_specific.sata.valid = CTS_SATA_VALID_REVISION; cts.xport_specific.sata.caps = softc->caps & - (CTS_SATA_CAPS_H_PMREQ | CTS_SATA_CAPS_H_DMAAA); + (CTS_SATA_CAPS_H_PMREQ | + CTS_SATA_CAPS_H_DMAAA | + CTS_SATA_CAPS_H_AN); cts.xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); xpt_free_path(dpath); Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/cam/ata/ata_xpt.c Tue Apr 19 17:41:17 2011 (r220861) @@ -87,6 +87,7 @@ typedef enum { PROBE_SETPM, PROBE_SETAPST, PROBE_SETDMAAA, + PROBE_SETAN, PROBE_SET_MULTI, PROBE_INQUIRY, PROBE_FULL_INQUIRY, @@ -103,6 +104,7 @@ static char *probe_action_text[] = { "PROBE_SETPM", "PROBE_SETAPST", "PROBE_SETDMAAA", + "PROBE_SETAN", "PROBE_SET_MULTI", "PROBE_INQUIRY", "PROBE_FULL_INQUIRY", @@ -436,6 +438,19 @@ negotiate: (softc->caps & CTS_SATA_CAPS_H_DMAAA) ? 0x10 : 0x90, 0, 0x02); break; + case PROBE_SETAN: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_AN) ? 0x10 : 0x90, + 0, 0x05); + break; case PROBE_SET_MULTI: { u_int sectors, bytecount; @@ -1027,6 +1042,16 @@ noerror: } /* FALLTHROUGH */ case PROBE_SETDMAAA: + if ((ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) && + (!(softc->caps & CTS_SATA_CAPS_H_AN)) != + (!(ident_buf->sataenabled & ATA_SUPPORT_ASYNCNOTIF))) { + PROBE_SET_ACTION(softc, PROBE_SETAN); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETAN: notsata: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/cam/cam_ccb.h Tue Apr 19 17:41:17 2011 (r220861) @@ -849,6 +849,7 @@ struct ccb_trans_settings_sata { #define CTS_SATA_CAPS_H_PMREQ 0x00000001 #define CTS_SATA_CAPS_H_APST 0x00000002 #define CTS_SATA_CAPS_H_DMAAA 0x00000010 /* Auto-activation */ +#define CTS_SATA_CAPS_H_AN 0x00000020 /* Async. notification */ #define CTS_SATA_CAPS_D 0xffff0000 #define CTS_SATA_CAPS_D_PMREQ 0x00010000 #define CTS_SATA_CAPS_D_APST 0x00020000 Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 17:41:17 2011 (r220861) @@ -908,7 +908,8 @@ ahci_ch_attach(device_t dev) CTS_SATA_CAPS_H_APST | CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; } - ch->user[i].caps |= CTS_SATA_CAPS_H_DMAAA; + ch->user[i].caps |= CTS_SATA_CAPS_H_DMAAA | + CTS_SATA_CAPS_H_AN; } rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -2715,6 +2716,7 @@ ahciaction(struct cam_sim *sim, union cc if ((ch->caps & AHCI_CAP_SNCQ) && (ch->quirks & AHCI_Q_NOAA) == 0) cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_DMAAA; + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_AN; cts->xport_specific.sata.caps &= ch->user[ccb->ccb_h.target_id].caps; cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; Modified: stable/8/sys/dev/mvs/mvs.c ============================================================================== --- stable/8/sys/dev/mvs/mvs.c Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/dev/mvs/mvs.c Tue Apr 19 17:41:17 2011 (r220861) @@ -137,6 +137,7 @@ mvs_ch_attach(device_t dev) CTS_SATA_CAPS_H_APST | CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; } + ch->user[i].caps |= CTS_SATA_CAPS_H_AN; } rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -860,6 +861,8 @@ mvs_legacy_intr(device_t dev) if (mvs_wait(dev, ATA_S_DRQ, ATA_S_BUSY, 1000) < 0) { device_printf(dev, "timeout waiting for read DRQ\n"); et = MVS_ERR_TIMEOUT; + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); goto end_finished; } ATA_INSW_STRM(ch->r_mem, ATA_DATA, @@ -879,6 +882,8 @@ mvs_legacy_intr(device_t dev) device_printf(dev, "timeout waiting for write DRQ\n"); et = MVS_ERR_TIMEOUT; + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); goto end_finished; } ATA_OUTSW_STRM(ch->r_mem, ATA_DATA, @@ -1324,6 +1329,8 @@ mvs_legacy_execute_transaction(struct mv if (mvs_wait(dev, ATA_S_DRQ, ATA_S_BUSY, 1000) < 0) { device_printf(dev, "timeout waiting for write DRQ\n"); + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); mvs_end_transaction(slot, MVS_ERR_TIMEOUT); return; } @@ -1350,6 +1357,8 @@ mvs_legacy_execute_transaction(struct mv /* Wait for ready to write ATAPI command block */ if (mvs_wait(dev, 0, ATA_S_BUSY, 1000) < 0) { device_printf(dev, "timeout waiting for ATAPI !BUSY\n"); + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); mvs_end_transaction(slot, MVS_ERR_TIMEOUT); return; } @@ -1366,6 +1375,8 @@ mvs_legacy_execute_transaction(struct mv if (timeout <= 0) { device_printf(dev, "timeout waiting for ATAPI command ready\n"); + xpt_freeze_simq(ch->sim, 1); + ch->toslots |= (1 << slot->slot); mvs_end_transaction(slot, MVS_ERR_TIMEOUT); return; } @@ -2204,6 +2215,7 @@ mvsaction(struct cam_sim *sim, union ccb cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; // if (ch->pm_level) // cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_AN; cts->xport_specific.sata.caps &= ch->user[ccb->ccb_h.target_id].caps; cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; @@ -2211,6 +2223,9 @@ mvsaction(struct cam_sim *sim, union ccb cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; cts->xport_specific.sata.caps = d->caps; + if (cts->type == CTS_TYPE_CURRENT_SETTINGS/* && + (ch->quirks & MVS_Q_GENIIE) == 0*/) + cts->xport_specific.sata.caps &= ~CTS_SATA_CAPS_H_AN; cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/dev/siis/siis.c Tue Apr 19 17:41:17 2011 (r220861) @@ -474,6 +474,7 @@ siis_ch_attach(device_t dev) ch->curr[i] = ch->user[i]; if (ch->pm_level) ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ; + ch->user[i].caps |= CTS_SATA_CAPS_H_AN; } mtx_init(&ch->mtx, "SIIS channel lock", NULL, MTX_DEF); rid = ch->unit; @@ -1869,6 +1870,7 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; if (ch->pm_level) cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_AN; cts->xport_specific.sata.caps &= ch->user[ccb->ccb_h.target_id].caps; cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; @@ -1876,6 +1878,9 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; cts->xport_specific.sata.caps = d->caps; + if (cts->type == CTS_TYPE_CURRENT_SETTINGS && + (ch->quirks & SIIS_Q_SNTF) == 0) + cts->xport_specific.sata.caps &= ~CTS_SATA_CAPS_H_AN; cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; Modified: stable/8/sys/sys/ata.h ============================================================================== --- stable/8/sys/sys/ata.h Tue Apr 19 17:14:57 2011 (r220860) +++ stable/8/sys/sys/ata.h Tue Apr 19 17:41:17 2011 (r220861) @@ -135,6 +135,7 @@ struct ata_params { #define ATA_SUPPORT_AUTOACTIVATE 0x0004 #define ATA_SUPPORT_IFPWRMNGT 0x0008 #define ATA_SUPPORT_INORDERDATA 0x0010 +#define ATA_SUPPORT_ASYNCNOTIF 0x0020 #define ATA_SUPPORT_SOFTSETPRESERVE 0x0040 /*79*/ u_int16_t sataenabled; #define ATA_ENABLED_DAPST 0x0080 From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 17:49:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA8FD106564A; Tue, 19 Apr 2011 17:49:59 +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 981DC8FC12; Tue, 19 Apr 2011 17:49:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3JHnx2H017148; Tue, 19 Apr 2011 17:49:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JHnxUC017146; Tue, 19 Apr 2011 17:49:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104191749.p3JHnxUC017146@svn.freebsd.org> From: Marius Strobl Date: Tue, 19 Apr 2011 17:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220862 - head/sys/dev/bxe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 17:49:59 -0000 Author: marius Date: Tue Apr 19 17:49:59 2011 New Revision: 220862 URL: http://svn.freebsd.org/changeset/base/220862 Log: Remove a comment which is no longer true since r213878, apart from this driver not using mii(4) in the first place. Reviewed by: yongari Modified: head/sys/dev/bxe/if_bxe.h Modified: head/sys/dev/bxe/if_bxe.h ============================================================================== --- head/sys/dev/bxe/if_bxe.h Tue Apr 19 17:41:17 2011 (r220861) +++ head/sys/dev/bxe/if_bxe.h Tue Apr 19 17:49:59 2011 (r220862) @@ -1133,9 +1133,6 @@ struct bxe_fastpath { /* ToDo: Audit this structure for unused varaibles. */ struct bxe_softc { - /* - * MUST start with ifnet pointer (see definition of miibus_statchg()). - */ struct ifnet *bxe_ifp; int media; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 18:06:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58F37106564A; Tue, 19 Apr 2011 18:06:21 +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 1978D8FC0C; Tue, 19 Apr 2011 18:06:21 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3JI4xPx060074 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 19 Apr 2011 12:05:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201104190840.29535.jhb@freebsd.org> Date: Tue, 19 Apr 2011 12:04:53 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <6ED7B30B-B545-4E38-A157-5008A1615DBC@bsdimp.com> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <4DAC8060.2070002@FreeBSD.org> <92422863-8655-4FDE-A1E9-5EE1F46DA5BC@bsdimp.com> <201104190840.29535.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 19 Apr 2011 12:05:03 -0600 (MDT) Cc: Doug Barton , Pawel Jakub Dawidek , Roman Divacky , Dimitry Andric , src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 18:06:21 -0000 On Apr 19, 2011, at 6:40 AM, John Baldwin wrote: > On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: >>=20 >> On Apr 18, 2011, at 12:18 PM, Doug Barton wrote: >>=20 >>> On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: >>>> On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: >>>>>=20 >>>>> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >>>>>=20 >>>>>> please mark this in src/UPDATING, maybe bump freebsd_version too? >>>>>=20 >>>>> Please do not bump freebsd_version just for this. Ports wishing = to know=20 > can go off the last bump, if there are any. >>>>>=20 >>>>> Every freebsd_version bump forces rebuilding all modules and such = and is=20 > a pita. >>>>=20 >>>> I agree that this is a PITA, but there also should be a way to = force >>>> module load even on version bump. This is PITA especially for >>>> developers. >>>=20 >>> .... who make up a tiny percentage of the FreeBSD user community.=20 > Seriously? We're going to whine because version bumps cause a little = extra=20 > compile time? >>=20 >> The problem usually manifests itself when I got to debug a new = problem, load=20 > a driver and find I have to rebuild everything else to use it, which = forces an=20 > extra reboot on the machine in question. Sometimes this can be quite=20= > disruptive to other things that machine is doing. >=20 > But that is only true if your source tree doesn't match your installed = world. =20 > If the new driver is standalone and you build it as a module, it will = use the=20 > headers from /sys and will work fine. It is rarely the case that my source matches my install world. My = kernel and userland are asynchronously updated when I'm doing heavy = kernel development. My sources are updated all the time to pull in = useful things that I need. When I'm in this mode, I carefully track = what's changed to make sure there were no recompile the world events. = When a userland thing changes that bumps freebsd_version, I have to = recompile the kernel and reboot, even though there's no need to do so. = This is especially annoying when it happens a few times within one week, = since it is a hit to my productivity each time it happens. There's no = great need to have userland features identified with the fidelity of a = few dozen commits in -current. A few hundred or more would suffice for = ports and those interested, so bumping more than once a week provides = almost no benefit, but inflicts some pain. > If the new driver is part of the source tree, you do not have to = upgrade the=20 > entire world, just build a kernel + moduleset, install that to = /boot/foo and=20 > reboot into the foo kernel. Yes, that can require a reboot, but lots = of=20 > kernel development requires reboots. Just because sometimes a reboot might be required doesn't mean that = forcing a reboot is necessary. >> In this case, there was a new kernel thing just after, so it turned = out OK. =20 > But let's not gratuitously bump the version since the granularity we = have=20 > already allows the ports to make good choices on when to leave = something in or=20 > out. >=20 > Except that that directly contradicts our previously established = policy that=20 > these version bumps are cheap and that we should do more of them (this = came up=20 > a few years ago when we changed the policy so that the new "stable" = branch=20 > after a release starts at N + 500 (e.g. 802500) rather than N + 100 to = give=20 > more room for version bumps on current). We have never said that version bumps were totally cheap. In -current, = there's little benefit to bumping things more often than once a week. = Since we generally develop stable for more than 2 years, 100 wasn't = enough at the one a week rate. But that doesn't mean that 5 per week is = OK either, since now we suddenly have room for them. I'm strongly = suggesting that for userland-only changes that one check to see when the = last bump was and if it is less than a few days (or a week), then to = piggyback off the last one/next one to discriminate whether to use an = old feature, or start using a new feature. Especially for retroactive = bumps that happen disconnected to the original feature going in. Warner= From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 18:09:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3811106566B; Tue, 19 Apr 2011 18:09:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9398FC15; Tue, 19 Apr 2011 18:09: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 p3JI9Li3017880; Tue, 19 Apr 2011 18:09:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JI9LM9017871; Tue, 19 Apr 2011 18:09:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201104191809.p3JI9LM9017871@svn.freebsd.org> From: Dimitry Andric Date: Tue, 19 Apr 2011 18:09: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: r220863 - in head: share/mk sys/conf sys/dev/aic7xxx/aicasm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 18:09:21 -0000 Author: dim Date: Tue Apr 19 18:09:21 2011 New Revision: 220863 URL: http://svn.freebsd.org/changeset/base/220863 Log: Remove support for the Intel C Compiler from the build infrastructure. This support has not worked for several years, and is not likely to work again, unless Intel decides to release a native FreeBSD version of their compiler. ;) Modified: head/share/mk/bsd.cpu.mk head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.sys.mk head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/sys/dev/aic7xxx/aicasm/Makefile Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/share/mk/bsd.cpu.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -91,31 +91,6 @@ _CPUCFLAGS = -march=prescott . else _CPUCFLAGS = -march=${CPUTYPE} . endif # GCC on 'i386' -. if ${CPUTYPE} == "crusoe" -_ICC_CPUCFLAGS = -tpp6 -xiM -. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ - ${CPUTYPE} == "athlon-4" -_ICC_CPUCFLAGS = -tpp6 -xiMK -. elif ${CPUTYPE} == "athlon-tbird" || ${CPUTYPE} == "athlon" -_ICC_CPUCFLAGS = -tpp6 -xiM -. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" || ${CPUTYPE} == "k6" -_ICC_CPUCFLAGS = -tpp6 -xi -. elif ${CPUTYPE} == "k5" -_ICC_CPUCFLAGS = -tpp5 -. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" -_ICC_CPUCFLAGS = -tpp7 -xiMKW -. elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m" || \ - ${CPUTYPE} == "pentium-m" -_ICC_CPUCFLAGS = -tpp6 -xiMK -. elif ${CPUTYPE} == "pentium2" || ${CPUTYPE} == "pentiumpro" -_ICC_CPUCFLAGS = -tpp6 -xiM -. elif ${CPUTYPE} == "pentium-mmx" -_ICC_CPUCFLAGS = -tpp5 -xM -. elif ${CPUTYPE} == "pentium" -_ICC_CPUCFLAGS = -tpp5 -. else -_ICC_CPUCFLAGS = -. endif # ICC on 'i386' . elif ${MACHINE_CPUARCH} == "amd64" _CPUCFLAGS = -march=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "arm" @@ -242,9 +217,5 @@ CFLAGS += -G0 # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS) -. if ${CC} == "icc" -CFLAGS += ${_ICC_CPUCFLAGS} -. else CFLAGS += ${_CPUCFLAGS} -. endif .endif Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/share/mk/bsd.dep.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -125,13 +125,8 @@ depend: beforedepend ${DEPENDFILE} after # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. -.if ${CC:T:Micc} == "icc" -MKDEP_CFLAGS= ${CFLAGS:M-X*} ${CFLAGS:M-[BIDU]*} -MKDEP_CXXFLAGS= ${CXXFLAGS:M-X*} ${CXXFLAGS:M-[BIDU]*} -.else MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} -.endif DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/share/mk/bsd.lib.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -65,11 +65,7 @@ PICFLAG=-fpic .endif .endif -.if ${CC:T:Micc} == "icc" -PO_FLAG=-p -.else PO_FLAG=-pg -.endif .c.po: ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/share/mk/bsd.sys.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -11,20 +11,18 @@ # the default is gnu99 for now CSTD ?= gnu99 -.if ${CC:T:Micc} != "icc" -. if ${CSTD} == "k&r" +.if ${CSTD} == "k&r" CFLAGS += -traditional -. elif ${CSTD} == "c89" || ${CSTD} == "c90" +.elif ${CSTD} == "c89" || ${CSTD} == "c90" CFLAGS += -std=iso9899:1990 -. elif ${CSTD} == "c94" || ${CSTD} == "c95" +.elif ${CSTD} == "c94" || ${CSTD} == "c95" CFLAGS += -std=iso9899:199409 -. elif ${CSTD} == "c99" +.elif ${CSTD} == "c99" CFLAGS += -std=iso9899:1999 -. else +.else CFLAGS += -std=${CSTD} -. endif .endif -.if !defined(NO_WARNS) && ${CC:T:Micc} != "icc" +.if !defined(NO_WARNS) # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS += -pedantic . if defined(WARNS) @@ -82,9 +80,8 @@ CWARNFLAGS += -Wno-format CWARNFLAGS += -Wno-unknown-pragmas .endif -.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && \ - ${MACHINE_CPUARCH} != "ia64" && \ - ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ + ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS ?= -fstack-protector CFLAGS += ${SSP_CFLAGS} Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/sys/conf/kern.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -6,14 +6,9 @@ # Note that the newly added -Wcast-qual is responsible for generating # most of the remaining warnings. Warnings introduced with -Wall will # also pop up, but are easier to fix. -.if ${CC:T:Micc} == "icc" -#CWARNFLAGS= -w2 # use this if you are terribly bored -CWARNFLAGS= -.else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions -.endif # # The following flags are next up for working on: # -W @@ -29,7 +24,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # -.if ${MACHINE_CPUARCH} == "i386" && ${CC:T:Micc} != "icc" +.if ${MACHINE_CPUARCH} == "i386" .if ${CC:T:Mclang} != "clang" CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 .endif @@ -100,22 +95,13 @@ INLINE_LIMIT?= 8000 # GCC 3.0 and above like to do certain optimizations based on the # assumption that the program is linked against libc. Stop this. # -.if ${CC:T:Micc} == "icc" -CFLAGS+= -nolib_inline -.else CFLAGS+= -ffreestanding -.endif - -.if ${CC:T:Micc} == "icc" -CFLAGS+= -restrict -.endif # # GCC SSP support. # -.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && \ - ${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_CPUARCH} != "mips" +.if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ + ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/sys/conf/kern.pre.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -23,38 +23,25 @@ NM?= nm OBJCOPY?= objcopy SIZE?= size -.if ${CC:T:Micc} == "icc" -COPTFLAGS?= -O -.else -. if defined(DEBUG) +.if defined(DEBUG) _MINUS_O= -O CTFFLAGS+= -g -. else +.else _MINUS_O= -O2 -. endif -. if ${MACHINE_CPUARCH} == "amd64" +.endif +.if ${MACHINE_CPUARCH} == "amd64" COPTFLAGS?=-O2 -frename-registers -pipe -. else +.else COPTFLAGS?=${_MINUS_O} -pipe -. endif -. if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing) +.endif +.if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing) COPTFLAGS+= -fno-strict-aliasing -. endif .endif .if !defined(NO_CPU_COPTFLAGS) -. if ${CC:T:Micc} == "icc" -COPTFLAGS+= ${_ICC_CPUCFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} -. else COPTFLAGS+= ${_CPUCFLAGS} -. endif .endif -.if ${CC:T:Micc} == "icc" -C_DIALECT= -NOSTDINC= -X -.else C_DIALECT= -std=c99 NOSTDINC= -nostdinc -.endif INCLUDES= ${NOSTDINC} ${INCLMAGIC} -I. -I$S @@ -89,7 +76,6 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -.if ${CC:T:Micc} != "icc" .if ${CC:T:Mclang} != "clang" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} .if ${MACHINE_CPUARCH} != "mips" @@ -103,15 +89,11 @@ CFLAGS+= --param max-inline-insns-single .endif .endif WERROR?= -Werror -.endif # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 -.if ${CC:T:Micc} == "icc" -.error "Profiling doesn't work with icc" -.endif CFLAGS+= -DGPROF -falign-functions=16 .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Apr 19 17:49:59 2011 (r220862) +++ head/sys/conf/kmod.mk Tue Apr 19 18:09:21 2011 (r220863) @@ -88,25 +88,17 @@ __KLD_SHARED=yes __KLD_SHARED=no .endif -.if ${CC:T:Micc} == "icc" -CFLAGS:= ${CFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} -.else -. if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) +.if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing -. endif -WERROR?= -Werror .endif +WERROR?= -Werror CFLAGS+= ${WERROR} CFLAGS+= -D_KERNEL CFLAGS+= -DKLD_MODULE # Don't use any standard or source-relative include directories. -.if ${CC:T:Micc} == "icc" -NOSTDINC= -X -.else CSTD= c99 NOSTDINC= -nostdinc -.endif CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR) CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h @@ -121,7 +113,7 @@ CFLAGS+= -I. -I@ # for example. CFLAGS+= -I@/contrib/altq -.if ${CC:T:Micc} != "icc" && ${CC:T:Mclang} != "clang" +.if ${CC:T:Mclang} != "clang" CFLAGS+= -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 @@ -129,9 +121,7 @@ CFLAGS+= --param large-function-growth=1 # Disallow common variables, and if we end up with commons from # somewhere unexpected, allocate storage for them in the module itself. -.if ${CC:T:Micc} != "icc" CFLAGS+= -fno-common -.endif LDFLAGS+= -d -warn-common CFLAGS+= ${DEBUG_FLAGS} Modified: head/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- head/sys/dev/aic7xxx/aicasm/Makefile Tue Apr 19 17:49:59 2011 (r220862) +++ head/sys/dev/aic7xxx/aicasm/Makefile Tue Apr 19 18:09:21 2011 (r220863) @@ -24,12 +24,7 @@ WARNS?= 5 DEPENDFILE= .depend_aicasm .endif -.if ${CC:T:Micc} == "icc" -CFLAGS+= -restrict -NOSTDINC= -X -.else NOSTDINC= -nostdinc -.endif CFLAGS+= ${NOSTDINC} -I/usr/include -I. .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 18:13:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D7751065672; Tue, 19 Apr 2011 18:13:47 +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 975788FC16; Tue, 19 Apr 2011 18:13:46 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3JIA41B060108 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 19 Apr 2011 12:10:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201104191129.30602.jhb@freebsd.org> Date: Tue, 19 Apr 2011 12:09:58 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <2B6A971D-432F-4330-9BAB-48CAE89FF571@bsdimp.com> References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <201104190840.29535.jhb@freebsd.org> <201104191129.30602.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 19 Apr 2011 12:10:06 -0600 (MDT) Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 18:13:47 -0000 On Apr 19, 2011, at 9:29 AM, John Baldwin wrote: > On Tuesday, April 19, 2011 10:28:23 am mdf@freebsd.org wrote: >> Trimming since I have a mostly-unrelated question... >>=20 >> On Tue, Apr 19, 2011 at 5:40 AM, John Baldwin = wrote: >>> On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: >>>> In this case, there was a new kernel thing just after, so it turned = out OK. >>>> But let's not gratuitously bump the version since the granularity = we have >>>> already allows the ports to make good choices on when to leave = something in or >>>> out. >>>=20 >>> Except that that directly contradicts our previously established = policy that >>> these version bumps are cheap and that we should do more of them = (this came up >>> a few years ago when we changed the policy so that the new "stable" = branch >>> after a release starts at N + 500 (e.g. 802500) rather than N + 100 = to give >>> more room for version bumps on current). >>=20 >> I thought I remembered reading (within the past 2 years) that >> __FreeBSD_version should not be incremented more than once a day, >> since there was a limit of 100 before the version minor number was >> affected. Did I get the polarity backwards and that was the old >> policy? >=20 > Well, I would avoid more than once a day still, but the 100 limit is = now 500 > in 8.0 and later (we had more than 100 bumps during 8.0-current which = resulted > in a discussion where we chose to raise the limit to 500 rather than > discourage bumps in current). There were times in the 8.x release train when I got hit by this problem = a lot. I'd update to get a fix in some other part of the tree, and = there's be another bump even though I had compiled a kernel just hours = before. While I can live it it from time to time, there was a stretch = where it happened to me all the time and it wound up costing me a = substantial portion of a working week. It is all about windows. If there's a small window since the last bump, = please biggy back on it. If there isn't, by all means bump. I'd tune = small measured in days rather than a single day, since it is rare that = ports need to know with such precision when something happened and small = windows tend to impact fewer people than the bumps do. Warner= From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 18:18:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489A11065670; Tue, 19 Apr 2011 18:18:03 +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 354D58FC0A; Tue, 19 Apr 2011 18:18: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 p3JII3AW018118; Tue, 19 Apr 2011 18:18:03 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JII3lk018116; Tue, 19 Apr 2011 18:18:03 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201104191818.p3JII3lk018116@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 19 Apr 2011 18:18: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: r220864 - stable/8/sys/netgraph/bluetooth/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, 19 Apr 2011 18:18:03 -0000 Author: emax Date: Tue Apr 19 18:18:02 2011 New Revision: 220864 URL: http://svn.freebsd.org/changeset/base/220864 Log: MFC r197083 Get those pesky RFCOMM RPM data bits right. This is likely a noop. Modified: stable/8/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h ============================================================================== --- stable/8/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h Tue Apr 19 18:09:21 2011 (r220863) +++ stable/8/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h Tue Apr 19 18:18:02 2011 (r220864) @@ -85,8 +85,8 @@ /* RPN parameters - data bits */ #define RFCOMM_RPN_DATA_5 0x0 -#define RFCOMM_RPN_DATA_6 0x1 -#define RFCOMM_RPN_DATA_7 0x2 +#define RFCOMM_RPN_DATA_6 0x2 +#define RFCOMM_RPN_DATA_7 0x1 #define RFCOMM_RPN_DATA_8 0x3 /* RPN parameters - stop bit */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 18:50:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 072851065675; Tue, 19 Apr 2011 18:50:26 +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 C93418FC0A; Tue, 19 Apr 2011 18:50:25 +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 530F046B3C; Tue, 19 Apr 2011 14:50:25 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D244A8A02A; Tue, 19 Apr 2011 14:50:24 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Tue, 19 Apr 2011 14:26:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104172103.p3HL3Ntb049564@svn.freebsd.org> <201104190840.29535.jhb@freebsd.org> <6ED7B30B-B545-4E38-A157-5008A1615DBC@bsdimp.com> In-Reply-To: <6ED7B30B-B545-4E38-A157-5008A1615DBC@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104191426.04591.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 19 Apr 2011 14:50:24 -0400 (EDT) Cc: Doug Barton , Pawel Jakub Dawidek , Roman Divacky , Dimitry Andric , src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 18:50:26 -0000 On Tuesday, April 19, 2011 2:04:53 pm Warner Losh wrote: > > On Apr 19, 2011, at 6:40 AM, John Baldwin wrote: > > > On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: > >> > >> On Apr 18, 2011, at 12:18 PM, Doug Barton wrote: > >> > >>> On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: > >>>> On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: > >>>>> > >>>>> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > >>>>> > >>>>>> please mark this in src/UPDATING, maybe bump freebsd_version too? > >>>>> > >>>>> Please do not bump freebsd_version just for this. Ports wishing to know > > can go off the last bump, if there are any. > >>>>> > >>>>> Every freebsd_version bump forces rebuilding all modules and such and is > > a pita. > >>>> > >>>> I agree that this is a PITA, but there also should be a way to force > >>>> module load even on version bump. This is PITA especially for > >>>> developers. > >>> > >>> .... who make up a tiny percentage of the FreeBSD user community. > > Seriously? We're going to whine because version bumps cause a little extra > > compile time? > >> > >> The problem usually manifests itself when I got to debug a new problem, load > > a driver and find I have to rebuild everything else to use it, which forces an > > extra reboot on the machine in question. Sometimes this can be quite > > disruptive to other things that machine is doing. > > > > But that is only true if your source tree doesn't match your installed world. > > If the new driver is standalone and you build it as a module, it will use the > > headers from /sys and will work fine. > > It is rarely the case that my source matches my install world. My kernel and userland are asynchronously updated when I'm doing heavy kernel development. My sources are updated all the time to pull in useful things that I need. When I'm in this mode, I carefully track what's changed to make sure there were no recompile the world events. When a userland thing changes that bumps freebsd_version, I have to recompile the kernel and reboot, even though there's no need to do so. This is especially annoying when it happens a few times within one week, since it is a hit to my productivity each time it happens. There's no great need to have userland features identified with the fidelity of a few dozen commits in - current. A few hundred or more would suffice for ports and those interested, so bumping more than once a week provides almost no benefit, but inflicts some pain. Hmm, my development tree never matches my /usr/src either, but I never run into this. I always build a kernel in a p4 or whatever checkout and do 'make install KERNEL=foo' (or make installkernel INSTKERNNAME=foo) along with 'nextboot -k foo' (or 'boot foo' at the loader prompt). My current testboxes actually tend to have 7.x worlds and I just boot 9 kernels on them all the time. But by building a new kernel each time I never hit problems with __FreeBSD_version checks. However, all that said, I would have no problem having something you can set in make.conf or on the command line to disable the check for a given module build. Oh, one other thing, if you stick your module directory in a kernel tree that matches whatever the running kernel is, then that also works fine. I do this a lot where I've booted a 9.0 kernel on a 7.x machine, and then have a sys/modules/foo in that source tree and I can build the module from that directory and load/unload it without any problems. > >> In this case, there was a new kernel thing just after, so it turned out OK. > > But let's not gratuitously bump the version since the granularity we have > > already allows the ports to make good choices on when to leave something in or > > out. > > > > Except that that directly contradicts our previously established policy that > > these version bumps are cheap and that we should do more of them (this came up > > a few years ago when we changed the policy so that the new "stable" branch > > after a release starts at N + 500 (e.g. 802500) rather than N + 100 to give > > more room for version bumps on current). > > We have never said that version bumps were totally cheap. In -current, there's little benefit to bumping things more often than once a week. Since we generally develop stable for more than 2 years, 100 wasn't enough at the one a week rate. But that doesn't mean that 5 per week is OK either, since now we suddenly have room for them. I'm strongly suggesting that for userland-only changes that one check to see when the last bump was and if it is less than a few days (or a week), then to piggyback off the last one/next one to discriminate whether to use an old feature, or start using a new feature. Especially for retroactive bumps that happen disconnected to the original feature going in. I can't find the original thread, but we did in fact say that. :) However, I'd be happy to only have one a week or what not. Big interface changes should generally have them though, especially if they affect KPIs used by out of tree drivers or other software in ports. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 19:26:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1F3106566B; Tue, 19 Apr 2011 19:26:28 +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 F2D388FC13; Tue, 19 Apr 2011 19:26: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 p3JJQRbM019561; Tue, 19 Apr 2011 19:26:27 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JJQRWi019558; Tue, 19 Apr 2011 19:26:27 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104191926.p3JJQRWi019558@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 19 Apr 2011 19:26: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: r220865 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 19:26:28 -0000 Author: pjd Date: Tue Apr 19 19:26:27 2011 New Revision: 220865 URL: http://svn.freebsd.org/changeset/base/220865 Log: Scenario: - We have two nodes connected and synchronized (local counters on both sides are 0). - We take secondary down and recreate it. - Primary connects to it and starts synchronization (but local counters are still 0). - We switch the roles. - Synchronization restarts but data is synchronized now from new primary (because local counters are 0) that doesn't have new data yet. This fix this issue we bump local counter on primary when we discover that connected secondary was recreated and has no data yet. Reported by: trociny Discussed with: trociny Tested by: trociny MFC after: 1 week Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Apr 19 18:18:02 2011 (r220864) +++ head/sbin/hastd/primary.c Tue Apr 19 19:26:27 2011 (r220865) @@ -667,6 +667,25 @@ init_remote(struct hast_resource *res, s res->hr_secondary_localcnt = nv_get_uint64(nvin, "localcnt"); res->hr_secondary_remotecnt = nv_get_uint64(nvin, "remotecnt"); res->hr_syncsrc = nv_get_uint8(nvin, "syncsrc"); + if (nv_exists(nvin, "virgin")) { + /* + * Secondary was reinitialized, bump localcnt if it is 0 as + * only we have the data. + */ + PJDLOG_ASSERT(res->hr_syncsrc == HAST_SYNCSRC_PRIMARY); + PJDLOG_ASSERT(res->hr_secondary_localcnt == 0); + + if (res->hr_primary_localcnt == 0) { + PJDLOG_ASSERT(res->hr_secondary_remotecnt == 0); + + mtx_lock(&metadata_lock); + res->hr_primary_localcnt++; + pjdlog_debug(1, "Increasing localcnt to %ju.", + (uintmax_t)res->hr_primary_localcnt); + (void)metadata_write(res); + mtx_unlock(&metadata_lock); + } + } map = NULL; mapsize = nv_get_uint32(nvin, "mapsize"); if (mapsize > 0) { Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Tue Apr 19 18:18:02 2011 (r220864) +++ head/sbin/hastd/secondary.c Tue Apr 19 19:26:27 2011 (r220865) @@ -261,6 +261,7 @@ init_remote(struct hast_resource *res, s } else { memset(map, 0xff, mapsize); } + nv_add_int8(nvout, 1, "virgin"); nv_add_uint8(nvout, HAST_SYNCSRC_PRIMARY, "syncsrc"); } else if (res->hr_resuid != resuid) { char errmsg[256]; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 19:47:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F6E31065673; Tue, 19 Apr 2011 19:47:42 +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 F17EE8FC19; Tue, 19 Apr 2011 19:47: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 p3JJlfYU020079; Tue, 19 Apr 2011 19:47:41 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JJlfnJ020075; Tue, 19 Apr 2011 19:47:41 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104191947.p3JJlfnJ020075@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 19 Apr 2011 19:47: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: r220866 - 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: Tue, 19 Apr 2011 19:47:42 -0000 Author: bschmidt Date: Tue Apr 19 19:47:41 2011 New Revision: 220866 URL: http://svn.freebsd.org/changeset/base/220866 Log: Pull some features out of the firmware: - If a ENH_SENS TLV section exit the firmware is capable of doing enhanced sensitivity calibration. - Newer devices/firmwares have more calibration commands therefore hardcoding the noise gain/reset commands no longer works. It is supposed to use the next index after the newest calibration type support. Read the command index of the TLV section if available. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Tue Apr 19 19:26:27 2011 (r220865) +++ head/sys/dev/iwn/if_iwn.c Tue Apr 19 19:47:41 2011 (r220866) @@ -772,6 +772,8 @@ iwn5000_attach(struct iwn_softc *sc, uin sc->fw_data_maxsz = IWN5000_FW_DATA_MAXSZ; sc->fwsz = IWN5000_FWSZ; sc->sched_txfact_addr = IWN5000_SCHED_TXFACT; + sc->reset_noise_gain = IWN5000_PHY_CALIB_RESET_NOISE_GAIN; + sc->noise_gain = IWN5000_PHY_CALIB_NOISE_GAIN; switch (sc->hw_type) { case IWN_HW_REV_TYPE_5100: @@ -4367,7 +4369,7 @@ iwn5000_init_gains(struct iwn_softc *sc) struct iwn_phy_calib cmd; memset(&cmd, 0, sizeof cmd); - cmd.code = IWN5000_PHY_CALIB_RESET_NOISE_GAIN; + cmd.code = sc->reset_noise_gain; cmd.ngroups = 1; cmd.isvalid = 1; DPRINTF(sc, IWN_DEBUG_CALIBRATE, @@ -4419,7 +4421,7 @@ iwn5000_set_gains(struct iwn_softc *sc) div = (sc->hw_type == IWN_HW_REV_TYPE_6050) ? 20 : 30; memset(&cmd, 0, sizeof cmd); - cmd.code = IWN5000_PHY_CALIB_NOISE_GAIN; + cmd.code = sc->noise_gain; cmd.ngroups = 1; cmd.isvalid = 1; /* Get first available RX antenna as referential. */ @@ -5900,7 +5902,7 @@ iwn_read_firmware_tlv(struct iwn_softc * const struct iwn_fw_tlv *tlv; const uint8_t *ptr, *end; uint64_t altmask; - uint32_t len; + uint32_t len, tmp; if (fw->size < sizeof (*hdr)) { device_printf(sc->sc_dev, "%s: firmware too short: %zu bytes\n", @@ -5965,6 +5967,17 @@ iwn_read_firmware_tlv(struct iwn_softc * fw->boot.text = ptr; fw->boot.textsz = len; break; + case IWN_FW_TLV_ENH_SENS: + if (!len) + sc->sc_flags |= IWN_FLAG_ENH_SENS; + break; + case IWN_FW_TLV_PHY_CALIB: + tmp = htole32(*ptr); + if (tmp < 253) { + sc->reset_noise_gain = tmp; + sc->noise_gain = tmp + 1; + } + break; default: DPRINTF(sc, IWN_DEBUG_RESET, "TLV type %d not handled\n", le16toh(tlv->type)); Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Tue Apr 19 19:26:27 2011 (r220865) +++ head/sys/dev/iwn/if_iwnreg.h Tue Apr 19 19:47:41 2011 (r220866) @@ -1322,6 +1322,8 @@ struct iwn_fw_tlv { #define IWN_FW_TLV_INIT_DATA 4 #define IWN_FW_TLV_BOOT_TEXT 5 #define IWN_FW_TLV_PBREQ_MAXLEN 6 +#define IWN_FW_TLV_ENH_SENS 14 +#define IWN_FW_TLV_PHY_CALIB 15 uint16_t alt; uint32_t len; Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Tue Apr 19 19:26:27 2011 (r220865) +++ head/sys/dev/iwn/if_iwnvar.h Tue Apr 19 19:47:41 2011 (r220866) @@ -222,6 +222,8 @@ struct iwn_softc { uint32_t fw_data_maxsz; uint32_t fwsz; bus_size_t sched_txfact_addr; + uint32_t reset_noise_gain; + uint32_t noise_gain; /* TX scheduler rings. */ struct iwn_dma_info sched_dma; From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 19:51:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 049481065670; Tue, 19 Apr 2011 19:51:36 +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 E6D078FC14; Tue, 19 Apr 2011 19:51: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 p3JJpZtb020187; Tue, 19 Apr 2011 19:51:35 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JJpZJY020185; Tue, 19 Apr 2011 19:51:35 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104191951.p3JJpZJY020185@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 19 Apr 2011 19:51: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: r220867 - 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: Tue, 19 Apr 2011 19:51:36 -0000 Author: bschmidt Date: Tue Apr 19 19:51:35 2011 New Revision: 220867 URL: http://svn.freebsd.org/changeset/base/220867 Log: Enable DC calibration for all 6000 series devices, except those with an internal PA. Override the chainmask also for the 6050. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Tue Apr 19 19:47:41 2011 (r220866) +++ head/sys/dev/iwn/if_iwn.c Tue Apr 19 19:51:35 2011 (r220867) @@ -809,6 +809,9 @@ iwn5000_attach(struct iwn_softc *sc, uin case IWN_HW_REV_TYPE_6050: sc->limits = &iwn6000_sensitivity_limits; sc->fwname = "iwn6050fw"; + /* Override chains masks, ROM is known to be broken. */ + sc->txchainmask = IWN_ANT_AB; + sc->rxchainmask = IWN_ANT_AB; break; case IWN_HW_REV_TYPE_6005: sc->limits = &iwn6000_sensitivity_limits; @@ -2387,7 +2390,9 @@ iwn5000_rx_calib_results(struct iwn_soft switch (calib->code) { case IWN5000_PHY_CALIB_DC: - if (sc->hw_type == IWN_HW_REV_TYPE_5150) + if ((sc->sc_flags & IWN_FLAG_INTERNAL_PA) == 0 && + (sc->hw_type == IWN_HW_REV_TYPE_5150 || + sc->hw_type >= IWN_HW_REV_TYPE_6000)) idx = 0; break; case IWN5000_PHY_CALIB_LO: From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:38:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BF6F106566B; Tue, 19 Apr 2011 20:38:50 +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 7968D8FC19; Tue, 19 Apr 2011 20:38: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 p3JKco8E021387; Tue, 19 Apr 2011 20:38:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKcop5021384; Tue, 19 Apr 2011 20:38:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104192038.p3JKcop5021384@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 20:38: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: r220868 - 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: Tue, 19 Apr 2011 20:38:50 -0000 Author: mav Date: Tue Apr 19 20:38:50 2011 New Revision: 220868 URL: http://svn.freebsd.org/changeset/base/220868 Log: MFC r220657: Some changes around hot-plug and interface power-management: - use ATA_SE_EXCHANGED (SError.DIAG.X) bit to detect hot-plug events when power-management enabled and ATA_SE_PHY_CHANGED (SError.DIAG.N) can't be trusted; - on controllers supporting staggered spin-up (SS) put unused channels into Listen state instead of Off. It should still save some power, but allow plug-in events to be detected; - on controllers supporting cold presence detection (CPD), when power management enabled, use CPD events to detect hot-plug in addition to PHY events. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 19:51:35 2011 (r220867) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 20:38:50 2011 (r220868) @@ -1266,34 +1266,66 @@ ahci_slotsfree(device_t dev) } } -static void +static int ahci_phy_check_events(device_t dev, u_int32_t serr) { struct ahci_channel *ch = device_get_softc(dev); - if ((serr & ATA_SE_PHY_CHANGED) && (ch->pm_level == 0)) { + if (((ch->pm_level == 0) && (serr & ATA_SE_PHY_CHANGED)) || + ((ch->pm_level != 0 || ch->listening) && (serr & ATA_SE_EXCHANGED))) { u_int32_t status = ATA_INL(ch->r_mem, AHCI_P_SSTS); union ccb *ccb; 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)) { + if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) device_printf(dev, "CONNECT requested\n"); - } else + else device_printf(dev, "DISCONNECT requested\n"); } ahci_reset(dev); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) - return; + return (0); if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_free_ccb(ccb); - return; + return (0); } xpt_rescan(ccb); + return (1); } + return (0); +} + +static void +ahci_cpd_check_events(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + u_int32_t status; + union ccb *ccb; + + if (ch->pm_level == 0) + return; + + status = ATA_INL(ch->r_mem, AHCI_P_CMD); + if ((status & AHCI_P_CMD_CPD) == 0) + return; + + if (bootverbose) { + if (status & AHCI_P_CMD_CPS) { + device_printf(dev, "COLD CONNECT requested\n"); + } else + device_printf(dev, "COLD DISCONNECT requested\n"); + } + ahci_reset(dev); + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) + return; + if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + xpt_free_ccb(ccb); + return; + } + xpt_rescan(ccb); } static void @@ -1353,7 +1385,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, port; + int i, ccs, port, reset = 0; /* Read and clear interrupt statuses. */ istatus = ATA_INL(ch->r_mem, AHCI_P_IS); @@ -1389,9 +1421,12 @@ ahci_ch_intr(void *data) serr = ATA_INL(ch->r_mem, AHCI_P_SERR); if (serr) { ATA_OUTL(ch->r_mem, AHCI_P_SERR, serr); - ahci_phy_check_events(dev, serr); + reset = ahci_phy_check_events(dev, serr); } } + /* Process cold presence detection events */ + if ((istatus & AHCI_P_IX_CPD) && !reset) + ahci_cpd_check_events(dev); /* 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)) { @@ -2440,7 +2475,8 @@ ahci_reset(device_t dev) ch->devices = 0; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, - (AHCI_P_IX_CPD | AHCI_P_IX_PRC | AHCI_P_IX_PC)); + (((ch->pm_level != 0) ? AHCI_P_IX_CPD | AHCI_P_IX_MP : 0) | + AHCI_P_IX_PRC | AHCI_P_IX_PC)); xpt_release_simq(ch->sim, TRUE); return; } @@ -2457,9 +2493,10 @@ ahci_reset(device_t dev) ch->devices = 1; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, - (AHCI_P_IX_CPD | AHCI_P_IX_TFE | AHCI_P_IX_HBF | + (((ch->pm_level != 0) ? AHCI_P_IX_CPD | AHCI_P_IX_MP : 0) | + AHCI_P_IX_TFE | AHCI_P_IX_HBF | AHCI_P_IX_HBD | AHCI_P_IX_IF | AHCI_P_IX_OF | - ((ch->pm_level == 0) ? AHCI_P_IX_PRC | AHCI_P_IX_PC : 0) | + ((ch->pm_level == 0) ? AHCI_P_IX_PRC : 0) | AHCI_P_IX_PC | AHCI_P_IX_DP | AHCI_P_IX_UF | (ctlr->ccc ? 0 : AHCI_P_IX_SDB) | AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (ch->resetting) @@ -2564,6 +2601,12 @@ ahci_sata_phy_reset(device_t dev) int sata_rev; uint32_t val; + if (ch->listening) { + val = ATA_INL(ch->r_mem, AHCI_P_CMD); + val |= AHCI_P_CMD_SUD; + ATA_OUTL(ch->r_mem, AHCI_P_CMD, val); + ch->listening = 0; + } sata_rev = ch->user[ch->pm_present ? 15 : 0].revision; if (sata_rev == 1) val = ATA_SC_SPD_SPEED_GEN1; @@ -2582,7 +2625,12 @@ ahci_sata_phy_reset(device_t dev) (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); DELAY(5000); if (!ahci_sata_connect(ch)) { - if (ch->pm_level > 0) + if (ch->caps & AHCI_CAP_SSS) { + val = ATA_INL(ch->r_mem, AHCI_P_CMD); + val &= ~AHCI_P_CMD_SUD; + ATA_OUTL(ch->r_mem, AHCI_P_CMD, val); + ch->listening = 1; + } else if (ch->pm_level > 0) ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_DISABLE); return (0); } Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Tue Apr 19 19:51:35 2011 (r220867) +++ stable/8/sys/dev/ahci/ahci.h Tue Apr 19 20:38:50 2011 (r220868) @@ -118,6 +118,7 @@ #define ATA_SE_LINKSEQ_ERR 0x00800000 #define ATA_SE_TRANSPORT_ERR 0x01000000 #define ATA_SE_UNKNOWN_FIS 0x02000000 +#define ATA_SE_EXCHANGED 0x04000000 #define ATA_SCONTROL 15 #define ATA_SC_DET_MASK 0x0000000f @@ -221,7 +222,7 @@ #define AHCI_P_IX_UF 0x00000010 #define AHCI_P_IX_DP 0x00000020 #define AHCI_P_IX_PC 0x00000040 -#define AHCI_P_IX_DI 0x00000080 +#define AHCI_P_IX_MP 0x00000080 #define AHCI_P_IX_PRC 0x00400000 #define AHCI_P_IX_IPM 0x00800000 @@ -413,6 +414,7 @@ struct ahci_channel { int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ int resetting; /* Hard-reset in progress. */ + int listening; /* SUD bit is cleared. */ union ccb *frozen; /* Frozen command */ struct callout pm_timer; /* Power management events */ struct callout reset_timer; /* Hard-reset timeout */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:40:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BECD11065670; Tue, 19 Apr 2011 20:40:00 +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 A744F8FC15; Tue, 19 Apr 2011 20:40: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 p3JKe0r3021456; Tue, 19 Apr 2011 20:40:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKe04k021454; Tue, 19 Apr 2011 20:40:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104192040.p3JKe04k021454@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 20:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220869 - 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: Tue, 19 Apr 2011 20:40:00 -0000 Author: mav Date: Tue Apr 19 20:40:00 2011 New Revision: 220869 URL: http://svn.freebsd.org/changeset/base/220869 Log: MFC r220777: - Tune different wait loops to cut some more milliseconds from reset time. - Do not call ahci_start() before device signature received. It is required by the specification and caused non-fatal reset timeouts on AMD chipsets. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 20:38:50 2011 (r220868) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 20:40:00 2011 (r220869) @@ -1741,11 +1741,11 @@ ahci_execute_transaction(struct ahci_slo if (ccb->ccb_h.func_code == XPT_ATA_IO && (ccb->ataio.cmd.command == ATA_DEVICE_RESET || (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))) { - int count, timeout = ccb->ccb_h.timeout; + int count, timeout = ccb->ccb_h.timeout * 100; enum ahci_err_type et = AHCI_ERR_NONE; for (count = 0; count < timeout; count++) { - DELAY(1000); + DELAY(10); if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot))) break; if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) { @@ -1781,7 +1781,7 @@ ahci_execute_transaction(struct ahci_slo (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); + DELAY(10); if (count++ >= timeout) { device_printf(dev, "device is not " "ready after soft-reset: " @@ -2299,8 +2299,8 @@ ahci_stop(device_t dev) /* Wait for activity stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "stopping AHCI engine failed\n"); break; } @@ -2322,8 +2322,8 @@ ahci_clo(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd); timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "executing CLO failed\n"); break; } @@ -2344,8 +2344,8 @@ ahci_stop_fr(device_t dev) /* Wait for FIS reception stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 50000) { device_printf(dev, "stopping AHCI FR engine failed\n"); break; } @@ -2402,11 +2402,11 @@ ahci_reset_to(void *arg) if (ahci_wait_ready(dev, ch->resetting == 0 ? -1 : 0, (310 - ch->resetting) * 100) == 0) { ch->resetting = 0; + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); return; } if (ch->resetting == 0) { - ahci_stop(dev); ahci_clo(dev); ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); @@ -2489,7 +2489,6 @@ ahci_reset(device_t dev) else ch->resetting = 310; } - ahci_start(dev, 1); ch->devices = 1; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, @@ -2501,8 +2500,10 @@ ahci_reset(device_t dev) AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (ch->resetting) callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, dev); - else + else { + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); + } } static int @@ -2563,7 +2564,7 @@ ahci_sata_connect(struct ahci_channel *c int timeout; /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 100 ; timeout++) { + for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && @@ -2576,9 +2577,9 @@ ahci_sata_connect(struct ahci_channel *c } return (0); } - DELAY(1000); + DELAY(100); } - if (timeout >= 100) { + if (timeout >= 1000) { if (bootverbose) { device_printf(ch->dev, "SATA connect timeout status=%08x\n", status); @@ -2586,8 +2587,8 @@ ahci_sata_connect(struct ahci_channel *c return (0); } if (bootverbose) { - device_printf(ch->dev, "SATA connect time=%dms status=%08x\n", - timeout, status); + device_printf(ch->dev, "SATA connect time=%dus status=%08x\n", + timeout * 100, status); } /* Clear SATA error register */ ATA_OUTL(ch->r_mem, AHCI_P_SERR, 0xffffffff); @@ -2619,11 +2620,10 @@ ahci_sata_phy_reset(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_RESET | val | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER); - DELAY(5000); + DELAY(1000); ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); - DELAY(5000); if (!ahci_sata_connect(ch)) { if (ch->caps & AHCI_CAP_SSS) { val = ATA_INL(ch->r_mem, AHCI_P_CMD); From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:41:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2C341065687; Tue, 19 Apr 2011 20:41:00 +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 D10FA8FC13; Tue, 19 Apr 2011 20:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3JKf0go021529; Tue, 19 Apr 2011 20:41:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKf0uC021526; Tue, 19 Apr 2011 20:41:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104192041.p3JKf0uC021526@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 20:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220870 - 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: Tue, 19 Apr 2011 20:41:01 -0000 Author: mav Date: Tue Apr 19 20:41:00 2011 New Revision: 220870 URL: http://svn.freebsd.org/changeset/base/220870 Log: MFC r220789: Handle ready timeout during polled operation same as done in mvs(4) before. 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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Apr 19 20:40:00 2011 (r220869) +++ stable/8/sys/dev/ahci/ahci.c Tue Apr 19 20:41:00 2011 (r220870) @@ -2845,4 +2845,9 @@ ahcipoll(struct cam_sim *sim) struct ahci_channel *ch = (struct ahci_channel *)cam_sim_softc(sim); ahci_ch_intr(ch->dev); + if (ch->resetting != 0 && + (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) { + ch->resetpolldiv = 1000; + ahci_reset_to(ch->dev); + } } Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Tue Apr 19 20:40:00 2011 (r220869) +++ stable/8/sys/dev/ahci/ahci.h Tue Apr 19 20:41:00 2011 (r220870) @@ -414,6 +414,7 @@ struct ahci_channel { int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ int resetting; /* Hard-reset in progress. */ + int resetpolldiv; /* Hard-reset poll divider. */ int listening; /* SUD bit is cleared. */ union ccb *frozen; /* Frozen command */ struct callout pm_timer; /* Power management events */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:44:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2192F1065673; Tue, 19 Apr 2011 20:44:44 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 105318FC12; Tue, 19 Apr 2011 20:44: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 p3JKihaL021767; Tue, 19 Apr 2011 20:44:43 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKihYw021765; Tue, 19 Apr 2011 20:44:43 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201104192044.p3JKihYw021765@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 19 Apr 2011 20:44: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: r220871 - 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: Tue, 19 Apr 2011 20:44:44 -0000 Author: mdf Date: Tue Apr 19 20:44:43 2011 New Revision: 220871 URL: http://svn.freebsd.org/changeset/base/220871 Log: Correctly output the entire array for hw.acpi.thermal._ACx. Reported by: Taku YAMAMOTO < taku AT tackymt DOT homeip DOT net > Tested by: Nick Ulen < uncle AT wolfman DOT devio DOT us > Modified: head/sys/dev/acpica/acpi_thermal.c Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Tue Apr 19 20:41:00 2011 (r220870) +++ head/sys/dev/acpica/acpi_thermal.c Tue Apr 19 20:44:43 2011 (r220871) @@ -288,7 +288,8 @@ acpi_tz_attach(device_t dev) "critical temp setpoint (shutdown now)"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD, - &sc->tz_zone.ac, 0, sysctl_handle_int, "IK", ""); + &sc->tz_zone.ac, sizeof(sc->tz_zone.ac), + sysctl_handle_opaque, "IK", ""); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 20:44:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66C371065674; Tue, 19 Apr 2011 20:44:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53A308FC15; Tue, 19 Apr 2011 20:44: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 p3JKiiUk021785; Tue, 19 Apr 2011 20:44:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JKiihu021782; Tue, 19 Apr 2011 20:44:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104192044.p3JKiihu021782@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Apr 2011 20:44: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: r220872 - stable/8/sys/dev/mvs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 20:44:44 -0000 Author: mav Date: Tue Apr 19 20:44:44 2011 New Revision: 220872 URL: http://svn.freebsd.org/changeset/base/220872 Log: MFC r220615: Refactor hard-reset implementation in mvs(4). Instead of spinning in a tight loop for up to 15 seconds, polling for device readiness while it spins up, return reset completion just after PHY reports "connect well" or 100ms connection timeout. If device was found, use callout for checking device readiness with 100ms period up to full 31 second timeout. This fixes system freeze for 5-10 seconds on drives hot plug-in. Modified: stable/8/sys/dev/mvs/mvs.c stable/8/sys/dev/mvs/mvs.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/mvs/mvs.c ============================================================================== --- stable/8/sys/dev/mvs/mvs.c Tue Apr 19 20:44:43 2011 (r220871) +++ stable/8/sys/dev/mvs/mvs.c Tue Apr 19 20:44:44 2011 (r220872) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -74,7 +75,7 @@ static int mvs_sata_phy_reset(device_t d static int mvs_wait(device_t dev, u_int s, u_int c, int t); static void mvs_tfd_read(device_t dev, union ccb *ccb); static void mvs_tfd_write(device_t dev, union ccb *ccb); -static void mvs_legacy_intr(device_t dev); +static void mvs_legacy_intr(device_t dev, int poll); static void mvs_crbq_intr(device_t dev); static void mvs_begin_transaction(device_t dev, union ccb *ccb); static void mvs_legacy_execute_transaction(struct mvs_slot *slot); @@ -124,6 +125,7 @@ mvs_ch_attach(device_t dev) device_get_unit(dev), "pm_level", &ch->pm_level); if (ch->pm_level > 3) callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); + callout_init_mtx(&ch->reset_timer, &ch->mtx, 0); resource_int_value(device_get_name(dev), device_get_unit(dev), "sata_rev", &sata_rev); for (i = 0; i < 16; i++) { @@ -217,6 +219,11 @@ mvs_ch_detach(device_t dev) mtx_lock(&ch->mtx); xpt_async(AC_LOST_DEVICE, ch->path, NULL); + /* Forget about reset. */ + if (ch->resetting) { + ch->resetting = 0; + xpt_release_simq(ch->sim, TRUE); + } xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); @@ -224,6 +231,7 @@ mvs_ch_detach(device_t dev) if (ch->pm_level > 3) callout_drain(&ch->pm_timer); + callout_drain(&ch->reset_timer); bus_teardown_intr(dev, ch->r_irq, ch->ih); bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); @@ -285,6 +293,12 @@ mvs_ch_suspend(device_t dev) xpt_freeze_simq(ch->sim, 1); while (ch->oslots) msleep(ch, &ch->mtx, PRIBIO, "mvssusp", hz/100); + /* Forget about reset. */ + if (ch->resetting) { + ch->resetting = 0; + callout_stop(&ch->reset_timer); + xpt_release_simq(ch->sim, TRUE); + } mvs_ch_deinit(dev); mtx_unlock(&ch->mtx); return (0); @@ -803,7 +817,7 @@ mvs_ch_intr(void *data) } /* Legacy mode device interrupt. */ if ((arg->cause & 2) && !edma) - mvs_legacy_intr(dev); + mvs_legacy_intr(dev, arg->cause & 4); } static uint8_t @@ -822,7 +836,7 @@ mvs_getstatus(device_t dev, int clear) } static void -mvs_legacy_intr(device_t dev) +mvs_legacy_intr(device_t dev, int poll) { struct mvs_channel *ch = device_get_softc(dev); struct mvs_slot *slot = &ch->slot[0]; /* PIO is always in slot 0. */ @@ -840,6 +854,8 @@ mvs_legacy_intr(device_t dev) port = ccb->ccb_h.target_id & 0x0f; /* Wait a bit for late !BUSY status update. */ if (status & ATA_S_BUSY) { + if (poll) + return; DELAY(100); if ((status = mvs_getstatus(dev, 1)) & ATA_S_BUSY) { DELAY(1000); @@ -1316,7 +1332,7 @@ mvs_legacy_execute_transaction(struct mv DELAY(10); ccb->ataio.res.status = ATA_INB(ch->r_mem, ATA_STATUS); } while (ccb->ataio.res.status & ATA_S_BUSY && timeout--); - mvs_legacy_intr(dev); + mvs_legacy_intr(dev, 1); return; } ch->donecount = 0; @@ -1909,11 +1925,13 @@ mvs_wait(device_t dev, u_int s, u_int c, uint8_t st; while (((st = mvs_getstatus(dev, 0)) & (s | c)) != s) { - DELAY(1000); - if (timeout++ > t) { - device_printf(dev, "Wait status %02x\n", st); + if (timeout >= t) { + if (t != 0) + device_printf(dev, "Wait status %02x\n", st); return (-1); } + DELAY(1000); + timeout++; } return (timeout); } @@ -1936,6 +1954,35 @@ mvs_requeue_frozen(device_t dev) } static void +mvs_reset_to(void *arg) +{ + device_t dev = arg; + struct mvs_channel *ch = device_get_softc(dev); + int t; + + if (ch->resetting == 0) + return; + ch->resetting--; + if ((t = mvs_wait(dev, 0, ATA_S_BUSY | ATA_S_DRQ, 0)) >= 0) { + if (bootverbose) { + device_printf(dev, + "MVS reset: device ready after %dms\n", + (310 - ch->resetting) * 100); + } + ch->resetting = 0; + xpt_release_simq(ch->sim, TRUE); + return; + } + if (ch->resetting == 0) { + device_printf(dev, + "MVS reset: device not ready after 31000ms\n"); + xpt_release_simq(ch->sim, TRUE); + return; + } + callout_schedule(&ch->reset_timer, hz / 10); +} + +static void mvs_reset(device_t dev) { struct mvs_channel *ch = device_get_softc(dev); @@ -1944,6 +1991,12 @@ mvs_reset(device_t dev) xpt_freeze_simq(ch->sim, 1); if (bootverbose) device_printf(dev, "MVS reset...\n"); + /* Forget about previous reset. */ + if (ch->resetting) { + ch->resetting = 0; + callout_stop(&ch->reset_timer); + xpt_release_simq(ch->sim, TRUE); + } /* Requeue freezed command. */ mvs_requeue_frozen(dev); /* Kill the engine and requeue all running commands. */ @@ -1968,6 +2021,7 @@ mvs_reset(device_t dev) ch->eslots = 0; ch->toslots = 0; ch->fatalerr = 0; + ch->fake_busy = 0; /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); ATA_OUTL(ch->r_mem, EDMA_IEM, 0); @@ -1977,8 +2031,7 @@ mvs_reset(device_t dev) /* Reset and reconnect PHY, */ if (!mvs_sata_phy_reset(dev)) { if (bootverbose) - device_printf(dev, - "MVS reset done: phy reset found no device\n"); + device_printf(dev, "MVS reset: device not found\n"); ch->devices = 0; ATA_OUTL(ch->r_mem, SATA_SE, 0xffffffff); ATA_OUTL(ch->r_mem, EDMA_IEC, 0); @@ -1986,18 +2039,26 @@ mvs_reset(device_t dev) xpt_release_simq(ch->sim, TRUE); return; } + if (bootverbose) + device_printf(dev, "MVS reset: device found\n"); /* Wait for clearing busy status. */ - if ((i = mvs_wait(dev, 0, ATA_S_BUSY | ATA_S_DRQ, 15000)) < 0) - device_printf(dev, "device is not ready\n"); - else if (bootverbose) - device_printf(dev, "ready wait time=%dms\n", i); + if ((i = mvs_wait(dev, 0, ATA_S_BUSY | ATA_S_DRQ, + dumping ? 31000 : 0)) < 0) { + if (dumping) { + device_printf(dev, + "MVS reset: device not ready after 31000ms\n"); + } else + ch->resetting = 310; + } else if (bootverbose) + device_printf(dev, "MVS reset: device ready after %dms\n", i); ch->devices = 1; ATA_OUTL(ch->r_mem, SATA_SE, 0xffffffff); ATA_OUTL(ch->r_mem, EDMA_IEC, 0); ATA_OUTL(ch->r_mem, EDMA_IEM, ~EDMA_IE_TRANSIENT); - if (bootverbose) - device_printf(dev, "MVS reset done: device found\n"); - xpt_release_simq(ch->sim, TRUE); + if (ch->resetting) + callout_reset(&ch->reset_timer, hz / 10, mvs_reset_to, dev); + else + xpt_release_simq(ch->sim, TRUE); } static void @@ -2299,7 +2360,12 @@ mvspoll(struct cam_sim *sim) struct mvs_intr_arg arg; arg.arg = ch->dev; - arg.cause = 2; /* XXX */ + arg.cause = 2 | 4; /* XXX */ mvs_ch_intr(&arg); + if (ch->resetting != 0 && + (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) { + ch->resetpolldiv = 1000; + mvs_reset_to(ch->dev); + } } Modified: stable/8/sys/dev/mvs/mvs.h ============================================================================== --- stable/8/sys/dev/mvs/mvs.h Tue Apr 19 20:44:43 2011 (r220871) +++ stable/8/sys/dev/mvs/mvs.h Tue Apr 19 20:44:44 2011 (r220872) @@ -561,6 +561,8 @@ struct mvs_channel { int fatalerr; /* Fatal error happend */ int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ + int resetting; /* Hard-reset in progress. */ + int resetpolldiv; /* Hard-reset poll divider. */ int out_idx; /* Next written CRQB */ int in_idx; /* Next read CRPB */ u_int transfersize; /* PIO transfer size */ @@ -569,6 +571,7 @@ struct mvs_channel { u_int fake_busy; /* Fake busy bit after command submission */ union ccb *frozen; /* Frozen command */ struct callout pm_timer; /* Power management events */ + struct callout reset_timer; /* Hard-reset timeout */ struct mvs_device user[16]; /* User-specified settings */ struct mvs_device curr[16]; /* Current settings */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 22:08:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3646106564A; Tue, 19 Apr 2011 22:08:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E234B8FC1A; Tue, 19 Apr 2011 22:08: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 p3JM8SaO024011; Tue, 19 Apr 2011 22:08:28 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JM8SZf024007; Tue, 19 Apr 2011 22:08:28 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104192208.p3JM8SZf024007@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 19 Apr 2011 22:08: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: r220873 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 22:08:29 -0000 Author: np Date: Tue Apr 19 22:08:28 2011 New Revision: 220873 URL: http://svn.freebsd.org/changeset/base/220873 Log: - Move all Ethernet specific items from sge_eq to sge_txq. sge_eq is now a suitable base for all kinds of egress queues. - Add control queues (sge_ctrlq) and allocate one of these per hardware channel. They can be used to program filters and steer traffic (and more). MFC after: 1 week Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue Apr 19 20:44:44 2011 (r220872) +++ head/sys/dev/cxgbe/adapter.h Tue Apr 19 22:08:28 2011 (r220873) @@ -110,6 +110,9 @@ enum { FW_IQ_QSIZE = 256, FW_IQ_ESIZE = 64, /* At least 64 mandated by the firmware spec */ + CTRL_EQ_QSIZE = 128, + CTRL_EQ_ESIZE = 64, + RX_IQ_QSIZE = 1024, RX_IQ_ESIZE = 64, /* At least 64 so CPL_RX_PKT will fit */ @@ -218,7 +221,7 @@ struct tx_map { struct tx_sdesc { uint8_t desc_used; /* # of hardware descriptors used by the WR */ - uint8_t map_used; /* # of frames sent out in the WR */ + uint8_t credits; /* NIC txq: # of frames sent out in the WR */ }; typedef void (iq_intr_handler_t)(void *); @@ -275,7 +278,6 @@ enum { * consumes them) but it's special enough to have its own struct (see sge_fl). */ struct sge_eq { - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; char lockname[16]; @@ -284,8 +286,6 @@ struct sge_eq { struct tx_desc *desc; /* KVA of descriptor ring */ bus_addr_t ba; /* bus address of descriptor ring */ - struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ - struct buf_ring *br; /* tx buffer ring */ struct sge_qstat *spg; /* status page, for convenience */ uint16_t cap; /* max # of desc, for convenience */ uint16_t avail; /* available descriptors, for convenience */ @@ -295,14 +295,7 @@ struct sge_eq { uint16_t pending; /* # of descriptors used since last doorbell */ uint16_t iqid; /* iq that gets egr_update for the eq */ uint32_t cntxt_id; /* SGE context id for the eq */ - - /* DMA maps used for tx */ - struct tx_map *maps; - uint32_t map_total; /* # of DMA maps */ - uint32_t map_pidx; /* next map to be used */ - uint32_t map_cidx; /* reclaimed up to this index */ - uint32_t map_avail; /* # of available maps */ -} __aligned(CACHE_LINE_SIZE); +}; struct sge_fl { bus_dma_tag_t desc_tag; @@ -325,13 +318,23 @@ struct sge_fl { unsigned int dmamap_failed; }; -/* txq: SGE egress queue + miscellaneous items */ +/* txq: SGE egress queue + what's needed for Ethernet NIC */ struct sge_txq { struct sge_eq eq; /* MUST be first */ + + struct ifnet *ifp; /* the interface this txq belongs to */ + bus_dma_tag_t tx_tag; /* tag for transmit buffers */ + struct buf_ring *br; /* tx buffer ring */ + struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ struct mbuf *m; /* held up due to temporary resource shortage */ struct task resume_tx; - struct ifnet *ifp; /* the interface this txq belongs to */ + /* DMA maps used for tx */ + struct tx_map *maps; + uint32_t map_total; /* # of DMA maps */ + uint32_t map_pidx; /* next map to be used */ + uint32_t map_cidx; /* reclaimed up to this index */ + uint32_t map_avail; /* # of available maps */ /* stats for common events first */ @@ -349,11 +352,12 @@ struct sge_txq { uint32_t no_dmamap; /* no DMA map to load the mbuf */ uint32_t no_desc; /* out of hardware descriptors */ uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for txq */ -}; +} __aligned(CACHE_LINE_SIZE); enum { RXQ_LRO_ENABLED = (1 << 0) }; + /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ struct sge_rxq { struct sge_iq iq; /* MUST be first */ @@ -374,6 +378,20 @@ struct sge_rxq { } __aligned(CACHE_LINE_SIZE); +/* ctrlq: SGE egress queue + stats for control queue */ +struct sge_ctrlq { + struct sge_eq eq; /* MUST be first */ + + /* stats for common events first */ + + uint64_t total_wrs; /* # of work requests sent down this queue */ + + /* stats for not-that-common events */ + + uint32_t no_desc; /* out of hardware descriptors */ + uint32_t too_long; /* WR longer than hardware max */ +} __aligned(CACHE_LINE_SIZE); + struct sge { uint16_t timer_val[SGE_NTIMERS]; uint8_t counter_val[SGE_NCOUNTERS]; @@ -384,6 +402,7 @@ struct sge { int neq; /* total egress queues */ struct sge_iq fwq; /* Firmware event queue */ + struct sge_ctrlq *ctrlq;/* Control queues */ struct sge_iq *fiq; /* Forwarded interrupt queues (INTR_FWD) */ struct sge_txq *txq; /* NIC tx queues */ struct sge_rxq *rxq; /* NIC rx queues */ @@ -436,6 +455,9 @@ struct adapter { struct adapter_params params; struct t4_virt_res vres; + struct sysctl_ctx_list ctx; /* from first_port_up to last_port_down */ + struct sysctl_oid *oid_ctrlq; + struct mtx sc_lock; char lockname[16]; }; @@ -572,8 +594,8 @@ void t4_sge_modload(void); void t4_sge_init(struct adapter *); int t4_create_dma_tag(struct adapter *); int t4_destroy_dma_tag(struct adapter *); -int t4_setup_adapter_iqs(struct adapter *); -int t4_teardown_adapter_iqs(struct adapter *); +int t4_setup_adapter_queues(struct adapter *); +int t4_teardown_adapter_queues(struct adapter *); int t4_setup_eth_queues(struct port_info *); int t4_teardown_eth_queues(struct port_info *); void t4_intr_all(void *); @@ -583,6 +605,7 @@ void t4_intr_evt(void *); void t4_intr_data(void *); void t4_evt_rx(void *); void t4_eth_rx(void *); +int t4_mgmt_tx(struct adapter *, struct mbuf *); int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Apr 19 20:44:44 2011 (r220872) +++ head/sys/dev/cxgbe/t4_main.c Tue Apr 19 22:08:28 2011 (r220873) @@ -543,7 +543,8 @@ t4_attach(device_t dev) s = &sc->sge; s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g; s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g; - s->neq = s->ntxq + s->nrxq; /* the fl in an rxq is an eq */ + s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */ + s->neq += NCHAN; /* control queues, 1 per hw channel */ s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */ if (iaq.intr_fwd) { sc->flags |= INTR_FWD; @@ -551,6 +552,8 @@ t4_attach(device_t dev) s->fiq = malloc(NFIQ(sc) * sizeof(struct sge_iq), M_CXGBE, M_ZERO | M_WAITOK); } + s->ctrlq = malloc(NCHAN * sizeof(struct sge_ctrlq), M_CXGBE, + M_ZERO | M_WAITOK); s->rxq = malloc(s->nrxq * sizeof(struct sge_rxq), M_CXGBE, M_ZERO | M_WAITOK); s->txq = malloc(s->ntxq * sizeof(struct sge_txq), M_CXGBE, @@ -653,6 +656,7 @@ t4_detach(device_t dev) free(sc->irq, M_CXGBE); free(sc->sge.rxq, M_CXGBE); free(sc->sge.txq, M_CXGBE); + free(sc->sge.ctrlq, M_CXGBE); free(sc->sge.fiq, M_CXGBE); free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); @@ -992,7 +996,7 @@ cxgbe_transmit(struct ifnet *ifp, struct if (m->m_flags & M_FLOWID) txq += (m->m_pkthdr.flowid % pi->ntxq); - br = txq->eq.br; + br = txq->br; if (TXQ_TRYLOCK(txq) == 0) { /* @@ -1047,7 +1051,7 @@ cxgbe_qflush(struct ifnet *ifp) for_each_txq(pi, i, txq) { TXQ_LOCK(txq); m_freem(txq->m); - while ((m = buf_ring_dequeue_sc(txq->eq.br)) != NULL) + while ((m = buf_ring_dequeue_sc(txq->br)) != NULL) m_freem(m); TXQ_UNLOCK(txq); } @@ -1894,9 +1898,9 @@ first_port_up(struct adapter *sc) ADAPTER_LOCK_ASSERT_NOTOWNED(sc); /* - * The firmware event queue and the optional forwarded interrupt queues. + * queues that belong to the adapter (not any particular port). */ - rc = t4_setup_adapter_iqs(sc); + rc = t4_setup_adapter_queues(sc); if (rc != 0) goto done; @@ -1963,7 +1967,7 @@ last_port_down(struct adapter *sc) t4_intr_disable(sc); - t4_teardown_adapter_iqs(sc); + t4_teardown_adapter_queues(sc); for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); @@ -2278,7 +2282,7 @@ cxgbe_tick(void *arg) drops = s->tx_drop; for_each_txq(pi, i, txq) - drops += txq->eq.br->br_drops; + drops += txq->br->br_drops; ifp->if_snd.ifq_drops = drops; ifp->if_oerrors = s->tx_error_frames; @@ -2674,7 +2678,7 @@ txq_start(struct ifnet *ifp, struct sge_ TXQ_LOCK_ASSERT_OWNED(txq); - br = txq->eq.br; + br = txq->br; m = txq->m ? txq->m : drbr_dequeue(ifp, br); if (m) t4_eth_tx(ifp, txq, m); Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Apr 19 20:44:44 2011 (r220872) +++ head/sys/dev/cxgbe/t4_sge.c Tue Apr 19 22:08:28 2011 (r220873) @@ -94,7 +94,7 @@ struct sgl { static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, int, iq_intr_handler_t *, char *); static inline void init_fl(struct sge_fl *, int, char *); -static inline void init_txq(struct sge_txq *, int, char *); +static inline void init_eq(struct sge_eq *, int, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, bus_addr_t *, void **); static int free_ring(struct adapter *, bus_dma_tag_t, bus_dmamap_t, bus_addr_t, @@ -106,6 +106,8 @@ static int alloc_iq(struct sge_iq *, int static int free_iq(struct sge_iq *); static int alloc_rxq(struct port_info *, struct sge_rxq *, int, int); static int free_rxq(struct port_info *, struct sge_rxq *); +static int alloc_ctrlq(struct adapter *, struct sge_ctrlq *, int); +static int free_ctrlq(struct adapter *, struct sge_ctrlq *); static int alloc_txq(struct port_info *, struct sge_txq *, int); static int free_txq(struct port_info *, struct sge_txq *); static void oneseg_dma_callback(void *, bus_dma_segment_t *, int, int); @@ -115,8 +117,8 @@ static inline void ring_fl_db(struct ada static void refill_fl(struct sge_fl *, int); static int alloc_fl_sdesc(struct sge_fl *); static void free_fl_sdesc(struct sge_fl *); -static int alloc_eq_maps(struct sge_eq *); -static void free_eq_maps(struct sge_eq *); +static int alloc_tx_maps(struct sge_txq *); +static void free_tx_maps(struct sge_txq *); static void set_fl_tag_idx(struct sge_fl *, int); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -130,14 +132,16 @@ static inline void write_ulp_cpl_sgl(str struct txpkts *, struct mbuf *, struct sgl *); static int write_sgl_to_txd(struct sge_eq *, struct sgl *, caddr_t *); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); -static inline void ring_tx_db(struct adapter *, struct sge_eq *); +static inline void ring_eq_db(struct adapter *, struct sge_eq *); static inline int reclaimable(struct sge_eq *); -static int reclaim_tx_descs(struct sge_eq *, int, int); +static int reclaim_tx_descs(struct sge_txq *, int, int); static void write_eqflush_wr(struct sge_eq *); static __be64 get_flit(bus_dma_segment_t *, int, int); static int handle_sge_egr_update(struct adapter *, const struct cpl_sge_egr_update *); +static int ctrl_tx(struct adapter *, struct sge_ctrlq *, struct mbuf *); + /* * Called on MOD_LOAD and fills up fl_buf_info[]. */ @@ -235,23 +239,32 @@ t4_destroy_dma_tag(struct adapter *sc) } /* - * Allocate and initialize the firmware event queue and the forwarded interrupt - * queues, if any. The adapter owns all these queues as they are not associated - * with any particular port. + * Allocate and initialize the firmware event queue, control queues, and the + * forwarded interrupt queues (if any). The adapter owns all these queues as + * they are not associated with any particular port. * * Returns errno on failure. Resources allocated up to that point may still be * allocated. Caller is responsible for cleanup in case this function fails. */ int -t4_setup_adapter_iqs(struct adapter *sc) +t4_setup_adapter_queues(struct adapter *sc) { int i, rc; struct sge_iq *iq, *fwq; + struct sge_ctrlq *ctrlq; iq_intr_handler_t *handler; char name[16]; ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + if (sysctl_ctx_init(&sc->ctx) == 0) { + struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev); + struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); + + sc->oid_ctrlq = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, + "ctrlq", CTLFLAG_RD, NULL, "ctrl queues"); + } + fwq = &sc->sge.fwq; if (sc->flags & INTR_FWD) { iq = &sc->sge.fiq[0]; @@ -292,6 +305,25 @@ t4_setup_adapter_iqs(struct adapter *sc) if (rc != 0) { device_printf(sc->dev, "failed to create firmware event queue: %d\n", rc); + + return (rc); + } + + /* + * Control queues - one per hardware channel. + */ + ctrlq = &sc->sge.ctrlq[0]; + for (i = 0; i < NCHAN; i++, ctrlq++) { + snprintf(name, sizeof(name), "%s ctrlq%d", + device_get_nameunit(sc->dev), i); + init_eq(&ctrlq->eq, CTRL_EQ_QSIZE, name); + + rc = alloc_ctrlq(sc, ctrlq, i); + if (rc != 0) { + device_printf(sc->dev, + "failed to create control queue %d: %d\n", i, rc); + return (rc); + } } return (rc); @@ -301,13 +333,22 @@ t4_setup_adapter_iqs(struct adapter *sc) * Idempotent */ int -t4_teardown_adapter_iqs(struct adapter *sc) +t4_teardown_adapter_queues(struct adapter *sc) { int i; struct sge_iq *iq; ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + /* Do this before freeing the queues */ + if (sc->oid_ctrlq) { + sysctl_ctx_free(&sc->ctx); + sc->oid_ctrlq = NULL; + } + + for (i = 0; i < NCHAN; i++) + free_ctrlq(sc, &sc->sge.ctrlq[i]); + iq = &sc->sge.fwq; free_iq(iq); if (sc->flags & INTR_FWD) { @@ -367,7 +408,7 @@ t4_setup_eth_queues(struct port_info *pi snprintf(name, sizeof(name), "%s txq%d", device_get_nameunit(pi->dev), i); - init_txq(txq, pi->qsize_txq, name); + init_eq(&txq->eq, pi->qsize_txq, name); rc = alloc_txq(pi, txq, i); if (rc != 0) @@ -758,6 +799,12 @@ nextdesc: ndescs++; FL_UNLOCK(fl); } +int +t4_mgmt_tx(struct adapter *sc, struct mbuf *m) +{ + return ctrl_tx(sc, &sc->sge.ctrlq[0], m); +} + /* Per-packet header in a coalesced tx WR, before the SGL starts (in flits) */ #define TXPKTS_PKT_HDR ((\ sizeof(struct ulp_txpkt) + \ @@ -789,7 +836,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ struct port_info *pi = (void *)ifp->if_softc; struct adapter *sc = pi->adapter; struct sge_eq *eq = &txq->eq; - struct buf_ring *br = eq->br; + struct buf_ring *br = txq->br; struct mbuf *next; int rc, coalescing, can_reclaim; struct txpkts txpkts; @@ -799,13 +846,13 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ KASSERT(m, ("%s: called with nothing to do.", __func__)); prefetch(&eq->desc[eq->pidx]); - prefetch(&eq->sdesc[eq->pidx]); + prefetch(&txq->sdesc[eq->pidx]); txpkts.npkt = 0;/* indicates there's nothing in txpkts */ coalescing = 0; if (eq->avail < 8) - reclaim_tx_descs(eq, 0, 8); + reclaim_tx_descs(txq, 0, 8); for (; m; m = next ? next : drbr_dequeue(ifp, br)) { @@ -861,7 +908,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ coalescing = 0; if (eq->avail < 8) - reclaim_tx_descs(eq, 0, 8); + reclaim_tx_descs(txq, 0, 8); rc = write_txpkt_wr(pi, txq, m, &sgl); if (rc != 0) { @@ -887,11 +934,11 @@ t4_eth_tx(struct ifnet *ifp, struct sge_ doorbell: /* Fewer and fewer doorbells as the queue fills up */ if (eq->pending >= (1 << (fls(eq->qsize - eq->avail) / 2))) - ring_tx_db(sc, eq); + ring_eq_db(sc, eq); can_reclaim = reclaimable(eq); if (can_reclaim >= 32) - reclaim_tx_descs(eq, can_reclaim, 32); + reclaim_tx_descs(txq, can_reclaim, 32); } if (txpkts.npkt > 0) @@ -907,16 +954,21 @@ doorbell: * WR that reduced it to 0 so we don't need another flush (we don't have * any descriptor for a flush WR anyway, duh). */ - if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) + if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) { + struct tx_sdesc *txsd = &txq->sdesc[eq->pidx]; + + txsd->desc_used = 1; + txsd->credits = 0; write_eqflush_wr(eq); + } txq->m = m; if (eq->pending) - ring_tx_db(sc, eq); + ring_eq_db(sc, eq); can_reclaim = reclaimable(eq); if (can_reclaim >= 32) - reclaim_tx_descs(eq, can_reclaim, 128); + reclaim_tx_descs(txq, can_reclaim, 128); return (0); } @@ -970,10 +1022,10 @@ init_fl(struct sge_fl *fl, int qsize, ch } static inline void -init_txq(struct sge_txq *txq, int qsize, char *name) +init_eq(struct sge_eq *eq, int qsize, char *name) { - txq->eq.qsize = qsize; - strlcpy(txq->eq.lockname, name, sizeof(txq->eq.lockname)); + eq->qsize = qsize; + strlcpy(eq->lockname, name, sizeof(eq->lockname)); } static int @@ -1333,6 +1385,110 @@ free_rxq(struct port_info *pi, struct sg } static int +alloc_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq, int idx) +{ + int rc, cntxt_id; + size_t len; + struct fw_eq_ctrl_cmd c; + struct sge_eq *eq = &ctrlq->eq; + char name[16]; + struct sysctl_oid *oid; + struct sysctl_oid_list *children; + + mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF); + + len = eq->qsize * CTRL_EQ_ESIZE; + rc = alloc_ring(sc, len, &eq->desc_tag, &eq->desc_map, + &eq->ba, (void **)&eq->desc); + if (rc) + return (rc); + + eq->cap = eq->qsize - SPG_LEN / CTRL_EQ_ESIZE; + eq->spg = (void *)&eq->desc[eq->cap]; + eq->avail = eq->cap - 1; /* one less to avoid cidx = pidx */ + eq->iqid = sc->sge.fwq.cntxt_id; + + bzero(&c, sizeof(c)); + + c.op_to_vfn = htobe32(V_FW_CMD_OP(FW_EQ_CTRL_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_CTRL_CMD_PFN(sc->pf) | + V_FW_EQ_CTRL_CMD_VFN(0)); + c.alloc_to_len16 = htobe32(F_FW_EQ_CTRL_CMD_ALLOC | + F_FW_EQ_CTRL_CMD_EQSTART | FW_LEN16(c)); + c.cmpliqid_eqid = htonl(V_FW_EQ_CTRL_CMD_CMPLIQID(eq->iqid)); /* XXX */ + c.physeqid_pkd = htobe32(0); + c.fetchszm_to_iqid = + htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | + V_FW_EQ_CTRL_CMD_PCIECHN(idx) | + V_FW_EQ_CTRL_CMD_IQID(eq->iqid)); + c.dcaen_to_eqsize = + htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | + V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) | + V_FW_EQ_CTRL_CMD_EQSIZE(eq->qsize)); + c.eqaddr = htobe64(eq->ba); + + rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); + if (rc != 0) { + device_printf(sc->dev, + "failed to create control queue %d: %d\n", idx, rc); + return (rc); + } + + eq->pidx = eq->cidx = 0; + eq->cntxt_id = G_FW_EQ_CTRL_CMD_EQID(be32toh(c.cmpliqid_eqid)); + eq->flags |= (EQ_ALLOCATED | EQ_STARTED); + + cntxt_id = eq->cntxt_id - sc->sge.eq_start; + KASSERT(cntxt_id < sc->sge.neq, + ("%s: eq->cntxt_id (%d) more than the max (%d)", __func__, + cntxt_id, sc->sge.neq - 1)); + sc->sge.eqmap[cntxt_id] = eq; + + children = SYSCTL_CHILDREN(sc->oid_ctrlq); + + snprintf(name, sizeof(name), "%d", idx); + oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, name, CTLFLAG_RD, + NULL, "ctrl queue"); + children = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_UQUAD(&sc->ctx, children, OID_AUTO, "total_wrs", CTLFLAG_RD, + &ctrlq->total_wrs, "total # of work requests"); + SYSCTL_ADD_UINT(&sc->ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD, + &ctrlq->no_desc, 0, + "# of times ctrlq ran out of hardware descriptors"); + SYSCTL_ADD_UINT(&sc->ctx, children, OID_AUTO, "too_long", CTLFLAG_RD, + &ctrlq->too_long, 0, "# of oversized work requests"); + + return (rc); +} + +static int +free_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq) +{ + int rc; + struct sge_eq *eq = &ctrlq->eq; + + if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) { + rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id); + if (rc != 0) { + device_printf(sc->dev, + "failed to free ctrl queue %p: %d\n", eq, rc); + return (rc); + } + eq->flags &= ~(EQ_ALLOCATED | EQ_STARTED); + } + + free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc); + + if (mtx_initialized(&eq->eq_lock)) + mtx_destroy(&eq->eq_lock); + + bzero(ctrlq, sizeof(*ctrlq)); + return (0); +} + +static int alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx) { int rc, cntxt_id; @@ -1358,21 +1514,21 @@ alloc_txq(struct port_info *pi, struct s eq->cap = eq->qsize - SPG_LEN / TX_EQ_ESIZE; eq->spg = (void *)&eq->desc[eq->cap]; eq->avail = eq->cap - 1; /* one less to avoid cidx = pidx */ - eq->sdesc = malloc(eq->cap * sizeof(struct tx_sdesc), M_CXGBE, + txq->sdesc = malloc(eq->cap * sizeof(struct tx_sdesc), M_CXGBE, M_ZERO | M_WAITOK); - eq->br = buf_ring_alloc(eq->qsize, M_CXGBE, M_WAITOK, &eq->eq_lock); + txq->br = buf_ring_alloc(eq->qsize, M_CXGBE, M_WAITOK, &eq->eq_lock); eq->iqid = sc->sge.rxq[pi->first_rxq].iq.cntxt_id; rc = bus_dma_tag_create(sc->dmat, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, 64 * 1024, TX_SGL_SEGS, - BUS_SPACE_MAXSIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &eq->tx_tag); + BUS_SPACE_MAXSIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &txq->tx_tag); if (rc != 0) { device_printf(sc->dev, "failed to create tx DMA tag: %d\n", rc); return (rc); } - rc = alloc_eq_maps(eq); + rc = alloc_tx_maps(txq); if (rc != 0) { device_printf(sc->dev, "failed to setup tx DMA maps: %d\n", rc); return (rc); @@ -1488,15 +1644,15 @@ free_txq(struct port_info *pi, struct sg free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc); - free(eq->sdesc, M_CXGBE); + free(txq->sdesc, M_CXGBE); - if (eq->maps) - free_eq_maps(eq); + if (txq->maps) + free_tx_maps(txq); - buf_ring_free(eq->br, M_CXGBE); + buf_ring_free(txq->br, M_CXGBE); - if (eq->tx_tag) - bus_dma_tag_destroy(eq->tx_tag); + if (txq->tx_tag) + bus_dma_tag_destroy(txq->tx_tag); if (mtx_initialized(&eq->eq_lock)) mtx_destroy(&eq->eq_lock); @@ -1718,7 +1874,7 @@ free_fl_sdesc(struct sge_fl *fl) } static int -alloc_eq_maps(struct sge_eq *eq) +alloc_tx_maps(struct sge_txq *txq) { struct tx_map *txm; int i, rc, count; @@ -1728,16 +1884,16 @@ alloc_eq_maps(struct sge_eq *eq) * limit for any WR). txq->no_dmamap events shouldn't occur if maps is * sized for the worst case. */ - count = eq->qsize * 10 / 8; - eq->map_total = eq->map_avail = count; - eq->map_cidx = eq->map_pidx = 0; + count = txq->eq.qsize * 10 / 8; + txq->map_total = txq->map_avail = count; + txq->map_cidx = txq->map_pidx = 0; - eq->maps = malloc(count * sizeof(struct tx_map), M_CXGBE, + txq->maps = malloc(count * sizeof(struct tx_map), M_CXGBE, M_ZERO | M_WAITOK); - txm = eq->maps; + txm = txq->maps; for (i = 0; i < count; i++, txm++) { - rc = bus_dmamap_create(eq->tx_tag, 0, &txm->map); + rc = bus_dmamap_create(txq->tx_tag, 0, &txm->map); if (rc != 0) goto failed; } @@ -1746,36 +1902,36 @@ alloc_eq_maps(struct sge_eq *eq) failed: while (--i >= 0) { txm--; - bus_dmamap_destroy(eq->tx_tag, txm->map); + bus_dmamap_destroy(txq->tx_tag, txm->map); } - KASSERT(txm == eq->maps, ("%s: EDOOFUS", __func__)); + KASSERT(txm == txq->maps, ("%s: EDOOFUS", __func__)); - free(eq->maps, M_CXGBE); - eq->maps = NULL; + free(txq->maps, M_CXGBE); + txq->maps = NULL; return (rc); } static void -free_eq_maps(struct sge_eq *eq) +free_tx_maps(struct sge_txq *txq) { struct tx_map *txm; int i; - txm = eq->maps; - for (i = 0; i < eq->map_total; i++, txm++) { + txm = txq->maps; + for (i = 0; i < txq->map_total; i++, txm++) { if (txm->m) { - bus_dmamap_unload(eq->tx_tag, txm->map); + bus_dmamap_unload(txq->tx_tag, txm->map); m_freem(txm->m); txm->m = NULL; } - bus_dmamap_destroy(eq->tx_tag, txm->map); + bus_dmamap_destroy(txq->tx_tag, txm->map); } - free(eq->maps, M_CXGBE); - eq->maps = NULL; + free(txq->maps, M_CXGBE); + txq->maps = NULL; } /* @@ -1802,7 +1958,6 @@ get_pkt_sgl(struct sge_txq *txq, struct int sgl_only) { struct mbuf *m = *fp; - struct sge_eq *eq = &txq->eq; struct tx_map *txm; int rc, defragged = 0, n; @@ -1816,11 +1971,11 @@ start: sgl->nsegs = 0; if (m->m_pkthdr.len <= IMM_LEN && !sgl_only) return (0); /* nsegs = 0 tells caller to use imm. tx */ - if (eq->map_avail == 0) { + if (txq->map_avail == 0) { txq->no_dmamap++; return (ENOMEM); } - txm = &eq->maps[eq->map_pidx]; + txm = &txq->maps[txq->map_pidx]; if (m->m_pkthdr.tso_segsz && m->m_len < 50) { *fp = m_pullup(m, 50); @@ -1829,7 +1984,7 @@ start: sgl->nsegs = 0; return (ENOBUFS); } - rc = bus_dmamap_load_mbuf_sg(eq->tx_tag, txm->map, m, sgl->seg, + rc = bus_dmamap_load_mbuf_sg(txq->tx_tag, txm->map, m, sgl->seg, &sgl->nsegs, BUS_DMA_NOWAIT); if (rc == EFBIG && defragged == 0) { m = m_defrag(m, M_DONTWAIT); @@ -1844,9 +1999,9 @@ start: sgl->nsegs = 0; return (rc); txm->m = m; - eq->map_avail--; - if (++eq->map_pidx == eq->map_total) - eq->map_pidx = 0; + txq->map_avail--; + if (++txq->map_pidx == txq->map_total) + txq->map_pidx = 0; KASSERT(sgl->nsegs > 0 && sgl->nsegs <= TX_SGL_SEGS, ("%s: bad DMA mapping (%d segments)", __func__, sgl->nsegs)); @@ -1870,7 +2025,6 @@ start: sgl->nsegs = 0; static int free_pkt_sgl(struct sge_txq *txq, struct sgl *sgl) { - struct sge_eq *eq = &txq->eq; struct tx_map *txm; TXQ_LOCK_ASSERT_OWNED(txq); @@ -1880,14 +2034,14 @@ free_pkt_sgl(struct sge_txq *txq, struct /* 1 pkt uses exactly 1 map, back it out */ - eq->map_avail++; - if (eq->map_pidx > 0) - eq->map_pidx--; + txq->map_avail++; + if (txq->map_pidx > 0) + txq->map_pidx--; else - eq->map_pidx = eq->map_total - 1; + txq->map_pidx = txq->map_total - 1; - txm = &eq->maps[eq->map_pidx]; - bus_dmamap_unload(eq->tx_tag, txm->map); + txm = &txq->maps[txq->map_pidx]; + bus_dmamap_unload(txq->tx_tag, txm->map); txm->m = NULL; return (0); @@ -1997,7 +2151,7 @@ write_txpkt_wr(struct port_info *pi, str cpl->ctrl1 = htobe64(ctrl1); /* Software descriptor */ - txsd = &eq->sdesc[eq->pidx]; + txsd = &txq->sdesc[eq->pidx]; txsd->desc_used = ndesc; eq->pending += ndesc; @@ -2009,11 +2163,11 @@ write_txpkt_wr(struct port_info *pi, str /* SGL */ dst = (void *)(cpl + 1); if (sgl->nsegs > 0) { - txsd->map_used = 1; + txsd->credits = 1; txq->sgl_wrs++; write_sgl_to_txd(eq, sgl, &dst); } else { - txsd->map_used = 0; + txsd->credits = 0; txq->imm_wrs++; for (; m; m = m->m_next) { copy_to_txd(eq, mtod(m, caddr_t), &dst, m->m_len); @@ -2063,8 +2217,8 @@ add_to_txpkts(struct port_info *pi, stru txpkts->nflits += flits; txpkts->plen += m->m_pkthdr.len; - txsd = &eq->sdesc[eq->pidx]; - txsd->map_used++; + txsd = &txq->sdesc[eq->pidx]; + txsd->credits++; return (0); } @@ -2098,8 +2252,8 @@ add_to_txpkts(struct port_info *pi, stru txpkts->flitp = &eq->desc[eq->pidx].flit[2]; txpkts->plen = m->m_pkthdr.len; - txsd = &eq->sdesc[eq->pidx]; - txsd->map_used = 1; + txsd = &txq->sdesc[eq->pidx]; + txsd->credits = 1; return (0); } @@ -2137,7 +2291,7 @@ write_txpkts_wr(struct sge_txq *txq, str /* Everything else already written */ - txsd = &eq->sdesc[eq->pidx]; + txsd = &txq->sdesc[eq->pidx]; txsd->desc_used = ndesc; KASSERT(eq->avail >= ndesc, ("%s: out of descriptors", __func__)); @@ -2328,7 +2482,7 @@ copy_to_txd(struct sge_eq *eq, caddr_t f } static inline void -ring_tx_db(struct adapter *sc, struct sge_eq *eq) +ring_eq_db(struct adapter *sc, struct sge_eq *eq) { wmb(); t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), @@ -2357,11 +2511,12 @@ reclaimable(struct sge_eq *eq) * The actual number reclaimed is provided as the return value. */ static int -reclaim_tx_descs(struct sge_eq *eq, int can_reclaim, int n) +reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n) { struct tx_sdesc *txsd; struct tx_map *txm; unsigned int reclaimed, maps; + struct sge_eq *eq = &txq->eq; EQ_LOCK_ASSERT_OWNED(eq); @@ -2372,7 +2527,7 @@ reclaim_tx_descs(struct sge_eq *eq, int while (can_reclaim && maps < n) { int ndesc; - txsd = &eq->sdesc[eq->cidx]; + txsd = &txq->sdesc[eq->cidx]; ndesc = txsd->desc_used; /* Firmware doesn't return "partial" credits. */ @@ -2380,7 +2535,7 @@ reclaim_tx_descs(struct sge_eq *eq, int ("%s: unexpected number of credits: %d, %d", __func__, can_reclaim, ndesc)); - maps += txsd->map_used; + maps += txsd->credits; reclaimed += ndesc; can_reclaim -= ndesc; @@ -2390,7 +2545,7 @@ reclaim_tx_descs(struct sge_eq *eq, int eq->cidx -= eq->cap; } - txm = &eq->maps[eq->map_cidx]; + txm = &txq->maps[txq->map_cidx]; if (maps) prefetch(txm->m); @@ -2398,25 +2553,25 @@ reclaim_tx_descs(struct sge_eq *eq, int KASSERT(eq->avail < eq->cap, /* avail tops out at (cap - 1) */ ("%s: too many descriptors available", __func__)); - eq->map_avail += maps; - KASSERT(eq->map_avail <= eq->map_total, + txq->map_avail += maps; + KASSERT(txq->map_avail <= txq->map_total, ("%s: too many maps available", __func__)); while (maps--) { struct tx_map *next; next = txm + 1; - if (__predict_false(eq->map_cidx + 1 == eq->map_total)) - next = eq->maps; + if (__predict_false(txq->map_cidx + 1 == txq->map_total)) + next = txq->maps; prefetch(next->m); - bus_dmamap_unload(eq->tx_tag, txm->map); + bus_dmamap_unload(txq->tx_tag, txm->map); m_freem(txm->m); txm->m = NULL; txm = next; - if (__predict_false(++eq->map_cidx == eq->map_total)) - eq->map_cidx = 0; + if (__predict_false(++txq->map_cidx == txq->map_total)) + txq->map_cidx = 0; } return (reclaimed); @@ -2426,7 +2581,6 @@ static void write_eqflush_wr(struct sge_eq *eq) { struct fw_eq_flush_wr *wr; - struct tx_sdesc *txsd; EQ_LOCK_ASSERT_OWNED(eq); KASSERT(eq->avail > 0, ("%s: no descriptors left.", __func__)); @@ -2437,10 +2591,6 @@ write_eqflush_wr(struct sge_eq *eq) wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(sizeof(*wr) / 16) | F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); - txsd = &eq->sdesc[eq->pidx]; - txsd->desc_used = 1; - txsd->map_used = 0; - eq->flags |= EQ_CRFLUSHED; eq->pending++; eq->avail--; @@ -2507,3 +2657,56 @@ handle_sge_egr_update(struct adapter *sc return (0); } + +/* + * m0 is freed on successful transmission. + */ +static int +ctrl_tx(struct adapter *sc, struct sge_ctrlq *ctrlq, struct mbuf *m0) +{ + struct sge_eq *eq = &ctrlq->eq; + int rc = 0, ndesc; + int can_reclaim; + caddr_t dst; + struct mbuf *m; + + M_ASSERTPKTHDR(m0); + + if (m0->m_pkthdr.len > SGE_MAX_WR_LEN) { + ctrlq->too_long++; + return (EMSGSIZE); + } + ndesc = howmany(m0->m_pkthdr.len, CTRL_EQ_ESIZE); + + EQ_LOCK(eq); + + can_reclaim = reclaimable(eq); + eq->cidx += can_reclaim; + eq->avail += can_reclaim; + if (__predict_false(eq->cidx >= eq->cap)) + eq->cidx -= eq->cap; + + if (eq->avail < ndesc) { + rc = EAGAIN; + ctrlq->no_desc++; + goto failed; + } + + dst = (void *)&eq->desc[eq->pidx]; + for (m = m0; m; m = m->m_next) + copy_to_txd(eq, mtod(m, caddr_t), &dst, m->m_len); + + eq->pidx += ndesc; + if (__predict_false(eq->pidx >= eq->cap)) + eq->pidx -= eq->cap; + + eq->pending += ndesc; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 22:14:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8410106566B; Tue, 19 Apr 2011 22:14:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984BC8FC0C; Tue, 19 Apr 2011 22:14: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 p3JMEIPb024250; Tue, 19 Apr 2011 22:14:18 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JMEI1m024248; Tue, 19 Apr 2011 22:14:18 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104192214.p3JMEI1m024248@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 19 Apr 2011 22:14: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: r220874 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 22:14:18 -0000 Author: np Date: Tue Apr 19 22:14:18 2011 New Revision: 220874 URL: http://svn.freebsd.org/changeset/base/220874 Log: Use Toeplitz hash for RSS. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Apr 19 22:08:28 2011 (r220873) +++ head/sys/dev/cxgbe/t4_main.c Tue Apr 19 22:14:18 2011 (r220874) @@ -378,6 +378,7 @@ t4_attach(device_t dev) rc = -t4_config_glbl_rss(sc, sc->mbox, FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL, F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN | + F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ | F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP); if (rc != 0) { device_printf(dev, From owner-svn-src-all@FreeBSD.ORG Tue Apr 19 23:33:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEFE5106564A; Tue, 19 Apr 2011 23:33:51 +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 DE4A08FC13; Tue, 19 Apr 2011 23:33: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 p3JNXpLd025907; Tue, 19 Apr 2011 23:33:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3JNXpwX025905; Tue, 19 Apr 2011 23:33:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104192333.p3JNXpwX025905@svn.freebsd.org> From: Rick Macklem Date: Tue, 19 Apr 2011 23:33: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: r220875 - head/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 19 Apr 2011 23:33:52 -0000 Author: rmacklem Date: Tue Apr 19 23:33:51 2011 New Revision: 220875 URL: http://svn.freebsd.org/changeset/base/220875 Log: Add stablerestart(5) to the See Also list for nfsd.8. This is a content change. Suggested by: Jeremy Chadwick MFC after: 2 weeks Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 22:14:18 2011 (r220874) +++ head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 23:33:51 2011 (r220875) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd March 29, 1995 +.Dd April 19, 2011 .Dt NFSD 8 .Os .Sh NAME @@ -195,6 +195,7 @@ just do a .Xr nfssvc 2 , .Xr nfsv4 4 , .Xr exports 5 , +.Xr stablerestart 5 , .Xr gssd 8 , .Xr ipfw 8 , .Xr mountd 8 , From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 00:21:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46EA1106566B; Wed, 20 Apr 2011 00:21:52 +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 355EE8FC14; Wed, 20 Apr 2011 00:21: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 p3K0LqkY026938; Wed, 20 Apr 2011 00:21:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K0LqE1026936; Wed, 20 Apr 2011 00:21:52 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104200021.p3K0LqE1026936@svn.freebsd.org> From: Rick Macklem Date: Wed, 20 Apr 2011 00:21: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: r220876 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 00:21:52 -0000 Author: rmacklem Date: Wed Apr 20 00:21:51 2011 New Revision: 220876 URL: http://svn.freebsd.org/changeset/base/220876 Log: Modify the offset + size checks for read and write in the experimental NFS client to take care of overflows. Thanks go to dillon at apollo.backplane.com for providing the snippet of code that does this. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Apr 19 23:33:51 2011 (r220875) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Wed Apr 20 00:21:51 2011 (r220876) @@ -1285,12 +1285,13 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct nfsrv_descript *nd = &nfsd; int rsize; + off_t tmp_off; *attrflagp = 0; tsiz = uio_uio_resid(uiop); + tmp_off = uiop->uio_offset + tsiz; NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { - /* XXX Needs overflow/negative check for uio_offset */ + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uiop->uio_offset) { NFSUNLOCKMNT(nmp); return (EFBIG); } @@ -1458,12 +1459,14 @@ nfsrpc_writerpc(vnode_t vp, struct uio * struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; nfsattrbit_t attrbits; + off_t tmp_off; KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1")); *attrflagp = 0; tsiz = uio_uio_resid(uiop); + tmp_off = uiop->uio_offset + tsiz; NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uiop->uio_offset) { NFSUNLOCKMNT(nmp); return (EFBIG); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 01:15:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72734106566B; Wed, 20 Apr 2011 01:15:22 +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 478B58FC17; Wed, 20 Apr 2011 01:15: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 p3K1FM8m028104; Wed, 20 Apr 2011 01:15:22 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K1FMkJ028102; Wed, 20 Apr 2011 01:15:22 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104200115.p3K1FMkJ028102@svn.freebsd.org> From: Rick Macklem Date: Wed, 20 Apr 2011 01:15: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: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 01:15:22 -0000 Author: rmacklem Date: Wed Apr 20 01:15:22 2011 New Revision: 220877 URL: http://svn.freebsd.org/changeset/base/220877 Log: Modify the offset + size checks for read and write in the experimental NFS client to take care of overflows for the calls above the buffer cache layer in a manner similar to r220876. Thanks go to dillon at apollo.backplane.com for providing the snippet of code that does this. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Apr 20 00:21:51 2011 (r220876) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Apr 20 01:15:22 2011 (r220877) @@ -452,6 +452,7 @@ ncl_bioread(struct vnode *vp, struct uio int bcount; int seqcount; int nra, error = 0, n = 0, on = 0; + off_t tmp_off; KASSERT(uio->uio_rw == UIO_READ, ("ncl_read mode")); if (uio->uio_resid == 0) @@ -469,11 +470,14 @@ ncl_bioread(struct vnode *vp, struct uio } if (nmp->nm_rsize == 0 || nmp->nm_readdirsize == 0) (void) newnfs_iosize(nmp); - mtx_unlock(&nmp->nm_mtx); + tmp_off = uio->uio_offset + uio->uio_resid; if (vp->v_type != VDIR && - (uio->uio_offset + uio->uio_resid) > nmp->nm_maxfilesize) + (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset)) { + mtx_unlock(&nmp->nm_mtx); return (EFBIG); + } + mtx_unlock(&nmp->nm_mtx); if (newnfs_directio_enable && (ioflag & IO_DIRECT) && (vp->v_type == VREG)) /* No caching/ no readaheads. Just read data into the user buffer */ @@ -874,6 +878,7 @@ ncl_write(struct vop_write_args *ap) daddr_t lbn; int bcount; int n, on, error = 0; + off_t tmp_off; KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, @@ -940,8 +945,13 @@ flush_and_restart: if (uio->uio_offset < 0) return (EINVAL); - if ((uio->uio_offset + uio->uio_resid) > nmp->nm_maxfilesize) + tmp_off = uio->uio_offset + uio->uio_resid; + mtx_lock(&nmp->nm_mtx); + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { + mtx_unlock(&nmp->nm_mtx); return (EFBIG); + } + mtx_unlock(&nmp->nm_mtx); if (uio->uio_resid == 0) return (0); From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 05:47:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E064C106564A; Wed, 20 Apr 2011 05:47:16 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0058FC14; Wed, 20 Apr 2011 05:47:14 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 92D7145CA0; Wed, 20 Apr 2011 07:47:12 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E46F345C89; Wed, 20 Apr 2011 07:47:06 +0200 (CEST) Date: Wed, 20 Apr 2011 07:46:55 +0200 From: Pawel Jakub Dawidek To: Rick Macklem Message-ID: <20110420054655.GD1826@garage.freebsd.pl> References: <201104200115.p3K1FMkJ028102@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wLAMOaPNJ0fu1fTG" Content-Disposition: inline In-Reply-To: <201104200115.p3K1FMkJ028102@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 05:47:17 -0000 --wLAMOaPNJ0fu1fTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2011 at 01:15:22AM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Wed Apr 20 01:15:22 2011 > New Revision: 220877 > URL: http://svn.freebsd.org/changeset/base/220877 >=20 > Log: > Modify the offset + size checks for read and write in the > experimental NFS client to take care of overflows for the calls > above the buffer cache layer in a manner similar to r220876. > Thanks go to dillon at apollo.backplane.com for providing the > snippet of code that does this. [...] > + tmp_off =3D uio->uio_offset + uio->uio_resid; > + mtx_lock(&nmp->nm_mtx); > + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { > + mtx_unlock(&nmp->nm_mtx); > return (EFBIG); > + } > + mtx_unlock(&nmp->nm_mtx); I don't think you need the lock to protect nm_maxfilesize. Can it change =66rom under us? My guess is that it is set on mount time and is not modified afterwards. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --wLAMOaPNJ0fu1fTG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2uc08ACgkQForvXbEpPzSU5gCg9Hhw4p76BFJso+O2NcO//XmU 4F8AnjGeLA1kXi6RstTK8a8bIYW9LYVQ =JtAb -----END PGP SIGNATURE----- --wLAMOaPNJ0fu1fTG-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 07:55:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD212106564A; Wed, 20 Apr 2011 07:55:33 +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 9BFC78FC0A; Wed, 20 Apr 2011 07:55: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 p3K7tX6K037288; Wed, 20 Apr 2011 07:55:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K7tX8R037285; Wed, 20 Apr 2011 07:55:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104200755.p3K7tX8R037285@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 07:55: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: r220878 - in 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, 20 Apr 2011 07:55:33 -0000 Author: bz Date: Wed Apr 20 07:55:33 2011 New Revision: 220878 URL: http://svn.freebsd.org/changeset/base/220878 Log: MFp4 CH=191466: Move fw_one_pass to where it belongs: it is a property of ipfw, not of ip_input. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days Modified: head/sys/netinet/ip_input.c head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Apr 20 01:15:22 2011 (r220877) +++ head/sys/netinet/ip_input.c Wed Apr 20 07:55:33 2011 (r220878) @@ -218,8 +218,6 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, "number of entries in the per-cpu output flow caches"); #endif -VNET_DEFINE(int, fw_one_pass) = 1; - static void ip_freef(struct ipqhead *, struct ipq *); /* Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Wed Apr 20 01:15:22 2011 (r220877) +++ head/sys/netinet/ipfw/ip_fw2.c Wed Apr 20 07:55:33 2011 (r220878) @@ -113,6 +113,7 @@ static int default_to_accept; #endif VNET_DEFINE(int, autoinc_step); +VNET_DEFINE(int, fw_one_pass) = 1; /* * Each rule belongs to one of 32 different sets (0..31). From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 08:00:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32D6F106566B; Wed, 20 Apr 2011 08:00:30 +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 217168FC17; Wed, 20 Apr 2011 08:00: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 p3K80UMr037495; Wed, 20 Apr 2011 08:00:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K80TjE037490; Wed, 20 Apr 2011 08:00:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104200800.p3K80TjE037490@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 08:00: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: r220879 - 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: Wed, 20 Apr 2011 08:00:30 -0000 Author: bz Date: Wed Apr 20 08:00:29 2011 New Revision: 220879 URL: http://svn.freebsd.org/changeset/base/220879 Log: MFp4 CH=191470: Move the ipport_tick_callout and related functions from ip_input.c to in_pcb.c. The random source port allocation code has been merged and is now local to in_pcb.c only. Use a SYSINIT to get the callout started and no longer depend on initialization from the inet code, which would not work in an IPv6 only setup. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 4 days Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Apr 20 07:55:33 2011 (r220878) +++ head/sys/netinet/in_pcb.c Wed Apr 20 08:00:29 2011 (r220879) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -85,6 +86,8 @@ __FBSDID("$FreeBSD$"); #include +static struct callout ipport_tick_callout; + /* * These configure the range of local port addresses assigned to * "unspecified" outgoing connections/packets/whatever. @@ -1668,7 +1671,7 @@ in_pcbsosetlabel(struct socket *so) * allocation. We return to random allocation only once we drop below * ipport_randomcps for at least ipport_randomtime seconds. */ -void +static void ipport_tick(void *xtp) { VNET_ITERATOR_DECL(vnet_iter); @@ -1689,6 +1692,30 @@ ipport_tick(void *xtp) callout_reset(&ipport_tick_callout, hz, ipport_tick, NULL); } +static void +ip_fini(void *xtp) +{ + + callout_stop(&ipport_tick_callout); +} + +/* + * The ipport_callout should start running at about the time we attach the + * inet or inet6 domains. + */ +static void +ipport_tick_init(const void *unused __unused) +{ + + /* Start ipport_tick. */ + callout_init(&ipport_tick_callout, CALLOUT_MPSAFE); + callout_reset(&ipport_tick_callout, 1, ipport_tick, NULL); + EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL, + SHUTDOWN_PRI_DEFAULT); +} +SYSINIT(ipport_tick_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, + ipport_tick_init, NULL); + void inp_wlock(struct inpcb *inp) { Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Apr 20 07:55:33 2011 (r220878) +++ head/sys/netinet/in_pcb.h Wed Apr 20 08:00:29 2011 (r220879) @@ -482,8 +482,6 @@ VNET_DECLARE(int, ipport_tcpallocs); #define V_ipport_stoprandom VNET(ipport_stoprandom) #define V_ipport_tcpallocs VNET(ipport_tcpallocs) -extern struct callout ipport_tick_callout; - void in_pcbinfo_destroy(struct inpcbinfo *); void in_pcbinfo_init(struct inpcbinfo *, const char *, struct inpcbhead *, int, int, char *, uma_init, uma_fini, uint32_t); @@ -521,7 +519,6 @@ int in_getsockaddr(struct socket *so, st struct sockaddr * in_sockaddr(in_port_t port, struct in_addr *addr); void in_pcbsosetlabel(struct socket *so); -void ipport_tick(void *xtp); #endif /* _KERNEL */ #endif /* !_NETINET_IN_PCB_H_ */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Apr 20 07:55:33 2011 (r220878) +++ head/sys/netinet/ip_input.c Wed Apr 20 08:00:29 2011 (r220879) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -194,8 +193,6 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, &VNET_NAME(maxfragsperpacket), 0, "Maximum number of IPv4 fragments allowed per packet"); -struct callout ipport_tick_callout; - #ifdef IPCTL_DEFMTU SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, &ip_mtu, 0, "Default MTU"); @@ -352,11 +349,6 @@ ip_init(void) ip_protox[pr->pr_protocol] = pr - inetsw; } - /* Start ipport_tick. */ - callout_init(&ipport_tick_callout, CALLOUT_MPSAFE); - callout_reset(&ipport_tick_callout, 1, ipport_tick, NULL); - EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL, - SHUTDOWN_PRI_DEFAULT); EVENTHANDLER_REGISTER(nmbclusters_change, ipq_zone_change, NULL, EVENTHANDLER_PRI_ANY); @@ -381,13 +373,6 @@ ip_destroy(void) } #endif -void -ip_fini(void *xtp) -{ - - callout_stop(&ipport_tick_callout); -} - /* * Ip input routine. Checksum and byte swap header. If fragmented * try to reassemble. Process options. Pass to next level. Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Wed Apr 20 07:55:33 2011 (r220878) +++ head/sys/netinet/ip_var.h Wed Apr 20 08:00:29 2011 (r220879) @@ -206,7 +206,6 @@ int inp_setmoptions(struct inpcb *, stru int ip_ctloutput(struct socket *, struct sockopt *sopt); void ip_drain(void); -void ip_fini(void *xtp); int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, u_long if_hwassist_flags, int sw_csum); void ip_forward(struct mbuf *m, int srcrt); From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 08:03:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F7EE106564A; Wed, 20 Apr 2011 08:03:22 +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 843E88FC16; Wed, 20 Apr 2011 08:03: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 p3K83MSD037618; Wed, 20 Apr 2011 08:03:22 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K83MZW037616; Wed, 20 Apr 2011 08:03:22 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104200803.p3K83MZW037616@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 08:03: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: r220880 - 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: Wed, 20 Apr 2011 08:03:22 -0000 Author: bz Date: Wed Apr 20 08:03:22 2011 New Revision: 220880 URL: http://svn.freebsd.org/changeset/base/220880 Log: MFp4 CH=191760: When compiling out INET we still need the initialization routines as well as the tuning and montoring sysctls shared with IPv6. Move the two send/recvspace variables up from the middle of the file to ease compiling out the INET only code. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed Apr 20 08:00:29 2011 (r220879) +++ head/sys/netinet/raw_ip.c Wed Apr 20 08:03:22 2011 (r220880) @@ -33,6 +33,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" @@ -93,6 +94,7 @@ void (*ip_divert_ptr)(struct mbuf *, int int (*ng_ipfw_input_p)(struct mbuf **, int, struct ip_fw_args *, int); +#ifdef INET /* * Hooks for multicast routing. They all default to NULL, so leave them not * initialized and rely on BSS being set to 0. @@ -118,6 +120,15 @@ u_long (*ip_mcast_src)(int); void (*rsvp_input_p)(struct mbuf *m, int off); int (*ip_rsvp_vif)(struct socket *, struct sockopt *); void (*ip_rsvp_force_done)(struct socket *); +#endif /* INET */ + +u_long rip_sendspace = 9216; +SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, + &rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); + +u_long rip_recvspace = 9216; +SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, + &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); /* * Hash functions @@ -127,6 +138,7 @@ void (*ip_rsvp_force_done)(struct socket #define INP_PCBHASH_RAW(proto, laddr, faddr, mask) \ (((proto) + (laddr) + (faddr)) % (mask) + 1) +#ifdef INET static void rip_inshash(struct inpcb *inp) { @@ -157,6 +169,7 @@ rip_delhash(struct inpcb *inp) LIST_REMOVE(inp, inp_hash); } +#endif /* INET */ /* * Raw interface to IP protocol. @@ -200,6 +213,7 @@ rip_destroy(void) } #endif +#ifdef INET static int rip_append(struct inpcb *last, struct ip *ip, struct mbuf *n, struct sockaddr_in *ripsrc) @@ -748,14 +762,6 @@ rip_ctlinput(int cmd, struct sockaddr *s } } -u_long rip_sendspace = 9216; -u_long rip_recvspace = 9216; - -SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, - &rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); -SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, - &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); - static int rip_attach(struct socket *so, int proto, struct thread *td) { @@ -980,6 +986,7 @@ rip_send(struct socket *so, int flags, s } return (rip_output(m, so, dst)); } +#endif /* INET */ static int rip_pcblist(SYSCTL_HANDLER_ARGS) @@ -1086,6 +1093,7 @@ SYSCTL_PROC(_net_inet_raw, OID_AUTO/*XXX CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, rip_pcblist, "S,xinpcb", "List of active raw IP sockets"); +#ifdef INET struct pr_usrreqs rip_usrreqs = { .pru_abort = rip_abort, .pru_attach = rip_attach, @@ -1101,3 +1109,4 @@ struct pr_usrreqs rip_usrreqs = { .pru_sosetlabel = in_pcbsosetlabel, .pru_close = rip_close, }; +#endif /* INET */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 08:05:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20207106566B; Wed, 20 Apr 2011 08:05:24 +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 0F6458FC08; Wed, 20 Apr 2011 08:05: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 p3K85NLL037718; Wed, 20 Apr 2011 08:05:23 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K85NaB037716; Wed, 20 Apr 2011 08:05:23 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104200805.p3K85NaB037716@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 08:05: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: r220881 - 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: Wed, 20 Apr 2011 08:05:24 -0000 Author: bz Date: Wed Apr 20 08:05:23 2011 New Revision: 220881 URL: http://svn.freebsd.org/changeset/base/220881 Log: MFp4 CH=191760,191770: Not compiling in and not initializing from inetsw from in_proto.c for IPv6 only, we need to initialize upper layer protocols from inet6sw. Make sure to not initialize them twice in a Dual-Stack environment but only conditionally on no INET as we have done for TCP for a long time. Otherwise we would leak resources. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days Modified: head/sys/netinet6/in6_proto.c Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Wed Apr 20 08:03:22 2011 (r220880) +++ head/sys/netinet6/in6_proto.c Wed Apr 20 08:05:23 2011 (r220881) @@ -169,6 +169,9 @@ struct ip6protosw inet6sw[] = { .pr_input = udp6_input, .pr_ctlinput = udp6_ctlinput, .pr_ctloutput = ip6_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = udp_init, +#endif .pr_usrreqs = &udp6_usrreqs, }, { @@ -196,6 +199,9 @@ struct ip6protosw inet6sw[] = { .pr_ctlinput = sctp6_ctlinput, .pr_ctloutput = sctp_ctloutput, .pr_drain = sctp_drain, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = sctp_init, +#endif .pr_usrreqs = &sctp6_usrreqs }, { @@ -231,6 +237,9 @@ struct ip6protosw inet6sw[] = { .pr_output = rip6_output, .pr_ctlinput = rip6_ctlinput, .pr_ctloutput = rip6_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = rip_init, +#endif .pr_usrreqs = &rip6_usrreqs }, { From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 08:38:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8E3D106564A; Wed, 20 Apr 2011 08:38:25 +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 A82998FC08; Wed, 20 Apr 2011 08:38: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 p3K8cPIm038716; Wed, 20 Apr 2011 08:38:25 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K8cPvt038714; Wed, 20 Apr 2011 08:38:25 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104200838.p3K8cPvt038714@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 20 Apr 2011 08:38: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: r220882 - head/contrib/bsnmp/snmpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 08:38:25 -0000 Author: ru Date: Wed Apr 20 08:38:25 2011 New Revision: 220882 URL: http://svn.freebsd.org/changeset/base/220882 Log: Don't spam syslog with "inet_ntop(): Address family not supported by protocol family" when processing requests received from the UNIX domain socket. MFC after: 3 days Modified: head/contrib/bsnmp/snmpd/main.c Modified: head/contrib/bsnmp/snmpd/main.c ============================================================================== --- head/contrib/bsnmp/snmpd/main.c Wed Apr 20 08:05:23 2011 (r220881) +++ head/contrib/bsnmp/snmpd/main.c Wed Apr 20 08:38:25 2011 (r220882) @@ -1214,7 +1214,8 @@ snmpd_input(struct port_input *pi, struc /* * In case of AF_INET{6} peer, do hosts_access(5) check. */ - if (inet_ntop(pi->peer->sa_family, + if (pi->peer->sa_family != AF_LOCAL && + inet_ntop(pi->peer->sa_family, &((const struct sockaddr_in *)(const void *)pi->peer)->sin_addr, client, sizeof(client)) != NULL) { request_set(&req, RQ_CLIENT_ADDR, client, 0); @@ -1223,7 +1224,7 @@ snmpd_input(struct port_input *pi, struc eval_client(&req)); return (-1); } - } else + } else if (pi->peer->sa_family != AF_LOCAL) syslog(LOG_ERR, "inet_ntop(): %m"); #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 11:15:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0163F106564A; Wed, 20 Apr 2011 11:15:18 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3B948FC12; Wed, 20 Apr 2011 11: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 p3KBFHjs045806; Wed, 20 Apr 2011 11:15:17 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KBFHvE045804; Wed, 20 Apr 2011 11:15:17 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104201115.p3KBFHvE045804@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 20 Apr 2011 11:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220883 - stable/8/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 11:15:18 -0000 Author: pluknet Date: Wed Apr 20 11:15:17 2011 New Revision: 220883 URL: http://svn.freebsd.org/changeset/base/220883 Log: MFC r220594: Remove the now defunct kern.ipc.nmbufs tunable. PR: kern/132497 (part) Modified: stable/8/sys/boot/forth/loader.conf Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/boot/forth/loader.conf ============================================================================== --- stable/8/sys/boot/forth/loader.conf Wed Apr 20 08:38:25 2011 (r220882) +++ stable/8/sys/boot/forth/loader.conf Wed Apr 20 11:15:17 2011 (r220883) @@ -107,7 +107,6 @@ module_path="/boot/modules" # Set the mo #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI #kern.ipc.maxsockets="" # Set the maximum number of sockets avaliable #kern.ipc.nmbclusters="" # Set the number of mbuf clusters -#kern.ipc.nmbufs="" # Set the maximum number of mbufs #kern.ipc.nsfbufs="" # Set the number of sendfile(2) bufs #net.inet.tcp.tcbhashsize="" # Set the value of TCBHASHSIZE #vfs.root.mountfrom="" # Specify root partition in a way the From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 11:17:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99804106564A; Wed, 20 Apr 2011 11:17:21 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87D3E8FC0C; Wed, 20 Apr 2011 11:17:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3KBHLFM045926; Wed, 20 Apr 2011 11:17:21 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KBHLek045924; Wed, 20 Apr 2011 11:17:21 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104201117.p3KBHLek045924@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 20 Apr 2011 11:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220884 - stable/7/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 11:17:21 -0000 Author: pluknet Date: Wed Apr 20 11:17:21 2011 New Revision: 220884 URL: http://svn.freebsd.org/changeset/base/220884 Log: MFC r220594: Remove the now defunct kern.ipc.nmbufs tunable. PR: kern/132497 (part) Modified: stable/7/sys/boot/forth/loader.conf 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/boot/forth/loader.conf ============================================================================== --- stable/7/sys/boot/forth/loader.conf Wed Apr 20 11:15:17 2011 (r220883) +++ stable/7/sys/boot/forth/loader.conf Wed Apr 20 11:17:21 2011 (r220884) @@ -105,7 +105,6 @@ module_path="/boot/modules" # Set the mo #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI #kern.ipc.maxsockets="" # Set the maximum number of sockets avaliable #kern.ipc.nmbclusters="" # Set the number of mbuf clusters -#kern.ipc.nmbufs="" # Set the maximum number of mbufs #kern.ipc.nsfbufs="" # Set the number of sendfile(2) bufs #net.inet.tcp.tcbhashsize="" # Set the value of TCBHASHSIZE #vfs.root.mountfrom="" # Specify root partition in a way the From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 12:09:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0826E106566B; Wed, 20 Apr 2011 12:09:34 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 175CD8FC13; Wed, 20 Apr 2011 12:09:32 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAMTLrk2DaFvO/2dsb2JhbACEUKFjtiSRKoEpg056BI4i X-IronPort-AV: E=Sophos;i="4.64,246,1301889600"; d="scan'208";a="118948223" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 20 Apr 2011 08:09:32 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 3E176B3FED; Wed, 20 Apr 2011 08:09:32 -0400 (EDT) Date: Wed, 20 Apr 2011 08:09:32 -0400 (EDT) From: Rick Macklem To: Pawel Jakub Dawidek Message-ID: <630616771.329277.1303301372199.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110420054655.GD1826@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 12:09:34 -0000 > > + tmp_off = uio->uio_offset + uio->uio_resid; > > + mtx_lock(&nmp->nm_mtx); > > + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { > > + mtx_unlock(&nmp->nm_mtx); > > return (EFBIG); > > + } > > + mtx_unlock(&nmp->nm_mtx); > > I don't think you need the lock to protect nm_maxfilesize. Can it > change > from under us? My guess is that it is set on mount time and is not > modified afterwards. > Good question. For NFSv3 - it is only modified by the first fsinfo RPC and that normally happens at mount time, as you guessed above. (This is consistent with RFC1813, which defines the fsinfo RPC as getting non-volatile information.) For NFSv4 - it gets it each time VFS_STATFS() happens. I am not sure that this is correct, but I don't know of anywhere in RFC3530 where it states that this attribute will not change. In practice, I suspect that servers seldom, if ever, change it. So, it is unlikely to change and I'd be comfortable taking the mutex lock off the check for it, if others are? (As you might be aware, I started a thread on hackers-freebsd@ where my question was basically "do you need to mutex lock when you read a global variable". My main concern there was a case that I'm working on w.r.t. forced dismounts. jhb@ suggested that he thinks it is good practice to always lock, to play it safe. At least that was my interpretation?) rick From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 12:58:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB8D0106566B; Wed, 20 Apr 2011 12:58:30 +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 C9E9E8FC0A; Wed, 20 Apr 2011 12:58: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 p3KCwU3K049198; Wed, 20 Apr 2011 12:58:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KCwUVo049188; Wed, 20 Apr 2011 12:58:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104201258.p3KCwUVo049188@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 12:58: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: r220885 - 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: Wed, 20 Apr 2011 12:58:31 -0000 Author: bz Date: Wed Apr 20 12:58:30 2011 New Revision: 220885 URL: http://svn.freebsd.org/changeset/base/220885 Log: Compile in in_cksum* implementations for both IPv6 and IPv6. While in_pseudo() etc. is often used in offloading feature support, in_cksum() is mostly used to fix some broken hardware. Keeping both around for the moment allows us to compile NIC drivers even in an IPv6 only environment without the need to mangle them with #ifdef INETs in a way they are not prepared for. This will leave some dead code paths that will not be exercised for IPv6. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days Modified: head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.ia64 head/sys/conf/files.mips head/sys/conf/files.pc98 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/conf/files.sun4v Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.amd64 Wed Apr 20 12:58:30 2011 (r220885) @@ -106,7 +106,7 @@ amd64/amd64/exception.S standard amd64/amd64/fpu.c standard amd64/amd64/gdb_machdep.c optional gdb amd64/amd64/identcpu.c standard -amd64/amd64/in_cksum.c optional inet +amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/intr_machdep.c standard amd64/amd64/io.c optional io Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.arm Wed Apr 20 12:58:30 2011 (r220885) @@ -24,8 +24,8 @@ arm/arm/fiq_subr.S standard arm/arm/fusu.S standard arm/arm/gdb_machdep.c optional gdb arm/arm/identcpu.c standard -arm/arm/in_cksum.c optional inet -arm/arm/in_cksum_arm.S optional inet +arm/arm/in_cksum.c optional inet | inet6 +arm/arm/in_cksum_arm.S optional inet | inet6 arm/arm/intr.c standard arm/arm/locore.S standard no-obj arm/arm/machdep.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.i386 Wed Apr 20 12:58:30 2011 (r220885) @@ -283,7 +283,7 @@ i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode i386/i386/i686_mem.c optional mem i386/i386/identcpu.c standard -i386/i386/in_cksum.c optional inet +i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/intr_machdep.c standard i386/i386/io.c optional io Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.ia64 Wed Apr 20 12:58:30 2011 (r220885) @@ -85,7 +85,7 @@ ia64/ia64/emulate.c standard ia64/ia64/exception.S standard ia64/ia64/gdb_machdep.c optional gdb ia64/ia64/highfp.c standard -ia64/ia64/in_cksum.c optional inet +ia64/ia64/in_cksum.c optional inet | inet6 ia64/ia64/interrupt.c standard ia64/ia64/iodev_machdep.c optional io ia64/ia64/locore.S standard no-obj Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.mips Wed Apr 20 12:58:30 2011 (r220885) @@ -53,7 +53,7 @@ mips/mips/db_disasm.c optional ddb mips/mips/db_interface.c optional ddb mips/mips/db_trace.c optional ddb mips/mips/dump_machdep.c standard -mips/mips/in_cksum.c optional inet +mips/mips/in_cksum.c optional inet | inet6 mips/mips/locore.S standard no-obj mips/mips/minidump_machdep.c standard mips/mips/mem.c optional mem Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.pc98 Wed Apr 20 12:58:30 2011 (r220885) @@ -142,7 +142,7 @@ i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/i686_mem.c optional mem i386/i386/identcpu.c standard -i386/i386/in_cksum.c optional inet +i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/intr_machdep.c standard i386/i386/io.c optional io Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.powerpc Wed Apr 20 12:58:30 2011 (r220885) @@ -176,7 +176,7 @@ powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb -powerpc/powerpc/in_cksum.c optional inet +powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard powerpc/powerpc/mem.c optional mem Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.sparc64 Wed Apr 20 12:58:30 2011 (r220885) @@ -105,7 +105,7 @@ sparc64/sparc64/eeprom.c optional eeprom eeprom sbus sparc64/sparc64/gdb_machdep.c optional gdb sparc64/sparc64/identcpu.c standard -sparc64/sparc64/in_cksum.c optional inet +sparc64/sparc64/in_cksum.c optional inet | inet6 sparc64/sparc64/interrupt.S standard no-obj \ compile-with "${NORMAL_S} -mcpu=ultrasparc" sparc64/sparc64/intr_machdep.c standard Modified: head/sys/conf/files.sun4v ============================================================================== --- head/sys/conf/files.sun4v Wed Apr 20 11:17:21 2011 (r220884) +++ head/sys/conf/files.sun4v Wed Apr 20 12:58:30 2011 (r220885) @@ -63,7 +63,7 @@ sun4v/sun4v/hvcons.c standard sun4v/sun4v/hcall.S standard sun4v/sun4v/hviommu.c standard sparc64/sparc64/identcpu.c standard -sparc64/sparc64/in_cksum.c optional inet +sparc64/sparc64/in_cksum.c optional inet | inet6 sun4v/sun4v/interrupt.S standard no-obj sun4v/sun4v/intr_machdep.c standard sun4v/sun4v/locore.S standard no-obj From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 13:05:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6FD106566B; Wed, 20 Apr 2011 13:05:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 86B348FC14; Wed, 20 Apr 2011 13:05:49 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id AB5EB25D37C7; Wed, 20 Apr 2011 13:05:48 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 9E0D6159D540; Wed, 20 Apr 2011 13:05:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id RYhuAueWdlIx; Wed, 20 Apr 2011 13:05:46 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 37E49159D565; Wed, 20 Apr 2011 13:05:46 +0000 (UTC) Date: Wed, 20 Apr 2011 13:05:45 +0000 (UTC) From: "Bjoern A. Zeeb" To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201104201258.p3KCwUVo049188@svn.freebsd.org> Message-ID: References: <201104201258.p3KCwUVo049188@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r220885 - 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: Wed, 20 Apr 2011 13:05:49 -0000 On Wed, 20 Apr 2011, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Apr 20 12:58:30 2011 > New Revision: 220885 > URL: http://svn.freebsd.org/changeset/base/220885 > > Log: > Compile in in_cksum* implementations for both IPv6 and IPv6. IPv4 and IPv6 as Erwin noticed. > While in_pseudo() etc. is often used in offloading feature support, > in_cksum() is mostly used to fix some broken hardware. > > Keeping both around for the moment allows us to compile NIC drivers > even in an IPv6 only environment without the need to mangle them > with #ifdef INETs in a way they are not prepared for. This will > leave some dead code paths that will not be exercised for IPv6. Note that the changes coming soon removing the inet dependency from drivers will break no-INET && no-INET6 (no-IP) kernels when those drivers are included which is kind of a step backwards but we don't have many people compiling no-IP kernels with the NIC drivers these days (apart from my universe builds) I guess. Sam had concerns about the inet dependency on drivers months back when I added them and he was right. The real fix is really to add the proper #ifdefs to the drivers in my view, in which cases i.e. TSO4 would not be announced or processed, etc. when there is no INET in the kernel, etc. But for all that to work and happen we'll need a better plan on how to handle all these features rightish in the future. We have way too much copy and paste in our drivers for all that. I'll defer this discussion though for a bit later in the year. > Reviewed by: gnn > Sponsored by: The FreeBSD Foundation > Sponsored by: iXsystems > MFC after: 3 days > > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.arm > head/sys/conf/files.i386 > head/sys/conf/files.ia64 > head/sys/conf/files.mips > head/sys/conf/files.pc98 > head/sys/conf/files.powerpc > head/sys/conf/files.sparc64 > head/sys/conf/files.sun4v -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 13:27:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B599106564A; Wed, 20 Apr 2011 13: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 3FF898FC12; Wed, 20 Apr 2011 13: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 p3KDRpXv050168; Wed, 20 Apr 2011 13: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 p3KDRpAG050164; Wed, 20 Apr 2011 13:27:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104201327.p3KDRpAG050164@svn.freebsd.org> From: Alexander Motin Date: Wed, 20 Apr 2011 13:27: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: r220886 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 13:27:51 -0000 Author: mav Date: Wed Apr 20 13:27:50 2011 New Revision: 220886 URL: http://svn.freebsd.org/changeset/base/220886 Log: Add basic support for DMA-capable ATA disks on DMA-incapable controller. This is really rare situation these days, but still may happen in embedded. Modified: head/sys/cam/ata/ata_all.h head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Wed Apr 20 12:58:30 2011 (r220885) +++ head/sys/cam/ata/ata_all.h Wed Apr 20 13:27:50 2011 (r220886) @@ -35,6 +35,8 @@ struct ccb_ataio; struct cam_periph; union ccb; +#define SID_DMA 0x10 /* Abuse inq_flags bit to track enabled DMA. */ + struct ata_cmd { u_int8_t flags; /* ATA command flags */ #define CAM_ATAIO_48BIT 0x01 /* Command has 48-bit format */ Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Apr 20 12:58:30 2011 (r220885) +++ head/sys/cam/ata/ata_da.c Wed Apr 20 13:27:50 2011 (r220886) @@ -751,7 +751,8 @@ adaregister(struct cam_periph *periph, v bioq_init(&softc->bio_queue); bioq_init(&softc->trim_queue); - if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA) + if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA && + (cgd->inq_flags & SID_DMA)) softc->flags |= ADA_FLAG_CAN_DMA; if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) softc->flags |= ADA_FLAG_CAN_48BIT; @@ -760,7 +761,7 @@ adaregister(struct cam_periph *periph, v if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT) softc->flags |= ADA_FLAG_CAN_POWERMGT; if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ && - cgd->inq_flags & SID_CmdQue) + (cgd->inq_flags & SID_DMA) && (cgd->inq_flags & SID_CmdQue)) softc->flags |= ADA_FLAG_CAN_NCQ; if (cgd->ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) { softc->flags |= ADA_FLAG_CAN_TRIM; Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Apr 20 12:58:30 2011 (r220885) +++ head/sys/cam/ata/ata_xpt.c Wed Apr 20 13:27:50 2011 (r220886) @@ -388,6 +388,11 @@ negotiate: /* If SIM disagree - renegotiate. */ if (mode != wantmode) goto negotiate; + /* Remember what transport thinks about DMA. */ + if (mode < ATA_DMA) + path->device->inq_flags &= ~SID_DMA; + else + path->device->inq_flags |= SID_DMA; cam_fill_ataio(ataio, 1, probedone, From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 14:16:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D8301065679; Wed, 20 Apr 2011 14:16:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BECC8FC17; Wed, 20 Apr 2011 14:16: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 p3KEGNWj051723; Wed, 20 Apr 2011 14:16:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KEGNXP051721; Wed, 20 Apr 2011 14:16:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104201416.p3KEGNXP051721@svn.freebsd.org> From: Alexander Motin Date: Wed, 20 Apr 2011 14:16: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: r220887 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 14:16:23 -0000 Author: mav Date: Wed Apr 20 14:16:22 2011 New Revision: 220887 URL: http://svn.freebsd.org/changeset/base/220887 Log: When calling XPT_REL_SIMQ to ajust number of openings, do not try to really release device. We haven't frozen the device before and attempt to release it will at least cause warning message from kernel. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed Apr 20 13:27:50 2011 (r220886) +++ head/sbin/camcontrol/camcontrol.c Wed Apr 20 14:16:22 2011 (r220887) @@ -2755,6 +2755,7 @@ tagcontrol(struct cam_device *device, in bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_relsim) - sizeof(struct ccb_hdr)); ccb->ccb_h.func_code = XPT_REL_SIMQ; + ccb->ccb_h.flags = CAM_DEV_QFREEZE; ccb->crs.release_flags = RELSIM_ADJUST_OPENINGS; ccb->crs.openings = numtags; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 14:19:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EC5C106564A; Wed, 20 Apr 2011 14:19:35 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6728FC0C; Wed, 20 Apr 2011 14:19: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 p3KEJYc8051902; Wed, 20 Apr 2011 14:19:34 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KEJYC4051900; Wed, 20 Apr 2011 14:19:34 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201104201419.p3KEJYC4051900@svn.freebsd.org> From: Ryan Stone Date: Wed, 20 Apr 2011 14:19: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: r220888 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 14:19:35 -0000 Author: rstone Date: Wed Apr 20 14:19:34 2011 New Revision: 220888 URL: http://svn.freebsd.org/changeset/base/220888 Log: r179417 introduced a bug into pthread_once(). Previously pthread_once() used a global pthread_mutex_t for synchronization. r179417 replaced that with an implementation that directly used atomic instructions and thr_* syscalls to synchronize callers to pthread_once. However, calling pthread_mutex_lock on the global mutex implicitly ensured that _thr_check_init() had been called but with r179417 this was no longer guaranteed. This meant that if you were unlucky enough to have your first call into libthr be a call to pthread_once(), you would segfault when trying to access the pointer returned by _get_curthread(). The fix is to explicitly call _thr_check_init() from pthread_once(). Reviewed by: davidxu Approved by: emaste (mentor) MFC after: 1 week Modified: head/lib/libthr/thread/thr_once.c Modified: head/lib/libthr/thread/thr_once.c ============================================================================== --- head/lib/libthr/thread/thr_once.c Wed Apr 20 14:16:22 2011 (r220887) +++ head/lib/libthr/thread/thr_once.c Wed Apr 20 14:19:34 2011 (r220888) @@ -64,6 +64,8 @@ _pthread_once(pthread_once_t *once_contr struct pthread *curthread; int state; + _thr_check_init(); + for (;;) { state = once_control->state; if (state == ONCE_DONE) From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 16:17:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9961065673; Wed, 20 Apr 2011 16:17:13 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 543258FC1D; Wed, 20 Apr 2011 16:17:11 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id EE76345C89; Wed, 20 Apr 2011 18:17:09 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A99DE45685; Wed, 20 Apr 2011 18:17:04 +0200 (CEST) Date: Wed, 20 Apr 2011 18:16:55 +0200 From: Pawel Jakub Dawidek To: Rick Macklem Message-ID: <20110420161655.GA1907@garage.freebsd.pl> References: <20110420054655.GD1826@garage.freebsd.pl> <630616771.329277.1303301372199.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <630616771.329277.1303301372199.JavaMail.root@erie.cs.uoguelph.ca> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 16:17:13 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2011 at 08:09:32AM -0400, Rick Macklem wrote: > > > + tmp_off =3D uio->uio_offset + uio->uio_resid; > > > + mtx_lock(&nmp->nm_mtx); > > > + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { > > > + mtx_unlock(&nmp->nm_mtx); > > > return (EFBIG); > > > + } > > > + mtx_unlock(&nmp->nm_mtx); > >=20 > > I don't think you need the lock to protect nm_maxfilesize. Can it > > change > > from under us? My guess is that it is set on mount time and is not > > modified afterwards. > >=20 > Good question. > For NFSv3 - it is only modified by the first fsinfo RPC and that normally > happens at mount time, as you guessed above. (This is consistent with > RFC1813, which defines the fsinfo RPC as getting non-volatile informa= tion.) > For NFSv4 - it gets it each time VFS_STATFS() happens. I am not sure that > this is correct, but I don't know of anywhere in RFC3530 where it sta= tes > that this attribute will not change. In practice, I suspect that serv= ers > seldom, if ever, change it. >=20 > So, it is unlikely to change and I'd be comfortable taking the mutex lock > off the check for it, if others are? (As you might be aware, I started a > thread on hackers-freebsd@ where my question was basically "do you need to > mutex lock when you read a global variable". My main concern there was a > case that I'm working on w.r.t. forced dismounts. jhb@ suggested that he > thinks it is good practice to always lock, to play it safe. At least that > was my interpretation?) This is not that easy, I'm afraid. You need to ask yourself a question what you are trying to protect from. Here, the mutex only guarantees to have consistent view of the nm_maxfilesize field. For example if this field modification wouldn't be atomic you would need the mutex to ensure that the value is correct. Imagine a situation where it is modifed not by simple 'a =3D b', but by something like this: mtx_lock(&nmp->nm_mtx); nmp->nm_maxfilesize =3D some_32bit_array[0]; nmp->nm_maxfilesize |=3D some_32bit_array[1] << 32; mtx_unlock(&nmp->nm_mtx); To read that properly you need a mutex to ensure you won't read the value between those two operations. If it is not the case - its modification is atomic and reading it is atomic then you don't need mutex to read the value as it will always be consistent. The question is what will happen if it changes after you read it. thread0 thread1 ------- ------- mtx_lock(&nmp->nm_mtx); nmp->nm_maxfilesize =3D 8192; mtx_unlock(&nmp->nm_mtx); mtx_lock(&nmp->nm_mtx); if (tmp_off > nmp->nm_maxfilesize) { mtx_unlock(&nmp->nm_mtx); return (EFBIG); } mtx_unlock(&nmp->nm_mtx); mtx_lock(&nmp->nm_mtx); nmp->nm_maxfilesize =3D 2048; mtx_unlock(&nmp->nm_mtx); Now, if tmp_off is 4096 what will happen if you have a race like the above? Is it critical? Then you need to protect with this mutex as well. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk2vBvYACgkQForvXbEpPzT+/QCdFqw13GVrE7j8yGvnYJ/LaYlj KVsAnjSrq6O6PvHuGcaOJDuNOMEoc94G =dG5B -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 16:36:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64E4E1065675; Wed, 20 Apr 2011 16:36:59 +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 55DAE8FC08; Wed, 20 Apr 2011 16:36:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3KGaxTO056351; Wed, 20 Apr 2011 16:36:59 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KGaxV9056349; Wed, 20 Apr 2011 16:36:59 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104201636.p3KGaxV9056349@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Apr 2011 16:36: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: r220889 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 16:36:59 -0000 Author: pjd Date: Wed Apr 20 16:36:59 2011 New Revision: 220889 URL: http://svn.freebsd.org/changeset/base/220889 Log: Timeout must be positive. MFC after: 1 week Modified: head/sbin/hastd/parse.y Modified: head/sbin/hastd/parse.y ============================================================================== --- head/sbin/hastd/parse.y Wed Apr 20 14:19:34 2011 (r220888) +++ head/sbin/hastd/parse.y Wed Apr 20 16:36:59 2011 (r220889) @@ -461,6 +461,10 @@ compression_type: timeout_statement: TIMEOUT NUM { + if ($2 <= 0) { + pjdlog_error("Negative or zero timeout."); + return (1); + } switch (depth) { case 0: depth0_timeout = $2; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 16:38:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D363106564A; Wed, 20 Apr 2011 16:38:05 +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 6DCD38FC15; Wed, 20 Apr 2011 16:38: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 p3KGc5Ks056486; Wed, 20 Apr 2011 16:38:05 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KGc5ro056484; Wed, 20 Apr 2011 16:38:05 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104201638.p3KGc5ro056484@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Apr 2011 16:38: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: r220890 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 16:38:05 -0000 Author: pjd Date: Wed Apr 20 16:38:05 2011 New Revision: 220890 URL: http://svn.freebsd.org/changeset/base/220890 Log: If we act in different role than requested by the remote node, log it as a warning and not an error. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Wed Apr 20 16:36:59 2011 (r220889) +++ head/sbin/hastd/hastd.c Wed Apr 20 16:38:05 2011 (r220890) @@ -730,7 +730,7 @@ listen_accept(void) } /* Is the resource marked as secondary? */ if (res->hr_role != HAST_ROLE_SECONDARY) { - pjdlog_error("We act as %s for the resource and not as %s as requested by %s.", + pjdlog_warning("We act as %s for the resource and not as %s as requested by %s.", role2str(res->hr_role), role2str(HAST_ROLE_SECONDARY), raddr); nv_add_stringf(nverr, "errmsg", From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 16:59:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBDB4106564A; Wed, 20 Apr 2011 16:59:27 +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 C19E58FC19; Wed, 20 Apr 2011 16:59: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 p3KGxR84057407; Wed, 20 Apr 2011 16:59:27 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KGxRG4057403; Wed, 20 Apr 2011 16:59:27 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201659.p3KGxRG4057403@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 16:59: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: r220891 - 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: Wed, 20 Apr 2011 16:59:28 -0000 Author: bschmidt Date: Wed Apr 20 16:59:27 2011 New Revision: 220891 URL: http://svn.freebsd.org/changeset/base/220891 Log: Add basic support for advanced bluetooth coexistence required for 6005 gen2b (1030/6030) adapters. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Apr 20 16:38:05 2011 (r220890) +++ head/sys/dev/iwn/if_iwn.c Wed Apr 20 16:59:27 2011 (r220891) @@ -253,6 +253,7 @@ static void iwn_tune_sensitivity(struct static int iwn_send_sensitivity(struct iwn_softc *); static int iwn_set_pslevel(struct iwn_softc *, int, int, int); static int iwn_send_btcoex(struct iwn_softc *); +static int iwn_send_advanced_btcoex(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); static int iwn_scan(struct iwn_softc *); @@ -816,6 +817,8 @@ iwn5000_attach(struct iwn_softc *sc, uin case IWN_HW_REV_TYPE_6005: sc->limits = &iwn6000_sensitivity_limits; sc->fwname = "iwn6005fw"; + if (pid != 0x0082 && pid != 0x0085) + sc->sc_flags |= IWN_FLAG_ADV_BTCOEX; break; default: device_printf(sc->sc_dev, "adapter type %d not supported\n", @@ -4721,6 +4724,63 @@ iwn_send_btcoex(struct iwn_softc *sc) } static int +iwn_send_advanced_btcoex(struct iwn_softc *sc) +{ + static const uint32_t btcoex_3wire[12] = { + 0xaaaaaaaa, 0xaaaaaaaa, 0xaeaaaaaa, 0xaaaaaaaa, + 0xcc00ff28, 0x0000aaaa, 0xcc00aaaa, 0x0000aaaa, + 0xc0004000, 0x00004000, 0xf0005000, 0xf0005000, + }; + struct iwn6000_btcoex_config btconfig; + struct iwn_btcoex_priotable btprio; + struct iwn_btcoex_prot btprot; + int error, i; + + memset(&btconfig, 0, sizeof btconfig); + btconfig.flags = 145; + btconfig.max_kill = 5; + btconfig.bt3_t7_timer = 1; + btconfig.kill_ack = htole32(0xffff0000); + btconfig.kill_cts = htole32(0xffff0000); + btconfig.sample_time = 2; + btconfig.bt3_t2_timer = 0xc; + for (i = 0; i < 12; i++) + btconfig.lookup_table[i] = htole32(btcoex_3wire[i]); + btconfig.valid = htole16(0xff); + btconfig.prio_boost = 0xf0; + DPRINTF(sc, IWN_DEBUG_RESET, + "%s: configuring advanced bluetooth coexistence\n", __func__); + error = iwn_cmd(sc, IWN_CMD_BT_COEX, &btconfig, sizeof(btconfig), 1); + if (error != 0) + return error; + + memset(&btprio, 0, sizeof btprio); + btprio.calib_init1 = 0x6; + btprio.calib_init2 = 0x7; + btprio.calib_periodic_low1 = 0x2; + btprio.calib_periodic_low2 = 0x3; + btprio.calib_periodic_high1 = 0x4; + btprio.calib_periodic_high2 = 0x5; + btprio.dtim = 0x6; + btprio.scan52 = 0x8; + btprio.scan24 = 0xa; + error = iwn_cmd(sc, IWN_CMD_BT_COEX_PRIOTABLE, &btprio, sizeof(btprio), + 1); + if (error != 0) + return error; + + /* Force BT state machine change. */ + memset(&btprot, 0, sizeof btprio); + btprot.open = 1; + btprot.type = 1; + error = iwn_cmd(sc, IWN_CMD_BT_COEX_PROT, &btprot, sizeof(btprot), 1); + if (error != 0) + return error; + btprot.open = 0; + return iwn_cmd(sc, IWN_CMD_BT_COEX_PROT, &btprot, sizeof(btprot), 1); +} + +static int iwn_config(struct iwn_softc *sc) { struct iwn_ops *ops = &sc->ops; @@ -4756,7 +4816,10 @@ iwn_config(struct iwn_softc *sc) } /* Configure bluetooth coexistence. */ - error = iwn_send_btcoex(sc); + if (sc->sc_flags & IWN_FLAG_ADV_BTCOEX) + error = iwn_send_advanced_btcoex(sc); + else + error = iwn_send_btcoex(sc); if (error != 0) { device_printf(sc->sc_dev, "%s: could not configure bluetooth coexistence, error %d\n", Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Wed Apr 20 16:38:05 2011 (r220890) +++ head/sys/dev/iwn/if_iwnreg.h Wed Apr 20 16:59:27 2011 (r220891) @@ -434,6 +434,8 @@ struct iwn_tx_cmd { #define IWN_CMD_SET_CRITICAL_TEMP 164 #define IWN_CMD_SET_SENSITIVITY 168 #define IWN_CMD_PHY_CALIB 176 +#define IWN_CMD_BT_COEX_PRIOTABLE 204 +#define IWN_CMD_BT_COEX_PROT 205 uint8_t flags; uint8_t idx; @@ -829,7 +831,7 @@ struct iwn5000_cmd_txpower { uint8_t reserved; } __packed; -/* Structure for command IWN_CMD_BLUETOOTH. */ +/* Structures for command IWN_CMD_BLUETOOTH. */ struct iwn_bluetooth { uint8_t flags; #define IWN_BT_COEX_CHAN_ANN (1 << 0) @@ -847,6 +849,43 @@ struct iwn_bluetooth { uint32_t kill_cts; } __packed; +struct iwn6000_btcoex_config { + uint8_t flags; + uint8_t lead_time; + uint8_t max_kill; + uint8_t bt3_t7_timer; + uint32_t kill_ack; + uint32_t kill_cts; + uint8_t sample_time; + uint8_t bt3_t2_timer; + uint16_t bt4_reaction; + uint32_t lookup_table[12]; + uint16_t bt4_decision; + uint16_t valid; + uint8_t prio_boost; + uint8_t tx_prio_boost; + uint16_t rx_prio_boost; +} __packed; + +struct iwn_btcoex_priotable { + uint8_t calib_init1; + uint8_t calib_init2; + uint8_t calib_periodic_low1; + uint8_t calib_periodic_low2; + uint8_t calib_periodic_high1; + uint8_t calib_periodic_high2; + uint8_t dtim; + uint8_t scan52; + uint8_t scan24; + uint8_t reserved[7]; +} __packed; + +struct iwn_btcoex_prot { + uint8_t open; + uint8_t type; + uint8_t reserved[2]; +} __packed; + /* Structure for command IWN_CMD_SET_CRITICAL_TEMP. */ struct iwn_critical_temp { uint32_t reserved; Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Wed Apr 20 16:38:05 2011 (r220890) +++ head/sys/dev/iwn/if_iwnvar.h Wed Apr 20 16:59:27 2011 (r220891) @@ -206,6 +206,7 @@ struct iwn_softc { #define IWN_FLAG_INTERNAL_PA (1 << 4) #define IWN_FLAG_HAS_11N (1 << 6) #define IWN_FLAG_ENH_SENS (1 << 7) +#define IWN_FLAG_ADV_BTCOEX (1 << 8) uint8_t hw_type; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 17:32:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041181065672; Wed, 20 Apr 2011 17:32:21 +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 E591A8FC08; Wed, 20 Apr 2011 17:32: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 p3KHWKdv058868; Wed, 20 Apr 2011 17:32:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KHWKfa058865; Wed, 20 Apr 2011 17:32:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201732.p3KHWKfa058865@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 17:32: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: r220892 - in head/sys: conf contrib/dev/iwn modules/iwnfw/iwn1000 modules/iwnfw/iwn5000 modules/iwnfw/iwn6050 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 17:32:21 -0000 Author: bschmidt Date: Wed Apr 20 17:32:20 2011 New Revision: 220892 URL: http://svn.freebsd.org/changeset/base/220892 Log: Update iwn(4) firmware blobs: - bump iwn1000fw to 39.31.5.1 - bump iwn5000fw to 8.83.5.1 - bump iwn6050fw to 41.28.5.1 Added: head/sys/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu head/sys/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu Deleted: head/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu head/sys/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu Modified: head/sys/conf/files head/sys/modules/iwnfw/iwn1000/Makefile head/sys/modules/iwnfw/iwn5000/Makefile head/sys/modules/iwnfw/iwn6050/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 20 16:59:27 2011 (r220891) +++ head/sys/conf/files Wed Apr 20 17:32:20 2011 (r220892) @@ -1213,8 +1213,8 @@ iwn1000fw.fwo optional iwn1000fw | iwn no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ - dependency "$S/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu" \ + dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ @@ -1241,8 +1241,8 @@ iwn5000fw.fwo optional iwn5000fw | iwnf no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ - dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu" \ + dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ @@ -1283,8 +1283,8 @@ iwn6050fw.fwo optional iwn6050fw | iwn no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ - dependency "$S/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu" \ + dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgb/if_ixgb.c optional ixgb Added: head/sys/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu Wed Apr 20 17:32:20 2011 (r220892) @@ -0,0 +1,5963 @@ +Copyright (c) 2006-2011, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-1000-39.31.5.1.fw.uu +AAAAAElXTAoxMDAwIGZ3IHYzOS4zMS41LjEgYnVpbGQgMzUxMzgKAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAQUfJ0KJAAABAAAAAAAAAAEAAAAY7AEAICCADwAAQABpIAAAaSBAAGkg +AABpIEAAICCADwAA6ABpIAAAaSBAAGkgAABpIEAAICCADwAAMAVpIAAAaSBAAGkgAABKIAAASiEA +AEoiAABKIwAASiQAAEolAABKJgAASicAAEogABBKIQAQSiIAEEojABBKJAAQSiUAEEomABBKJwAQ +SiAAIEohACBKIgAgSiMAIEokACBKJQAgSiYAIEonACBKIAAwSiEAMAokgD+AAADAQSycMEAsnDBC +JBw0CiKAP4AA1FkKIwA3jg4AAEomAHBpIEAASiYAcEomAHBKJgBwSiYAcAAWAHCAAHAEQHggIECH +AAAAAAAAAAAAAArIz3GgAMgfDhkYgAvIDxkYgAzIEBkYgA0SAjYAyER4ERkYgA7ILRkYgOB+4cT8 +HMi+/BxIvuHA4cHhwuHD/BwIsfwcSLH8HIix/BzIsfwcCLL8HEiy/ByIsvwcyLL8HAi/aiSAEOHE +aiTAEOHE8cDPcKAA0BsUgM9xgABsBAQggI/PUQThAKEK8i8pAQDPcIAAYAnwIEAAQHja/9HAwcRr +JMAQwcRrJIAQwcSfdAQUCzQEFAo0BBQJNAQUCDQEFAc0BBQGNAQUBTQEFAQ0wcPBwsHBwcDBxEUs +fhAKJkB+wcRrJIAUwcQgIECHCsiHuAoaGDALyJu4CxoYMAzIDBoYMA3Ih7gNGhgwDsiFIMMPDhoY +MOB+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Kz3CAALBgVngAiIYgfwwc +eAS4JXgD8IDY7HEAqQLIz3KAAEwFMIgzEIAABLkFeexwIKjscKCwAhIDNs92oADUB5wTAAEmuMC4 +QCgBAw+DwLgNuCV4BaIZEgI2z3GAAAhwACKAD4AAMHCgqM9wgACwXFZ4VHmgsQKQuBlEAxUkggCg +onAZBADPcIAAmAockMgZRANFwADYQcBacAh3CHUr8EwiAKAG9BDMUSAAgBPyz3CgANAbEYDxuMog +IQBQCuH6zyDhAwDZkbnPcKAA0BsxoADYFB4YkALIQCJSIM92oADUByiIAeEoqAkSATbPcKAASCw9 +oM9wgADgfQKAUnCYAg4ATCIAoITy3v4FJQ2QRgICAA+GEHgZFgGWWOAwcNT3D4YQeBkWAZZY4DBw +xveEFgAQsuA39w+GEHgZFgGWWOAwcKYADQAeHtiTHRYAlgYSATYJGhgwHRYAlkAnAxJHwB0WAJYA +sR0WAJYBoVYnABIeHhiQHRYClkAuACRQegUiEAAA2s9woADQG5G6UaDPcIAAVAMQeM9yoAC0R0ka +GIDPcIAADAVgoM9wgAAQBSCgbyBDAFQaGIDPcKAA0BsRgPG4B/QA2EYJ7/qPuAYSATYBgUDACnCG +IPMPjCAMgAAREwEP8hrYDvDPcoAAuGYegs93oADQD4ogECEB4B6i0fAg2ALCmnBYYBB4chkEAADA +9rgH8s9xoABICEAjACMG8EAjACHPcaAATAgbcQLBTCIAoAAhGQADwAUgECBAIcAxBCCADwAA/P9G +wM9wgADgfSOABsAIIFUAFPIMJUCk3gANALX+BSUNkHf0AdgUHhiQVSdAFA8eGJBRIgDC//XPdqAA +1AdUHkAWABgANAIjACUPpgbBAiFRJUwiAKACJUAgG6YD2BCmAhIBNhnyKImpcMi4DLkleOxxALED +zOxxALEBwAHgQcAHwAYSATb6dwEaGDACyAIaWDAGGhgwAYEgkVYnDyI0uMC4FHnPcAAA/P8D4SR4 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 17:34:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12E8106564A; Wed, 20 Apr 2011 17:34:09 +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 AE9538FC16; Wed, 20 Apr 2011 17:34: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 p3KHY9wG058968; Wed, 20 Apr 2011 17:34:09 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KHY9Pi058964; Wed, 20 Apr 2011 17:34:09 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201734.p3KHY9Pi058964@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 17:34: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: r220893 - in head/sys: conf contrib/dev/iwn modules/iwnfw modules/iwnfw/iwn6000g2a modules/iwnfw/iwn6000g2b X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 17:34:09 -0000 Author: bschmidt Date: Wed Apr 20 17:34:09 2011 New Revision: 220893 URL: http://svn.freebsd.org/changeset/base/220893 Log: Add firmware images for the 6000 series g2a and g2b adapters. Added: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu head/sys/modules/iwnfw/iwn6000g2a/ head/sys/modules/iwnfw/iwn6000g2a/Makefile (contents, props changed) head/sys/modules/iwnfw/iwn6000g2b/ head/sys/modules/iwnfw/iwn6000g2b/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/iwnfw/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 20 17:32:20 2011 (r220892) +++ head/sys/conf/files Wed Apr 20 17:34:09 2011 (r220893) @@ -1273,6 +1273,34 @@ iwn6000.fw optional iwn6000fw | iwnfw compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6000.fw" +iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2a.fw:iwn6000g2afw -miwn6000g2afw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn6000g2afw.c" +iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ + dependency "iwn6000g2a.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2a.fw" \ + no-implicit-rule \ + clean "iwn6000g2afw.fwo" +iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn6000g2a.fw" +iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2b.fw:iwn6000g2bfw -miwn6000g2bfw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn6000g2bfw.c" +iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ + dependency "iwn6000g2b.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2b.fw" \ + no-implicit-rule \ + clean "iwn6000g2bfw.fwo" +iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ no-implicit-rule before-depend local \ Added: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu Wed Apr 20 17:34:09 2011 (r220893) @@ -0,0 +1,7833 @@ +Copyright (c) 2006-2011, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-6000g2a-17.168.5.2.fw.uu +AAAAAElXTAo2MDAwZzJhIGZ3IHYxNy4xNjguNS4yIGJ1aWxkIDM1OTA1CgAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAgWoEUGMAAABAAAAAAAAAAEAAAAASAIAICCADwAAQABpIAAAaSBAAGkg +AABpIEAAICCADwAA6ABpIAAAaSBAAGkgAABpIEAAICCADwAApPZpIAAAaSBAAGkgAABKIAAASiEA +AEoiAABKIwAASiQAAEolAABKJgAASicAAEogABBKIQAQSiIAEEojABBKJAAQSiUAEEomABBKJwAQ +SiAAIEohACBKIgAgSiMAIEokACBKJQAgSiYAIEonACBKIAAwSiEAMAokgD+BAABAQSycMEAsnDBC +JBw0CiKAP4AAWG8KIwA3xgpAB0omAHBpIEAASiYAcEomAHBKJgBwSiYAcAAWAHCAAFQcQHggIECH +AAAAAAAAAAAAAPwciLb8HEi2/BwItvwcyLX8HIi1/BxItfwcCLX8HMi0/ByItPwcSLT8HAi0/BzI +s/wciLP8HEiz4H7geATcON018OB4BNw03TPw4HgE3DDdMfDgeATcLN0v8OB4BNwo3S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ner-svn-src-all@FreeBSD.ORG Wed Apr 20 17:43:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB2E1065679; Wed, 20 Apr 2011 17:43:21 +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 2E1678FC17; Wed, 20 Apr 2011 17:43: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 p3KHhLgY059387; Wed, 20 Apr 2011 17:43:21 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KHhLUO059385; Wed, 20 Apr 2011 17:43:21 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201743.p3KHhLUO059385@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 17:43: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: r220894 - 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: Wed, 20 Apr 2011 17:43:21 -0000 Author: bschmidt Date: Wed Apr 20 17:43:20 2011 New Revision: 220894 URL: http://svn.freebsd.org/changeset/base/220894 Log: The 6000 series gen2 adapters have 2 firmware images, one with advanced btcoex support and one without. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Apr 20 17:34:09 2011 (r220893) +++ head/sys/dev/iwn/if_iwn.c Wed Apr 20 17:43:20 2011 (r220894) @@ -816,9 +816,11 @@ iwn5000_attach(struct iwn_softc *sc, uin break; case IWN_HW_REV_TYPE_6005: sc->limits = &iwn6000_sensitivity_limits; - sc->fwname = "iwn6005fw"; - if (pid != 0x0082 && pid != 0x0085) + if (pid != 0x0082 && pid != 0x0085) { + sc->fwname = "iwn6000g2bfw"; sc->sc_flags |= IWN_FLAG_ADV_BTCOEX; + } else + sc->fwname = "iwn6000g2afw"; break; default: device_printf(sc->sc_dev, "adapter type %d not supported\n", From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 17:49:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA1021065672; Wed, 20 Apr 2011 17:49:05 +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 D8C208FC1A; Wed, 20 Apr 2011 17:49: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 p3KHn5ZY059597; Wed, 20 Apr 2011 17:49:05 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KHn51X059595; Wed, 20 Apr 2011 17:49:05 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201749.p3KHn51X059595@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 17:49: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: r220895 - 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: Wed, 20 Apr 2011 17:49:06 -0000 Author: bschmidt Date: Wed Apr 20 17:49:05 2011 New Revision: 220895 URL: http://svn.freebsd.org/changeset/base/220895 Log: Now that all bits are in for 1030/6230 adapters enable those. While here pull the adapter names from the Linux driver and sort the list by ID. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Apr 20 17:43:20 2011 (r220894) +++ head/sys/dev/iwn/if_iwn.c Wed Apr 20 17:49:05 2011 (r220895) @@ -78,38 +78,31 @@ struct iwn_ident { const char *name; }; -static const struct iwn_ident iwn_ident_table [] = { - { 0x8086, 0x4229, "Intel(R) PRO/Wireless 4965BGN" }, - { 0x8086, 0x422D, "Intel(R) PRO/Wireless 4965BGN" }, - { 0x8086, 0x4230, "Intel(R) PRO/Wireless 4965BGN" }, - { 0x8086, 0x4233, "Intel(R) PRO/Wireless 4965BGN" }, - { 0x8086, 0x4232, "Intel(R) PRO/Wireless 5100" }, - { 0x8086, 0x4237, "Intel(R) PRO/Wireless 5100" }, - { 0x8086, 0x423C, "Intel(R) PRO/Wireless 5150" }, - { 0x8086, 0x423D, "Intel(R) PRO/Wireless 5150" }, - { 0x8086, 0x4235, "Intel(R) PRO/Wireless 5300" }, - { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5300" }, - { 0x8086, 0x423A, "Intel(R) PRO/Wireless 5350" }, - { 0x8086, 0x423B, "Intel(R) PRO/Wireless 5350" }, - { 0x8086, 0x0083, "Intel(R) PRO/Wireless 1000" }, - { 0x8086, 0x0084, "Intel(R) PRO/Wireless 1000" }, - { 0x8086, 0x008D, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x008E, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x4238, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x4239, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x422B, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x422C, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x0087, "Intel(R) PRO/Wireless 6250" }, - { 0x8086, 0x0089, "Intel(R) PRO/Wireless 6250" }, - { 0x8086, 0x0082, "Intel(R) PRO/Wireless 6205a" }, - { 0x8086, 0x0085, "Intel(R) PRO/Wireless 6205a" }, -#ifdef notyet - { 0x8086, 0x008a, "Intel(R) PRO/Wireless 6205b" }, - { 0x8086, 0x008b, "Intel(R) PRO/Wireless 6205b" }, - { 0x8086, 0x008f, "Intel(R) PRO/Wireless 6205b" }, - { 0x8086, 0x0090, "Intel(R) PRO/Wireless 6205b" }, - { 0x8086, 0x0091, "Intel(R) PRO/Wireless 6205b" }, -#endif +static const struct iwn_ident iwn_ident_table[] = { + { 0x8086, 0x0082, "Intel(R) Centrino(R) Advanced-N 6205" }, + { 0x8086, 0x0083, "Intel(R) Centrino(R) Wireless-N 1000" }, + { 0x8086, 0x0084, "Intel(R) Centrino(R) Wireless-N 1000" }, + { 0x8086, 0x0085, "Intel(R) Centrino(R) Advanced-N 6205" }, + { 0x8086, 0x0087, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, + { 0x8086, 0x0089, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, + { 0x8086, 0x008a, "Intel(R) Centrino(R) Wireless-N 1030" }, + { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, + { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, + { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, + { 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200" }, + { 0x8086, 0x4230, "Intel(R) Wireless WiFi Link 4965" }, + { 0x8086, 0x4232, "Intel(R) WiFi Link 5100" }, + { 0x8086, 0x4235, "Intel(R) Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4236, "Intel(R) Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4237, "Intel(R) WiFi Link 5100" }, + { 0x8086, 0x4238, "Intel(R) Centrino(R) Ultimate-N 6300" }, + { 0x8086, 0x4239, "Intel(R) Centrino(R) Advanced-N 6200" }, + { 0x8086, 0x423a, "Intel(R) WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423b, "Intel(R) WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423c, "Intel(R) WiMAX/WiFi Link 5150" }, + { 0x8086, 0x423d, "Intel(R) WiMAX/WiFi Link 5150" }, { 0, 0, NULL } }; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 17:53:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B5011065670; Wed, 20 Apr 2011 17:53:40 +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 EE83B8FC1A; Wed, 20 Apr 2011 17:53: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 p3KHrd6U059847; Wed, 20 Apr 2011 17:53:39 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KHrdtF059845; Wed, 20 Apr 2011 17:53:39 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104201753.p3KHrdtF059845@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 20 Apr 2011 17:53: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: r220896 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 17:53:40 -0000 Author: bschmidt Date: Wed Apr 20 17:53:39 2011 New Revision: 220896 URL: http://svn.freebsd.org/changeset/base/220896 Log: Add ref to the latest firmware additions. Modified: head/share/man/man4/iwnfw.4 Modified: head/share/man/man4/iwnfw.4 ============================================================================== --- head/share/man/man4/iwnfw.4 Wed Apr 20 17:49:05 2011 (r220895) +++ head/share/man/man4/iwnfw.4 Wed Apr 20 17:53:39 2011 (r220896) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2010 +.Dd April 20, 2011 .Dt IWNFW 4 .Os .Sh NAME @@ -45,6 +45,8 @@ of the following: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6000g2afw" +.Cd "device iwn6000g2bfw" .Cd "device iwn6050fw" .Ed .Pp @@ -57,6 +59,8 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6000g2afw_load="YES" +iwn6000g2bfw_load="YES" iwn6050fw_load="YES" .Ed .Sh DESCRIPTION From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 18:04:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5DE1106564A; Wed, 20 Apr 2011 18:04:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A51158FC14; Wed, 20 Apr 2011 18:04: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 p3KI4YLT060306; Wed, 20 Apr 2011 18:04:34 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KI4Ybx060304; Wed, 20 Apr 2011 18:04:34 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104201804.p3KI4Ybx060304@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Apr 2011 18:04: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: r220897 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 18:04:34 -0000 Author: np Date: Wed Apr 20 18:04:34 2011 New Revision: 220897 URL: http://svn.freebsd.org/changeset/base/220897 Log: Use the correct free routine when destroying a control queue. X-MFC after: r220873 Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Apr 20 17:53:39 2011 (r220896) +++ head/sys/dev/cxgbe/t4_sge.c Wed Apr 20 18:04:34 2011 (r220897) @@ -1470,7 +1470,7 @@ free_ctrlq(struct adapter *sc, struct sg struct sge_eq *eq = &ctrlq->eq; if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) { - rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id); + rc = -t4_ctrl_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id); if (rc != 0) { device_printf(sc->dev, "failed to free ctrl queue %p: %d\n", eq, rc); From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 18:43:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E333106566B; Wed, 20 Apr 2011 18:43: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 0C25D8FC08; Wed, 20 Apr 2011 18:43: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 p3KIhS4G061781; Wed, 20 Apr 2011 18:43:28 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KIhS1b061778; Wed, 20 Apr 2011 18:43:28 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104201843.p3KIhS1b061778@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Apr 2011 18:43: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: r220898 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 18:43:29 -0000 Author: pjd Date: Wed Apr 20 18:43:28 2011 New Revision: 220898 URL: http://svn.freebsd.org/changeset/base/220898 Log: When we become primary, we connect to the remote and expect it to be in secondary role. It is possible that the remote node is primary, but only because there was a role change and it didn't finish cleaning up (unmounting file systems, etc.). If we detect such situation, wait for the remote node to switch the role to secondary before accepting I/Os. If we don't wait for it in that case, we will most likely cause split-brain. MFC after: 1 week Modified: head/sbin/hastd/hastd.c head/sbin/hastd/primary.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Wed Apr 20 18:04:34 2011 (r220897) +++ head/sbin/hastd/hastd.c Wed Apr 20 18:43:28 2011 (r220898) @@ -736,6 +736,13 @@ listen_accept(void) nv_add_stringf(nverr, "errmsg", "Remote node acts as %s for the resource and not as %s.", role2str(res->hr_role), role2str(HAST_ROLE_SECONDARY)); + if (res->hr_role == HAST_ROLE_PRIMARY) { + /* + * If we act as primary request the other side to wait + * for us for a bit, as may might be finishing cleanups. + */ + nv_add_uint8(nverr, 1, "wait"); + } goto fail; } /* Does token (if exists) match? */ Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Wed Apr 20 18:04:34 2011 (r220897) +++ head/sbin/hastd/primary.c Wed Apr 20 18:43:28 2011 (r220898) @@ -219,6 +219,7 @@ static pthread_cond_t range_regular_cond static struct rangelocks *range_sync; static bool range_sync_wait; static pthread_cond_t range_sync_cond; +static bool fullystarted; static void *ggate_recv_thread(void *arg); static void *local_send_thread(void *arg); @@ -524,7 +525,7 @@ primary_connect(struct hast_resource *re return (0); } -static bool +static int init_remote(struct hast_resource *res, struct proto_conn **inp, struct proto_conn **outp) { @@ -537,6 +538,7 @@ init_remote(struct hast_resource *res, s int64_t datasize; uint32_t mapsize; size_t size; + int error; PJDLOG_ASSERT((inp == NULL && outp == NULL) || (inp != NULL && outp != NULL)); PJDLOG_ASSERT(real_remote(res)); @@ -545,7 +547,9 @@ init_remote(struct hast_resource *res, s errmsg = NULL; if (primary_connect(res, &out) == -1) - return (false); + return (ECONNREFUSED); + + error = ECONNABORTED; /* * First handshake step. @@ -577,6 +581,8 @@ init_remote(struct hast_resource *res, s errmsg = nv_get_string(nvin, "errmsg"); if (errmsg != NULL) { pjdlog_warning("%s", errmsg); + if (nv_exists(nvin, "wait")) + error = EBUSY; nv_free(nvin); goto close; } @@ -734,14 +740,14 @@ init_remote(struct hast_resource *res, s res->hr_remoteout = out; } event_send(res, EVENT_CONNECT); - return (true); + return (0); close: if (errmsg != NULL && strcmp(errmsg, "Split-brain condition!") == 0) event_send(res, EVENT_SPLITBRAIN); proto_close(out); if (in != NULL) proto_close(in); - return (false); + return (error); } static void @@ -920,8 +926,30 @@ hastd_primary(struct hast_resource *res) */ error = pthread_create(&td, NULL, ctrl_thread, res); PJDLOG_ASSERT(error == 0); - if (real_remote(res) && init_remote(res, NULL, NULL)) - sync_start(); + if (real_remote(res)) { + error = init_remote(res, NULL, NULL); + if (error == 0) { + sync_start(); + } else if (error == EBUSY) { + time_t start = time(NULL); + + pjdlog_warning("Waiting for remote node to become %s for %ds.", + role2str(HAST_ROLE_SECONDARY), + res->hr_timeout); + for (;;) { + sleep(1); + error = init_remote(res, NULL, NULL); + if (error != EBUSY) + break; + if (time(NULL) > start + res->hr_timeout) + break; + } + if (error == EBUSY) { + pjdlog_warning("Remote node is still %s, starting anyway.", + role2str(HAST_ROLE_PRIMARY)); + } + } + } error = pthread_create(&td, NULL, ggate_recv_thread, res); PJDLOG_ASSERT(error == 0); error = pthread_create(&td, NULL, local_send_thread, res); @@ -932,6 +960,7 @@ hastd_primary(struct hast_resource *res) PJDLOG_ASSERT(error == 0); error = pthread_create(&td, NULL, ggate_send_thread, res); PJDLOG_ASSERT(error == 0); + fullystarted = true; (void)sync_thread(res); } @@ -2095,7 +2124,7 @@ guard_one(struct hast_resource *res, uns pjdlog_debug(2, "remote_guard: Reconnecting to %s.", res->hr_remoteaddr); in = out = NULL; - if (init_remote(res, &in, &out)) { + if (init_remote(res, &in, &out) == 0) { rw_wlock(&hio_remote_lock[ncomp]); PJDLOG_ASSERT(res->hr_remotein == NULL); PJDLOG_ASSERT(res->hr_remoteout == NULL); @@ -2153,12 +2182,19 @@ guard_thread(void *arg) break; } - pjdlog_debug(2, "remote_guard: Checking connections."); - now = time(NULL); - if (lastcheck + HAST_KEEPALIVE <= now) { - for (ii = 0; ii < ncomps; ii++) - guard_one(res, ii); - lastcheck = now; + /* + * Don't check connections until we fully started, + * as we may still be looping, waiting for remote node + * to switch from primary to secondary. + */ + if (fullystarted) { + pjdlog_debug(2, "remote_guard: Checking connections."); + now = time(NULL); + if (lastcheck + HAST_KEEPALIVE <= now) { + for (ii = 0; ii < ncomps; ii++) + guard_one(res, ii); + lastcheck = now; + } } signo = sigtimedwait(&mask, NULL, &timeout); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 18:49:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CEFA1065678; Wed, 20 Apr 2011 18:49:13 +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 3B60E8FC1C; Wed, 20 Apr 2011 18:49: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 p3KInDgp061984; Wed, 20 Apr 2011 18:49:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KInDV8061982; Wed, 20 Apr 2011 18:49:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104201849.p3KInDV8061982@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Apr 2011 18:49: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: r220899 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 18:49:13 -0000 Author: pjd Date: Wed Apr 20 18:49:12 2011 New Revision: 220899 URL: http://svn.freebsd.org/changeset/base/220899 Log: Correct comment. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Wed Apr 20 18:43:28 2011 (r220898) +++ head/sbin/hastd/hastd.c Wed Apr 20 18:49:12 2011 (r220899) @@ -739,7 +739,7 @@ listen_accept(void) if (res->hr_role == HAST_ROLE_PRIMARY) { /* * If we act as primary request the other side to wait - * for us for a bit, as may might be finishing cleanups. + * for us a bit, as we might be finishing cleanups. */ nv_add_uint8(nverr, 1, "wait"); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 19:41:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05087106567B; Wed, 20 Apr 2011 19:41:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7B7F8FC1B; Wed, 20 Apr 2011 19:41: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 p3KJf8qF063646; Wed, 20 Apr 2011 19:41:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KJf8LL063644; Wed, 20 Apr 2011 19:41:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201104201941.p3KJf8LL063644@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 20 Apr 2011 19:41: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: r220900 - head/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: Wed, 20 Apr 2011 19:41:09 -0000 Author: hselasky Date: Wed Apr 20 19:41:08 2011 New Revision: 220900 URL: http://svn.freebsd.org/changeset/base/220900 Log: Only set the sample rate if the USB audio channel reports that it supports the frequency control request. MFC after: 7 days Approved by: thompsa (mentor) Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Wed Apr 20 18:49:12 2011 (r220899) +++ head/sys/dev/sound/usb/uaudio.c Wed Apr 20 19:41:08 2011 (r220900) @@ -1360,11 +1360,10 @@ uaudio_chan_init(struct uaudio_softc *sc sc->sc_mixer_iface_index); /* - * If just one sampling rate is supported, - * no need to call "uaudio_set_speed()". - * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request. + * Only set the sample rate if the channel reports that it + * supports the frequency control. */ - if (ch->p_asf1d->bSamFreqType != 1) { + if (ch->p_sed->bmAttributes & UA_SED_FREQ_CONTROL) { if (uaudio_set_speed(sc->sc_udev, endpoint, ch->sample_rate)) { /* * If the endpoint is adaptive setting the speed may From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 21:00:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497331065677; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 358288FC1A; Wed, 20 Apr 2011 21:00: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 p3KL0PQW066215; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KL0PBx066213; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104202100.p3KL0PBx066213@svn.freebsd.org> From: Colin Percival Date: Wed, 20 Apr 2011 21:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220901 - releng/7.3 releng/7.3/sys/conf releng/7.3/usr.sbin/mountd releng/7.4 releng/7.4/sys/conf releng/7.4/usr.sbin/mountd releng/8.1 releng/8.1/sys/conf releng/8.1/usr.sbin/mountd r... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 21:00:25 -0000 Author: cperciva Date: Wed Apr 20 21:00:24 2011 New Revision: 220901 URL: http://svn.freebsd.org/changeset/base/220901 Log: Fix CIDR parsing bug in mountd ACLs. Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd Modified: stable/7/usr.sbin/mountd/mountd.c Changes in other areas also in this revision: Modified: releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/usr.sbin/mountd/mountd.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/usr.sbin/mountd/mountd.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/usr.sbin/mountd/mountd.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/usr.sbin/mountd/mountd.c stable/8/usr.sbin/mountd/mountd.c Modified: stable/7/usr.sbin/mountd/mountd.c ============================================================================== --- stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 21:00:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69C491065678; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55CD48FC0C; Wed, 20 Apr 2011 21:00: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 p3KL0PsK066221; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KL0PdM066219; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104202100.p3KL0PdM066219@svn.freebsd.org> From: Colin Percival Date: Wed, 20 Apr 2011 21:00: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: r220901 - releng/7.3 releng/7.3/sys/conf releng/7.3/usr.sbin/mountd releng/7.4 releng/7.4/sys/conf releng/7.4/usr.sbin/mountd releng/8.1 releng/8.1/sys/conf releng/8.1/usr.sbin/mountd r... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 21:00:25 -0000 Author: cperciva Date: Wed Apr 20 21:00:24 2011 New Revision: 220901 URL: http://svn.freebsd.org/changeset/base/220901 Log: Fix CIDR parsing bug in mountd ACLs. Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd Modified: stable/8/usr.sbin/mountd/mountd.c Changes in other areas also in this revision: Modified: releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/usr.sbin/mountd/mountd.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/usr.sbin/mountd/mountd.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/usr.sbin/mountd/mountd.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/usr.sbin/mountd/mountd.c stable/7/usr.sbin/mountd/mountd.c Modified: stable/8/usr.sbin/mountd/mountd.c ============================================================================== --- stable/8/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ stable/8/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2937,7 +2937,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 21:00:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0704106564A; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8618FC12; Wed, 20 Apr 2011 21:00: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 p3KL0Pxk066238; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KL0P4v066225; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104202100.p3KL0P4v066225@svn.freebsd.org> From: Colin Percival Date: Wed, 20 Apr 2011 21:00:25 +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: r220901 - releng/7.3 releng/7.3/sys/conf releng/7.3/usr.sbin/mountd releng/7.4 releng/7.4/sys/conf releng/7.4/usr.sbin/mountd releng/8.1 releng/8.1/sys/conf releng/8.1/usr.sbin/mountd r... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 21:00:25 -0000 Author: cperciva Date: Wed Apr 20 21:00:24 2011 New Revision: 220901 URL: http://svn.freebsd.org/changeset/base/220901 Log: Fix CIDR parsing bug in mountd ACLs. Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd Modified: releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/usr.sbin/mountd/mountd.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/usr.sbin/mountd/mountd.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/usr.sbin/mountd/mountd.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/usr.sbin/mountd/mountd.c Changes in other areas also in this revision: Modified: stable/7/usr.sbin/mountd/mountd.c stable/8/usr.sbin/mountd/mountd.c Modified: releng/7.3/UPDATING ============================================================================== --- releng/7.3/UPDATING Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.3/UPDATING Wed Apr 20 21:00:24 2011 (r220901) @@ -8,6 +8,9 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20110420: p5 FreeBSD-SA-11:01.mountd + Fix CIDR parsing bug in mountd ACLs. + 20101129: p4 FreeBSD-SA-10:10.openssl Fix OpenSSL multiple vulnerabilities. Modified: releng/7.3/sys/conf/newvers.sh ============================================================================== --- releng/7.3/sys/conf/newvers.sh Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.3/sys/conf/newvers.sh Wed Apr 20 21:00:24 2011 (r220901) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.3" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.3/usr.sbin/mountd/mountd.c ============================================================================== --- releng/7.3/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.3/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; Modified: releng/7.4/UPDATING ============================================================================== --- releng/7.4/UPDATING Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.4/UPDATING Wed Apr 20 21:00:24 2011 (r220901) @@ -8,6 +8,9 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20110420: p1 FreeBSD-SA-11:01.mountd + Fix CIDR parsing bug in mountd ACLs. + 20110221: FreeBSD 7.4-RELEASE Modified: releng/7.4/sys/conf/newvers.sh ============================================================================== --- releng/7.4/sys/conf/newvers.sh Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.4/sys/conf/newvers.sh Wed Apr 20 21:00:24 2011 (r220901) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.4" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.4/usr.sbin/mountd/mountd.c ============================================================================== --- releng/7.4/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ releng/7.4/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; Modified: releng/8.1/UPDATING ============================================================================== --- releng/8.1/UPDATING Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.1/UPDATING Wed Apr 20 21:00:24 2011 (r220901) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20110420: p3 FreeBSD-SA-11:01.mountd + Fix CIDR parsing bug in mountd ACLs. + 20101129: p2 FreeBSD-SA-10:10.openssl Fix OpenSSL multiple vulnerabilities. Modified: releng/8.1/sys/conf/newvers.sh ============================================================================== --- releng/8.1/sys/conf/newvers.sh Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.1/sys/conf/newvers.sh Wed Apr 20 21:00:24 2011 (r220901) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.1" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.1/usr.sbin/mountd/mountd.c ============================================================================== --- releng/8.1/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.1/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2937,7 +2937,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; Modified: releng/8.2/UPDATING ============================================================================== --- releng/8.2/UPDATING Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.2/UPDATING Wed Apr 20 21:00:24 2011 (r220901) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20110420: p1 FreeBSD-SA-11:01.mountd + Fix CIDR parsing bug in mountd ACLs. + 20110221: 8.2-RELEASE. Modified: releng/8.2/sys/conf/newvers.sh ============================================================================== --- releng/8.2/sys/conf/newvers.sh Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.2/sys/conf/newvers.sh Wed Apr 20 21:00:24 2011 (r220901) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.2" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.2/usr.sbin/mountd/mountd.c ============================================================================== --- releng/8.2/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ releng/8.2/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2937,7 +2937,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 22:06:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451D3106564A; Wed, 20 Apr 2011 22:06:24 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 8648F8FC17; Wed, 20 Apr 2011 22:06:23 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAHZYr02DaFvO/2dsb2JhbACEUaFtiG+tLJEOgSmBWYF1egSOIg X-IronPort-AV: E=Sophos;i="4.64,247,1301889600"; d="scan'208";a="118159455" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 20 Apr 2011 18:06:23 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 0075CB3F5C; Wed, 20 Apr 2011 18:06:22 -0400 (EDT) Date: Wed, 20 Apr 2011 18:06:22 -0400 (EDT) From: Rick Macklem To: Pawel Jakub Dawidek Message-ID: <558114287.379554.1303337182943.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110420161655.GA1907@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 22:06:24 -0000 > > This is not that easy, I'm afraid. You need to ask yourself a question > what you are trying to protect from. Here, the mutex only guarantees > to > have consistent view of the nm_maxfilesize field. For example if this > field modification wouldn't be atomic you would need the mutex to > ensure > that the value is correct. > > Imagine a situation where it is modifed not by simple 'a = b', but by > something like this: > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = some_32bit_array[0]; > nmp->nm_maxfilesize |= some_32bit_array[1] << 32; > mtx_unlock(&nmp->nm_mtx); > > To read that properly you need a mutex to ensure you won't read the > value between those two operations. > > If it is not the case - its modification is atomic and reading it is > atomic then you don't need mutex to read the value as it will always > be > consistent. Well, its value will be consistent, but not necessarily the "up to date" value set by another thread, if I understood alc@'s recent post. If you haven't yet read it, take a look at his post today on freebsd-hackers@ under the Subject Re: SMP question w.r.t. reading kernel variables If I understood his explanation, a thread must lock a mutex that the thread that modified the value has locked/unlocked before it is guaranteed to see that value for the variable instead of some stale memory cached value. (It can be any mutex, but it is probably much easier to use the same one that the modifying thread used during modification instead of finding some other mutex the same thread locked/unlocked after the modification.) > The question is what will happen if it changes after you > read it. > > thread0 thread1 > ------- ------- > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = 8192; > mtx_unlock(&nmp->nm_mtx); > > mtx_lock(&nmp->nm_mtx); > if (tmp_off > nmp->nm_maxfilesize) { > mtx_unlock(&nmp->nm_mtx); > return (EFBIG); > } > mtx_unlock(&nmp->nm_mtx); > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = 2048; > mtx_unlock(&nmp->nm_mtx); > > > > Now, if tmp_off is 4096 what will happen if you have a race like the > above? Is it critical? Then you need to protect with > this mutex as well. > Yes, understood. I need to look at the above check w.r.t. nm_maxfilesize further (such as discussed by bde@). If a server were to change the value during a read or write, all that should happen is that the server will return an error for an operation that goes past its specified maxfilesize. (As you noted, it is unlikely to ever change and, if it did change, I suspect the server would "grow" it and not "shrink" it.) The mtx_lock(&nmp->nm_mtx); and mtx_unlock(&nmp->nm_mtx); just ensures that it reads the "most up to date" value for the variable set by another thread. rick From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 22:10:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 864731065673; Wed, 20 Apr 2011 22:10:44 +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 729138FC16; Wed, 20 Apr 2011 22:10: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 p3KMAiD6068485; Wed, 20 Apr 2011 22:10:44 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KMAihG068474; Wed, 20 Apr 2011 22:10:44 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104202210.p3KMAihG068474@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 20 Apr 2011 22:10: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: r220902 - in stable/8/tools/regression/bin/sh: builtins execution expansion parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 22:10:44 -0000 Author: jilles Date: Wed Apr 20 22:10:44 2011 New Revision: 220902 URL: http://svn.freebsd.org/changeset/base/220902 Log: MFC r218205,r218821,r218891,r219390,r219611,r220654,r220655,r220656: sh: New testcases that already work in stable/8. Added: stable/8/tools/regression/bin/sh/builtins/case4.0 - copied unchanged from r220654, head/tools/regression/bin/sh/builtins/case4.0 stable/8/tools/regression/bin/sh/builtins/dot3.0 - copied unchanged from r219390, head/tools/regression/bin/sh/builtins/dot3.0 stable/8/tools/regression/bin/sh/builtins/read5.0 - copied unchanged from r218821, head/tools/regression/bin/sh/builtins/read5.0 stable/8/tools/regression/bin/sh/execution/shellproc1.0 - copied unchanged from r218205, head/tools/regression/bin/sh/execution/shellproc1.0 stable/8/tools/regression/bin/sh/expansion/length1.0 - copied unchanged from r219611, head/tools/regression/bin/sh/expansion/length1.0 stable/8/tools/regression/bin/sh/expansion/length2.0 - copied unchanged from r219611, head/tools/regression/bin/sh/expansion/length2.0 stable/8/tools/regression/bin/sh/expansion/length3.0 - copied unchanged from r219611, head/tools/regression/bin/sh/expansion/length3.0 stable/8/tools/regression/bin/sh/expansion/length4.0 - copied unchanged from r220655, head/tools/regression/bin/sh/expansion/length4.0 stable/8/tools/regression/bin/sh/expansion/length5.0 - copied unchanged from r220656, head/tools/regression/bin/sh/expansion/length5.0 stable/8/tools/regression/bin/sh/parser/no-space1.0 - copied unchanged from r218891, head/tools/regression/bin/sh/parser/no-space1.0 stable/8/tools/regression/bin/sh/parser/no-space2.0 - copied unchanged from r218891, head/tools/regression/bin/sh/parser/no-space2.0 Modified: Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/builtins/case4.0 (from r220654, head/tools/regression/bin/sh/builtins/case4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/case4.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r220654, head/tools/regression/bin/sh/builtins/case4.0) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -- "*" +case x in +"$1") echo failed ;; +esac Copied: stable/8/tools/regression/bin/sh/builtins/dot3.0 (from r219390, head/tools/regression/bin/sh/builtins/dot3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/dot3.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r219390, head/tools/regression/bin/sh/builtins/dot3.0) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +# . should return 0 if no command was executed. + +if false; then + exit 3 +else + . /dev/null + exit $? +fi Copied: stable/8/tools/regression/bin/sh/builtins/read5.0 (from r218821, head/tools/regression/bin/sh/builtins/read5.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/read5.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r218821, head/tools/regression/bin/sh/builtins/read5.0) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.ISO8859-1 +export LC_CTYPE + +# Note: the first and last characters are not whitespace. +# Exclude backslash and newline. +bad1=`printf %03o \'\\\\` +bad2=`printf %03o \'' +'` +e= +for i in 0 1 2 3; do + for j in 0 1 2 3 4 5 6 7; do + for k in 0 1 2 3 4 5 6 7; do + case $i$j$k in + 000|$bad1|$bad2) continue ;; + esac + e="$e\\$i$j$k" + done + done +done +e=`printf "$e"` +[ "${#e}" = 253 ] || echo length bad + +r1=`printf '%s\n' "$e" | { read -r x; printf '%s' "$x"; }` +[ "$r1" = "$e" ] || echo "read with -r bad" +r2=`printf '%s\n' "$e" | { read x; printf '%s' "$x"; }` +[ "$r2" = "$e" ] || echo "read without -r bad 1" +IFS= +r3=`printf '%s\n' "$e" | { read x; printf '%s' "$x"; }` +[ "$r3" = "$e" ] || echo "read without -r bad 2" Copied: stable/8/tools/regression/bin/sh/execution/shellproc1.0 (from r218205, head/tools/regression/bin/sh/execution/shellproc1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/execution/shellproc1.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r218205, head/tools/regression/bin/sh/execution/shellproc1.0) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit +trap 'rm -rf "${T}"' 0 +cat <"$T/testshellproc" +printf 'this ' +echo is a test +EOF +chmod 755 "$T/testshellproc" +PATH=$T:$PATH +[ "`testshellproc`" = "this is a test" ] Copied: stable/8/tools/regression/bin/sh/expansion/length1.0 (from r219611, head/tools/regression/bin/sh/expansion/length1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length1.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r219611, head/tools/regression/bin/sh/expansion/length1.0) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +v=abcd +[ "${#v}" = 4 ] || echo '${#v} wrong' +v=$$ +[ "${#$}" = "${#v}" ] || echo '${#$} wrong' +[ "${#!}" = 0 ] || echo '${#!} wrong' +set -- 01 2 3 4 5 6 7 8 9 10 11 12 0013 +[ "${#1}" = 2 ] || echo '${#1} wrong' +[ "${#13}" = 4 ] || echo '${#13} wrong' +v=$0 +[ "${#0}" = "${#v}" ] || echo '${#0} wrong' Copied: stable/8/tools/regression/bin/sh/expansion/length2.0 (from r219611, head/tools/regression/bin/sh/expansion/length2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length2.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r219611, head/tools/regression/bin/sh/expansion/length2.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +v=$- +[ "${#-}" = "${#v}" ] || echo '${#-} wrong' Copied: stable/8/tools/regression/bin/sh/expansion/length3.0 (from r219611, head/tools/regression/bin/sh/expansion/length3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length3.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r219611, head/tools/regression/bin/sh/expansion/length3.0) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +set -- 1 2 3 4 5 6 7 8 9 10 11 12 13 +[ "$#" = 13 ] || echo '$# wrong' +[ "${#}" = 13 ] || echo '${#} wrong' +[ "${##}" = 2 ] || echo '${##} wrong' +set -- +[ "$#" = 0 ] || echo '$# wrong' +[ "${#}" = 0 ] || echo '${#} wrong' +[ "${##}" = 1 ] || echo '${##} wrong' Copied: stable/8/tools/regression/bin/sh/expansion/length4.0 (from r220655, head/tools/regression/bin/sh/expansion/length4.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length4.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r220655, head/tools/regression/bin/sh/expansion/length4.0) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +# The construct ${#?} is ambiguous in POSIX.1-2008: it could be the length +# of $? or it could be $# giving an error in the (impossible) case that it +# is not set. +# We use the former interpretation; it seems more useful. + +: +[ "${#?}" = 1 ] || echo '${#?} wrong' +(exit 42) +[ "${#?}" = 2 ] || echo '${#?} wrong' Copied: stable/8/tools/regression/bin/sh/expansion/length5.0 (from r220656, head/tools/regression/bin/sh/expansion/length5.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length5.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r220656, head/tools/regression/bin/sh/expansion/length5.0) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.ISO8859-1 +export LC_CTYPE + +e= +for i in 0 1 2 3; do + for j in 0 1 2 3 4 5 6 7; do + for k in 0 1 2 3 4 5 6 7; do + case $i$j$k in + 000) continue ;; + esac + e="$e\\$i$j$k" + done + done +done +ee=`printf "$e"` +[ ${#ee} = 255 ] || echo bad 1 +[ "${#ee}" = 255 ] || echo bad 2 +[ $((${#ee})) = 255 ] || echo bad 3 +[ "$((${#ee}))" = 255 ] || echo bad 4 +set -- "$ee" +[ ${#1} = 255 ] || echo bad 5 +[ "${#1}" = 255 ] || echo bad 6 +[ $((${#1})) = 255 ] || echo bad 7 +[ "$((${#1}))" = 255 ] || echo bad 8 Copied: stable/8/tools/regression/bin/sh/parser/no-space1.0 (from r218891, head/tools/regression/bin/sh/parser/no-space1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/parser/no-space1.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r218891, head/tools/regression/bin/sh/parser/no-space1.0) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# These are ugly but are required to work. + +set -e + +while(false)do(:)done +if(false)then(:)fi +if(false)then(:)else(:)fi +(:&&:)||: +until(:)do(:)done +case x in(x);;*)exit 1;(:)esac +case x in(x);;*)exit 1;;esac +for i do(:)done +{(:)} +f(){(:)} +:|: +(:)|(:) Copied: stable/8/tools/regression/bin/sh/parser/no-space2.0 (from r218891, head/tools/regression/bin/sh/parser/no-space2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/parser/no-space2.0 Wed Apr 20 22:10:44 2011 (r220902, copy of r218891, head/tools/regression/bin/sh/parser/no-space2.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# This conflicts with ksh extended patterns but occurs in the wild. + +set -e + +!(false) From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 22:24:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B837F106566C; Wed, 20 Apr 2011 22:24:54 +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 A74448FC0A; Wed, 20 Apr 2011 22:24: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 p3KMOs39068931; Wed, 20 Apr 2011 22:24:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KMOsKp068928; Wed, 20 Apr 2011 22:24:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104202224.p3KMOsKp068928@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 20 Apr 2011 22:24: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: r220903 - in head: bin/sh 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, 20 Apr 2011 22:24:54 -0000 Author: jilles Date: Wed Apr 20 22:24:54 2011 New Revision: 220903 URL: http://svn.freebsd.org/changeset/base/220903 Log: sh: Do not word split "${#parameter}". This is only a problem if IFS contains digits, which is unusual but valid. Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated as ${#parameter}. The underlying problem was that "${#parameter}" erroneously added CTLESC bytes before determining the length. This was properly fixed for PR bin/56147 but the incorrect fix was not backed out. Reported by: Seeker on forums.freebsd.org MFC after: 2 weeks Added: head/tools/regression/bin/sh/expansion/length6.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Wed Apr 20 22:10:44 2011 (r220902) +++ head/bin/sh/parser.c Wed Apr 20 22:24:54 2011 (r220903) @@ -1572,8 +1572,8 @@ varname: pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (state[level].syntax == DQSYNTAX || - state[level].syntax == ARISYNTAX)) + if (state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; if (subtype != VSNORMAL) { Added: head/tools/regression/bin/sh/expansion/length6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/length6.0 Wed Apr 20 22:24:54 2011 (r220903) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +x='!@#$%^&*()[]' +[ ${#x} = 12 ] || echo bad 1 +[ "${#x}" = 12 ] || echo bad 2 +IFS=2 +[ ${#x} = 1 ] || echo bad 3 +[ "${#x}" = 12 ] || echo bad 4 From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 23:17:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54E3D106566C; Wed, 20 Apr 2011 23:17:18 +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 443768FC0A; Wed, 20 Apr 2011 23:17: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 p3KNHIET070472; Wed, 20 Apr 2011 23:17:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KNHI3M070470; Wed, 20 Apr 2011 23:17:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201104202317.p3KNHI3M070470@svn.freebsd.org> From: Ed Maste Date: Wed, 20 Apr 2011 23:17:18 +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: r220904 - 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: Wed, 20 Apr 2011 23:17:18 -0000 Author: emaste Date: Wed Apr 20 23:17:17 2011 New Revision: 220904 URL: http://svn.freebsd.org/changeset/base/220904 Log: Release Ryan Stone (rstone@) from mentorship. I've taught him what I can. Congratulations, and good luck! Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Apr 20 22:24:54 2011 (r220903) +++ svnadmin/conf/mentors Wed Apr 20 23:17:17 2011 (r220904) @@ -25,7 +25,6 @@ miwi rwatson nork imp randi cperciva rdivacky rpaulo -rstone emaste Co-mentor: jkoshy sbruno scottl snb dwmalone sson gnn From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 23:20:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AAED106564A; Wed, 20 Apr 2011 23:20:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DBFB8FC16; Wed, 20 Apr 2011 23:20: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 p3KNK0PT070583; Wed, 20 Apr 2011 23:20:00 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KNK0r8070581; Wed, 20 Apr 2011 23:20:00 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104202320.p3KNK0r8070581@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Apr 2011 23:20: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: r220905 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 20 Apr 2011 23:20:00 -0000 Author: np Date: Wed Apr 20 23:20:00 2011 New Revision: 220905 URL: http://svn.freebsd.org/changeset/base/220905 Log: Ring the freelist doorbell from within refill_fl. While here, fix a bug that could have allowed the hardware pidx to reach the cidx even though the freelist isn't empty. (Haven't actually seen this but it was there waiting to happen..) MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Apr 20 23:17:17 2011 (r220904) +++ head/sys/dev/cxgbe/t4_sge.c Wed Apr 20 23:20:00 2011 (r220905) @@ -114,7 +114,7 @@ static void oneseg_dma_callback(void *, static inline bool is_new_response(const struct sge_iq *, struct rsp_ctrl **); static inline void iq_next(struct sge_iq *); static inline void ring_fl_db(struct adapter *, struct sge_fl *); -static void refill_fl(struct sge_fl *, int); +static void refill_fl(struct adapter *, struct sge_fl *, int, int); static int alloc_fl_sdesc(struct sge_fl *); static void free_fl_sdesc(struct sge_fl *); static int alloc_tx_maps(struct sge_txq *); @@ -763,9 +763,7 @@ t4_eth_rx(void *arg) FL_LOCK(fl); fl->needed += i; if (fl->needed >= 32) - refill_fl(fl, 64); - if (fl->pending >= 32) - ring_fl_db(sc, fl); + refill_fl(sc, fl, 64, 32); FL_UNLOCK(fl); nextdesc: ndescs++; @@ -793,9 +791,7 @@ nextdesc: ndescs++; FL_LOCK(fl); if (fl->needed >= 32) - refill_fl(fl, 128); - if (fl->pending >= 8) - ring_fl_db(sc, fl); + refill_fl(sc, fl, 128, 8); FL_UNLOCK(fl); } @@ -1179,7 +1175,7 @@ alloc_iq_fl(struct port_info *pi, struct rc); return (rc); } - fl->needed = fl->cap - 1; /* one less to avoid cidx = pidx */ + fl->needed = fl->cap; c.iqns_to_fl0congen = htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE)); @@ -1222,9 +1218,7 @@ alloc_iq_fl(struct port_info *pi, struct sc->sge.eqmap[cntxt_id] = (void *)fl; FL_LOCK(fl); - refill_fl(fl, -1); - if (fl->pending >= 8) - ring_fl_db(sc, fl); + refill_fl(sc, fl, -1, 8); FL_UNLOCK(fl); } @@ -1692,24 +1686,31 @@ iq_next(struct sge_iq *iq) } } +#define FL_HW_IDX(x) ((x) >> 3) static inline void ring_fl_db(struct adapter *sc, struct sge_fl *fl) { int ndesc = fl->pending / 8; - /* Caller responsible for ensuring there's something useful to do */ - KASSERT(ndesc > 0, ("%s called with no useful work to do.", __func__)); + if (FL_HW_IDX(fl->pidx) == FL_HW_IDX(fl->cidx)) + ndesc--; /* hold back one credit */ + + if (ndesc <= 0) + return; /* nothing to do */ wmb(); t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), F_DBPRIO | V_QID(fl->cntxt_id) | V_PIDX(ndesc)); - - fl->pending &= 7; + fl->pending -= ndesc * 8; } +/* + * Fill up the freelist by upto nbufs and ring its doorbell if the number of + * buffers ready to be handed to the hardware >= dbthresh. + */ static void -refill_fl(struct sge_fl *fl, int nbufs) +refill_fl(struct adapter *sc, struct sge_fl *fl, int nbufs, int dbthresh) { __be64 *d = &fl->desc[fl->pidx]; struct fl_sdesc *sd = &fl->sdesc[fl->pidx]; @@ -1800,6 +1801,9 @@ recycled: d = fl->desc; } } + + if (fl->pending >= dbthresh) + ring_fl_db(sc, fl); } static int From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 23:25:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFDA1065673; Wed, 20 Apr 2011 23:25:18 +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 7EF468FC13; Wed, 20 Apr 2011 23:25: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 p3KNPItL070783; Wed, 20 Apr 2011 23:25:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KNPIK6070781; Wed, 20 Apr 2011 23:25:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104202325.p3KNPIK6070781@svn.freebsd.org> From: Rick Macklem Date: Wed, 20 Apr 2011 23:25: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: r220906 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 23:25:18 -0000 Author: rmacklem Date: Wed Apr 20 23:25:18 2011 New Revision: 220906 URL: http://svn.freebsd.org/changeset/base/220906 Log: Add a check for VI_DOOMED at the beginning of nfscl_request() so that it won't try and use vp->v_mount to do an RPC during a forced dismount. There needs to be at least one more kernel commit, plus a change to the umount(8) command before forced dismounts will work for the experimental NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Wed Apr 20 23:20:00 2011 (r220905) +++ head/sys/fs/nfsclient/nfs_clport.c Wed Apr 20 23:25:18 2011 (r220906) @@ -819,6 +819,8 @@ nfscl_request(struct nfsrv_descript *nd, int ret, vers; struct nfsmount *nmp; + if ((vp->v_iflag & VI_DOOMED) != 0) + return (EPERM); nmp = VFSTONFS(vp->v_mount); if (nd->nd_flag & ND_NFSV4) vers = NFS_VER4; From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 00:45:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4746C1065674; Thu, 21 Apr 2011 00:45:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id D39968FC0A; Thu, 21 Apr 2011 00:45:56 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3L0jr8e014297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Apr 2011 10:45:54 +1000 Date: Thu, 21 Apr 2011 10:45:52 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pawel Jakub Dawidek In-Reply-To: <20110420161655.GA1907@garage.freebsd.pl> Message-ID: <20110421101020.V1056@besplex.bde.org> References: <20110420054655.GD1826@garage.freebsd.pl> <630616771.329277.1303301372199.JavaMail.root@erie.cs.uoguelph.ca> <20110420161655.GA1907@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, Rick Macklem , src-committers@freebsd.org Subject: Re: svn commit: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 00:45:57 -0000 On Wed, 20 Apr 2011, Pawel Jakub Dawidek wrote: > On Wed, Apr 20, 2011 at 08:09:32AM -0400, Rick Macklem wrote: >>>> + tmp_off = uio->uio_offset + uio->uio_resid; >>>> + mtx_lock(&nmp->nm_mtx); >>>> + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { >>>> + mtx_unlock(&nmp->nm_mtx); >>>> return (EFBIG); >>>> + } >>>> + mtx_unlock(&nmp->nm_mtx); >>> >>> I don't think you need the lock to protect nm_maxfilesize. Can it >>> change >>> from under us? My guess is that it is set on mount time and is not >>> modified afterwards. I said the same in a private reply which was initially about overflow errors in the overflow checking, but expanded to also cover errors in the return values (EFBIG instead of EOF or EOVERFLOW for read()) and this point. >>> >> Good question. >> For NFSv3 - it is only modified by the first fsinfo RPC and that normally >> happens at mount time, as you guessed above. (This is consistent with >> RFC1813, which defines the fsinfo RPC as getting non-volatile information.) >> For NFSv4 - it gets it each time VFS_STATFS() happens. I am not sure that >> this is correct, but I don't know of anywhere in RFC3530 where it states >> that this attribute will not change. In practice, I suspect that servers >> seldom, if ever, change it. >> >> So, it is unlikely to change and I'd be comfortable taking the mutex lock >> off the check for it, if others are? (As you might be aware, I started a >> thread on hackers-freebsd@ where my question was basically "do you need to >> mutex lock when you read a global variable". My main concern there was a >> case that I'm working on w.r.t. forced dismounts. jhb@ suggested that he >> thinks it is good practice to always lock, to play it safe. At least that >> was my interpretation?) > > This is not that easy, I'm afraid. You need to ask yourself a question > what you are trying to protect from. Here, the mutex only guarantees to > have consistent view of the nm_maxfilesize field. For example if this > field modification wouldn't be atomic you would need the mutex to ensure > that the value is correct. The modification isn't necessarily atomic since the field is a typedefed type. The actual type is 64 bits, so the modification happens to be atomic on 64 bit arches but not on 32 bit arches. > Imagine a situation where it is modifed not by simple 'a = b', but by > something like this: > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = some_32bit_array[0]; > nmp->nm_maxfilesize |= some_32bit_array[1] << 32; > mtx_unlock(&nmp->nm_mtx); > > To read that properly you need a mutex to ensure you won't read the > value between those two operations. Modification of 64 bit values on 32 bit arches is essentially the same as a modification of an array consisting of 2 32 bit elements. However, for numeric values, it is very unlikely that the modification gives a fatally invalid in-between value, no matter which order the writes and reads occur. E.g., for some values, the upper bits might never be changed. Only modifications like incrementing from 0xffffffff to 0x100000000 may give fatally different values (this can give a value of 0 from a new value of 0 in the lower bits and an old value of 0 in the upper bits). > If it is not the case - its modification is atomic and reading it is > atomic then you don't need mutex to read the value as it will always be > consistent. The question is what will happen if it changes after you > read it. > > thread0 thread1 > ------- ------- > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = 8192; > mtx_unlock(&nmp->nm_mtx); > > mtx_lock(&nmp->nm_mtx); > if (tmp_off > nmp->nm_maxfilesize) { > mtx_unlock(&nmp->nm_mtx); > return (EFBIG); > } > mtx_unlock(&nmp->nm_mtx); > > mtx_lock(&nmp->nm_mtx); > nmp->nm_maxfilesize = 2048; > mtx_unlock(&nmp->nm_mtx); > > > > Now, if tmp_off is 4096 what will happen if you have a race like the > above? Is it critical? Then you need to protect with > this mutex as well. Locking of the whole transaction is especially impossible for this field. nm_maxfilesize is from the server (except for local resource limits which may require reducing it). If it changes after being initialized, it is probably the server that changed it (since any change would be foot-shooting so you shouldn't do it locally). There is no way to prevent the server changing its limit. The copy of the limit in nm_maxfilesize may have become out of date slightly before it was written there, or between the write there and the read here, or after it is checked here, so the server may reject the write for many slightly different temporal reasons. Any reduction of these race windows or remote checks that they aren't there or remote locking to prevent them would be huge pessimizations. So we shouldn't do any locking here, except whatever is needed to make the read sufficiently atomic (hopefully nothing). I'm interested in lock-free algorithms for this. See my reply about similar excessive locking/atomicity for tsc_freq. "Locking for read" is usually at best a waste of time since the variable may change immediately after you release the lock. Often it is OK to release the lock and thus use a variable that may be out of date. For this, any old value and any new value must work. Then any value between the old and new value[s] and any value not too much smaller or larger than the old and new value[s] will probably work too. Perhaps the writer can update the value so that all read orders give one of these working values. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 00:56:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF22106564A; Thu, 21 Apr 2011 00:56:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id F011A8FC13; Thu, 21 Apr 2011 00:56:54 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3L0uoTd030637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Apr 2011 10:56:52 +1000 Date: Thu, 21 Apr 2011 10:56:50 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rick Macklem In-Reply-To: <558114287.379554.1303337182943.JavaMail.root@erie.cs.uoguelph.ca> Message-ID: <20110421104734.S1144@besplex.bde.org> References: <558114287.379554.1303337182943.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r220877 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 00:56:55 -0000 On Wed, 20 Apr 2011, Rick Macklem wrote: > Well, its value will be consistent, but not necessarily the "up to date" > value set by another thread, if I understood alc@'s recent post. > If you haven't yet read it, take a look at his post today on freebsd-hackers@ > under the Subject > Re: SMP question w.r.t. reading kernel variables I didn't look, but... > If I understood his explanation, a thread must lock a mutex that the thread > that modified the value has locked/unlocked before it is guaranteed to see > that value for the variable instead of some stale memory cached value. > (It can be any mutex, but it is probably much easier to use the same one > that the modifying thread used during modification instead of finding some > other mutex the same thread locked/unlocked after the modification.) I don't see how it can be "any" mutex. "Any" mutex will probably cause some sort of bus lock which will sync the readers and writers at the time of the mutex operation, but not afterwards. I think all that happens is that SMP code executes mutex operations _very_ often. This gives very short race windows which I think hide lots of bugs. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 03:47:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53586106566C; Thu, 21 Apr 2011 03:47:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 429078FC1D; Thu, 21 Apr 2011 03:47: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 p3L3lfGg078669; Thu, 21 Apr 2011 03:47:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L3lfch078665; Thu, 21 Apr 2011 03:47:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104210347.p3L3lfch078665@svn.freebsd.org> From: Adrian Chadd Date: Thu, 21 Apr 2011 03:47: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: r220907 - in head: sbin/ifconfig sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 03:47:41 -0000 Author: adrian Date: Thu Apr 21 03:47:40 2011 New Revision: 220907 URL: http://svn.freebsd.org/changeset/base/220907 Log: Change the MIMO userland export ABI to include flags, number of radio chains, extended EVM statistics and EXT channel data. ifconfig still displays 3 chains worth of ctl noise/rssi. Modified: head/sbin/ifconfig/ifieee80211.c head/sys/net80211/_ieee80211.h head/sys/net80211/ieee80211_node.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Wed Apr 20 23:25:18 2011 (r220906) +++ head/sbin/ifconfig/ifieee80211.c Thu Apr 21 03:47:40 2011 (r220907) @@ -3139,11 +3139,13 @@ static void printmimo(const struct ieee80211_mimo_info *mi) { /* NB: don't muddy display unless there's something to show */ - if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) { + /* XXX should check flags and n_rx_chains */ + if (mi->rssi_ctl[0] != 0 || mi->rssi_ctl[1] != 0 || mi->rssi_ctl[2] != 0) { /* XXX ignore EVM for now */ + /* XXX ignore EXT for now */ printf(" (rssi %d:%d:%d nf %d:%d:%d)", - mi->rssi[0], mi->rssi[1], mi->rssi[2], - mi->noise[0], mi->noise[1], mi->noise[2]); + mi->rssi_ctl[0], mi->rssi_ctl[1], mi->rssi_ctl[2], + mi->noise_ctl[0], mi->noise_ctl[1], mi->noise_ctl[2]); } } Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Wed Apr 20 23:25:18 2011 (r220906) +++ head/sys/net80211/_ieee80211.h Thu Apr 21 03:47:40 2011 (r220907) @@ -395,9 +395,14 @@ struct ieee80211_regdomain { * XXX This doesn't yet export both ctl/ext chain details */ struct ieee80211_mimo_info { - int8_t rssi[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */ - int8_t noise[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */ - uint8_t pad[2]; - uint32_t evm[3]; /* EVM data */ + uint16_t flags; /* IEEE80211_R_* flags */ + uint8_t n_rx_chains; /* number of RX chains involved */ + uint8_t pad[1]; + int8_t rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */ + int8_t noise_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */ + int8_t rssi_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext rssi */ + int8_t noise_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext noise floor */ + uint32_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; + /* EVM data */ }; #endif /* _NET80211__IEEE80211_H_ */ Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Wed Apr 20 23:25:18 2011 (r220906) +++ head/sys/net80211/ieee80211_node.c Thu Apr 21 03:47:40 2011 (r220907) @@ -1091,18 +1091,30 @@ node_getmimoinfo(const struct ieee80211_ bzero(info, sizeof(*info)); + /* XXX set flags - evm, ctl/ext data, etc. */ + info->n_rx_chains = ni->ni_mimo_chains; + for (i = 0; i < ni->ni_mimo_chains; i++) { + /* Ctl channel */ avgrssi = ni->ni_mimo_rssi_ctl[i]; if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) { - info->rssi[i] = 0; + info->rssi_ctl[i] = 0; } else { rssi = IEEE80211_RSSI_GET(avgrssi); - info->rssi[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; + info->rssi_ctl[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; } - info->noise[i] = ni->ni_mimo_noise_ctl[i]; - } + info->noise_ctl[i] = ni->ni_mimo_noise_ctl[i]; - /* XXX ext radios? */ + /* Ext channel */ + avgrssi = ni->ni_mimo_rssi_ext[i]; + if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) { + info->rssi_ext[i] = 0; + } else { + rssi = IEEE80211_RSSI_GET(avgrssi); + info->rssi_ext[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; + } + info->noise_ext[i] = ni->ni_mimo_noise_ext[i]; + } /* XXX EVM? */ } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 03:59:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D424F1065670; Thu, 21 Apr 2011 03:59:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C29CD8FC17; Thu, 21 Apr 2011 03:59:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3L3xbg3079069; Thu, 21 Apr 2011 03:59:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L3xb1h079064; Thu, 21 Apr 2011 03:59:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104210359.p3L3xb1h079064@svn.freebsd.org> From: Adrian Chadd Date: Thu, 21 Apr 2011 03:59: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: r220908 - in head/sys: conf net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 03:59:37 -0000 Author: adrian Date: Thu Apr 21 03:59:37 2011 New Revision: 220908 URL: http://svn.freebsd.org/changeset/base/220908 Log: Implement very basic ALQ logging for net80211. This is destined to be a lightweight and optional set of ALQ probes for debugging events which are just impossible to debug with printf/log (eg packet TX/RX handling; AMPDU handling.) The probes and operations themselves will appear in subsequent commits. Added: head/sys/net80211/ieee80211_alq.c (contents, props changed) head/sys/net80211/ieee80211_alq.h (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 21 03:47:40 2011 (r220907) +++ head/sys/conf/files Thu Apr 21 03:59:37 2011 (r220908) @@ -2577,6 +2577,7 @@ net80211/ieee80211_superg.c optional wla net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth +net80211/ieee80211_alq.c optional wlan ieee80211_alq netatalk/aarp.c optional netatalk netatalk/at_control.c optional netatalk netatalk/at_proto.c optional netatalk Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Apr 21 03:47:40 2011 (r220907) +++ head/sys/conf/options Thu Apr 21 03:59:37 2011 (r220908) @@ -834,6 +834,7 @@ IEEE80211_AMPDU_AGE opt_wlan.h IEEE80211_SUPPORT_MESH opt_wlan.h IEEE80211_SUPPORT_SUPERG opt_wlan.h IEEE80211_SUPPORT_TDMA opt_wlan.h +IEEE80211_ALQ opt_wlan.h # 802.11 TDMA support TDMA_SLOTLEN_DEFAULT opt_tdma.h Added: head/sys/net80211/ieee80211_alq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net80211/ieee80211_alq.c Thu Apr 21 03:59:37 2011 (r220908) @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 2011 Adrian Chadd, Xenion Lty Ltd + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#ifdef __FreeBSD__ +__FBSDID("$FreeBSD$"); +#endif + +/* + * net80211 fast-logging support, primarily for debugging. + * + * This implements a single debugging queue which includes + * per-device enumeration where needed. + */ + +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static struct alq *ieee80211_alq; +static int ieee80211_alq_lost; +static char ieee80211_alq_logfile[MAXPATHLEN] = "/tmp/net80211.log"; +static unsigned int ieee80211_alq_qsize = 64*1024; + +static int +ieee80211_alq_setlogging(int enable) +{ + int error; + + if (enable) { + if (ieee80211_alq) + alq_close(ieee80211_alq); + + error = alq_open(&ieee80211_alq, + ieee80211_alq_logfile, + curthread->td_ucred, + ALQ_DEFAULT_CMODE, + sizeof (struct ieee80211_alq_rec), + ieee80211_alq_qsize); + ieee80211_alq_lost = 0; + printf("net80211: logging to %s enabled\n", ieee80211_alq_logfile); + } else { + if (ieee80211_alq) + alq_close(ieee80211_alq); + ieee80211_alq = NULL; + printf("net80211: logging disabled\n"); + error = 0; + } + return (error); +} + +static int +sysctl_ieee80211_alq_log(SYSCTL_HANDLER_ARGS) +{ + int error, enable; + + enable = (ieee80211_alq != NULL); + error = sysctl_handle_int(oidp, &enable, 0, req); + if (error || !req->newptr) + return (error); + else + return (ieee80211_alq_setlogging(enable)); +} + +SYSCTL_PROC(_net_wlan, OID_AUTO, alq, CTLTYPE_INT|CTLFLAG_RW, + 0, 0, sysctl_ieee80211_alq_log, "I", "Enable net80211 alq logging"); +SYSCTL_INT(_net_wlan, OID_AUTO, alq_size, CTLFLAG_RW, + &ieee80211_alq_qsize, 0, "In-memory log size (#records)"); +SYSCTL_INT(_net_wlan, OID_AUTO, alq_lost, CTLFLAG_RW, + &ieee80211_alq_lost, 0, "Debugging operations not logged"); + +static struct ale * +ieee80211_alq_get(void) +{ + struct ale *ale; + + ale = alq_get(ieee80211_alq, ALQ_NOWAIT); + if (!ale) + ieee80211_alq_lost++; + return ale; +} + +void +ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op, u_char *p, int l) +{ + struct ale *ale; + struct ieee80211_alq_rec *r; + + ale = ieee80211_alq_get(); + if (! ale) + return; + + r = (struct ieee80211_alq_rec *) ale; + r->r_timestamp = ticks; + r->r_version = 1; + r->r_wlan = vap->iv_ifp->if_dunit; + r->r_op = op; + memcpy(&r->r_payload, p, MIN(l, sizeof(r->r_payload))); +} Added: head/sys/net80211/ieee80211_alq.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net80211/ieee80211_alq.h Thu Apr 21 03:59:37 2011 (r220908) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2011 Adrian Chadd, Xenion Lty Ltd + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef __IEEE80211_ALQ_H__ +#define __IEEE80211_ALQ_H__ + +#define IEEE80211_ALQ_PAYLOAD_SIZE 24 + +/* + * timestamp + * wlan interface + * operation + * sub-operation + * rest of structure - operation specific + */ +struct ieee80211_alq_rec { + uint32_t r_timestamp; /* XXX may wrap! */ + uint16_t r_wlan; /* wlan interface number */ + uint8_t r_version; /* version */ + uint8_t r_op; /* top-level operation id */ + u_char r_payload[IEEE80211_ALQ_PAYLOAD_SIZE]; + /* operation-specific payload */ +}; + +/* General logging function */ +extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op, u_char *p, int l); + +#endif /* __IEEE80211_ALQ_H__ */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 06:25:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894D11065674; Thu, 21 Apr 2011 06:25:12 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77E908FC19; Thu, 21 Apr 2011 06:25: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 p3L6PCrE083385; Thu, 21 Apr 2011 06:25:12 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L6PCB4083376; Thu, 21 Apr 2011 06:25:12 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201104210625.p3L6PCB4083376@svn.freebsd.org> From: Josh Paetzel Date: Thu, 21 Apr 2011 06:25: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: r220909 - in head/usr.sbin/pc-sysinstall: backend backend-query X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 06:25:12 -0000 Author: jpaetzel Date: Thu Apr 21 06:25:12 2011 New Revision: 220909 URL: http://svn.freebsd.org/changeset/base/220909 Log: - Allows using full device name paths, such as /dev/ad0 or /dev/mirror/gm0 in config files - Fixes some issues creating gmirror devices, including on GPT partitions - Bugfixes for ZFS mirroring - Enhanced GELI to work with a passphrase only, or key-file only - Bugfix to prevent crashing of PC-BSD Live media when checking for upgrade partitions Submitted by: Kris Moore Approved by: kib (mentor) Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend-query/update-part-list.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -37,16 +37,22 @@ FSMNT="/mnt" # Get the freebsd version on this partition get_fbsd_ver() { - - VER="`file ${FSMNT}/bin/sh | grep 'for FreeBSD' | sed 's|for FreeBSD |;|g' | cut -d ';' -f 2 | cut -d ',' -f 1`" - if [ "$?" = "0" ] ; then - file ${FSMNT}/bin/sh | grep '32-bit' >/dev/null 2>/dev/null - if [ "${?}" = "0" ] ; then - echo "${1}: FreeBSD ${VER} (32bit)" - else - echo "${1}: FreeBSD ${VER} (64bit)" + sFiles="/bin/sh /boot/kernel/kernel" + for file in $sFiles + do + if [ ! -e "${FSMNT}/$file" ] ; then continue ; fi + + VER="`file ${FSMNT}/$file | grep 'for FreeBSD' | sed 's|for FreeBSD |;|g' | cut -d ';' -f 2 | cut -d ',' -f 1`" + if [ "$?" = "0" ] ; then + file ${FSMNT}/$file | grep '32-bit' >/dev/null 2>/dev/null + if [ "${?}" = "0" ] ; then + echo "${1}: FreeBSD ${VER} (32bit)" + else + echo "${1}: FreeBSD ${VER} (64bit)" + fi fi - fi + break + done } @@ -86,25 +92,8 @@ do fi mount -o ro ${_dsk} ${FSMNT} >>${LOGOUT} 2>>${LOGOUT} - if [ "${?}" = "0" -a -e "${FSMNT}/bin/sh" ] ; then + if [ $? -eq 0 ] ; then get_fbsd_ver "`echo ${_dsk} | sed 's|/dev/||g'`" umount -f ${FSMNT} >/dev/null 2>/dev/null fi done - -# Now search for any ZFS root partitions -zpool import -o altroot=${FSMNT} -a - -# Unmount any auto-mounted stuff -umount_all_dir "${FSMNT}" - -# Get pools -_zps="`zpool list | grep -v 'NAME' | cut -d ' ' -f 1`" -for _zpools in ${_zps} -do - mount -o ro -t zfs ${_zpools} ${FSMNT} >>${LOGOUT} 2>>${LOGOUT} - if [ "${?}" = "0" -a -e "${FSMNT}/bin/sh" ] ; then - get_fbsd_ver "${_zpools}" - umount -f ${FSMNT} >/dev/null 2>/dev/null - fi -done Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -101,7 +101,6 @@ setup_zfs_mirror_parts() if [ $? -eq 0 ] ; then echo "Setting up ZFS mirror disk $_zvars" >>${LOGOUT} init_gpt_full_disk "$_zvars" >/dev/null 2>/dev/null - rc_halt "gpart bootcode -p /boot/gptzfsboot -i 1 ${_zvars}" >/dev/null 2>/dev/null rc_halt "gpart add -t freebsd-zfs ${_zvars}" >/dev/null 2>/dev/null _nZFS="$_nZFS ${_zvars}p2" else @@ -319,7 +318,8 @@ setup_gpart_partitions() # Save this data to our partition config dir if [ "${_pType}" = "gpt" ] ; then - echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" >${PARTDIR}/${_pDisk}p${CURPART} + _dFile="`echo $_pDisk | sed 's|/|-|g'`" + echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" >${PARTDIR}/${_dFile}p${CURPART} # Clear out any headers sleep 2 @@ -327,18 +327,19 @@ setup_gpart_partitions() # If we have a enc password, save it as well if [ -n "${ENCPASS}" ] ; then - echo "${ENCPASS}" >${PARTDIR}-enc/${_pDisk}p${CURPART}-encpass + echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}p${CURPART}-encpass fi else # MBR Partition - echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" >${PARTDIR}/${_wSlice}${PARTLETTER} + _dFile="`echo $_wSlice | sed 's|/|-|g'`" + echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" >${PARTDIR}/${_dFile}${PARTLETTER} # Clear out any headers sleep 2 dd if=/dev/zero of=${_wSlice}${PARTLETTER} count=2048 2>/dev/null # If we have a enc password, save it as well if [ -n "${ENCPASS}" ] ; then - echo "${ENCPASS}" >${PARTDIR}-enc/${_wSlice}${PARTLETTER}-encpass + echo "${ENCPASS}" >${PARTDIR}-enc/${_dFile}${PARTLETTER}-encpass fi fi @@ -404,28 +405,28 @@ populate_disk_label() fi # Set some vars from the given working slice - disk="`echo $1 | cut -d '-' -f 1`" - slicenum="`echo $1 | cut -d '-' -f 2`" - type="`echo $1 | cut -d '-' -f 3`" + diskid="`echo $1 | cut -d ':' -f 1`" + disk="`echo $1 | cut -d ':' -f 1 | sed 's|-|/|g'`" + slicenum="`echo $1 | cut -d ':' -f 2`" + type="`echo $1 | cut -d ':' -f 3`" # Set WRKSLICE based upon format we are using if [ "$type" = "mbr" ] ; then - wrkslice="${disk}s${slicenum}" + wrkslice="${diskid}s${slicenum}" fi if [ "$type" = "gpt" ] ; then - wrkslice="${disk}p${slicenum}" + wrkslice="${diskid}p${slicenum}" fi - if [ -e "${SLICECFGDIR}/${wrkslice}" ] - then - disktag="`cat ${SLICECFGDIR}/${wrkslice}`" - else + if [ ! -e "${SLICECFGDIR}/${wrkslice}" ] ; then exit_err "ERROR: Missing SLICETAG data. This shouldn't happen - please let the developers know" fi - + disktag="`cat ${SLICECFGDIR}/${wrkslice}`" + slicedev="`echo $wrkslice | sed 's|-|/|g'`" + # Setup the partitions with gpart - setup_gpart_partitions "${disktag}" "${disk}" "${wrkslice}" "${slicenum}" "${type}" + setup_gpart_partitions "${disktag}" "${disk}" "${slicedev}" "${slicenum}" "${type}" }; @@ -444,10 +445,10 @@ setup_disk_label() disk="`echo $i | cut -d '-' -f 1`" pnum="`echo $i | cut -d '-' -f 2`" type="`echo $i | cut -d '-' -f 3`" - if [ "$type" = "mbr" -a ! -e "/dev/${disk}s${pnum}" ] ; then + if [ "$type" = "mbr" -a ! -e "${disk}s${pnum}" ] ; then exit_err "ERROR: The partition ${i} doesn't exist! gpart failure!" fi - if [ "$type" = "gpt" -a ! -e "/dev/${disk}p${pnum}" ] ; then + if [ "$type" = "gpt" -a ! -e "${disk}p${pnum}" ] ; then exit_err "ERROR: The partition ${i} doesn't exist! gpart failure!" fi done Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -33,9 +33,10 @@ zfs_cleanup_unmount() # Loop through our FS and see if we have any ZFS partitions to cleanup for PART in `ls ${PARTDIR}` do + PARTDEV=`echo $PART | sed 's|-|/|g'` PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" - ZPOOLNAME=$(get_zpool_name "${PART}") + ZPOOLNAME=$(get_zpool_name "${PARTDEV}") if [ "$PARTFS" = "ZFS" ] then @@ -82,13 +83,21 @@ zfs_cleanup_unmount() # Loop through our FS and see if we have any ZFS partitions to cleanup for PART in `ls ${PARTDIR}` do + PARTDEV=`echo $PART | sed 's|-|/|g'` PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" - ZPOOLNAME=$(get_zpool_name "${PART}") + ZPOOLNAME=$(get_zpool_name "${PARTDEV}") if [ "$PARTFS" = "ZFS" ] then + + # Create a list of zpool names we can export + echo $ZPOOLEXPORTS | grep -q "$ZPOOLNAME " + if [ $? -ne 0 ] ; then + export ZPOOLEXPORTS="$ZPOOLNAME $ZPOOLEXPORTS" + fi + # Check if we have multiple zfs mounts specified for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'` do @@ -122,8 +131,8 @@ setup_dedicated_boot_part() rc_halt "mkdir -p ${FSMNT}/${BOOTMNT}/boot" rc_halt "mv ${FSMNT}/boot/* ${FSMNT}${BOOTMNT}/boot/" rc_halt "mv ${FSMNT}${BOOTMNT}/boot ${FSMNT}/boot/" - rc_halt "umount /dev/${BOOTFS}" - rc_halt "mount /dev/${BOOTFS} ${FSMNT}${BOOTMNT}" + rc_halt "umount ${BOOTFS}" + rc_halt "mount ${BOOTFS} ${FSMNT}${BOOTMNT}" rc_halt "rmdir ${FSMNT}/boot" # Strip the '/' from BOOTMNT before making symlink @@ -144,22 +153,12 @@ setup_fstab() # Loop through the partitions, and start creating /etc/fstab for PART in `ls ${PARTDIR}` do + PARTDEV=`echo $PART | sed 's|-|/|g'` PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" PARTLABEL="`cat ${PARTDIR}/${PART} | cut -d ':' -f 4`" - DRIVE="`echo ${PART} | rev | cut -b 4- | rev`" - # Check if this device is being mirrored - if [ -e "${MIRRORCFGDIR}/${DRIVE}" ] - then - # This device is apart of a gmirror, lets reset PART to correct value - MDRIVE="mirror/`cat ${MIRRORCFGDIR}/${DRIVE} | cut -d ':' -f 3`" - TMP="`echo ${PART} | rev | cut -b -3 | rev`" - PART="${MDRIVE}${TMP}" - PARTLABEL="" - fi - # Unset EXT EXT="" @@ -184,7 +183,7 @@ setup_fstab() if [ "${PARTFS}" = "UFS+J" ] ; then EXT="${EXT}.journal" fi - DEVICE="${PART}${EXT}" + DEVICE="${PARTDEV}${EXT}" fi @@ -193,7 +192,7 @@ setup_fstab() if [ $? -eq 0 ] ; then if [ "${PARTFS}" = "ZFS" ] ; then ROOTFSTYPE="zfs" - XPOOLNAME=$(get_zpool_name "${PART}") + XPOOLNAME=$(get_zpool_name "${PARTDEV}") ROOTFS="${ZPOOLNAME}" else ROOTFS="${DEVICE}" @@ -212,7 +211,7 @@ setup_fstab() # Save the BOOTFS for call at the end if [ "${PARTMNT}" = "/boot" ] ; then - BOOTFS="${PART}${EXT}" + BOOTFS="${PARTDEV}${EXT}" BOOTMNT="${BOOT_PART_MOUNT}" PARTMNT="${BOOTMNT}" fi @@ -245,28 +244,6 @@ setup_fstab() # Setup our disk mirroring with gmirror setup_gmirror() { - NUM="0" - - cd ${MIRRORCFGDIR} - for DISK in `ls *` - do - MIRRORDISK="`cat ${DISK} | cut -d ':' -f 1`" - MIRRORBAL="`cat ${DISK} | cut -d ':' -f 2`" - - # Create this mirror device - gmirror label -vb $MIRRORBAL gm${NUM} /dev/${DISK} - - sleep 3 - - # Save the gm device in our config - echo "${MIRRORDISK}:${MIRRORBAL}:gm${NUM}" > ${DISK} - - sleep 3 - - NUM=$((NUM+1)) - done - - cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q 'geom_mirror_load="YES"' 2>/dev/null if [ $? -ne 0 ] then @@ -283,24 +260,25 @@ setup_geli_loading() mkdir -p ${FSMNT}/boot/keys >/dev/null 2>/dev/null cd ${GELIKEYDIR} - for KEYFILE in `ls *` + for KEYFILE in `ls` do # Figure out the partition name based on keyfile name removing .key PART="`echo ${KEYFILE} | cut -d '.' -f 1`" + PARTDEV="`echo ${PART} | sed 's|-|/|g'`" + PARTNAME="`echo ${PART} | sed 's|-dev-||g'`" + + rc_halt "geli configure -b ${PARTDEV}" + + # If no passphrase, setup key files + if [ ! -e "${PARTDIR}-enc/${PART}-encpass" ] ; then + echo "geli_${PARTNAME}_keyfile0_load=\"YES\"" >> ${FSMNT}/boot/loader.conf + echo "geli_${PARTNAME}_keyfile0_type=\"${PARTNAME}:geli_keyfile0\"" >> ${FSMNT}/boot/loader.conf + echo "geli_${PARTNAME}_keyfile0_name=\"/boot/keys/${PARTNAME}.key\"" >> ${FSMNT}/boot/loader.conf - # Add the entries to loader.conf to start this geli provider at boot - echo "geli_${PART}_keyfile0_load=\"YES\"" >> ${FSMNT}/boot/loader.conf - echo "geli_${PART}_keyfile0_type=\"${PART}:geli_keyfile0\"" >> ${FSMNT}/boot/loader.conf - echo "geli_${PART}_keyfile0_name=\"/boot/keys/${KEYFILE}\"" >> ${FSMNT}/boot/loader.conf - - # If we have a passphrase, set it up now - if [ -e "${PARTDIR}-enc/${PART}-encpass" ] ; then - geli setkey -J ${PARTDIR}-enc/${PART}-encpass -n 0 -p -k ${KEYFILE} -K ${KEYFILE} ${PART} - geli configure -b ${PART} + # Copy the key to the disk + rc_halt "cp ${GELIKEYDIR}/${KEYFILE} ${FSMNT}/boot/keys/${PARTNAME}.key" fi - # Copy the key to the disk - cp ${KEYFILE} ${FSMNT}/boot/keys/${KEYFILE} done # Make sure we have geom_eli set to load at boot Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -241,16 +241,15 @@ delete_all_gpart() local DISK="$1" # Check for any swaps to stop - for i in `gpart show ${DISK} 2>/dev/null | grep 'freebsd-swap' | tr -s ' ' | cut -d ' ' -f 4` + for i in `swapctl -l | grep "$DISK" | awk '{print $1}'` do - swapoff /dev/${DISK}s${i}b >/dev/null 2>/dev/null - swapoff /dev/${DISK}p${i} >/dev/null 2>/dev/null + swapoff ${i} >/dev/null 2>/dev/null done # Delete the gparts now for i in `gpart show ${DISK} 2>/dev/null | tr -s ' ' | cut -d ' ' -f 4` do - if [ "${i}" != "${DISK}" -a "${i}" != "-" ] ; then + if [ "/dev/${i}" != "${DISK}" -a "${i}" != "-" ] ; then rc_nohalt "gpart delete -i ${i} ${DISK}" fi done @@ -262,7 +261,7 @@ delete_all_gpart() clear_backup_gpt_table "${DISK}" # Wipe out front of disk - rc_nohalt "dd if=/dev/zero of=/dev/${DISK} count=3000" + rc_nohalt "dd if=/dev/zero of=${DISK} count=3000" }; @@ -279,7 +278,7 @@ stop_all_zfs() # Function which stops all gmirrors before doing any disk manipulation stop_all_gmirror() { - DISK="${1}" + local DISK="`echo ${1} | sed 's|/dev/||g'`" GPROV="`gmirror list | grep ". Name: mirror/" | cut -d '/' -f 2`" for gprov in $GPROV do @@ -296,7 +295,7 @@ stop_all_gmirror() # Make sure we don't have any geli providers active on this disk stop_all_geli() { - _geld="${1}" + local _geld="`echo ${1} | sed 's|/dev/||g'`" cd /dev for i in `ls ${_geld}*` @@ -321,8 +320,9 @@ setup_disk_slice() rm -rf ${MIRRORCFGDIR} >/dev/null 2>/dev/null mkdir ${MIRRORCFGDIR} - # Start with disk0 + # Start with disk0 and gm0 disknum="0" + gmnum="0" # Make sure all zpools are exported export_all_zpools @@ -338,10 +338,12 @@ setup_disk_slice() get_value_from_string "${line}" strip_white_space "$VAL" DISK="$VAL" + + echo "${DISK}" | grep -q '^/dev/' + if [ $? -ne 0 ] ; then DISK="/dev/$DISK" ; fi # Before we go further, lets confirm this disk really exists - if [ ! -e "/dev/${DISK}" ] - then + if [ ! -e "${DISK}" ] ; then exit_err "ERROR: The disk ${DISK} does not exist!" fi @@ -354,7 +356,7 @@ setup_disk_slice() # Make sure we don't have any zpools loaded stop_all_zfs - fi + fi # Lets look if this device will be mirrored on another disk echo $line | grep -q "^mirror=" 2>/dev/null @@ -365,9 +367,11 @@ setup_disk_slice() get_value_from_string "${line}" strip_white_space "$VAL" MIRRORDISK="$VAL" + echo "${MIRRORDISK}" | grep -q '^/dev/' + if [ $? -ne 0 ] ; then MIRRORDISK="/dev/$MIRRORDISK" ; fi # Before we go further, lets confirm this disk really exists - if [ ! -e "/dev/${MIRRORDISK}" ] + if [ ! -e "${MIRRORDISK}" ] then exit_err "ERROR: The mirror disk ${MIRRORDISK} does not exist!" fi @@ -458,8 +462,22 @@ setup_disk_slice() # Found our flag to commit this disk setup / lets do sanity check and do it if [ ! -z "${DISK}" -a ! -z "${PTYPE}" ] then + case ${PTYPE} in all) + # If we have a gmirror, lets set it up + if [ -n "$MIRRORDISK" ]; then + # Default to round-robin if the user didn't specify + if [ -z "$MIRRORBAL" ]; then MIRRORBAL="round-robin" ; fi + + echo "$MIRRORDISK:$MIRRORBAL:gm${gmnum}" >${MIRRORCFGDIR}/$DISK + init_gmirror "$gmnum" "$MIRRORBAL" "$DISK" "$MIRRORDISK" + + # Reset DISK to the gmirror device + DISK="/dev/mirror/gm${gmnum}" + gmnum=$((gmknum+1)) + fi + if [ "$PSCHEME" = "MBR" -o -z "$PSCHEME" ] ; then PSCHEME="MBR" tmpSLICE="${DISK}s1" @@ -511,18 +529,8 @@ setup_disk_slice() # Now save which disk this is, so we can parse it later during slice partition setup if [ -z "${IMAGE}" ] then - echo "disk${disknum}" >${SLICECFGDIR}/$tmpSLICE - fi - - # Save any mirror config - if [ -n "$MIRRORDISK" ] - then - # Default to round-robin if the user didn't specify - if [ -z "$MIRRORBAL" ] - then - MIRRORBAL="round-robin" - fi - echo "$MIRRORDISK:$MIRRORBAL" >${MIRRORCFGDIR}/$DISK + _sFile=`echo $tmpSLICE | sed 's|/|-|g'` + echo "disk${disknum}" >${SLICECFGDIR}/$_sFile fi # Increment our disk counter to look for next disk and unset @@ -537,10 +545,25 @@ setup_disk_slice() }; + +# Init the gmirror device +init_gmirror() +{ + local _mNum=$1 + local _mBal=$2 + local _mDisk=$3 + + # Create this mirror device + rc_halt "gmirror label -vb ${_mBal} gm${_mNum} /dev/${_mDisk}" + + sleep 3 + +} + # Stop all gjournals on disk / slice stop_gjournal() { - _gdsk="$1" + _gdsk="`echo $1 | sed 's|/dev/||g'`" # Check if we need to shutdown any journals on this drive ls /dev/${_gdsk}*.journal >/dev/null 2>/dev/null if [ $? -eq 0 ] @@ -634,8 +657,8 @@ init_mbr_full_disk() sec="${VAL}" # Multiply them all together to get our total blocks - totalblocks="`expr ${cyl} \* ${head}`" - totalblocks="`expr ${totalblocks} \* ${sec}`" + totalblocks="`expr ${cyl} \* ${head} 2>/dev/null`" + totalblocks="`expr ${totalblocks} \* ${sec} 2>/dev/null`" if [ -z "${totalblocks}" ] then totalblocks=`gpart show "${_intDISK}"|tail -2|head -1|awk '{ print $2 }'` @@ -650,7 +673,7 @@ init_mbr_full_disk() sleep 2 echo_log "Cleaning up ${_intDISK}s1" - rc_halt "dd if=/dev/zero of=/dev/${_intDISK}s1 count=1024" + rc_halt "dd if=/dev/zero of=${_intDISK}s1 count=1024" if [ "$_intBOOT" = "bsd" ] ; then echo_log "Stamping boot0 on ${_intDISK}" @@ -671,10 +694,10 @@ run_gpart_full() if [ "$SCHEME" = "MBR" ] ; then init_mbr_full_disk "$DISK" "$BOOT" - slice="${DISK}-1-mbr" + slice=`echo "${DISK}:1:mbr" | sed 's|/|-|g'` else init_gpt_full_disk "$DISK" - slice="${DISK}-1-gpt" + slice=`echo "${DISK}:1:gpt" | sed 's|/|-|g'` fi # Lets save our slice, so we know what to look for in the config file later on @@ -723,7 +746,7 @@ run_gpart_slice() # Clean up old partition echo_log "Cleaning up $slice" - rc_halt "dd if=/dev/zero of=/dev/${DISK}s${slicenum} count=1024" + rc_halt "dd if=/dev/zero of=${DISK}s${slicenum} count=1024" sleep 1 @@ -734,7 +757,7 @@ run_gpart_slice() fi # Set the slice to the format we'll be using for gpart later - slice="${1}-${3}-mbr" + slice=`echo "${1}:${3}:mbr" | sed 's|/|-|g'` # Lets save our slice, so we know what to look for in the config file later on if [ -z "$WORKINGSLICES" ] @@ -811,7 +834,7 @@ run_gpart_free() sleep 2 echo_log "Cleaning up $slice" - rc_halt "dd if=/dev/zero of=/dev/${slice} count=1024" + rc_halt "dd if=/dev/zero of=${slice} count=1024" sleep 1 @@ -821,7 +844,7 @@ run_gpart_free() rc_halt "gpart bootcode -b /boot/boot0 ${DISK}" fi - slice="${DISK}-${SLICENUM}-mbr" + slice=`echo "${DISK}:${SLICENUM}:mbr" | sed 's|/|-|g'` # Lets save our slice, so we know what to look for in the config file later on if [ -z "$WORKINGSLICES" ] then Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -84,9 +84,9 @@ mount_partition() mkdir -p ${FSMNT}${MNTPOINT} >>${LOGOUT} 2>>${LOGOUT} fi - echo_log "mount ${MNTFLAGS} /dev/${PART} -> ${FSMNT}${MNTPOINT}" + echo_log "mount ${MNTFLAGS} ${PART} -> ${FSMNT}${MNTPOINT}" sleep 2 - rc_halt "mount ${MNTFLAGS} /dev/${PART} ${FSMNT}${MNTPOINT}" + rc_halt "mount ${MNTFLAGS} ${PART} ${FSMNT}${MNTPOINT}" fi }; @@ -101,9 +101,10 @@ mount_all_filesystems() ######################################################### for PART in `ls ${PARTDIR}` do - if [ ! -e "/dev/${PART}" ] + PARTDEV=`echo $PART | sed 's|-|/|g'` + if [ ! -e "${PARTDEV}" ] then - exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?" + exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" @@ -122,12 +123,12 @@ mount_all_filesystems() if [ "$?" = "0" -o "$PARTMNT" = "/" ] then case ${PARTFS} in - UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; - ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;; - IMAGE) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;; + UFS) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+S) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+SUJ) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+J) mount_partition ${PARTDEV}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; + ZFS) mount_partition ${PARTDEV} ${PARTFS} ${PARTMNT} ;; + IMAGE) mount_partition ${PARTDEV} ${PARTFS} ${PARTMNT} ;; *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;; esac fi @@ -137,9 +138,10 @@ mount_all_filesystems() ################################################################## for PART in `ls ${PARTDIR}` do - if [ ! -e "/dev/${PART}" ] + PARTDEV=`echo $PART | sed 's|-|/|g'` + if [ ! -e "${PARTDEV}" ] then - exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?" + exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" @@ -158,23 +160,23 @@ mount_all_filesystems() if [ "$?" != "0" -a "$PARTMNT" != "/" ] then case ${PARTFS} in - UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; - UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; - ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;; + UFS) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+S) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+SUJ) mount_partition ${PARTDEV}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+J) mount_partition ${PARTDEV}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; + ZFS) mount_partition ${PARTDEV} ${PARTFS} ${PARTMNT} ;; SWAP) # Lets enable this swap now if [ "$PARTENC" = "ON" ] then - echo_log "Enabling encrypted swap on /dev/${PART}" - rc_halt "geli onetime -d -e 3des ${PART}" + echo_log "Enabling encrypted swap on ${PARTDEV}" + rc_halt "geli onetime -d -e 3des ${PARTDEV}" sleep 5 - rc_halt "swapon /dev/${PART}.eli" + rc_halt "swapon ${PARTDEV}.eli" else - echo_log "swapon ${PART}" + echo_log "swapon ${PARTDEV}" sleep 5 - rc_halt "swapon /dev/${PART}" + rc_halt "swapon ${PARTDEV}" fi ;; IMAGE) @@ -182,7 +184,7 @@ mount_all_filesystems() then mkdir -p "${PARTMNT}" fi - mount_partition ${PART} ${PARTFS} ${PARTMNT} + mount_partition ${PARTDEV} ${PARTFS} ${PARTMNT} ;; *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;; esac Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -68,8 +68,8 @@ setup_zfs_filesystem() echo_log "Setting up ZFS boot loader support" rc_halt "zpool set bootfs=${ZPOOLNAME} ${ZPOOLNAME}" rc_halt "zpool export ${ZPOOLNAME}" - rc_halt "dd if=/boot/zfsboot of=/dev/${ROOTSLICE} count=1" - rc_halt "dd if=/boot/zfsboot of=/dev/${PART}${EXT} skip=1 seek=1024" + rc_halt "dd if=/boot/zfsboot of=${ROOTSLICE} count=1" + rc_halt "dd if=/boot/zfsboot of=${PART}${EXT} skip=1 seek=1024" rc_halt "zpool import ${ZPOOLNAME}" fi fi @@ -89,9 +89,10 @@ setup_filesystems() # newfs on any of them for PART in `ls ${PARTDIR}` do - if [ ! -e "/dev/${PART}" ] + PARTDEV="`echo $PART | sed 's|-|/|g'`" + if [ ! -e "${PARTDEV}" ] then - exit_err "ERROR: The partition ${PART} does not exist. Failure in bsdlabel?" + exit_err "ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel?" fi PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" @@ -103,19 +104,29 @@ setup_filesystems() PARTIMAGE="`cat ${PARTDIR}/${PART} | cut -d ':' -f 7`" # Make sure journaling isn't enabled on this device - if [ -e "/dev/${PART}.journal" ] + if [ -e "${PARTDEV}.journal" ] then - rc_nohalt "gjournal stop -f ${PART}.journal" - rc_nohalt "gjournal clear ${PART}" + rc_nohalt "gjournal stop -f ${PARTDEV}.journal" + rc_nohalt "gjournal clear ${PARTDEV}" fi # Setup encryption if necessary if [ "${PARTENC}" = "ON" -a "${PARTFS}" != "SWAP" ] then - echo_log "Creating geli provider for ${PART}" - rc_halt "dd if=/dev/random of=${GELIKEYDIR}/${PART}.key bs=64 count=1" - rc_halt "geli init -b -s 4096 -P -K ${GELIKEYDIR}/${PART}.key /dev/${PART}" - rc_halt "geli attach -p -k ${GELIKEYDIR}/${PART}.key /dev/${PART}" + echo_log "Creating geli provider for ${PARTDEV}" + + if [ -e "${PARTDIR}-enc/${PART}-encpass" ] ; then + # Using a passphrase + rc_halt "dd if=/dev/random of=${GELIKEYDIR}/${PART}.key bs=64 count=1" + rc_halt "geli init -J ${PARTDIR}-enc/${PART}-encpass ${PARTDEV}" + rc_halt "geli attach -j ${PARTDIR}-enc/${PART}-encpass ${PARTDEV}" + else + # No Encryption password, use key file + rc_halt "dd if=/dev/random of=${GELIKEYDIR}/${PART}.key bs=64 count=1" + rc_halt "geli init -b -s 4096 -P -K ${GELIKEYDIR}/${PART}.key ${PARTDEV}" + rc_halt "geli attach -p -k ${GELIKEYDIR}/${PART}.key ${PARTDEV}" + + fi EXT=".eli" else @@ -125,12 +136,12 @@ setup_filesystems() case ${PARTFS} in UFS) - echo_log "NEWFS: /dev/${PART} - ${PARTFS}" + echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs /dev/${PART}${EXT}" + rc_halt "newfs ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" - rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" + rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" rc_halt "sync" # Set flag that we've found a boot partition @@ -141,12 +152,12 @@ setup_filesystems() ;; UFS+S) - echo_log "NEWFS: /dev/${PART} - ${PARTFS}" + echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs -U /dev/${PART}${EXT}" + rc_halt "newfs -U ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" - rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" + rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" rc_halt "sync" # Set flag that we've found a boot partition if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then @@ -156,15 +167,15 @@ setup_filesystems() ;; UFS+SUJ) - echo_log "NEWFS: /dev/${PART} - ${PARTFS}" + echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs -U /dev/${PART}${EXT}" + rc_halt "newfs -U ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" - rc_halt "tunefs -j enable /dev/${PART}${EXT}" + rc_halt "tunefs -j enable ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" - rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" + rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" rc_halt "sync" # Set flag that we've found a boot partition if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then @@ -175,16 +186,16 @@ setup_filesystems() UFS+J) - echo_log "NEWFS: /dev/${PART} - ${PARTFS}" + echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs /dev/${PART}${EXT}" + rc_halt "newfs ${PARTDEV}${EXT}" sleep 2 - rc_halt "gjournal label -f /dev/${PART}${EXT}" + rc_halt "gjournal label -f ${PARTDEV}${EXT}" sleep 2 - rc_halt "newfs -O 2 -J /dev/${PART}${EXT}.journal" + rc_halt "newfs -O 2 -J ${PARTDEV}${EXT}.journal" sleep 2 rc_halt "sync" - rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal" + rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}.journal" rc_halt "sync" # Set flag that we've found a boot partition if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then @@ -194,19 +205,19 @@ setup_filesystems() ;; ZFS) - echo_log "NEWFS: /dev/${PART} - ${PARTFS}" - setup_zfs_filesystem "${PART}" "${PARTFS}" "${PARTMNT}" "${EXT}" "${PARTGEOM}" "${PARTXTRAOPTS}" + echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" + setup_zfs_filesystem "${PARTDEV}" "${PARTFS}" "${PARTMNT}" "${EXT}" "${PARTGEOM}" "${PARTXTRAOPTS}" ;; SWAP) rc_halt "sync" - rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" + rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" rc_halt "sync" sleep 2 ;; IMAGE) - write_image "${PARTIMAGE}" "${PART}" + write_image "${PARTIMAGE}" "${PARTDEV}" sleep 2 ;; Modified: head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions-unmount.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -42,7 +42,7 @@ umount_all_dir() start_gmirror_sync() { - cd ${MIRRORCFGDIR} + cd ${MIRRORCFGDIR} for DISK in `ls *` do MIRRORDISK="`cat ${DISK} | cut -d ':' -f 1`" @@ -50,6 +50,7 @@ start_gmirror_sync() MIRRORNAME="`cat ${DISK} | cut -d ':' -f 3`" # Start the mirroring service + rc_nohalt "gmirror forget ${MIRRORNAME}" rc_halt "gmirror insert ${MIRRORNAME} /dev/${MIRRORDISK}" done @@ -70,7 +71,7 @@ unmount_all_filesystems() ################################################################## for PART in `ls ${PARTDIR}` do - + PARTDEV=`echo $PART | sed 's|-|/|g'` PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" @@ -83,24 +84,24 @@ unmount_all_filesystems() EXT="" fi - #if [ "${PARTFS}" = "SWAP" ] - #then - # rc_nohalt "swapoff /dev/${PART}${EXT}" - #fi + if [ "${PARTFS}" = "SWAP" ] + then + rc_nohalt "swapoff ${PARTDEV}${EXT}" + fi # Check if we've found "/", and unmount that last if [ "$PARTMNT" != "/" -a "${PARTMNT}" != "none" -a "${PARTFS}" != "ZFS" ] then - rc_halt "umount -f /dev/${PART}${EXT}" + rc_halt "umount -f ${PARTDEV}${EXT}" # Re-check if we are missing a label for this device and create it again if so if [ ! -e "/dev/label/${PARTLABEL}" ] then case ${PARTFS} in - UFS) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; - UFS+S) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; - UFS+SUJ) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; - UFS+J) glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal ;; + UFS) glabel label ${PARTLABEL} ${PARTDEV}${EXT} ;; + UFS+S) glabel label ${PARTLABEL} ${PARTDEV}${EXT} ;; + UFS+SUJ) glabel label ${PARTLABEL} ${PARTDEV}${EXT} ;; + UFS+J) glabel label ${PARTLABEL} ${PARTDEV}${EXT}.journal ;; *) ;; esac fi @@ -112,10 +113,10 @@ unmount_all_filesystems() if [ ! -e "/dev/label/${PARTLABEL}" ] then case ${PARTFS} in - UFS) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; - UFS+S) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; - UFS+SUJ) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; - UFS+J) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal" ;; + UFS) ROOTRELABEL="glabel label ${PARTLABEL} ${PARTDEV}${EXT}" ;; + UFS+S) ROOTRELABEL="glabel label ${PARTLABEL} ${PARTDEV}${EXT}" ;; + UFS+SUJ) ROOTRELABEL="glabel label ${PARTLABEL} ${PARTDEV}${EXT}" ;; + UFS+J) ROOTRELABEL="glabel label ${PARTLABEL} ${PARTDEV}${EXT}.journal" ;; *) ;; esac fi @@ -166,25 +167,25 @@ unmount_all_filesystems_failure() then for PART in `ls ${PARTDIR}` do - + PARTDEV=`echo $PART | sed 's|-|/|g'` PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`" PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`" PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`" - #if [ "${PARTFS}" = "SWAP" ] - #then - # if [ "${PARTENC}" = "ON" ] - # then - # rc_nohalt "swapoff /dev/${PART}.eli" - # else - # rc_nohalt "swapoff /dev/${PART}" - # fi - #fi + if [ "${PARTFS}" = "SWAP" ] + then + if [ "${PARTENC}" = "ON" ] + then + rc_nohalt "swapoff ${PARTDEV}.eli" + else + rc_nohalt "swapoff ${PARTDEV}" + fi + fi # Check if we've found "/" again, don't need to mount it twice if [ "$PARTMNT" != "/" -a "${PARTMNT}" != "none" -a "${PARTFS}" != "ZFS" ] then - rc_nohalt "umount -f /dev/${PART}" + rc_nohalt "umount -f ${PARTDEV}" rc_nohalt "umount -f ${FSMNT}${PARTMNT}" fi done Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions.sh Thu Apr 21 03:59:37 2011 (r220908) +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Thu Apr 21 06:25:12 2011 (r220909) @@ -277,6 +277,7 @@ get_zpool_name() # Need to generate a zpool name for this device NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` NEWNAME="${BASENAME}${NUM}" + mkdir -p ${TMPDIR}/.zpools/`dirname $DEVICE` echo "$NEWNAME" >${TMPDIR}/.zpools/${DEVICE} echo "${NEWNAME}" return From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 07:14:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEC181065673; Thu, 21 Apr 2011 07:14:10 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A474F8FC12; Thu, 21 Apr 2011 07:14: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 p3L7EAmT084866; Thu, 21 Apr 2011 07:14:10 GMT (envelope-from gordon@svn.freebsd.org) Received: (from gordon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L7EAlA084865; Thu, 21 Apr 2011 07:14:10 GMT (envelope-from gordon@svn.freebsd.org) Message-Id: <201104210714.p3L7EAlA084865@svn.freebsd.org> From: Gordon Tetlow Date: Thu, 21 Apr 2011 07:14: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: r220910 - head/gnu/usr.bin/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 07:14:10 -0000 Author: gordon Date: Thu Apr 21 07:14:10 2011 New Revision: 220910 URL: http://svn.freebsd.org/changeset/base/220910 Log: Remove GNU man implemenation now that the BSD version has cooked for a while. Deleted: head/gnu/usr.bin/man/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 07:26:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE5D11065670; Thu, 21 Apr 2011 07:26:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE8468FC15; Thu, 21 Apr 2011 07:26: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 p3L7QEvP085263; Thu, 21 Apr 2011 07:26:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L7QE1Y085261; Thu, 21 Apr 2011 07:26:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104210726.p3L7QE1Y085261@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Apr 2011 07:26: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: r220911 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 07:26:14 -0000 Author: mav Date: Thu Apr 21 07:26:14 2011 New Revision: 220911 URL: http://svn.freebsd.org/changeset/base/220911 Log: Make PATA-like soft-reset in ata(4) more strict in checking disk signature. It allows to avoid false positive device detection under Xen, that caused long probe delays due to subsequent IDENTIFY command timeouts. MFC after: 1 month Modified: head/sys/dev/ata/ata-lowlevel.c Modified: head/sys/dev/ata/ata-lowlevel.c ============================================================================== --- head/sys/dev/ata/ata-lowlevel.c Thu Apr 21 07:14:10 2011 (r220910) +++ head/sys/dev/ata/ata-lowlevel.c Thu Apr 21 07:26:14 2011 (r220911) @@ -535,7 +535,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_MASTER; } - else if (stat0 & ATA_S_READY) { + else if (lsb == 0 && msb == 0 && (stat0 & ATA_S_READY)) { ch->devices |= ATA_ATA_MASTER; } } @@ -568,7 +568,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_SLAVE; } - else if (stat1 & ATA_S_READY) { + else if (lsb == 0 && msb == 0 && (stat1 & ATA_S_READY)) { ch->devices |= ATA_ATA_SLAVE; } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 08:13:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DE4106566C; Thu, 21 Apr 2011 08:13:44 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61BAA8FC1C; Thu, 21 Apr 2011 08: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 p3L8DiuY086719; Thu, 21 Apr 2011 08:13:44 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L8Div3086717; Thu, 21 Apr 2011 08:13:44 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104210813.p3L8Div3086717@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 21 Apr 2011 08:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220912 - 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: Thu, 21 Apr 2011 08:13:44 -0000 Author: glebius Date: Thu Apr 21 08:13:44 2011 New Revision: 220912 URL: http://svn.freebsd.org/changeset/base/220912 Log: Merge from head/ 220622: Revert r194662, since it breaks ng_ksocket(4) and may break other socket consumers with alternate sb_upcall. PR: kern/154676 Submitted by: Arnaud Lacombe Modified: stable/8/sys/kern/uipc_sockbuf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/8/sys/kern/uipc_sockbuf.c Thu Apr 21 07:26:14 2011 (r220911) +++ stable/8/sys/kern/uipc_sockbuf.c Thu Apr 21 08:13:44 2011 (r220912) @@ -528,9 +528,6 @@ sbappendstream_locked(struct sockbuf *sb SBLASTMBUFCHK(sb); - /* Remove all packet headers and mbuf tags to get a pure data chain. */ - m_demote(m, 1); - sbcompress(sb, m, sb->sb_mbtail); sb->sb_lastrecord = sb->sb_mb; From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 08:15:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AE11106566B; Thu, 21 Apr 2011 08:15:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09B7E8FC19; Thu, 21 Apr 2011 08:15: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 p3L8FT8I086819; Thu, 21 Apr 2011 08:15:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L8FTI6086817; Thu, 21 Apr 2011 08:15:29 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104210815.p3L8FTI6086817@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 21 Apr 2011 08:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220913 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 08:15:30 -0000 Author: glebius Date: Thu Apr 21 08:15:29 2011 New Revision: 220913 URL: http://svn.freebsd.org/changeset/base/220913 Log: Merge from head/ 220745: Fix error where error variable was assigned result of comparison, instead of function return value. Submitted by: Przemyslaw Frasunek Modified: stable/8/sys/netgraph/ng_base.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netgraph/ng_base.c ============================================================================== --- stable/8/sys/netgraph/ng_base.c Thu Apr 21 08:13:44 2011 (r220912) +++ stable/8/sys/netgraph/ng_base.c Thu Apr 21 08:15:29 2011 (r220913) @@ -596,7 +596,7 @@ ng_make_node(const char *typename, node_ */ if (type->constructor != NULL) { if ((error = ng_make_node_common(type, nodepp)) == 0) { - if ((error = ((*type->constructor)(*nodepp)) != 0)) { + if ((error = ((*type->constructor)(*nodepp))) != 0) { NG_NODE_UNREF(*nodepp); } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 08:18:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74E631065677; Thu, 21 Apr 2011 08:18:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6487A8FC16; Thu, 21 Apr 2011 08:18: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 p3L8ItG2087005; Thu, 21 Apr 2011 08:18:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L8ItDM087003; Thu, 21 Apr 2011 08:18:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104210818.p3L8ItDM087003@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 21 Apr 2011 08:18: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: r220914 - 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: Thu, 21 Apr 2011 08:18:55 -0000 Author: glebius Date: Thu Apr 21 08:18:55 2011 New Revision: 220914 URL: http://svn.freebsd.org/changeset/base/220914 Log: Use size_t for sopt_valsize. Submitted by: Brandon Gooch Modified: head/sys/netinet/ipfw/ip_fw_nat.c Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Thu Apr 21 08:15:29 2011 (r220913) +++ head/sys/netinet/ipfw/ip_fw_nat.c Thu Apr 21 08:18:55 2011 (r220914) @@ -346,7 +346,8 @@ ipfw_nat_cfg(struct sockopt *sopt) struct cfg_nat *cfg, *ptr; char *buf; struct ip_fw_chain *chain = &V_layer3_chain; - int gencnt, len, error = 0; + size_t len; + int gencnt, error = 0; len = sopt->sopt_valsize; buf = malloc(len, M_TEMP, M_WAITOK | M_ZERO); From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 08:20:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9DA106566B; Thu, 21 Apr 2011 08:20:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3AF8FC16; Thu, 21 Apr 2011 08:20:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3L8KvKZ087102; Thu, 21 Apr 2011 08:20:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L8Ku0S087100; Thu, 21 Apr 2011 08:20:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104210820.p3L8Ku0S087100@svn.freebsd.org> From: Adrian Chadd Date: Thu, 21 Apr 2011 08:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220915 - head/sys/dev/mwl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 08:20:57 -0000 Author: adrian Date: Thu Apr 21 08:20:56 2011 New Revision: 220915 URL: http://svn.freebsd.org/changeset/base/220915 Log: Convert to new ieee80211_mimo_info format. Modified: head/sys/dev/mwl/if_mwl.c Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Thu Apr 21 08:18:55 2011 (r220914) +++ head/sys/dev/mwl/if_mwl.c Thu Apr 21 08:20:56 2011 (r220915) @@ -2527,13 +2527,13 @@ mwl_node_getmimoinfo(const struct ieee80 if (mn->mn_ai.rssi_c > rssi_max) rssi_max = mn->mn_ai.rssi_c; - CVT(mi->rssi[0], mn->mn_ai.rssi_a); - CVT(mi->rssi[1], mn->mn_ai.rssi_b); - CVT(mi->rssi[2], mn->mn_ai.rssi_c); - - mi->noise[0] = mn->mn_ai.nf_a; - mi->noise[1] = mn->mn_ai.nf_b; - mi->noise[2] = mn->mn_ai.nf_c; + CVT(mi->rssi_ctl[0], mn->mn_ai.rssi_a); + CVT(mi->rssi_ctl[1], mn->mn_ai.rssi_b); + CVT(mi->rssi_ctl[2], mn->mn_ai.rssi_c); + + mi->noise_ctl[0] = mn->mn_ai.nf_a; + mi->noise_ctl[1] = mn->mn_ai.nf_b; + mi->noise_ctl[2] = mn->mn_ai.nf_c; #undef CVT } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 09:01:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20A5D1065670; Thu, 21 Apr 2011 09:01:44 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E41F8FC1A; Thu, 21 Apr 2011 09:01: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 p3L91hbg088355; Thu, 21 Apr 2011 09:01:43 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L91hp0088352; Thu, 21 Apr 2011 09:01:43 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104210901.p3L91hp0088352@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 21 Apr 2011 09:01: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: r220916 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 09:01:44 -0000 Author: pluknet Date: Thu Apr 21 09:01:43 2011 New Revision: 220916 URL: http://svn.freebsd.org/changeset/base/220916 Log: MFC r220621: Remove stale M_ZOMBIE malloc type. Modified: stable/8/sys/kern/kern_exit.c stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_exit.c ============================================================================== --- stable/8/sys/kern/kern_exit.c Thu Apr 21 08:20:56 2011 (r220915) +++ stable/8/sys/kern/kern_exit.c Thu Apr 21 09:01:43 2011 (r220916) @@ -93,9 +93,6 @@ SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, kernel, , exit, exit); SDT_PROBE_ARGTYPE(proc, kernel, , exit, 0, "int"); -/* Required to be non-static for SysVR4 emulator */ -MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); - /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Thu Apr 21 08:20:56 2011 (r220915) +++ stable/8/sys/sys/proc.h Thu Apr 21 09:01:43 2011 (r220916) @@ -660,7 +660,6 @@ MALLOC_DECLARE(M_PARGS); MALLOC_DECLARE(M_PGRP); MALLOC_DECLARE(M_SESSION); MALLOC_DECLARE(M_SUBPROC); -MALLOC_DECLARE(M_ZOMBIE); #endif #define FOREACH_PROC_IN_SYSTEM(p) \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 09:02:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B741106566C; Thu, 21 Apr 2011 09:02:20 +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 E3B8E8FC16; Thu, 21 Apr 2011 09:02: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 p3L92JMn088414; Thu, 21 Apr 2011 09:02:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L92JwO088412; Thu, 21 Apr 2011 09:02:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104210902.p3L92JwO088412@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Apr 2011 09:02: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: r220917 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 09:02:20 -0000 Author: mav Date: Thu Apr 21 09:02:19 2011 New Revision: 220917 URL: http://svn.freebsd.org/changeset/base/220917 Log: Use periodic status polling added at r214671 only in ATA_CAM mode. Legacy mode won't receive much benefit from it due to its hot-plug limitations. Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Apr 21 09:01:43 2011 (r220916) +++ head/sys/dev/ata/ata-all.c Thu Apr 21 09:02:19 2011 (r220917) @@ -83,7 +83,9 @@ static void bswap(int8_t *, int); static void btrim(int8_t *, int); static void bpack(int8_t *, int8_t *, int); static void ata_interrupt_locked(void *data); +#ifdef ATA_CAM static void ata_periodic_poll(void *data); +#endif /* global vars */ MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer"); @@ -178,8 +180,8 @@ ata_attach(device_t dev) if (ch->pm_level > 1) ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; } -#endif callout_init(&ch->poll_callout, 1); +#endif /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) @@ -207,8 +209,6 @@ ata_attach(device_t dev) device_printf(dev, "unable to setup interrupt\n"); return error; } - if (ch->flags & ATA_PERIODIC_POLL) - callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); #ifndef ATA_CAM /* probe and attach devices on this channel unless we are in early boot */ @@ -216,6 +216,8 @@ ata_attach(device_t dev) ata_identify(dev); return (0); #else + if (ch->flags & ATA_PERIODIC_POLL) + callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); mtx_lock(&ch->state_mtx); /* Create the device queue for our SIM. */ devq = cam_simq_alloc(1); @@ -278,8 +280,10 @@ ata_detach(device_t dev) mtx_lock(&ch->state_mtx); ch->state |= ATA_STALL_QUEUE; mtx_unlock(&ch->state_mtx); +#ifdef ATA_CAM if (ch->flags & ATA_PERIODIC_POLL) callout_drain(&ch->poll_callout); +#endif #ifndef ATA_CAM /* detach & delete all children */ @@ -467,9 +471,9 @@ ata_suspend(device_t dev) if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - if (ch->flags & ATA_PERIODIC_POLL) - callout_drain(&ch->poll_callout); #ifdef ATA_CAM + if (ch->flags & ATA_PERIODIC_POLL) + callout_drain(&ch->poll_callout); mtx_lock(&ch->state_mtx); xpt_freeze_simq(ch->sim, 1); while (ch->state != ATA_IDLE) @@ -507,14 +511,14 @@ ata_resume(device_t dev) error = ata_reinit(dev); xpt_release_simq(ch->sim, TRUE); mtx_unlock(&ch->state_mtx); + if (ch->flags & ATA_PERIODIC_POLL) + callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); #else /* reinit the devices, we dont know what mode/state they are in */ error = ata_reinit(dev); /* kick off requests on the queue */ ata_start(dev); #endif - if (ch->flags & ATA_PERIODIC_POLL) - callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); return error; } @@ -581,6 +585,7 @@ ata_interrupt_locked(void *data) #endif } +#ifdef ATA_CAM static void ata_periodic_poll(void *data) { @@ -589,6 +594,7 @@ ata_periodic_poll(void *data) callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); ata_interrupt(ch); } +#endif void ata_print_cable(device_t dev, u_int8_t *who) From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 09:03:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F18E91065675; Thu, 21 Apr 2011 09:03:48 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7238FC12; Thu, 21 Apr 2011 09:03: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 p3L93mSd088505; Thu, 21 Apr 2011 09:03:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L93m92088502; Thu, 21 Apr 2011 09:03:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104210903.p3L93m92088502@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 21 Apr 2011 09:03:48 +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: r220918 - in stable/7/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 09:03:49 -0000 Author: pluknet Date: Thu Apr 21 09:03:48 2011 New Revision: 220918 URL: http://svn.freebsd.org/changeset/base/220918 Log: MFC r220621: Remove stale M_ZOMBIE malloc type. Modified: stable/7/sys/kern/kern_exit.c stable/7/sys/sys/proc.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_exit.c ============================================================================== --- stable/7/sys/kern/kern_exit.c Thu Apr 21 09:02:19 2011 (r220917) +++ stable/7/sys/kern/kern_exit.c Thu Apr 21 09:03:48 2011 (r220918) @@ -94,9 +94,6 @@ SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, kernel, , exit); SDT_PROBE_ARGTYPE(proc, kernel, , exit, 0, "int"); -/* Required to be non-static for SysVR4 emulator */ -MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); - /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); Modified: stable/7/sys/sys/proc.h ============================================================================== --- stable/7/sys/sys/proc.h Thu Apr 21 09:02:19 2011 (r220917) +++ stable/7/sys/sys/proc.h Thu Apr 21 09:03:48 2011 (r220918) @@ -680,7 +680,6 @@ MALLOC_DECLARE(M_PARGS); MALLOC_DECLARE(M_PGRP); MALLOC_DECLARE(M_SESSION); MALLOC_DECLARE(M_SUBPROC); -MALLOC_DECLARE(M_ZOMBIE); #endif #define FOREACH_PROC_IN_SYSTEM(p) \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 09:34:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25002106566C; Thu, 21 Apr 2011 09:34:45 +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 094348FC0A; Thu, 21 Apr 2011 09: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 p3L9Yi3V089481; Thu, 21 Apr 2011 09:34:44 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3L9YiTP089478; Thu, 21 Apr 2011 09:34:44 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104210934.p3L9YiTP089478@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 21 Apr 2011 09:34: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: r220919 - stable/8/sbin/conscontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 09:34:45 -0000 Author: ru Date: Thu Apr 21 09:34:44 2011 New Revision: 220919 URL: http://svn.freebsd.org/changeset/base/220919 Log: MFC r220801: Changed "conscontrol unset" to accept an existing virtual console device as an argument. Unsetting virtual console using /dev/console seems to have never worked. Modified: stable/8/sbin/conscontrol/conscontrol.8 stable/8/sbin/conscontrol/conscontrol.c Directory Properties: stable/8/sbin/conscontrol/ (props changed) Modified: stable/8/sbin/conscontrol/conscontrol.8 ============================================================================== --- stable/8/sbin/conscontrol/conscontrol.8 Thu Apr 21 09:03:48 2011 (r220918) +++ stable/8/sbin/conscontrol/conscontrol.8 Thu Apr 21 09:34:44 2011 (r220919) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2001 +.Dd April 14, 2011 .Dt CONSCONTROL 8 .Os .Sh NAME @@ -40,7 +40,7 @@ .Cm add | delete .Ar console .Nm -.Cm set Ar console | Cm unset +.Cm set | unset Ar console .Sh DESCRIPTION The .Nm @@ -91,7 +91,7 @@ the name of the directory may be omitted Change the state of console muting. All console output is suppressed when console muting is .Cm on . -.It Cm set Ar console | Cm unset +.It Cm set | unset Ar console Set or unset the virtual console. When unset, output from the system, such as the kernel .Xr printf 9 , Modified: stable/8/sbin/conscontrol/conscontrol.c ============================================================================== --- stable/8/sbin/conscontrol/conscontrol.c Thu Apr 21 09:03:48 2011 (r220918) +++ stable/8/sbin/conscontrol/conscontrol.c Thu Apr 21 09:34:44 2011 (r220919) @@ -50,7 +50,7 @@ usage(void) "usage: conscontrol [list]", " conscontrol mute on | off", " conscontrol add | delete console", - " conscontrol set console | unset"); + " conscontrol set | unset console"); exit(1); } @@ -153,28 +153,16 @@ consdel(char *devnam) } static void -consset(char *devnam) +consset(char *devnam, int flag) { - int ttyfd, flag = 1; + int ttyfd; ttyfd = open(devnam, O_RDONLY); if (ttyfd == -1) err(1, "opening %s", devnam); if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not set %s as virtual console", devnam); - close(ttyfd); -} - -static void -consunset(void) -{ - int ttyfd, flag = 0; - - ttyfd = open(DEVDIR "console", O_RDONLY); - if (ttyfd == -1) - err(1, "opening virtual console"); - if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not unset virtual console"); + err(1, "could not %s %s as virtual console", + flag ? "set" : "unset", devnam); close(ttyfd); } @@ -188,9 +176,7 @@ main(int argc, char **argv) argv += optind; if (argc > 0 && strcmp(argv[0], "list") != 0) { - if (argc == 1 && strcmp(argv[0], "unset") == 0) - consunset(); - else if (argc != 2) + if (argc != 2) usage(); else if (strcmp(argv[0], "mute") == 0) consmute(argv[1]); @@ -199,7 +185,9 @@ main(int argc, char **argv) else if (strcmp(argv[0], "delete") == 0) consdel(argv[1]); else if (strcmp(argv[0], "set") == 0) - consset(argv[1]); + consset(argv[1], 1); + else if (strcmp(argv[0], "unset") == 0) + consset(argv[1], 0); else usage(); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 10:33:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA7D11065679; Thu, 21 Apr 2011 10:33:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 044EE8FC15; Thu, 21 Apr 2011 10:33:05 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3LAX0ef074344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Apr 2011 13:33:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3LAX0KG004987; Thu, 21 Apr 2011 13:33:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3LAX0R2004986; Thu, 21 Apr 2011 13:33:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 21 Apr 2011 13:33:00 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20110421103300.GK48734@deviant.kiev.zoral.com.ua> References: <201104202325.p3KNPIK6070781@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b/6gol1SqNxk8K3i" Content-Disposition: inline In-Reply-To: <201104202325.p3KNPIK6070781@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220906 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 10:33:06 -0000 --b/6gol1SqNxk8K3i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2011 at 11:25:18PM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Wed Apr 20 23:25:18 2011 > New Revision: 220906 > URL: http://svn.freebsd.org/changeset/base/220906 >=20 > Log: > Add a check for VI_DOOMED at the beginning of nfscl_request() > so that it won't try and use vp->v_mount to do an RPC during > a forced dismount. There needs to be at least one more kernel > commit, plus a change to the umount(8) command before forced > dismounts will work for the experimental NFS client. > =20 > MFC after: 2 weeks >=20 > Modified: > head/sys/fs/nfsclient/nfs_clport.c >=20 > Modified: head/sys/fs/nfsclient/nfs_clport.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/fs/nfsclient/nfs_clport.c Wed Apr 20 23:20:00 2011 (r220905) > +++ head/sys/fs/nfsclient/nfs_clport.c Wed Apr 20 23:25:18 2011 (r220906) > @@ -819,6 +819,8 @@ nfscl_request(struct nfsrv_descript *nd, > int ret, vers; > struct nfsmount *nmp; > =20 > + if ((vp->v_iflag & VI_DOOMED) !=3D 0) > + return (EPERM); > nmp =3D VFSTONFS(vp->v_mount); > if (nd->nd_flag & ND_NFSV4) > vers =3D NFS_VER4; Is vnode lock held at this point ? If yes, I suggest to add ASSERT_VOP_{E,}LOCKED() assertion both to enforce the invariant, and to document the state to readers of the code. --b/6gol1SqNxk8K3i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2wB9wACgkQC3+MBN1Mb4i/BgCfSMLXRIF9fwGgyDx6Kth+eSdf Ja8AoM2Ec7eNjJrSMf8y8cPbvwNOPLAM =AzcF -----END PGP SIGNATURE----- --b/6gol1SqNxk8K3i-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 11:44:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC7A01065670; Thu, 21 Apr 2011 11:44: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 B18EA8FC0C; Thu, 21 Apr 2011 11:44: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 p3LBiGv5095017; Thu, 21 Apr 2011 11:44:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LBiGLO095014; Thu, 21 Apr 2011 11:44:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104211144.p3LBiGLO095014@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Apr 2011 11:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220920 - in head/sys/dev/ata: . chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 11:44:17 -0000 Author: mav Date: Thu Apr 21 11:44:16 2011 New Revision: 220920 URL: http://svn.freebsd.org/changeset/base/220920 Log: - Fix mapping of the last two SATA ports on 6-port Intel controllers. This improves hard-reset and hot-plug on these ports. - Device with ID 0x29218086 is a 2-port variant of ICH9 in legacy mode. Skip probing for nonexistent slave devices there. Modified: head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-intel.c Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Thu Apr 21 09:34:44 2011 (r220919) +++ head/sys/dev/ata/ata-pci.h Thu Apr 21 11:44:16 2011 (r220920) @@ -187,7 +187,7 @@ struct ata_pci_controller { #define ATA_I82801HBM_S2 0x28298086 #define ATA_I82801HBM_S3 0x282a8086 #define ATA_I82801IB_S1 0x29208086 -#define ATA_I82801IB_AH2 0x29218086 +#define ATA_I82801IB_S3 0x29218086 #define ATA_I82801IB_AH6 0x29228086 #define ATA_I82801IB_AH4 0x29238086 #define ATA_I82801IB_R1 0x29258086 Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Thu Apr 21 09:34:44 2011 (r220919) +++ head/sys/dev/ata/chipsets/ata-intel.c Thu Apr 21 11:44:16 2011 (r220920) @@ -140,7 +140,7 @@ ata_intel_probe(device_t dev) { ATA_I82801HBM_S3, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8M" }, { ATA_I82801IB_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, + { ATA_I82801IB_S3, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, @@ -336,7 +336,7 @@ ata_intel_ch_attach(device_t dev) } else if (ctlr->chip->cfg1 & INTEL_6CH2) { ch->flags |= ATA_SATA; ch->flags |= ATA_NO_SLAVE; - smap[0] = (ch->unit == 0) ? 4 : 5; + smap[0] = (ch->unit == 0) ? 0 : 1; smap[1] = 0; } else { map &= 0x03; From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 12:38:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADBFB106566C; Thu, 21 Apr 2011 12:38:12 +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 9D7738FC1B; Thu, 21 Apr 2011 12:38: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 p3LCcCd5096672; Thu, 21 Apr 2011 12:38:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LCcC1T096670; Thu, 21 Apr 2011 12:38:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104211238.p3LCcC1T096670@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Apr 2011 12:38: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: r220921 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 12:38:12 -0000 Author: rmacklem Date: Thu Apr 21 12:38:12 2011 New Revision: 220921 URL: http://svn.freebsd.org/changeset/base/220921 Log: Revert r220906, since the vp isn't always locked when nfscl_request() is called. It will need a more involved patch. Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 21 11:44:16 2011 (r220920) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 21 12:38:12 2011 (r220921) @@ -819,8 +819,6 @@ nfscl_request(struct nfsrv_descript *nd, int ret, vers; struct nfsmount *nmp; - if ((vp->v_iflag & VI_DOOMED) != 0) - return (EPERM); nmp = VFSTONFS(vp->v_mount); if (nd->nd_flag & ND_NFSV4) vers = NFS_VER4; From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 12:53:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C0B106564A; Thu, 21 Apr 2011 12:53:24 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 068868FC1C; Thu, 21 Apr 2011 12:53:23 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEANgnsE2DaFvO/2dsb2JhbACEUKFviHCqTJB7gSmBWYF3fQSOKw X-IronPort-AV: E=Sophos;i="4.64,251,1301889600"; d="scan'208";a="119088092" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 21 Apr 2011 08:53:22 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DCE61B3F38; Thu, 21 Apr 2011 08:53:22 -0400 (EDT) Date: Thu, 21 Apr 2011 08:53:22 -0400 (EDT) From: Rick Macklem To: Kostik Belousov Message-ID: <1922665091.396905.1303390402850.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110421103300.GK48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220906 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 12:53:24 -0000 > > Is vnode lock held at this point ? If yes, I suggest to add > ASSERT_VOP_{E,}LOCKED() assertion both to enforce the invariant, and > to document the state to readers of the code. Well, I thought it was always locked, but when I added the assertion it failed for an I/O RPC done by the nfsiod. So, I've reverted it and need to spend some time figuring out if I can lock the vnode safely for the I/O operations done by the nfsiod. Thanks for spotting this, rick From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 13:31:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02731065754; Thu, 21 Apr 2011 13: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 AE4398FC0C; Thu, 21 Apr 2011 13: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 p3LDVhDS098277; Thu, 21 Apr 2011 13: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 p3LDVhTi098268; Thu, 21 Apr 2011 13:31:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104211331.p3LDVhTi098268@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 21 Apr 2011 13: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: r220922 - in head/sys: geom/eli modules/geom/geom_eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 13:31:43 -0000 Author: pjd Date: Thu Apr 21 13:31:43 2011 New Revision: 220922 URL: http://svn.freebsd.org/changeset/base/220922 Log: Instead of allocating memory for all the keys at device attach, create reasonably large cache for the keys that is filled when needed. The previous version was problematic for very large providers (hundreds of terabytes or serval petabytes). Every terabyte of data needs around 256kB for keys. Make the default cache limit big enough to fit all the keys needed for 4TB providers, which will eat at most 1MB of memory. MFC after: 2 weeks Added: head/sys/geom/eli/g_eli_key_cache.c (contents, props changed) Modified: head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_ctl.c head/sys/geom/eli/g_eli_integrity.c head/sys/geom/eli/g_eli_key.c head/sys/geom/eli/g_eli_privacy.c head/sys/modules/geom/geom_eli/Makefile Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli.c Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -329,7 +329,7 @@ g_eli_newsession(struct g_eli_worker *wr crie.cri_klen = sc->sc_ekeylen; if (sc->sc_ealgo == CRYPTO_AES_XTS) crie.cri_klen <<= 1; - crie.cri_key = sc->sc_ekeys[0]; + crie.cri_key = sc->sc_ekey; if (sc->sc_flags & G_ELI_FLAG_AUTH) { bzero(&cria, sizeof(cria)); cria.cri_alg = sc->sc_aalgo; @@ -522,34 +522,6 @@ again: } /* - * Select encryption key. If G_ELI_FLAG_SINGLE_KEY is present we only have one - * key available for all the data. If the flag is not present select the key - * based on data offset. - */ -uint8_t * -g_eli_crypto_key(struct g_eli_softc *sc, off_t offset, size_t blocksize) -{ - u_int nkey; - - if (sc->sc_nekeys == 1) - return (sc->sc_ekeys[0]); - - KASSERT(sc->sc_nekeys > 1, ("%s: sc_nekeys=%u", __func__, - sc->sc_nekeys)); - KASSERT((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0, - ("%s: SINGLE_KEY flag set, but sc_nekeys=%u", __func__, - sc->sc_nekeys)); - - /* We switch key every 2^G_ELI_KEY_SHIFT blocks. */ - nkey = (offset >> G_ELI_KEY_SHIFT) / blocksize; - - KASSERT(nkey < sc->sc_nekeys, ("%s: nkey=%u >= sc_nekeys=%u", __func__, - nkey, sc->sc_nekeys)); - - return (sc->sc_ekeys[nkey]); -} - -/* * Here we generate IV. It is unique for every sector. */ void @@ -766,6 +738,7 @@ g_eli_create(struct gctl_req *req, struc bioq_init(&sc->sc_queue); mtx_init(&sc->sc_queue_mtx, "geli:queue", NULL, MTX_DEF); + mtx_init(&sc->sc_ekeys_lock, "geli:ekeys", NULL, MTX_DEF); pp = NULL; cp = g_new_consumer(gp); @@ -909,11 +882,7 @@ failed: } g_destroy_consumer(cp); g_destroy_geom(gp); - if (sc->sc_ekeys != NULL) { - bzero(sc->sc_ekeys, - sc->sc_nekeys * (sizeof(uint8_t *) + G_ELI_DATAKEYLEN)); - free(sc->sc_ekeys, M_ELI); - } + g_eli_key_destroy(sc); bzero(sc, sizeof(*sc)); free(sc, M_ELI); return (NULL); @@ -953,12 +922,7 @@ g_eli_destroy(struct g_eli_softc *sc, bo } mtx_destroy(&sc->sc_queue_mtx); gp->softc = NULL; - if (sc->sc_ekeys != NULL) { - /* The sc_ekeys field can be NULL is device is suspended. */ - bzero(sc->sc_ekeys, - sc->sc_nekeys * (sizeof(uint8_t *) + G_ELI_DATAKEYLEN)); - free(sc->sc_ekeys, M_ELI); - } + g_eli_key_destroy(sc); bzero(sc, sizeof(*sc)); free(sc, M_ELI); @@ -1191,6 +1155,11 @@ g_eli_dumpconf(struct sbuf *sb, const ch return; if (pp != NULL || cp != NULL) return; /* Nothing here. */ + + sbuf_printf(sb, "%s%ju", indent, + (uintmax_t)sc->sc_ekeys_total); + sbuf_printf(sb, "%s%ju", indent, + (uintmax_t)sc->sc_ekeys_allocated); sbuf_printf(sb, "%s", indent); if (sc->sc_flags == 0) sbuf_printf(sb, "NONE"); Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli.h Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,10 @@ #ifdef _KERNEL #include #include +#include +#include +#include +#include #include #else #include @@ -150,31 +154,35 @@ struct g_eli_worker { }; struct g_eli_softc { - struct g_geom *sc_geom; - u_int sc_crypto; - uint8_t sc_mkey[G_ELI_DATAIVKEYLEN]; - uint8_t **sc_ekeys; - u_int sc_nekeys; - u_int sc_ealgo; - u_int sc_ekeylen; - uint8_t sc_akey[G_ELI_AUTHKEYLEN]; - u_int sc_aalgo; - u_int sc_akeylen; - u_int sc_alen; - SHA256_CTX sc_akeyctx; - uint8_t sc_ivkey[G_ELI_IVKEYLEN]; - SHA256_CTX sc_ivctx; - int sc_nkey; - uint32_t sc_flags; - int sc_inflight; - off_t sc_mediasize; - size_t sc_sectorsize; - u_int sc_bytes_per_sector; - u_int sc_data_per_sector; + struct g_geom *sc_geom; + u_int sc_crypto; + uint8_t sc_mkey[G_ELI_DATAIVKEYLEN]; + uint8_t sc_ekey[G_ELI_DATAKEYLEN]; + TAILQ_HEAD(, g_eli_key) sc_ekeys_queue; + RB_HEAD(g_eli_key_tree, g_eli_key) sc_ekeys_tree; + struct mtx sc_ekeys_lock; + uint64_t sc_ekeys_total; + uint64_t sc_ekeys_allocated; + u_int sc_ealgo; + u_int sc_ekeylen; + uint8_t sc_akey[G_ELI_AUTHKEYLEN]; + u_int sc_aalgo; + u_int sc_akeylen; + u_int sc_alen; + SHA256_CTX sc_akeyctx; + uint8_t sc_ivkey[G_ELI_IVKEYLEN]; + SHA256_CTX sc_ivctx; + int sc_nkey; + uint32_t sc_flags; + int sc_inflight; + off_t sc_mediasize; + size_t sc_sectorsize; + u_int sc_bytes_per_sector; + u_int sc_data_per_sector; /* Only for software cryptography. */ struct bio_queue_head sc_queue; - struct mtx sc_queue_mtx; + struct mtx sc_queue_mtx; LIST_HEAD(, g_eli_worker) sc_workers; }; #define sc_name sc_geom->name @@ -539,4 +547,11 @@ void g_eli_crypto_hmac_update(struct hma void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize); void g_eli_crypto_hmac(const uint8_t *hkey, size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize); + +#ifdef _KERNEL +void g_eli_key_init(struct g_eli_softc *sc); +void g_eli_key_destroy(struct g_eli_softc *sc); +uint8_t *g_eli_key_hold(struct g_eli_softc *sc, off_t offset, size_t blocksize); +void g_eli_key_drop(struct g_eli_softc *sc, uint8_t *rawkey); +#endif #endif /* !_G_ELI_H_ */ Modified: head/sys/geom/eli/g_eli_ctl.c ============================================================================== --- head/sys/geom/eli/g_eli_ctl.c Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli_ctl.c Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -739,10 +739,7 @@ g_eli_suspend_one(struct g_eli_softc *sc * Clear sensitive data on suspend, they will be recovered on resume. */ bzero(sc->sc_mkey, sizeof(sc->sc_mkey)); - bzero(sc->sc_ekeys, - sc->sc_nekeys * (sizeof(uint8_t *) + G_ELI_DATAKEYLEN)); - free(sc->sc_ekeys, M_ELI); - sc->sc_ekeys = NULL; + g_eli_key_destroy(sc); bzero(sc->sc_akey, sizeof(sc->sc_akey)); bzero(&sc->sc_akeyctx, sizeof(sc->sc_akeyctx)); bzero(sc->sc_ivkey, sizeof(sc->sc_ivkey)); Modified: head/sys/geom/eli/g_eli_integrity.c ============================================================================== --- head/sys/geom/eli/g_eli_integrity.c Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli_integrity.c Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -148,12 +148,13 @@ g_eli_auth_read_done(struct cryptop *crp if (bp->bio_error == 0) bp->bio_error = crp->crp_etype; } + sc = bp->bio_to->geom->softc; + g_eli_key_drop(sc, crp->crp_desc->crd_key); /* * Do we have all sectors already? */ if (bp->bio_inbed < bp->bio_children) return (0); - sc = bp->bio_to->geom->softc; if (bp->bio_error == 0) { u_int i, lsec, nsec, data_secsize, decr_secsize, encr_secsize; u_char *srcdata, *dstdata, *auth; @@ -272,12 +273,13 @@ g_eli_auth_write_done(struct cryptop *cr if (bp->bio_error == 0) bp->bio_error = crp->crp_etype; } + sc = bp->bio_to->geom->softc; + g_eli_key_drop(sc, crp->crp_desc->crd_key); /* * All sectors are already encrypted? */ if (bp->bio_inbed < bp->bio_children) return (0); - sc = bp->bio_to->geom->softc; if (bp->bio_error != 0) { G_ELI_LOGREQ(0, bp, "Crypto WRITE request failed (error=%d).", bp->bio_error); @@ -514,7 +516,7 @@ g_eli_auth_run(struct g_eli_worker *wr, if (bp->bio_cmd == BIO_WRITE) crde->crd_flags |= CRD_F_ENCRYPT; crde->crd_alg = sc->sc_ealgo; - crde->crd_key = g_eli_crypto_key(sc, dstoff, encr_secsize); + crde->crd_key = g_eli_key_hold(sc, dstoff, encr_secsize); crde->crd_klen = sc->sc_ekeylen; if (sc->sc_ealgo == CRYPTO_AES_XTS) crde->crd_klen <<= 1; Modified: head/sys/geom/eli/g_eli_key.c ============================================================================== --- head/sys/geom/eli/g_eli_key.c Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli_key.c Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -181,46 +181,6 @@ g_eli_mkey_encrypt(unsigned algo, const } #ifdef _KERNEL -static void -g_eli_ekeys_generate(struct g_eli_softc *sc) -{ - uint8_t *keys; - u_int kno; - off_t mediasize; - size_t blocksize; - struct { - char magic[4]; - uint8_t keyno[8]; - } __packed hmacdata; - - KASSERT((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0, - ("%s: G_ELI_FLAG_SINGLE_KEY flag present", __func__)); - - if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { - struct g_provider *pp; - - pp = LIST_FIRST(&sc->sc_geom->consumer)->provider; - mediasize = pp->mediasize; - blocksize = pp->sectorsize; - } else { - mediasize = sc->sc_mediasize; - blocksize = sc->sc_sectorsize; - } - sc->sc_nekeys = ((mediasize - 1) >> G_ELI_KEY_SHIFT) / blocksize + 1; - sc->sc_ekeys = - malloc(sc->sc_nekeys * (sizeof(uint8_t *) + G_ELI_DATAKEYLEN), - M_ELI, M_WAITOK); - keys = (uint8_t *)(sc->sc_ekeys + sc->sc_nekeys); - bcopy("ekey", hmacdata.magic, 4); - for (kno = 0; kno < sc->sc_nekeys; kno++, keys += G_ELI_DATAKEYLEN) { - sc->sc_ekeys[kno] = keys; - le64enc(hmacdata.keyno, (uint64_t)kno); - g_eli_crypto_hmac(sc->sc_mkey, G_ELI_MAXKEYLEN, - (uint8_t *)&hmacdata, sizeof(hmacdata), - sc->sc_ekeys[kno], 0); - } -} - /* * When doing encryption only, copy IV key and encryption key. * When doing encryption and authentication, copy IV key, generate encryption @@ -246,24 +206,8 @@ g_eli_mkey_propagate(struct g_eli_softc arc4rand(sc->sc_akey, sizeof(sc->sc_akey), 0); } - if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) { - sc->sc_nekeys = 1; - sc->sc_ekeys = malloc(sc->sc_nekeys * - (sizeof(uint8_t *) + G_ELI_DATAKEYLEN), M_ELI, M_WAITOK); - sc->sc_ekeys[0] = (uint8_t *)(sc->sc_ekeys + sc->sc_nekeys); - if ((sc->sc_flags & G_ELI_FLAG_AUTH) == 0) - bcopy(mkey, sc->sc_ekeys[0], G_ELI_DATAKEYLEN); - else { - /* - * The encryption key is: ekey = HMAC_SHA512(Master-Key, 0x10) - */ - g_eli_crypto_hmac(mkey, G_ELI_MAXKEYLEN, "\x10", 1, - sc->sc_ekeys[0], 0); - } - } else { - /* Generate all encryption keys. */ - g_eli_ekeys_generate(sc); - } + /* Initialize encryption keys. */ + g_eli_key_init(sc); if (sc->sc_flags & G_ELI_FLAG_AUTH) { /* Added: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/eli/g_eli_key_cache.c Thu Apr 21 13:31:43 2011 (r220922) @@ -0,0 +1,319 @@ +/*- + * Copyright (c) 2011 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +MALLOC_DECLARE(M_ELI); + +SYSCTL_DECL(_kern_geom_eli); +/* + * The default limit (8192 keys) will allow to cache all keys for 4TB + * provider with 512 bytes sectors and will take around 1MB of memory. + */ +static u_int g_eli_key_cache_limit = 8192; +TUNABLE_INT("kern.geom.eli.key_cache_limit", &g_eli_key_cache_limit); +SYSCTL_UINT(_kern_geom_eli, OID_AUTO, key_cache_limit, CTLFLAG_RDTUN, + &g_eli_key_cache_limit, 0, "Maximum number of encryption keys to cache"); +static uint64_t g_eli_key_cache_hits; +SYSCTL_UQUAD(_kern_geom_eli, OID_AUTO, key_cache_hits, CTLFLAG_RW, + &g_eli_key_cache_hits, 0, "Key cache hits"); +static uint64_t g_eli_key_cache_misses; +SYSCTL_UQUAD(_kern_geom_eli, OID_AUTO, key_cache_misses, CTLFLAG_RW, + &g_eli_key_cache_misses, 0, "Key cache misses"); + +struct g_eli_key { + /* Key value, must be first in the structure. */ + uint8_t gek_key[G_ELI_DATAKEYLEN]; + /* Key number. */ + uint64_t gek_keyno; + /* Reference counter. */ + int gek_count; + /* Keeps keys sorted by most recent use. */ + TAILQ_ENTRY(g_eli_key) gek_next; + /* Keeps keys sorted by number. */ + RB_ENTRY(g_eli_key) gek_link; +}; + +static int +g_eli_key_cmp(const struct g_eli_key *a, const struct g_eli_key *b) +{ + + if (a->gek_keyno > b->gek_keyno) + return (1); + else if (a->gek_keyno < b->gek_keyno) + return (-1); + return (0); +} + +RB_PROTOTYPE(g_eli_key_tree, g_eli_key, gek_link, g_eli_key_cmp); +RB_GENERATE(g_eli_key_tree, g_eli_key, gek_link, g_eli_key_cmp); + +static void +g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, uint64_t keyno) +{ + struct { + char magic[4]; + uint8_t keyno[8]; + } __packed hmacdata; + + bcopy("ekey", hmacdata.magic, 4); + le64enc(hmacdata.keyno, keyno); + g_eli_crypto_hmac(sc->sc_mkey, G_ELI_MAXKEYLEN, (uint8_t *)&hmacdata, + sizeof(hmacdata), key->gek_key, 0); + key->gek_keyno = keyno; + key->gek_count = 0; +} + +static struct g_eli_key * +g_eli_key_allocate(struct g_eli_softc *sc, uint64_t keyno) +{ + struct g_eli_key *key, *ekey, keysearch; + + mtx_assert(&sc->sc_ekeys_lock, MA_OWNED); + mtx_unlock(&sc->sc_ekeys_lock); + + key = malloc(sizeof(*key), M_ELI, M_WAITOK); + g_eli_key_fill(sc, key, keyno); + + mtx_lock(&sc->sc_ekeys_lock); + /* + * Recheck if the key wasn't added while we weren't holding the lock. + */ + keysearch.gek_keyno = keyno; + ekey = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); + if (ekey != NULL) { + bzero(key, sizeof(*key)); + key = ekey; + TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); + } else { + RB_INSERT(g_eli_key_tree, &sc->sc_ekeys_tree, key); + sc->sc_ekeys_allocated++; + } + TAILQ_INSERT_TAIL(&sc->sc_ekeys_queue, key, gek_next); + + return (key); +} + +static struct g_eli_key * +g_eli_key_find_last(struct g_eli_softc *sc) +{ + struct g_eli_key *key; + + mtx_assert(&sc->sc_ekeys_lock, MA_OWNED); + + TAILQ_FOREACH(key, &sc->sc_ekeys_queue, gek_next) { + if (key->gek_count == 0) + break; + } + + return (key); +} + +static void +g_eli_key_replace(struct g_eli_softc *sc, struct g_eli_key *key, uint64_t keyno) +{ + + mtx_assert(&sc->sc_ekeys_lock, MA_OWNED); + + RB_REMOVE(g_eli_key_tree, &sc->sc_ekeys_tree, key); + TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); + + KASSERT(key->gek_count == 0, ("gek_count=%d", key->gek_count)); + + g_eli_key_fill(sc, key, keyno); + + RB_INSERT(g_eli_key_tree, &sc->sc_ekeys_tree, key); + TAILQ_INSERT_TAIL(&sc->sc_ekeys_queue, key, gek_next); +} + +static void +g_eli_key_remove(struct g_eli_softc *sc, struct g_eli_key *key) +{ + + mtx_assert(&sc->sc_ekeys_lock, MA_OWNED); + + KASSERT(key->gek_count == 0, ("gek_count=%d", key->gek_count)); + + RB_REMOVE(g_eli_key_tree, &sc->sc_ekeys_tree, key); + TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); + sc->sc_ekeys_allocated--; + bzero(key, sizeof(*key)); + free(key, M_ELI); +} + +void +g_eli_key_init(struct g_eli_softc *sc) +{ + + mtx_lock(&sc->sc_ekeys_lock); + if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) { + uint8_t *mkey; + + mkey = sc->sc_mkey + sizeof(sc->sc_ivkey); + + sc->sc_ekeys_total = 1; + sc->sc_ekeys_allocated = 0; + if ((sc->sc_flags & G_ELI_FLAG_AUTH) == 0) + bcopy(mkey, sc->sc_ekey, G_ELI_DATAKEYLEN); + else { + /* + * The encryption key is: ekey = HMAC_SHA512(Master-Key, 0x10) + */ + g_eli_crypto_hmac(mkey, G_ELI_MAXKEYLEN, "\x10", 1, + sc->sc_ekey, 0); + } + } else { + off_t mediasize; + size_t blocksize; + + if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { + struct g_provider *pp; + + pp = LIST_FIRST(&sc->sc_geom->consumer)->provider; + mediasize = pp->mediasize; + blocksize = pp->sectorsize; + } else { + mediasize = sc->sc_mediasize; + blocksize = sc->sc_sectorsize; + } + sc->sc_ekeys_total = + ((mediasize - 1) >> G_ELI_KEY_SHIFT) / blocksize + 1; + sc->sc_ekeys_allocated = 0; + TAILQ_INIT(&sc->sc_ekeys_queue); + RB_INIT(&sc->sc_ekeys_tree); + } + mtx_unlock(&sc->sc_ekeys_lock); +} + +void +g_eli_key_destroy(struct g_eli_softc *sc) +{ + + mtx_lock(&sc->sc_ekeys_lock); + if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) { + bzero(sc->sc_ekey, sizeof(sc->sc_ekey)); + } else { + struct g_eli_key *key; + + while ((key = TAILQ_FIRST(&sc->sc_ekeys_queue)) != NULL) + g_eli_key_remove(sc, key); + TAILQ_INIT(&sc->sc_ekeys_queue); + RB_INIT(&sc->sc_ekeys_tree); + } + mtx_unlock(&sc->sc_ekeys_lock); +} + +/* + * Select encryption key. If G_ELI_FLAG_SINGLE_KEY is present we only have one + * key available for all the data. If the flag is not present select the key + * based on data offset. + */ +uint8_t * +g_eli_key_hold(struct g_eli_softc *sc, off_t offset, size_t blocksize) +{ + struct g_eli_key *key, keysearch; + uint64_t keyno; + + if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) + return (sc->sc_ekey); + + KASSERT(sc->sc_ekeys_total > 1, ("%s: sc_ekeys_total=%ju", __func__, + (uintmax_t)sc->sc_ekeys_total)); + KASSERT((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0, + ("%s: SINGLE_KEY flag set, but sc_ekeys_total=%ju", __func__, + (uintmax_t)sc->sc_ekeys_total)); + + /* We switch key every 2^G_ELI_KEY_SHIFT blocks. */ + keyno = (offset >> G_ELI_KEY_SHIFT) / blocksize; + + KASSERT(keyno < sc->sc_ekeys_total, + ("%s: keyno=%ju >= sc_ekeys_total=%ju", + __func__, (uintmax_t)keyno, (uintmax_t)sc->sc_ekeys_total)); + + keysearch.gek_keyno = keyno; + + mtx_lock(&sc->sc_ekeys_lock); + key = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); + if (key != NULL) { + g_eli_key_cache_hits++; + TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); + TAILQ_INSERT_TAIL(&sc->sc_ekeys_queue, key, gek_next); + } else { + /* + * No key in cache, find the least recently unreferenced key + * or allocate one if we haven't reached our limit yet. + */ + if (sc->sc_ekeys_allocated < g_eli_key_cache_limit) { + key = g_eli_key_allocate(sc, keyno); + } else { + g_eli_key_cache_misses++; + key = g_eli_key_find_last(sc); + if (key != NULL) { + g_eli_key_replace(sc, key, keyno); + } else { + /* All keys are referenced? Allocate one. */ + key = g_eli_key_allocate(sc, keyno); + } + } + } + key->gek_count++; + mtx_unlock(&sc->sc_ekeys_lock); + + return (key->gek_key); +} + +void +g_eli_key_drop(struct g_eli_softc *sc, uint8_t *rawkey) +{ + struct g_eli_key *key = (struct g_eli_key *)rawkey; + + if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) + return; + + mtx_lock(&sc->sc_ekeys_lock); + KASSERT(key->gek_count > 0, ("key->gek_count=%d", key->gek_count)); + key->gek_count--; + while (sc->sc_ekeys_allocated > g_eli_key_cache_limit) { + key = g_eli_key_find_last(sc); + if (key == NULL) + break; + g_eli_key_remove(sc, key); + } + mtx_unlock(&sc->sc_ekeys_lock); +} Modified: head/sys/geom/eli/g_eli_privacy.c ============================================================================== --- head/sys/geom/eli/g_eli_privacy.c Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/geom/eli/g_eli_privacy.c Thu Apr 21 13:31:43 2011 (r220922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2010 Pawel Jakub Dawidek + * Copyright (c) 2005-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -87,6 +87,8 @@ g_eli_crypto_read_done(struct cryptop *c if (bp->bio_error == 0) bp->bio_error = crp->crp_etype; } + sc = bp->bio_to->geom->softc; + g_eli_key_drop(sc, crp->crp_desc->crd_key); /* * Do we have all sectors already? */ @@ -102,7 +104,6 @@ g_eli_crypto_read_done(struct cryptop *c /* * Read is finished, send it up. */ - sc = bp->bio_to->geom->softc; g_io_deliver(bp, bp->bio_error); atomic_subtract_int(&sc->sc_inflight, 1); return (0); @@ -136,6 +137,9 @@ g_eli_crypto_write_done(struct cryptop * if (bp->bio_error == 0) bp->bio_error = crp->crp_etype; } + gp = bp->bio_to->geom; + sc = gp->softc; + g_eli_key_drop(sc, crp->crp_desc->crd_key); /* * All sectors are already encrypted? */ @@ -145,14 +149,12 @@ g_eli_crypto_write_done(struct cryptop * bp->bio_children = 1; cbp = bp->bio_driver1; bp->bio_driver1 = NULL; - gp = bp->bio_to->geom; if (bp->bio_error != 0) { G_ELI_LOGREQ(0, bp, "Crypto WRITE request failed (error=%d).", bp->bio_error); free(bp->bio_driver2, M_ELI); bp->bio_driver2 = NULL; g_destroy_bio(cbp); - sc = gp->softc; g_io_deliver(bp, bp->bio_error); atomic_subtract_int(&sc->sc_inflight, 1); return (0); @@ -307,12 +309,12 @@ g_eli_crypto_run(struct g_eli_worker *wr crd->crd_skip = 0; crd->crd_len = secsize; crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT; - if (sc->sc_nekeys > 1) + if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0) crd->crd_flags |= CRD_F_KEY_EXPLICIT; if (bp->bio_cmd == BIO_WRITE) crd->crd_flags |= CRD_F_ENCRYPT; crd->crd_alg = sc->sc_ealgo; - crd->crd_key = g_eli_crypto_key(sc, dstoff, secsize); + crd->crd_key = g_eli_key_hold(sc, dstoff, secsize); crd->crd_klen = sc->sc_ekeylen; if (sc->sc_ealgo == CRYPTO_AES_XTS) crd->crd_klen <<= 1; Modified: head/sys/modules/geom/geom_eli/Makefile ============================================================================== --- head/sys/modules/geom/geom_eli/Makefile Thu Apr 21 12:38:12 2011 (r220921) +++ head/sys/modules/geom/geom_eli/Makefile Thu Apr 21 13:31:43 2011 (r220922) @@ -8,6 +8,7 @@ SRCS+= g_eli_crypto.c SRCS+= g_eli_ctl.c SRCS+= g_eli_integrity.c SRCS+= g_eli_key.c +SRCS+= g_eli_key_cache.c SRCS+= g_eli_privacy.c SRCS+= pkcs5v2.c SRCS+= vnode_if.h From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 13:35:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B23ED106566B; Thu, 21 Apr 2011 13:35: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 8800A8FC1C; Thu, 21 Apr 2011 13:35: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 p3LDZKIY098425; Thu, 21 Apr 2011 13:35:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LDZKb0098423; Thu, 21 Apr 2011 13:35:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104211335.p3LDZKb0098423@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 21 Apr 2011 13:35: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: r220923 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 13:35:20 -0000 Author: pjd Date: Thu Apr 21 13:35:20 2011 New Revision: 220923 URL: http://svn.freebsd.org/changeset/base/220923 Log: If number of keys for the given provider doesn't exceed the limit, allocate all of them at attach time. This allows to avoid moving keys around in the most-recently-used queue and needs no mutex synchronization nor refcounting. MFC after: 2 weeks Modified: head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Thu Apr 21 13:31:43 2011 (r220922) +++ head/sys/geom/eli/g_eli_key_cache.c Thu Apr 21 13:35:20 2011 (r220923) @@ -217,6 +217,16 @@ g_eli_key_init(struct g_eli_softc *sc) sc->sc_ekeys_allocated = 0; TAILQ_INIT(&sc->sc_ekeys_queue); RB_INIT(&sc->sc_ekeys_tree); + if (sc->sc_ekeys_total <= g_eli_key_cache_limit) { + uint64_t keyno; + + for (keyno = 0; keyno < sc->sc_ekeys_total; keyno++) + (void)g_eli_key_allocate(sc, keyno); + KASSERT(sc->sc_ekeys_total == sc->sc_ekeys_allocated, + ("sc_ekeys_total=%ju != sc_ekeys_allocated=%ju", + (uintmax_t)sc->sc_ekeys_total, + (uintmax_t)sc->sc_ekeys_allocated)); + } } mtx_unlock(&sc->sc_ekeys_lock); } @@ -268,6 +278,13 @@ g_eli_key_hold(struct g_eli_softc *sc, o keysearch.gek_keyno = keyno; + if (sc->sc_ekeys_total == sc->sc_ekeys_allocated) { + /* We have all the keys, so avoid some overhead. */ + key = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); + KASSERT(key != NULL, ("No key %ju found.", (uintmax_t)keyno)); + return (key->gek_key); + } + mtx_lock(&sc->sc_ekeys_lock); key = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); if (key != NULL) { @@ -306,6 +323,9 @@ g_eli_key_drop(struct g_eli_softc *sc, u if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) return; + if (sc->sc_ekeys_total == sc->sc_ekeys_allocated) + return; + mtx_lock(&sc->sc_ekeys_lock); KASSERT(key->gek_count > 0, ("key->gek_count=%d", key->gek_count)); key->gek_count--; From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 14:17:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DB7E1065747; Thu, 21 Apr 2011 14:17:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C51E8FC0C; Thu, 21 Apr 2011 14:17: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 p3LEHaTD099711; Thu, 21 Apr 2011 14:17:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LEHarY099708; Thu, 21 Apr 2011 14:17:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104211417.p3LEHarY099708@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 21 Apr 2011 14:17: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: r220924 - in head/sys/boot/i386: gptzfsboot zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 14:17:36 -0000 Author: ae Date: Thu Apr 21 14:17:36 2011 New Revision: 220924 URL: http://svn.freebsd.org/changeset/base/220924 Log: Remove all object files during 'make clean'. MFC after: 1 week Modified: head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 21 13:35:20 2011 (r220923) +++ head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 21 14:17:36 2011 (r220924) @@ -63,7 +63,8 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o +CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ + drv.o gpt.o util.o gptzfsboot.bin: gptzfsboot.out objcopy -S -O binary gptzfsboot.out ${.TARGET} Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Thu Apr 21 13:35:20 2011 (r220923) +++ head/sys/boot/i386/zfsboot/Makefile Thu Apr 21 14:17:36 2011 (r220924) @@ -64,7 +64,8 @@ zfsldr.out: zfsldr.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ - zfsboot.o zfsboot.s zfsboot.s.tmp xreadorg.h sio.o + zfsboot.o zfsboot.s zfsboot.s.tmp xreadorg.h sio.o cons.o \ + drv.o util.o # We currently allow 65536 bytes for zfsboot - in practice it could be # any size up to 3.5Mb but keeping it fixed size simplifies zfsldr. From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 14:39:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7D69106564A; Thu, 21 Apr 2011 14:39:33 +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 9D0808FC19; Thu, 21 Apr 2011 14:39: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 p3LEdXgB000455; Thu, 21 Apr 2011 14:39:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LEdX5S000453; Thu, 21 Apr 2011 14:39:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104211439.p3LEdX5S000453@svn.freebsd.org> From: Attilio Rao Date: Thu, 21 Apr 2011 14:39: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: r220925 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 14:39:33 -0000 Author: attilio Date: Thu Apr 21 14:39:33 2011 New Revision: 220925 URL: http://svn.freebsd.org/changeset/base/220925 Log: Add some more bit definitions: - TCO_MESSAGEx: TCO specific regs providing the ability to monitor BIOS bootup activity. - TCO_NEWCENTURY: reporting RTC year roll over. - TCO_NMI2SMI_EN, TCO_NMI_NOW: controlling SMIs conversion to NMIs and NMI trigger. - SMI_GBL_EN: Enabling SMI delivery for all the northbridge controller. MFC after: 10 days Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Thu Apr 21 14:17:36 2011 (r220924) +++ head/sys/dev/ichwd/ichwd.h Thu Apr 21 14:39:33 2011 (r220925) @@ -181,15 +181,19 @@ struct ichwd_softc { #define TCO2_STS 0x06 /* TCO Status 2 */ #define TCO1_CNT 0x08 /* TCO Control 1 */ #define TCO2_CNT 0x08 /* TCO Control 2 */ +#define TCO_MESSAGE1 0x0c /* TCO Message 1 */ +#define TCO_MESSAGE2 0x0d /* TCO Message 2 */ /* bit definitions for SMI_EN and SMI_STS */ #define SMI_TCO_EN 0x2000 #define SMI_TCO_STS 0x2000 +#define SMI_GBL_EN 0x0001 /* timer value mask for TCO_RLD and TCO_TMR */ #define TCO_TIMER_MASK 0x1f /* status bits for TCO1_STS */ +#define TCO_NEWCENTURY 0x80 /* set for RTC year roll over (99 to 00) */ #define TCO_TIMEOUT 0x08 /* timed out */ #define TCO_INT_STS 0x04 /* data out (DO NOT USE) */ #define TCO_SMI_STS 0x02 /* data in (DO NOT USE) */ @@ -199,8 +203,10 @@ struct ichwd_softc { #define TCO_SECOND_TO_STS 0x02 /* ran down twice */ /* control bits for TCO1_CNT */ -#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ -#define TCO_CNT_PRESERVE 0x0200 /* preserve these bits */ +#define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ +#define TCO_NMI2SMI_EN 0x0200 /* convert NMIs to SMIs */ +#define TCO_CNT_PRESERVE TCO_NMI2SMI_EN /* preserve these bits */ +#define TCO_NMI_NOW 0x0100 /* trigger an NMI */ /* * Masks for the TCO timer value field in TCO_RLD. From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 16:31:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2BE2106564A; Thu, 21 Apr 2011 16:31:05 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A034B8FC0C; Thu, 21 Apr 2011 16:31: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 p3LGV5ug003879; Thu, 21 Apr 2011 16:31:05 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LGV50d003877; Thu, 21 Apr 2011 16:31:05 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104211631.p3LGV50d003877@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 21 Apr 2011 16: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: r220926 - head/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 16:31:05 -0000 Author: simon Date: Thu Apr 21 16:31:05 2011 New Revision: 220926 URL: http://svn.freebsd.org/changeset/base/220926 Log: Fix an old bug in newsyslog where we kept one log file more than was requested in newsyslog.conf. This was only the case using the non-time based filenames (.0, .1, .2 etc.). The change also makes newsyslog clean clean up the old extra logfile so users don't end up with a single stale logfile which won't be rotated out. This change also cleans up some code a bit to avoid more copy / paste code and removes some old copy / paste code in the process. PR: bin/76697 MFC after: 2 weeks Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Thu Apr 21 14:39:33 2011 (r220925) +++ head/usr.sbin/newsyslog/newsyslog.c Thu Apr 21 16:31:05 2011 (r220926) @@ -1592,6 +1592,43 @@ delete_oldest_timelog(const struct conf_ } /* + * Generate a log filename, when using clasic filenames. + */ +static void +gen_clasiclog_fname(char *fname, size_t fname_sz, const char *archive_dir, + const char *namepart, int numlogs_c) +{ + + if (archive_dir[0] != '\0') + (void) snprintf(fname, fname_sz, "%s/%s.%d", archive_dir, + namepart, numlogs_c); + else + (void) snprintf(fname, fname_sz, "%s.%d", namepart, numlogs_c); +} + +/* + * Delete a rotated logfiles, when using clasic filenames. + */ +static void +delete_clasiclog(const char *archive_dir, const char *namepart, int numlog_c) +{ + char file1[MAXPATHLEN], zfile1[MAXPATHLEN]; + int c; + + gen_clasiclog_fname(file1, sizeof(file1), archive_dir, namepart, + numlog_c); + + for (c = 0; c < COMPRESS_TYPES; c++) { + (void) snprintf(zfile1, sizeof(zfile1), "%s%s", file1, + compress_type[c].suffix); + if (noaction) + printf("\trm -f %s\n", zfile1); + else + (void) unlink(zfile1); + } +} + +/* * Only add to the queue if the file hasn't already been added. This is * done to prevent circular include loops. */ @@ -1655,7 +1692,6 @@ do_rotate(const struct conf_entry *ent) struct stat st; struct tm tm; time_t now; - int c; flags = ent->flags; free_or_keep = FREE_ENT; @@ -1685,35 +1721,29 @@ do_rotate(const struct conf_entry *ent) strlcpy(namepart, ent->log, sizeof(namepart)); else strlcpy(namepart, p + 1, sizeof(namepart)); - - /* name of oldest log */ - (void) snprintf(file1, sizeof(file1), "%s/%s.%d", dirpart, - namepart, ent->numlogs); } else { /* - * Tell delete_oldest_timelog() we are not using an - * archive dir. + * Tell utility functions we are not using an archive + * dir. */ dirpart[0] = '\0'; - - /* name of oldest log */ - (void) snprintf(file1, sizeof(file1), "%s.%d", ent->log, - ent->numlogs); + strlcpy(namepart, ent->log, sizeof(namepart)); } /* Delete old logs */ if (timefnamefmt != NULL) delete_oldest_timelog(ent, dirpart); else { - /* name of oldest log */ - for (c = 0; c < COMPRESS_TYPES; c++) { - (void) snprintf(zfile1, sizeof(zfile1), "%s%s", file1, - compress_type[c].suffix); - if (noaction) - printf("\trm -f %s\n", zfile1); - else - (void) unlink(zfile1); - } + /* + * Handle cleaning up after legacy newsyslog where we + * kept ent->numlogs + 1 files. This code can go away + * at some point in the future. + */ + delete_clasiclog(dirpart, namepart, ent->numlogs); + + if (ent->numlogs > 0) + delete_clasiclog(dirpart, namepart, ent->numlogs - 1); + } if (timefnamefmt != NULL) { @@ -1731,21 +1761,19 @@ do_rotate(const struct conf_entry *ent) ent->log, datetimestr); /* Don't run the code to move down logs */ - numlogs_c = 0; - } else - numlogs_c = ent->numlogs; /* copy for countdown */ + numlogs_c = -1; + } else { + gen_clasiclog_fname(file1, sizeof(file1), dirpart, namepart, + ent->numlogs - 1); + numlogs_c = ent->numlogs - 2; /* copy for countdown */ + } /* Move down log files */ - while (numlogs_c--) { - + for (; numlogs_c >= 0; numlogs_c--) { (void) strlcpy(file2, file1, sizeof(file2)); - if (archtodir) - (void) snprintf(file1, sizeof(file1), "%s/%s.%d", - dirpart, namepart, numlogs_c); - else - (void) snprintf(file1, sizeof(file1), "%s.%d", - ent->log, numlogs_c); + gen_clasiclog_fname(file1, sizeof(file1), dirpart, namepart, + numlogs_c); logfile_suffix = get_logfile_suffix(file1); if (logfile_suffix == NULL) From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 16:40:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12661065670; Thu, 21 Apr 2011 16:40:34 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE8D88FC0A; Thu, 21 Apr 2011 16:40: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 p3LGeYfb004181; Thu, 21 Apr 2011 16:40:34 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LGeYkc004179; Thu, 21 Apr 2011 16:40:34 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104211640.p3LGeYkc004179@svn.freebsd.org> From: "Simon L. Nielsen" Date: Thu, 21 Apr 2011 16:40: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: r220927 - head/tools/regression/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 16:40:34 -0000 Author: simon Date: Thu Apr 21 16:40:34 2011 New Revision: 220927 URL: http://svn.freebsd.org/changeset/base/220927 Log: Expand / correct newsyslog regression tests: - Test newslog with clasic naming of rotates files to actually test the correct number of log files as newsyslog now does the correct thing post r220926. - Add some more newsyslog tests which tests keeping 0, 1, and 2 logfiles. Modified: head/tools/regression/usr.sbin/newsyslog/regress.sh Modified: head/tools/regression/usr.sbin/newsyslog/regress.sh ============================================================================== --- head/tools/regression/usr.sbin/newsyslog/regress.sh Thu Apr 21 16:31:05 2011 (r220926) +++ head/tools/regression/usr.sbin/newsyslog/regress.sh Thu Apr 21 16:40:34 2011 (r220927) @@ -70,6 +70,27 @@ cknt() fi } +# Check if a file is there, depending of if it's suposed to or not - +# basically how many log files we are suposed to keep vs. how many we +# actually keep. +ckntfe() +{ + curcnt=$1 + keepcnt=$2 + f=$3 + + if [ $curcnt -le $keepcnt ] + then + #echo Assuming file there + ckfe $f + else + #echo Assuming file NOT there + cknt $f + fi +} + + + # A part of a test succeeds ok() { @@ -220,6 +241,74 @@ tests_normal_rotate() { tmpdir_clean } +tests_normal_rotate_keepn() { + cnt="$1" + ext="$2" + dir="$3" + + if [ -n "$dir" ]; then + newsyslog_args=" -a ${dir}" + name_postfix="${ext} archive dir" + else + newsyslog_args="" + name_postfix="${ext}" + fi + + tmpdir_create + + begin "create file ${name_postfix}" -newdir + run_newsyslog -C + ckfe $LOGFNAME + cknt ${dir}${LOGFNAME}.0${ext} + end + + begin "rotate normal 1 cnt=$cnt ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckntfe 1 $cnt ${dir}${LOGFNAME}.0${ext} + cknt ${dir}${LOGFNAME}.1${ext} + end + + begin "rotate normal 2 cnt=$cnt ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckntfe 1 $cnt ${dir}${LOGFNAME}.0${ext} + ckntfe 2 $cnt ${dir}${LOGFNAME}.1${ext} + cknt ${dir}${LOGFNAME}.2${ext} + end + + begin "rotate normal 3 cnt=$cnt ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckntfe 1 $cnt ${dir}${LOGFNAME}.0${ext} + ckntfe 2 $cnt ${dir}${LOGFNAME}.1${ext} + ckntfe 3 $cnt ${dir}${LOGFNAME}.2${ext} + cknt ${dir}${LOGFNAME}.3${ext} + end + + begin "rotate normal 3 cnt=$cnt ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckntfe 1 $cnt ${dir}${LOGFNAME}.0${ext} + ckntfe 2 $cnt ${dir}${LOGFNAME}.1${ext} + ckntfe 3 $cnt ${dir}${LOGFNAME}.2${ext} + ckntfe 4 $cnt ${dir}${LOGFNAME}.3${ext} + cknt ${dir}${LOGFNAME}.4${ext} + end + + # Wait a bit so we can see if the noaction test rotates files + sleep 1.1 + + begin "noaction ${name_postfix}" + osum=`md5 ${dir}${LOGFNAME} | tr -d '\n'` + run_newsyslog ${newsyslog_args} -n >/dev/null + ckfe ${LOGFNAME} + ckstr "$osum" "`md5 ${dir}${LOGFNAME} | tr -d '\n'`" + end + + tmpdir_clean +} + tests_time_rotate() { ext="$1" dir="$2" @@ -279,35 +368,57 @@ tests_time_rotate() { tmpdir_clean } -echo 1..78 +echo 1..126 mkdir -p ${TMPDIR} cd ${TMPDIR} LOGFNAME=foo.log LOGFPATH=${TMPDIR}/log/${LOGFNAME} +# Normal, no archive dir, keep X files +echo "$LOGFPATH 640 0 * @T00 NC" > newsyslog.conf +tests_normal_rotate_keepn 0 -# XXX for tests_normal_rotate it should be 3 instead of 2 count - but -# that's currently broken! +echo "$LOGFPATH 640 1 * @T00 NC" > newsyslog.conf +tests_normal_rotate_keepn 1 -# Normal, no archive dir echo "$LOGFPATH 640 2 * @T00 NC" > newsyslog.conf -tests_normal_rotate +tests_normal_rotate_keepn 2 + +echo "$LOGFPATH 640 3 * @T00 NC" > newsyslog.conf +tests_normal_rotate_keepn 3 + +# Normal, no archive dir, keep X files, gz +echo "$LOGFPATH 640 0 * @T00 NCZ" > newsyslog.conf +tests_normal_rotate_keepn 0 ".gz" + +echo "$LOGFPATH 640 1 * @T00 NCZ" > newsyslog.conf +tests_normal_rotate_keepn 1 ".gz" echo "$LOGFPATH 640 2 * @T00 NCZ" > newsyslog.conf +tests_normal_rotate_keepn 2 ".gz" + +echo "$LOGFPATH 640 3 * @T00 NCZ" > newsyslog.conf +tests_normal_rotate_keepn 3 ".gz" + +# Normal, no archive dir +echo "$LOGFPATH 640 3 * @T00 NC" > newsyslog.conf +tests_normal_rotate + +echo "$LOGFPATH 640 3 * @T00 NCZ" > newsyslog.conf tests_normal_rotate ".gz" -echo "$LOGFPATH 640 2 * @T00 NCJ" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NCJ" > newsyslog.conf tests_normal_rotate ".bz2" # Normal, archive dir -echo "$LOGFPATH 640 2 * @T00 NC" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NC" > newsyslog.conf tests_normal_rotate "" "${TMPDIR}/alog/" -echo "$LOGFPATH 640 2 * @T00 NCZ" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NCZ" > newsyslog.conf tests_normal_rotate ".gz" "${TMPDIR}/alog/" -echo "$LOGFPATH 640 2 * @T00 NCJ" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NCJ" > newsyslog.conf tests_normal_rotate ".bz2" "${TMPDIR}/alog/" # Time based, no archive dir From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 19:56:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4053E1065670; Thu, 21 Apr 2011 19:56:07 +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 2F6EA8FC16; Thu, 21 Apr 2011 19:56: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 p3LJu7MO010266; Thu, 21 Apr 2011 19:56:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LJu7AB010264; Thu, 21 Apr 2011 19:56:07 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104211956.p3LJu7AB010264@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Apr 2011 19:56: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: r220928 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 19:56:07 -0000 Author: rmacklem Date: Thu Apr 21 19:56:06 2011 New Revision: 220928 URL: http://svn.freebsd.org/changeset/base/220928 Log: Remove the nm_mtx mutex locking from the test for nm_maxfilesize. This value rarely, if ever, changes and the nm_mtx mutex is locked/unlocked earlier in the function, which should be sufficient to avoid getting a stale cached value for it. There is a discussion w.r.t. what these tests should be, but I've left them basically the same as the regular NFS client for now. Suggested by: pjd MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Thu Apr 21 16:40:34 2011 (r220927) +++ head/sys/fs/nfsclient/nfs_clbio.c Thu Apr 21 19:56:06 2011 (r220928) @@ -946,12 +946,8 @@ flush_and_restart: if (uio->uio_offset < 0) return (EINVAL); tmp_off = uio->uio_offset + uio->uio_resid; - mtx_lock(&nmp->nm_mtx); - if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { - mtx_unlock(&nmp->nm_mtx); + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) return (EFBIG); - } - mtx_unlock(&nmp->nm_mtx); if (uio->uio_resid == 0) return (0); From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 20:56:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9325E1065672; Thu, 21 Apr 2011 20:56:34 +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 699558FC1A; Thu, 21 Apr 2011 20:56: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 p3LKuYuS012126; Thu, 21 Apr 2011 20:56:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LKuYbT012124; Thu, 21 Apr 2011 20:56:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104212056.p3LKuYbT012124@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Apr 2011 20:56: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: r220929 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 20:56:34 -0000 Author: mav Date: Thu Apr 21 20:56:34 2011 New Revision: 220929 URL: http://svn.freebsd.org/changeset/base/220929 Log: According to ATA specifications, when ATAPI master is the only device, it should respond with all zeroes to any access to slave registers. Test with PATA devices confirmed such behavior. Unluckily, Intel SATA controllers in legacy emulation mode behave differently, not making any difference between ATA and ATAPI devices. It causes false positive slave device detection and, as result, command timeouts. To workaround this problem, mask result of legacy-emulated soft-reset with the device presence information received from the SATA-specific registers. Modified: head/sys/dev/ata/chipsets/ata-intel.c Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Thu Apr 21 19:56:06 2011 (r220928) +++ head/sys/dev/ata/chipsets/ata-intel.c Thu Apr 21 20:56:34 2011 (r220929) @@ -392,8 +392,9 @@ ata_intel_reset(device_t dev) device_t parent = device_get_parent(dev); struct ata_pci_controller *ctlr = device_get_softc(parent); struct ata_channel *ch = device_get_softc(dev); - int mask, pmask, timeout, devs; + int mask, pshift, timeout, devs; u_char *smap; + uint16_t pcs; /* In combined mode, skip SATA stuff for PATA channel. */ if ((ch->flags & ATA_SATA) == 0) @@ -412,26 +413,35 @@ ata_intel_reset(device_t dev) /* Wait up to 1 sec for "connect well". */ if (ctlr->chip->cfg1 & (INTEL_6CH | INTEL_6CH2)) - pmask = mask << 8; + pshift = 8; else - pmask = mask << 4; + pshift = 4; for (timeout = 0; timeout < 100 ; timeout++) { - if (((pci_read_config(parent, 0x92, 2) & pmask) == pmask) && - (ATA_IDX_INB(ch, ATA_STATUS) != 0xff)) + pcs = (pci_read_config(parent, 0x92, 2) >> pshift) & mask; + if ((pcs == mask) && (ATA_IDX_INB(ch, ATA_STATUS) != 0xff)) break; ata_udelay(10000); } + if (bootverbose) + device_printf(dev, "SATA reset: ports status=0x%02x\n", pcs); /* If any device found, do soft-reset. */ if (ch->hw.pm_read != NULL) { - devs = ata_sata_phy_reset(dev, 0, 2); + devs = ata_sata_phy_reset(dev, 0, 2) ? ATA_ATA_MASTER : 0; if ((ch->flags & ATA_NO_SLAVE) == 0) - devs += ata_sata_phy_reset(dev, 1, 2); - } else - devs = 1; - if (devs) + devs |= ata_sata_phy_reset(dev, 1, 2) ? + ATA_ATA_SLAVE : 0; + } else { + devs = (pcs & (1 << smap[0])) ? ATA_ATA_MASTER : 0; + if ((ch->flags & ATA_NO_SLAVE) == 0) + devs |= (pcs & (1 << smap[1])) ? + ATA_ATA_SLAVE : 0; + } + if (devs) { ata_generic_reset(dev); - else + /* Reset may give fake slave when only ATAPI master present. */ + ch->devices &= (devs | (devs * ATA_ATAPI_MASTER)); + } else ch->devices = 0; } From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 21:15:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE0DA106564A; Thu, 21 Apr 2011 21:15:11 +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 AF7118FC1A; Thu, 21 Apr 2011 21:15: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 p3LLFBsi012727; Thu, 21 Apr 2011 21:15:11 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LLFBQT012725; Thu, 21 Apr 2011 21:15:11 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104212115.p3LLFBQT012725@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 21 Apr 2011 21:15: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: r220930 - 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, 21 Apr 2011 21:15:11 -0000 Author: pjd Date: Thu Apr 21 21:15:11 2011 New Revision: 220930 URL: http://svn.freebsd.org/changeset/base/220930 Log: Add g_eli_key_cache.c to GELI. MFC after: 2 weeks Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 21 20:56:34 2011 (r220929) +++ head/sys/conf/files Thu Apr 21 21:15:11 2011 (r220930) @@ -2101,6 +2101,7 @@ geom/eli/g_eli_crypto.c optional geom_e geom/eli/g_eli_ctl.c optional geom_eli geom/eli/g_eli_integrity.c optional geom_eli geom/eli/g_eli_key.c optional geom_eli +geom/eli/g_eli_key_cache.c optional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 21:56:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E1BC1065672; Thu, 21 Apr 2011 21:56:28 +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 63FCE8FC13; Thu, 21 Apr 2011 21:56: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 p3LLuSPX013964; Thu, 21 Apr 2011 21:56:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LLuSPb013962; Thu, 21 Apr 2011 21:56:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104212156.p3LLuSPb013962@svn.freebsd.org> From: Marius Strobl Date: Thu, 21 Apr 2011 21:56: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: r220931 - 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: Thu, 21 Apr 2011 21:56:28 -0000 Author: marius Date: Thu Apr 21 21:56:28 2011 New Revision: 220931 URL: http://svn.freebsd.org/changeset/base/220931 Log: - Use the streaming cache unless BUS_DMA_COHERENT is specified. Since r220375 all drivers enabled in the sparc64 GENERIC should be either correctly using bus_dmamap_sync(9) calls or supply BUS_DMA_COHERENT when appropriate or as a workaround for missing bus_dmamap_sync(9) calls (sound(4) drivers and partially sym(4)). In at least some configurations taking advantage of the streaming cache results in a modest performance improvement. - Remove the memory barrier for BUS_DMASYNC_PREREAD which as the comment already suggested is bogus. - Add my copyright for having implemented several things like support for the Fire and Oberon IOMMUs, taking over PROM IOMMU mappings etc. Modified: head/sys/sparc64/sparc64/iommu.c Modified: head/sys/sparc64/sparc64/iommu.c ============================================================================== --- head/sys/sparc64/sparc64/iommu.c Thu Apr 21 21:15:11 2011 (r220930) +++ head/sys/sparc64/sparc64/iommu.c Thu Apr 21 21:56:28 2011 (r220931) @@ -28,6 +28,7 @@ /*- * Copyright (c) 1999-2002 Eduardo Horvath * Copyright (c) 2001-2003 Thomas Moestl + * Copyright (c) 2007, 2009 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -77,7 +78,6 @@ __FBSDID("$FreeBSD$"); * - When running out of DVMA space, return EINPROGRESS in the non- * BUS_DMA_NOWAIT case and delay the callback until sufficient space * becomes available. - * - Use the streaming cache unless BUS_DMA_COHERENT is specified. */ #include "opt_iommu.h" @@ -564,17 +564,8 @@ static __inline int iommu_use_streaming(struct iommu_state *is, bus_dmamap_t map, bus_size_t size) { - /* - * This cannot be enabled yet, as many driver are still missing - * bus_dmamap_sync() calls. As soon as there is a BUS_DMA_STREAMING - * flag, this should be reenabled conditionally on it. - */ -#ifdef notyet return (size >= IOMMU_STREAM_THRESH && IOMMU_HAS_SB(is) && (map->dm_flags & DMF_COHERENT) == 0); -#else - return (0); -#endif } /* @@ -1182,9 +1173,6 @@ iommu_dvmamap_sync(bus_dma_tag_t dt, bus if ((map->dm_flags & DMF_LOADED) == 0) return; - /* XXX This is probably bogus. */ - if ((op & BUS_DMASYNC_PREREAD) != 0) - membar(Sync); if ((map->dm_flags & DMF_STREAMED) != 0 && ((op & BUS_DMASYNC_POSTREAD) != 0 || (op & BUS_DMASYNC_PREWRITE) != 0)) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 21 23:06:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B37F8106566B; Thu, 21 Apr 2011 23:06:00 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0BC78FC0C; Thu, 21 Apr 2011 23:06: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 p3LN60Av016025; Thu, 21 Apr 2011 23:06:00 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3LN60dp016020; Thu, 21 Apr 2011 23:06:00 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201104212306.p3LN60dp016020@svn.freebsd.org> From: David Christensen Date: Thu, 21 Apr 2011 23:06: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: r220932 - head/sys/dev/bxe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 21 Apr 2011 23:06:00 -0000 Author: davidch Date: Thu Apr 21 23:06:00 2011 New Revision: 220932 URL: http://svn.freebsd.org/changeset/base/220932 Log: - Centralize driver tunables initialization/validation. - Centralize PCI resource allocation/release. - Enable flowid (TSS) support. - Added "per-fastpath" locks and watchdog timeouts. - Fixed problem where the CQ producer index was advanced beyond the size of the CQ ring during initialization. - Replaced hard-coded debug levels in some debug print statements. - More style(9) fixes. MFC after: Two weeks Modified: head/sys/dev/bxe/bxe_debug.h head/sys/dev/bxe/bxe_include.h head/sys/dev/bxe/if_bxe.c head/sys/dev/bxe/if_bxe.h Modified: head/sys/dev/bxe/bxe_debug.h ============================================================================== --- head/sys/dev/bxe/bxe_debug.h Thu Apr 21 21:56:28 2011 (r220931) +++ head/sys/dev/bxe/bxe_debug.h Thu Apr 21 23:06:00 2011 (r220932) @@ -159,50 +159,50 @@ extern uint32_t bxe_debug; #ifdef BXE_DEBUG /* Print a message based on the logging level and code path. */ -#define DBPRINT(sc, level, format, args...) \ - do { \ - if (BXE_LOG_MSG(level)) { \ - device_printf(sc->bxe_dev, format, ## args); \ - } \ +#define DBPRINT(sc, level, format, args...) \ + do { \ + if (BXE_LOG_MSG(level)) { \ + device_printf(sc->dev, format, ## args); \ + } \ } while (0) /* Runs a particular command when debugging is enabled. */ -#define DBRUN(args...) \ - do { \ - args; \ +#define DBRUN(args...) \ + do { \ + args; \ } while (0) /* Runs a particular command based on the logging level. */ -#define DBRUNLV(level, args...) \ - if (BXE_MSG_LEVEL(level)) { \ - args; \ +#define DBRUNLV(level, args...) \ + if (BXE_MSG_LEVEL(level)) { \ + args; \ } /* Runs a particular command based on the code path. */ -#define DBRUNCP(cp, args...) \ - if (BXE_CODE_PATH(cp)) { \ - args; \ +#define DBRUNCP(cp, args...) \ + if (BXE_CODE_PATH(cp)) { \ + args; \ } /* Runs a particular command based on a condition. */ -#define DBRUNIF(cond, args...) \ - if (cond) { \ - args; \ +#define DBRUNIF(cond, args...) \ + if (cond) { \ + args; \ } /* Runs a particular command based on the logging level and code path. */ -#define DBRUNMSG(msg, args...) \ - if (BXE_LOG_MSG(msg)) { \ - args; \ +#define DBRUNMSG(msg, args...) \ + if (BXE_LOG_MSG(msg)) { \ + args; \ } /* Announces function entry. */ -#define DBENTER(cond) \ - DBPRINT(sc, (cond), "%s(enter:%d)\n", __FUNCTION__, curcpu) \ +#define DBENTER(cond) \ + DBPRINT(sc, (cond), "%s(enter:%d)\n", __FUNCTION__, curcpu) /* Announces function exit. */ -#define DBEXIT(cond) \ - DBPRINT(sc, (cond), "%s(exit:%d)\n", __FUNCTION__, curcpu) \ +#define DBEXIT(cond) \ + DBPRINT(sc, (cond), "%s(exit:%d)\n", __FUNCTION__, curcpu) /* Needed for random() function which is only used in debugging. */ #include Modified: head/sys/dev/bxe/bxe_include.h ============================================================================== --- head/sys/dev/bxe/bxe_include.h Thu Apr 21 21:56:28 2011 (r220931) +++ head/sys/dev/bxe/bxe_include.h Thu Apr 21 23:06:00 2011 (r220932) @@ -61,21 +61,21 @@ /* * Convenience definitions used in multiple files. */ -#define BXE_PRINTF(fmt, args...) \ - do { \ - device_printf(sc->bxe_dev, fmt, ##args);\ +#define BXE_PRINTF(fmt, args...) \ + do { \ + device_printf(sc->dev, fmt, ##args); \ }while(0) #ifdef BXE_DEBUG -#define REG_WR(sc, offset, val) \ +#define REG_WR(sc, offset, val) \ bxe_reg_write32(sc, offset, val) -#define REG_WR8(sc, offset, val) \ +#define REG_WR8(sc, offset, val) \ bxe_reg_write8(sc, offset, val) -#define REG_WR16(sc, offset, val) \ +#define REG_WR16(sc, offset, val) \ bxe_reg_write16(sc, offset, val) -#define REG_WR32(sc, offset, val) \ +#define REG_WR32(sc, offset, val) \ bxe_reg_write32(sc, offset, val) #define REG_RD(sc, offset) \ @@ -87,77 +87,77 @@ #define REG_RD32(sc, offset) \ bxe_reg_read32(sc, offset) -#define REG_RD_IND(sc, offset) \ +#define REG_RD_IND(sc, offset) \ bxe_reg_rd_ind(sc, offset) -#define REG_WR_IND(sc, offset, val) \ +#define REG_WR_IND(sc, offset, val) \ bxe_reg_wr_ind(sc, offset, val) #else -#define REG_WR(sc, offset, val) \ +#define REG_WR(sc, offset, val) \ bus_space_write_4(sc->bxe_btag, sc->bxe_bhandle, offset, val) -#define REG_WR8(sc, offset, val) \ +#define REG_WR8(sc, offset, val) \ bus_space_write_1(sc->bxe_btag, sc->bxe_bhandle, offset, val) -#define REG_WR16(sc, offset, val) \ +#define REG_WR16(sc, offset, val) \ bus_space_write_2(sc->bxe_btag, sc->bxe_bhandle, offset, val) -#define REG_WR32(sc, offset, val) \ +#define REG_WR32(sc, offset, val) \ bus_space_write_4(sc->bxe_btag, sc->bxe_bhandle, offset, val) -#define REG_RD(sc, offset) \ +#define REG_RD(sc, offset) \ bus_space_read_4(sc->bxe_btag, sc->bxe_bhandle, offset) -#define REG_RD8(sc, offset) \ +#define REG_RD8(sc, offset) \ bus_space_read_1(sc->bxe_btag, sc->bxe_bhandle, offset) -#define REG_RD16(sc, offset) \ +#define REG_RD16(sc, offset) \ bus_space_read_2(sc->bxe_btag, sc->bxe_bhandle, offset) -#define REG_RD32(sc, offset) \ +#define REG_RD32(sc, offset) \ bus_space_read_4(sc->bxe_btag, sc->bxe_bhandle, offset) -#define REG_RD_IND(sc, offset) \ +#define REG_RD_IND(sc, offset) \ bxe_reg_rd_ind(sc, offset) -#define REG_WR_IND(sc, offset, val) \ +#define REG_WR_IND(sc, offset, val) \ bxe_reg_wr_ind(sc, offset, val) #endif /* BXE_DEBUG */ #define REG_RD_DMAE(sc, offset, val, len32) \ - do { \ - bxe_read_dmae(sc, offset, len32); \ - memcpy(val, BXE_SP(sc, wb_data[0]), len32 * 4); \ + do { \ + bxe_read_dmae(sc, offset, len32); \ + memcpy(val, BXE_SP(sc, wb_data[0]), len32 * 4); \ } while (0) #define REG_WR_DMAE(sc, offset, val, len32) \ - do { \ - memcpy(BXE_SP(sc, wb_data[0]), val, len32 * 4); \ - bxe_write_dmae(sc, BXE_SP_MAPPING(sc, wb_data), \ - offset, len32); \ + do { \ + memcpy(BXE_SP(sc, wb_data[0]), val, len32 * 4); \ + bxe_write_dmae(sc, BXE_SP_MAPPING(sc, wb_data), \ + offset, len32); \ } while (0) -#define SHMEM_ADDR(sc, field) (sc->common.shmem_base + \ +#define SHMEM_ADDR(sc, field) (sc->common.shmem_base + \ offsetof(struct shmem_region, field)) -#define SHMEM_RD(sc, field) \ +#define SHMEM_RD(sc, field) \ REG_RD(sc, SHMEM_ADDR(sc, field)) -#define SHMEM_RD16(sc, field) \ +#define SHMEM_RD16(sc, field) \ REG_RD16(sc, SHMEM_ADDR(sc, field)) -#define SHMEM_WR(sc, field, val) \ +#define SHMEM_WR(sc, field, val) \ REG_WR(sc, SHMEM_ADDR(sc, field), val) -#define SHMEM2_ADDR(sc, field) (sc->common.shmem2_base + \ - offsetof(struct shmem2_region, field)) +#define SHMEM2_ADDR(sc, field) (sc->common.shmem2_base + \ + offsetof(struct shmem2_region, field)) #define SHMEM2_RD(sc, field) REG_RD(sc, SHMEM2_ADDR(sc, field)) #define SHMEM2_WR(sc, field, val) REG_WR(sc, SHMEM2_ADDR(sc, field), val) -#define EMAC_RD(sc, reg) \ +#define EMAC_RD(sc, reg) \ REG_RD(sc, emac_base + (uint32_t) reg) -#define EMAC_WR(sc, reg, val) \ +#define EMAC_WR(sc, reg, val) \ REG_WR(sc, emac_base + (uint32_t) reg, val) -#define BMAC_WR(sc, reg, val) \ +#define BMAC_WR(sc, reg, val) \ REG_WR(sc, GRCBASE_NIG + bmac_addr + reg, val) #endif /* _BXE_INCLUDE_H */ Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Thu Apr 21 21:56:28 2011 (r220931) +++ head/sys/dev/bxe/if_bxe.c Thu Apr 21 23:06:00 2011 (r220932) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); /* BXE Debug Options */ #ifdef BXE_DEBUG -uint32_t bxe_debug = BXE_INFO; +uint32_t bxe_debug = BXE_WARN; /* 0 = Never */ @@ -132,6 +132,7 @@ static int bxe_attach(device_t); static int bxe_detach(device_t); static int bxe_shutdown(device_t); +static void bxe_set_tunables(struct bxe_softc *); static void bxe_print_adapter_info(struct bxe_softc *); static void bxe_probe_pci_caps(struct bxe_softc *); static void bxe_link_settings_supported(struct bxe_softc *, uint32_t); @@ -145,6 +146,8 @@ static int bxe_stop_leading(struct bxe_ static int bxe_setup_multi(struct bxe_softc *, int); static int bxe_stop_multi(struct bxe_softc *, int); static int bxe_stop_locked(struct bxe_softc *, int); +static int bxe_alloc_buf_rings(struct bxe_softc *); +static void bxe_free_buf_rings(struct bxe_softc *); static void bxe_init_locked(struct bxe_softc *, int); static int bxe_wait_ramrod(struct bxe_softc *, int, int, int *, int); static void bxe_init_str_wr(struct bxe_softc *, uint32_t, const uint32_t *, @@ -237,6 +240,10 @@ static void bxe_stats_handle(struct bxe_ static int bxe_tx_encap(struct bxe_fastpath *, struct mbuf **); static void bxe_tx_start(struct ifnet *); static void bxe_tx_start_locked(struct ifnet *, struct bxe_fastpath *); +static int bxe_tx_mq_start(struct ifnet *, struct mbuf *); +static int bxe_tx_mq_start_locked(struct ifnet *, struct bxe_fastpath *, + struct mbuf *); +static void bxe_mq_flush(struct ifnet *ifp); static int bxe_ioctl(struct ifnet *, u_long, caddr_t); static __inline int bxe_has_rx_work(struct bxe_fastpath *); static __inline int bxe_has_tx_work(struct bxe_fastpath *); @@ -266,6 +273,8 @@ static struct mbuf *bxe_alloc_mbuf(struc static int bxe_map_mbuf(struct bxe_fastpath *, struct mbuf *, bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *); static struct mbuf *bxe_alloc_tpa_mbuf(struct bxe_fastpath *, int, int); +static void bxe_alloc_mutexes(struct bxe_softc *); +static void bxe_free_mutexes(struct bxe_softc *); static int bxe_alloc_rx_sge(struct bxe_softc *, struct bxe_fastpath *, uint16_t); static void bxe_init_rx_chains(struct bxe_softc *); @@ -322,7 +331,7 @@ static void bxe_tpa_stop(struct bxe_soft static void bxe_rxeof(struct bxe_fastpath *); static void bxe_txeof(struct bxe_fastpath *); static int bxe_get_buf(struct bxe_fastpath *, struct mbuf *, uint16_t); -static void bxe_watchdog(struct bxe_softc *); +static int bxe_watchdog(struct bxe_fastpath *fp); static int bxe_change_mtu(struct bxe_softc *, int); static void bxe_tick(void *); static void bxe_add_sysctls(struct bxe_softc *); @@ -481,8 +490,7 @@ SYSCTL_UINT(_hw_bxe, OID_AUTO, queue_cou * destination IP address and the source/destination TCP port). * */ -/* static int bxe_multi_mode = ETH_RSS_MODE_REGULAR; */ -static int bxe_multi_mode = ETH_RSS_MODE_DISABLED; +static int bxe_multi_mode = ETH_RSS_MODE_REGULAR; TUNABLE_INT("hw.bxe.multi_mode", &bxe_multi_mode); SYSCTL_UINT(_hw_bxe, OID_AUTO, multi_mode, CTLFLAG_RDTUN, &bxe_multi_mode, 0, "Multi-Queue Mode"); @@ -738,7 +746,7 @@ bxe_calc_vn_wsum(struct bxe_softc *sc) uint32_t vn_cfg, vn_min_rate; int all_zero, vn; - DBENTER(1); + DBENTER(BXE_VERBOSE_LOAD); all_zero = 1; sc->vn_wsum = 0; @@ -764,7 +772,7 @@ bxe_calc_vn_wsum(struct bxe_softc *sc) else sc->cmng.flags.cmng_enables |= CMNG_FLAGS_PER_PORT_FAIRNESS_VN; - DBEXIT(1); + DBEXIT(BXE_VERBOSE_LOAD); } /* @@ -784,7 +792,7 @@ bxe_init_vn_minmax(struct bxe_softc *sc, vn_cfg = sc->mf_config[vn]; func = 2 * vn + BP_PORT(sc); - DBENTER(1); + DBENTER(BXE_VERBOSE_LOAD); /* If function is hidden - set min and max to zeroes. */ if (vn_cfg & FUNC_MF_CFG_FUNC_HIDE) { @@ -807,7 +815,7 @@ bxe_init_vn_minmax(struct bxe_softc *sc, if (vn_max_rate == 0) return; } - DBPRINT(sc, 1, + DBPRINT(sc, BXE_INFO_LOAD, "%s(): func %d: vn_min_rate = %d, vn_max_rate = %d, wsum = %d.\n", __FUNCTION__, func, vn_min_rate, vn_max_rate, sc->vn_wsum); @@ -846,7 +854,8 @@ bxe_init_vn_minmax(struct bxe_softc *sc, REG_WR(sc, BAR_XSTORM_INTMEM + XSTORM_FAIRNESS_PER_VN_VARS_OFFSET(func) + (i * 4), ((uint32_t *)(&m_fair_vn))[i]); - DBEXIT(1); + + DBEXIT(BXE_VERBOSE_LOAD); } static void @@ -854,6 +863,8 @@ bxe_congestionmgmt(struct bxe_softc *sc, { int vn; + DBENTER(BXE_VERBOSE_LOAD); + /* Read mf conf from shmem. */ if (readshm) bxe_read_mf_cfg(sc); @@ -871,11 +882,14 @@ bxe_congestionmgmt(struct bxe_softc *sc, /* Always enable rate shaping and fairness. */ sc->cmng.flags.cmng_enables |= CMNG_FLAGS_PER_PORT_RATE_SHAPING_VN; - DBPRINT(sc, 1, "rate shaping set\n"); + DBPRINT(sc, BXE_VERBOSE_LOAD, + "%s(): Rate shaping set\n", __FUNCTION__); if (!sc->vn_wsum) - DBPRINT(sc, 1, - "All MIN values are zeroes fairness is disabled\n"); + DBPRINT(sc, BXE_INFO_LOAD, "%s(): All MIN values " + "are zeroes, fairness is disabled\n", __FUNCTION__); + + DBEXIT(BXE_VERBOSE_LOAD); } static void @@ -883,19 +897,18 @@ bxe_dcc_event(struct bxe_softc *sc, uint { int i, port; + DBENTER(BXE_VERBOSE_LOAD); + if (dcc_event & DRV_STATUS_DCC_DISABLE_ENABLE_PF) { - /* - * This is the only place besides the function initialization - * where the sc->bxe_flags can change so it is done without any - * locks - */ if (sc->mf_config[BP_E1HVN(sc)] & FUNC_MF_CFG_FUNC_DISABLED) { - DBPRINT(sc, 1, "mf_cfg function disabled\n"); - sc->bxe_flags = BXE_STATE_DISABLED; + DBPRINT(sc, BXE_INFO_LOAD, "%s(): mf_cfg function " + "disabled\n", __FUNCTION__); + sc->state = BXE_STATE_DISABLED; bxe_e1h_disable(sc); } else { - DBPRINT(sc, 1, "mf_cfg function enabled\n"); - sc->bxe_flags = BXE_STATE_OPEN; + DBPRINT(sc, BXE_INFO_LOAD, "%s(): mf_cfg function " + "enabled\n", __FUNCTION__); + sc->state = BXE_STATE_OPEN; bxe_e1h_enable(sc); } dcc_event &= ~DRV_STATUS_DCC_DISABLE_ENABLE_PF; @@ -915,6 +928,8 @@ bxe_dcc_event(struct bxe_softc *sc, uint bxe_fw_command(sc, DRV_MSG_CODE_DCC_FAILURE); else bxe_fw_command(sc, DRV_MSG_CODE_DCC_OK); + + DBEXIT(BXE_VERBOSE_LOAD); } /* @@ -935,7 +950,7 @@ bxe_probe(device_t dev) uint16_t did, sdid, svid, vid; sc = device_get_softc(dev); - sc->bxe_dev = dev; + sc->dev = dev; t = bxe_devs; /* Get the data for the device to be probed. */ @@ -1028,7 +1043,7 @@ bxe_print_adapter_info(struct bxe_softc printf("TPA"); i++; } - printf(") Queues ("); + printf("); Queues ("); switch (sc->multi_mode) { case ETH_RSS_MODE_DISABLED: printf("None"); @@ -1079,7 +1094,7 @@ bxe_interrupt_allocate(struct bxe_softc int msix_count, msix_required, msix_allocated; rc = 0; - dev = sc->bxe_dev; + dev = sc->dev; msi_count = 0; msi_required = 0; msi_allocated = 0; @@ -1096,70 +1111,6 @@ bxe_interrupt_allocate(struct bxe_softc for (i = 0; i < BXE_MAX_PRIORITY; i++) sc->pri_map[i] = 0; - /* - * Get our starting point for interrupt mode/number of queues. - * We will progressively step down from MSI-X to MSI to INTx - * and reduce the number of receive queues as necessary to - * match the system capabilities. - */ - sc->multi_mode = bxe_multi_mode; - sc->int_mode = bxe_int_mode; - - /* - * Verify the Priority -> Receive Queue mappings. - */ - if (sc->int_mode > 0) { - /* Multi-queue modes require MSI/MSI-X. */ - switch (sc->multi_mode) { - case ETH_RSS_MODE_DISABLED: - /* No multi-queue mode requested. */ - sc->num_queues = 1; - break; - case ETH_RSS_MODE_REGULAR: - if (sc->int_mode > 1) { - /* - * Assume we can use MSI-X - * (max of 16 receive queues). - */ - sc->num_queues = min((bxe_queue_count ? - bxe_queue_count : mp_ncpus), MAX_CONTEXT); - } else { - /* - * Assume we can use MSI - * (max of 7 receive queues). - */ - sc->num_queues = min((bxe_queue_count ? - bxe_queue_count : mp_ncpus), - BXE_MSI_VECTOR_COUNT - 1); - } - break; - default: - BXE_PRINTF( - "%s(%d): Unsupported multi_mode parameter (%d), " - "disabling multi-queue support!\n", __FILE__, - __LINE__, sc->multi_mode); - sc->multi_mode = ETH_RSS_MODE_DISABLED; - sc->num_queues = 1; - break; - } - } else { - /* User has forced INTx mode. */ - sc->multi_mode = ETH_RSS_MODE_DISABLED; - sc->num_queues = 1; - } - - DBPRINT(sc, (BXE_VERBOSE_LOAD | BXE_VERBOSE_INTR), - "%s(): Requested: int_mode = %d, multi_mode = %d num_queues = %d\n", - __FUNCTION__, sc->int_mode, sc->multi_mode, sc->num_queues); - -#ifdef BXE_DEBUG - for (i = 0; i < BXE_MAX_PRIORITY; i++) { - DBPRINT(sc, (BXE_VERBOSE_LOAD | BXE_VERBOSE_INTR), - "%s(): sc->pri_map[%d] = %d.\n", __FUNCTION__, i, - sc->pri_map[i]); - } -#endif - /* Get the number of available MSI/MSI-X interrupts from the OS. */ if (sc->int_mode > 0) { if (sc->bxe_cap_flags & BXE_MSIX_CAPABLE_FLAG) @@ -1331,7 +1282,7 @@ bxe_interrupt_detach(struct bxe_softc *s device_t dev; int i; - dev = sc->bxe_dev; + dev = sc->dev; DBENTER(BXE_VERBOSE_RESET | BXE_VERBOSE_UNLOAD); /* Release interrupt resources. */ if ((sc->bxe_flags & BXE_USING_MSIX_FLAG) && sc->msix_count) { @@ -1381,7 +1332,7 @@ bxe_interrupt_attach(struct bxe_softc *s sc->tq = taskqueue_create_fast("bxe_spq", M_NOWAIT, taskqueue_thread_enqueue, &sc->tq); taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s spq", - device_get_nameunit(sc->bxe_dev)); + device_get_nameunit(sc->dev)); #endif /* Setup interrupt handlers. */ @@ -1393,7 +1344,7 @@ bxe_interrupt_attach(struct bxe_softc *s * driver instance to the interrupt handler for the * slowpath. */ - rc = bus_setup_intr(sc->bxe_dev, + rc = bus_setup_intr(sc->dev, sc->bxe_msix_res[0], INTR_TYPE_NET | INTR_MPSAFE, NULL, @@ -1420,7 +1371,7 @@ bxe_interrupt_attach(struct bxe_softc *s * fastpath context to the interrupt handler in this * case. Also the first msix_res was used by the sp. */ - rc = bus_setup_intr(sc->bxe_dev, + rc = bus_setup_intr(sc->dev, sc->bxe_msix_res[i + 1], INTR_TYPE_NET | INTR_MPSAFE, NULL, @@ -1440,7 +1391,7 @@ bxe_interrupt_attach(struct bxe_softc *s fp->tq = taskqueue_create_fast("bxe_fpq", M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); taskqueue_start_threads(&fp->tq, 1, PI_NET, "%s fpq", - device_get_nameunit(sc->bxe_dev)); + device_get_nameunit(sc->dev)); #endif fp->state = BXE_FP_STATE_IRQ; } @@ -1452,7 +1403,7 @@ bxe_interrupt_attach(struct bxe_softc *s * Setup the interrupt handler. Note that we pass the driver * instance to the interrupt handler for the slowpath. */ - rc = bus_setup_intr(sc->bxe_dev,sc->bxe_msi_res[0], + rc = bus_setup_intr(sc->dev,sc->bxe_msi_res[0], INTR_TYPE_NET | INTR_MPSAFE, NULL, bxe_intr_sp, @@ -1479,7 +1430,7 @@ bxe_interrupt_attach(struct bxe_softc *s * fastpath context to the interrupt handler in this * case. */ - rc = bus_setup_intr(sc->bxe_dev, + rc = bus_setup_intr(sc->dev, sc->bxe_msi_res[i + 1], INTR_TYPE_NET | INTR_MPSAFE, NULL, @@ -1499,7 +1450,7 @@ bxe_interrupt_attach(struct bxe_softc *s fp->tq = taskqueue_create_fast("bxe_fpq", M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); taskqueue_start_threads(&fp->tq, 1, PI_NET, "%s fpq", - device_get_nameunit(sc->bxe_dev)); + device_get_nameunit(sc->dev)); #endif } @@ -1515,7 +1466,7 @@ bxe_interrupt_attach(struct bxe_softc *s * driver instance to the interrupt handler which * will handle both the slowpath and fastpath. */ - rc = bus_setup_intr(sc->bxe_dev,sc->bxe_irq_res, + rc = bus_setup_intr(sc->dev,sc->bxe_irq_res, INTR_TYPE_NET | INTR_MPSAFE, NULL, bxe_intr_legacy, @@ -1529,13 +1480,10 @@ bxe_interrupt_attach(struct bxe_softc *s } #ifdef BXE_TASK TASK_INIT(&fp->task, 0, bxe_task_fp, fp); - fp->tq = taskqueue_create_fast("bxe_fpq", M_NOWAIT, - taskqueue_thread_enqueue, - &fp->tq - ); - taskqueue_start_threads(&fp->tq, 1, PI_NET, "%s fpq", - device_get_nameunit(sc->bxe_dev) - ); + fp->tq = taskqueue_create_fast("bxe_fpq", + M_NOWAIT, taskqueue_thread_enqueue, &fp->tq); + taskqueue_start_threads(&fp->tq, 1, + PI_NET, "%s fpq", device_get_nameunit(sc->dev)); #endif } @@ -1562,7 +1510,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) uint32_t reg; uint16_t link_status; - dev = sc->bxe_dev; + dev = sc->dev; DBENTER(BXE_EXTREME_LOAD); /* Check if PCI Power Management capability is enabled. */ @@ -1679,46 +1627,118 @@ bxe_init_firmware(struct bxe_softc *sc) return (0); } -/* - * Device attach function. - * - * Allocates device resources, performs secondary chip identification, - * resets and initializes the hardware, and initializes driver instance - * variables. - * - * Returns: - * 0 = Success, Positive value on failure. - */ -static int -bxe_attach(device_t dev) + +static void +bxe_set_tunables(struct bxe_softc *sc) { - struct bxe_softc *sc; - struct ifnet *ifp; - int rid, rc; + /* + * Get our starting point for interrupt mode/number of queues. + * We will progressively step down from MSI-X to MSI to INTx + * and reduce the number of receive queues as necessary to + * match the system capabilities. + */ + sc->multi_mode = bxe_multi_mode; + sc->int_mode = bxe_int_mode; + sc->tso_enable = bxe_tso_enable; - sc = device_get_softc(dev); - DBENTER(BXE_VERBOSE_LOAD | BXE_VERBOSE_RESET); + /* + * Verify the Priority -> Receive Queue mappings. + */ + if (sc->int_mode > 0) { + /* Multi-queue modes require MSI/MSI-X. */ + switch (sc->multi_mode) { + case ETH_RSS_MODE_DISABLED: + /* No multi-queue mode requested. */ + sc->num_queues = 1; + break; + case ETH_RSS_MODE_REGULAR: + if (sc->int_mode > 1) { + /* + * Assume we can use MSI-X + * (max of 16 receive queues). + */ + sc->num_queues = min((bxe_queue_count ? + bxe_queue_count : mp_ncpus), MAX_CONTEXT); + } else { + /* + * Assume we can use MSI + * (max of 7 receive queues). + */ + sc->num_queues = min((bxe_queue_count ? + bxe_queue_count : mp_ncpus), + BXE_MSI_VECTOR_COUNT - 1); + } + break; + default: + BXE_PRINTF( + "%s(%d): Unsupported multi_mode parameter (%d), " + "disabling multi-queue support!\n", __FILE__, + __LINE__, sc->multi_mode); + sc->multi_mode = ETH_RSS_MODE_DISABLED; + sc->num_queues = 1; + break; + } + } else { + /* User has forced INTx mode. */ + sc->multi_mode = ETH_RSS_MODE_DISABLED; + sc->num_queues = 1; + } - sc->bxe_dev = dev; - sc->bxe_unit = device_get_unit(dev); - sc->bxe_func = pci_get_function(dev); - sc->bxe_flags = 0; - sc->state = BXE_STATE_CLOSED; - rc = 0; + DBPRINT(sc, (BXE_VERBOSE_LOAD | BXE_VERBOSE_INTR), + "%s(): Requested: int_mode = %d, multi_mode = %d num_queues = %d\n", + __FUNCTION__, sc->int_mode, sc->multi_mode, sc->num_queues); - /* Initialize mutexes. */ - BXE_CORE_LOCK_INIT(sc, device_get_nameunit(dev)); - BXE_SP_LOCK_INIT(sc, "bxe_sp_lock"); - BXE_DMAE_LOCK_INIT(sc, "bxe_dmae_lock"); - BXE_PHY_LOCK_INIT(sc, "bxe_phy_lock"); - BXE_FWMB_LOCK_INIT(sc, "bxe_fwmb_lock"); - BXE_PRINT_LOCK_INIT(sc, "bxe_print_lock"); + /* Set transparent packet aggregation (TPA), aka LRO, flag. */ + if (bxe_tpa_enable!= FALSE) + sc->bxe_flags |= BXE_TPA_ENABLE_FLAG; - /* Prepare the tick routine. */ - callout_init(&sc->bxe_tick_callout, CALLOUT_MPSAFE); + /* Capture the stats enable/disable setting. */ + if (bxe_stats_enable == FALSE) + sc->stats_enable = FALSE; + else + sc->stats_enable = TRUE; - /* Enable bus master capability */ - pci_enable_busmaster(dev); + /* Select the host coalescing tick count values (limit values). */ + if (bxe_tx_ticks > 100) { + BXE_PRINTF("%s(%d): bxe_tx_ticks too large " + "(%d), setting default value of 50.\n", + __FILE__, __LINE__, bxe_tx_ticks); + sc->tx_ticks = 50; + } else + sc->tx_ticks = bxe_tx_ticks; + + if (bxe_rx_ticks > 100) { + BXE_PRINTF("%s(%d): bxe_rx_ticks too large " + "(%d), setting default value of 25.\n", + __FILE__, __LINE__, bxe_rx_ticks); + sc->rx_ticks = 25; + } else + sc->rx_ticks = bxe_rx_ticks; + + /* Select the PCIe maximum read request size (MRRS). */ + if (bxe_mrrs > 3) + sc->mrrs = 3; + else + sc->mrrs = bxe_mrrs; + + /* Check for DCC support. */ + if (bxe_dcc_enable == FALSE) + sc->dcc_enable = FALSE; + else + sc->dcc_enable = TRUE; +} + + +/* + * Returns: + * 0 = Success, !0 = Failure + */ +static int +bxe_alloc_pci_resources(struct bxe_softc *sc) +{ + int rid, rc = 0; + + DBENTER(BXE_VERBOSE_LOAD); /* * Allocate PCI memory resources for BAR0. @@ -1726,32 +1746,32 @@ bxe_attach(device_t dev) * processor memory. */ rid = PCIR_BAR(0); - sc->bxe_res = bus_alloc_resource_any(dev, - SYS_RES_MEMORY, &rid, RF_ACTIVE); + sc->bxe_res = bus_alloc_resource_any( + sc->dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->bxe_res == NULL) { BXE_PRINTF("%s(%d):PCI BAR0 memory allocation failed\n", __FILE__, __LINE__); rc = ENXIO; - goto bxe_attach_fail; + goto bxe_alloc_pci_resources_exit; } /* Get OS resource handles for BAR0 memory. */ - sc->bxe_btag = rman_get_bustag(sc->bxe_res); - sc->bxe_bhandle = rman_get_bushandle(sc->bxe_res); - sc->bxe_vhandle = (vm_offset_t) rman_get_virtual(sc->bxe_res); + sc->bxe_btag = rman_get_bustag(sc->bxe_res); + sc->bxe_bhandle = rman_get_bushandle(sc->bxe_res); + sc->bxe_vhandle = (vm_offset_t) rman_get_virtual(sc->bxe_res); /* * Allocate PCI memory resources for BAR2. * Doorbell (DB) memory. */ rid = PCIR_BAR(2); - sc->bxe_db_res = bus_alloc_resource_any(dev, - SYS_RES_MEMORY, &rid, RF_ACTIVE); + sc->bxe_db_res = bus_alloc_resource_any( + sc->dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->bxe_db_res == NULL) { BXE_PRINTF("%s(%d): PCI BAR2 memory allocation failed\n", __FILE__, __LINE__); rc = ENXIO; - goto bxe_attach_fail; + goto bxe_alloc_pci_resources_exit; } /* Get OS resource handles for BAR2 memory. */ @@ -1759,21 +1779,45 @@ bxe_attach(device_t dev) sc->bxe_db_bhandle = rman_get_bushandle(sc->bxe_db_res); sc->bxe_db_vhandle = (vm_offset_t) rman_get_virtual(sc->bxe_db_res); - /* Put indirect address registers into a sane state. */ - pci_write_config(sc->bxe_dev, PCICFG_GRC_ADDRESS, - PCICFG_VENDOR_ID_OFFSET, 4); - REG_WR(sc, PXP2_REG_PGL_ADDR_88_F0 + BP_PORT(sc) * 16, 0); - REG_WR(sc, PXP2_REG_PGL_ADDR_8C_F0 + BP_PORT(sc) * 16, 0); - REG_WR(sc, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(sc) * 16, 0); - REG_WR(sc, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(sc) * 16, 0); +bxe_alloc_pci_resources_exit: + DBEXIT(BXE_VERBOSE_LOAD); + return(rc); +} - /* Get hardware info from shared memory and validate data. */ - if (bxe_get_function_hwinfo(sc)) { - DBPRINT(sc, BXE_WARN, - "%s(): Failed to get hardware info!\n", __FUNCTION__); - rc = ENODEV; - goto bxe_attach_fail; + +/* + * Returns: + * None + */ +static void +bxe_release_pci_resources(struct bxe_softc *sc) +{ + /* Release the PCIe BAR0 mapped memory. */ + if (sc->bxe_res != NULL) { + DBPRINT(sc, (BXE_VERBOSE_LOAD | BXE_VERBOSE_RESET), + "%s(): Releasing PCI BAR0 memory.\n", __FUNCTION__); + bus_release_resource(sc->dev, + SYS_RES_MEMORY, PCIR_BAR(0), sc->bxe_res); + } + + /* Release the PCIe BAR2 (doorbell) mapped memory. */ + if (sc->bxe_db_res != NULL) { + DBPRINT(sc, (BXE_VERBOSE_LOAD | BXE_VERBOSE_RESET), + "%s(): Releasing PCI BAR2 memory.\n", __FUNCTION__); + bus_release_resource(sc->dev, + SYS_RES_MEMORY, PCIR_BAR(2), sc->bxe_db_res); } +} + + +/* + * Returns: + * 0 = Success, !0 = Failure + */ +static int +bxe_media_detect(struct bxe_softc *sc) +{ + int rc = 0; /* Identify supported media based on the PHY type. */ switch (XGXS_EXT_PHY_TYPE(sc->link_params.ext_phy_config)) { @@ -1782,21 +1826,21 @@ bxe_attach(device_t dev) "%s(): Found 10GBase-CX4 media.\n", __FUNCTION__); sc->media = IFM_10G_CX4; break; -#if 0 - /* ToDo: Configure correct media types for these PHYs. */ - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8071 - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8072 - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073 - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705 - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706 - case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726 -#endif + case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073: + /* Technically 10GBase-KR but report as 10GBase-SR*/ + case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726: case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727: case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727_NOC: DBPRINT(sc, BXE_INFO_LOAD, "%s(): Found 10GBase-SR media.\n", __FUNCTION__); sc->media = IFM_10G_SR; break; + case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705: + case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706: + DBPRINT(sc, BXE_INFO_LOAD, + "%s(): Found 10Gb twinax media.\n", __FUNCTION__); + sc->media = IFM_10G_TWINAX; + break; case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481: case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101: case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823: @@ -1811,10 +1855,71 @@ bxe_attach(device_t dev) __FILE__, __LINE__); sc->media = 0; rc = ENODEV; + } + + return (rc); +} + + +/* + * Device attach function. + * + * Allocates device resources, performs secondary chip identification, + * resets and initializes the hardware, and initializes driver instance + * variables. + * + * Returns: + * 0 = Success, Positive value on failure. + */ +static int +bxe_attach(device_t dev) +{ + struct bxe_softc *sc; + struct ifnet *ifp; + int rc; + + sc = device_get_softc(dev); + DBENTER(BXE_VERBOSE_LOAD | BXE_VERBOSE_RESET); + + sc->dev = dev; + sc->bxe_unit = device_get_unit(dev); + sc->bxe_func = pci_get_function(dev); + sc->bxe_flags = 0; + sc->state = BXE_STATE_CLOSED; + rc = 0; + bxe_set_tunables(sc); + + bxe_alloc_mutexes(sc); + + /* Prepare the tick routine. */ + callout_init(&sc->bxe_tick_callout, CALLOUT_MPSAFE); + + /* Enable bus master capability */ + pci_enable_busmaster(dev); + + if ((rc = bxe_alloc_pci_resources(sc)) != 0) + goto bxe_attach_fail; + + /* Put indirect address registers into a sane state. */ + pci_write_config(sc->dev, PCICFG_GRC_ADDRESS, + PCICFG_VENDOR_ID_OFFSET, 4); + REG_WR(sc, PXP2_REG_PGL_ADDR_88_F0 + BP_PORT(sc) * 16, 0); + REG_WR(sc, PXP2_REG_PGL_ADDR_8C_F0 + BP_PORT(sc) * 16, 0); + REG_WR(sc, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(sc) * 16, 0); + REG_WR(sc, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(sc) * 16, 0); + + /* Get hardware info from shared memory and validate data. */ + if (bxe_get_function_hwinfo(sc)) { + DBPRINT(sc, BXE_WARN, + "%s(): Failed to get hardware info!\n", __FUNCTION__); + rc = ENODEV; goto bxe_attach_fail; } /* Setup supported media options. */ + if ((rc = bxe_media_detect(sc)) != 0) + goto bxe_attach_fail; + ifmedia_init(&sc->bxe_ifmedia, IFM_IMASK, bxe_ifmedia_upd, bxe_ifmedia_status); ifmedia_add(&sc->bxe_ifmedia, @@ -1823,7 +1928,8 @@ bxe_attach(device_t dev) IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->bxe_ifmedia, IFM_ETHER | IFM_AUTO); - sc->bxe_ifmedia.ifm_media = sc->bxe_ifmedia.ifm_cur->ifm_media; + sc->bxe_ifmedia.ifm_media = + sc->bxe_ifmedia.ifm_cur->ifm_media; /* Set init arrays */ rc = bxe_init_firmware(sc); @@ -1877,18 +1983,6 @@ bxe_attach(device_t dev) if (!BP_NOMCP(sc)) bxe_undi_unload(sc); - /* Set TPA flag. */ - if (bxe_tpa_enable){ - sc->bxe_flags |= BXE_TPA_ENABLE_FLAG; - }else - sc->bxe_flags &= ~BXE_TPA_ENABLE_FLAG; - - /* Select the PCIe maximum read request size. */ - if (bxe_mrrs > 3) - sc->mrrs = 3; - else - sc->mrrs = bxe_mrrs; - /* * Select the RX and TX ring sizes. The actual * ring size for TX is complicated by the fact @@ -1904,10 +1998,6 @@ bxe_attach(device_t dev) /* Assume receive IP/TCP/UDP checksum is enabled. */ sc->rx_csum = 1; - /* Select the host coalescing tick count values. */ - sc->tx_ticks = bxe_tx_ticks; - sc->rx_ticks = bxe_rx_ticks; - /* Disable WoL. */ sc->wol = 0; @@ -1915,7 +2005,7 @@ bxe_attach(device_t dev) sc->mbuf_alloc_size = MCLBYTES; /* Allocate DMA memory resources. */ - if (bxe_dma_alloc(sc->bxe_dev)) { + if (bxe_dma_alloc(sc->dev)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 00:28:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 961B1106564A; Fri, 22 Apr 2011 00:28:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 1680F8FC0A; Fri, 22 Apr 2011 00:28:37 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p3M0SYCR011854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Apr 2011 10:28:36 +1000 Date: Fri, 22 Apr 2011 10:28:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rick Macklem In-Reply-To: <201104211238.p3LCcC1T096670@svn.freebsd.org> Message-ID: <20110422100947.P1371@besplex.bde.org> References: <201104211238.p3LCcC1T096670@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: r220921 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 00:28:38 -0000 On Thu, 21 Apr 2011, Rick Macklem wrote: > Log: > Revert r220906, since the vp isn't always locked when > nfscl_request() is called. It will need a more involved > patch. > > Modified: > head/sys/fs/nfsclient/nfs_clport.c > > Modified: head/sys/fs/nfsclient/nfs_clport.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 21 11:44:16 2011 (r220920) > +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 21 12:38:12 2011 (r220921) > @@ -819,8 +819,6 @@ nfscl_request(struct nfsrv_descript *nd, > int ret, vers; > struct nfsmount *nmp; > > - if ((vp->v_iflag & VI_DOOMED) != 0) > - return (EPERM); > nmp = VFSTONFS(vp->v_mount); > if (nd->nd_flag & ND_NFSV4) > vers = NFS_VER4; I was going to say that it obviously needs to be locked anyway since it is used for other things (vp->v_mount), and that assertions that it is locked (as suggested by kib@) would be ugly bloat (except for debugging) since any use of it obviously implies that it is locked. However, v_mount is special. It only needs the "u" lock. "u" means that only a reference is needed. However, complete assertions for this would be even uglier. To be complete, you would have a "u" assertion that the reference is held as well as an "i" assertion for v_iflag, with appropriate exclusiveness corresponding to which flags are accessed and/or acted on, plus more assertions for other fields in vp. Altogether there are about 10 different locks for vp fields. A function that accesses vnodes could easily need assertions for all of these to be complete. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 00:31:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA8E81065688; Fri, 22 Apr 2011 00:31:07 +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 A712A8FC1F; Fri, 22 Apr 2011 00:31: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 p3M0V765018907; Fri, 22 Apr 2011 00:31:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M0V7he018905; Fri, 22 Apr 2011 00:31:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201104220031.p3M0V7he018905@svn.freebsd.org> From: Xin LI Date: Fri, 22 Apr 2011 00:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220933 - stable/8/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 00:31:07 -0000 Author: delphij Date: Fri Apr 22 00:31:07 2011 New Revision: 220933 URL: http://svn.freebsd.org/changeset/base/220933 Log: MFC r219939: humanize_number(3) multiply the input number by 100, which could cause an integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel Modified: stable/8/lib/libutil/humanize_number.c Directory Properties: stable/8/lib/libutil/ (props changed) Modified: stable/8/lib/libutil/humanize_number.c ============================================================================== --- stable/8/lib/libutil/humanize_number.c Thu Apr 21 23:06:00 2011 (r220932) +++ stable/8/lib/libutil/humanize_number.c Fri Apr 22 00:31:07 2011 (r220933) @@ -43,11 +43,11 @@ __FBSDID("$FreeBSD$"); #include int -humanize_number(char *buf, size_t len, int64_t bytes, +humanize_number(char *buf, size_t len, int64_t quotient, const char *suffix, int scale, int flags) { const char *prefixes, *sep; - int b, i, r, maxscale, s1, s2, sign; + int i, r, remainder, maxscale, s1, s2, sign; int64_t divisor, max; size_t baselen; @@ -55,6 +55,8 @@ humanize_number(char *buf, size_t len, i assert(suffix != NULL); assert(scale >= 0); + remainder = 0; + if (flags & HN_DIVISOR_1000) { /* SI for decimal multiplies */ divisor = 1000; @@ -86,13 +88,12 @@ humanize_number(char *buf, size_t len, i if (len > 0) buf[0] = '\0'; - if (bytes < 0) { + if (quotient < 0) { sign = -1; - bytes *= -100; + quotient = -quotient; baselen = 3; /* sign, digit, prefix */ } else { sign = 1; - bytes *= 100; baselen = 2; /* digit, prefix */ } if (flags & HN_NOSPACE) @@ -109,7 +110,7 @@ humanize_number(char *buf, size_t len, i if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ - for (max = 100, i = len - baselen; i-- > 0;) + for (max = 1, i = len - baselen; i-- > 0;) max *= 10; /* @@ -117,30 +118,37 @@ humanize_number(char *buf, size_t len, i * If there will be an overflow by the rounding below, * divide once more. */ - for (i = 0; bytes >= max - 50 && i < maxscale; i++) - bytes /= divisor; + for (i = 0; + (quotient >= max || (quotient == max - 1 && remainder >= 950)) && + i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } if (scale & HN_GETSCALE) return (i); - } else - for (i = 0; i < scale && i < maxscale; i++) - bytes /= divisor; + } else { + for (i = 0; i < scale && i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } + } /* If a value <= 9.9 after rounding and ... */ - if (bytes < 995 && i > 0 && flags & HN_DECIMAL) { + if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { /* baselen + \0 + .N */ if (len < baselen + 1 + 2) return (-1); - b = ((int)bytes + 5) / 10; - s1 = b / 10; - s2 = b % 10; + s1 = (int)quotient + ((remainder + 50) / 1000); + s2 = ((remainder + 50) / 100) % 10; r = snprintf(buf, len, "%d%s%d%s%s%s", sign * s1, localeconv()->decimal_point, s2, sep, SCALE2PREFIX(i), suffix); } else r = snprintf(buf, len, "%" PRId64 "%s%s%s", - sign * ((bytes + 50) / 100), + sign * (quotient + (remainder + 50) / 1000), sep, SCALE2PREFIX(i), suffix); return (r); } + From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 00:32:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D3141065679; Fri, 22 Apr 2011 00:32:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39B9E8FC1C; Fri, 22 Apr 2011 00:32: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 p3M0WH6k018992; Fri, 22 Apr 2011 00:32:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M0WH3M018990; Fri, 22 Apr 2011 00:32:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201104220032.p3M0WH3M018990@svn.freebsd.org> From: Xin LI Date: Fri, 22 Apr 2011 00:32: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: r220934 - stable/7/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 00:32:17 -0000 Author: delphij Date: Fri Apr 22 00:32:16 2011 New Revision: 220934 URL: http://svn.freebsd.org/changeset/base/220934 Log: MFC r219939: humanize_number(3) multiply the input number by 100, which could cause an integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel Modified: stable/7/lib/libutil/humanize_number.c Directory Properties: stable/7/lib/libutil/ (props changed) Modified: stable/7/lib/libutil/humanize_number.c ============================================================================== --- stable/7/lib/libutil/humanize_number.c Fri Apr 22 00:31:07 2011 (r220933) +++ stable/7/lib/libutil/humanize_number.c Fri Apr 22 00:32:16 2011 (r220934) @@ -50,11 +50,11 @@ __FBSDID("$FreeBSD$"); #include int -humanize_number(char *buf, size_t len, int64_t bytes, +humanize_number(char *buf, size_t len, int64_t quotient, const char *suffix, int scale, int flags) { const char *prefixes, *sep; - int b, i, r, maxscale, s1, s2, sign; + int i, r, remainder, maxscale, s1, s2, sign; int64_t divisor, max; size_t baselen; @@ -62,6 +62,8 @@ humanize_number(char *buf, size_t len, i assert(suffix != NULL); assert(scale >= 0); + remainder = 0; + if (flags & HN_DIVISOR_1000) { /* SI for decimal multiplies */ divisor = 1000; @@ -93,13 +95,12 @@ humanize_number(char *buf, size_t len, i if (len > 0) buf[0] = '\0'; - if (bytes < 0) { + if (quotient < 0) { sign = -1; - bytes *= -100; + quotient = -quotient; baselen = 3; /* sign, digit, prefix */ } else { sign = 1; - bytes *= 100; baselen = 2; /* digit, prefix */ } if (flags & HN_NOSPACE) @@ -116,7 +117,7 @@ humanize_number(char *buf, size_t len, i if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ - for (max = 100, i = len - baselen; i-- > 0;) + for (max = 1, i = len - baselen; i-- > 0;) max *= 10; /* @@ -124,30 +125,37 @@ humanize_number(char *buf, size_t len, i * If there will be an overflow by the rounding below, * divide once more. */ - for (i = 0; bytes >= max - 50 && i < maxscale; i++) - bytes /= divisor; + for (i = 0; + (quotient >= max || (quotient == max - 1 && remainder >= 950)) && + i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } if (scale & HN_GETSCALE) return (i); - } else - for (i = 0; i < scale && i < maxscale; i++) - bytes /= divisor; + } else { + for (i = 0; i < scale && i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } + } /* If a value <= 9.9 after rounding and ... */ - if (bytes < 995 && i > 0 && flags & HN_DECIMAL) { + if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { /* baselen + \0 + .N */ if (len < baselen + 1 + 2) return (-1); - b = ((int)bytes + 5) / 10; - s1 = b / 10; - s2 = b % 10; + s1 = (int)quotient + ((remainder + 50) / 1000); + s2 = ((remainder + 50) / 100) % 10; r = snprintf(buf, len, "%d%s%d%s%s%s", sign * s1, localeconv()->decimal_point, s2, sep, SCALE2PREFIX(i), suffix); } else r = snprintf(buf, len, "%" PRId64 "%s%s%s", - sign * ((bytes + 50) / 100), + sign * (quotient + (remainder + 50) / 1000), sep, SCALE2PREFIX(i), suffix); return (r); } + From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 00:44:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55F2B106564A; Fri, 22 Apr 2011 00:44:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 426398FC0A; Fri, 22 Apr 2011 00:44: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 p3M0iSK4019450; Fri, 22 Apr 2011 00:44:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M0iS1q019445; Fri, 22 Apr 2011 00:44:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104220044.p3M0iS1q019445@svn.freebsd.org> From: Adrian Chadd Date: Fri, 22 Apr 2011 00:44: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: r220935 - in head: sbin/ifconfig sys/dev/mwl sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 00:44:28 -0000 Author: adrian Date: Fri Apr 22 00:44:27 2011 New Revision: 220935 URL: http://svn.freebsd.org/changeset/base/220935 Log: Revert r220907 and r220915. Changing the size of struct ieee80211_mimo_info changes the STA info data, breaking ifconfig in general. Modified: head/sbin/ifconfig/ifieee80211.c head/sys/dev/mwl/if_mwl.c head/sys/net80211/_ieee80211.h head/sys/net80211/ieee80211_node.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Fri Apr 22 00:32:16 2011 (r220934) +++ head/sbin/ifconfig/ifieee80211.c Fri Apr 22 00:44:27 2011 (r220935) @@ -3139,13 +3139,11 @@ static void printmimo(const struct ieee80211_mimo_info *mi) { /* NB: don't muddy display unless there's something to show */ - /* XXX should check flags and n_rx_chains */ - if (mi->rssi_ctl[0] != 0 || mi->rssi_ctl[1] != 0 || mi->rssi_ctl[2] != 0) { + if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) { /* XXX ignore EVM for now */ - /* XXX ignore EXT for now */ printf(" (rssi %d:%d:%d nf %d:%d:%d)", - mi->rssi_ctl[0], mi->rssi_ctl[1], mi->rssi_ctl[2], - mi->noise_ctl[0], mi->noise_ctl[1], mi->noise_ctl[2]); + mi->rssi[0], mi->rssi[1], mi->rssi[2], + mi->noise[0], mi->noise[1], mi->noise[2]); } } Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Fri Apr 22 00:32:16 2011 (r220934) +++ head/sys/dev/mwl/if_mwl.c Fri Apr 22 00:44:27 2011 (r220935) @@ -2527,13 +2527,13 @@ mwl_node_getmimoinfo(const struct ieee80 if (mn->mn_ai.rssi_c > rssi_max) rssi_max = mn->mn_ai.rssi_c; - CVT(mi->rssi_ctl[0], mn->mn_ai.rssi_a); - CVT(mi->rssi_ctl[1], mn->mn_ai.rssi_b); - CVT(mi->rssi_ctl[2], mn->mn_ai.rssi_c); - - mi->noise_ctl[0] = mn->mn_ai.nf_a; - mi->noise_ctl[1] = mn->mn_ai.nf_b; - mi->noise_ctl[2] = mn->mn_ai.nf_c; + CVT(mi->rssi[0], mn->mn_ai.rssi_a); + CVT(mi->rssi[1], mn->mn_ai.rssi_b); + CVT(mi->rssi[2], mn->mn_ai.rssi_c); + + mi->noise[0] = mn->mn_ai.nf_a; + mi->noise[1] = mn->mn_ai.nf_b; + mi->noise[2] = mn->mn_ai.nf_c; #undef CVT } Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Fri Apr 22 00:32:16 2011 (r220934) +++ head/sys/net80211/_ieee80211.h Fri Apr 22 00:44:27 2011 (r220935) @@ -395,14 +395,9 @@ struct ieee80211_regdomain { * XXX This doesn't yet export both ctl/ext chain details */ struct ieee80211_mimo_info { - uint16_t flags; /* IEEE80211_R_* flags */ - uint8_t n_rx_chains; /* number of RX chains involved */ - uint8_t pad[1]; - int8_t rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */ - int8_t noise_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */ - int8_t rssi_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext rssi */ - int8_t noise_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext noise floor */ - uint32_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; - /* EVM data */ + int8_t rssi[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */ + int8_t noise[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */ + uint8_t pad[2]; + uint32_t evm[3]; /* EVM data */ }; #endif /* _NET80211__IEEE80211_H_ */ Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Fri Apr 22 00:32:16 2011 (r220934) +++ head/sys/net80211/ieee80211_node.c Fri Apr 22 00:44:27 2011 (r220935) @@ -1091,31 +1091,19 @@ node_getmimoinfo(const struct ieee80211_ bzero(info, sizeof(*info)); - /* XXX set flags - evm, ctl/ext data, etc. */ - info->n_rx_chains = ni->ni_mimo_chains; - for (i = 0; i < ni->ni_mimo_chains; i++) { - /* Ctl channel */ avgrssi = ni->ni_mimo_rssi_ctl[i]; if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) { - info->rssi_ctl[i] = 0; + info->rssi[i] = 0; } else { rssi = IEEE80211_RSSI_GET(avgrssi); - info->rssi_ctl[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; + info->rssi[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; } - info->noise_ctl[i] = ni->ni_mimo_noise_ctl[i]; - - /* Ext channel */ - avgrssi = ni->ni_mimo_rssi_ext[i]; - if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) { - info->rssi_ext[i] = 0; - } else { - rssi = IEEE80211_RSSI_GET(avgrssi); - info->rssi_ext[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi; - } - info->noise_ext[i] = ni->ni_mimo_noise_ext[i]; + info->noise[i] = ni->ni_mimo_noise_ctl[i]; } + /* XXX ext radios? */ + /* XXX EVM? */ } From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 02:22:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABBE7106566C; Fri, 22 Apr 2011 02:22:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9765D8FC12; Fri, 22 Apr 2011 02:22: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 p3M2MaVV022490; Fri, 22 Apr 2011 02:22:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M2Ma3w022484; Fri, 22 Apr 2011 02:22:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104220222.p3M2Ma3w022484@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 22 Apr 2011 02:22: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: r220936 - in stable/8/sys/dev/cxgbe: . common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 02:22:36 -0000 Author: np Date: Fri Apr 22 02:22:36 2011 New Revision: 220936 URL: http://svn.freebsd.org/changeset/base/220936 Log: MFC r220649, r220874 r220649: Fix a couple of bad races that can occur when a cxgbe interface is taken down. The ingress queue lock was unused and has been removed as part of these changes. - An in-flight egress update from the SGE must be handled before the queue that requested it is destroyed. Wait for the update to arrive. - Interrupt handlers must stop processing rx events for a queue before the queue is destroyed. Events that have not yet been processed should be ignored once the queue disappears. r220874: Use Toeplitz hash for RSS. Modified: stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/common/t4_hw.c stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/8/sys/dev/cxgbe/adapter.h Fri Apr 22 00:44:27 2011 (r220935) +++ stable/8/sys/dev/cxgbe/adapter.h Fri Apr 22 02:22:36 2011 (r220936) @@ -227,6 +227,11 @@ enum { /* iq flags */ IQ_ALLOCATED = (1 << 1), /* firmware resources allocated */ IQ_STARTED = (1 << 2), /* started */ + + /* iq state */ + IQS_DISABLED = 0, + IQS_BUSY = 1, + IQS_IDLE = 2, }; /* @@ -244,7 +249,7 @@ struct sge_iq { iq_intr_handler_t *handler; __be64 *desc; /* KVA of descriptor ring */ - struct mtx iq_lock; + volatile uint32_t state; struct adapter *adapter; const __be64 *cdesc; /* current descriptor */ uint8_t gen; /* generation bit */ @@ -445,22 +450,12 @@ struct adapter { #define PORT_LOCK_ASSERT_OWNED(pi) mtx_assert(&(pi)->pi_lock, MA_OWNED) #define PORT_LOCK_ASSERT_NOTOWNED(pi) mtx_assert(&(pi)->pi_lock, MA_NOTOWNED) -#define IQ_LOCK(iq) mtx_lock(&(iq)->iq_lock) -#define IQ_UNLOCK(iq) mtx_unlock(&(iq)->iq_lock) -#define IQ_LOCK_ASSERT_OWNED(iq) mtx_assert(&(iq)->iq_lock, MA_OWNED) -#define IQ_LOCK_ASSERT_NOTOWNED(iq) mtx_assert(&(iq)->iq_lock, MA_NOTOWNED) - #define FL_LOCK(fl) mtx_lock(&(fl)->fl_lock) #define FL_TRYLOCK(fl) mtx_trylock(&(fl)->fl_lock) #define FL_UNLOCK(fl) mtx_unlock(&(fl)->fl_lock) #define FL_LOCK_ASSERT_OWNED(fl) mtx_assert(&(fl)->fl_lock, MA_OWNED) #define FL_LOCK_ASSERT_NOTOWNED(fl) mtx_assert(&(fl)->fl_lock, MA_NOTOWNED) -#define RXQ_LOCK(rxq) IQ_LOCK(&(rxq)->iq) -#define RXQ_UNLOCK(rxq) IQ_UNLOCK(&(rxq)->iq) -#define RXQ_LOCK_ASSERT_OWNED(rxq) IQ_LOCK_ASSERT_OWNED(&(rxq)->iq) -#define RXQ_LOCK_ASSERT_NOTOWNED(rxq) IQ_LOCK_ASSERT_NOTOWNED(&(rxq)->iq) - #define RXQ_FL_LOCK(rxq) FL_LOCK(&(rxq)->fl) #define RXQ_FL_UNLOCK(rxq) FL_UNLOCK(&(rxq)->fl) #define RXQ_FL_LOCK_ASSERT_OWNED(rxq) FL_LOCK_ASSERT_OWNED(&(rxq)->fl) @@ -586,6 +581,8 @@ void t4_intr_fwd(void *); void t4_intr_err(void *); void t4_intr_evt(void *); void t4_intr_data(void *); +void t4_evt_rx(void *); +void t4_eth_rx(void *); int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); Modified: stable/8/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/8/sys/dev/cxgbe/common/t4_hw.c Fri Apr 22 00:44:27 2011 (r220935) +++ stable/8/sys/dev/cxgbe/common/t4_hw.c Fri Apr 22 02:22:36 2011 (r220936) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include "t4_regs_values.h" #include "t4fw_interface.h" +#undef msleep +#define msleep(x) DELAY((x) * 1000) /** * t4_wait_op_done_val - wait until an operation is completed Modified: stable/8/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/8/sys/dev/cxgbe/osdep.h Fri Apr 22 00:44:27 2011 (r220935) +++ stable/8/sys/dev/cxgbe/osdep.h Fri Apr 22 02:22:36 2011 (r220936) @@ -74,8 +74,6 @@ typedef boolean_t bool; #define false FALSE #define true TRUE -#undef msleep -#define msleep(x) DELAY((x) * 1000) #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Fri Apr 22 00:44:27 2011 (r220935) +++ stable/8/sys/dev/cxgbe/t4_main.c Fri Apr 22 02:22:36 2011 (r220936) @@ -378,6 +378,7 @@ t4_attach(device_t dev) rc = -t4_config_glbl_rss(sc, sc->mbox, FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL, F_FW_RSS_GLB_CONFIG_CMD_TNLMAPEN | + F_FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ | F_FW_RSS_GLB_CONFIG_CMD_TNLALLLKP); if (rc != 0) { device_printf(dev, @@ -1038,8 +1039,21 @@ static void cxgbe_qflush(struct ifnet *ifp) { struct port_info *pi = ifp->if_softc; + struct sge_txq *txq; + int i; + struct mbuf *m; - device_printf(pi->dev, "%s unimplemented.\n", __func__); + /* queues do not exist if !IFF_DRV_RUNNING. */ + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + for_each_txq(pi, i, txq) { + TXQ_LOCK(txq); + m_freem(txq->m); + while ((m = buf_ring_dequeue_sc(txq->eq.br)) != NULL) + m_freem(m); + TXQ_UNLOCK(txq); + } + } + if_qflush(ifp); } static int @@ -2673,8 +2687,11 @@ cxgbe_txq_start(void *arg, int count) struct sge_txq *txq = arg; TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_CRFLUSHED; - txq_start(txq->ifp, txq); + if (txq->eq.flags & EQ_CRFLUSHED) { + txq->eq.flags &= ~EQ_CRFLUSHED; + txq_start(txq->ifp, txq); + } else + wakeup_one(txq); /* txq is going away, wakeup free_txq */ TXQ_UNLOCK(txq); } Modified: stable/8/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_sge.c Fri Apr 22 00:44:27 2011 (r220935) +++ stable/8/sys/dev/cxgbe/t4_sge.c Fri Apr 22 02:22:36 2011 (r220936) @@ -279,7 +279,7 @@ t4_setup_adapter_iqs(struct adapter *sc) } } - handler = t4_intr_evt; + handler = t4_evt_rx; i = 0; /* forward fwq's interrupt to the first fiq */ } else { handler = NULL; @@ -345,7 +345,7 @@ t4_setup_eth_queues(struct port_info *pi device_get_nameunit(pi->dev), i); init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, RX_IQ_ESIZE, - sc->flags & INTR_FWD ? t4_intr_data: NULL, name); + sc->flags & INTR_FWD ? t4_eth_rx : NULL, name); snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); @@ -428,6 +428,9 @@ t4_intr_fwd(void *arg) int ndesc_pending = 0, ndesc_total = 0; int qid; + if (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_BUSY)) + return; + while (is_new_response(iq, &ctrl)) { rmb(); @@ -460,6 +463,8 @@ t4_intr_fwd(void *arg) V_CIDXINC(ndesc_pending) | V_INGRESSQID((u32)iq->cntxt_id) | V_SEINTARM(iq->intr_params)); } + + atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE); } /* Deals with error interrupts */ @@ -479,6 +484,32 @@ void t4_intr_evt(void *arg) { struct sge_iq *iq = arg; + + if (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_BUSY)) + return; + + t4_evt_rx(arg); + + atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE); +} + +void +t4_intr_data(void *arg) +{ + struct sge_iq *iq = arg; + + if (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_BUSY)) + return; + + t4_eth_rx(arg); + + atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE); +} + +void +t4_evt_rx(void *arg) +{ + struct sge_iq *iq = arg; struct adapter *sc = iq->adapter; struct rsp_ctrl *ctrl; const struct rss_header *rss; @@ -537,7 +568,7 @@ t4_intr_evt(void *arg) } void -t4_intr_data(void *arg) +t4_eth_rx(void *arg) { struct sge_rxq *rxq = arg; struct sge_iq *iq = arg; @@ -1017,8 +1048,6 @@ alloc_iq_fl(struct port_info *pi, struct if (pi == NULL) pi = sc->port[0]; - mtx_init(&iq->iq_lock, iq->lockname, NULL, MTX_DEF); - len = iq->qsize * iq->esize; rc = alloc_ring(sc, len, &iq->desc_tag, &iq->desc_map, &iq->ba, (void **)&iq->desc); @@ -1148,6 +1177,7 @@ alloc_iq_fl(struct port_info *pi, struct } /* Enable IQ interrupts */ + atomic_store_rel_32(&iq->state, IQS_IDLE); t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(iq->intr_params) | V_INGRESSQID(iq->cntxt_id)); @@ -1179,6 +1209,10 @@ free_iq_fl(struct port_info *pi, struct return (rc); } iq->flags &= ~IQ_STARTED; + + /* Synchronize with the interrupt handler */ + while (!atomic_cmpset_32(&iq->state, IQS_IDLE, IQS_DISABLED)) + pause("iqfree", hz / 1000); } if (iq->flags & IQ_ALLOCATED) { @@ -1196,9 +1230,6 @@ free_iq_fl(struct port_info *pi, struct free_ring(sc, iq->desc_tag, iq->desc_map, iq->ba, iq->desc); - if (mtx_initialized(&iq->iq_lock)) - mtx_destroy(&iq->iq_lock); - bzero(iq, sizeof(*iq)); if (fl) { @@ -1425,6 +1456,27 @@ free_txq(struct port_info *pi, struct sg struct sge_eq *eq = &txq->eq; if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) { + + /* + * Wait for the response to a credit flush if there's one + * pending. Clearing the flag tells handle_sge_egr_update or + * cxgbe_txq_start (depending on how far the response has made + * it) that they should ignore the response and wake up free_txq + * instead. + * + * The interface has been marked down by the time we get here + * (both IFF_UP and IFF_DRV_RUNNING cleared). qflush has + * emptied the tx buf_rings and we know nothing new is being + * queued for tx so we don't have to worry about a new credit + * flush request. + */ + TXQ_LOCK(txq); + if (eq->flags & EQ_CRFLUSHED) { + eq->flags &= ~EQ_CRFLUSHED; + msleep(txq, &eq->eq_lock, 0, "crflush", 0); + } + TXQ_UNLOCK(txq); + rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id); if (rc != 0) { device_printf(pi->dev, @@ -2444,13 +2496,14 @@ handle_sge_egr_update(struct adapter *sc struct port_info *pi; txq = (void *)s->eqmap[qid - s->eq_start]; - - KASSERT(txq->eq.flags & EQ_CRFLUSHED, - ("%s: tx queue %p not expecting an update.", __func__, txq)); - - pi = txq->ifp->if_softc; - taskqueue_enqueue(pi->tq, &txq->resume_tx); - txq->egr_update++; + TXQ_LOCK(txq); + if (txq->eq.flags & EQ_CRFLUSHED) { + pi = txq->ifp->if_softc; + taskqueue_enqueue(pi->tq, &txq->resume_tx); + txq->egr_update++; + } else + wakeup_one(txq); /* txq is going away, wakeup free_txq */ + TXQ_UNLOCK(txq); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 07:26:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 304FE106564A; Fri, 22 Apr 2011 07:26: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 1FBCD8FC13; Fri, 22 Apr 2011 07:26: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 p3M7QAOj031649; Fri, 22 Apr 2011 07:26:10 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M7Q9pZ031647; Fri, 22 Apr 2011 07:26:09 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201104220726.p3M7Q9pZ031647@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 22 Apr 2011 07:26: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: r220937 - 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, 22 Apr 2011 07:26:10 -0000 Author: jh Date: Fri Apr 22 07:26:09 2011 New Revision: 220937 URL: http://svn.freebsd.org/changeset/base/220937 Log: Utilize vfs_sanitizeopts() in vfs_mergeopts() to merge options. Because vfs_sanitizeopts() can handle "ro" and "rw" options properly, there is no more need to add "noro" in vfs_donmount() to cancel "ro". This also fixes a problem of canceling options beginning with "no". For example, "noatime" didn't cancel "nonoatime". Thus it was possible that both "noatime" and "nonoatime" were active at the same time. Reviewed by: bde Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Fri Apr 22 02:22:36 2011 (r220936) +++ head/sys/kern/vfs_mount.c Fri Apr 22 07:26:09 2011 (r220937) @@ -336,50 +336,28 @@ bad: * Merge the old mount options with the new ones passed * in the MNT_UPDATE case. * - * XXX This function will keep a "nofoo" option in the - * new options if there is no matching "foo" option - * to be cancelled in the old options. This is a bug - * if the option's canonical name is "foo". E.g., "noro" - * shouldn't end up in the mount point's active options, - * but it can. + * XXX: This function will keep a "nofoo" option in the new + * options. E.g, if the option's canonical name is "foo", + * "nofoo" ends up in the mount point's active options. */ static void -vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *opts) +vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *oldopts) { - struct vfsopt *opt, *opt2, *new; + struct vfsopt *opt, *new; - TAILQ_FOREACH(opt, opts, link) { - /* - * Check that this option hasn't been redefined - * nor cancelled with a "no" mount option. - */ - opt2 = TAILQ_FIRST(toopts); - while (opt2 != NULL) { - if (strcmp(opt2->name, opt->name) == 0) - goto next; - if (strncmp(opt2->name, "no", 2) == 0 && - strcmp(opt2->name + 2, opt->name) == 0) { - vfs_freeopt(toopts, opt2); - goto next; - } - opt2 = TAILQ_NEXT(opt2, link); - } - /* We want this option, duplicate it. */ + TAILQ_FOREACH(opt, oldopts, link) { new = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK); - new->name = malloc(strlen(opt->name) + 1, M_MOUNT, M_WAITOK); - strcpy(new->name, opt->name); + new->name = strdup(opt->name, M_MOUNT); if (opt->len != 0) { new->value = malloc(opt->len, M_MOUNT, M_WAITOK); bcopy(opt->value, new->value, opt->len); - } else { + } else new->value = NULL; - } new->len = opt->len; new->seen = opt->seen; - TAILQ_INSERT_TAIL(toopts, new, link); -next: - continue; + TAILQ_INSERT_HEAD(toopts, new, link); } + vfs_sanitizeopts(toopts); } /* @@ -542,13 +520,12 @@ int vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) { struct vfsoptlist *optlist; - struct vfsopt *opt, *noro_opt, *tmp_opt; + struct vfsopt *opt, *tmp_opt; char *fstype, *fspath, *errmsg; int error, fstypelen, fspathlen, errmsg_len, errmsg_pos; - int has_rw, has_noro; errmsg = fspath = NULL; - errmsg_len = has_noro = has_rw = fspathlen = 0; + errmsg_len = fspathlen = 0; errmsg_pos = -1; error = vfs_buildopts(fsoptions, &optlist); @@ -641,14 +618,10 @@ vfs_donmount(struct thread *td, int fsfl free(opt->name, M_MOUNT); opt->name = strdup("nonosymfollow", M_MOUNT); } - else if (strcmp(opt->name, "noro") == 0) { + else if (strcmp(opt->name, "noro") == 0) fsflags &= ~MNT_RDONLY; - has_noro = 1; - } - else if (strcmp(opt->name, "rw") == 0) { + else if (strcmp(opt->name, "rw") == 0) fsflags &= ~MNT_RDONLY; - has_rw = 1; - } else if (strcmp(opt->name, "ro") == 0) fsflags |= MNT_RDONLY; else if (strcmp(opt->name, "rdonly") == 0) { @@ -665,22 +638,6 @@ vfs_donmount(struct thread *td, int fsfl } /* - * If "rw" was specified as a mount option, and we - * are trying to update a mount-point from "ro" to "rw", - * we need a mount option "noro", since in vfs_mergeopts(), - * "noro" will cancel "ro", but "rw" will not do anything. - */ - if (has_rw && !has_noro) { - noro_opt = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK); - noro_opt->name = strdup("noro", M_MOUNT); - noro_opt->value = NULL; - noro_opt->len = 0; - noro_opt->pos = -1; - noro_opt->seen = 1; - TAILQ_INSERT_TAIL(optlist, noro_opt, link); - } - - /* * Be ultra-paranoid about making sure the type and fspath * variables will fit in our mp buffers, including the * terminating NUL. From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 07:50:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A801106566C; Fri, 22 Apr 2011 07:50:00 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 425238FC0C; Fri, 22 Apr 2011 07:50:00 +0000 (UTC) Received: from a91-153-123-205.elisa-laajakaista.fi (a91-153-123-205.elisa-laajakaista.fi [91.153.123.205]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 7496713984F; Fri, 22 Apr 2011 10:49:54 +0300 (EEST) Date: Fri, 22 Apr 2011 10:49:54 +0300 From: Jaakko Heinonen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20110422074953.GA53521@a91-153-123-205.elisa-laajakaista.fi> References: <201104220726.p3M7Q9pZ031647@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104220726.p3M7Q9pZ031647@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: jamie@FreeBSD.org Subject: Re: svn commit: r220937 - 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, 22 Apr 2011 07:50:00 -0000 (jamie@ Cc'd because kern_jail.c also uses the vfsopt framework.) On 2011-04-22, Jaakko Heinonen wrote: > + * XXX: This function will keep a "nofoo" option in the new > + * options. E.g, if the option's canonical name is "foo", > + * "nofoo" ends up in the mount point's active options. I have a follow-up patch which adds a flags field to the vfsopt struct and changes vfs_filteropt() to mark options which should not become active but only cancel other options with a flag. This allows vfs_mergeopts() to know which options should be made active. With these changes we can remove the "foo" -> "nonofoo" conversions from vfs_donmount() for options whose canonical name starts with "no". The patch: http://people.freebsd.org/~jh/patches/nmount-VFSOPT_CANCELONLY.diff -- Jaakko From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:22:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555301065676; Fri, 22 Apr 2011 09:22:28 +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 EBF9A8FC1E; Fri, 22 Apr 2011 09:22: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 p3M9MRBv035113; Fri, 22 Apr 2011 09:22:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9MRHm035104; Fri, 22 Apr 2011 09:22:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220922.p3M9MRHm035104@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:22: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: r220938 - 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: Fri, 22 Apr 2011 09:22:28 -0000 Author: marius Date: Fri Apr 22 09:22:27 2011 New Revision: 220938 URL: http://svn.freebsd.org/changeset/base/220938 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/dev/mii/brgphyreg.h head/sys/dev/mii/ciphyreg.h head/sys/dev/mii/e1000phy.c head/sys/dev/mii/e1000phyreg.h head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h head/sys/dev/mii/rgephyreg.h head/sys/dev/mii/xmphyreg.h Modified: head/sys/dev/mii/brgphyreg.h ============================================================================== --- head/sys/dev/mii/brgphyreg.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/brgphyreg.h Fri Apr 22 09:22:27 2011 (r220938) @@ -59,7 +59,7 @@ #define BRGPHY_BMSR_EXTSTS 0x0100 /* Extended status present */ #define BRGPHY_BMSR_PRESUB 0x0040 /* Preamble surpression */ #define BRGPHY_BMSR_ACOMP 0x0020 /* Autoneg complete */ -#define BRGPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occured */ +#define BRGPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occurred */ #define BRGPHY_BMSR_ANEG 0x0008 /* Autoneg capable */ #define BRGPHY_BMSR_LINK 0x0004 /* Link status */ #define BRGPHY_BMSR_JABBER 0x0002 /* Jabber detected */ Modified: head/sys/dev/mii/ciphyreg.h ============================================================================== --- head/sys/dev/mii/ciphyreg.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/ciphyreg.h Fri Apr 22 09:22:27 2011 (r220938) @@ -68,7 +68,7 @@ #define CIPHY_BMSR_EXTSTS 0x0100 /* Extended status present */ #define CIPHY_BMSR_PRESUB 0x0040 /* Preamble surpression */ #define CIPHY_BMSR_ACOMP 0x0020 /* Autoneg complete */ -#define CIPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occured */ +#define CIPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occurred */ #define CIPHY_BMSR_ANEG 0x0008 /* Autoneg capable */ #define CIPHY_BMSR_LINK 0x0004 /* Link status */ #define CIPHY_BMSR_JABBER 0x0002 /* Jabber detected */ @@ -170,7 +170,7 @@ /* Vendor-specific PHY registers */ -/* 100baseTX status extention register */ +/* 100baseTX status extension register */ #define CIPHY_MII_100STS 0x10 #define CIPHY_100STS_DESLCK 0x8000 /* descrambler locked */ #define CIPHY_100STS_LKCERR 0x4000 /* lock error detected/lock lost */ @@ -181,7 +181,7 @@ #define CIPHY_100STS_SSDERR 0x0200 /* false carrier error detected */ #define CIPHY_100STS_ESDERR 0x0100 /* premature end of stream error */ -/* 1000BT status extention register #2 */ +/* 1000BT status extension register #2 */ #define CIPHY_MII_1000STS2 0x11 #define CIPHY_1000STS2_DESLCK 0x8000 /* descrambler locked */ #define CIPHY_1000STS2_LKCERR 0x4000 /* lock error detected/lock lost */ @@ -191,7 +191,7 @@ #define CIPHY_1000STS2_TXERR 0x0400 /* transmit error detected */ #define CIPHY_1000STS2_SSDERR 0x0200 /* false carrier error detected */ #define CIPHY_1000STS2_ESDERR 0x0100 /* premature end of stream error */ -#define CIPHY_1000STS2_CARREXT 0x0080 /* carrier extention err detected */ +#define CIPHY_1000STS2_CARREXT 0x0080 /* carrier extension err detected */ #define CIPHY_1000STS2_BCM5400 0x0040 /* non-complient BCM5400 detected */ /* Bypass control register */ @@ -332,7 +332,7 @@ #define CIPHY_LED_LINKACTBLINK 0x0004 /* enable link/activity LED blink */ #define CIPHY_LED_BLINKRATE 0x0002 /* blink rate 0=10hz, 1=5hz */ -/* Auxilliary control and status register */ +/* Auxiliary control and status register */ #define CIPHY_MII_AUXCSR 0x1C #define CIPHY_AUXCSR_ANEGDONE 0x8000 /* Autoneg complete */ #define CIPHY_AUXCSR_ANEGOFF 0x4000 /* Autoneg disabled */ Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/e1000phy.c Fri Apr 22 09:22:27 2011 (r220938) @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Additonal Copyright (c) 2001 by Traakan Software under same licence. + * Additional Copyright (c) 2001 by Traakan Software under same licence. * Secondary Author: Matthew Jacob */ Modified: head/sys/dev/mii/e1000phyreg.h ============================================================================== --- head/sys/dev/mii/e1000phyreg.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/e1000phyreg.h Fri Apr 22 09:22:27 2011 (r220938) @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Additonal Copyright (c) 2001 by Traakan Software under same licence. + * Additional Copyright (c) 2001 by Traakan Software under same licence. * Secondary Author: Matthew Jacob */ Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/mii_physubr.c Fri Apr 22 09:22:27 2011 (r220938) @@ -109,7 +109,7 @@ mii_phy_setmedia(struct mii_softc *sc) /* * Force renegotiation if MIIF_DOPAUSE or MIIF_FORCEANEG. * The former is necessary as we might switch from flow- - * control advertisment being off to on or vice versa. + * control advertisement being off to on or vice versa. */ if ((PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) == 0 || (sc->mii_flags & (MIIF_DOPAUSE | MIIF_FORCEANEG)) != 0) Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/miivar.h Fri Apr 22 09:22:27 2011 (r220938) @@ -134,7 +134,7 @@ typedef struct mii_softc mii_softc_t; #define MIIF_IS_HPNA 0x00000200 /* is a HomePNA device */ #define MIIF_FORCEANEG 0x00000400 /* force auto-negotiation */ #define MIIF_NOMANPAUSE 0x00100000 /* no manual PAUSE selection */ -#define MIIF_FORCEPAUSE 0x00200000 /* force PAUSE advertisment */ +#define MIIF_FORCEPAUSE 0x00200000 /* force PAUSE advertisement */ #define MIIF_MACPRIV0 0x01000000 /* private to the MAC driver */ #define MIIF_MACPRIV1 0x02000000 /* private to the MAC driver */ #define MIIF_MACPRIV2 0x04000000 /* private to the MAC driver */ Modified: head/sys/dev/mii/rgephyreg.h ============================================================================== --- head/sys/dev/mii/rgephyreg.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/rgephyreg.h Fri Apr 22 09:22:27 2011 (r220938) @@ -66,7 +66,7 @@ #define RGEPHY_BMSR_EXTSTS 0x0100 /* Extended status present */ #define RGEPHY_BMSR_PRESUB 0x0040 /* Preamble surpression */ #define RGEPHY_BMSR_ACOMP 0x0020 /* Autoneg complete */ -#define RGEPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occured */ +#define RGEPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occurred */ #define RGEPHY_BMSR_ANEG 0x0008 /* Autoneg capable */ #define RGEPHY_BMSR_LINK 0x0004 /* Link status */ #define RGEPHY_BMSR_JABBER 0x0002 /* Jabber detected */ Modified: head/sys/dev/mii/xmphyreg.h ============================================================================== --- head/sys/dev/mii/xmphyreg.h Fri Apr 22 07:26:09 2011 (r220937) +++ head/sys/dev/mii/xmphyreg.h Fri Apr 22 09:22:27 2011 (r220938) @@ -51,7 +51,7 @@ #define XMPHY_MII_BMSR 0x01 #define XMPHY_BMSR_EXTSTS 0x0100 /* Extended status present */ #define XMPHY_BMSR_ACOMP 0x0020 /* Autoneg complete */ -#define XMPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occured */ +#define XMPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occurred */ #define XMPHY_BMSR_ANEG 0x0008 /* Autoneg capable */ #define XMPHY_BMSR_LINK 0x0004 /* Link status */ #define XMPHY_BMSR_EXT 0x0001 /* Extended capability */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:31:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 738D1106564A; Fri, 22 Apr 2011 09:31:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61FBA8FC0C; Fri, 22 Apr 2011 09:31:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3M9VejO035430; Fri, 22 Apr 2011 09:31:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9VeVk035423; Fri, 22 Apr 2011 09:31:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220931.p3M9VeVk035423@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:31: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: r220939 - in head/sys/sparc64: include sbus 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: Fri, 22 Apr 2011 09:31:40 -0000 Author: marius Date: Fri Apr 22 09:31:40 2011 New Revision: 220939 URL: http://svn.freebsd.org/changeset/base/220939 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/sparc64/include/cpufunc.h head/sys/sparc64/sbus/lsi64854.c head/sys/sparc64/sbus/ofw_sbus.h head/sys/sparc64/sparc64/exception.S head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/include/cpufunc.h ============================================================================== --- head/sys/sparc64/include/cpufunc.h Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/include/cpufunc.h Fri Apr 22 09:31:40 2011 (r220939) @@ -187,7 +187,7 @@ int fasword32(u_long asi, void *addr, ui /* * Macro intended to be used instead of wr(asr23, val, xorval) for writing to * the TICK_COMPARE register in order to avoid a bug in BlackBird CPUs that - * can cause these writes to fail under certain condidtions which in turn + * can cause these writes to fail under certain conditions which in turn * causes the hardclock to stop. The workaround is to read the TICK_COMPARE * register back immediately after writing to it with these two instructions * aligned to a quadword boundary in order to ensure that I$ misses won't Modified: head/sys/sparc64/sbus/lsi64854.c ============================================================================== --- head/sys/sparc64/sbus/lsi64854.c Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/sbus/lsi64854.c Fri Apr 22 09:31:40 2011 (r220939) @@ -521,7 +521,7 @@ lsi64854_scsi_intr(void *arg) } trans = sc->sc_dmasize - resid; - if (trans < 0) { /* transfered < 0? */ + if (trans < 0) { /* transferred < 0? */ #if 0 /* * This situation can happen in perfectly normal operation @@ -711,7 +711,7 @@ lsi64854_pp_intr(void *arg) sc->sc_active = 0; trans = sc->sc_dmasize - resid; - if (trans < 0) /* transfered < 0? */ + if (trans < 0) /* transferred < 0? */ trans = sc->sc_dmasize; *sc->sc_dmalen -= trans; *sc->sc_dmaaddr += trans; Modified: head/sys/sparc64/sbus/ofw_sbus.h ============================================================================== --- head/sys/sparc64/sbus/ofw_sbus.h Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/sbus/ofw_sbus.h Fri Apr 22 09:31:40 2011 (r220939) @@ -41,7 +41,7 @@ struct sbus_regs { u_int32_t sbr_size; }; -/* Address translation accross busses */ +/* Address translation across busses */ struct sbus_ranges { u_int32_t cspace; /* Client space */ u_int32_t coffset; /* Client offset */ Modified: head/sys/sparc64/sparc64/exception.S ============================================================================== --- head/sys/sparc64/sparc64/exception.S Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/sparc64/exception.S Fri Apr 22 09:31:40 2011 (r220939) @@ -381,7 +381,7 @@ END(rsf_fatal) * Due to its size a trap table is an inherently hard thing to represent in * code in a clean way. There are approximately 1024 vectors, of 8 or 32 * instructions each, many of which are identical. The way that this is - * layed out is the instructions (8 or 32) for the actual trap vector appear + * laid out is the instructions (8 or 32) for the actual trap vector appear * as an AS macro. In general this code branches to tl0_trap or tl1_trap, * but if not supporting code can be placed just after the definition of the * macro. The macros are then instantiated in a different section (.trap), @@ -2486,7 +2486,7 @@ ENTRY(tl0_ret) * Check for pending asts atomically with returning. We must raise * the PIL before checking, and if no asts are found the PIL must * remain raised until the retry is executed, or we risk missing asts - * caused by interrupts occuring after the test. If the PIL is + * caused by interrupts occurring after the test. If the PIL is * lowered, as it is when we call ast, the check must be re-executed. */ wrpr %g0, PIL_TICK, %pil Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/sparc64/machdep.c Fri Apr 22 09:31:40 2011 (r220939) @@ -566,7 +566,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l * is necessary in order to set obp-control-relinquished to true * within the PROM so obtaining /virtual-memory/translations doesn't * trigger a fatal reset error or worse things further down the road. - * XXX it should be possible to use this soley instead of writing + * XXX it should be possible to use this solely instead of writing * %tba in cpu_setregs(). Doing so causes a hang however. */ sun4u_set_traptable(tl0_base); Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Fri Apr 22 09:22:27 2011 (r220938) +++ head/sys/sparc64/sparc64/pmap.c Fri Apr 22 09:31:40 2011 (r220939) @@ -1062,7 +1062,7 @@ pmap_kenter(vm_offset_t va, vm_page_t m) /* * Map a wired page into kernel virtual address space. This additionally - * takes a flag argument wich is or'ed to the TTE data. This is used by + * takes a flag argument which is or'ed to the TTE data. This is used by * sparc64_bus_mem_map(). * NOTE: if the mapping is non-cacheable, it's the caller's responsibility * to flush entries that might still be in the cache, if applicable. From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:39:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1CBC106564A; Fri, 22 Apr 2011 09:39:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86B0F8FC0C; Fri, 22 Apr 2011 09:39: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 p3M9d57C035697; Fri, 22 Apr 2011 09:39:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9d5ON035694; Fri, 22 Apr 2011 09:39:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220939.p3M9d5ON035694@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:39: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: r220940 - head/sys/dev/hme X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 09:39:05 -0000 Author: marius Date: Fri Apr 22 09:39:05 2011 New Revision: 220940 URL: http://svn.freebsd.org/changeset/base/220940 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/dev/hme/if_hme.c head/sys/dev/hme/if_hmereg.h Modified: head/sys/dev/hme/if_hme.c ============================================================================== --- head/sys/dev/hme/if_hme.c Fri Apr 22 09:31:40 2011 (r220939) +++ head/sys/dev/hme/if_hme.c Fri Apr 22 09:39:05 2011 (r220940) @@ -203,7 +203,7 @@ hme_config(struct hme_softc *sc) * the DMA bus tag: * sc_dmatag * - * the bus handles, tags and offsets (splitted for SBus compatability): + * the bus handles, tags and offsets (splitted for SBus compatibility): * sc_seb{t,h,o} (Shared Ethernet Block registers) * sc_erx{t,h,o} (Receiver Unit registers) * sc_etx{t,h,o} (Transmitter Unit registers) @@ -1559,7 +1559,7 @@ hme_mediachange_locked(struct hme_softc * If both PHYs are present reset them. This is required for * unisolating the previously isolated PHY when switching PHYs. * As the above hme_mifinit() call will set the MII drivers in - * the XIF configuration register accoring to the currently + * the XIF configuration register according to the currently * selected media, there should be no window during which the * data paths of both transceivers are open at the same time, * even if the PHY device drivers use MIIF_NOISOLATE. Modified: head/sys/dev/hme/if_hmereg.h ============================================================================== --- head/sys/dev/hme/if_hmereg.h Fri Apr 22 09:31:40 2011 (r220939) +++ head/sys/dev/hme/if_hmereg.h Fri Apr 22 09:39:05 2011 (r220940) @@ -79,7 +79,7 @@ #define HME_SEB_STAT_TXEACK 0x04000000 /* error during tx DMA */ #define HME_SEB_STAT_TXLERR 0x08000000 /* late error during tx DMA */ #define HME_SEB_STAT_TXPERR 0x10000000 /* parity error during tx DMA */ -#define HME_SEB_STAT_TXTERR 0x20000000 /* tag error durig tx DMA */ +#define HME_SEB_STAT_TXTERR 0x20000000 /* tag error during tx DMA */ #define HME_SEB_STAT_SLVERR 0x40000000 /* pio access error */ #define HME_SEB_STAT_SLVPERR 0x80000000 /* pio access parity error */ #define HME_SEB_STAT_BITS "\177\020" \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:41:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08C2E106566B; Fri, 22 Apr 2011 09:41:52 +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 EC5428FC18; Fri, 22 Apr 2011 09:41: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 p3M9fpKF035815; Fri, 22 Apr 2011 09:41:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9fp7D035813; Fri, 22 Apr 2011 09:41:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220941.p3M9fp7D035813@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:41: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: r220941 - head/sys/dev/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 09:41:52 -0000 Author: marius Date: Fri Apr 22 09:41:51 2011 New Revision: 220941 URL: http://svn.freebsd.org/changeset/base/220941 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/dev/gem/if_gem.c Modified: head/sys/dev/gem/if_gem.c ============================================================================== --- head/sys/dev/gem/if_gem.c Fri Apr 22 09:39:05 2011 (r220940) +++ head/sys/dev/gem/if_gem.c Fri Apr 22 09:41:51 2011 (r220941) @@ -1064,7 +1064,7 @@ gem_init_locked(struct gem_softc *sc) /* step 14. Issue Transmit Pending command. */ - /* step 15. Give the reciever a swift kick. */ + /* step 15. Give the receiver a swift kick. */ GEM_BANK1_WRITE_4(sc, GEM_RX_KICK, GEM_NRXDESC - 4); ifp->if_drv_flags |= IFF_DRV_RUNNING; From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:43:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00CC106564A; Fri, 22 Apr 2011 09:43:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB208FC0C; Fri, 22 Apr 2011 09:43: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 p3M9h0lI035888; Fri, 22 Apr 2011 09:43:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9h0Is035883; Fri, 22 Apr 2011 09:43:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201104220943.p3M9h0Is035883@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 22 Apr 2011 09:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220942 - in stable/8/sys: dev/usb/controller mips/atheros 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: Fri, 22 Apr 2011 09:43:00 -0000 Author: hselasky Date: Fri Apr 22 09:43:00 2011 New Revision: 220942 URL: http://svn.freebsd.org/changeset/base/220942 Log: MFC r220558. We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI bus driver at detach, hence ehci_detach() does exactly this since r199718. Approved by: thompsa Modified: stable/8/sys/dev/usb/controller/ehci_ixp4xx.c stable/8/sys/dev/usb/controller/ehci_pci.c stable/8/sys/mips/atheros/ar71xx_ehci.c stable/8/sys/mips/rmi/xls_ehci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_ixp4xx.c Fri Apr 22 09:41:51 2011 (r220941) +++ stable/8/sys/dev/usb/controller/ehci_ixp4xx.c Fri Apr 22 09:43:00 2011 (r220942) @@ -260,13 +260,6 @@ ehci_ixp_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_all_children(self); - /* - * disable interrupts that might have been switched on in ehci_init - */ - if (sc->sc_io_res) { - EOWRITE4(sc, EHCI_USBINTR, 0); - } - if (sc->sc_irq_res && sc->sc_intr_hdl) { /* * only call ehci_detach() after ehci_init() Modified: stable/8/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Fri Apr 22 09:41:51 2011 (r220941) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Fri Apr 22 09:43:00 2011 (r220942) @@ -503,12 +503,6 @@ ehci_pci_detach(device_t self) pci_disable_busmaster(self); - /* - * disable interrupts that might have been switched on in ehci_init - */ - if (sc->sc_io_res) { - EOWRITE4(sc, EHCI_USBINTR, 0); - } if (sc->sc_irq_res && sc->sc_intr_hdl) { /* * only call ehci_detach() after ehci_init() Modified: stable/8/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/8/sys/mips/atheros/ar71xx_ehci.c Fri Apr 22 09:41:51 2011 (r220941) +++ stable/8/sys/mips/atheros/ar71xx_ehci.c Fri Apr 22 09:43:00 2011 (r220942) @@ -225,13 +225,6 @@ ar71xx_ehci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_all_children(self); - /* - * disable interrupts that might have been switched on in ehci_init - */ - if (sc->sc_io_res) { - EOWRITE4(sc, EHCI_USBINTR, 0); - } - if (sc->sc_irq_res && sc->sc_intr_hdl) { /* * only call ehci_detach() after ehci_init() Modified: stable/8/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/8/sys/mips/rmi/xls_ehci.c Fri Apr 22 09:41:51 2011 (r220941) +++ stable/8/sys/mips/rmi/xls_ehci.c Fri Apr 22 09:43:00 2011 (r220942) @@ -224,13 +224,6 @@ ehci_xls_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_all_children(self); - /* - * disable interrupts that might have been switched on in ehci_init - */ - if (sc->sc_io_res) { - EOWRITE4(sc, EHCI_USBINTR, 0); - } - if (sc->sc_irq_res && sc->sc_intr_hdl) { ehci_detach(sc); From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:44:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A02C1065678; Fri, 22 Apr 2011 09:44:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 794CC8FC18; Fri, 22 Apr 2011 09:44: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 p3M9i1Rl035958; Fri, 22 Apr 2011 09:44:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9i1JU035956; Fri, 22 Apr 2011 09:44:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220944.p3M9i1JU035956@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:44: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: r220943 - head/sys/dev/cas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 09:44:01 -0000 Author: marius Date: Fri Apr 22 09:44:01 2011 New Revision: 220943 URL: http://svn.freebsd.org/changeset/base/220943 Log: Correct spelling in a comment. Submitted by: brucec Modified: head/sys/dev/cas/if_cas.c Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Fri Apr 22 09:43:00 2011 (r220942) +++ head/sys/dev/cas/if_cas.c Fri Apr 22 09:44:01 2011 (r220943) @@ -1153,7 +1153,7 @@ cas_init_locked(struct cas_softc *sc) /* step 14. Issue Transmit Pending command. */ - /* step 15. Give the reciever a swift kick. */ + /* step 15. Give the receiver a swift kick. */ CAS_WRITE_4(sc, CAS_RX_KICK, CAS_NRXDESC - 4); CAS_WRITE_4(sc, CAS_RX_COMP_TAIL, 0); if ((sc->sc_flags & CAS_REG_PLUS) != 0) From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:52:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588E1106566B; Fri, 22 Apr 2011 09:52:29 +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 475268FC1B; Fri, 22 Apr 2011 09:52: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 p3M9qTho036247; Fri, 22 Apr 2011 09:52:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9qTFT036242; Fri, 22 Apr 2011 09:52:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220952.p3M9qTFT036242@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09:52: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: r220944 - head/sys/dev/sym X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 09:52:29 -0000 Author: marius Date: Fri Apr 22 09:52:28 2011 New Revision: 220944 URL: http://svn.freebsd.org/changeset/base/220944 Log: - Correct spelling. [1] - Remove variables which are unused besides initialization. [2] Submitted by: brucec [1], Christoph Mallon [2] Modified: head/sys/dev/sym/README.sym head/sys/dev/sym/sym_fw1.h head/sys/dev/sym/sym_fw2.h head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/sym/README.sym ============================================================================== --- head/sys/dev/sym/README.sym Fri Apr 22 09:44:01 2011 (r220943) +++ head/sys/dev/sym/README.sym Fri Apr 22 09:52:28 2011 (r220944) @@ -70,7 +70,7 @@ using `man sym' for driver usage and fea I haven't removed this README file from the repository since I may have to provide additional documentation to people interested in understanding the driver sources and/or in helping -driver development and maintainance. +driver development and maintenance. As a result, this file is now under reconstruction. :-) Modified: head/sys/dev/sym/sym_fw1.h ============================================================================== --- head/sys/dev/sym/sym_fw1.h Fri Apr 22 09:44:01 2011 (r220943) +++ head/sys/dev/sym/sym_fw1.h Fri Apr 22 09:52:28 2011 (r220944) @@ -1027,7 +1027,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ * It shall be a tagged command. * Read SIMPLE+TAG. * The C code will deal with errors. - * Agressive optimization, is'nt it? :) + * Aggressive optimization, is'nt it? :) */ SCR_MOVE_ABS (2) ^ SCR_MSG_IN, HADDR_1 (msgin), @@ -1051,7 +1051,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ RADDR_1 (dsa), /* * The SIDL still contains the TAG value. - * Agressive optimization, isn't it? :):) + * Aggressive optimization, isn't it? :):) */ SCR_REG_SFBR (sidl, SCR_SHL, 0), 0, @@ -1352,7 +1352,7 @@ static const struct SYM_FWB_SCR SYM_FWB_ * some target to reset or some disconnected * job to abort. Since error recovery is a serious * busyness, we will really reset the SCSI BUS, if - * case of a SCSI interrupt occuring in this path. + * case of a SCSI interrupt occurring in this path. */ /* @@ -1461,7 +1461,7 @@ static const struct SYM_FWB_SCR SYM_FWB_ PADDR_B (msg_weird_seen), /* * We donnot handle extended messages from SCRIPTS. - * Read the amount of data correponding to the + * Read the amount of data corresponding to the * message length and call the C code. */ SCR_COPY (1), Modified: head/sys/dev/sym/sym_fw2.h ============================================================================== --- head/sys/dev/sym/sym_fw2.h Fri Apr 22 09:44:01 2011 (r220943) +++ head/sys/dev/sym/sym_fw2.h Fri Apr 22 09:52:28 2011 (r220944) @@ -945,7 +945,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ * It shall be a tagged command. * Read SIMPLE+TAG. * The C code will deal with errors. - * Agressive optimization, is'nt it? :) + * Aggressive optimization, is'nt it? :) */ SCR_MOVE_ABS (2) ^ SCR_MSG_IN, HADDR_1 (msgin), @@ -957,7 +957,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ offsetof(struct sym_lcb, head.itlq_tbl_sa), /* * The SIDL still contains the TAG value. - * Agressive optimization, isn't it? :):) + * Aggressive optimization, isn't it? :):) */ SCR_REG_SFBR (sidl, SCR_SHL, 0), 0, @@ -1213,7 +1213,7 @@ static const struct SYM_FWB_SCR SYM_FWB_ * some target to reset or some disconnected * job to abort. Since error recovery is a serious * busyness, we will really reset the SCSI BUS, if - * case of a SCSI interrupt occuring in this path. + * case of a SCSI interrupt occurring in this path. */ /* @@ -1320,7 +1320,7 @@ static const struct SYM_FWB_SCR SYM_FWB_ PADDR_B (msg_weird_seen), /* * We donnot handle extended messages from SCRIPTS. - * Read the amount of data correponding to the + * Read the amount of data corresponding to the * message length and call the C code. */ SCR_STORE_REL (scratcha, 1), Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Fri Apr 22 09:44:01 2011 (r220943) +++ head/sys/dev/sym/sym_hipd.c Fri Apr 22 09:52:28 2011 (r220944) @@ -366,7 +366,7 @@ static void MDELAY(int ms) { while (ms-- * from the SCRIPTS code. In addition, cache line alignment * is guaranteed for power of 2 cache line size. * - * This allocator has been developped for the Linux sym53c8xx + * This allocator has been developed for the Linux sym53c8xx * driver, since this O/S does not provide naturally aligned * allocations. * It has the advantage of allowing the driver to use private @@ -1959,10 +1959,8 @@ static void sym_fw1_setup(hcb_p np, const struct sym_fw *fw) { struct sym_fw1a_scr *scripta0; - struct sym_fw1b_scr *scriptb0; scripta0 = (struct sym_fw1a_scr *) np->scripta0; - scriptb0 = (struct sym_fw1b_scr *) np->scriptb0; /* * Fill variable parts in scripts. @@ -1983,10 +1981,8 @@ static void sym_fw2_setup(hcb_p np, const struct sym_fw *fw) { struct sym_fw2a_scr *scripta0; - struct sym_fw2b_scr *scriptb0; scripta0 = (struct sym_fw2a_scr *) np->scripta0; - scriptb0 = (struct sym_fw2b_scr *) np->scriptb0; /* * Fill variable parts in scripts. @@ -2294,7 +2290,7 @@ static void sym_nvram_setup_target (hcb_ static int sym_read_nvram (hcb_p np, struct sym_nvram *nvp); /* - * Print something which allows to retrieve the controler type, + * Print something which allows to retrieve the controller type, * unit, target, lun concerned by a kernel message. */ static void PRINT_TARGET (hcb_p np, int target) @@ -4300,7 +4296,7 @@ static void sym_int_ma (hcb_p np) } /* - * The data in the dma fifo has not been transfered to + * The data in the dma fifo has not been transferred to * the target -> add the amount to the rest * and clear the data. * Check the sstat2 register in case of wide transfer. @@ -7520,7 +7516,7 @@ static void sym_action(struct cam_sim *s } /* - * Retreive the target and lun descriptors. + * Retrieve the target and lun descriptors. */ tp = &np->target[ccb_h->target_id]; lp = sym_lp(np, tp, ccb_h->target_lun); From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 09:59:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D5A71065678; Fri, 22 Apr 2011 09:59:17 +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 5C3268FC16; Fri, 22 Apr 2011 09:59: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 p3M9xHA7036488; Fri, 22 Apr 2011 09:59:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3M9xHsa036482; Fri, 22 Apr 2011 09:59:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104220959.p3M9xHsa036482@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 09: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: r220945 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 09:59:17 -0000 Author: marius Date: Fri Apr 22 09:59:16 2011 New Revision: 220945 URL: http://svn.freebsd.org/changeset/base/220945 Log: Correct spelling. Submitted by: brucec Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_debug.c head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Fri Apr 22 09:52:28 2011 (r220944) +++ head/sys/dev/mpt/mpt.c Fri Apr 22 09:59:16 2011 (r220945) @@ -304,28 +304,28 @@ mpt_modevent(module_t mod, int type, voi int mpt_stdload(struct mpt_personality *pers) { - /* Load is always successfull. */ + /* Load is always successful. */ return (0); } int mpt_stdprobe(struct mpt_softc *mpt) { - /* Probe is always successfull. */ + /* Probe is always successful. */ return (0); } int mpt_stdattach(struct mpt_softc *mpt) { - /* Attach is always successfull. */ + /* Attach is always successful. */ return (0); } int mpt_stdenable(struct mpt_softc *mpt) { - /* Enable is always successfull. */ + /* Enable is always successful. */ return (0); } @@ -361,7 +361,7 @@ mpt_stddetach(struct mpt_softc *mpt) int mpt_stdunload(struct mpt_personality *pers) { - /* Unload is always successfull. */ + /* Unload is always successful. */ return (0); } @@ -659,7 +659,7 @@ mpt_core_event(struct mpt_softc *mpt, re { int i; - /* Some error occured that LSI wants logged */ + /* Some error occurred that LSI wants logged */ mpt_prt(mpt, "EvtLogData: IOCLogInfo: 0x%08x\n", msg->IOCLogInfo); mpt_prt(mpt, "\tEvtLogData: Event Data:"); @@ -2354,7 +2354,7 @@ mpt_core_detach(struct mpt_softc *mpt) int mpt_core_unload(struct mpt_personality *pers) { - /* Unload is always successfull. */ + /* Unload is always successful. */ return (0); } @@ -2517,7 +2517,7 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt) return (1); } - /* Allocate some DMA accessable memory for requests */ + /* Allocate some DMA accessible memory for requests */ if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request, BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &mpt->request_dmap) != 0) { mpt_prt(mpt, "cannot allocate %d bytes of request memory\n", @@ -2715,7 +2715,7 @@ mpt_configure_ioc(struct mpt_softc *mpt, /* * In some configurations, the IOC's firmware is * stored in a shared piece of system NVRAM that - * is only accessable via the BIOS. In this + * is only accessible via the BIOS. In this * case, the firmware keeps a copy of firmware in * RAM until the OS driver retrieves it. Once * retrieved, we are responsible for re-downloading Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Fri Apr 22 09:52:28 2011 (r220944) +++ head/sys/dev/mpt/mpt.h Fri Apr 22 09:59:16 2011 (r220945) @@ -371,7 +371,7 @@ struct req_entry { mpt_req_state_t state; /* Request State Information */ uint16_t index; /* Index of this entry */ uint16_t IOCStatus; /* Completion status */ - uint16_t ResponseCode; /* TMF Reponse Code */ + uint16_t ResponseCode; /* TMF Response Code */ uint16_t serno; /* serial number */ union ccb *ccb; /* CAM request */ void *req_vbuf; /* Virtual Address of Entry */ @@ -714,7 +714,7 @@ struct mpt_softc { */ int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ - void * ih; /* Interupt handle */ + void * ih; /* Interrupt handle */ struct mpt_pci_cfg pci_cfg; /* saved PCI conf registers */ /* @@ -1052,7 +1052,7 @@ mpt_pop_reply_queue(struct mpt_softc *mp void mpt_complete_request_chain(struct mpt_softc *, struct req_queue *, u_int); -/************************** Scatter Gather Managment **************************/ +/************************** Scatter Gather Management **************************/ /* MPT_RQSL- size of request frame, in bytes */ #define MPT_RQSL(mpt) (mpt->ioc_facts.RequestFrameSize << 2) Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Fri Apr 22 09:52:28 2011 (r220944) +++ head/sys/dev/mpt/mpt_cam.c Fri Apr 22 09:59:16 2011 (r220945) @@ -3015,7 +3015,7 @@ mpt_fc_els_reply_handler(struct mpt_soft elsbuf[1] = htobe32((ox_id << 16) | rx_id); elsbuf[2] = htobe32(0x000ffff); /* - * Dork with the reply frame so that the reponse to it + * Dork with the reply frame so that the response to it * will be correct. */ rp->Rctl_Did += ((BA_ACC - ABTS) << MPI_FC_RCTL_SHIFT); @@ -3142,7 +3142,7 @@ XXXX mpt_set_ccb_status(ccb, CAM_AUTOSENSE_FAIL); } else if ((sstate & MPI_SCSI_STATE_RESPONSE_INFO_VALID) != 0) { - /* XXX Handle SPI-Packet and FCP-2 reponse info. */ + /* XXX Handle SPI-Packet and FCP-2 response info. */ mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); } else mpt_set_ccb_status(ccb, CAM_REQ_CMP); Modified: head/sys/dev/mpt/mpt_debug.c ============================================================================== --- head/sys/dev/mpt/mpt_debug.c Fri Apr 22 09:52:28 2011 (r220944) +++ head/sys/dev/mpt/mpt_debug.c Fri Apr 22 09:59:16 2011 (r220945) @@ -119,15 +119,15 @@ static const struct Error_Map IOC_Status { MPI_IOCSTATUS_TARGET_NO_CONNECTION, "SCSI Target: No Connection" }, { MPI_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH,"SCSI Target: Transfer Count Mismatch" }, { MPI_IOCSTATUS_TARGET_FC_ABORTED, "FC: Aborted" }, -{ MPI_IOCSTATUS_TARGET_FC_RX_ID_INVALID, "FC: Recieve ID Invalid" }, -{ MPI_IOCSTATUS_TARGET_FC_DID_INVALID, "FC: Recieve DID Invalid" }, +{ MPI_IOCSTATUS_TARGET_FC_RX_ID_INVALID, "FC: Receive ID Invalid" }, +{ MPI_IOCSTATUS_TARGET_FC_DID_INVALID, "FC: Receive DID Invalid" }, { MPI_IOCSTATUS_TARGET_FC_NODE_LOGGED_OUT,"FC: Node Logged Out" }, { MPI_IOCSTATUS_LAN_DEVICE_NOT_FOUND, "LAN: Device Not Found" }, { MPI_IOCSTATUS_LAN_DEVICE_FAILURE, "LAN: Device Not Failure" }, { MPI_IOCSTATUS_LAN_TRANSMIT_ERROR, "LAN: Transmit Error" }, { MPI_IOCSTATUS_LAN_TRANSMIT_ABORTED, "LAN: Transmit Aborted" }, -{ MPI_IOCSTATUS_LAN_RECEIVE_ERROR, "LAN: Recieve Error" }, -{ MPI_IOCSTATUS_LAN_RECEIVE_ABORTED, "LAN: Recieve Aborted" }, +{ MPI_IOCSTATUS_LAN_RECEIVE_ERROR, "LAN: Receive Error" }, +{ MPI_IOCSTATUS_LAN_RECEIVE_ABORTED, "LAN: Receive Aborted" }, { MPI_IOCSTATUS_LAN_PARTIAL_PACKET, "LAN: Partial Packet" }, { MPI_IOCSTATUS_LAN_CANCELED, "LAN: Canceled" }, { -1, 0}, Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Fri Apr 22 09:52:28 2011 (r220944) +++ head/sys/dev/mpt/mpt_pci.c Fri Apr 22 09:59:16 2011 (r220945) @@ -783,7 +783,7 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) return (1); } - /* Allocate some DMA accessable memory for replies */ + /* Allocate some DMA accessible memory for replies */ if (bus_dmamem_alloc(mpt->reply_dmat, (void **)&mpt->reply, BUS_DMA_NOWAIT, &mpt->reply_dmap) != 0) { mpt_prt(mpt, "cannot allocate %lu bytes of reply memory\n", From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 10:57:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E41A106564A; Fri, 22 Apr 2011 10:57:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5CC8FC13; Fri, 22 Apr 2011 10:57: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 p3MAvklL039602; Fri, 22 Apr 2011 10:57:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MAvkrd039599; Fri, 22 Apr 2011 10:57:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104221057.p3MAvkrd039599@svn.freebsd.org> From: Adrian Chadd Date: Fri, 22 Apr 2011 10:57: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: r220946 - in head/sys/dev/ath/ath_hal: . ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 10:57:47 -0000 Author: adrian Date: Fri Apr 22 10:57:46 2011 New Revision: 220946 URL: http://svn.freebsd.org/changeset/base/220946 Log: Bring over a pdadc calibration fix from ath9k - unused power detector gain values should be 58, not the previous values. Obtained From: linux ath9k Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h Fri Apr 22 09:59:16 2011 (r220945) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h Fri Apr 22 10:57:46 2011 (r220946) @@ -29,6 +29,8 @@ #define AR9285_RDEXT_DEFAULT 0x1F +#define AR5416_4K_EEP_PD_GAIN_BOUNDARY_DEFAULT 58 + #undef owl_eep_start_loc #ifdef __LINUX_ARM_ARCH__ /* AP71 */ #define owl_eep_start_loc 0 Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Fri Apr 22 09:59:16 2011 (r220945) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Fri Apr 22 10:57:46 2011 (r220946) @@ -871,7 +871,7 @@ ar9285GetGainBoundariesAndPdadcs(struct /* Fill out pdGainBoundaries - only up to 2 allowed here, but hardware allows up to 4 */ while (i < AR5416_PD_GAINS_IN_MASK) { - pPdGainBoundaries[i] = pPdGainBoundaries[i-1]; + pPdGainBoundaries[i] = AR5416_4K_EEP_PD_GAIN_BOUNDARY_DEFAULT; i++; } From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 10:59:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF1B81065674; Fri, 22 Apr 2011 10:59:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEAE08FC12; Fri, 22 Apr 2011 10: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 p3MAxKVD039682; Fri, 22 Apr 2011 10:59:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MAxKIu039680; Fri, 22 Apr 2011 10:59:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104221059.p3MAxKIu039680@svn.freebsd.org> From: Adrian Chadd Date: Fri, 22 Apr 2011 10:59: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: r220947 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 10:59:21 -0000 Author: adrian Date: Fri Apr 22 10:59:20 2011 New Revision: 220947 URL: http://svn.freebsd.org/changeset/base/220947 Log: The second regdomain word is a set of bitflags describing regulatory domain behaviour. Document what the v14 EEPROM flags are. Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Apr 22 10:57:46 2011 (r220946) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Apr 22 10:59:20 2011 (r220947) @@ -143,6 +143,16 @@ typedef struct CalCtlEdges { } __packed CAL_CTL_EDGES; /* + * These are the secondary regulatory domain flags + * for regDmn[1]. + */ +#define AR5416_REGDMN_EN_FCC_MID 0x01 /* 5.47 - 5.7GHz operation */ +#define AR5416_REGDMN_EN_JAP_MID 0x02 /* 5.47 - 5.7GHz operation */ +#define AR5416_REGDMN_EN_FCC_DFS_HT40 0x04 /* FCC HT40 + DFS operation */ +#define AR5416_REGDMN_EN_JAP_HT40 0x08 /* JP HT40 operation */ +#define AR5416_REGDMN_EN_JAP_DFS_HT40 0x10 /* JP HT40 + DFS operation */ + +/* * NB: The format in EEPROM has words 0 and 2 swapped (i.e. version * and length are swapped). We reverse their position after reading * the data into host memory so the version field is at the same From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 12:39:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F9DF106566C; Fri, 22 Apr 2011 12:39:49 +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 E33828FC14; Fri, 22 Apr 2011 12:39: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 p3MCdmdN042744; Fri, 22 Apr 2011 12:39:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MCdmL4042742; Fri, 22 Apr 2011 12:39:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104221239.p3MCdmL4042742@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 12:39: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: r220948 - head/sys/sun4v/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 12:39:49 -0000 Author: marius Date: Fri Apr 22 12:39:48 2011 New Revision: 220948 URL: http://svn.freebsd.org/changeset/base/220948 Log: MF sparc64: r181701 (partial), r182020 (partial), r182730 (partial), r216628, r216801 - cosmetic changes and style fixes - Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently of the selected instruction set. Moreover, sun4v doesn't need the WAR for BlackBird CPUs. - Rename the "xor" parameter to "xorval" as the former is a reserved keyword in C++. Modified: head/sys/sun4v/include/cpufunc.h Modified: head/sys/sun4v/include/cpufunc.h ============================================================================== --- head/sys/sun4v/include/cpufunc.h Fri Apr 22 10:59:20 2011 (r220947) +++ head/sys/sun4v/include/cpufunc.h Fri Apr 22 12:39:48 2011 (r220948) @@ -35,7 +35,7 @@ struct thread; /* - * membar operand macros for use in other macros when # is a special + * Membar operand macros for use in other macros when # is a special * character. Keep these in sync with what the hardware expects. */ #define C_Lookaside (0) @@ -88,8 +88,8 @@ struct thread; __asm __volatile("mov %0, %" __XSTRING(reg) : : "r" (val)); \ } while (0) -/* Generate ld*a/st*a functions for non-constant ASI's. */ -#define LDNC_GEN(tp, o) \ +/* Generate ld*a/st*a functions for non-constant ASIs. */ +#define LDNC_GEN(tp, o) \ static __inline tp \ o ## _nc(caddr_t va, int asi) \ { \ @@ -117,7 +117,7 @@ LDNC_GEN(u_long, ldxa); #define ldxa(va, asi) LD_GENERIC(va, asi, ldxa, u_long) #if 0 -#define STNC_GEN(tp, o) \ +#define STNC_GEN(tp, o) \ static __inline void \ o ## _nc(caddr_t va, int asi, tp val) \ { \ @@ -125,7 +125,7 @@ LDNC_GEN(u_long, ldxa); : : "r" (val), "r" (va), "r" (asi)); \ } #else -#define STNC_GEN(tp, o) \ +#define STNC_GEN(tp, o) \ static __inline void \ o ## _nc(caddr_t va, int asi, tp val) \ { \ @@ -167,9 +167,9 @@ int fasword32(u_long asi, void *addr, ui __sr; \ }) -#define wr(name, val, xor) do { \ +#define wr(name, val, xorval) do { \ __asm __volatile("wr %0, %1, %%" #name \ - : : "r" (val), "rI" (xor)); \ + : : "r" (val), "rI" (xorval)); \ } while (0) #define rdpr(name) ({ \ @@ -178,38 +178,33 @@ int fasword32(u_long asi, void *addr, ui __pr; \ }) -#define wrpr(name, val, xor) do { \ +#define wrpr(name, val, xorval) do { \ __asm __volatile("wrpr %0, %1, %%" #name \ - : : "r" (val), "rI" (xor)); \ + : : "r" (val), "rI" (xorval)); \ } while (0) /* - * Macro intended to be used instead of wr(asr23, val, xor) for writing to - * the TICK_CMPR register in order to avoid a bug in BlackBird CPUs that - * can cause these writes to fail under certain condidtions which in turn - * causes the hardclock to stop. The workaround is to perform the write - * at the beginning of an I-Cache line directly followed by a dummy read. + * Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently + * of the selected instruction set. */ -#define wrtickcmpr(val, xor) ({ \ - __asm __volatile( \ - " ba,pt %%xcc, 1f ; " \ - " nop ; " \ - " .align 64 ; " \ - "1: wr %0, %1, %%asr23 ; " \ - " rd %%asr23, %%g0 ; " \ - : : "r" (val), "rI" (xor)); \ -}) +#define rdtickcmpr() rd(asr23) +#define rdstick() rd(asr24) +#define rdstickcmpr() rd(asr25) +#define wrtickcmpr(val, xorval) wr(asr23, (val), (xorval)) +#define wrstick(val, xorval) wr(asr24, (val), (xorval)) +#define wrstickcmpr(val, xorval) wr(asr25, (val), (xorval)) static __inline void breakpoint(void) { + __asm __volatile("ta %%xcc, 1" : :); } static __inline register_t intr_disable_all(void) { - u_long s; + register_t s; s = rdpr(pstate); wrpr(pstate, s & ~PSTATE_IE, 0); @@ -220,7 +215,7 @@ intr_disable_all(void) static __inline register_t intr_disable(void) { - u_long s; + register_t s; s = rdpr(pil); wrpr(pil, 14, 0); @@ -228,14 +223,13 @@ intr_disable(void) } #define intr_restore(s) wrpr(pil, (s), 0) - /* * In some places, it is required that the store is directly followed by a - * membar #Sync. Don't trust the compiler to not insert instructions in - * between. We also need to disable interrupts completely. + * membar #Sync. Don't trust the compiler to not insert instructions in + * between. We also need to disable interrupts completely. */ #define stxa_sync(va, asi, val) do { \ - u_long s; \ + register_t s; \ s = intr_disable_all(); \ __asm __volatile("stxa %0, [%1] %2; membar #Sync" \ : : "r" (val), "r" (va), "n" (asi)); \ @@ -249,8 +243,8 @@ void aszero(u_long asi, vm_offset_t dst, #include -#define USE_CPU_NANOSECONDS -#define nanoseconds() rd(tick) +#define USE_CPU_NANOSECONDS +#define nanoseconds() rd(tick) #undef LDNC_GEN #undef STNC_GEN From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 12:42:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E31EE1065670; Fri, 22 Apr 2011 12:42: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 D2F4D8FC0A; Fri, 22 Apr 2011 12:42: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 p3MCgfCJ042862; Fri, 22 Apr 2011 12:42:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MCgfaZ042859; Fri, 22 Apr 2011 12:42:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104221242.p3MCgfaZ042859@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 12:42: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: r220949 - in head/sys/sun4v: include/cddl sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 12:42:42 -0000 Author: marius Date: Fri Apr 22 12:42:41 2011 New Revision: 220949 URL: http://svn.freebsd.org/changeset/base/220949 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/sun4v/include/cddl/mdesc_impl.h head/sys/sun4v/sun4v/tte_hash.c Modified: head/sys/sun4v/include/cddl/mdesc_impl.h ============================================================================== --- head/sys/sun4v/include/cddl/mdesc_impl.h Fri Apr 22 12:39:48 2011 (r220948) +++ head/sys/sun4v/include/cddl/mdesc_impl.h Fri Apr 22 12:42:41 2011 (r220949) @@ -53,7 +53,7 @@ extern "C" { * * Elements in the first (description list) section are defined by their * index location within the node block. An index is simply the byte offset - * within the block / element size (16bytes). All elements are refered to + * within the block / element size (16bytes). All elements are referred to * by their index, to avoid bugs related to alignment etc. * * The name_len field holds the storage length of an ASCII name, NOT the strlen. Modified: head/sys/sun4v/sun4v/tte_hash.c ============================================================================== --- head/sys/sun4v/sun4v/tte_hash.c Fri Apr 22 12:39:48 2011 (r220948) +++ head/sys/sun4v/sun4v/tte_hash.c Fri Apr 22 12:42:41 2011 (r220949) @@ -589,7 +589,7 @@ tte_hash_update(tte_hash_t th, vm_offset tte_t otte_data, tte_tag; tte_hash_field_t field = NULL; - entry = find_entry(th, va, PAGE_SHIFT); /* should actualy be a function of tte_data */ + entry = find_entry(th, va, PAGE_SHIFT); /* should actually be a function of tte_data */ tte_tag = (((uint64_t)th->th_context << TTARGET_CTX_SHIFT)|(va >> TTARGET_VA_SHIFT)); s = hash_bucket_lock(entry->the_fields); From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 12:46:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCF041065673; Fri, 22 Apr 2011 12:46:39 +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 CD52E8FC15; Fri, 22 Apr 2011 12:46: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 p3MCkdUX043023; Fri, 22 Apr 2011 12:46:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MCkd4l043020; Fri, 22 Apr 2011 12:46:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104221246.p3MCkd4l043020@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 12:46: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: r220950 - head/sys/dev/sym X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 12:46:40 -0000 Author: marius Date: Fri Apr 22 12:46:39 2011 New Revision: 220950 URL: http://svn.freebsd.org/changeset/base/220950 Log: More spelling fixes. Submitted by: N.J. Mann Modified: head/sys/dev/sym/sym_fw1.h head/sys/dev/sym/sym_fw2.h Modified: head/sys/dev/sym/sym_fw1.h ============================================================================== --- head/sys/dev/sym/sym_fw1.h Fri Apr 22 12:42:41 2011 (r220949) +++ head/sys/dev/sym/sym_fw1.h Fri Apr 22 12:46:39 2011 (r220950) @@ -1027,7 +1027,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ * It shall be a tagged command. * Read SIMPLE+TAG. * The C code will deal with errors. - * Aggressive optimization, is'nt it? :) + * Aggressive optimization, isn't it? :) */ SCR_MOVE_ABS (2) ^ SCR_MSG_IN, HADDR_1 (msgin), Modified: head/sys/dev/sym/sym_fw2.h ============================================================================== --- head/sys/dev/sym/sym_fw2.h Fri Apr 22 12:42:41 2011 (r220949) +++ head/sys/dev/sym/sym_fw2.h Fri Apr 22 12:46:39 2011 (r220950) @@ -945,7 +945,7 @@ static const struct SYM_FWA_SCR SYM_FWA_ * It shall be a tagged command. * Read SIMPLE+TAG. * The C code will deal with errors. - * Aggressive optimization, is'nt it? :) + * Aggressive optimization, isn't it? :) */ SCR_MOVE_ABS (2) ^ SCR_MSG_IN, HADDR_1 (msgin), From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 13:56:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5362106566B; Fri, 22 Apr 2011 13:56: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 C5BE88FC13; Fri, 22 Apr 2011 13:56: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 p3MDuLhn045094; Fri, 22 Apr 2011 13:56:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MDuLFC045092; Fri, 22 Apr 2011 13:56:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201104221356.p3MDuLFC045092@svn.freebsd.org> From: Marius Strobl Date: Fri, 22 Apr 2011 13:56: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: r220951 - head/sys/dev/esp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 22 Apr 2011 13:56:21 -0000 Author: marius Date: Fri Apr 22 13:56:21 2011 New Revision: 220951 URL: http://svn.freebsd.org/changeset/base/220951 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/dev/esp/ncr53c9x.c Modified: head/sys/dev/esp/ncr53c9x.c ============================================================================== --- head/sys/dev/esp/ncr53c9x.c Fri Apr 22 12:46:39 2011 (r220950) +++ head/sys/dev/esp/ncr53c9x.c Fri Apr 22 13:56:21 2011 (r220951) @@ -2560,7 +2560,7 @@ again: * XXX This will cause a chip reset and will * prevent us from finding out the real * problem with the device. However, it's - * neccessary until a way can be found to + * necessary until a way can be found to * safely cancel the DMA that is in * progress. */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 14:41:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A622106566C; Fri, 22 Apr 2011 14:41:29 +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 5A16B8FC13; Fri, 22 Apr 2011 14:41: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 p3MEfTfW046519; Fri, 22 Apr 2011 14:41:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MEfT8b046517; Fri, 22 Apr 2011 14:41:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104221441.p3MEfT8b046517@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 22 Apr 2011 14:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220952 - stable/8/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: Fri, 22 Apr 2011 14:41:29 -0000 Author: jilles Date: Fri Apr 22 14:41:29 2011 New Revision: 220952 URL: http://svn.freebsd.org/changeset/base/220952 Log: MFC r220646: getfh(2): Add xrefs for fhopen(2), open(2), stat(2). Modified: stable/8/lib/libc/sys/getfh.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/getfh.2 ============================================================================== --- stable/8/lib/libc/sys/getfh.2 Fri Apr 22 13:56:21 2011 (r220951) +++ stable/8/lib/libc/sys/getfh.2 Fri Apr 22 14:41:29 2011 (r220952) @@ -28,7 +28,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 6, 2004 +.Dd April 14, 2011 .Dt GETFH 2 .Os .Sh NAME @@ -104,6 +104,10 @@ An .Tn I/O error occurred while reading from or writing to the file system. .El +.Sh SEE ALSO +.Xr fhopen 2 , +.Xr open 2 , +.Xr stat 2 .Sh HISTORY The .Fn getfh From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 14:42:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73B57106564A; Fri, 22 Apr 2011 14:42:42 +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 6399C8FC1C; Fri, 22 Apr 2011 14:42: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 p3MEggwa046606; Fri, 22 Apr 2011 14:42:42 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MEggj0046604; Fri, 22 Apr 2011 14:42:42 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104221442.p3MEggj0046604@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 22 Apr 2011 14:42:42 +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: r220953 - stable/7/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: Fri, 22 Apr 2011 14:42:42 -0000 Author: jilles Date: Fri Apr 22 14:42:42 2011 New Revision: 220953 URL: http://svn.freebsd.org/changeset/base/220953 Log: MFC r220646: getfh(2): Add xrefs for fhopen(2), open(2), stat(2). Modified: stable/7/lib/libc/sys/getfh.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/getfh.2 ============================================================================== --- stable/7/lib/libc/sys/getfh.2 Fri Apr 22 14:41:29 2011 (r220952) +++ stable/7/lib/libc/sys/getfh.2 Fri Apr 22 14:42:42 2011 (r220953) @@ -28,7 +28,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 6, 2004 +.Dd April 14, 2011 .Dt GETFH 2 .Os .Sh NAME @@ -104,6 +104,10 @@ An .Tn I/O error occurred while reading from or writing to the file system. .El +.Sh SEE ALSO +.Xr fhopen 2 , +.Xr open 2 , +.Xr stat 2 .Sh HISTORY The .Fn getfh From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 17:10:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AAC0106564A; Fri, 22 Apr 2011 17:10:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1E58FC0C; Fri, 22 Apr 2011 17:10: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 p3MHAqeV051052; Fri, 22 Apr 2011 17:10:52 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MHApbu051050; Fri, 22 Apr 2011 17:10:51 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201104221710.p3MHApbu051050@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 22 Apr 2011 17:10: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: r220954 - 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: Fri, 22 Apr 2011 17:10:52 -0000 Author: obrien Date: Fri Apr 22 17:10:51 2011 New Revision: 220954 URL: http://svn.freebsd.org/changeset/base/220954 Log: Note which of the built kernels is being installed. PR: 156579 Submitted by: dhw Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Apr 22 14:42:42 2011 (r220953) +++ head/Makefile.inc1 Fri Apr 22 17:10:51 2011 (r220954) @@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i false .endif @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel" + @echo ">>> Installing kernel ${KERNCONF}" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 17:57:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01F0D106566B; Fri, 22 Apr 2011 17:57:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E55F68FC16; Fri, 22 Apr 2011 17:57: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 p3MHvDNA052455; Fri, 22 Apr 2011 17:57:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MHvDdD052453; Fri, 22 Apr 2011 17:57:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104221757.p3MHvDdD052453@svn.freebsd.org> From: Adrian Chadd Date: Fri, 22 Apr 2011 17:57: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: r220955 - 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: Fri, 22 Apr 2011 17:57:14 -0000 Author: adrian Date: Fri Apr 22 17:57:13 2011 New Revision: 220955 URL: http://svn.freebsd.org/changeset/base/220955 Log: Fix the merlin LNA configuration code - these are bit flags, not raw values to be written into the registers. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Apr 22 17:10:51 2011 (r220954) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Apr 22 17:57:13 2011 (r220955) @@ -1434,8 +1434,10 @@ ar5416SetBoardValues(struct ath_hal *ah, OS_A_REG_RMW_FIELD(ah, AR_AN_RF5G1_CH1, AR_AN_RF5G1_CH1_DB5, pModal->db_ch1); } OS_A_REG_RMW_FIELD(ah, AR_AN_TOP2, AR_AN_TOP2_XPABIAS_LVL, pModal->xpaBiasLvl); - OS_A_REG_RMW_FIELD(ah, AR_AN_TOP2, AR_AN_TOP2_LOCALBIAS, pModal->flagBits & AR5416_EEP_FLAG_LOCALBIAS); - OS_A_REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG, pModal->flagBits & AR5416_EEP_FLAG_FORCEXPAON); + OS_A_REG_RMW_FIELD(ah, AR_AN_TOP2, AR_AN_TOP2_LOCALBIAS, + !!(pModal->flagBits & AR5416_EEP_FLAG_LOCALBIAS)); + OS_A_REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG, + !!(pModal->flagBits & AR5416_EEP_FLAG_FORCEXPAON)); } OS_REG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, pModal->switchSettling); From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 23:42:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DB45106566B; Fri, 22 Apr 2011 23:42:24 +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 E46E38FC12; Fri, 22 Apr 2011 23:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3MNgNMq062602; Fri, 22 Apr 2011 23:42:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MNgNMm062601; Fri, 22 Apr 2011 23:42:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104222342.p3MNgNMm062601@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Apr 2011 23:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220957 - in stable/8/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, 22 Apr 2011 23:42:24 -0000 Author: dougb Date: Fri Apr 22 23:42:23 2011 New Revision: 220957 URL: http://svn.freebsd.org/changeset/base/220957 Log: Pull mergeinfo from r220370 up to etc/ where it belongs Modified: Directory Properties: stable/8/etc/ (props changed) stable/8/etc/mtree/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 23:44:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7068B106566C; Fri, 22 Apr 2011 23:44:25 +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 5D2888FC08; Fri, 22 Apr 2011 23:44: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 p3MNiP3k062725; Fri, 22 Apr 2011 23:44:25 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MNiPJR062723; Fri, 22 Apr 2011 23:44:25 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104222344.p3MNiPJR062723@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Apr 2011 23:44: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: r220958 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 23:44:25 -0000 Author: dougb Date: Fri Apr 22 23:44:25 2011 New Revision: 220958 URL: http://svn.freebsd.org/changeset/base/220958 Log: MFC r220760: The change in r206686 to allow the stop argument to work for a service that is running even though not _enable'd had an annoying side effect. If the service was already started at boot time by another means when the related script came around again in rcorder it would start again, regardless of _enable, because there was a valid pid. So, split the test into 2 parts, one for (!rcvar && !stop), and one for (stop && !valid_pid). This preserves the behavior from r206686 while preventing the undesired side effect. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Fri Apr 22 23:42:23 2011 (r220957) +++ stable/8/etc/rc.subr Fri Apr 22 23:44:25 2011 (r220958) @@ -651,7 +651,8 @@ run_rc_command() # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] || + [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-all@FreeBSD.ORG Fri Apr 22 23:45:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30F4A1065675; Fri, 22 Apr 2011 23:45:34 +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 1DF628FC0A; Fri, 22 Apr 2011 23:45: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 p3MNjYWP062810; Fri, 22 Apr 2011 23:45:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3MNjYrd062808; Fri, 22 Apr 2011 23:45:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104222345.p3MNjYrd062808@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Apr 2011 23:45:34 +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: r220959 - stable/7/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 23:45:34 -0000 Author: dougb Date: Fri Apr 22 23:45:33 2011 New Revision: 220959 URL: http://svn.freebsd.org/changeset/base/220959 Log: MFC r220760: The change in r206686 to allow the stop argument to work for a service that is running even though not _enable'd had an annoying side effect. If the service was already started at boot time by another means when the related script came around again in rcorder it would start again, regardless of _enable, because there was a valid pid. [1] So, split the test into 2 parts, one for (!rcvar && !stop), and one for (stop && !valid_pid). This preserves the behavior from r206686 while preventing the undesired side effect. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Fri Apr 22 23:44:25 2011 (r220958) +++ stable/7/etc/rc.subr Fri Apr 22 23:45:33 2011 (r220959) @@ -623,7 +623,8 @@ run_rc_command() # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] || + [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 02:03:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66C241065672; Sat, 23 Apr 2011 02:03:18 +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 54BF88FC08; Sat, 23 Apr 2011 02:03: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 p3N23IJf066910; Sat, 23 Apr 2011 02:03:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N23I1b066908; Sat, 23 Apr 2011 02:03:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104230203.p3N23I1b066908@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 02:03: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: r220960 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 02:03:18 -0000 Author: dougb Date: Sat Apr 23 02:03:18 2011 New Revision: 220960 URL: http://svn.freebsd.org/changeset/base/220960 Log: MFC r201038: Update the comments about files ending in .sh Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Fri Apr 22 23:45:33 2011 (r220959) +++ stable/8/etc/rc.subr Sat Apr 23 02:03:18 2011 (r220960) @@ -945,10 +945,11 @@ _run_rc_killcmd() # # run_rc_script file arg # Start the script `file' with `arg', and correctly handle the -# return value from the script. If `file' ends with `.sh', it's -# sourced into the current environment. If `file' appears to be -# a backup or scratch file, ignore it. Otherwise if it's -# executable run as a child process. +# return value from the script. +# If `file' ends with `.sh', it's sourced into the current environment +# when $rc_fast_and_loose is set, otherwise it is run as a child process. +# If `file' appears to be a backup or scratch file, ignore it. +# Otherwise if it is executable run as a child process. # run_rc_script() { From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 02:10:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6D0B1065675; Sat, 23 Apr 2011 02:10:38 +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 A4C818FC18; Sat, 23 Apr 2011 02:10: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 p3N2Acth067159; Sat, 23 Apr 2011 02:10:38 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N2Acpf067157; Sat, 23 Apr 2011 02:10:38 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104230210.p3N2Acpf067157@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 02:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220961 - stable/7/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 02:10:38 -0000 Author: dougb Date: Sat Apr 23 02:10:38 2011 New Revision: 220961 URL: http://svn.freebsd.org/changeset/base/220961 Log: MFC r201038: Update the comments about files ending in .sh Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat Apr 23 02:03:18 2011 (r220960) +++ stable/7/etc/rc.subr Sat Apr 23 02:10:38 2011 (r220961) @@ -876,10 +876,11 @@ _run_rc_killcmd() # # run_rc_script file arg # Start the script `file' with `arg', and correctly handle the -# return value from the script. If `file' ends with `.sh', it's -# sourced into the current environment. If `file' appears to be -# a backup or scratch file, ignore it. Otherwise if it's -# executable run as a child process. +# return value from the script. +# If `file' ends with `.sh', it's sourced into the current environment +# when $rc_fast_and_loose is set, otherwise it is run as a child process. +# If `file' appears to be a backup or scratch file, ignore it. +# Otherwise if it is executable run as a child process. # run_rc_script() { From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 04:26:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE079106564A; Sat, 23 Apr 2011 04:26:31 +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 AC0928FC13; Sat, 23 Apr 2011 04:26: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 p3N4QV2e071496; Sat, 23 Apr 2011 04:26:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N4QVsK071489; Sat, 23 Apr 2011 04:26:31 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104230426.p3N4QVsK071489@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 04:26: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: r220962 - in head: etc 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: Sat, 23 Apr 2011 04:26:31 -0000 Author: dougb Date: Sat Apr 23 04:26:31 2011 New Revision: 220962 URL: http://svn.freebsd.org/changeset/base/220962 Log: Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds like, determines the path to a pid file as it is specified in a conf file. Use the new feature for rc.d/named and rc.d/devd, the 2 services in the base that list their pid files in their conf files. Remove the now-obsolete named_pidfile, and warn users if they have it set. Modified: head/etc/defaults/rc.conf head/etc/rc.d/devd head/etc/rc.d/named head/etc/rc.subr head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Apr 23 02:10:38 2011 (r220961) +++ head/etc/defaults/rc.conf Sat Apr 23 04:26:31 2011 (r220962) @@ -274,7 +274,6 @@ named_enable="NO" # Run named, the DNS named_program="/usr/sbin/named" # Path to named, if you want a different one. named_conf="/etc/namedb/named.conf" # Path to the configuration file #named_flags="" # Use this for flags OTHER than -u and -c -named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) named_chroot_autoupdate="YES" # Automatically install/update chrooted Modified: head/etc/rc.d/devd ============================================================================== --- head/etc/rc.d/devd Sat Apr 23 02:10:38 2011 (r220961) +++ head/etc/rc.d/devd Sat Apr 23 04:26:31 2011 (r220962) @@ -13,12 +13,23 @@ name="devd" rcvar=`set_rcvar` command="/sbin/${name}" -pidfile=/var/run/${name}.pid start_precmd=${name}_prestart +stop_precmd=find_pidfile + +find_pidfile() +{ + if get_pidfile_from_conf pid-file /etc/devd.conf; then + pidfile="$_pidfile_from_conf" + else + pidfile="/var/run/${name}.pid" + fi +} devd_prestart () { + find_pidfile + # If devd is disabled, turn it off in the kernel to avoid memory leaks. if ! checkyesno ${rcvar}; then $SYSCTL hw.bus.devctl_disable=1 Modified: head/etc/rc.d/named ============================================================================== --- head/etc/rc.d/named Sat Apr 23 02:10:38 2011 (r220961) +++ head/etc/rc.d/named Sat Apr 23 04:26:31 2011 (r220962) @@ -112,8 +112,19 @@ named_reload() ${command%/named}/rndc reload } +find_pidfile() +{ + if get_pidfile_from_conf pid-file $named_conf; then + pidfile="$_pidfile_from_conf" + else + pidfile="/var/run/named/pid" + fi +} + named_stop() { + find_pidfile + # This duplicates an undesirably large amount of code from the stop # routine in rc.subr in order to use rndc to shut down the process, # and to give it a second chance in case rndc fails. @@ -156,6 +167,12 @@ create_file () { named_prestart() { + find_pidfile + + if [ -n "$named_pidfile" ]; then + warn 'named_pidfile: now determined from the conf file' + fi + command_args="-u ${named_uid:=root}" if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then @@ -279,7 +296,6 @@ load_rc_config $name # required_dirs="$named_chrootdir" # if it is set, it must exist -pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" run_rc_command "$1" Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Apr 23 02:10:38 2011 (r220961) +++ head/etc/rc.subr Sat Apr 23 04:26:31 2011 (r220962) @@ -384,6 +384,45 @@ wait_for_pids() } # +# get_pidfile_from_conf string file +# +# Takes a string to search for in the specified file. +# Ignores lines with traditional comment characters. +# +# Example: +# +# if get_pidfile_from_conf string file; then +# pidfile="$_pidfile_from_conf" +# else +# pidfile='appropriate default' +# fi +# +get_pidfile_from_conf() +{ + local string file line + + string="$1" ; file="$2" + + if [ -z "$string" -o -z "$file" ] || [ ! -s "$file" ]; then + err 3 'USAGE: get_pidfile_from_conf string file' + fi + + while read line; do + case "$line" in + *[#\;]*${string}*) continue ;; + *${string}*) break ;; + esac + done < $file + + if [ -n "$line" ]; then + line=${line#*/} + _pidfile_from_conf="/${line%%[\"\;]*}" + else + return 1 + fi +} + +# # check_startmsgs # If rc_quiet is set (usually as a result of using faststart at # boot time) check if rc_startmsgs is enabled. Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Apr 23 02:10:38 2011 (r220961) +++ head/share/man/man5/rc.conf.5 Sat Apr 23 04:26:31 2011 (r220962) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2011 +.Dd April 22, 2011 .Dt RC.CONF 5 .Os .Sh NAME @@ -1832,13 +1832,6 @@ is set to .Dq Li YES , these are the flags to pass to .Xr named 8 . -.It Va named_pidfile -.Pq Vt str -This is the default path to the -.Xr named 8 -daemon's PID file. -This must match the location in -.Xr named.conf 5 . .It Va named_uid .Pq Vt str The user that the From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 05:24:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E069106564A; Sat, 23 Apr 2011 05:24:18 +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 2CFA58FC13; Sat, 23 Apr 2011 05:24: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 p3N5OIRi073171; Sat, 23 Apr 2011 05:24:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N5OIVh073168; Sat, 23 Apr 2011 05:24:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104230524.p3N5OIVh073168@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 05:24: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: r220963 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 05:24:18 -0000 Author: dougb Date: Sat Apr 23 05:24:17 2011 New Revision: 220963 URL: http://svn.freebsd.org/changeset/base/220963 Log: Improve the error handling for the new get_pidfile_from_conf() Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Apr 23 04:26:31 2011 (r220962) +++ head/etc/rc.subr Sat Apr 23 05:24:17 2011 (r220963) @@ -399,12 +399,16 @@ wait_for_pids() # get_pidfile_from_conf() { + if [ -z "$1" -o -z "$2" ]; then + err 3 "USAGE: get_pidfile_from_conf string file ($name)" + fi + local string file line string="$1" ; file="$2" - if [ -z "$string" -o -z "$file" ] || [ ! -s "$file" ]; then - err 3 'USAGE: get_pidfile_from_conf string file' + if [ ! -s "$file" ]; then + err 3 "get_pidfile_from_conf: $file does not exist ($name)" fi while read line; do From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 05:29:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720BF1065670; Sat, 23 Apr 2011 05:29:59 +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 601D58FC08; Sat, 23 Apr 2011 05:29: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 p3N5Txpx073364; Sat, 23 Apr 2011 05:29:59 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N5TxjM073362; Sat, 23 Apr 2011 05:29:59 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201104230529.p3N5TxjM073362@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 23 Apr 2011 05:29:59 +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: r220964 - stable/8/contrib/bsnmp/snmpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 05:29:59 -0000 Author: ru Date: Sat Apr 23 05:29:59 2011 New Revision: 220964 URL: http://svn.freebsd.org/changeset/base/220964 Log: MFC r220882: Don't clog syslog up with "inet_ntop(): Address family not supported by protocol family" when processing requests received from the UNIX domain socket. Modified: stable/8/contrib/bsnmp/snmpd/main.c Directory Properties: stable/8/contrib/bsnmp/ (props changed) Modified: stable/8/contrib/bsnmp/snmpd/main.c ============================================================================== --- stable/8/contrib/bsnmp/snmpd/main.c Sat Apr 23 05:24:17 2011 (r220963) +++ stable/8/contrib/bsnmp/snmpd/main.c Sat Apr 23 05:29:59 2011 (r220964) @@ -909,7 +909,8 @@ snmpd_input(struct port_input *pi, struc /* * In case of AF_INET{6} peer, do hosts_access(5) check. */ - if (inet_ntop(pi->peer->sa_family, + if (pi->peer->sa_family != AF_LOCAL && + inet_ntop(pi->peer->sa_family, &((const struct sockaddr_in *)(const void *)pi->peer)->sin_addr, client, sizeof(client)) != NULL) { request_set(&req, RQ_CLIENT_ADDR, client, 0); @@ -918,7 +919,7 @@ snmpd_input(struct port_input *pi, struc eval_client(&req)); return (-1); } - } else + } else if (pi->peer->sa_family != AF_LOCAL) syslog(LOG_ERR, "inet_ntop(): %m"); #endif From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 05:56:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44331065672; Sat, 23 Apr 2011 05:56:06 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C068FC13; Sat, 23 Apr 2011 05:56: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 p3N5u60T074168; Sat, 23 Apr 2011 05:56:06 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N5u60S074166; Sat, 23 Apr 2011 05:56:06 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201104230556.p3N5u60S074166@svn.freebsd.org> From: Maxim Konovalov Date: Sat, 23 Apr 2011 05:56: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: r220965 - head/usr.sbin/tcpdrop X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 05:56:06 -0000 Author: maxim Date: Sat Apr 23 05:56:06 2011 New Revision: 220965 URL: http://svn.freebsd.org/changeset/base/220965 Log: o Remove an incomplete sentence. PR: docs/156593 Submitted by: Yuri Pankov MFC after: 1 week Modified: head/usr.sbin/tcpdrop/tcpdrop.8 Modified: head/usr.sbin/tcpdrop/tcpdrop.8 ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.8 Sat Apr 23 05:29:59 2011 (r220964) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Sat Apr 23 05:56:06 2011 (r220965) @@ -62,8 +62,6 @@ will be dropped. .Pp Addresses and ports may be specified by name or numeric value. Both IPv4 and IPv6 address formats are supported. -.Nm -in case of success or failure. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 06:37:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BBF21065740; Sat, 23 Apr 2011 06:37:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 087768FC13; Sat, 23 Apr 2011 06:37: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 p3N6b9D8075411; Sat, 23 Apr 2011 06:37:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3N6b9gU075408; Sat, 23 Apr 2011 06:37:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104230637.p3N6b9gU075408@svn.freebsd.org> From: Adrian Chadd Date: Sat, 23 Apr 2011 06:37: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: r220966 - in 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: Sat, 23 Apr 2011 06:37:10 -0000 Author: adrian Date: Sat Apr 23 06:37:09 2011 New Revision: 220966 URL: http://svn.freebsd.org/changeset/base/220966 Log: Fix a corner-case of interrupt handling which resulted in potentially spurious (and fatal) interrupt errors. One user reported seeing this: Apr 22 18:04:24 ceres kernel: ar5416GetPendingInterrupts: fatal error, ISR_RAC 0x0 SYNC_CAUSE 0x2000 SYNC_CAUSE of 0x2000 is AR_INTR_SYNC_LOCAL_TIMEOUT which is a bus timeout; this shouldn't cause HAL_INT_FATAL to be set. After checking out ath9k, ath9k_ar9002_hw_get_isr() clears (*masked) before continuing, regardless of whether any bits in the ISR registers are set. So if AR_INTR_SYNC_CAUSE is set to something that isn't treated as fatal, and AR_ISR isn't read or is read and is 0, then (*masked) wouldn't be cleared. Thus any of the existing bits set that were passed in would be preserved in the output. The caller in if_ath - ath_intr() - wasn't setting the masked value to 0 before calling ath_hal_getisr(), so anything that was present in that uninitialised variable would be preserved in the case above of AR_ISR=0, AR_INTR_SYNC_CAUSE != 0; and if the HAL_INT_FATAL bit was set, a fatal condition would be interpreted and the chip was reset. This patch does the following: * ath_intr() - set masked to 0 before calling ath_hal_getisr(); * ar5416GetPendingInterrupts() - clear (*masked) before processing continues; so if the interrupt source is AR_INTR_SYNC_CAUSE and it isn't fatal, the hardware isn't reset via returning HAL_INT_FATAL. This doesn't fix any underlying errors which trigger AR_INTR_SYNC_LOCAL_TIMEOUT - which is a bus timeout of some sort - so that likely should be further investigated. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sat Apr 23 05:56:06 2011 (r220965) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sat Apr 23 06:37:09 2011 (r220966) @@ -55,6 +55,8 @@ ar5416IsInterruptPending(struct ath_hal * values. The value returned is mapped to abstract the hw-specific bit * locations in the Interrupt Status Register. * + * (*masked) is cleared on initial call. + * * Returns: A hardware-abstracted bitmap of all non-masked-out * interrupts pending, as well as an unmasked value */ @@ -73,10 +75,10 @@ ar5416GetPendingInterrupts(struct ath_ha isr = 0; sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE); sync_cause &= AR_INTR_SYNC_DEFAULT; - if (isr == 0 && sync_cause == 0) { - *masked = 0; + *masked = 0; + + if (isr == 0 && sync_cause == 0) return AH_FALSE; - } if (isr != 0) { struct ath_hal_5212 *ahp = AH5212(ah); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Apr 23 05:56:06 2011 (r220965) +++ head/sys/dev/ath/if_ath.c Sat Apr 23 06:37:09 2011 (r220966) @@ -1265,7 +1265,7 @@ ath_intr(void *arg) struct ath_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; struct ath_hal *ah = sc->sc_ah; - HAL_INT status; + HAL_INT status = 0; if (sc->sc_invalid) { /* @@ -1296,6 +1296,11 @@ ath_intr(void *arg) ath_hal_getisr(ah, &status); /* NB: clears ISR too */ DPRINTF(sc, ATH_DEBUG_INTR, "%s: status 0x%x\n", __func__, status); status &= sc->sc_imask; /* discard unasked for bits */ + + /* Short-circuit un-handled interrupts */ + if (status == 0x0) + return; + if (status & HAL_INT_FATAL) { sc->sc_stats.ast_hardware++; ath_hal_intrset(ah, 0); /* disable intr's until reset */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 11:22:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C02E106566B; Sat, 23 Apr 2011 11:22:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346AF8FC0A; Sat, 23 Apr 2011 11:22: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 p3NBMn6b087356; Sat, 23 Apr 2011 11:22:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3NBMnHk087354; Sat, 23 Apr 2011 11:22:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104231122.p3NBMnHk087354@svn.freebsd.org> From: Rick Macklem Date: Sat, 23 Apr 2011 11:22: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: r220967 - 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, 23 Apr 2011 11:22:49 -0000 Author: rmacklem Date: Sat Apr 23 11:22:48 2011 New Revision: 220967 URL: http://svn.freebsd.org/changeset/base/220967 Log: Fix a LOR in vfs_busy() where, after msleeping, it would lock the mutexes in the wrong order for the case where the MBF_MNTLSTLOCK is set. I believe this did have the potential for deadlock. For example, if multiple nfsd threads called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK. Thanks go to pho for catching this during his testing. Tested by: pho Submitted by: kib MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 23 06:37:09 2011 (r220966) +++ head/sys/kern/vfs_subr.c Sat Apr 23 11:22:48 2011 (r220967) @@ -377,9 +377,10 @@ vfs_busy(struct mount *mp, int flags) if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); mp->mnt_kern_flag |= MNTK_MWAIT; - msleep(mp, MNT_MTX(mp), PVFS, "vfs_busy", 0); + msleep(mp, MNT_MTX(mp), PVFS | PDROP, "vfs_busy", 0); if (flags & MBF_MNTLSTLOCK) mtx_lock(&mountlist_mtx); + MNT_ILOCK(mp); } if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 13:07:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9831106564A; Sat, 23 Apr 2011 13:07:35 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B324F8FC16; Sat, 23 Apr 2011 13:07: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 p3ND7ZkJ090500; Sat, 23 Apr 2011 13:07:35 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ND7Z3Q090498; Sat, 23 Apr 2011 13:07:35 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104231307.p3ND7Z3Q090498@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 23 Apr 2011 13:07: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: r220968 - head/contrib/traceroute X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 13:07:35 -0000 Author: simon Date: Sat Apr 23 13:07:35 2011 New Revision: 220968 URL: http://svn.freebsd.org/changeset/base/220968 Log: Check return code of setuid() in traceroute. While it will not fail in normal circumstances, better safe than sorry. Reported by: LLVM's clang static analyzer MFC after: 3 days Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sat Apr 23 11:22:48 2011 (r220967) +++ head/contrib/traceroute/traceroute.c Sat Apr 23 13:07:35 2011 (r220968) @@ -509,7 +509,10 @@ main(int argc, char **argv) sockerrno = errno; } - setuid(getuid()); + if (setuid(getuid()) != 0) { + perror("setuid()"); + exit(1); + } #ifdef IPCTL_DEFTTL { From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 13:42:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4604A106566B; Sat, 23 Apr 2011 13:42:04 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 300898FC0C; Sat, 23 Apr 2011 13:42: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 p3NDg4Co091545; Sat, 23 Apr 2011 13:42:04 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3NDg4Ld091543; Sat, 23 Apr 2011 13:42:04 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104231342.p3NDg4Ld091543@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 23 Apr 2011 13:42: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: r220969 - head/usr.sbin/rwhod X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 13:42:04 -0000 Author: simon Date: Sat Apr 23 13:42:03 2011 New Revision: 220969 URL: http://svn.freebsd.org/changeset/base/220969 Log: Check return code of setuid(), setgid(), and setgroups() in rwhod. While they will not fail in normal circumstances, better safe than sorry. MFC after: 1 week Modified: head/usr.sbin/rwhod/rwhod.c Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Sat Apr 23 13:07:35 2011 (r220968) +++ head/usr.sbin/rwhod/rwhod.c Sat Apr 23 13:42:03 2011 (r220969) @@ -248,9 +248,18 @@ main(int argc, char *argv[]) syslog(LOG_ERR, "bind: %m"); exit(1); } - setgid(unpriv_gid); - setgroups(1, &unpriv_gid); /* XXX BOGUS groups[0] = egid */ - setuid(unpriv_uid); + if (setgid(unpriv_gid) != 0) { + syslog(LOG_ERR, "setgid: %m"); + exit(1); + } + if (setgroups(1, &unpriv_gid) != 0) { /* XXX BOGUS groups[0] = egid */ + syslog(LOG_ERR, "setgroups: %m"); + exit(1); + } + if (setuid(unpriv_uid) != 0) { + syslog(LOG_ERR, "setuid: %m"); + exit(1); + } if (!configure(s)) exit(1); if (!quiet_mode) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 13:57:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61D7106566B; Sat, 23 Apr 2011 13:57:12 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C07958FC13; Sat, 23 Apr 2011 13:57: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 p3NDvCoR092035; Sat, 23 Apr 2011 13:57:12 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3NDvCk1092033; Sat, 23 Apr 2011 13:57:12 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104231357.p3NDvCk1092033@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 23 Apr 2011 13:57: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: r220970 - head/usr.sbin/timed/timedc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 13:57:12 -0000 Author: simon Date: Sat Apr 23 13:57:12 2011 New Revision: 220970 URL: http://svn.freebsd.org/changeset/base/220970 Log: Check return code of setuid() in timedc. While it will not fail in normal circumstances, better safe than sorry. MFC after: 3 days Modified: head/usr.sbin/timed/timedc/timedc.c Modified: head/usr.sbin/timed/timedc/timedc.c ============================================================================== --- head/usr.sbin/timed/timedc/timedc.c Sat Apr 23 13:42:03 2011 (r220969) +++ head/usr.sbin/timed/timedc/timedc.c Sat Apr 23 13:57:12 2011 (r220970) @@ -75,7 +75,8 @@ main(argc, argv) */ if (priv_resources() < 0) errx(1, "could not get privileged resources"); - (void) setuid(getuid()); + if (setuid(getuid()) != 0) + err(1, "setuid()"); if (--argc > 0) { c = getcmd(*++argv); From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 14:19:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D91C106566C; Sat, 23 Apr 2011 14:19:26 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 584C98FC08; Sat, 23 Apr 2011 14:19: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 p3NEJQuQ092699; Sat, 23 Apr 2011 14:19:26 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3NEJQp0092697; Sat, 23 Apr 2011 14:19:26 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201104231419.p3NEJQp0092697@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 23 Apr 2011 14:19: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: r220971 - head/usr.bin/finger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 14:19:26 -0000 Author: simon Date: Sat Apr 23 14:19:26 2011 New Revision: 220971 URL: http://svn.freebsd.org/changeset/base/220971 Log: Check return code of setuid() and setgid() in finger. While they will not fail in normal circumstances, better safe than sorry. MFC after: 1 week Modified: head/usr.bin/finger/finger.c Modified: head/usr.bin/finger/finger.c ============================================================================== --- head/usr.bin/finger/finger.c Sat Apr 23 13:57:12 2011 (r220970) +++ head/usr.bin/finger/finger.c Sat Apr 23 14:19:26 2011 (r220971) @@ -164,11 +164,15 @@ main(int argc, char **argv) if (getuid() == 0 || geteuid() == 0) { invoker_root = 1; if ((pw = getpwnam(UNPRIV_NAME)) && pw->pw_uid > 0) { - setgid(pw->pw_gid); - setuid(pw->pw_uid); + if (setgid(pw->pw_gid) != 0) + err(1, "setgid()"); + if (setuid(pw->pw_uid) != 0) + err(1, "setuid()"); } else { - setgid(UNPRIV_UGID); - setuid(UNPRIV_UGID); + if (setgid(UNPRIV_UGID) != 0) + err(1, "setgid()"); + if (setuid(UNPRIV_UGID) != 0) + err(1, "setuid()"); } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 17:37:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A86D51065675; Sat, 23 Apr 2011 17:37:14 +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 9E18A8FC12; Sat, 23 Apr 2011 17:37:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3NHbEJa097357; Sat, 23 Apr 2011 17:37:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3NHbECD097355; Sat, 23 Apr 2011 17:37:14 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104231737.p3NHbECD097355@svn.freebsd.org> From: Doug Barton Date: Sat, 23 Apr 2011 17:37: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: r220974 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 17:37:14 -0000 Author: dougb Date: Sat Apr 23 17:37:14 2011 New Revision: 220974 URL: http://svn.freebsd.org/changeset/base/220974 Log: As previously advertised, remove the error message for enable_quotas prior to 9.0-RELEASE. This change should not be MFC'ed. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Apr 23 17:15:10 2011 (r220973) +++ head/etc/rc.subr Sat Apr 23 17:37:14 2011 (r220974) @@ -1060,10 +1060,6 @@ load_rc_config() . /etc/rc.conf.d/"$_name" fi - # Old variable name support -- Remove before 9.0-RELEASE - # - [ -n "$enable_quotas" ] && err 1 "enable_quotas is deprecated, use quota_enable" - # Set defaults if defined. for _var in $rcvar $rcvars; do _defval=`eval echo "\\\$${_var}_defval"` From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 20:59:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06BA51065672; Sat, 23 Apr 2011 20:59:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6B798FC13; Sat, 23 Apr 2011 20:59:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3NKxwcL003460; Sat, 23 Apr 2011 20:59:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3NKxw2k003458; Sat, 23 Apr 2011 20:59:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201104232059.p3NKxw2k003458@svn.freebsd.org> From: Glen Barber Date: Sat, 23 Apr 2011 20:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220975 - 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: Sat, 23 Apr 2011 20:59:59 -0000 Author: gjb (doc committer) Date: Sat Apr 23 20:59:58 2011 New Revision: 220975 URL: http://svn.freebsd.org/changeset/base/220975 Log: - Clarification on kld_file_stat.size - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Submitted by: arundel MFC after: 3 days Modified: head/lib/libc/sys/kldstat.2 Modified: head/lib/libc/sys/kldstat.2 ============================================================================== --- head/lib/libc/sys/kldstat.2 Sat Apr 23 17:37:14 2011 (r220974) +++ head/lib/libc/sys/kldstat.2 Sat Apr 23 20:59:58 2011 (r220975) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 1999 +.Dd April 23, 2011 .Dt KLDSTAT 2 .Os .Sh NAME @@ -51,8 +51,8 @@ struct kld_file_stat { char name[MAXPATHLEN]; int refs; int id; - caddr_t address; /* load address */ - size_t size; /* size in bytes */ + caddr_t address; + size_t size; char pathname[MAXPATHLEN]; }; .Ed @@ -76,7 +76,7 @@ The id of the file specified in .It address The load address of the kld file. .It size -The size of the file. +The amount of memory in bytes allocated by the file. .It pathname The full name of the file referred to by .Fa fileid , From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 21:38:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9C5E106566B; Sat, 23 Apr 2011 21:38:21 +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 D3F3F8FC08; Sat, 23 Apr 2011 21:38:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3NLcLQG004653; Sat, 23 Apr 2011 21:38:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3NLcLtM004651; Sat, 23 Apr 2011 21:38:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104232138.p3NLcLtM004651@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Apr 2011 21:38: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: r220977 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 21:38:22 -0000 Author: kib Date: Sat Apr 23 21:38:21 2011 New Revision: 220977 URL: http://svn.freebsd.org/changeset/base/220977 Log: Fix two bugs in r218670. Hold the vnode around the region where object lock is dropped, until vnode lock is acquired. Do not drop the vnode reference for a case when the object was deallocated during unlock. Note that in this case, VV_TEXT is cleared by vnode_pager_dealloc(). Reported and tested by: pho Reviewed by: alc MFC after: 3 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Apr 23 21:02:25 2011 (r220976) +++ head/sys/vm/vm_object.c Sat Apr 23 21:38:21 2011 (r220977) @@ -443,14 +443,21 @@ vm_object_vndeallocate(vm_object_t objec /* vrele may need the vnode lock. */ vrele(vp); } else { + vhold(vp); VM_OBJECT_UNLOCK(object); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vdrop(vp); VM_OBJECT_LOCK(object); object->ref_count--; - if (object->ref_count == 0) - vp->v_vflag &= ~VV_TEXT; - VM_OBJECT_UNLOCK(object); - vput(vp); + if (object->type == OBJT_DEAD) { + VM_OBJECT_UNLOCK(object); + VOP_UNLOCK(vp, 0); + } else { + if (object->ref_count == 0) + vp->v_vflag &= ~VV_TEXT; + VM_OBJECT_UNLOCK(object); + vput(vp); + } } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 22:28:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E980106566C; Sat, 23 Apr 2011 22:28:57 +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 443528FC13; Sat, 23 Apr 2011 22:28:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3NMSvKt006134; Sat, 23 Apr 2011 22:28:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3NMSvJb006127; Sat, 23 Apr 2011 22:28:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104232228.p3NMSvJb006127@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Apr 2011 22:28: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: r220978 - in head: bin/sh tools/regression/bin/sh/execution X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 23 Apr 2011 22:28:57 -0000 Author: jilles Date: Sat Apr 23 22:28:56 2011 New Revision: 220978 URL: http://svn.freebsd.org/changeset/base/220978 Log: sh: Allow EV_EXIT through function calls, make {...} next) mklocal(sp->text); exitstatus = oexitstatus; - if (flags & EV_TESTED) - evaltree(getfuncnode(cmdentry.u.func), EV_TESTED); - else - evaltree(getfuncnode(cmdentry.u.func), 0); + evaltree(getfuncnode(cmdentry.u.func), + flags & (EV_TESTED | EV_EXIT)); INTOFF; unreffunc(cmdentry.u.func); poplocalvars(); @@ -982,7 +981,10 @@ evalcommand(union node *cmd, int flags, savehandler = handler; if (setjmp(jmploc.loc)) { e = exception; - exitstatus = (e == EXINT)? SIGINT+128 : 2; + if (e == EXINT) + exitstatus = SIGINT+128; + else if (e != EXEXIT) + exitstatus = 2; goto cmddone; } handler = &jmploc; @@ -1018,8 +1020,7 @@ cmddone: backcmd->nleft = memout.nextc - memout.buf; memout.buf = NULL; } - if (cmdentry.u.index != EXECCMD && - (e == -1 || e == EXERROR || e == EXEXEC)) + if (cmdentry.u.index != EXECCMD) popredir(); if (e != -1) { if ((e != EXERROR && e != EXEXEC) Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sat Apr 23 21:38:21 2011 (r220977) +++ head/bin/sh/main.c Sat Apr 23 22:28:56 2011 (r220978) @@ -111,7 +111,8 @@ main(int argc, char *argv[]) break; } - if (state == 0 || iflag == 0 || ! rootshell) + if (state == 0 || iflag == 0 || ! rootshell || + exception == EXEXIT) exitshell(exitstatus); reset(); if (exception == EXINT) Added: head/tools/regression/bin/sh/execution/fork3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/fork3.0 Sat Apr 23 22:28:56 2011 (r220978) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +result=$(${SH} -c 'f() { ps -p $$ -o comm=; }; f') +test "$result" = "ps" Added: head/tools/regression/bin/sh/execution/redir6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/redir6.0 Sat Apr 23 22:28:56 2011 (r220978) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ "$2" != "$3" ]; then + echo "Failure at $1" >&2 + failures=$((failures + 1)) + fi +} + +check $LINENO "$(trap "echo bye" EXIT; : >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; { :; } >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; (:) >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; (: >/dev/null))" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; : >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; { :; } >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (:) >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (: >/dev/null)')" bye + +exit $((failures > 0)) Added: head/tools/regression/bin/sh/execution/redir7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/redir7.0 Sat Apr 23 22:28:56 2011 (r220978) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ "$2" != "$3" ]; then + echo "Failure at $1" >&2 + failures=$((failures + 1)) + fi +} + +check $LINENO "$(trap "echo bye" EXIT; f() { :; }; f >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f) >/dev/null)" bye +check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f >/dev/null))" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; f >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f) >/dev/null')" bye +check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f >/dev/null)')" bye + +exit $((failures > 0)) From owner-svn-src-all@FreeBSD.ORG Sat Apr 23 23:11:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCBA7106564A; Sat, 23 Apr 2011 23:11:44 +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 A42C18FC08; Sat, 23 Apr 2011 23:11:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3NNBipg007434; Sat, 23 Apr 2011 23:11:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3NNBixM007432; Sat, 23 Apr 2011 23:11:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104232311.p3NNBixM007432@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Apr 2011 23:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220979 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 23:11:44 -0000 Author: kib Date: Sat Apr 23 23:11:44 2011 New Revision: 220979 URL: http://svn.freebsd.org/changeset/base/220979 Log: Fix display of the drm sysctls. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/dev/drm/drm_sysctl.c Modified: head/sys/dev/drm/drm_sysctl.c ============================================================================== --- head/sys/dev/drm/drm_sysctl.c Sat Apr 23 22:28:56 2011 (r220978) +++ head/sys/dev/drm/drm_sysctl.c Sat Apr 23 23:11:44 2011 (r220979) @@ -95,7 +95,7 @@ int drm_sysctl_init(struct drm_device *d SYSCTL_CHILDREN(top), OID_AUTO, drm_sysctl_list[i].name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD, dev, 0, drm_sysctl_list[i].f,