From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 01:24:47 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7920106566C; Sun, 14 Nov 2010 01:24:47 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD578FC20; Sun, 14 Nov 2010 01:24:46 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 73DA07E8A3; Sun, 14 Nov 2010 12:24:44 +1100 (EST) Message-ID: <4CDF3A58.6080505@freebsd.org> Date: Sun, 14 Nov 2010 12:24:40 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> In-Reply-To: <8662w17e90.fsf@kopusha.home.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:24:47 -0000 On 11/13/10 20:40, Mikolaj Golub wrote: > > On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: > > LS> Author: lstewart > LS> Date: Fri Nov 12 06:41:55 2010 > LS> New Revision: 215166 > LS> URL: http://svn.freebsd.org/changeset/base/215166 > > LS> Log: > LS> This commit marks the first formal contribution of the "Five New TCP Congestion > LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details > LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ > > It looks like the code needs improvement to work with VIMAGE :-) > > options VIMAGE > > jail -i -c vnet persist path=/ > > panic: lock "cc_list" 0xc101c418 already initialized > > #0 doadump () at pcpu.h:231 > #1 0xc04f26b9 in db_fncall (dummy1=-1064234614, dummy2=0, dummy3=-1, > dummy4=0xca54b688 "\234¶TÊ") at /usr/src/sys/ddb/db_command.c:548 > #2 0xc04f2aef in db_command (last_cmdp=0xc0e7957c, cmd_table=0x0, dopager=0) > at /usr/src/sys/ddb/db_command.c:445 > #3 0xc04f2ba4 in db_command_script (command=0xc0e7a484 "call doadump") > at /usr/src/sys/ddb/db_command.c:516 > #4 0xc04f6df0 in db_script_exec (scriptname=0xca54b794 "kdb.enter.panic", warnifnotfound=Variable "warnifnotfound" is not available.) > at /usr/src/sys/ddb/db_script.c:302 > #5 0xc04f6ed7 in db_script_kdbenter (eventname=0xc0d2410e "panic") > at /usr/src/sys/ddb/db_script.c:324 > #6 0xc04f4b28 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:228 > #7 0xc0910fbe in kdb_trap (type=3, code=0, tf=0xca54b918) at /usr/src/sys/kern/subr_kdb.c:546 > #8 0xc0c3d7c6 in trap (frame=0xca54b918) at /usr/src/sys/i386/i386/trap.c:732 > #9 0xc0c2647c in calltrap () at /usr/src/sys/i386/i386/exception.s:168 > #10 0xc091118a in kdb_enter (why=0xc0d2410e "panic", msg=0xc0d2410e "panic") at cpufunc.h:71 > #11 0xc08dcd14 in panic (fmt=0xc0d27986 "lock \"%s\" %p already initialized") > at /usr/src/sys/kern/kern_shutdown.c:574 > #12 0xc0911bd4 in lock_init (lock=0xc147b204, class=0xc0e23a00, name=0xc0d3f215 "cc_list", > type=0x0, flags=2228224) at /usr/src/sys/kern/subr_lock.c:81 > #13 0xc08daf5d in rw_init_flags (rw=0xc101c418, name=0xc0d3f215 "cc_list", opts=0) > at /usr/src/sys/kern/kern_rwlock.c:195 > #14 0xc0a0d0c2 in cc_init () at /usr/src/sys/netinet/cc/cc.c:182 > #15 0xc0a7a4fd in tcp_init () at /usr/src/sys/netinet/tcp_subr.c:281 > #16 0xc0940e59 in protosw_init (pr=0x0) at /usr/src/sys/kern/uipc_domain.c:157 > #17 0xc0940e87 in domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:174 > #18 0xc0940ee1 in vnet_domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:190 > #19 0xc09adb2e in vnet_sysinit () at /usr/src/sys/net/vnet.c:625 > #20 0xc09ae1ef in vnet_alloc () at /usr/src/sys/net/vnet.c:254 > #21 0xc08ba41a in kern_jail_set (td=0xc306d870, optuio=0xc2d66a80, flags=0) > at /usr/src/sys/kern/kern_jail.c:1244 > #22 0xc08bbd00 in jail_set (td=0xc306d870, uap=0xca54bcec) at /usr/src/sys/kern/kern_jail.c:489 > #23 0xc091e903 in syscallenter (td=0xc306d870, sa=0xca54bce4) > at /usr/src/sys/kern/subr_trap.c:318 > #24 0xc0c3cebf in syscall (frame=0xca54bd28) at /usr/src/sys/i386/i386/trap.c:1095 > #25 0xc0c26511 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:266 > #26 0x00000033 in ?? () > Would you mind testing the following patch? It fixes the panic for me. http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch There are other VIMAGE related problems with r215166 as well. I'll try get to them as time permits. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 01:37:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430781065778; Sun, 14 Nov 2010 01:37:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 311508FC08; Sun, 14 Nov 2010 01:37: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 oAE1b9Pk066155; Sun, 14 Nov 2010 01:37:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1b9CW066153; Sun, 14 Nov 2010 01:37:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140137.oAE1b9CW066153@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01: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: r215274 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:37:09 -0000 Author: imp Date: Sun Nov 14 01:37:08 2010 New Revision: 215274 URL: http://svn.freebsd.org/changeset/base/215274 Log: This case is actually powerpc specific, and doesn't apply to powerpc64. Submitted by: nathanw@ Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Sun Nov 14 01:06:10 2010 (r215273) +++ head/share/mk/bsd.cpu.mk Sun Nov 14 01:37:08 2010 (r215274) @@ -114,7 +114,7 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ . else _CPUCFLAGS = -mcpu=${CPUTYPE} . endif -. elif ${MACHINE_CPUARCH} == "powerpc" +. elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 01:50:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49959106566B; Sun, 14 Nov 2010 01:50:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37D038FC12; Sun, 14 Nov 2010 01:50: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 oAE1ofUj066460; Sun, 14 Nov 2010 01:50:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1ofJi066458; Sun, 14 Nov 2010 01:50:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140150.oAE1ofJi066458@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01:50: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: r215275 - head/gnu/lib/libgcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:50:41 -0000 Author: imp Date: Sun Nov 14 01:50:40 2010 New Revision: 215275 URL: http://svn.freebsd.org/changeset/base/215275 Log: These two cases should be different... Submitted by: nathanw@ Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Sun Nov 14 01:37:08 2010 (r215274) +++ head/gnu/lib/libgcc/Makefile Sun Nov 14 01:50:40 2010 (r215275) @@ -140,13 +140,13 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c .endif -.if ${TARGET_CPUARCH} == "powerpc" +.if ${TARGET_ARCH} == "powerpc" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm LIB2FUNCS_STATIC_EXTRA = eabi.asm .endif -.if ${TARGET_CPUARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm .endif From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 01:52:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE9FE106566C; Sun, 14 Nov 2010 01:52:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0D148FC08; Sun, 14 Nov 2010 01:52: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 oAE1qJpa066527; Sun, 14 Nov 2010 01:52:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1qJQI066522; Sun, 14 Nov 2010 01:52:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140152.oAE1qJQI066522@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01:52: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: r215276 - in head/gnu/usr.bin: binutils cc gdb gdb/libgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:52:19 -0000 Author: imp Date: Sun Nov 14 01:52:19 2010 New Revision: 215276 URL: http://svn.freebsd.org/changeset/base/215276 Log: We need to add powerpc64->powerpc translations (I knew I hated copying this code in the first place). Also MACHINE_ARCH powerpc is 32-bit, not MACHINE_CPUARCH == powerpc. Submitted by: nathanw Modified: head/gnu/usr.bin/binutils/Makefile.inc0 head/gnu/usr.bin/cc/Makefile.tgt head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 01:52:19 2010 (r215276) @@ -7,7 +7,7 @@ VERSION= "2.15 [FreeBSD] 2004-05-23" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -27,7 +27,7 @@ RELSRC= ${RELTOP}/../../../contrib/binut SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ - ${TARGET_CPUARCH} == "powerpc" || \ + ${TARGET_ARCH} == "powerpc" || \ (${TARGET_CPUARCH} == "mips" && \ (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 Modified: head/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 01:52:19 2010 (r215276) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 01:52:19 2010 (r215276) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 01:52:19 2010 (r215276) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 05:01:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40943106564A; Sun, 14 Nov 2010 05:01:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2B18FC15; Sun, 14 Nov 2010 05:01: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 oAE51f47070814; Sun, 14 Nov 2010 05:01:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE51fNc070812; Sun, 14 Nov 2010 05:01:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140501.oAE51fNc070812@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 05:01: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: r215279 - 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: Sun, 14 Nov 2010 05:01:41 -0000 Author: imp Date: Sun Nov 14 05:01:40 2010 New Revision: 215279 URL: http://svn.freebsd.org/changeset/base/215279 Log: add / to the translation of TARGET_ARCH to TARGET Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 14 02:38:29 2010 (r215278) +++ head/Makefile.inc1 Sun Nov 14 05:01:40 2010 (r215279) @@ -121,7 +121,7 @@ VERSION+= ${OSRELDATE} TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm} +TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/} .endif # Legacy names, for a transition period mips:mips -> mipsel:mips .if defined(TARGET) && defined(TARGET_ARCH) && \ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 05:05:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55840106566B; Sun, 14 Nov 2010 05:05:42 +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 43D208FC18; Sun, 14 Nov 2010 05:05: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 oAE55gHx070919; Sun, 14 Nov 2010 05:05:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE55glh070917; Sun, 14 Nov 2010 05:05:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011140505.oAE55glh070917@svn.freebsd.org> From: Xin LI Date: Sun, 14 Nov 2010 05:05: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: r215280 - head/sys/dev/arcmsr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 05:05:42 -0000 Author: delphij Date: Sun Nov 14 05:05:41 2010 New Revision: 215280 URL: http://svn.freebsd.org/changeset/base/215280 Log: Workaround build for PAE case for now - revert the PHYS case to previous panic behavior. I have a real fix that changes the sg dma tag allocation to be limited to the under 4GB address space but would prefer to have review before committing. Modified: head/sys/dev/arcmsr/arcmsr.c Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Sun Nov 14 05:01:40 2010 (r215279) +++ head/sys/dev/arcmsr/arcmsr.c Sun Nov 14 05:05:41 2010 (r215280) @@ -2470,11 +2470,15 @@ static void arcmsr_action(struct cam_sim splx(s); } else { /* Buffer is physical */ +#ifdef PAE + panic("arcmsr: CAM_DATA_PHYS not supported"); +#else struct bus_dma_segment seg; seg.ds_addr = (bus_addr_t)pccb->csio.data_ptr; seg.ds_len = pccb->csio.dxfer_len; arcmsr_execute_srb(srb, &seg, 1, 0); +#endif } } else { /* Scatter/gather list */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 06:09:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 850031065674; Sun, 14 Nov 2010 06:09:50 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 723328FC0A; Sun, 14 Nov 2010 06:09: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 oAE69oaZ072196; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE69oqd072190; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140609.oAE69oqd072190@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 06:09: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: r215281 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 06:09:50 -0000 Author: brucec Date: Sun Nov 14 06:09:50 2010 New Revision: 215281 URL: http://svn.freebsd.org/changeset/base/215281 Log: Add some descriptions to sys/kern sysctls. PR: kern/148710 Tested by: Chip Camden MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/sysv_sem.c head/sys/kern/vfs_cache.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_proc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -144,7 +144,7 @@ struct mtx ppeers_lock; uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO, static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, - ×tepwarnings, 0, ""); + ×tepwarnings, 0, "Log time steps"); static void tc_windup(void); static void cpu_tick_calibrate(int); @@ -560,7 +560,7 @@ sysctl_kern_timecounter_hardware(SYSCTL_ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", ""); + 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); /* Report or change the active timecounter hardware. */ @@ -583,7 +583,7 @@ sysctl_kern_timecounter_choice(SYSCTL_HA } SYSCTL_PROC(_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_timecounter_choice, "A", ""); + 0, 0, sysctl_kern_timecounter_choice, "A", "Timecounter hardware detected"); /* * RFC 2783 PPS-API implementation. @@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/subr_clock.c Sun Nov 14 06:09:50 2010 (r215281) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #define ct_debug bootverbose -static int adjkerntz; /* local offset from GMT in seconds */ +static int adjkerntz; /* local offset from UTC in seconds */ static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ int tz_minuteswest; @@ -61,7 +61,7 @@ int tz_dsttime; * kern. */ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) @@ -74,7 +74,7 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/sysv_sem.c Sun Nov 14 06:09:50 2010 (r215281) @@ -212,7 +212,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, "Adjust on exit max value"); SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, - NULL, 0, sysctl_sema, "", ""); + NULL, 0, sysctl_sema, "", "Semaphore id pool"); static struct syscall_helper_data sem_syscalls[] = { SYSCALL_INIT_HELPER(__semctl), Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/vfs_cache.c Sun Nov 14 06:09:50 2010 (r215281) @@ -184,27 +184,27 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0, - sizeof(struct namecache), ""); + sizeof(struct namecache), "sizeof(struct namecache)"); /* * The new name cache statistics */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); -#define STATNODE(mode, name, var) \ - SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); -STATNODE(CTLFLAG_RD, numneg, &numneg); -STATNODE(CTLFLAG_RD, numcache, &numcache); -static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls); -static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits); -static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits); -static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks); -static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss); -static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap); -static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps); -static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits); -static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps); -static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits); -static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades); +#define STATNODE(mode, name, var, descr) \ + SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); +STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); +STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); +static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, "Number of cache lookups"); +static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, "Number of '.' hits"); +static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, "Number of '..' hits"); +static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, "Number of checks in lookup"); +static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, "Number of cache misses"); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); +static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); +static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, "Number of cache hits (negative) we do not want to cache"); +static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, "Number of cache hits (negative)"); +static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); @@ -970,20 +970,20 @@ kern___getcwd(struct thread *td, u_char */ #undef STATNODE -#define STATNODE(name) \ +#define STATNODE(name, descr) \ static u_int name; \ - SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, "") + SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr) static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, "Disable the vn_fullpath function"); /* These count for kern___getcwd(), too. */ -STATNODE(numfullpathcalls); -STATNODE(numfullpathfail1); -STATNODE(numfullpathfail2); -STATNODE(numfullpathfail4); -STATNODE(numfullpathfound); +STATNODE(numfullpathcalls, "Number of fullpath search calls"); +STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); +STATNODE(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); +STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); +STATNODE(numfullpathfound, "Number of successful fullpath calls"); /* * Retrieve the full filesystem path that correspond to a vnode from the name From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 07:38:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFDDF1065672; Sun, 14 Nov 2010 07:38:42 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF798FC0A; Sun, 14 Nov 2010 07:38: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 oAE7cgXO074212; Sun, 14 Nov 2010 07:38:42 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE7cgLK074210; Sun, 14 Nov 2010 07:38:42 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140738.oAE7cgLK074210@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 07:38: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: r215282 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 07:38:43 -0000 Author: brucec Date: Sun Nov 14 07:38:42 2010 New Revision: 215282 URL: http://svn.freebsd.org/changeset/base/215282 Log: Add descriptions to some more sysctls. PR: kern/148510 MFC after: 1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 06:09:50 2010 (r215281) +++ head/sys/kern/vfs_subr.c Sun Nov 14 07:38:42 2010 (r215282) @@ -121,7 +121,7 @@ static void destroy_vpollinfo(struct vpo */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -150,7 +150,7 @@ static u_long wantfreevnodes; SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); /* Number of vnodes in the free list. */ static u_long freevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -162,7 +162,7 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca * XXX these are probably of (very) limited utility now. */ static int reassignbufcalls; -SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -237,14 +237,14 @@ static struct cv sync_wakeup; static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ -SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ -SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ -SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ -SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -544,7 +544,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, - ×tamp_precision, 0, ""); + ×tamp_precision, 0, "File timestamp precision (0: seconds, 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. precision))"); /* * Get a current timestamp. @@ -2376,7 +2376,7 @@ vinactive(struct vnode *vp, struct threa */ #ifdef DIAGNOSTIC static int busyprt = 0; /* print out busy vnodes */ -SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, "Print out busy vnodes"); #endif int @@ -3712,17 +3712,17 @@ extattr_check_cred(struct vnode *vp, int (vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "Drop into debugger on lock violation"); int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, "Check for interlock across VOPs"); int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, "Print lock violations"); #ifdef KDB int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); #endif static void From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 08:06:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E98A106566B; Sun, 14 Nov 2010 08:06:29 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDF78FC18; Sun, 14 Nov 2010 08:06: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 oAE86TuS074764; Sun, 14 Nov 2010 08:06:29 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE86TgB074758; Sun, 14 Nov 2010 08:06:29 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140806.oAE86TgB074758@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:06: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: r215283 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:06:29 -0000 Author: brucec Date: Sun Nov 14 08:06:29 2010 New Revision: 215283 URL: http://svn.freebsd.org/changeset/base/215283 Log: Fix style(9) issues from r215281 and r215282. MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_subr.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/kern_proc.c Sun Nov 14 08:06:29 2010 (r215283) @@ -144,7 +144,8 @@ struct mtx ppeers_lock; uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, + "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/kern_tc.c Sun Nov 14 08:06:29 2010 (r215283) @@ -560,7 +560,8 @@ sysctl_kern_timecounter_hardware(SYSCTL_ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); + 0, 0, sysctl_kern_timecounter_hardware, "A", + "Timecounter hardware selected"); /* Report or change the active timecounter hardware. */ @@ -768,7 +769,8 @@ pps_event(struct pps_state *pps, int eve */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, + "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/subr_clock.c Sun Nov 14 08:06:29 2010 (r215283) @@ -74,7 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", + "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/vfs_cache.c Sun Nov 14 08:06:29 2010 (r215283) @@ -189,25 +189,38 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, name /* * The new name cache statistics */ -static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); +static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, + "Name cache statistics"); #define STATNODE(mode, name, var, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); -static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, "Number of cache lookups"); -static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, "Number of '.' hits"); -static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, "Number of '..' hits"); -static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, "Number of checks in lookup"); -static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, "Number of cache misses"); -static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); -static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); -static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); -static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, "Number of cache hits (negative) we do not want to cache"); -static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, "Number of cache hits (negative)"); -static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, "Number of updates of the cache after lookup (write lock + retry)"); +static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, + "Number of cache lookups"); +static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, + "Number of '.' hits"); +static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, + "Number of '..' hits"); +static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, + "Number of checks in lookup"); +static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, + "Number of cache misses"); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, + "Number of cache misses we do not want to cache"); +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, + "Number of cache hits (positive) we do not want to cache"); +static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, + "Number of cache hits (positive)"); +static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, + "Number of cache hits (negative) we do not want to cache"); +static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, + "Number of cache hits (negative)"); +static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, + "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, - &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); + &nchstats, sizeof(nchstats), "LU", + "VFS cache effectiveness statistics"); @@ -981,7 +994,8 @@ SYSCTL_INT(_debug, OID_AUTO, disablefull /* These count for kern___getcwd(), too. */ STATNODE(numfullpathcalls, "Number of fullpath search calls"); STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); -STATNODE(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); +STATNODE(numfullpathfail2, + "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE(numfullpathfound, "Number of successful fullpath calls"); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/vfs_subr.c Sun Nov 14 08:06:29 2010 (r215283) @@ -121,7 +121,8 @@ static void destroy_vpollinfo(struct vpo */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); +SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, + "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -150,7 +151,8 @@ static u_long wantfreevnodes; SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); /* Number of vnodes in the free list. */ static u_long freevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "Number of vnodes in the free list"); +SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, + "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -162,7 +164,8 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca * XXX these are probably of (very) limited utility now. */ static int reassignbufcalls; -SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "Number of calls to reassignbuf"); +SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, + "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -237,14 +240,18 @@ static struct cv sync_wakeup; static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ -SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "Time to delay syncing files (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, + "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ -SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "Time to delay syncing directories (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, + "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ -SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, "Time to delay syncing metadata (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, + "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ -SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, "Number of times I/O speeded up (rush requests)"); +SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, + "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -544,7 +551,9 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, - ×tamp_precision, 0, "File timestamp precision (0: seconds, 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. precision))"); + ×tamp_precision, 0, "File timestamp precision (0: seconds, " + "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " + "3+: sec + ns (max. precision))"); /* * Get a current timestamp. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 08:25:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133151065674; Sun, 14 Nov 2010 08:25:28 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01DFB8FC1A; Sun, 14 Nov 2010 08:25: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 oAE8PRW8075186; Sun, 14 Nov 2010 08:25:27 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE8PRV4075184; Sun, 14 Nov 2010 08:25:27 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140825.oAE8PRV4075184@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:25: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: r215284 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:25:28 -0000 Author: brucec Date: Sun Nov 14 08:25:27 2010 New Revision: 215284 URL: http://svn.freebsd.org/changeset/base/215284 Log: When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0. This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S PR: i386/91871 Submitted by: Bjorn Konig MFC after: 1 week Modified: head/sys/boot/i386/boot2/boot1.S Modified: head/sys/boot/i386/boot2/boot1.S ============================================================================== --- head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:06:29 2010 (r215283) +++ head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:25:27 2010 (r215284) @@ -239,7 +239,7 @@ error: callw putstr # Display message xorb %ah,%ah # BIOS: Get int $0x16 # keypress movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0x0 # reboot the machine /* * Display a null-terminated string using the BIOS output. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 08:31:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C5A71065697; Sun, 14 Nov 2010 08:31:02 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0E38FC19; Sun, 14 Nov 2010 08:31:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE8V2eE075321; Sun, 14 Nov 2010 08:31:02 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE8V2iI075319; Sun, 14 Nov 2010 08:31:02 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140831.oAE8V2iI075319@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215285 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:31:02 -0000 Author: brucec Date: Sun Nov 14 08:31:02 2010 New Revision: 215285 URL: http://svn.freebsd.org/changeset/base/215285 Log: Fix the jump location. Modified: head/sys/boot/i386/boot2/boot1.S Modified: head/sys/boot/i386/boot2/boot1.S ============================================================================== --- head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:25:27 2010 (r215284) +++ head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:31:02 2010 (r215285) @@ -239,7 +239,7 @@ error: callw putstr # Display message xorb %ah,%ah # BIOS: Get int $0x16 # keypress movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xf000,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine /* * Display a null-terminated string using the BIOS output. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 09:03:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07D09106564A; Sun, 14 Nov 2010 09:03:43 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA7948FC14; Sun, 14 Nov 2010 09:03: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 oAE93gqs076079; Sun, 14 Nov 2010 09:03:42 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE93gvh076077; Sun, 14 Nov 2010 09:03:42 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140903.oAE93gvh076077@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 09:03: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: r215286 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:03:43 -0000 Author: brucec Date: Sun Nov 14 09:03:42 2010 New Revision: 215286 URL: http://svn.freebsd.org/changeset/base/215286 Log: Connect to ftp2.tr.freebsd.org when the Turkey #2 mirror is selected. PR: bin/128587 Submitted by: Mehmet Kose MFC after: 1 week Modified: head/usr.sbin/sysinstall/menus.c Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Sun Nov 14 08:31:02 2010 (r215285) +++ head/usr.sbin/sysinstall/menus.c Sun Nov 14 09:03:42 2010 (r215286) @@ -819,7 +819,7 @@ DMenu MenuMediaFTP = { { "Turkey", "ftp.tr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" }, { " Turkey #2", "ftp2.tr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" }, + VAR_FTP_PATH "=ftp://ftp2.tr.freebsd.org" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" }, From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 09:14:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEC7D1065670; Sun, 14 Nov 2010 09:14:17 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4F48FC08; Sun, 14 Nov 2010 09:14: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 oAE9EHwl076312; Sun, 14 Nov 2010 09:14:17 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9EHie076310; Sun, 14 Nov 2010 09:14:17 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140914.oAE9EHie076310@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 09:14: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: r215287 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:14:17 -0000 Author: brucec Date: Sun Nov 14 09:14:17 2010 New Revision: 215287 URL: http://svn.freebsd.org/changeset/base/215287 Log: "Web" should not be all upper-case because it's not an acronym. PR: bin/130366 Submitted by: Royce Williams MFC after: 1 week Modified: head/usr.sbin/sysinstall/install.c Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Sun Nov 14 09:03:42 2010 (r215286) +++ head/usr.sbin/sysinstall/install.c Sun Nov 14 09:14:17 2010 (r215287) @@ -756,7 +756,7 @@ nodisks: dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of thousands of ready-to-run\n" - "applications, from text editors to games to WEB servers and more. Would you\n" + "applications, from text editors to games to Web servers and more. Would you\n" "like to browse the collection now?")) { (void)configPackages(self); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 09:33:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9FA0106566C; Sun, 14 Nov 2010 09:33:47 +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 9881B8FC08; Sun, 14 Nov 2010 09:33: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 oAE9Xl4M076729; Sun, 14 Nov 2010 09:33:47 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9Xlxl076727; Sun, 14 Nov 2010 09:33:47 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201011140933.oAE9Xlxl076727@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sun, 14 Nov 2010 09:33: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: r215288 - head/crypto/openssl/ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:33:47 -0000 Author: simon Date: Sun Nov 14 09:33:47 2010 New Revision: 215288 URL: http://svn.freebsd.org/changeset/base/215288 Log: Fix double-free in OpenSSL's SSL ECDH code. It has yet to be determined if this warrants a FreeBSD Security Advisory, but we might as well get it fixed in the normal branches. Obtained from: OpenSSL CVS Security: CVE-2010-2939 X-MFC after: Not long... Modified: head/crypto/openssl/ssl/s3_clnt.c Modified: head/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 09:14:17 2010 (r215287) +++ head/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 09:33:47 2010 (r215288) @@ -1377,6 +1377,7 @@ int ssl3_get_key_exchange(SSL *s) s->session->sess_cert->peer_ecdh_tmp=ecdh; ecdh=NULL; BN_CTX_free(bn_ctx); + bn_ctx = NULL; EC_POINT_free(srvr_ecpoint); srvr_ecpoint = NULL; } From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 09:59:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75F31065670; Sun, 14 Nov 2010 09:59:52 +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 C57BF8FC12; Sun, 14 Nov 2010 09:59:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE9xqa6077240; Sun, 14 Nov 2010 09:59:52 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9xquG077238; Sun, 14 Nov 2010 09:59:52 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011140959.oAE9xquG077238@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 14 Nov 2010 09:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215289 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:59:52 -0000 Author: bschmidt Date: Sun Nov 14 09:59:52 2010 New Revision: 215289 URL: http://svn.freebsd.org/changeset/base/215289 Log: The ni_rctls checks are used to verify that a ratectl algo has set up its internal data. This has been used to bypass missing calls in drivers which do not use the ratectl framework correctly. Issue is, not all algos use that variable, or even have internal data, therefore valid calls are not done. Fix this by removing the checks, all driver issues should be resolved. MFC after: 1 week Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Sun Nov 14 09:33:47 2010 (r215288) +++ head/sys/net80211/ieee80211_ratectl.h Sun Nov 14 09:59:52 2010 (r215289) @@ -81,8 +81,6 @@ ieee80211_ratectl_node_deinit(struct iee { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_node_deinit(ni); } @@ -91,8 +89,6 @@ ieee80211_ratectl_rate(struct ieee80211_ { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return 0; return vap->iv_rate->ir_rate(ni, arg, iarg); } @@ -100,8 +96,6 @@ static void __inline ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } @@ -111,8 +105,6 @@ ieee80211_ratectl_tx_update(const struct { if (vap->iv_rate->ir_tx_update == NULL) return; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 10:04:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 094E11065675; Sun, 14 Nov 2010 10:04:49 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9C628FC13; Sun, 14 Nov 2010 10:04: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 oAEA4mJF077441; Sun, 14 Nov 2010 10:04:48 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEA4mbC077436; Sun, 14 Nov 2010 10:04:48 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141004.oAEA4mbC077436@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 10:04: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: r215290 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 10:04:49 -0000 Author: brucec Date: Sun Nov 14 10:04:48 2010 New Revision: 215290 URL: http://svn.freebsd.org/changeset/base/215290 Log: ntpdate(8) hosts are now configured in rc.conf via ntpdate_hosts. PR: bin/148350 Submitted by: Joel FAEDI MFC after: 1 week Modified: head/usr.sbin/sysinstall/config.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/sysinstall.8 head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/config.c ============================================================================== --- head/usr.sbin/sysinstall/config.c Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/config.c Sun Nov 14 10:04:48 2010 (r215290) @@ -495,14 +495,14 @@ configNTP(dialogMenuItem *self) { int status; - status = variable_get_value(VAR_NTPDATE_FLAGS, + status = variable_get_value(VAR_NTPDATE_HOSTS, "Enter the name of an NTP server", 1) ? DITEM_SUCCESS : DITEM_FAILURE; if (status == DITEM_SUCCESS) { static char tmp[255]; - snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_flags=%s", - variable_get(VAR_NTPDATE_FLAGS)); + snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_hosts=%s", + variable_get(VAR_NTPDATE_HOSTS)); self->data = tmp; dmenuSetVariables(self); } Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/menus.c Sun Nov 14 10:04:48 2010 (r215290) @@ -1317,7 +1317,7 @@ DMenu MenuNetworking = { dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" }, { " NFS server", "This machine will be an NFS server", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" }, - { " Ntpdate", "Select a clock-synchronization server", + { " Ntpdate", "Select a clock synchronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (uintptr_t)"ntpdate_enable=YES" }, { " PCNFSD", "Run authentication server for clients with PC-NFS.", @@ -1376,456 +1376,456 @@ DMenu MenuNTP = { NULL, { { "None", "No NTP server", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=NO,ntpdate_flags=none" }, + "ntpdate_enable=NO,ntpdate_hosts=none" }, { "Other", "Select a site not on this list", dmenuVarsCheck, configNTP, NULL, NULL }, { "Worldwide", "pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=pool.ntp.org" }, { "Asia", "asia.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=asia.pool.ntp.org" }, { "Europe", "europe.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=europe.pool.ntp.org" }, { "Oceania", "oceania.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=oceania.pool.ntp.org" }, { "North America", "north-america.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=north-america.pool.ntp.org" }, { "Argentina", "tick.nap.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.nap.com.ar" }, { "Argentina #2", "time.sinectis.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=time.sinectis.com.ar" }, { "Argentina #3", "tock.nap.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.nap.com.ar" }, { "Australia", "au.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=au.pool.ntp.org" }, { "Australia #2", "augean.eleceng.adelaide.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=augean.eleceng.adelaide.edu.au" }, { "Australia #3", "ntp.adelaide.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.adelaide.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.adelaide.edu.au" }, { "Australia #4", "ntp.saard.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.saard.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.saard.net" }, { "Australia #5", "time.deakin.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.deakin.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=time.deakin.edu.au" }, { "Belgium", "ntp1.belbone.be", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.belbone.be" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.belbone.be" }, { "Belgium #2", "ntp2.belbone.be", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.belbone.be" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.belbone.be" }, { "Brazil", "a.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=a.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=a.ntp.br" }, { "Brazil #2", "b.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=b.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=b.ntp.br" }, { "Brazil #3", "c.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=c.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=c.ntp.br" }, { "Brazil #4", "ntp.cais.rnp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cais.rnp.br" }, { "Brazil #5", "ntp1.pucpr.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.pucpr.br" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.pucpr.br" }, { "Canada", "ca.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ca.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=ca.pool.ntp.org" }, { "Canada #2", "ntp.cpsc.ucalgary.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cpsc.ucalgary.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cpsc.ucalgary.ca" }, { "Canada #3", "ntp1.cmc.ec.gc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.cmc.ec.gc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.cmc.ec.gc.ca" }, { "Canada #4", "ntp2.cmc.ec.gc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.cmc.ec.gc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.cmc.ec.gc.ca" }, { "Canada #5", "tick.utoronto.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.utoronto.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.utoronto.ca" }, { "Canada #6", "time.chu.nrc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.chu.nrc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=time.chu.nrc.ca" }, { "Canada #7", "time.nrc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.nrc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=time.nrc.ca" }, { "Canada #8", "timelord.uregina.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timelord.uregina.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=timelord.uregina.ca" }, { "Canada #9", "tock.utoronto.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.utoronto.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.utoronto.ca" }, { "Czech", "ntp.karpo.cz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.karpo.cz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.karpo.cz" }, { "Czech #2", "ntp.cgi.cz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cgi.cz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cgi.cz" }, { "Denmark", "clock.netcetera.dk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.netcetera.dk" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.netcetera.dk" }, { "Denmark", "clock2.netcetera.dk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock2.netcetera.dk" }, + "ntpdate_enable=YES,ntpdate_hosts=clock2.netcetera.dk" }, { "Spain", "slug.ctv.es", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=slug.ctv.es" }, + "ntpdate_enable=YES,ntpdate_hosts=slug.ctv.es" }, { "Finland", "tick.keso.fi", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.keso.fi" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.keso.fi" }, { "Finland #2", "tock.keso.fi", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.keso.fi" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.keso.fi" }, { "France", "ntp.obspm.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.obspm.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.obspm.fr" }, { "France #2", "ntp.univ-lyon1.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.univ-lyon1.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.univ-lyon1.fr" }, { "France #3", "ntp.via.ecp.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.via.ecp.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.via.ecp.fr" }, { "Croatia", "zg1.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=zg1.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=zg1.ntp.carnet.hr" }, { "Croatia #2", "zg2.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=zg2.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=zg2.ntp.carnet.hr" }, { "Croatia #3", "st.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=st.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=st.ntp.carnet.hr" }, { "Croatia #4", "ri.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ri.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=ri.ntp.carnet.hr" }, { "Croatia #5", "os.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=os.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=os.ntp.carnet.hr" }, { "Hungary", "time.kfki.hu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.kfki.hu" }, + "ntpdate_enable=YES,ntpdate_hosts=time.kfki.hu" }, { "Indonesia", "ntp.kim.lipi.go.id", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.kim.lipi.go.id" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.kim.lipi.go.id" }, { "Ireland", "ntp.maths.tcd.ie", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.maths.tcd.ie" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.maths.tcd.ie" }, { "Italy", "it.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=it.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=it.pool.ntp.org" }, { "Japan", "ntp.jst.mfeed.ad.jp", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.jst.mfeed.ad.jp" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.jst.mfeed.ad.jp" }, { "Japan IPv6", "ntp1.v6.mfeed.ad.jp", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.v6.mfeed.ad.jp" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.v6.mfeed.ad.jp" }, { "Korea", "time.nuri.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.nuri.net" }, + "ntpdate_enable=YES,ntpdate_hosts=time.nuri.net" }, { "Mexico", "mx.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=mx.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=mx.pool.ntp.org" }, { "Netherlands", "ntp0.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.nl.net" }, { "Netherlands #2", "ntp1.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.nl.net" }, { "Netherlands #3", "ntp2.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.nl.net" }, { "Norway", "fartein.ifi.uio.no", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=fartein.ifi.uio.no" }, + "ntpdate_enable=YES,ntpdate_hosts=fartein.ifi.uio.no" }, { "Norway #2", "time.alcanet.no", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.alcanet.no" }, + "ntpdate_enable=YES,ntpdate_hosts=time.alcanet.no" }, { "New Zealand", "ntp.massey.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.massey.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.massey.ac.nz" }, { "New Zealand #2", "ntp.public.otago.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.public.otago.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.public.otago.ac.nz" }, { "New Zealand #3", "tk1.ihug.co.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tk1.ihug.co.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=tk1.ihug.co.nz" }, { "New Zealand #4", "ntp.waikato.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.waikato.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.waikato.ac.nz" }, { "Poland", "info.cyf-kr.edu.pl", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=info.cyf-kr.edu.pl" }, + "ntpdate_enable=YES,ntpdate_hosts=info.cyf-kr.edu.pl" }, { "Romania", "ticks.roedu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ticks.roedu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ticks.roedu.net" }, { "Russia", "ru.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ru.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=ru.pool.ntp.org" }, { "Russia #2", "ntp.psn.ru", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.psn.ru" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.psn.ru" }, { "Sweden", "se.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=se.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=se.pool.ntp.org" }, { "Sweden #2", "ntp.lth.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.lth.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.lth.se" }, { "Sweden #3", "ntp1.sp.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.sp.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.sp.se" }, { "Sweden #4", "ntp2.sp.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.sp.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.sp.se" }, { "Sweden #5", "ntp.kth.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.kth.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.kth.se" }, { "Singapore", "sg.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sg.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=sg.pool.ntp.org" }, { "Slovenia", "si.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=si.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=si.pool.ntp.org" }, { "Slovenia #2", "sizif.mf.uni-lj.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sizif.mf.uni-lj.si" }, + "ntpdate_enable=YES,ntpdate_hosts=sizif.mf.uni-lj.si" }, { "Slovenia #3", "ntp1.arnes.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.arnes.si" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.arnes.si" }, { "Slovenia #4", "ntp2.arnes.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.arnes.si" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.arnes.si" }, { "Slovenia #5", "time.ijs.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.ijs.si" }, + "ntpdate_enable=YES,ntpdate_hosts=time.ijs.si" }, { "Scotland", "ntp.cs.strath.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cs.strath.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cs.strath.ac.uk" }, { "Taiwan", "time.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=time.stdtime.gov.tw" }, { "Taiwan #2", "clock.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.stdtime.gov.tw" }, { "Taiwan #3", "tick.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.stdtime.gov.tw" }, { "Taiwan #4", "tock.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.stdtime.gov.tw" }, { "Taiwan #5", "watch.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=watch.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=watch.stdtime.gov.tw" }, { "United Kingdom", "uk.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=uk.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=uk.pool.ntp.org" }, { "United Kingdom #2", "ntp.exnet.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.exnet.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.exnet.com" }, { "United Kingdom #3", "ntp0.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.uk.uu.net" }, { "United Kingdom #4", "ntp1.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.uk.uu.net" }, { "United Kingdom #5", "ntp2.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.uk.uu.net" }, { "United Kingdom #6", "ntp2a.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2a.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2a.mcc.ac.uk" }, { "United Kingdom #7", "ntp2b.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2b.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2b.mcc.ac.uk" }, { "United Kingdom #8", "ntp2c.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2c.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2c.mcc.ac.uk" }, { "United Kingdom #9", "ntp2d.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2d.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2d.mcc.ac.uk" }, { "U.S.", "us.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=us.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=us.pool.ntp.org" }, { "U.S. AR", "sushi.lyon.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sushi.compsci.lyon.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=sushi.compsci.lyon.edu" }, { "U.S. AZ", "ntp.drydog.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.drydog.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.drydog.com" }, { "U.S. CA", "ntp.ucsd.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.ucsd.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.ucsd.edu" }, { "U.S. CA #2", "ntp1.mainecoon.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.mainecoon.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.mainecoon.com" }, { "U.S. CA #3", "ntp2.mainecoon.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.mainecoon.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.mainecoon.com" }, { "U.S. CA #4", "reloj.kjsl.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=reloj.kjsl.com" }, + "ntpdate_enable=YES,ntpdate_hosts=reloj.kjsl.com" }, { "U.S. CA #5", "time.five-ten-sg.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.five-ten-sg.com" }, + "ntpdate_enable=YES,ntpdate_hosts=time.five-ten-sg.com" }, { "U.S. DE", "louie.udel.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=louie.udel.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=louie.udel.edu" }, { "U.S. GA", "ntp.shorty.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.shorty.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.shorty.com" }, { "U.S. GA #2", "rolex.usg.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=rolex.usg.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=rolex.usg.edu" }, { "U.S. GA #3", "timex.usg.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timex.usg.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timex.usg.edu" }, { "U.S. IL", "ntp-0.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-0.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-0.cso.uiuc.edu" }, { "U.S. IL #2", "ntp-1.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.cso.uiuc.edu" }, { "U.S. IL #3", "ntp-1.mcs.anl.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.mcs.anl.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.mcs.anl.gov" }, { "U.S. IL #4", "ntp-2.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.cso.uiuc.edu" }, { "U.S. IL #5", "ntp-2.mcs.anl.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.mcs.anl.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.mcs.anl.gov" }, { "U.S. IN", "gilbreth.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=gilbreth.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=gilbreth.ecn.purdue.edu" }, { "U.S. IN #2", "harbor.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=harbor.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=harbor.ecn.purdue.edu" }, { "U.S. IN #3", "molecule.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=molecule.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=molecule.ecn.purdue.edu" }, { "U.S. KS", "ntp1.kansas.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.kansas.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.kansas.net" }, { "U.S. KS #2", "ntp2.kansas.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.kansas.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.kansas.net" }, { "U.S. MA", "ntp.ourconcord.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.ourconcord.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.ourconcord.net" }, { "U.S. MA #2", "timeserver.cs.umb.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timeserver.cs.umb.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timeserver.cs.umb.edu" }, { "U.S. MN", "ns.nts.umn.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ns.nts.umn.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ns.nts.umn.edu" }, { "U.S. MN #2", "nss.nts.umn.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=nss.nts.umn.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=nss.nts.umn.edu" }, { "U.S. MO", "time-ext.missouri.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time-ext.missouri.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=time-ext.missouri.edu" }, { "U.S. MT", "chronos1.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos1.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos1.umt.edu" }, { "U.S. MT #2", "chronos2.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos2.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos2.umt.edu" }, { "U.S. MT #3", "chronos3.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos3.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos3.umt.edu" }, { "U.S. NC", "clock1.unc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock1.unc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock1.unc.edu" }, { "U.S. NV", "cuckoo.nevada.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=cuckoo.nevada.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=cuckoo.nevada.edu" }, { "U.S. NV #2", "tick.cs.unlv.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.cs.unlv.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.cs.unlv.edu" }, { "U.S. NV #3", "tock.cs.unlv.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.cs.unlv.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.cs.unlv.edu" }, { "U.S. NY", "ntp0.cornell.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.cornell.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.cornell.edu" }, { "U.S. NY #2", "sundial.columbia.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sundial.columbia.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=sundial.columbia.edu" }, { "U.S. NY #3", "timex.cs.columbia.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timex.cs.columbia.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timex.cs.columbia.edu" }, { "U.S. PA", "clock-1.cs.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock-1.cs.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock-1.cs.cmu.edu" }, { "U.S. PA #2", "clock-2.cs.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock-2.cs.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock-2.cs.cmu.edu" }, { "U.S. PA #3", "clock.psu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.psu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.psu.edu" }, { "U.S. PA #4", "fuzz.psc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=fuzz.psc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=fuzz.psc.edu" }, { "U.S. PA #5", "ntp-1.ece.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.ece.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.ece.cmu.edu" }, { "U.S. PA #6", "ntp-2.ece.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.ece.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.ece.cmu.edu" }, { "U.S. TX", "ntp.fnbhs.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.fnbhs.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.fnbhs.com" }, { "U.S. TX #2", "ntp.tmc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.tmc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.tmc.edu" }, { "U.S. TX #3", "ntp5.tamu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp5.tamu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp5.tamu.edu" }, { "U.S. TX #4", "tick.greyware.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.greyware.com" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.greyware.com" }, { "U.S. TX #5", "tock.greyware.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.greyware.com" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.greyware.com" }, { "U.S. VA", "ntp-1.vt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.vt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.vt.edu" }, { "U.S. VA #2", "ntp-2.vt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.vt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.vt.edu" }, { "U.S. VA #3", "ntp.cmr.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cmr.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cmr.gov" }, { "U.S. VT", "ntp0.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.state.vt.us" }, { "U.S. VT #2", "ntp1.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.state.vt.us" }, { "U.S. VT #3", "ntp2.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.state.vt.us" }, { "U.S. WA", "ntp.tcp-udp.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.tcp-udp.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.tcp-udp.net" }, { "U.S. WI", "ntp1.cs.wisc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.cs.wisc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.cs.wisc.edu" }, { "U.S. WI #2", "ntp3.cs.wisc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp3.cs.wisc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp3.cs.wisc.edu" }, { "South Africa", "ntp.cs.unp.ac.za", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cs.unp.ac.za" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cs.unp.ac.za" }, { NULL } }, }; Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:04:48 2010 (r215290) @@ -217,10 +217,10 @@ Configure host as a user of the Network .Pp .Sy Variables : .Bl -tag -width indent -.It ntpdate_flags -The flags to -.Xr ntpdate 8 , -that is to say the name of the server to sync from. +.It ntpdate_hosts +Whitespace-separated list of +.Xr ntpdate 8 +servers to sync from. .El .It configPCNFSD Configure host to support PC NFS. Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 10:04:48 2010 (r215290) @@ -166,7 +166,7 @@ #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" #define VAR_RPCBIND_ENABLE "rpcbind_enable" -#define VAR_NTPDATE_FLAGS "ntpdate_flags" +#define VAR_NTPDATE_HOSTS "ntpdate_hosts" #define VAR_PACKAGE "package" #define VAR_PARTITION "partition" #define VAR_PCNFSD "pcnfsd" From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 10:22:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AAB31065672; Sun, 14 Nov 2010 10:22:10 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E21788FC19; Sun, 14 Nov 2010 10:22: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 oAEAM9uo077833; Sun, 14 Nov 2010 10:22:09 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEAM9Qm077829; Sun, 14 Nov 2010 10:22:09 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141022.oAEAM9Qm077829@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 10:22: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: r215291 - in head/usr.sbin/sysinstall: . help X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 10:22:10 -0000 Author: brucec Date: Sun Nov 14 10:22:09 2010 New Revision: 215291 URL: http://svn.freebsd.org/changeset/base/215291 Log: Remove support for cpioVerbose=medium because bsdcpio doesn't support the "-V" flag. PR: bin/151821 Submitted by: Devin Teske MFC after: 1 week Modified: head/usr.sbin/sysinstall/help/shortcuts.hlp head/usr.sbin/sysinstall/media.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sysinstall/help/shortcuts.hlp ============================================================================== --- head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:22:09 2010 (r215291) @@ -13,7 +13,7 @@ blanktime Screen blank tim bootManager Select boot manager: booteasy, standard or none browserBinary Which doc browser to use (default: links) browserPackage Which package to get browser from (default: links) -cpioVerbose How verbose to be with cpio: high, medium or low +cpioVerbose How verbose to be with cpio: high or low debug Extra debugging? defaultrouter IP address of default route disk Which disk to operate on (ad0, da0, etc). Modified: head/usr.sbin/sysinstall/media.c ============================================================================== --- head/usr.sbin/sysinstall/media.c Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/media.c Sun Nov 14 10:22:09 2010 (r215291) @@ -117,8 +117,6 @@ cpioVerbosity() if (cp && !strcmp(cp, "high")) return "-v"; - else if (cp && !strcmp(cp, "medium")) - return "-V"; return ""; } @@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se } else { if (!strcmp(cp, "low")) - variable_set2(VAR_CPIO_VERBOSITY, "medium", 0); - else if (!strcmp(cp, "medium")) variable_set2(VAR_CPIO_VERBOSITY, "high", 0); else /* must be "high" - wrap around */ variable_set2(VAR_CPIO_VERBOSITY, "low", 0); Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:22:09 2010 (r215291) @@ -744,8 +744,7 @@ Default: user@host .Sy Variables : .Bl -tag -width indent .It cpioVerbose -Can be used to set the verbosity of cpio extractions to low, medium or -high. +Can be used to set the verbosity of cpio extractions to low or high. .El .It mediaGetType Interactively get the user to specify some type of media. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 10:43:03 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703CB1065670; Sun, 14 Nov 2010 10:43:03 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 03B5A8FC0C; Sun, 14 Nov 2010 10:43:02 +0000 (UTC) Received: from localhost (acme.spoerlein.net [188.72.220.29]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oAEAh1LM006794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Nov 2010 11:43:02 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1289731382; bh=Z1hAN1bG4BoT0Is/SVWmy51pRIixbI6q1qcyJSa1YYA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=i004+pRHcPq0i3nFXau+3TiQuxAN/D6hCN9zq+RxINXhraNtPjhm/jr0BgPrK+n9p dOVoXoBqSWf0G9wbYEyeTmu6N37JplHNI7njDd5WynE+KnlKna0VAyw5zYpaU/fgLp HrJkvlhX63lHvsnp7gdc+7zT4ZxJQkTr/jWQyyiE= Date: Sun, 14 Nov 2010 11:43:01 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Warner Losh Message-ID: <20101114104301.GB64243@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Warner Losh , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201011132238.oADMcXU1062375@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011132238.oADMcXU1062375@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: r215271 - 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: Sun, 14 Nov 2010 10:43:03 -0000 On Sat, 13.11.2010 at 22:38:33 +0000, Warner Losh wrote: > Author: imp > Date: Sat Nov 13 22:38:33 2010 > New Revision: 215271 > URL: http://svn.freebsd.org/changeset/base/215271 > > Log: > Add mips back to universe > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sat Nov 13 22:34:12 2010 (r215270) > +++ head/Makefile Sat Nov 13 22:38:33 2010 (r215271) > @@ -281,7 +281,7 @@ tinderbox: > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) > -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v > +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips Can we have that sorted, please? I'm sure it was sorted before ... -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips +TARGETS?=amd64 i386 ia64 mips pc98 powerpc sparc64 sun4v Uli From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 11:09:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9D471065674; Sun, 14 Nov 2010 11:09:16 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77C08FC15; Sun, 14 Nov 2010 11:09: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 oAEB9Gpt080098; Sun, 14 Nov 2010 11:09:16 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEB9GZR080095; Sun, 14 Nov 2010 11:09:16 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201011141109.oAEB9GZR080095@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 14 Nov 2010 11:09: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: r215292 - in head/gnu/usr.bin/gdb: . libgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 11:09:16 -0000 Author: nyan Date: Sun Nov 14 11:09:16 2010 New Revision: 215292 URL: http://svn.freebsd.org/changeset/base/215292 Log: Add missing '/'. Modified: head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 10:22:09 2010 (r215291) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 11:09:16 2010 (r215292) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 10:22:09 2010 (r215291) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 11:09:16 2010 (r215292) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 11:32:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A4AB1065694; Sun, 14 Nov 2010 11:32:57 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 185ED8FC12; Sun, 14 Nov 2010 11:32: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 oAEBWuCk080573; Sun, 14 Nov 2010 11:32:56 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEBWumi080571; Sun, 14 Nov 2010 11:32:56 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201011141132.oAEBWumi080571@svn.freebsd.org> From: Joel Dahl Date: Sun, 14 Nov 2010 11:32: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: r215293 - 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: Sun, 14 Nov 2010 11:32:57 -0000 Author: joel (doc committer) Date: Sun Nov 14 11:32:56 2010 New Revision: 215293 URL: http://svn.freebsd.org/changeset/base/215293 Log: Add the cddl/ directory. Modified: head/README Modified: head/README ============================================================================== --- head/README Sun Nov 14 11:09:16 2010 (r215292) +++ head/README Sun Nov 14 11:32:56 2010 (r215293) @@ -43,6 +43,9 @@ Source Roadmap: --------------- bin System/user commands. +cddl Various commands and libraries under the Common Development + and Distribution License. + contrib Packages contributed by 3rd parties. crypto Cryptography stuff (see crypto/README). From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 13:06:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45B3B1065672; Sun, 14 Nov 2010 13:06:35 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4A58FC17; Sun, 14 Nov 2010 13:06: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 oAED6ZT8082629; Sun, 14 Nov 2010 13:06:35 GMT (envelope-from nork@svn.freebsd.org) Received: (from nork@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAED6Z1F082628; Sun, 14 Nov 2010 13:06:35 GMT (envelope-from nork@svn.freebsd.org) Message-Id: <201011141306.oAED6Z1F082628@svn.freebsd.org> From: Norikatsu Shigemura Date: Sun, 14 Nov 2010 13:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215294 - in stable/8: . contrib/top etc/periodic/daily gnu/usr.bin lib/libusb release/picobsd/floppy.tree/sbin sbin/geom/class/sched tools/regression/lib/msun tools/regression/usr.bin/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:06:35 -0000 Author: nork Date: Sun Nov 14 13:06:34 2010 New Revision: 215294 URL: http://svn.freebsd.org/changeset/base/215294 Log: Remove extra svn:mergeinfo. Pointy hat to: myself Pointed out by: hrs, ume, nyan, avg, jhb Suggested by: jhb Reviewd by: nyan, jhb Approved by: imp (mentor) Modified: Directory Properties: stable/8/ (props changed) stable/8/Makefile (props changed) stable/8/Makefile.inc1 (props changed) stable/8/ObsoleteFiles.inc (props changed) stable/8/UPDATING (props changed) stable/8/bin/ (props changed) stable/8/bin/chio/ (props changed) stable/8/bin/chmod/ (props changed) stable/8/bin/cp/ (props changed) stable/8/bin/csh/ (props changed) stable/8/bin/date/ (props changed) stable/8/bin/expr/ (props changed) stable/8/bin/getfacl/ (props changed) stable/8/bin/kill/ (props changed) stable/8/bin/ln/ (props changed) stable/8/bin/ls/ (props changed) stable/8/bin/mv/ (props changed) stable/8/bin/pax/ (props changed) stable/8/bin/pkill/ (props changed) stable/8/bin/ps/ (props changed) stable/8/bin/pwait/ (props changed) stable/8/bin/setfacl/ (props changed) stable/8/bin/sh/ (props changed) stable/8/bin/sleep/ (props changed) stable/8/bin/test/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/lib/ (props changed) stable/8/cddl/lib/libnvpair/ (props changed) stable/8/cddl/lib/libzpool/ (props changed) stable/8/cddl/usr.bin/ (props changed) stable/8/cddl/usr.sbin/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/bind9/ (props changed) stable/8/contrib/binutils/ (props changed) stable/8/contrib/bsnmp/ (props changed) stable/8/contrib/bzip2/ (props changed) stable/8/contrib/com_err/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/contrib/ee/ (props changed) stable/8/contrib/expat/ (props changed) stable/8/contrib/file/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gdb/ (props changed) stable/8/contrib/gdtoa/ (props changed) stable/8/contrib/groff/ (props changed) stable/8/contrib/ipfilter/ (props changed) stable/8/contrib/less/ (props changed) stable/8/contrib/libpcap/ (props changed) stable/8/contrib/ncurses/ (props changed) stable/8/contrib/netcat/ (props changed) stable/8/contrib/ntp/ (props changed) stable/8/contrib/nvi/ (props changed) stable/8/contrib/one-true-awk/ (props changed) stable/8/contrib/openbsm/ (props changed) stable/8/contrib/openpam/ (props changed) stable/8/contrib/pf/ (props changed) stable/8/contrib/sendmail/ (props changed) stable/8/contrib/tcp_wrappers/ (props changed) stable/8/contrib/tcpdump/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/telnet/ (props changed) stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) stable/8/contrib/traceroute/ (props changed) stable/8/contrib/wpa/ (props changed) stable/8/contrib/xz/ (props changed) stable/8/crypto/heimdal/ (props changed) stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssl/ (props changed) stable/8/etc/ (props changed) stable/8/etc/periodic/daily/ (props changed) stable/8/etc/periodic/daily/800.scrub-zfs (props changed) stable/8/etc/periodic/security/ (props changed) stable/8/games/factor/ (props changed) stable/8/games/fortune/ (props changed) stable/8/games/grdc/ (props changed) stable/8/games/pom/ (props changed) stable/8/gnu/lib/csu/ (props changed) stable/8/gnu/lib/libstdc++/ (props changed) stable/8/gnu/usr.bin/ (props changed) stable/8/gnu/usr.bin/Makefile (props changed) stable/8/gnu/usr.bin/dialog/ (props changed) stable/8/gnu/usr.bin/gdb/ (props changed) stable/8/gnu/usr.bin/gdb/kgdb/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) stable/8/gnu/usr.bin/patch/ (props changed) stable/8/include/ (props changed) stable/8/kerberos5/lib/libgssapi_krb5/ (props changed) stable/8/kerberos5/lib/libgssapi_spnego/ (props changed) stable/8/kerberos5/usr.bin/kdestroy/ (props changed) stable/8/kerberos5/usr.bin/kpasswd/ (props changed) stable/8/lib/ (props changed) stable/8/lib/bind/ (props changed) stable/8/lib/csu/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libbluetooth/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libc_r/ (props changed) stable/8/lib/libcam/ (props changed) stable/8/lib/libcompat/ (props changed) stable/8/lib/libdevinfo/ (props changed) stable/8/lib/libdisk/ (props changed) stable/8/lib/libedit/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libexpat/ (props changed) stable/8/lib/libfetch/ (props changed) stable/8/lib/libgeom/ (props changed) stable/8/lib/libgpib/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libjail/ (props changed) stable/8/lib/libkse/ (props changed) stable/8/lib/libkvm/ (props changed) stable/8/lib/liblzma/ (props changed) stable/8/lib/libmagic/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpam/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libproc/ (props changed) stable/8/lib/libradius/ (props changed) stable/8/lib/librpcsec_gss/ (props changed) stable/8/lib/librtld_db/ (props changed) stable/8/lib/libsm/ (props changed) stable/8/lib/libstand/ (props changed) stable/8/lib/libtacplus/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libthread_db/ (props changed) stable/8/lib/libufs/ (props changed) stable/8/lib/libugidfw/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) stable/8/lib/libusbhid/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/lib/libz/ (props changed) stable/8/lib/libz/contrib/ (props changed) stable/8/lib/msun/ (props changed) stable/8/libexec/ (props changed) stable/8/libexec/ftpd/ (props changed) stable/8/libexec/rtld-elf/ (props changed) stable/8/libexec/tftpd/ (props changed) stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/powerpc/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/atacontrol/ (props changed) stable/8/sbin/bsdlabel/ (props changed) stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/ddb/ (props changed) stable/8/sbin/devd/ (props changed) stable/8/sbin/devfs/ (props changed) stable/8/sbin/dhclient/ (props changed) stable/8/sbin/dump/ (props changed) stable/8/sbin/dumpfs/ (props changed) stable/8/sbin/fsck/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/fsck_msdosfs/ (props changed) stable/8/sbin/fsirand/ (props changed) stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/sched/gsched.8 (props changed) stable/8/sbin/geom/class/stripe/ (props changed) stable/8/sbin/ggate/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/kldload/ (props changed) stable/8/sbin/kldstat/ (props changed) stable/8/sbin/mdconfig/ (props changed) stable/8/sbin/mksnap_ffs/ (props changed) stable/8/sbin/mount/ (props changed) stable/8/sbin/mount_cd9660/ (props changed) stable/8/sbin/mount_msdosfs/ (props changed) stable/8/sbin/mount_nfs/ (props changed) stable/8/sbin/natd/ (props changed) stable/8/sbin/newfs/ (props changed) stable/8/sbin/newfs_msdos/ (props changed) stable/8/sbin/ping6/ (props changed) stable/8/sbin/reboot/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sbin/routed/ (props changed) stable/8/sbin/setkey/ (props changed) stable/8/sbin/spppcontrol/ (props changed) stable/8/sbin/sysctl/ (props changed) stable/8/sbin/tunefs/ (props changed) stable/8/sbin/umount/ (props changed) stable/8/secure/ (props changed) stable/8/secure/lib/libcrypto/ (props changed) stable/8/secure/lib/libssl/ (props changed) stable/8/secure/usr.bin/bdes/ (props changed) stable/8/secure/usr.bin/openssl/ (props changed) stable/8/share/dict/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/share/mk/ (props changed) stable/8/share/termcap/ (props changed) stable/8/share/timedef/ (props changed) stable/8/share/zoneinfo/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/debugscripts/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/tr/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/apply/ (props changed) stable/8/usr.bin/ar/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/biff/ (props changed) stable/8/usr.bin/c89/ (props changed) stable/8/usr.bin/c99/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/column/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/du/ (props changed) stable/8/usr.bin/ee/ (props changed) stable/8/usr.bin/enigma/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fold/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/getopt/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/jot/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/killall/ (props changed) stable/8/usr.bin/ktrace/ (props changed) stable/8/usr.bin/lex/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/lockf/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/mail/ (props changed) stable/8/usr.bin/make/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/minigzip/ (props changed) stable/8/usr.bin/ncal/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/pathchk/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/rpcgen/ (props changed) stable/8/usr.bin/ruptime/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/sed/ (props changed) stable/8/usr.bin/sockstat/ (props changed) stable/8/usr.bin/split/ (props changed) stable/8/usr.bin/stat/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tar/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/tr/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/uname/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/unzip/ (props changed) stable/8/usr.bin/uudecode/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xinstall/ (props changed) stable/8/usr.bin/xlint/ (props changed) stable/8/usr.bin/yacc/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/asf/ (props changed) stable/8/usr.sbin/bluetooth/ (props changed) stable/8/usr.sbin/bluetooth/bthidcontrol/ (props changed) stable/8/usr.sbin/bluetooth/bthidd/ (props changed) stable/8/usr.sbin/boot0cfg/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/config/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/ctm/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/devinfo/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/fdcontrol/ (props changed) stable/8/usr.sbin/fdformat/ (props changed) stable/8/usr.sbin/fdread/ (props changed) stable/8/usr.sbin/fdwrite/ (props changed) stable/8/usr.sbin/fifolog/ (props changed) stable/8/usr.sbin/flowctl/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/i2c/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/mailwrapper/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/ (props changed) stable/8/usr.sbin/mountd/ (props changed) stable/8/usr.sbin/moused/ (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/mtest/ (props changed) stable/8/usr.sbin/mtree/ (props changed) stable/8/usr.sbin/named/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/nfsdumpstate/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/8/usr.sbin/periodic/ (props changed) stable/8/usr.sbin/pmcannotate/ (props changed) stable/8/usr.sbin/pmccontrol/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pppctl/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.lockd/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtadvd/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/sade/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/services_mkdb/ (props changed) stable/8/usr.sbin/setfmac/ (props changed) stable/8/usr.sbin/setpmac/ (props changed) stable/8/usr.sbin/smbmsg/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/uathload/ (props changed) stable/8/usr.sbin/ugidfw/ (props changed) stable/8/usr.sbin/uhsoctl/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/watchdogd/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 13:09:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3494610656AB; Sun, 14 Nov 2010 13:09:33 +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 21EDC8FC17; Sun, 14 Nov 2010 13:09: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 oAED9Xet082721; Sun, 14 Nov 2010 13:09:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAED9Xcv082719; Sun, 14 Nov 2010 13:09:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141309.oAED9Xcv082719@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:09: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: r215295 - head/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:09:33 -0000 Author: marius Date: Sun Nov 14 13:09:32 2010 New Revision: 215295 URL: http://svn.freebsd.org/changeset/base/215295 Log: Let cryptosoft(4) add its pseudo-device with a specific unit number and its probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real devices hanging off of nexus(4) with no specific devclass set. Actually, the more desirable fix for this would be to get rid of the newbus interface of cryptosoft(4) altogether but apparently crypto(9) was written with support for cryptographic hardware in mind so that approach would require some KPI breaking changes which don't seem worth it. MFC after: 1 week Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Sun Nov 14 13:06:34 2010 (r215294) +++ head/sys/opencrypto/cryptosoft.c Sun Nov 14 13:09:32 2010 (r215295) @@ -1060,7 +1060,7 @@ swcr_identify(driver_t *drv, device_t pa { /* NB: order 10 is so we get attached after h/w devices */ if (device_find_child(parent, "cryptosoft", -1) == NULL && - BUS_ADD_CHILD(parent, 10, "cryptosoft", -1) == 0) + BUS_ADD_CHILD(parent, 10, "cryptosoft", 0) == 0) panic("cryptosoft: could not attach"); } @@ -1068,7 +1068,7 @@ static int swcr_probe(device_t dev) { device_set_desc(dev, "software crypto"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 13:25:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBFA61065673; Sun, 14 Nov 2010 13:25:01 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56A58FC0C; Sun, 14 Nov 2010 13:25: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 oAEDP1ka083066; Sun, 14 Nov 2010 13:25:01 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDP1WC083064; Sun, 14 Nov 2010 13:25:01 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141325.oAEDP1WC083064@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 13:25: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: r215296 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:25:02 -0000 Author: brucec Date: Sun Nov 14 13:25:01 2010 New Revision: 215296 URL: http://svn.freebsd.org/changeset/base/215296 Log: Fix use of CD_VERSION=any in cdrom.inf by calling strcmp instead of variable_cmp. PR: bin/142960 Submitted by: G. Paul Ziemba MFC after: 1 week Modified: head/usr.sbin/sysinstall/cdrom.c Modified: head/usr.sbin/sysinstall/cdrom.c ============================================================================== --- head/usr.sbin/sysinstall/cdrom.c Sun Nov 14 13:09:32 2010 (r215295) +++ head/usr.sbin/sysinstall/cdrom.c Sun Nov 14 13:25:01 2010 (r215296) @@ -145,7 +145,7 @@ mediaInitCDROM(Device *dev) else { if (variable_cmp(VAR_RELNAME, cp) && variable_cmp(VAR_RELNAME, "any") && - variable_cmp(cp, "any") && + strcmp(cp, "any") && !bogusCDOK) { msgConfirm("Warning: The version of the FreeBSD disc currently in the drive\n" "(%s) does not match the version of the boot floppy\n" From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 13:26:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0772106564A; Sun, 14 Nov 2010 13:26:10 +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 8B5E18FC08; Sun, 14 Nov 2010 13: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 oAEDQAwJ083137; Sun, 14 Nov 2010 13:26:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDQARr083126; Sun, 14 Nov 2010 13:26:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141326.oAEDQARr083126@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:26: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: r215297 - in head: . sys/dev/bce sys/dev/bge sys/dev/mii sys/dev/msk sys/dev/nfe sys/dev/stge sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:26:10 -0000 Author: marius Date: Sun Nov 14 13:26:10 2010 New Revision: 215297 URL: http://svn.freebsd.org/changeset/base/215297 Log: o Flesh out the generic IEEE 802.3 annex 31B full duplex flow control support in mii(4): - Merge generic flow control advertisement (which can be enabled by passing by MIIF_DOPAUSE to mii_attach(9)) and parsing support from NetBSD into mii_physubr.c and ukphy_subr.c. Unlike as in NetBSD, IFM_FLOW isn't implemented as a global option via the "don't care mask" but instead as a media specific option this. This has the following advantages: o allows flow control advertisement with autonegotiation to be turned on and off via ifconfig(8) with the default typically being off (though MIIF_FORCEPAUSE has been added causing flow control to be always advertised, allowing to easily MFC this changes for drivers that previously used home-grown support for flow control that behaved that way without breaking POLA) o allows to deal with PHY drivers where flow control advertisement with manual selection doesn't work or at least isn't implemented, like it's the case with brgphy(4), e1000phy(4) and ip1000phy(4), by setting MIIF_NOMANPAUSE o the available combinations of media options are readily available from the `ifconfig -m` output - Add IFM_FLOW to IFM_SHARED_OPTION_DESCRIPTIONS and IFM_ETH_RXPAUSE and IFM_ETH_TXPAUSE to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so these are understood by ifconfig(8). o Make the master/slave support in mii(4) actually usable: - Change IFM_ETH_MASTER from being implemented as a global option via the "don't care mask" to a media specific one as it actually is only applicable to IFM_1000_T to date. - Let mii_phy_setmedia() set GTCR_MAN_MS in IFM_1000_T slave mode to actually configure manually selected slave mode (like we also do in the PHY specific implementations). - Add IFM_ETH_MASTER to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so it is understood by ifconfig(8). o Switch bge(4), bce(4), msk(4), nfe(4) and stge(4) along with brgphy(4), e1000phy(4) and ip1000phy(4) to use the generic flow control support instead of home-grown solutions via IFM_FLAGs. This includes changing these PHY drivers and smcphy(4) to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set) and implemented for these media variants, i.e. typically only for copper. o Switch brgphy(4), ciphy(4), e1000phy(4) and ip1000phy(4) to report and set IFM_1000_T master mode via IFM_ETH_MASTER instead of via IFF_LINK0 and some IFM_FLAGn. o Switch brgphy(4) to add at least the the supported copper media based on the contents of the BMSR via mii_phy_add_media() instead of hardcoding them. The latter approach seems to have developed historically, besides causing unnecessary code duplication it was also undesirable because brgphy_mii_phy_auto() already based the capability advertisement on the contents of the BMSR though. o Let brgphy(4) set IFM_1000_T master mode on all supported PHY and not just BCM5701. Apparently this was a misinterpretation of a workaround in the Linux tg3 driver; BCM5701 seem to require RGPHY_1000CTL_MSE and BRGPHY_1000CTL_MSC to be set when configuring autonegotiation but this doesn't mean we can't set these as well on other PHYs for manual media selection. o Let ukphy_status() report IFM_1000_T master mode via IFM_ETH_MASTER so IFM_1000_T master mode support now is generally available with all PHY drivers. o Don't let e1000phy(4) set master/slave bits for IFM_1000_SX as it's not applicable there. Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks Modified: head/UPDATING head/sys/dev/bce/if_bce.c head/sys/dev/bge/if_bge.c head/sys/dev/mii/brgphy.c head/sys/dev/mii/ciphy.c head/sys/dev/mii/e1000phy.c head/sys/dev/mii/ip1000phy.c head/sys/dev/mii/mii.h head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h head/sys/dev/mii/smcphy.c head/sys/dev/mii/ukphy_subr.c head/sys/dev/msk/if_msk.c head/sys/dev/nfe/if_nfe.c head/sys/dev/stge/if_stge.c head/sys/net/if_media.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Nov 14 13:25:01 2010 (r215296) +++ head/UPDATING Sun Nov 14 13:26:10 2010 (r215297) @@ -22,6 +22,32 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20101114: + Generic IEEE 802.3 annex 31B full duplex flow control support has been + added to mii(4) and bge(4), bce(4), msk(4), nfe(4) and stge(4) along + with brgphy(4), e1000phy(4) as well as ip1000phy() have been converted + to take advantage of it instead of using custom implementations. This + means that these drivers now no longer unconditionally advertise + support for flow control but only do so if flow control is a selected + media option. This was implemented in the generic support that way in + order to allow flow control to be switched on and off via ifconfig(8) + with the PHY specific default to typically off in order to protect + from unwanted effects. Consequently, if you used flow control with + one of the above mentioned drivers you now need to explicitly enable + it, for example via: + ifconfig bge0 media auto mediaopt flowcontrol + + Along with the above mentioned changes generic support for setting + 1000baseT master mode also has been added and brgphy(4), ciphy(4), + e1000phy(4) as well as ip1000phy(4) have been converted to take + advantage of it. This means that these drivers now no longer take the + link0 parameter for selecting master mode but the master media option + has to be used instead, for example like in the following: + ifconfig bge0 media 1000baseT mediaopt full-duplex,master + + Selection of master mode now is also available with all other PHY + drivers supporting 1000baseT. + 20101111: The TCP stack has received a significant update to add support for modularised congestion control and generally improve the clarity of Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/bce/if_bce.c Sun Nov 14 13:26:10 2010 (r215297) @@ -1143,7 +1143,7 @@ bce_attach(device_t dev) /* MII child bus by attaching the PHY. */ rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd, bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr, - MII_OFFSET_ANY, 0); + MII_OFFSET_ANY, MIIF_DOPAUSE); if (rc != 0) { BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__, __LINE__); @@ -1769,8 +1769,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - /* FLAG0 is set if RX is enabled and FLAG1 if TX is enabled */ - if (mii->mii_media_active & IFM_FLAG0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -1780,7 +1779,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if (mii->mii_media_active & IFM_FLAG1) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/bge/if_bge.c Sun Nov 14 13:26:10 2010 (r215297) @@ -914,11 +914,13 @@ bge_miibus_statchg(device_t dev) if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) { BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG1) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); @@ -3102,9 +3104,9 @@ bge_attach(device_t dev) again: bge_asf_driver_up(sc); - error = (mii_attach(dev, &sc->bge_miibus, ifp, + error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, bge_ifmedia_sts, BMSR_DEFCAPMASK, - phy_addr, MII_OFFSET_ANY, 0)); + phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/brgphy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -99,9 +99,9 @@ static driver_t brgphy_driver = { DRIVER_MODULE(brgphy, miibus, brgphy_driver, brgphy_devclass, 0, 0); static int brgphy_service(struct mii_softc *, struct mii_data *, int); -static void brgphy_setmedia(struct mii_softc *, int, int); +static void brgphy_setmedia(struct mii_softc *, int); static void brgphy_status(struct mii_softc *); -static void brgphy_mii_phy_auto(struct mii_softc *); +static void brgphy_mii_phy_auto(struct mii_softc *, int); static void brgphy_reset(struct mii_softc *); static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); @@ -169,6 +169,7 @@ detect_hs21(struct bce_softc *bce_sc) static int brgphy_probe(device_t dev) { + return (mii_phy_dev_probe(dev, brgphys, BUS_PROBE_DEFAULT)); } @@ -183,7 +184,6 @@ brgphy_attach(device_t dev) struct mii_attach_args *ma; struct mii_data *mii; struct ifnet *ifp; - int fast_ether; bsc = device_get_softc(dev); sc = &bsc->mii_sc; @@ -203,8 +203,7 @@ brgphy_attach(device_t dev) * At least some variants wedge when isolating, at least some also * don't support loopback. */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - sc->mii_anegticks = MII_ANEGTICKS_GIGE; + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_NOMANPAUSE; /* Initialize brgphy_softc structure */ bsc->mii_oui = MII_OUI(ma->mii_id1, ma->mii_id2); @@ -212,8 +211,6 @@ brgphy_attach(device_t dev) bsc->mii_rev = MII_REV(ma->mii_id2); bsc->serdes_flags = 0; - fast_ether = 0; - if (bootverbose) device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n", bsc->mii_oui, bsc->mii_model, bsc->mii_rev); @@ -279,8 +276,7 @@ brgphy_attach(device_t dev) pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901A2 || pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906 || pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906M)) { - fast_ether = 1; - sc->mii_anegticks = MII_ANEGTICKS; + ma->mii_capmask &= ~BMSR_EXTSTAT; } brgphy_reset(sc); @@ -295,27 +291,10 @@ brgphy_attach(device_t dev) /* Add the supported media types */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - BRGPHY_S10); - printf("10baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - BRGPHY_S10 | BRGPHY_BMCR_FDX); - printf("10baseT-FDX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - BRGPHY_S100); - printf("100baseTX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - BRGPHY_S100 | BRGPHY_BMCR_FDX); - printf("100baseTX-FDX, "); - if (fast_ether == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst), - BRGPHY_S1000); - printf("1000baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), - BRGPHY_S1000 | BRGPHY_BMCR_FDX); - printf("1000baseT-FDX, "); - } + mii_phy_add_media(sc); + printf("\n"); } else { + sc->mii_anegticks = MII_ANEGTICKS_GIGE; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), BRGPHY_S1000 | BRGPHY_BMCR_FDX); printf("1000baseSX-FDX, "); @@ -337,11 +316,10 @@ brgphy_attach(device_t dev) printf("auto-neg workaround, "); bsc->serdes_flags |= BRGPHY_NOANWAIT; } + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + printf("auto\n"); } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); - printf("auto\n"); - #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); @@ -367,15 +345,14 @@ brgphy_service(struct mii_softc *sc, str switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; case IFM_2500_SX: case IFM_1000_SX: case IFM_1000_T: case IFM_100_TX: case IFM_10_T: - brgphy_setmedia(sc, ife->ifm_media, - mii->mii_ifp->if_flags & IFF_LINK0); + brgphy_setmedia(sc, ife->ifm_media); break; default: return (EINVAL); @@ -397,7 +374,7 @@ brgphy_service(struct mii_softc *sc, str * Check to see if we have link. If we do, we don't * need to restart the autonegotiation process. */ - val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); if (val & BMSR_LINK) { sc->mii_ticks = 0; /* Reset autoneg timer. */ break; @@ -414,7 +391,7 @@ brgphy_service(struct mii_softc *sc, str /* Retry autonegotiation */ sc->mii_ticks = 0; - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -456,7 +433,6 @@ brgphy_service(struct mii_softc *sc, str return (0); } - /****************************************************************************/ /* Sets the PHY link speed. */ /* */ @@ -464,12 +440,10 @@ brgphy_service(struct mii_softc *sc, str /* None */ /****************************************************************************/ static void -brgphy_setmedia(struct mii_softc *sc, int media, int master) +brgphy_setmedia(struct mii_softc *sc, int media) { - struct brgphy_softc *bsc = (struct brgphy_softc *)sc; int bmcr = 0, gig; - /* Calculate the value for the BMCR register. */ switch (IFM_SUBTYPE(media)) { case IFM_2500_SX: break; @@ -486,7 +460,6 @@ brgphy_setmedia(struct mii_softc *sc, in break; } - /* Calculate duplex settings for 1000BasetT/1000BaseX. */ if ((media & IFM_GMASK) == IFM_FDX) { bmcr |= BRGPHY_BMCR_FDX; gig = BRGPHY_1000CTL_AFD; @@ -494,53 +467,30 @@ brgphy_setmedia(struct mii_softc *sc, in gig = BRGPHY_1000CTL_AHD; } - /* Force loopback to disconnect PHY for Ethernet medium. */ + /* Force loopback to disconnect PHY from Ethernet medium. */ brgphy_enable_loopback(sc); - /* Disable 1000BaseT advertisements. */ PHY_WRITE(sc, BRGPHY_MII_1000CTL, 0); - /* Disable 10/100 advertisements. */ PHY_WRITE(sc, BRGPHY_MII_ANAR, BRGPHY_SEL_TYPE); - /* Write forced link speed. */ - PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); - /* If 10/100 only then configuration is complete. */ - if ((IFM_SUBTYPE(media) != IFM_1000_T) && (IFM_SUBTYPE(media) != IFM_1000_SX)) - goto brgphy_setmedia_exit; + if (IFM_SUBTYPE(media) != IFM_1000_T && + IFM_SUBTYPE(media) != IFM_1000_SX) { + PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); + return; + } - /* Set duplex speed advertisement for 1000BaseT/1000BaseX. */ + if (IFM_SUBTYPE(media) == IFM_1000_T) { + gig |= BRGPHY_1000CTL_MSE; + if ((media & IFM_ETH_MASTER) != 0) + gig |= BRGPHY_1000CTL_MSC; + } PHY_WRITE(sc, BRGPHY_MII_1000CTL, gig); - /* Restart auto-negotiation for 1000BaseT/1000BaseX. */ PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr | BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); - - /* If not 5701 PHY then configuration is complete. */ - if (bsc->mii_model != MII_MODEL_xxBROADCOM_BCM5701) - goto brgphy_setmedia_exit; - - /* - * When setting the link manually, one side must be the master and - * the other the slave. However ifmedia doesn't give us a good way - * to specify this, so we fake it by using one of the LINK flags. - * If LINK0 is set, we program the PHY to be a master, otherwise - * it's a slave. - */ - if (master) { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE); - } - -brgphy_setmedia_exit: - return; } /****************************************************************************/ /* Set the media status based on the PHY settings. */ -/* IFM_FLAG0 = 0 (RX flow control disabled) | 1 (enabled) */ -/* IFM_FLAG1 = 0 (TX flow control disabled) | 1 (enabled) */ /* */ /* Returns: */ /* None */ @@ -550,34 +500,34 @@ brgphy_status(struct mii_softc *sc) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; struct mii_data *mii = sc->mii_pdata; - int aux, bmcr, bmsr, anar, anlpar, xstat, val; - + int aux, bmcr, bmsr, val, xstat; + u_int flowstat; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; bmsr = PHY_READ(sc, BRGPHY_MII_BMSR) | PHY_READ(sc, BRGPHY_MII_BMSR); bmcr = PHY_READ(sc, BRGPHY_MII_BMCR); - anar = PHY_READ(sc, BRGPHY_MII_ANAR); - anlpar = PHY_READ(sc, BRGPHY_MII_ANLPAR); - /* Loopback is enabled. */ if (bmcr & BRGPHY_BMCR_LOOP) { - mii->mii_media_active |= IFM_LOOP; } - /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && (bmsr & BRGPHY_BMSR_ACOMP) == 0 && (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; - goto brgphy_status_exit; + return; } - /* Autoneg is enabled and complete, link should be up. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { + /* + * NB: reading the ANAR, ANLPAR or 1000STS after the AUXSTS + * wedges at least the PHY of BCM5704 (but not others). + */ + flowstat = mii_phy_flowstatus(sc); + xstat = PHY_READ(sc, BRGPHY_MII_1000STS); aux = PHY_READ(sc, BRGPHY_MII_AUXSTS); /* If copper link is up, get the negotiated speed/duplex. */ @@ -601,8 +551,16 @@ brgphy_status(struct mii_softc *sc) default: mii->mii_media_active |= IFM_NONE; break; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= flowstat; + + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T && + (xstat & BRGPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } } else { + /* Todo: Add support for flow control. */ /* If serdes link is up, get the negotiated speed/duplex. */ if (bmsr & BRGPHY_BMSR_LINK) { mii->mii_media_status |= IFM_ACTIVE; @@ -620,7 +578,6 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } else if (bsc->serdes_flags & BRGPHY_5708S) { PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); @@ -642,9 +599,7 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } else if (bsc->serdes_flags & BRGPHY_5709S) { - /* Select GP Status Block of the AN MMD, get autoneg results. */ PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); @@ -670,65 +625,42 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } - - /* Todo: Change bge to use these settings. */ - - /* Fetch flow control settings from the copper PHY. */ - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Set FLAG0 if RX is enabled and FLAG1 if TX is enabled */ - if ((anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANLPAR_PC)) { - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - } else if (!(anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANAR_ASP) && - (anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG1; - } else if ((anar & BRGPHY_ANAR_PC) && (anar & BRGPHY_ANAR_ASP) && - !(anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG0; - } - } - - /* Todo: Add support for fiber settings too. */ - - -brgphy_status_exit: - return; } static void -brgphy_mii_phy_auto(struct mii_softc *sc) +brgphy_mii_phy_auto(struct mii_softc *sc, int media) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; - int ktcr = 0; + int anar, ktcr = 0; brgphy_reset(sc); - /* Enable flow control in the advertisement register. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Pause capability advertisement (pause capable & asymmetric) */ - PHY_WRITE(sc, BRGPHY_MII_ANAR, - BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA | - BRGPHY_ANAR_ASP | BRGPHY_ANAR_PC); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_ANAR_PC | BRGPHY_ANAR_ASP; + PHY_WRITE(sc, BRGPHY_MII_ANAR, anar); } else { - PHY_WRITE(sc, BRGPHY_SERDES_ANAR, BRGPHY_SERDES_ANAR_FDX | - BRGPHY_SERDES_ANAR_HDX | BRGPHY_SERDES_ANAR_BOTH_PAUSE); + anar = BRGPHY_SERDES_ANAR_FDX | BRGPHY_SERDES_ANAR_HDX; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_SERDES_ANAR_BOTH_PAUSE; + PHY_WRITE(sc, BRGPHY_SERDES_ANAR, anar); } - /* Enable speed in the 1000baseT control register */ ktcr = BRGPHY_1000CTL_AFD | BRGPHY_1000CTL_AHD; if (bsc->mii_model == MII_MODEL_xxBROADCOM_BCM5701) ktcr |= BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC; PHY_WRITE(sc, BRGPHY_MII_1000CTL, ktcr); ktcr = PHY_READ(sc, BRGPHY_MII_1000CTL); - /* Start autonegotiation */ - PHY_WRITE(sc, BRGPHY_MII_BMCR,BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); + PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_AUTOEN | + BRGPHY_BMCR_STARTNEG); PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00); - } - /* Enable loopback to force the link down. */ static void brgphy_enable_loopback(struct mii_softc *sc) @@ -923,7 +855,6 @@ brgphy_fixup_jitter_bug(struct mii_softc PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } - static void brgphy_fixup_disable_early_dac(struct mii_softc *sc) { @@ -936,7 +867,6 @@ brgphy_fixup_disable_early_dac(struct mi } - static void brgphy_ethernet_wirespeed(struct mii_softc *sc) { @@ -948,7 +878,6 @@ brgphy_ethernet_wirespeed(struct mii_sof PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4)); } - static void brgphy_jumbo_settings(struct mii_softc *sc, u_long mtu) { @@ -989,7 +918,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; - int val; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1029,7 +958,6 @@ brgphy_reset(struct mii_softc *sc) bce_sc = ifp->if_softc; } - /* Handle any bge (NetXtreme/NetLink) workarounds. */ if (bge_sc) { /* Fix up various bugs */ if (bge_sc->bge_phy_flags & BGE_PHY_5704_A0_BUG) @@ -1060,10 +988,7 @@ brgphy_reset(struct mii_softc *sc) /* Adjust output voltage (From Linux driver) */ if (bge_sc->bge_asicrev == BGE_ASICREV_BCM5906) PHY_WRITE(sc, BRGPHY_MII_EPHY_PTEST, 0x12); - - /* Handle any bce (NetXtreme II) workarounds. */ } else if (bce_sc) { - if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5708 && (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { @@ -1154,7 +1079,6 @@ brgphy_reset(struct mii_softc *sc) /* Restore IEEE0 block (assumed in all brgphy(4) code). */ PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) @@ -1167,6 +1091,5 @@ brgphy_reset(struct mii_softc *sc) brgphy_jumbo_settings(sc, ifp->if_mtu); brgphy_ethernet_wirespeed(sc); } - } } Modified: head/sys/dev/mii/ciphy.c ============================================================================== --- head/sys/dev/mii/ciphy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/ciphy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -165,7 +165,7 @@ ciphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, CIPHY_MII_BMCR) & CIPHY_BMCR_AUTOEN) return (0); #endif - (void) mii_phy_auto(sc); + (void)mii_phy_auto(sc); break; case IFM_1000_T: speed = CIPHY_S1000; @@ -190,30 +190,16 @@ setit: if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) break; + gig |= CIPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= CIPHY_1000CTL_MSC; PHY_WRITE(sc, CIPHY_MII_1000CTL, gig); PHY_WRITE(sc, CIPHY_MII_BMCR, - speed|CIPHY_BMCR_AUTOEN|CIPHY_BMCR_STARTNEG); - - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) { - PHY_WRITE(sc, CIPHY_MII_1000CTL, - gig|CIPHY_1000CTL_MSE|CIPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, CIPHY_MII_1000CTL, - gig|CIPHY_1000CTL_MSE); - } + speed | CIPHY_BMCR_AUTOEN | CIPHY_BMCR_STARTNEG); break; case IFM_NONE: - PHY_WRITE(sc, MII_BMCR, BMCR_ISO|BMCR_PDOWN); + PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); break; - case IFM_100_T4: default: return (EINVAL); } @@ -319,6 +305,10 @@ ciphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; + + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, CIPHY_MII_1000STS) & CIPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static void Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/e1000phy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -91,7 +91,7 @@ DRIVER_MODULE(e1000phy, miibus, e1000phy static int e1000phy_service(struct mii_softc *, struct mii_data *, int); static void e1000phy_status(struct mii_softc *); static void e1000phy_reset(struct mii_softc *); -static int e1000phy_mii_phy_auto(struct e1000phy_softc *); +static int e1000phy_mii_phy_auto(struct e1000phy_softc *, int); static const struct mii_phydesc e1000phys[] = { MII_PHY_DESC(MARVELL, E1000), @@ -146,6 +146,8 @@ e1000phy_attach(device_t dev) sc->mii_service = e1000phy_service; sc->mii_pdata = mii; + sc->mii_flags |= MIIF_NOMANPAUSE; + esc->mii_model = MII_MODEL(ma->mii_id2); ifp = sc->mii_pdata->mii_ifp; if (strcmp(ifp->if_dname, "msk") == 0 && @@ -323,7 +325,7 @@ e1000phy_service(struct mii_softc *sc, s break; if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { - e1000phy_mii_phy_auto(esc); + e1000phy_mii_phy_auto(esc, ife->ifm_media); break; } @@ -366,27 +368,14 @@ e1000phy_service(struct mii_softc *sc, s reg &= ~E1000_CR_AUTO_NEG_ENABLE; PHY_WRITE(sc, E1000_CR, reg | E1000_CR_RESET); - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T || - (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_SX)) { - if ((mii->mii_ifp->if_flags & IFF_LINK0)) - PHY_WRITE(sc, E1000_1GCR, gig | - E1000_1GCR_MS_ENABLE | E1000_1GCR_MS_VALUE); - else - PHY_WRITE(sc, E1000_1GCR, gig | - E1000_1GCR_MS_ENABLE); - } else { - if ((sc->mii_extcapabilities & - (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) - PHY_WRITE(sc, E1000_1GCR, 0); - } + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= E1000_1GCR_MS_ENABLE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= E1000_1GCR_MS_VALUE; + PHY_WRITE(sc, E1000_1GCR, gig); + } else if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) + PHY_WRITE(sc, E1000_1GCR, 0); PHY_WRITE(sc, E1000_AR, E1000_AR_SELECTOR_FIELD); PHY_WRITE(sc, E1000_CR, speed | E1000_CR_RESET); done: @@ -424,7 +413,7 @@ done: sc->mii_ticks = 0; e1000phy_reset(sc); - e1000phy_mii_phy_auto(esc); + e1000phy_mii_phy_auto(esc, ife->ifm_media); break; } @@ -440,7 +429,7 @@ static void e1000phy_status(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; - int bmcr, bmsr, gsr, ssr, ar, lpar; + int bmcr, bmsr, ssr; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; @@ -485,38 +474,22 @@ e1000phy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_1000_SX; } - if (ssr & E1000_SSR_DUPLEX) + if (ssr & E1000_SSR_DUPLEX) { mii->mii_media_active |= IFM_FDX; - else + if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); + } else mii->mii_media_active |= IFM_HDX; - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ar = PHY_READ(sc, E1000_AR); - lpar = PHY_READ(sc, E1000_LPAR); - /* FLAG0==rx-flow-control FLAG1==tx-flow-control */ - if ((ar & E1000_AR_PAUSE) && (lpar & E1000_LPAR_PAUSE)) { - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - } else if (!(ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) && - (lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) { - mii->mii_media_active |= IFM_FLAG1; - } else if ((ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) && - !(lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) { - mii->mii_media_active |= IFM_FLAG0; - } - } - - /* FLAG2 : local PHY resolved to MASTER */ - if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) || - (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX)) { - PHY_READ(sc, E1000_1GSR); - gsr = PHY_READ(sc, E1000_1GSR); - if ((gsr & E1000_1GSR_MS_CONFIG_RES) != 0) - mii->mii_media_active |= IFM_FLAG2; + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { + if (((PHY_READ(sc, E1000_1GSR) | PHY_READ(sc, E1000_1GSR)) & + E1000_1GSR_MS_CONFIG_RES) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } } static int -e1000phy_mii_phy_auto(struct e1000phy_softc *esc) +e1000phy_mii_phy_auto(struct e1000phy_softc *esc, int media) { struct mii_softc *sc; uint16_t reg; @@ -525,12 +498,13 @@ e1000phy_mii_phy_auto(struct e1000phy_so if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { reg = PHY_READ(sc, E1000_AR); reg |= E1000_AR_10T | E1000_AR_10T_FD | - E1000_AR_100TX | E1000_AR_100TX_FD | - E1000_AR_PAUSE | E1000_AR_ASM_DIR; + E1000_AR_100TX | E1000_AR_100TX_FD; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + reg |= E1000_AR_PAUSE | E1000_AR_ASM_DIR; PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD); } else - PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X | - E1000_FA_SYM_PAUSE | E1000_FA_ASYM_PAUSE); + PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X); if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, E1000_1GCR, E1000_1GCR_1000T_FD | E1000_1GCR_1000T); Modified: head/sys/dev/mii/ip1000phy.c ============================================================================== --- head/sys/dev/mii/ip1000phy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/ip1000phy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -84,7 +84,7 @@ DRIVER_MODULE(ip1000phy, miibus, ip1000p static int ip1000phy_service(struct mii_softc *, struct mii_data *, int); static void ip1000phy_status(struct mii_softc *); static void ip1000phy_reset(struct mii_softc *); -static int ip1000phy_mii_phy_auto(struct mii_softc *); +static int ip1000phy_mii_phy_auto(struct mii_softc *, int); static const struct mii_phydesc ip1000phys[] = { MII_PHY_DESC(ICPLUS, IP1000A), @@ -120,7 +120,7 @@ ip1000phy_attach(device_t dev) sc->mii_service = ip1000phy_service; sc->mii_pdata = mii; - sc->mii_flags |= MIIF_NOISOLATE; + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOMANPAUSE; isc->model = MII_MODEL(ma->mii_id2); isc->revision = MII_REV(ma->mii_id2); @@ -163,9 +163,8 @@ ip1000phy_service(struct mii_softc *sc, ip1000phy_reset(sc); switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - (void)ip1000phy_mii_phy_auto(sc); + (void)ip1000phy_mii_phy_auto(sc, ife->ifm_media); goto done; - break; case IFM_1000_T: /* @@ -199,26 +198,10 @@ ip1000phy_service(struct mii_softc *sc, if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) break; + gig |= IP1000PHY_1000CR_MASTER | IP1000PHY_1000CR_MANUAL; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= IP1000PHY_1000CR_MMASTER; PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig); - PHY_WRITE(sc, IP1000PHY_MII_BMCR, speed); - - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) - PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig | - IP1000PHY_1000CR_MASTER | - IP1000PHY_1000CR_MMASTER | - IP1000PHY_1000CR_MANUAL); - else - PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig | - IP1000PHY_1000CR_MASTER | - IP1000PHY_1000CR_MANUAL); done: break; @@ -258,7 +241,7 @@ done: break; sc->mii_ticks = 0; - ip1000phy_mii_phy_auto(sc); + ip1000phy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -276,7 +259,6 @@ ip1000phy_status(struct mii_softc *sc) struct ip1000phy_softc *isc; struct mii_data *mii = sc->mii_pdata; uint32_t bmsr, bmcr, stat; - uint32_t ar, lpar; isc = (struct ip1000phy_softc *)sc; @@ -345,36 +327,18 @@ ip1000phy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_HDX; } - ar = PHY_READ(sc, IP1000PHY_MII_ANAR); - lpar = PHY_READ(sc, IP1000PHY_MII_ANLPAR); - - /* - * FLAG0 : Rx flow-control - * FLAG1 : Tx flow-control - */ - if ((ar & IP1000PHY_ANAR_PAUSE) && (lpar & IP1000PHY_ANLPAR_PAUSE)) - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - else if (!(ar & IP1000PHY_ANAR_PAUSE) && (ar & IP1000PHY_ANAR_APAUSE) && - (lpar & IP1000PHY_ANLPAR_PAUSE) && (lpar & IP1000PHY_ANLPAR_APAUSE)) - mii->mii_media_active |= IFM_FLAG1; - else if ((ar & IP1000PHY_ANAR_PAUSE) && (ar & IP1000PHY_ANAR_APAUSE) && - !(lpar & IP1000PHY_ANLPAR_PAUSE) && - (lpar & IP1000PHY_ANLPAR_APAUSE)) { - mii->mii_media_active |= IFM_FLAG0; - } + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); - /* - * FLAG2 : local PHY resolved to MASTER - */ if ((mii->mii_media_active & IFM_1000_T) != 0) { stat = PHY_READ(sc, IP1000PHY_MII_1000SR); if ((stat & IP1000PHY_1000SR_MASTER) != 0) - mii->mii_media_active |= IFM_FLAG2; + mii->mii_media_active |= IFM_ETH_MASTER; } } static int -ip1000phy_mii_phy_auto(struct mii_softc *sc) +ip1000phy_mii_phy_auto(struct mii_softc *sc, int media) { struct ip1000phy_softc *isc; uint32_t reg; @@ -386,8 +350,9 @@ ip1000phy_mii_phy_auto(struct mii_softc reg |= IP1000PHY_ANAR_NP; } reg |= IP1000PHY_ANAR_10T | IP1000PHY_ANAR_10T_FDX | - IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX | - IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; + IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX; + if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + reg |= IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; PHY_WRITE(sc, IP1000PHY_MII_ANAR, reg | IP1000PHY_ANAR_CSMA); reg = IP1000PHY_1000CR_1000T | IP1000PHY_1000CR_1000T_FDX; Modified: head/sys/dev/mii/mii.h ============================================================================== --- head/sys/dev/mii/mii.h Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/mii.h Sun Nov 14 13:26:10 2010 (r215297) @@ -128,6 +128,10 @@ #define ANAR_10_FD 0x0040 /* local device supports 10bT FD */ #define ANAR_10 0x0020 /* local device supports 10bT */ #define ANAR_CSMA 0x0001 /* protocol selector CSMA/CD */ +#define ANAR_PAUSE_NONE (0 << 10) +#define ANAR_PAUSE_SYM (1 << 10) +#define ANAR_PAUSE_ASYM (2 << 10) +#define ANAR_PAUSE_TOWARDS (3 << 10) #define ANAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */ #define ANAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */ @@ -148,6 +152,11 @@ #define ANLPAR_10_FD 0x0040 /* link partner supports 10bT FD */ #define ANLPAR_10 0x0020 /* link partner supports 10bT */ #define ANLPAR_CSMA 0x0001 /* protocol selector CSMA/CD */ +#define ANLPAR_PAUSE_MASK (3 << 10) +#define ANLPAR_PAUSE_NONE (0 << 10) +#define ANLPAR_PAUSE_SYM (1 << 10) +#define ANLPAR_PAUSE_ASYM (2 << 10) +#define ANLPAR_PAUSE_TOWARDS (3 << 10) #define ANLPAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */ #define ANLPAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */ Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/mii_physubr.c Sun Nov 14 13:26:10 2010 (r215297) @@ -106,8 +106,13 @@ mii_phy_setmedia(struct mii_softc *sc) int bmcr, anar, gtcr; if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + /* + * 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. + */ if ((PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) == 0 || - (sc->mii_flags & MIIF_FORCEANEG) != 0) + (sc->mii_flags & (MIIF_DOPAUSE | MIIF_FORCEANEG)) != 0) (void)mii_phy_auto(sc); return; } @@ -124,14 +129,23 @@ mii_phy_setmedia(struct mii_softc *sc) bmcr = mii_media_table[ife->ifm_data].mm_bmcr; gtcr = mii_media_table[ife->ifm_data].mm_gtcr; - if ((mii->mii_media.ifm_media & IFM_ETH_MASTER) != 0) { - switch (IFM_SUBTYPE(ife->ifm_media)) { - case IFM_1000_T: - gtcr |= GTCR_MAN_MS | GTCR_ADV_MS; - break; + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gtcr |= GTCR_MAN_MS; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gtcr |= GTCR_ADV_MS; + } - default: - printf("mii_phy_setmedia: MASTER on wrong media\n"); + if ((ife->ifm_media & IFM_GMASK) == (IFM_FDX | IFM_FLOW) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((sc->mii_flags & MIIF_IS_1000X) != 0) + anar |= ANAR_X_PAUSE_TOWARDS; + else { + anar |= ANAR_FC; + /* XXX Only 1000BASE-T has PAUSE_ASYM? */ + if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0 && + (sc->mii_extcapabilities & + (EXTSR_1000THDX | EXTSR_1000TFDX)) != 0) + anar |= ANAR_X_PAUSE_ASYM; } } @@ -147,6 +161,7 @@ mii_phy_setmedia(struct mii_softc *sc) int mii_phy_auto(struct mii_softc *sc) { + struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur; int anar, gtcr; /* @@ -160,16 +175,23 @@ mii_phy_auto(struct mii_softc *sc) if ((sc->mii_extcapabilities & EXTSR_1000XHDX) != 0) anar |= ANAR_X_HD; - if ((sc->mii_flags & MIIF_DOPAUSE) != 0) { - /* XXX Asymmetric vs. symmetric? */ - anar |= ANLPAR_X_PAUSE_TOWARDS; - } + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_X_PAUSE_TOWARDS; PHY_WRITE(sc, MII_ANAR, anar); } else { anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; - if ((sc->mii_flags & MIIF_DOPAUSE) != 0) - anar |= ANAR_FC; + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) + anar |= ANAR_FC; + /* XXX Only 1000BASE-T has PAUSE_ASYM? */ + if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) && + (sc->mii_extcapabilities & + (EXTSR_1000THDX | EXTSR_1000TFDX)) != 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 13:31:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 685F2106564A; Sun, 14 Nov 2010 13:31: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 551D08FC0C; Sun, 14 Nov 2010 13:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEDV1ZC083262; Sun, 14 Nov 2010 13:31:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDV15W083256; Sun, 14 Nov 2010 13:31:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141331.oAEDV15W083256@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215298 - 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: Sun, 14 Nov 2010 13:31:01 -0000 Author: marius Date: Sun Nov 14 13:31:01 2010 New Revision: 215298 URL: http://svn.freebsd.org/changeset/base/215298 Log: - Change these drivers to take advantage and use the generic IEEE 802.3 annex 31B full duplex flow control as well as the IFM_1000_T master support committed in r215297. For atphy(4) and jmphy(4) this includes changing these PHY drivers to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set). - Rename {atphy,jmphy}_auto() to {atphy,jmphy}_setmedia() as these handle other media types as well. Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks Modified: head/sys/dev/mii/atphy.c head/sys/dev/mii/gentbi.c head/sys/dev/mii/jmphy.c head/sys/dev/mii/nsgphy.c head/sys/dev/mii/rgephy.c Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/atphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -82,7 +82,7 @@ static int atphy_service(struct mii_soft static void atphy_status(struct mii_softc *); static void atphy_reset(struct mii_softc *); static uint16_t atphy_anar(struct ifmedia_entry *); -static int atphy_auto(struct mii_softc *); +static int atphy_setmedia(struct mii_softc *, int); static const struct mii_phydesc atphys[] = { MII_PHY_DESC(ATHEROS, F1), @@ -158,7 +158,7 @@ atphy_service(struct mii_softc *sc, stru if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -175,7 +175,7 @@ atphy_service(struct mii_softc *sc, stru /* * XXX * Due to an unknown reason powering down PHY resulted - * in unexpected results such as inaccessbility of + * in unexpected results such as inaccessibility of * hardware of freshly rebooted system. Disable * powering down PHY until I got more information for * Attansic/Atheros PHY hardwares. @@ -189,8 +189,9 @@ atphy_service(struct mii_softc *sc, stru anar = atphy_anar(ife); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; - /* Enable pause. */ - anar |= (3 << 10); + if (((ife->ifm_media & IFM_GMASK) & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; } if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | @@ -222,7 +223,7 @@ done: } /* - * check for link. + * Check for link. * Read the status register twice; BMSR_LINK is latch-low. */ bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); @@ -238,7 +239,7 @@ done: return (0); sc->mii_ticks = 0; - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -284,7 +285,7 @@ atphy_status(struct mii_softc *sc) case ATPHY_SSR_1000MBS: mii->mii_media_active |= IFM_1000_T; /* - * atphy(4) got a valid link so reset mii_ticks. + * atphy(4) has a valid link so reset mii_ticks. * Resetting mii_ticks is needed in order to * detect link loss after auto-negotiation. */ @@ -304,11 +305,13 @@ atphy_status(struct mii_softc *sc) } if ((ssr & ATPHY_SSR_DUPLEX) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; - /* XXX Master/Slave, Flow-control */ + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, MII_100T2SR) & GTSR_MS_RES) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static void @@ -336,7 +339,7 @@ atphy_reset(struct mii_softc *sc) PHY_WRITE(sc, ATPHY_SCR, reg); /* Workaround F1 bug to reset phy. */ - atphy_auto(sc); + atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media); for (i = 0; i < 1000; i++) { DELAY(1); @@ -378,12 +381,17 @@ atphy_anar(struct ifmedia_entry *ife) } static int -atphy_auto(struct mii_softc *sc) +atphy_setmedia(struct mii_softc *sc, int media) { uint16_t anar; - anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities); - PHY_WRITE(sc, MII_ANAR, anar | (3 << 10) | ANAR_CSMA); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if (((IFM_SUBTYPE(media) == IFM_AUTO || + ((media & IFM_GMASK) & IFM_FDX) != 0) && + ((media & IFM_GMASK) & IFM_FLOW) != 0) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; + PHY_WRITE(sc, MII_ANAR, anar); if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX); Modified: head/sys/dev/mii/gentbi.c ============================================================================== --- head/sys/dev/mii/gentbi.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/gentbi.c Sun Nov 14 13:31:01 2010 (r215298) @@ -267,7 +267,8 @@ gentbi_status(struct mii_softc *sc) anlpar = PHY_READ(sc, MII_ANLPAR); if ((sc->mii_extcapabilities & EXTSR_1000XFDX) != 0 && (anlpar & ANLPAR_X_FD) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; } else Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/jmphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -50,11 +50,11 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -static int jmphy_probe(device_t); -static int jmphy_attach(device_t); +static int jmphy_probe(device_t); +static int jmphy_attach(device_t); static void jmphy_reset(struct mii_softc *); static uint16_t jmphy_anar(struct ifmedia_entry *); -static int jmphy_auto(struct mii_softc *, struct ifmedia_entry *); +static int jmphy_setmedia(struct mii_softc *, struct ifmedia_entry *); struct jmphy_softc { struct mii_softc mii_sc; @@ -154,7 +154,7 @@ jmphy_service(struct mii_softc *sc, stru if ((mii->mii_ifp->if_flags & IFF_UP) == 0) break; - if (jmphy_auto(sc, ife) != EJUSTRETURN) + if (jmphy_setmedia(sc, ife) != EJUSTRETURN) return (EINVAL); break; @@ -186,7 +186,7 @@ jmphy_service(struct mii_softc *sc, stru return (0); sc->mii_ticks = 0; - jmphy_auto(sc, ife); + (void)jmphy_setmedia(sc, ife); break; } @@ -251,16 +251,14 @@ jmphy_status(struct mii_softc *sc) } if ((ssr & JMPHY_SSR_DUPLEX) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; - /* XXX Flow-control. */ -#ifdef notyet + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { if ((PHY_READ(sc, MII_100T2SR) & GTSR_MS_RES) != 0) mii->mii_media_active |= IFM_ETH_MASTER; } -#endif } static void @@ -309,7 +307,7 @@ jmphy_anar(struct ifmedia_entry *ife) } static int -jmphy_auto(struct mii_softc *sc, struct ifmedia_entry *ife) +jmphy_setmedia(struct mii_softc *sc, struct ifmedia_entry *ife) { uint16_t anar, bmcr, gig; @@ -336,17 +334,18 @@ jmphy_auto(struct mii_softc *sc, struct bmcr |= BMCR_LOOP; anar = jmphy_anar(ife); - /* XXX Always advertise pause capability. */ - anar |= (3 << 10); + if (((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || + (ife->ifm_media & IFM_FDX) != 0) && + (ife->ifm_media & IFM_FLOW) != 0) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) { -#ifdef notyet - struct mii_data *mii; - - mii = sc->mii_pdata; - if ((mii->mii_media.ifm_media & IFM_ETH_MASTER) != 0) - gig |= GTCR_MAN_MS | GTCR_MAN_ADV; -#endif + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= GTCR_MAN_MS; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= GTCR_ADV_MS; + } PHY_WRITE(sc, MII_100T2CR, gig); } PHY_WRITE(sc, MII_ANAR, anar | ANAR_CSMA); Modified: head/sys/dev/mii/nsgphy.c ============================================================================== --- head/sys/dev/mii/nsgphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/nsgphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -246,7 +246,8 @@ nsgphy_status(struct mii_softc *sc) } if (physup & PHY_SUP_DUPLEX) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; } else Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/rgephy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -89,7 +89,7 @@ DRIVER_MODULE(rgephy, miibus, rgephy_dri static int rgephy_service(struct mii_softc *, struct mii_data *, int); static void rgephy_status(struct mii_softc *); -static int rgephy_mii_phy_auto(struct mii_softc *); +static int rgephy_mii_phy_auto(struct mii_softc *, int); static void rgephy_reset(struct mii_softc *); static void rgephy_loop(struct mii_softc *); static void rgephy_load_dspcode(struct mii_softc *); @@ -113,7 +113,6 @@ rgephy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; - const char *sep = ""; rsc = device_get_softc(dev); sc = &rsc->mii_sc; @@ -132,27 +131,21 @@ rgephy_attach(device_t dev) rsc->mii_revision = MII_REV(ma->mii_id2); #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " #if 0 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), MII_MEDIA_100_TX); #endif - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - sc->mii_capabilities &= ~BMSR_ANEG; + /* RTL8169S do not report auto-sense; add manually. */ + sc->mii_capabilities = (PHY_READ(sc, MII_BMSR) | BMSR_ANEG) & + ma->mii_capmask; if (sc->mii_capabilities & BMSR_EXTSTAT) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); - device_printf(dev, " "); mii_phy_add_media(sc); - /* RTL8169S do not report auto-sense; add manually. */ - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), MII_NMEDIA); - sep = ", "; - PRINT("auto"); printf("\n"); #undef ADD -#undef PRINT rgephy_reset(sc); MIIBUS_MEDIAINIT(sc->mii_dev); @@ -182,7 +175,8 @@ rgephy_service(struct mii_softc *sc, str rgephy_reset(sc); /* XXX hardware bug work-around */ anar = PHY_READ(sc, RGEPHY_MII_ANAR); - anar &= ~(RGEPHY_ANAR_TX_FD | RGEPHY_ANAR_TX | + anar &= ~(RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP | + RGEPHY_ANAR_TX_FD | RGEPHY_ANAR_TX | RGEPHY_ANAR_10_FD | RGEPHY_ANAR_10); switch (IFM_SUBTYPE(ife->ifm_media)) { @@ -194,7 +188,7 @@ rgephy_service(struct mii_softc *sc, str if (PHY_READ(sc, RGEPHY_MII_BMCR) & RGEPHY_BMCR_AUTOEN) return (0); #endif - (void) rgephy_mii_phy_auto(sc); + (void)rgephy_mii_phy_auto(sc, ife->ifm_media); break; case IFM_1000_T: speed = RGEPHY_S1000; @@ -222,32 +216,26 @@ setit: PHY_WRITE(sc, RGEPHY_MII_1000CTL, 0); PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | - RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); + RGEPHY_BMCR_AUTOEN | + RGEPHY_BMCR_STARTNEG); break; } - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) { - PHY_WRITE(sc, RGEPHY_MII_1000CTL, - gig|RGEPHY_1000CTL_MSE|RGEPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, RGEPHY_MII_1000CTL, - gig|RGEPHY_1000CTL_MSE); - } + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; + + gig |= RGEPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= RGEPHY_1000CTL_MSC; + PHY_WRITE(sc, RGEPHY_MII_1000CTL, gig); + PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); break; case IFM_NONE: - PHY_WRITE(sc, MII_BMCR, BMCR_ISO|BMCR_PDOWN); + PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); break; - case IFM_100_T4: default: return (EINVAL); } @@ -297,7 +285,7 @@ setit: return (0); sc->mii_ticks = 0; - rgephy_mii_phy_auto(sc); + rgephy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -395,22 +383,32 @@ rgephy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); + + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, RGEPHY_MII_1000STS) & RGEPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static int -rgephy_mii_phy_auto(struct mii_softc *mii) +rgephy_mii_phy_auto(struct mii_softc *sc, int media) { + int anar; - rgephy_loop(mii); - rgephy_reset(mii); + rgephy_loop(sc); + rgephy_reset(sc); - PHY_WRITE(mii, RGEPHY_MII_ANAR, - BMSR_MEDIA_TO_ANAR(mii->mii_capabilities) | ANAR_CSMA); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; + PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); DELAY(1000); - PHY_WRITE(mii, RGEPHY_MII_1000CTL, - RGEPHY_1000CTL_AHD|RGEPHY_1000CTL_AFD); + PHY_WRITE(sc, RGEPHY_MII_1000CTL, + RGEPHY_1000CTL_AHD | RGEPHY_1000CTL_AFD); DELAY(1000); - PHY_WRITE(mii, RGEPHY_MII_BMCR, + PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); DELAY(100); From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 14:12:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2B841065672; Sun, 14 Nov 2010 14:12:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5EB18FC08; Sun, 14 Nov 2010 14:12: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 oAEEChP1084112; Sun, 14 Nov 2010 14:12:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEChsE084107; Sun, 14 Nov 2010 14:12:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201011141412.oAEEChsE084107@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Nov 2010 14:12: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: r215299 - in head/sys: geom/eli kern libkern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 14:12:44 -0000 Author: ed Date: Sun Nov 14 14:12:43 2010 New Revision: 215299 URL: http://svn.freebsd.org/changeset/base/215299 Log: Add support for asterisk characters when filling in the GELI password during boot. Change the last argument of gets() to indicate a visibility flag and add definitions for the numerical constants. Except for the value 2, gets() will behave exactly the same, so existing consumers shouldn't break. We only use it in two places, though. Submitted by: lme (older version) Modified: head/sys/geom/eli/g_eli.c head/sys/kern/vfs_mountroot.c head/sys/libkern/gets.c head/sys/sys/libkern.h Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/geom/eli/g_eli.c Sun Nov 14 14:12:43 2010 (r215299) @@ -64,11 +64,11 @@ static u_int g_eli_tries = 3; TUNABLE_INT("kern.geom.eli.tries", &g_eli_tries); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, tries, CTLFLAG_RW, &g_eli_tries, 0, "Number of tries for entering the passphrase"); -static u_int g_eli_visible_passphrase = 0; +static u_int g_eli_visible_passphrase = GETS_NOECHO; TUNABLE_INT("kern.geom.eli.visible_passphrase", &g_eli_visible_passphrase); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, visible_passphrase, CTLFLAG_RW, &g_eli_visible_passphrase, 0, - "Turn on echo when entering the passphrase (for debug purposes only!!)"); + "Visibility of passphrase prompt (0 = invisible, 1 = visible, 2 = asterisk)"); u_int g_eli_overwrites = G_ELI_OVERWRITES; TUNABLE_INT("kern.geom.eli.overwrites", &g_eli_overwrites); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, overwrites, CTLFLAG_RW, &g_eli_overwrites, Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/kern/vfs_mountroot.c Sun Nov 14 14:12:43 2010 (r215299) @@ -484,7 +484,7 @@ parse_dir_ask(char **conf) again: printf("\nmountroot> "); - gets(name, sizeof(name), 1); + gets(name, sizeof(name), GETS_ECHO); if (name[0] == '\0') return (0); if (name[0] == '?') { Modified: head/sys/libkern/gets.c ============================================================================== --- head/sys/libkern/gets.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/libkern/gets.c Sun Nov 14 14:12:43 2010 (r215299) @@ -60,8 +60,16 @@ gets(char *cp, size_t size, int visible) continue; default: if (lp < end) { - if (visible) + switch (visible) { + case GETS_NOECHO: + break; + case GETS_ECHOPASS: + printf("*"); + break; + default: printf("%c", c); + break; + } *lp++ = c; } } Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/sys/libkern.h Sun Nov 14 14:12:43 2010 (r215299) @@ -187,4 +187,9 @@ strrchr(const char *p, int ch) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME +/* Visibility of characters in gets() */ +#define GETS_NOECHO 0 /* Disable echoing of characters. */ +#define GETS_ECHO 1 /* Enable echoing of characters. */ +#define GETS_ECHOPASS 2 /* Print a * for every character. */ + #endif /* !_SYS_LIBKERN_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 14:25:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5354106564A; Sun, 14 Nov 2010 14:25:04 +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 BEA458FC08; Sun, 14 Nov 2010 14:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEEP4F3084429; Sun, 14 Nov 2010 14:25:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEP4t4084427; Sun, 14 Nov 2010 14:25:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141425.oAEEP4t4084427@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 14:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215300 - 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: Sun, 14 Nov 2010 14:25:05 -0000 Author: marius Date: Sun Nov 14 14:25:04 2010 New Revision: 215300 URL: http://svn.freebsd.org/changeset/base/215300 Log: Remove redundant cases and a style(9) bug. Modified: head/sys/dev/mii/xmphy.c Modified: head/sys/dev/mii/xmphy.c ============================================================================== --- head/sys/dev/mii/xmphy.c Sun Nov 14 14:12:43 2010 (r215299) +++ head/sys/dev/mii/xmphy.c Sun Nov 14 14:25:04 2010 (r215300) @@ -167,7 +167,7 @@ xmphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN) return (0); #endif - (void) xmphy_mii_phy_auto(sc); + (void)xmphy_mii_phy_auto(sc); break; case IFM_1000_SX: mii_phy_reset(sc); @@ -179,9 +179,6 @@ xmphy_service(struct mii_softc *sc, stru PHY_WRITE(sc, XMPHY_MII_BMCR, 0); } break; - case IFM_100_T4: - case IFM_100_TX: - case IFM_10_T: default: return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 14:37:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01C8106564A; Sun, 14 Nov 2010 14:37:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDD148FC0A; Sun, 14 Nov 2010 14:37: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 oAEEbKkk084734; Sun, 14 Nov 2010 14:37:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEbK3Z084732; Sun, 14 Nov 2010 14:37:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011141437.oAEEbK3Z084732@svn.freebsd.org> From: Michael Tuexen Date: Sun, 14 Nov 2010 14:37: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: r215301 - 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: Sun, 14 Nov 2010 14:37:21 -0000 Author: tuexen Date: Sun Nov 14 14:37:20 2010 New Revision: 215301 URL: http://svn.freebsd.org/changeset/base/215301 Log: Simplify sctp_delayed_cksum() a bit. MFC after: 3 days. Modified: head/sys/netinet/sctp_crc32.c Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Sun Nov 14 14:25:04 2010 (r215300) +++ head/sys/netinet/sctp_crc32.c Sun Nov 14 14:37:20 2010 (r215301) @@ -124,18 +124,16 @@ sctp_delayed_cksum(struct mbuf *m, uint3 #if defined(SCTP_WITH_NO_CSUM) panic("sctp_delayed_cksum() called when using no SCTP CRC."); #else - struct ip *ip; uint32_t checksum; - ip = mtod(m, struct ip *); checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - (uint32_t) m->m_len, offset, ip->ip_p); + printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + (uint32_t) m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 15:15:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A4001065695; Sun, 14 Nov 2010 15:15:23 +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 07AD88FC08; Sun, 14 Nov 2010 15:15: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 oAEFFMol085601; Sun, 14 Nov 2010 15:15:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEFFMfa085598; Sun, 14 Nov 2010 15:15:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141515.oAEFFMfa085598@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 15: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: r215302 - in head/sys/dev: bge 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: Sun, 14 Nov 2010 15:15:23 -0000 Author: marius Date: Sun Nov 14 15:15:22 2010 New Revision: 215302 URL: http://svn.freebsd.org/changeset/base/215302 Log: Move the limiting of the PHY to 10/100 modes of operation due to limitations of certain MAC models from brgphy(4) to bge(4) where it belongs. While at it, update the list of models having that restriction to what OpenBSD uses, which in turn seems to have obtained that information from the Linux tg3 driver. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/mii/brgphy.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Nov 14 14:37:20 2010 (r215301) +++ head/sys/dev/bge/if_bge.c Sun Nov 14 15:15:22 2010 (r215302) @@ -2640,7 +2640,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg; u_char eaddr[ETHER_ADDR_LEN]; - int error, f, msicount, phy_addr, reg, rid, trys; + int capmask, error, f, msicount, phy_addr, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -2824,13 +2824,31 @@ bge_attach(device_t dev) if (BGE_IS_5755_PLUS(sc) == 0) sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG; + misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (sc->bge_asicrev == BGE_ASICREV_BCM5705) { - misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (misccfg == BGE_MISCCFG_BOARD_ID_5788 || misccfg == BGE_MISCCFG_BOARD_ID_5788M) sc->bge_flags |= BGE_FLAG_5788; } + capmask = BMSR_DEFCAPMASK; + if ((sc->bge_asicrev == BGE_ASICREV_BCM5703 && + (misccfg == 0x4000 || misccfg == 0x8000)) || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5901 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5901A2 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5705F)) || + (pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5751F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5753F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5787F)) || + pci_get_device(dev) == BCOM_DEVICEID_BCM57790 || + sc->bge_asicrev == BGE_ASICREV_BCM5906) { + /* These chips are 10/100 only. */ + capmask &= ~BMSR_EXTSTAT; + } + /* * Some controllers seem to require a special firmware to use * TSO. But the firmware is not available to FreeBSD and Linux @@ -3104,9 +3122,9 @@ bge_attach(device_t dev) again: bge_asf_driver_up(sc); - error = mii_attach(dev, &sc->bge_miibus, ifp, - bge_ifmedia_upd, bge_ifmedia_sts, BMSR_DEFCAPMASK, - phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); + error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, + bge_ifmedia_sts, capmask, phy_addr, MII_OFFSET_ANY, + MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sun Nov 14 14:37:20 2010 (r215301) +++ head/sys/dev/mii/brgphy.c Sun Nov 14 15:15:22 2010 (r215302) @@ -268,17 +268,6 @@ brgphy_attach(device_t dev) bce_sc = ifp->if_softc; } - /* Todo: Need to add additional controllers such as 5906 & 5787F */ - /* The 590x chips are 10/100 only. */ - if (bge_sc && - pci_get_vendor(bge_sc->bge_dev) == BCOM_VENDORID && - (pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901A2 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906M)) { - ma->mii_capmask &= ~BMSR_EXTSTAT; - } - brgphy_reset(sc); /* Read the PHY's capabilities. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 15:15:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6548C106566B; Sun, 14 Nov 2010 15:15:51 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 68B998FC1C; Sun, 14 Nov 2010 15:15:50 +0000 (UTC) Received: by fxm19 with SMTP id 19so3378946fxm.13 for ; Sun, 14 Nov 2010 07:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :x-comment-to:date:in-reply-to:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=x7rw1cA56HtZ4bWyPPPDCLnFTfbLVE1n9C63w8H5L2I=; b=c1vggxsxZYuHR3cnOwrrAnfv4/+s761zfOm4LJyo4ByZ38nuprgUZ9KdXAub4xVEHO Vryc/ZzkZIIiIMQB8AqKsCRlyD00g3/hmWSvEfjZvFJr7XcYkGAWh0hIGsslLL7dg1m+ 460/pM2s06FtFUAly21R7AWgq0EvGLVXIv6ug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; b=QdwJNePeor2lPm8hgnKJ4aJjzgYkipN2wFA22Kdzl8+f/GtoCBosHGDpQ4/N9BaqvJ 5EAORfcIyG3RBIqmy+mia5PfgrIqcY0IxIIbCorSII1C/yfYy2o1G/htiLsoVYsRtz7B AKXk1QrkDrzeBK5IfguJreJsrkr4TsFem4Vao= Received: by 10.223.72.14 with SMTP id k14mr3677052faj.45.1289747749161; Sun, 14 Nov 2010 07:15:49 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id b15sm592297fah.4.2010.11.14.07.15.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 07:15:47 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> X-Comment-To: Lawrence Stewart Date: Sun, 14 Nov 2010 17:15:44 +0200 In-Reply-To: <4CDF3A58.6080505@freebsd.org> (Lawrence Stewart's message of "Sun, 14 Nov 2010 12:24:40 +1100") Message-ID: <86pqu8q6lb.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 15:15:51 -0000 On Sun, 14 Nov 2010 12:24:40 +1100 Lawrence Stewart wrote: LS> On 11/13/10 20:40, Mikolaj Golub wrote: >> >> On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: >> >> LS> Author: lstewart >> LS> Date: Fri Nov 12 06:41:55 2010 >> LS> New Revision: 215166 >> LS> URL: http://svn.freebsd.org/changeset/base/215166 >> >> LS> Log: >> LS> This commit marks the first formal contribution of the "Five New TCP Congestion >> LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details >> LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ >> >> It looks like the code needs improvement to work with VIMAGE :-) >> >> options VIMAGE >> >> jail -i -c vnet persist path=/ >> >> panic: lock "cc_list" 0xc101c418 already initialized >> >> #0 doadump () at pcpu.h:231 >> #1 0xc04f26b9 in db_fncall (dummy1=-1064234614, dummy2=0, dummy3=-1, >> dummy4=0xca54b688 "\234¶TÊ") at /usr/src/sys/ddb/db_command.c:548 >> #2 0xc04f2aef in db_command (last_cmdp=0xc0e7957c, cmd_table=0x0, dopager=0) >> at /usr/src/sys/ddb/db_command.c:445 >> #3 0xc04f2ba4 in db_command_script (command=0xc0e7a484 "call doadump") >> at /usr/src/sys/ddb/db_command.c:516 >> #4 0xc04f6df0 in db_script_exec (scriptname=0xca54b794 "kdb.enter.panic", warnifnotfound=Variable "warnifnotfound" is not available.) >> at /usr/src/sys/ddb/db_script.c:302 >> #5 0xc04f6ed7 in db_script_kdbenter (eventname=0xc0d2410e "panic") >> at /usr/src/sys/ddb/db_script.c:324 >> #6 0xc04f4b28 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:228 >> #7 0xc0910fbe in kdb_trap (type=3, code=0, tf=0xca54b918) at /usr/src/sys/kern/subr_kdb.c:546 >> #8 0xc0c3d7c6 in trap (frame=0xca54b918) at /usr/src/sys/i386/i386/trap.c:732 >> #9 0xc0c2647c in calltrap () at /usr/src/sys/i386/i386/exception.s:168 >> #10 0xc091118a in kdb_enter (why=0xc0d2410e "panic", msg=0xc0d2410e "panic") at cpufunc.h:71 >> #11 0xc08dcd14 in panic (fmt=0xc0d27986 "lock \"%s\" %p already initialized") >> at /usr/src/sys/kern/kern_shutdown.c:574 >> #12 0xc0911bd4 in lock_init (lock=0xc147b204, class=0xc0e23a00, name=0xc0d3f215 "cc_list", >> type=0x0, flags=2228224) at /usr/src/sys/kern/subr_lock.c:81 >> #13 0xc08daf5d in rw_init_flags (rw=0xc101c418, name=0xc0d3f215 "cc_list", opts=0) >> at /usr/src/sys/kern/kern_rwlock.c:195 >> #14 0xc0a0d0c2 in cc_init () at /usr/src/sys/netinet/cc/cc.c:182 >> #15 0xc0a7a4fd in tcp_init () at /usr/src/sys/netinet/tcp_subr.c:281 >> #16 0xc0940e59 in protosw_init (pr=0x0) at /usr/src/sys/kern/uipc_domain.c:157 >> #17 0xc0940e87 in domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:174 >> #18 0xc0940ee1 in vnet_domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:190 >> #19 0xc09adb2e in vnet_sysinit () at /usr/src/sys/net/vnet.c:625 >> #20 0xc09ae1ef in vnet_alloc () at /usr/src/sys/net/vnet.c:254 >> #21 0xc08ba41a in kern_jail_set (td=0xc306d870, optuio=0xc2d66a80, flags=0) >> at /usr/src/sys/kern/kern_jail.c:1244 >> #22 0xc08bbd00 in jail_set (td=0xc306d870, uap=0xca54bcec) at /usr/src/sys/kern/kern_jail.c:489 >> #23 0xc091e903 in syscallenter (td=0xc306d870, sa=0xca54bce4) >> at /usr/src/sys/kern/subr_trap.c:318 >> #24 0xc0c3cebf in syscall (frame=0xca54bd28) at /usr/src/sys/i386/i386/trap.c:1095 >> #25 0xc0c26511 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:266 >> #26 0x00000033 in ?? () >> LS> Would you mind testing the following patch? It fixes the panic for me. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch With this patch the system hangs during the boot. Ctr-Alt-Esc to break into ddb does not work. I am trying this under VirtualBox. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 15:32:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B15A106564A; Sun, 14 Nov 2010 15:32:00 +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 3E4418FC15; Sun, 14 Nov 2010 15:32: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 oAEFW0jm085943; Sun, 14 Nov 2010 15:32:00 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEFW0VK085939; Sun, 14 Nov 2010 15:32:00 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141532.oAEFW0VK085939@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 15:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215303 - in head/bin/sh: . bltin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 15:32:00 -0000 Author: jilles Date: Sun Nov 14 15:31:59 2010 New Revision: 215303 URL: http://svn.freebsd.org/changeset/base/215303 Log: sh: Add binary buffered output for use by the printf builtin. Modified: head/bin/sh/bltin/bltin.h head/bin/sh/output.c head/bin/sh/output.h Modified: head/bin/sh/bltin/bltin.h ============================================================================== --- head/bin/sh/bltin/bltin.h Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/bltin/bltin.h Sun Nov 14 15:31:59 2010 (r215303) @@ -54,6 +54,7 @@ #define putchar(c) out1c(c) #define fprintf outfmt #define fputs outstr +#define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) #define warnx1(a, b, c) { \ Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/output.c Sun Nov 14 15:31:59 2010 (r215303) @@ -122,8 +122,7 @@ out2qstr(const char *p) void outstr(const char *p, struct output *file) { - while (*p) - outc(*p++, file); + outbin(p, strlen(p), file); } /* Like outstr(), but quote for re-input into the shell. */ @@ -165,6 +164,16 @@ outqstr(const char *p, struct output *fi outc('\'', file); } +void +outbin(const void *data, size_t len, struct output *file) +{ + const char *p; + + p = data; + while (len-- > 0) + outc(*p++, file); +} + static char out_junk[16]; void @@ -285,17 +294,11 @@ static int doformat_wr(void *cookie, const char *buf, int len) { struct output *o; - int origlen; - unsigned char c; o = (struct output *)cookie; - origlen = len; - while (len-- != 0) { - c = (unsigned char)*buf++; - outc(c, o); - } + outbin(buf, len, o); - return (origlen); + return (len); } void Modified: head/bin/sh/output.h ============================================================================== --- head/bin/sh/output.h Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/output.h Sun Nov 14 15:31:59 2010 (r215303) @@ -36,6 +36,7 @@ #ifndef OUTPUT_INCL #include +#include struct output { char *nextc; @@ -59,6 +60,7 @@ void out2str(const char *); void out2qstr(const char *); void outstr(const char *, struct output *); void outqstr(const char *, struct output *); +void outbin(const void *, size_t, struct output *); void emptyoutbuf(struct output *); void flushall(void); void flushout(struct output *); From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 16:10:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2E11065670; Sun, 14 Nov 2010 16:10:15 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 590388FC0C; Sun, 14 Nov 2010 16:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEGAFOE086790; Sun, 14 Nov 2010 16:10:15 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEGAFK8086784; Sun, 14 Nov 2010 16:10:15 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141610.oAEGAFK8086784@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 16:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215304 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 16:10:15 -0000 Author: brucec Date: Sun Nov 14 16:10:15 2010 New Revision: 215304 URL: http://svn.freebsd.org/changeset/base/215304 Log: Fix some more style(9) issues. Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_subr.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/kern_proc.c Sun Nov 14 16:10:15 2010 (r215304) @@ -145,7 +145,7 @@ uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, - "Kernel stack size in pages"); + "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/kern_tc.c Sun Nov 14 16:10:15 2010 (r215304) @@ -770,7 +770,7 @@ pps_event(struct pps_state *pps, int eve static int tc_tick; SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, - "Approximate number of hardclock ticks in a millisecond"); + "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/subr_clock.c Sun Nov 14 16:10:15 2010 (r215304) @@ -61,7 +61,7 @@ int tz_dsttime; * kern. */ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) @@ -74,8 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", - "Local offset from UTC in seconds"); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", + "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/vfs_cache.c Sun Nov 14 16:10:15 2010 (r215304) @@ -184,43 +184,43 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0, - sizeof(struct namecache), "sizeof(struct namecache)"); + sizeof(struct namecache), "sizeof(struct namecache)"); /* * The new name cache statistics */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, - "Name cache statistics"); + "Name cache statistics"); #define STATNODE(mode, name, var, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, - "Number of cache lookups"); + "Number of cache lookups"); static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, - "Number of '.' hits"); + "Number of '.' hits"); static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, - "Number of '..' hits"); + "Number of '..' hits"); static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, - "Number of checks in lookup"); + "Number of checks in lookup"); static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, - "Number of cache misses"); + "Number of cache misses"); static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, - "Number of cache misses we do not want to cache"); + "Number of cache misses we do not want to cache"); static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, - "Number of cache hits (positive) we do not want to cache"); + "Number of cache hits (positive) we do not want to cache"); static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, - "Number of cache hits (positive)"); + "Number of cache hits (positive)"); static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, - "Number of cache hits (negative) we do not want to cache"); + "Number of cache hits (negative) we do not want to cache"); static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, - "Number of cache hits (negative)"); + "Number of cache hits (negative)"); static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, - "Number of updates of the cache after lookup (write lock + retry)"); + "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, - &nchstats, sizeof(nchstats), "LU", - "VFS cache effectiveness statistics"); + &nchstats, sizeof(nchstats), "LU", + "VFS cache effectiveness statistics"); @@ -272,8 +272,8 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, CTLTYPE_INT|CTLFLAG_RD| - CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", - "nchash chain lengths"); + CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", + "nchash chain lengths"); static int sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) @@ -321,8 +321,8 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| - CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", - "nchash chain lengths"); + CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", + "nchash chain lengths"); #endif /* @@ -989,13 +989,13 @@ kern___getcwd(struct thread *td, u_char static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, - "Disable the vn_fullpath function"); + "Disable the vn_fullpath function"); /* These count for kern___getcwd(), too. */ STATNODE(numfullpathcalls, "Number of fullpath search calls"); STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE(numfullpathfail2, - "Number of fullpath search errors (VOP_VPTOCNP failures)"); + "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE(numfullpathfound, "Number of successful fullpath calls"); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/vfs_subr.c Sun Nov 14 16:10:15 2010 (r215304) @@ -122,7 +122,7 @@ static void destroy_vpollinfo(struct vpo static unsigned long numvnodes; SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, - "Number of vnodes in existence"); + "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -152,7 +152,7 @@ SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnod /* Number of vnodes in the free list. */ static u_long freevnodes; SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, - "Number of vnodes in the free list"); + "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -165,7 +165,7 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca */ static int reassignbufcalls; SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, - "Number of calls to reassignbuf"); + "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -241,17 +241,17 @@ static int syncer_maxdelay = SYNCER_MAXD static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, - "Time to delay syncing files (in seconds)"); + "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, - "Time to delay syncing directories (in seconds)"); + "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, - "Time to delay syncing metadata (in seconds)"); + "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, - "Number of times I/O speeded up (rush requests)"); + "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -552,8 +552,8 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " - "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " - "3+: sec + ns (max. precision))"); + "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " + "3+: sec + ns (max. precision))"); /* * Get a current timestamp. @@ -3027,7 +3027,7 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) } static SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD | CTLFLAG_SKIP, - vfs_sysctl, "Generic filesystem"); + vfs_sysctl, "Generic filesystem"); #if 1 || defined(COMPAT_PRELITE2) @@ -3148,7 +3148,7 @@ sysctl_vnode(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_VNODE, vnode, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_vnode, "S,xvnode", ""); + 0, 0, sysctl_vnode, "S,xvnode", ""); #endif /* @@ -3721,17 +3721,21 @@ extattr_check_cred(struct vnode *vp, int (vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "Drop into debugger on lock violation"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, + "Drop into debugger on lock violation"); int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, "Check for interlock across VOPs"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, + 0, "Check for interlock across VOPs"); int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, "Print lock violations"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, + 0, "Print lock violations"); #ifdef KDB int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, + &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); #endif static void From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 16:18:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B7EF106564A; Sun, 14 Nov 2010 16:18:13 +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 DE3438FC15; Sun, 14 Nov 2010 16:18:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAEGCruv095209; Sun, 14 Nov 2010 09:12:53 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CE00A85.8020000@bsdimp.com> Date: Sun, 14 Nov 2010 09:12:53 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201011132238.oADMcXU1062375@svn.freebsd.org> <20101114104301.GB64243@acme.spoerlein.net> In-Reply-To: <20101114104301.GB64243@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r215271 - 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: Sun, 14 Nov 2010 16:18:13 -0000 On 11/14/2010 03:43, Ulrich Spörlein wrote: > On Sat, 13.11.2010 at 22:38:33 +0000, Warner Losh wrote: >> Author: imp >> Date: Sat Nov 13 22:38:33 2010 >> New Revision: 215271 >> URL: http://svn.freebsd.org/changeset/base/215271 >> >> Log: >> Add mips back to universe >> >> Modified: >> head/Makefile >> >> Modified: head/Makefile >> ============================================================================== >> --- head/Makefile Sat Nov 13 22:34:12 2010 (r215270) >> +++ head/Makefile Sat Nov 13 22:38:33 2010 (r215271) >> @@ -281,7 +281,7 @@ tinderbox: >> # existing system is. >> # >> .if make(universe) || make(universe_kernels) || make(tinderbox) >> -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v >> +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips > Can we have that sorted, please? I'm sure it was sorted before ... > > -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips > +TARGETS?=amd64 i386 ia64 mips pc98 powerpc sparc64 sun4v I'll sort it when I'm 100% it works for everybody and that I don't have any uncommitted changes in my test tree. My first run suggests it works, but the test in my pristine loopback tree are still running. Warner From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 16:44:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 643A0106566B; Sun, 14 Nov 2010 16:44:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52ADC8FC23; Sun, 14 Nov 2010 16:44: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 oAEGiIng087631; Sun, 14 Nov 2010 16:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEGiIi5087629; Sun, 14 Nov 2010 16:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011141644.oAEGiIi5087629@svn.freebsd.org> From: Michael Tuexen Date: Sun, 14 Nov 2010 16:44: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: r215305 - 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: Sun, 14 Nov 2010 16:44:18 -0000 Author: tuexen Date: Sun Nov 14 16:44:18 2010 New Revision: 215305 URL: http://svn.freebsd.org/changeset/base/215305 Log: Take out special code for disable CRC computations on the loopback interface for IPv6. It will be handled by the loopback interface. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Nov 14 16:10:15 2010 (r215304) +++ head/sys/netinet/sctp_output.c Sun Nov 14 16:44:18 2010 (r215305) @@ -4069,15 +4069,9 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && - (stcb) && - (stcb->asoc.loopback_scope))) { - m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; - SCTP_STAT_INCR(sctps_sendhwcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); #endif } /* send it out. table id is taken from stcb */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 17:24:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C87D21065673; Sun, 14 Nov 2010 17:24:15 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C7DF8FC19; Sun, 14 Nov 2010 17:24:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEHOFbp088455; Sun, 14 Nov 2010 17:24:15 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEHOFY8088453; Sun, 14 Nov 2010 17:24:15 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141724.oAEHOFY8088453@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 17:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 17:24:15 -0000 Author: brucec Date: Sun Nov 14 17:24:15 2010 New Revision: 215306 URL: http://svn.freebsd.org/changeset/base/215306 Log: libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc. liblwres.so.10 has been replaced by liblwres.so.50. Reported by: arundel Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 16:44:18 2010 (r215305) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 17:24:15 2010 (r215306) @@ -162,7 +162,7 @@ OLD_FILES+=usr/include/lwres/platform.h OLD_DIRS+=usr/include/lwres OLD_FILES+=usr/lib/liblwres.a OLD_FILES+=usr/lib/liblwres_p.a -OLD_LIBS+=usr/lib/liblwres.so.10 +OLD_LIBS+=usr/lib/liblwres.so.50 OLD_FILES+=usr/lib/liblwres.so OLD_FILES+=usr/sbin/named OLD_FILES+=usr/sbin/lwresd @@ -288,7 +288,7 @@ OLD_FILES+=usr/share/man/man3/lwres_getn OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz OLD_FILES+=usr/share/man/man5/named.conf.5.gz OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz -OLD_FILES+=usr/share/man/man8/nsupdate.8.gz +OLD_FILES+=usr/share/man/man1/nsupdate.1.gz OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz OLD_FILES+=usr/share/man/man8/named.8.gz @@ -1839,7 +1839,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a OLD_FILES+=usr/lib/libalias_smedia_p.a OLD_FILES+=usr/lib/libarchive_p.a OLD_FILES+=usr/lib/libasn1_p.a -OLD_FILES+=usr/lib/libatm_p.a OLD_FILES+=usr/lib/libbegemot_p.a OLD_FILES+=usr/lib/libbluetooth_p.a OLD_FILES+=usr/lib/libbsdxml_p.a @@ -1880,7 +1879,6 @@ OLD_FILES+=usr/lib/libjail_p.a OLD_FILES+=usr/lib/libkadm5clnt_p.a OLD_FILES+=usr/lib/libkadm5srv_p.a OLD_FILES+=usr/lib/libkafs5_p.a -OLD_FILES+=usr/lib/libkeycap_p.a OLD_FILES+=usr/lib/libkiconv_p.a OLD_FILES+=usr/lib/libkrb5_p.a OLD_FILES+=usr/lib/libkvm_p.a @@ -1895,7 +1893,6 @@ OLD_FILES+=usr/lib/libmenu_p.a OLD_FILES+=usr/lib/libmenuw_p.a OLD_FILES+=usr/lib/libmilter_p.a OLD_FILES+=usr/lib/libmp_p.a -OLD_FILES+=usr/lib/libmytinfo_p.a OLD_FILES+=usr/lib/libncp_p.a OLD_FILES+=usr/lib/libncurses_p.a OLD_FILES+=usr/lib/libncursesw_p.a From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 17:53:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C43731065673; Sun, 14 Nov 2010 17:53:14 +0000 (UTC) Date: Sun, 14 Nov 2010 17:53:14 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114175314.GA72802@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011141724.oAEHOFY8088453@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 17:53:14 -0000 On Sun Nov 14 10, Bruce Cran wrote: > Author: brucec > Date: Sun Nov 14 17:24:15 2010 > New Revision: 215306 > URL: http://svn.freebsd.org/changeset/base/215306 > > Log: > libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc. > liblwres.so.10 has been replaced by liblwres.so.50. thanks. :) ...also usr/share/man/man8/nsupdate.8.gz was moved to usr/share/man/man1/nsupdate.1.gz in bind 9.4.3. that's why the entry in OptionalObsoleteFiles.inc was changed. while you're at it, could you add the following after MK_BOOT? #.if ${MK_BSNMP} == no # to be filled in #.endif i'll try to run two buildworld instances two see which files are being affected by WITHOUT_BSNMP. cheers. alex > > Reported by: arundel > > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 16:44:18 2010 (r215305) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 17:24:15 2010 (r215306) > @@ -162,7 +162,7 @@ OLD_FILES+=usr/include/lwres/platform.h > OLD_DIRS+=usr/include/lwres > OLD_FILES+=usr/lib/liblwres.a > OLD_FILES+=usr/lib/liblwres_p.a > -OLD_LIBS+=usr/lib/liblwres.so.10 > +OLD_LIBS+=usr/lib/liblwres.so.50 > OLD_FILES+=usr/lib/liblwres.so > OLD_FILES+=usr/sbin/named > OLD_FILES+=usr/sbin/lwresd > @@ -288,7 +288,7 @@ OLD_FILES+=usr/share/man/man3/lwres_getn > OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz > OLD_FILES+=usr/share/man/man5/named.conf.5.gz > OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz > -OLD_FILES+=usr/share/man/man8/nsupdate.8.gz > +OLD_FILES+=usr/share/man/man1/nsupdate.1.gz > OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz > OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz > OLD_FILES+=usr/share/man/man8/named.8.gz > @@ -1839,7 +1839,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a > OLD_FILES+=usr/lib/libalias_smedia_p.a > OLD_FILES+=usr/lib/libarchive_p.a > OLD_FILES+=usr/lib/libasn1_p.a > -OLD_FILES+=usr/lib/libatm_p.a > OLD_FILES+=usr/lib/libbegemot_p.a > OLD_FILES+=usr/lib/libbluetooth_p.a > OLD_FILES+=usr/lib/libbsdxml_p.a > @@ -1880,7 +1879,6 @@ OLD_FILES+=usr/lib/libjail_p.a > OLD_FILES+=usr/lib/libkadm5clnt_p.a > OLD_FILES+=usr/lib/libkadm5srv_p.a > OLD_FILES+=usr/lib/libkafs5_p.a > -OLD_FILES+=usr/lib/libkeycap_p.a > OLD_FILES+=usr/lib/libkiconv_p.a > OLD_FILES+=usr/lib/libkrb5_p.a > OLD_FILES+=usr/lib/libkvm_p.a > @@ -1895,7 +1893,6 @@ OLD_FILES+=usr/lib/libmenu_p.a > OLD_FILES+=usr/lib/libmenuw_p.a > OLD_FILES+=usr/lib/libmilter_p.a > OLD_FILES+=usr/lib/libmp_p.a > -OLD_FILES+=usr/lib/libmytinfo_p.a > OLD_FILES+=usr/lib/libncp_p.a > OLD_FILES+=usr/lib/libncurses_p.a > OLD_FILES+=usr/lib/libncursesw_p.a -- a13x From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 17:53:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77D21065673; Sun, 14 Nov 2010 17:53:52 +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 7BE308FC18; Sun, 14 Nov 2010 17:53: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 oAEHrqTm089024; Sun, 14 Nov 2010 17:53:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEHrqYr089022; Sun, 14 Nov 2010 17:53:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011141753.oAEHrqYr089022@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 17:53: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: r215307 - 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: Sun, 14 Nov 2010 17:53:52 -0000 Author: kib Date: Sun Nov 14 17:53:52 2010 New Revision: 215307 URL: http://svn.freebsd.org/changeset/base/215307 Log: Implement a (soft) stack guard page for auto-growing stack mappings. The unmapped page separates the tip of the stack and possible adjanced segment, making some uses of stack overflow harder. The stack growing code refuses to expand the segment to the last page of the reseved region when sysctl security.bsd.stack_guard_page is set to 1. The default value for sysctl and accompanying tunable is 0. Please note that mmap(MAP_FIXED) still can place a mapping right up to the stack, making continuous region. Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Nov 14 17:24:15 2010 (r215306) +++ head/sys/vm/vm_map.c Sun Nov 14 17:53:52 2010 (r215307) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -3216,6 +3218,12 @@ vm_map_stack(vm_map_t map, vm_offset_t a return (rv); } +static int stack_guard_page = 0; +TUNABLE_INT("security.bsd.stack_guard_page", &stack_guard_page); +SYSCTL_INT(_security_bsd, OID_AUTO, stack_guard_page, CTLFLAG_RW, + &stack_guard_page, 0, + "Insert stack guard page ahead of the growable segments."); + /* Attempts to grow a vm stack entry. Returns KERN_SUCCESS if the * desired address is already mapped, or if we successfully grow * the stack. Also returns KERN_SUCCESS if addr is outside the @@ -3312,7 +3320,7 @@ Retry: * This also effectively destroys any guard page the user might have * intended by limiting the stack size. */ - if (grow_amount > max_grow) { + if (grow_amount + (stack_guard_page ? PAGE_SIZE : 0) > max_grow) { if (vm_map_lock_upgrade(map)) goto Retry; @@ -3365,6 +3373,8 @@ Retry: if (addr < end) { stack_entry->avail_ssize = max_grow; addr = end; + if (stack_guard_page) + addr += PAGE_SIZE; } rv = vm_map_insert(map, NULL, 0, addr, stack_entry->start, @@ -3397,6 +3407,8 @@ Retry: if (addr > end) { stack_entry->avail_ssize = end - stack_entry->end; addr = end; + if (stack_guard_page) + addr -= PAGE_SIZE; } grow_amount = addr - stack_entry->end; From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 18:05:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602211065694; Sun, 14 Nov 2010 18:05:03 +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 4B36C8FC15; Sun, 14 Nov 2010 18:05: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 oAEI53de089333; Sun, 14 Nov 2010 18:05:03 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEI53c3089331; Sun, 14 Nov 2010 18:05:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201011141805.oAEI53c3089331@svn.freebsd.org> From: Ed Maste Date: Sun, 14 Nov 2010 18:05: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: r215308 - 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: Sun, 14 Nov 2010 18:05:03 -0000 Author: emaste Date: Sun Nov 14 18:05:03 2010 New Revision: 215308 URL: http://svn.freebsd.org/changeset/base/215308 Log: Update comment to reflect the removal of libc_r from the tree. Submitted by: Alexander Best arundel@ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Nov 14 17:53:52 2010 (r215307) +++ head/ObsoleteFiles.inc Sun Nov 14 18:05:03 2010 (r215308) @@ -5086,7 +5086,7 @@ OLD_LIBS+=usr/lib/libthr.so.2 .endif # 20060127: revert libdisk to static-only OLD_LIBS+=usr/lib/libdisk.so.3 -# 20051027: libc_r discontinued +# 20051027: libc_r discontinued (removed 20101113) OLD_LIBS+=usr/lib/libc_r.a OLD_LIBS+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 18:24:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E94E9106564A; Sun, 14 Nov 2010 18:24:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1718FC17; Sun, 14 Nov 2010 18:24: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 oAEIOCfw089925; Sun, 14 Nov 2010 18:24:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEIOCtN089920; Sun, 14 Nov 2010 18:24:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011141824.oAEIOCtN089920@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 18:24: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: r215309 - in head/sys: amd64/amd64 i386/i386 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: Sun, 14 Nov 2010 18:24:13 -0000 Author: kib Date: Sun Nov 14 18:24:12 2010 New Revision: 215309 URL: http://svn.freebsd.org/changeset/base/215309 Log: Use symbolic names instead of hardcoding values for magic p_osrel constants. MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/sys/param.h head/sys/vm/vm_mmap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/amd64/amd64/trap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -415,9 +415,9 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= + __FreeBSD_version_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/i386/i386/trap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -461,9 +461,9 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= + __FreeBSD_version_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) @@ -60,6 +60,11 @@ #undef __FreeBSD_version #define __FreeBSD_version 900025 /* Master, propagated to newvers */ +#ifdef _KERNEL +#define __FreeBSD_version_SIGSEGV 700004 +#define __FreeBSD_version_MAP_ANON 800104 +#endif + #ifndef LOCORE #include #endif Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/vm/vm_mmap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -232,7 +232,7 @@ mmap(td, uap) /* Make sure mapping fits into numeric range, etc. */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= 800104) || + curproc->p_osrel >= __FreeBSD_version_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 18:42:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7EC1065670; Sun, 14 Nov 2010 18:42:39 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DAA38FC0C; Sun, 14 Nov 2010 18:42: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 oAEIgdXd090363; Sun, 14 Nov 2010 18:42:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEIgdqL090361; Sun, 14 Nov 2010 18:42:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201011141842.oAEIgdqL090361@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Nov 2010 18:42: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: r215310 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 18:42:39 -0000 Author: ed Date: Sun Nov 14 18:42:39 2010 New Revision: 215310 URL: http://svn.freebsd.org/changeset/base/215310 Log: Always set errno to a sane value when pututxline(3) fails. For example, it will now return ESRCH when trying to replace a nonexistent entry with DEAD_PROCESS. Modified: head/lib/libc/gen/pututxline.c Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sun Nov 14 18:24:12 2010 (r215309) +++ head/lib/libc/gen/pututxline.c Sun Nov 14 18:42:39 2010 (r215310) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ futx_open(const char *file) /* Safety check: never use broken files. */ if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { _close(fd); + errno = EINVAL; return (NULL); } @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) } fclose(fp); + errno = ESRCH; return (1); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:05:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 219B11065673; Sun, 14 Nov 2010 19:05:28 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id AF3B48FC1A; Sun, 14 Nov 2010 19:05:27 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 03ABBE6095; Sun, 14 Nov 2010 19:05:27 +0000 (GMT) Received: from core.nessbank (client-86-27-19-226.glfd.adsl.virginmedia.com [86.27.19.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sun, 14 Nov 2010 19:05:26 +0000 (GMT) From: Bruce Cran To: Alexander Best Date: Sun, 14 Nov 2010 19:05:25 +0000 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.2; amd64; ; ) References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> In-Reply-To: <20101114175314.GA72802@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011141905.25634.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:05:28 -0000 On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > while you're at it, could you add the following after MK_BOOT? > > #.if ${MK_BSNMP} == no > # to be filled in > #.endif > > i'll try to run two buildworld instances two see which files are being > affected by WITHOUT_BSNMP. It might make more sense to just leave it until we know which files to remove. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:28:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3CA5F1065679; Sun, 14 Nov 2010 19:28:21 +0000 (UTC) Date: Sun, 14 Nov 2010 19:28:21 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114192821.GA83707@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> <201011141905.25634.bruce@cran.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011141905.25634.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:28:21 -0000 On Sun Nov 14 10, Bruce Cran wrote: > On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > > > while you're at it, could you add the following after MK_BOOT? > > > > #.if ${MK_BSNMP} == no > > # to be filled in > > #.endif > > > > i'll try to run two buildworld instances two see which files are being > > affected by WITHOUT_BSNMP. > > It might make more sense to just leave it until we know which files to remove. you're right. a lot of options need imporovement actually. i'll get back to you on that one. ;) however the following should take care of *_GPIO: .if ${MK_GPIO} == no OLD_FILES+=usr/sbin/gpioctl OLD_FILES+=usr/share/man/man8/gpioctl.8.gz .endif along with src.conf needing regeneration. cheers. alex > > -- > Bruce Cran -- a13x From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:36:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C542E106566B; Sun, 14 Nov 2010 19:36: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 B35ED8FC19; Sun, 14 Nov 2010 19:36: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 oAEJatGF091546; Sun, 14 Nov 2010 19:36:55 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJatBn091543; Sun, 14 Nov 2010 19:36:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141936.oAEJatBn091543@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 19:36: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: r215311 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:36:55 -0000 Author: jilles Date: Sun Nov 14 19:36:55 2010 New Revision: 215311 URL: http://svn.freebsd.org/changeset/base/215311 Log: MFC r213775: sh: Make DEBUG traces 64-bit clean: - Use %t to print ptrdiff_t values. - Cast a ptrdiff_t value explicitly to int for a field width specifier. While here, sort includes. Original commit by jhb. Modified: stable/8/bin/sh/expand.c stable/8/bin/sh/jobs.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Sun Nov 14 18:42:39 2010 (r215310) +++ stable/8/bin/sh/expand.c Sun Nov 14 19:36:55 2010 (r215311) @@ -43,14 +43,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include -#include +#include +#include #include +#include #include +#include #include +#include /* * Routines to expand arguments to commands. We have to deal with @@ -491,9 +492,9 @@ expbackq(union node *cmd, int quoted, in exitstatus = waitforjob(in.jp, (int *)NULL); if (quoted == 0) recordregion(startloc, dest - stackblock(), 0); - TRACE(("evalbackq: size=%d: \"%.*s\"\n", - (dest - stackblock()) - startloc, - (dest - stackblock()) - startloc, + TRACE(("expbackq: size=%td: \"%.*s\"\n", + ((dest - stackblock()) - startloc), + (int)((dest - stackblock()) - startloc), stackblock() + startloc)); expdest = dest; INTON; Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Sun Nov 14 18:42:39 2010 (r215310) +++ stable/8/bin/sh/jobs.c Sun Nov 14 19:36:55 2010 (r215311) @@ -38,18 +38,18 @@ static char sccsid[] = "@(#)jobs.c 8.5 ( #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include -#include +#include #include -#include -#include #include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include #include "shell.h" #if JOBS @@ -653,7 +653,7 @@ makejob(union node *node __unused, int n jp->ps = &jp->ps0; } INTON; - TRACE(("makejob(%p, %d) returns %%%d\n", (void *)node, nprocs, + TRACE(("makejob(%p, %d) returns %%%td\n", (void *)node, nprocs, jp - jobtab + 1)); return jp; } @@ -739,7 +739,7 @@ forkshell(struct job *jp, union node *n, pid_t pid; pid_t pgrp; - TRACE(("forkshell(%%%d, %p, %d) called\n", jp - jobtab, (void *)n, + TRACE(("forkshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n, mode)); INTOFF; flushall(); @@ -868,7 +868,7 @@ waitforjob(struct job *jp, int *origstat int st; INTOFF; - TRACE(("waitforjob(%%%d) called\n", jp - jobtab + 1)); + TRACE(("waitforjob(%%%td) called\n", jp - jobtab + 1)); while (jp->state == 0) if (dowait(1, jp) == -1) dotrap(); @@ -969,7 +969,7 @@ dowait(int block, struct job *job) if (stopped) { /* stopped or done */ int state = done? JOBDONE : JOBSTOPPED; if (jp->state != state) { - TRACE(("Job %d: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state)); + TRACE(("Job %td: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state)); jp->state = state; #if JOBS if (done) From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:37:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F5031065670; Sun, 14 Nov 2010 19:37:08 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2F98FC19; Sun, 14 Nov 2010 19:37: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 oAEJb7FM091590; Sun, 14 Nov 2010 19:37:07 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJb7jg091588; Sun, 14 Nov 2010 19:37:07 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141937.oAEJb7jg091588@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 19:37: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: r215312 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:37:08 -0000 Author: brucec Date: Sun Nov 14 19:37:07 2010 New Revision: 215312 URL: http://svn.freebsd.org/changeset/base/215312 Log: lib32 is installed on powerpc64 too. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 19:36:55 2010 (r215311) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 19:37:07 2010 (r215312) @@ -101,7 +101,7 @@ OLD_LIBS+=usr/lib/libngatm.so.4 OLD_FILES+=usr/lib/libngatm_p.a OLD_FILES+=usr/lib/snmp_atm.so OLD_LIBS+=usr/lib/snmp_atm.so.6 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libngatm.a OLD_FILES+=usr/lib32/libngatm.so OLD_LIBS+=usr/lib32/libngatm.so.4 @@ -368,7 +368,7 @@ OLD_FILES+=usr/lib/libsdp.a OLD_FILES+=usr/lib/libsdp.so OLD_LIBS+=usr/lib/libsdp.so.4 OLD_FILES+=usr/lib/libsdp_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libbluetooth.a OLD_FILES+=usr/lib32/libbluetooth.so OLD_LIBS+=usr/lib32/libbluetooth.so.4 @@ -561,7 +561,7 @@ OLD_FILES+=usr/lib/libumem_p.a OLD_FILES+=usr/lib/libuutil.a OLD_FILES+=usr/lib/libuutil.so OLD_FILES+=usr/lib/libuutil_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/dtrace/drti.o OLD_FILES+=usr/lib32/libavl.a OLD_FILES+=usr/lib32/libavl.so @@ -612,7 +612,7 @@ OLD_FILES+=usr/lib/libzfs.so OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzpool.a OLD_FILES+=usr/lib/libzpool.so -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libzfs.a OLD_FILES+=usr/lib32/libzfs.so OLD_LIBS+=usr/lib32/libzfs.so.2 @@ -800,7 +800,7 @@ OLD_FILES+=usr/lib/libgpib.a OLD_FILES+=usr/lib/libgpib.so OLD_LIBS+=usr/lib/libgpib.so.3 OLD_FILES+=usr/lib/libgpib_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libgpib.a OLD_FILES+=usr/lib32/libgpib.so OLD_LIBS+=usr/lib32/libgpib.so.3 @@ -816,7 +816,7 @@ OLD_FILES+=usr/lib/libgssapi_p.a OLD_FILES+=usr/lib/librpcsec_gss.a OLD_FILES+=usr/lib/librpcsec_gss.so OLD_LIBS+=usr/lib/librpcsec_gss.so.1 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libgssapi.a OLD_FILES+=usr/lib32/libgssapi.so OLD_LIBS+=usr/lib32/libgssapi.so.10 @@ -1039,7 +1039,7 @@ OLD_LIBS+=lib/libipx.so.5 OLD_FILES+=usr/lib/libipx.a OLD_FILES+=usr/lib/libipx.so OLD_FILES+=usr/lib/libipx_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libipx.a OLD_FILES+=usr/lib32/libipx.so OLD_LIBS+=usr/lib32/libipx.so.5 @@ -1164,7 +1164,7 @@ OLD_FILES+=usr/lib/pam_krb5.so OLD_LIBS+=usr/lib/pam_krb5.so.5 OLD_FILES+=usr/lib/pam_ksu.so OLD_LIBS+=usr/lib/pam_ksu.so.5 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libasn1.a OLD_FILES+=usr/lib32/libasn1.so OLD_LIBS+=usr/lib32/libasn1.so.10 @@ -1626,7 +1626,7 @@ OLD_FILES+=usr/lib/libncp.a OLD_FILES+=usr/lib/libncp.so OLD_LIBS+=usr/lib/libncp.so.4 OLD_FILES+=usr/lib/libncp_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libncp.a OLD_FILES+=usr/lib32/libncp.so OLD_LIBS+=usr/lib32/libncp.so.4 @@ -2010,7 +2010,7 @@ OLD_FILES+=usr/include/libmilter/mfdef.h OLD_FILES+=usr/lib/libmilter.a OLD_LIBS+=usr/lib/libmilter.so.5 OLD_FILES+=usr/lib/libmilter_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libmilter.a OLD_LIBS+=usr/lib32/libmilter.so.5 OLD_FILES+=usr/lib32/libmilter_p.a From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:40:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E9C21065675; Sun, 14 Nov 2010 19:40:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3838FC0A; Sun, 14 Nov 2010 19:40: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 oAEJeNFx091714; Sun, 14 Nov 2010 19:40:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJeNog091712; Sun, 14 Nov 2010 19:40:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141940.oAEJeNog091712@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 19:40: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: r215313 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:40:23 -0000 Author: jilles Date: Sun Nov 14 19:40:22 2010 New Revision: 215313 URL: http://svn.freebsd.org/changeset/base/215313 Log: MFC r213925: sh: Use rather than . is only for the kernel and conflicts with . Note: there is no mergeinfo as r213925 was previously "blocked" by obrien. Modified: stable/8/bin/sh/jobs.c Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Sun Nov 14 19:37:07 2010 (r215312) +++ stable/8/bin/sh/jobs.c Sun Nov 14 19:40:22 2010 (r215313) @@ -41,13 +41,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 19:57:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85E761065673; Sun, 14 Nov 2010 19:57:56 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753A58FC13; Sun, 14 Nov 2010 19:57: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 oAEJvuYG092094; Sun, 14 Nov 2010 19:57:56 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJvu78092092; Sun, 14 Nov 2010 19:57:56 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141957.oAEJvu78092092@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 19:57: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: r215314 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:57:56 -0000 Author: brucec Date: Sun Nov 14 19:57:56 2010 New Revision: 215314 URL: http://svn.freebsd.org/changeset/base/215314 Log: ipv6_enable has been obsoleted in favour of ipv6_activate_all_interfaces. Modified: head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 19:40:22 2010 (r215313) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 19:57:56 2010 (r215314) @@ -130,7 +130,7 @@ #define VAR_INSTALL_CFG "installConfig" #define VAR_INSTALL_ROOT "installRoot" #define VAR_IPADDR "ipaddr" -#define VAR_IPV6_ENABLE "ipv6_enable" +#define VAR_IPV6_ENABLE "ipv6_activate_all_interfaces" #define VAR_IPV6ADDR "ipv6addr" #define VAR_KERN_SECURELEVEL "kern_securelevel" #define VAR_KEYMAP "keymap" From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 20:14:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C571065695; Sun, 14 Nov 2010 20:14:25 +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 B57628FC16; Sun, 14 Nov 2010 20:14: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 oAEKEPfS092490; Sun, 14 Nov 2010 20:14:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKEP7f092485; Sun, 14 Nov 2010 20:14:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142014.oAEKEP7f092485@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:14: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: r215315 - in head: lib/libkvm 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: Sun, 14 Nov 2010 20:14:25 -0000 Author: dim Date: Sun Nov 14 20:14:25 2010 New Revision: 215315 URL: http://svn.freebsd.org/changeset/base/215315 Log: Similar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.h as a macro, and use it instead of literal strings. Modified: head/lib/libkvm/kvm.c head/lib/libkvm/kvm_pcpu.c head/sys/kern/link_elf_obj.c head/sys/sys/pcpu.h Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/lib/libkvm/kvm.c Sun Nov 14 20:14:25 2010 (r215315) @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)kvm.c 8.2 (B #include #include #include +#include #include @@ -433,7 +434,7 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, if (error > 0 && _kvm_dpcpu_initialized(kd, initialize)) error = kvm_fdnlist_prefix(kd, nl, error, - "pcpu_entry_", _kvm_dpcpu_validaddr); + DPCPU_SYMPREFIX, _kvm_dpcpu_validaddr); return (error); } @@ -473,7 +474,7 @@ again: p->n_value = _kvm_vnet_validaddr(kd, lookup.symvalue); else if (_kvm_dpcpu_initialized(kd, initialize) && - !strcmp(prefix, "pcpu_entry_")) + !strcmp(prefix, DPCPU_SYMPREFIX)) p->n_value = _kvm_dpcpu_validaddr(kd, lookup.symvalue); else @@ -495,7 +496,7 @@ again: } if (error && _kvm_dpcpu_initialized(kd, initialize) && !tried_dpcpu) { tried_dpcpu = 1; - prefix = "pcpu_entry_"; + prefix = DPCPU_SYMPREFIX; goto again; } Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/lib/libkvm/kvm_pcpu.c Sun Nov 14 20:14:25 2010 (r215315) @@ -197,9 +197,9 @@ _kvm_dpcpu_init(kvm_t *kd) { struct nlist nl[] = { #define NLIST_START_SET_PCPU 0 - { "___start_set_pcpu" }, + { "___start_" DPCPU_SETNAME }, #define NLIST_STOP_SET_PCPU 1 - { "___stop_set_pcpu" }, + { "___stop_" DPCPU_SETNAME }, #define NLIST_DPCPU_OFF 2 { "_dpcpu_off" }, #define NLIST_MP_MAXCPUS 3 Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/sys/kern/link_elf_obj.c Sun Nov 14 20:14:25 2010 (r215315) @@ -336,7 +336,7 @@ link_elf_link_preload(linker_class_t cls ef->progtab[pb].name = ef->shstrtab + shdr[i].sh_name; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, "set_pcpu")) { + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { void *dpcpu; dpcpu = dpcpu_alloc(shdr[i].sh_size); @@ -757,7 +757,7 @@ link_elf_load_file(linker_class_t cls, c else ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, "set_pcpu")) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); #ifdef VIMAGE @@ -789,7 +789,7 @@ link_elf_load_file(linker_class_t cls, c } /* Initialize the per-cpu or vnet area. */ if (ef->progtab[pb].addr != (void *)mapbase && - !strcmp(ef->progtab[pb].name, "set_pcpu")) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) dpcpu_copy(ef->progtab[pb].addr, shdr[i].sh_size); #ifdef VIMAGE @@ -911,7 +911,7 @@ link_elf_unload_file(linker_file_t file) continue; if (ef->progtab[i].name == NULL) continue; - if (!strcmp(ef->progtab[i].name, "set_pcpu")) + if (!strcmp(ef->progtab[i].name, DPCPU_SETNAME)) dpcpu_free(ef->progtab[i].addr, ef->progtab[i].size); #ifdef VIMAGE Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 19:57:56 2010 (r215314) +++ head/sys/sys/pcpu.h Sun Nov 14 20:14:25 2010 (r215315) @@ -42,6 +42,9 @@ #include #include +#define DPCPU_SETNAME "set_pcpu" +#define DPCPU_SYMPREFIX "pcpu_entry_" + #ifdef _KERNEL /* @@ -72,7 +75,7 @@ extern uintptr_t dpcpu_off[]; */ #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) -#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section("set_pcpu") __used +#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used /* * Accessors with a given base. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 20:23:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13AF10656B8; Sun, 14 Nov 2010 20:23: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 807B08FC13; Sun, 14 Nov 2010 20:23: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 oAEKN28r092724; Sun, 14 Nov 2010 20:23:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKN2qB092721; Sun, 14 Nov 2010 20:23:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142023.oAEKN2qB092721@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:23: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: r215316 - in head/sys: net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:23:02 -0000 Author: dim Date: Sun Nov 14 20:23:02 2010 New Revision: 215316 URL: http://svn.freebsd.org/changeset/base/215316 Log: Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE. Modified: head/sys/net/vnet.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sun Nov 14 20:14:25 2010 (r215315) +++ head/sys/net/vnet.h Sun Nov 14 20:23:02 2010 (r215316) @@ -196,8 +196,10 @@ extern struct sx vnet_sxlock; #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) #define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used -#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \ - ((b) + (uintptr_t)&VNET_NAME(n)) +#define STATIC_VNET_DEFINE(t, n) \ + VNET_DEFINE(static t, n) +#define _VNET_PTR(b, n) \ + (__typeof(VNET_NAME(n))*)((b) + (uintptr_t)&VNET_NAME(n)) #define _VNET(b, n) (*_VNET_PTR(b, n)) @@ -371,10 +373,11 @@ do { \ * Versions of the VNET macros that compile to normal global variables and * standard sysctl definitions. */ -#define VNET_NAME(n) n -#define VNET_DECLARE(t, n) extern t n -#define VNET_DEFINE(t, n) t n -#define _VNET_PTR(b, n) &VNET_NAME(n) +#define VNET_NAME(n) n +#define VNET_DECLARE(t, n) extern t n +#define VNET_DEFINE(t, n) t n +#define STATIC_VNET_DEFINE(t, n) static t n +#define _VNET_PTR(b, n) &VNET_NAME(n) /* * Virtualized global variable accessor macros. Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 20:14:25 2010 (r215315) +++ head/sys/sys/pcpu.h Sun Nov 14 20:23:02 2010 (r215316) @@ -76,6 +76,8 @@ extern uintptr_t dpcpu_off[]; #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) #define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#define STATIC_DPCPU_DEFINE(t, n) \ + DPCPU_DEFINE(static t, n) /* * Accessors with a given base. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 20:38:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52987106564A; Sun, 14 Nov 2010 20:38:12 +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 3EC2B8FC13; Sun, 14 Nov 2010 20: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 oAEKcCX3093173; Sun, 14 Nov 2010 20:38:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKcB9M093130; Sun, 14 Nov 2010 20:38:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142038.oAEKcB9M093130@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20: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: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:38:12 -0000 Author: dim Date: Sun Nov 14 20:38:11 2010 New Revision: 215317 URL: http://svn.freebsd.org/changeset/base/215317 Log: Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/kern/sched_4bsd.c head/sys/kern/subr_pcpu.c head/sys/mips/mips/tick.c head/sys/mips/rmi/tick.c head/sys/net/flowtable.c head/sys/net/if.c head/sys/net/if_clone.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_llatbl.c head/sys/net/if_loop.c head/sys/net/route.c head/sys/net/vnet.c head/sys/netgraph/ng_base.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_pcb.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_dynamic.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/siftr.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/scope6.c head/sys/netinet6/send.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netipsec/xform_esp.c head/sys/powerpc/aim/clock.c head/sys/powerpc/booke/clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/kern_clock.c Sun Nov 14 20:38:11 2010 (r215317) @@ -373,7 +373,7 @@ int profprocs; int ticks; int psratio; -static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ +STATIC_DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ static int global_hardclock_run = 0; /* Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/kern_clocksource.c Sun Nov 14 20:38:11 2010 (r215317) @@ -135,7 +135,7 @@ struct pcpu_state { int idle; /* This CPU is in idle mode. */ }; -static DPCPU_DEFINE(struct pcpu_state, timerstate); +STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate); #define FREQ2BT(freq, bt) \ { \ Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/sched_4bsd.c Sun Nov 14 20:38:11 2010 (r215317) @@ -161,7 +161,7 @@ struct pcpuidlestat { u_int idlecalls; u_int oldidlecalls; }; -static DPCPU_DEFINE(struct pcpuidlestat, idlestat); +STATIC_DPCPU_DEFINE(struct pcpuidlestat, idlestat); static void setup_runqs(void) Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/subr_pcpu.c Sun Nov 14 20:38:11 2010 (r215317) @@ -70,7 +70,7 @@ struct dpcpu_free { TAILQ_ENTRY(dpcpu_free) df_link; }; -static DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); +STATIC_DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); static TAILQ_HEAD(, dpcpu_free) dpcpu_head = TAILQ_HEAD_INITIALIZER(dpcpu_head); static struct sx dpcpu_lock; uintptr_t dpcpu_off[MAXCPU]; Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/mips/mips/tick.c Sun Nov 14 20:38:11 2010 (r215317) @@ -57,13 +57,13 @@ uint64_t counter_freq; struct timecounter *platform_timecounter; -static DPCPU_DEFINE(uint32_t, cycles_per_tick); +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static DPCPU_DEFINE(volatile uint32_t, counter_upper); -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); -static DPCPU_DEFINE(uint32_t, compare_ticks); -static DPCPU_DEFINE(uint32_t, lost_ticks); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); struct clock_softc { int intr_rid; Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/mips/rmi/tick.c Sun Nov 14 20:38:11 2010 (r215317) @@ -59,13 +59,13 @@ uint64_t counter_freq; struct timecounter *platform_timecounter; -static DPCPU_DEFINE(uint32_t, cycles_per_tick); +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static DPCPU_DEFINE(volatile uint32_t, counter_upper); -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); -static DPCPU_DEFINE(uint32_t, compare_ticks); -static DPCPU_DEFINE(uint32_t, lost_ticks); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); struct clock_softc { int intr_rid; Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/flowtable.c Sun Nov 14 20:38:11 2010 (r215317) @@ -184,10 +184,10 @@ struct flowtable { } __aligned(CACHE_LINE_SIZE); static struct proc *flowcleanerproc; -static VNET_DEFINE(struct flowtable *, flow_list_head); -static VNET_DEFINE(uint32_t, flow_hashjitter); -static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); -static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); +STATIC_VNET_DEFINE(struct flowtable *, flow_list_head); +STATIC_VNET_DEFINE(uint32_t, flow_hashjitter); +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone); +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone); #define V_flow_list_head VNET(flow_list_head) #define V_flow_hashjitter VNET(flow_hashjitter) @@ -230,13 +230,13 @@ do { \ * - idetach() cleanup for options VIMAGE builds. */ VNET_DEFINE(int, flowtable_enable) = 1; -static VNET_DEFINE(int, flowtable_debug); -static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; -static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; -static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; -static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; -static VNET_DEFINE(int, flowtable_nmbflows); -static VNET_DEFINE(int, flowtable_ready) = 0; +STATIC_VNET_DEFINE(int, flowtable_debug); +STATIC_VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; +STATIC_VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; +STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; +STATIC_VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; +STATIC_VNET_DEFINE(int, flowtable_nmbflows); +STATIC_VNET_DEFINE(int, flowtable_ready) = 0; #define V_flowtable_enable VNET(flowtable_enable) #define V_flowtable_debug VNET(flowtable_debug) Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if.c Sun Nov 14 20:38:11 2010 (r215317) @@ -183,7 +183,7 @@ int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ VNET_DEFINE(struct ifgrouphead, ifg_head); -static VNET_DEFINE(int, if_indexlim) = 8; +STATIC_VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. */ VNET_DEFINE(struct ifindex_entry *, ifindex_table); Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_clone.c Sun Nov 14 20:38:11 2010 (r215317) @@ -56,7 +56,7 @@ static int if_clone_createif(struct if_c caddr_t params); static struct mtx if_cloners_mtx; -static VNET_DEFINE(int, if_cloners_count); +STATIC_VNET_DEFINE(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); #define V_if_cloners_count VNET(if_cloners_count) Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_ethersubr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* #if defined(INET) || defined(INET6) int ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); -static VNET_DEFINE(int, ether_ipfw); +STATIC_VNET_DEFINE(int, ether_ipfw); #define V_ether_ipfw VNET(ether_ipfw) #endif Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_gif.c Sun Nov 14 20:38:11 2010 (r215317) @@ -94,7 +94,7 @@ */ static struct mtx gif_mtx; static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); -static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); +STATIC_VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); #define V_gif_softc_list VNET(gif_softc_list) void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); @@ -124,7 +124,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL */ #define MAX_GIF_NEST 1 #endif -static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; +STATIC_VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; #define V_max_gif_nesting VNET(max_gif_nesting) SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); @@ -135,9 +135,9 @@ SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, * we allow control over this check here. */ #ifdef XBONEHACK -static VNET_DEFINE(int, parallel_tunnels) = 1; +STATIC_VNET_DEFINE(int, parallel_tunnels) = 1; #else -static VNET_DEFINE(int, parallel_tunnels) = 0; +STATIC_VNET_DEFINE(int, parallel_tunnels) = 0; #endif #define V_parallel_tunnels VNET(parallel_tunnels) SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_llatbl.c Sun Nov 14 20:38:11 2010 (r215317) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables"); -static VNET_DEFINE(SLIST_HEAD(, lltable), lltables); +STATIC_VNET_DEFINE(SLIST_HEAD(, lltable), lltables); #define V_lltables VNET(lltables) extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *, Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_loop.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifne VNET_DEFINE(struct ifnet *, loif); /* Used externally */ #ifdef VIMAGE -static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); -static VNET_DEFINE(struct if_clone, lo_cloner); +STATIC_VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); +STATIC_VNET_DEFINE(struct if_clone, lo_cloner); #define V_lo_cloner_data VNET(lo_cloner_data) #define V_lo_cloner VNET(lo_cloner) #endif Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/route.c Sun Nov 14 20:38:11 2010 (r215317) @@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash); /* routes no */ #define RNTORT(p) ((struct rtentry *)(p)) -static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ +STATIC_VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ #define V_rtzone VNET(rtzone) #if 0 Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/vnet.c Sun Nov 14 20:38:11 2010 (r215317) @@ -177,7 +177,7 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", * Space to store virtualized global variables from loadable kernel modules, * and the free list to manage it. */ -static VNET_DEFINE(char, modspace[VNET_MODMIN]); +STATIC_VNET_DEFINE(char, modspace[VNET_MODMIN]); /* * Global lists of subsystem constructor and destructors for vnets. They are Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_base.c Sun Nov 14 20:38:11 2010 (r215317) @@ -171,7 +171,7 @@ static struct mtx ng_typelist_mtx; /* Hash related definitions */ /* XXX Don't need to initialise them because it's a LIST */ -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); #define V_ng_ID_hash VNET(ng_ID_hash) static struct mtx ng_idhash_mtx; @@ -189,7 +189,7 @@ static struct mtx ng_idhash_mtx; } \ } while (0) -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); #define V_ng_name_hash VNET(ng_name_hash) static struct mtx ng_namehash_mtx; @@ -359,7 +359,7 @@ ng_alloc_node(void) #define TRAP_ERROR() #endif -static VNET_DEFINE(ng_ID_t, nextID) = 1; +STATIC_VNET_DEFINE(ng_ID_t, nextID) = 1; #define V_nextID VNET(nextID) #ifdef INVARIANTS Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_eiface.c Sun Nov 14 20:38:11 2010 (r215317) @@ -114,7 +114,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(eiface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); +STATIC_VNET_DEFINE(struct unrhdr *, ng_eiface_unit); #define V_ng_eiface_unit VNET(ng_eiface_unit) /************************************************************************ Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_iface.c Sun Nov 14 20:38:11 2010 (r215317) @@ -210,7 +210,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(iface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_iface_unit); +STATIC_VNET_DEFINE(struct unrhdr *, ng_iface_unit); #define V_ng_iface_unit VNET(ng_iface_unit) /************************************************************************ Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/if_ether.c Sun Nov 14 20:38:11 2010 (r215317) @@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, in SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); /* timer values */ -static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 +STATIC_VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ -static VNET_DEFINE(int, arp_maxtries) = 5; +STATIC_VNET_DEFINE(int, arp_maxtries) = 5; VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for * local traffic */ -static VNET_DEFINE(int, arp_proxyall) = 0; -static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for +STATIC_VNET_DEFINE(int, arp_proxyall) = 0; +STATIC_VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ -static VNET_DEFINE(int, arp_maxhold) = 1; +STATIC_VNET_DEFINE(int, arp_maxhold) = 1; #define V_arpt_keep VNET(arpt_keep) #define V_arpt_down VNET(arpt_down) Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/igmp.c Sun Nov 14 20:38:11 2010 (r215317) @@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp stat * FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection * policy to control the address used by IGMP on the link. */ -static VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general +STATIC_VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general * query response */ -static VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change +STATIC_VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change * retransmit */ -static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host +STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host * report; IGMPv3 g/sg * query response */ @@ -218,24 +218,24 @@ static VNET_DEFINE(int, current_state_ti #define V_state_change_timers_running VNET(state_change_timers_running) #define V_current_state_timers_running VNET(current_state_timers_running) -static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); -static VNET_DEFINE(struct igmpstat, igmpstat) = { +STATIC_VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); +STATIC_VNET_DEFINE(struct igmpstat, igmpstat) = { .igps_version = IGPS_VERSION_3, .igps_len = sizeof(struct igmpstat), }; -static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; +STATIC_VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; #define V_igi_head VNET(igi_head) #define V_igmpstat VNET(igmpstat) #define V_igmp_gsrdelay VNET(igmp_gsrdelay) -static VNET_DEFINE(int, igmp_recvifkludge) = 1; -static VNET_DEFINE(int, igmp_sendra) = 1; -static VNET_DEFINE(int, igmp_sendlocal) = 1; -static VNET_DEFINE(int, igmp_v1enable) = 1; -static VNET_DEFINE(int, igmp_v2enable) = 1; -static VNET_DEFINE(int, igmp_legacysupp); -static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; +STATIC_VNET_DEFINE(int, igmp_recvifkludge) = 1; +STATIC_VNET_DEFINE(int, igmp_sendra) = 1; +STATIC_VNET_DEFINE(int, igmp_sendlocal) = 1; +STATIC_VNET_DEFINE(int, igmp_v1enable) = 1; +STATIC_VNET_DEFINE(int, igmp_v2enable) = 1; +STATIC_VNET_DEFINE(int, igmp_legacysupp); +STATIC_VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; #define V_igmp_recvifkludge VNET(igmp_recvifkludge) #define V_igmp_sendra VNET(igmp_sendra) Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in.c Sun Nov 14 20:38:11 2010 (r215317) @@ -76,12 +76,12 @@ static int in_ifinit(struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int); static void in_purgemaddrs(struct ifnet *); -static VNET_DEFINE(int, subnetsarelocal); +STATIC_VNET_DEFINE(int, subnetsarelocal); #define V_subnetsarelocal VNET(subnetsarelocal) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, "Treat all subnets as directly connected"); -static VNET_DEFINE(int, sameprefixcarponly); +STATIC_VNET_DEFINE(int, sameprefixcarponly); #define V_sameprefixcarponly VNET(sameprefixcarponly) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, &VNET_NAME(sameprefixcarponly), 0, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in_pcb.c Sun Nov 14 20:38:11 2010 (r215317) @@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) = 10; VNET_DEFINE(int, ipport_randomtime) = 45; /* user controlled via sysctl */ VNET_DEFINE(int, ipport_stoprandom); /* toggled by ipport_tick */ VNET_DEFINE(int, ipport_tcpallocs); -static VNET_DEFINE(int, ipport_tcplastcount); +STATIC_VNET_DEFINE(int, ipport_tcplastcount); #define V_ipport_tcplastcount VNET(ipport_tcplastcount) Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in_rmx.c Sun Nov 14 20:38:11 2010 (r215317) @@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_no return rn; } -static VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ +STATIC_VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ #define V_rtq_reallyold VNET(rtq_reallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, "Default expiration time on dynamically learned routes"); /* never automatically crank down to less */ -static VNET_DEFINE(int, rtq_minreallyold) = 10; +STATIC_VNET_DEFINE(int, rtq_minreallyold) = 10; #define V_rtq_minreallyold VNET(rtq_minreallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &VNET_NAME(rtq_minreallyold), 0, "Minimum time to attempt to hold onto dynamically learned routes"); /* 128 cached routes is "too many" */ -static VNET_DEFINE(int, rtq_toomany) = 128; +STATIC_VNET_DEFINE(int, rtq_toomany) = 128; #define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &VNET_NAME(rtq_toomany), 0, @@ -240,8 +240,8 @@ in_rtqkill(struct radix_node *rn, void * } #define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; -static VNET_DEFINE(struct callout, rtq_timer); +STATIC_VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; +STATIC_VNET_DEFINE(struct callout, rtq_timer); #define V_rtq_timeout VNET(rtq_timeout) #define V_rtq_timer VNET(rtq_timer) Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_divert.c Sun Nov 14 20:38:11 2010 (r215317) @@ -105,8 +105,8 @@ __FBSDID("$FreeBSD$"); */ /* Internal variables. */ -static VNET_DEFINE(struct inpcbhead, divcb); -static VNET_DEFINE(struct inpcbinfo, divcbinfo); +STATIC_VNET_DEFINE(struct inpcbhead, divcb); +STATIC_VNET_DEFINE(struct inpcbinfo, divcbinfo); #define V_divcb VNET(divcb) #define V_divcbinfo VNET(divcbinfo) Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_fastfwd.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, ipfastforward_active); +STATIC_VNET_DEFINE(int, ipfastforward_active); #define V_ipfastforward_active VNET(ipfastforward_active) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_icmp.c Sun Nov 14 20:38:11 2010 (r215317) @@ -80,55 +80,55 @@ VNET_DEFINE(struct icmpstat, icmpstat); SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); -static VNET_DEFINE(int, icmpmaskrepl) = 0; +STATIC_VNET_DEFINE(int, icmpmaskrepl) = 0; #define V_icmpmaskrepl VNET(icmpmaskrepl) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, &VNET_NAME(icmpmaskrepl), 0, "Reply to ICMP Address Mask Request packets."); -static VNET_DEFINE(u_int, icmpmaskfake) = 0; +STATIC_VNET_DEFINE(u_int, icmpmaskfake) = 0; #define V_icmpmaskfake VNET(icmpmaskfake) SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, &VNET_NAME(icmpmaskfake), 0, "Fake reply to ICMP Address Mask Request packets."); -static VNET_DEFINE(int, drop_redirect) = 0; +STATIC_VNET_DEFINE(int, drop_redirect) = 0; #define V_drop_redirect VNET(drop_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, &VNET_NAME(drop_redirect), 0, "Ignore ICMP redirects"); -static VNET_DEFINE(int, log_redirect) = 0; +STATIC_VNET_DEFINE(int, log_redirect) = 0; #define V_log_redirect VNET(log_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, &VNET_NAME(log_redirect), 0, "Log ICMP redirects to the console"); -static VNET_DEFINE(int, icmplim) = 200; +STATIC_VNET_DEFINE(int, icmplim) = 200; #define V_icmplim VNET(icmplim) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, &VNET_NAME(icmplim), 0, "Maximum number of ICMP responses per second"); -static VNET_DEFINE(int, icmplim_output) = 1; +STATIC_VNET_DEFINE(int, icmplim_output) = 1; #define V_icmplim_output VNET(icmplim_output) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, &VNET_NAME(icmplim_output), 0, "Enable rate limiting of ICMP responses"); -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); +STATIC_VNET_DEFINE(char, reply_src[IFNAMSIZ]); #define V_reply_src VNET(reply_src) SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, &VNET_NAME(reply_src), IFNAMSIZ, "icmp reply source for non-local packets."); -static VNET_DEFINE(int, icmp_rfi) = 0; +STATIC_VNET_DEFINE(int, icmp_rfi) = 0; #define V_icmp_rfi VNET(icmp_rfi) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); -static VNET_DEFINE(int, icmp_quotelen) = 8; +STATIC_VNET_DEFINE(int, icmp_quotelen) = 8; #define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO /* * ICMP broadcast echo sysctl */ -static VNET_DEFINE(int, icmpbmcastecho) = 0; +STATIC_VNET_DEFINE(int, icmpbmcastecho) = 0; #define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_input.c Sun Nov 14 20:38:11 2010 (r215317) @@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORW &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ +STATIC_VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ #define V_ipsendredirects VNET(ipsendredirects) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW, &VNET_NAME(ipsendredirects), 0, @@ -107,13 +107,13 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFT &VNET_NAME(ip_defttl), 0, "Maximum TTL on IP packets"); -static VNET_DEFINE(int, ip_keepfaith); +STATIC_VNET_DEFINE(int, ip_keepfaith); #define V_ip_keepfaith VNET(ip_keepfaith) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, &VNET_NAME(ip_keepfaith), 0, "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); -static VNET_DEFINE(int, ip_sendsourcequench); +STATIC_VNET_DEFINE(int, ip_sendsourcequench); #define V_ip_sendsourcequench VNET(ip_sendsourcequench) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, &VNET_NAME(ip_sendsourcequench), 0, @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, * to the loopback interface instead of the interface where the * packets for those addresses are received. */ -static VNET_DEFINE(int, ip_checkinterface); +STATIC_VNET_DEFINE(int, ip_checkinterface); #define V_ip_checkinterface VNET(ip_checkinterface) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, &VNET_NAME(ip_checkinterface), 0, @@ -164,8 +164,8 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_S &VNET_NAME(ipstat), ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); -static VNET_DEFINE(uma_zone_t, ipq_zone); -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); +STATIC_VNET_DEFINE(uma_zone_t, ipq_zone); +STATIC_VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static struct mtx ipqlock; #define V_ipq_zone VNET(ipq_zone) @@ -180,15 +180,15 @@ static void maxnipq_update(void); static void ipq_zone_change(void *); static void ip_drain_locked(void); -static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ -static VNET_DEFINE(int, nipq); /* Total # of reass queues */ +STATIC_VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ +STATIC_VNET_DEFINE(int, nipq); /* Total # of reass queues */ #define V_maxnipq VNET(maxnipq) #define V_nipq VNET(nipq) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, &VNET_NAME(nipq), 0, "Current number of IPv4 fragment reassembly queue entries"); -static VNET_DEFINE(int, maxfragsperpacket); +STATIC_VNET_DEFINE(int, maxfragsperpacket); #define V_maxfragsperpacket VNET(maxfragsperpacket) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, &VNET_NAME(maxfragsperpacket), 0, @@ -209,7 +209,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, #endif #ifdef FLOWTABLE -static VNET_DEFINE(int, ip_output_flowtable_size) = 2048; +STATIC_VNET_DEFINE(int, ip_output_flowtable_size) = 2048; VNET_DEFINE(struct flowtable *, ip_ft); #define V_ip_output_flowtable_size VNET(ip_output_flowtable_size) @@ -1719,7 +1719,7 @@ makedummy: * locking. This code remains in ip_input.c as ip_mroute.c is optionally * compiled. */ -static VNET_DEFINE(int, ip_rsvp_on); +STATIC_VNET_DEFINE(int, ip_rsvp_on); VNET_DEFINE(struct socket *, ip_rsvpd); #define V_ip_rsvp_on VNET(ip_rsvp_on) Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_ipsec.c Sun Nov 14 20:38:11 2010 (r215317) @@ -72,9 +72,9 @@ extern struct protosw inetsw[]; #ifdef IPSEC #ifdef IPSEC_FILTERTUNNEL -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1; +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1; #else -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; #endif #define V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtertunnel) Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_mroute.c Sun Nov 14 20:38:11 2010 (r215317) @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); #define VIFI_INVALID ((vifi_t) -1) #define M_HASCL(m) ((m)->m_flags & M_EXT) -static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ +STATIC_VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ #define V_last_tv_sec VNET(last_tv_sec) static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cache"); @@ -145,14 +145,14 @@ static struct mtx mrouter_mtx; static int ip_mrouter_cnt; /* # of vnets with active mrouters */ static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets */ -static VNET_DEFINE(struct mrtstat, mrtstat); +STATIC_VNET_DEFINE(struct mrtstat, mrtstat); #define V_mrtstat VNET(mrtstat) SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW, &VNET_NAME(mrtstat), mrtstat, "IPv4 Multicast Forwarding Statistics (struct mrtstat, " "netinet/ip_mroute.h)"); -static VNET_DEFINE(u_long, mfchash); +STATIC_VNET_DEFINE(u_long, mfchash); #define V_mfchash VNET(mfchash) #define MFCHASH(a, g) \ ((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ @@ -160,9 +160,9 @@ static VNET_DEFINE(u_long, mfchash); #define MFCHASHSIZE 256 static u_long mfchashsize; /* Hash size */ -static VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */ +STATIC_VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) -static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); +STATIC_VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); #define V_mfchashtbl VNET(mfchashtbl) static struct mtx mfc_mtx; @@ -173,9 +173,9 @@ static struct mtx mfc_mtx; mtx_init(&mfc_mtx, "IPv4 multicast forwarding cache", NULL, MTX_DEF) #define MFC_LOCK_DESTROY() mtx_destroy(&mfc_mtx) -static VNET_DEFINE(vifi_t, numvifs); +STATIC_VNET_DEFINE(vifi_t, numvifs); #define V_numvifs VNET(numvifs) -static VNET_DEFINE(struct vif, viftable[MAXVIFS]); +STATIC_VNET_DEFINE(struct vif, viftable[MAXVIFS]); #define V_viftable VNET(viftable) SYSCTL_VNET_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD, &VNET_NAME(viftable), sizeof(V_viftable), "S,vif[MAXVIFS]", @@ -191,7 +191,7 @@ static struct mtx vif_mtx; static eventhandler_tag if_detach_event_tag = NULL; -static VNET_DEFINE(struct callout, expire_upcalls_ch); +STATIC_VNET_DEFINE(struct callout, expire_upcalls_ch); #define V_expire_upcalls_ch VNET(expire_upcalls_ch) #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ @@ -206,9 +206,9 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter * expiration time. Periodically, the entries are analysed and processed. */ #define BW_METER_BUCKETS 1024 -static VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); +STATIC_VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); #define V_bw_meter_timers VNET(bw_meter_timers) -static VNET_DEFINE(struct callout, bw_meter_ch); +STATIC_VNET_DEFINE(struct callout, bw_meter_ch); #define V_bw_meter_ch VNET(bw_meter_ch) #define BW_METER_PERIOD (hz) /* periodical handling of bw meters */ @@ -216,16 +216,16 @@ static VNET_DEFINE(struct callout, bw_me * Pending upcalls are stored in a vector which is flushed when * full, or periodically */ -static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); +STATIC_VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); #define V_bw_upcalls VNET(bw_upcalls) -static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ +STATIC_VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ #define V_bw_upcalls_n VNET(bw_upcalls_n) -static VNET_DEFINE(struct callout, bw_upcalls_ch); +STATIC_VNET_DEFINE(struct callout, bw_upcalls_ch); #define V_bw_upcalls_ch VNET(bw_upcalls_ch) #define BW_UPCALLS_PERIOD (hz) /* periodical flush of bw upcalls */ -static VNET_DEFINE(struct pimstat, pimstat); +STATIC_VNET_DEFINE(struct pimstat, pimstat); #define V_pimstat VNET(pimstat) SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM"); @@ -296,9 +296,9 @@ static struct pim_encap_pimhdr pim_encap 0 /* flags */ }; -static VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID; +STATIC_VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID; #define V_reg_vif_num VNET(reg_vif_num) -static VNET_DEFINE(struct ifnet, multicast_register_if); +STATIC_VNET_DEFINE(struct ifnet, multicast_register_if); #define V_multicast_register_if VNET(multicast_register_if) /* @@ -367,9 +367,9 @@ static const uint32_t mrt_api_support = MRT_MFC_FLAGS_BORDER_VIF | MRT_MFC_RP | MRT_MFC_BW_UPCALL); -static VNET_DEFINE(uint32_t, mrt_api_config); +STATIC_VNET_DEFINE(uint32_t, mrt_api_config); #define V_mrt_api_config VNET(mrt_api_config) -static VNET_DEFINE(int, pim_assert_enabled); +STATIC_VNET_DEFINE(int, pim_assert_enabled); #define V_pim_assert_enabled VNET(pim_assert_enabled) static struct timeval pim_assert_interval = { 3, 0 }; /* Rate limit */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Nov 14 20:38:11 2010 (r215317) @@ -100,10 +100,10 @@ __FBSDID("$FreeBSD$"); */ /* ipfw_vnet_ready controls when we are open for business */ -static VNET_DEFINE(int, ipfw_vnet_ready) = 0; +STATIC_VNET_DEFINE(int, ipfw_vnet_ready) = 0; #define V_ipfw_vnet_ready VNET(ipfw_vnet_ready) -static VNET_DEFINE(int, fw_deny_unknown_exthdrs); +STATIC_VNET_DEFINE(int, fw_deny_unknown_exthdrs); #define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs) #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 14 20:38:11 2010 (r215317) @@ -118,10 +118,10 @@ __FBSDID("$FreeBSD$"); /* * Static variables followed by global ones */ -static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); -static VNET_DEFINE(u_int32_t, dyn_buckets); -static VNET_DEFINE(u_int32_t, curr_dyn_buckets); -static VNET_DEFINE(struct callout, ipfw_timeout); +STATIC_VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); +STATIC_VNET_DEFINE(u_int32_t, dyn_buckets); +STATIC_VNET_DEFINE(u_int32_t, curr_dyn_buckets); +STATIC_VNET_DEFINE(struct callout, ipfw_timeout); #define V_ipfw_dyn_v VNET(ipfw_dyn_v) #define V_dyn_buckets VNET(dyn_buckets) #define V_curr_dyn_buckets VNET(curr_dyn_buckets) @@ -150,12 +150,12 @@ ipfw_dyn_unlock(void) /* * Timeouts for various events in handing dynamic rules. */ -static VNET_DEFINE(u_int32_t, dyn_ack_lifetime); -static VNET_DEFINE(u_int32_t, dyn_syn_lifetime); -static VNET_DEFINE(u_int32_t, dyn_fin_lifetime); -static VNET_DEFINE(u_int32_t, dyn_rst_lifetime); -static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); -static VNET_DEFINE(u_int32_t, dyn_short_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_ack_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_syn_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_fin_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_rst_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_udp_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime); #define V_dyn_ack_lifetime VNET(dyn_ack_lifetime) #define V_dyn_syn_lifetime VNET(dyn_syn_lifetime) @@ -172,16 +172,16 @@ static VNET_DEFINE(u_int32_t, dyn_short_ * than dyn_keepalive_period. */ -static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); -static VNET_DEFINE(u_int32_t, dyn_keepalive_period); -static VNET_DEFINE(u_int32_t, dyn_keepalive); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_interval); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_period); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive); #define V_dyn_keepalive_interval VNET(dyn_keepalive_interval) #define V_dyn_keepalive_period VNET(dyn_keepalive_period) #define V_dyn_keepalive VNET(dyn_keepalive) -static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ -static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ +STATIC_VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ +STATIC_VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ #define V_dyn_count VNET(dyn_count) #define V_dyn_max VNET(dyn_max) Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_nat.c Sun Nov 14 20:38:11 2010 (r215317) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include /* XXX for in_cksum */ -static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); +STATIC_VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); #define V_ifaddr_event_tag VNET(ifaddr_event_tag) static void Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 14 20:38:11 2010 (r215317) @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, fw_enable) = 1; +STATIC_VNET_DEFINE(int, fw_enable) = 1; #define V_fw_enable VNET(fw_enable) #ifdef INET6 -static VNET_DEFINE(int, fw6_enable) = 1; +STATIC_VNET_DEFINE(int, fw6_enable) = 1; #define V_fw6_enable VNET(fw6_enable) #endif Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/siftr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -260,7 +260,7 @@ struct siftr_stats uint32_t nskip_out_dejavu; }; -static DPCPU_DEFINE(struct siftr_stats, ss); +STATIC_DPCPU_DEFINE(struct siftr_stats, ss); static volatile unsigned int siftr_exit_pkt_manager_thread = 0; static unsigned int siftr_enabled = 0; Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_hostcache.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,10 +106,10 @@ __FBSDID("$FreeBSD$"); #define TCP_HOSTCACHE_EXPIRE 60*60 /* one hour */ #define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */ -static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); +STATIC_VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); #define V_tcp_hostcache VNET(tcp_hostcache) -static VNET_DEFINE(struct callout, tcp_hc_callout); +STATIC_VNET_DEFINE(struct callout, tcp_hc_callout); #define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_reass.c Sun Nov 14 20:38:11 2010 (r215317) @@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_maxseg) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_maxseg) = 0; #define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &VNET_NAME(tcp_reass_maxseg), 0, &tcp_reass_sysctl_maxseg, "I", "Global maximum number of TCP Segments in Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_qsize) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_qsize) = 0; #define V_tcp_reass_qsize VNET(tcp_reass_qsize) SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, &VNET_NAME(tcp_reass_qsize), 0, &tcp_reass_sysctl_qsize, "I", "Global number of TCP Segments currently in Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_overflows) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_overflows) = 0; #define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &VNET_NAME(tcp_reass_overflows), 0, "Global number of TCP Segment Reassembly Queue Overflows"); -static VNET_DEFINE(uma_zone_t, tcp_reass_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcp_reass_zone); #define V_tcp_reass_zone VNET(tcp_reass_zone) /* Initialize TCP reassembly queue */ Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_subr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); -static VNET_DEFINE(int, icmp_may_rst) = 1; +STATIC_VNET_DEFINE(int, icmp_may_rst) = 1; #define V_icmp_may_rst VNET(icmp_may_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, &VNET_NAME(icmp_may_rst), 0, "Certain ICMP unreachable messages may abort connections in SYN_SENT"); -static VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; +STATIC_VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; #define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, &VNET_NAME(tcp_isn_reseed_interval), 0, @@ -241,7 +241,7 @@ struct tcpcb_mem { struct cc_var ccv; }; -static VNET_DEFINE(uma_zone_t, tcpcb_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcpcb_zone); #define V_tcpcb_zone VNET(tcpcb_zone) MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); @@ -1453,10 +1453,10 @@ tcp6_ctlinput(int cmd, struct sockaddr * #define ISN_STATIC_INCREMENT 4096 #define ISN_RANDOM_INCREMENT (4096 - 1) -static VNET_DEFINE(u_char, isn_secret[32]); -static VNET_DEFINE(int, isn_last_reseed); -static VNET_DEFINE(u_int32_t, isn_offset); -static VNET_DEFINE(u_int32_t, isn_offset_old); +STATIC_VNET_DEFINE(u_char, isn_secret[32]); +STATIC_VNET_DEFINE(int, isn_last_reseed); +STATIC_VNET_DEFINE(u_int32_t, isn_offset); +STATIC_VNET_DEFINE(u_int32_t, isn_offset_old); #define V_isn_secret VNET(isn_secret) #define V_isn_last_reseed VNET(isn_last_reseed) Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_syncache.c Sun Nov 14 20:38:11 2010 (r215317) @@ -97,13 +97,13 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, tcp_syncookies) = 1; +STATIC_VNET_DEFINE(int, tcp_syncookies) = 1; #define V_tcp_syncookies VNET(tcp_syncookies) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, &VNET_NAME(tcp_syncookies), 0, "Use TCP SYN cookies if the syncache overflows"); -static VNET_DEFINE(int, tcp_syncookiesonly) = 0; +STATIC_VNET_DEFINE(int, tcp_syncookiesonly) = 0; #define V_tcp_syncookiesonly VNET(tcp_syncookiesonly) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW, &VNET_NAME(tcp_syncookiesonly), 0, @@ -143,7 +143,7 @@ static struct syncache #define TCP_SYNCACHE_HASHSIZE 512 #define TCP_SYNCACHE_BUCKETLIMIT 30 -static VNET_DEFINE(struct tcp_syncache, tcp_syncache); +STATIC_VNET_DEFINE(struct tcp_syncache, tcp_syncache); #define V_tcp_syncache VNET(tcp_syncache) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_timewait.c Sun Nov 14 20:38:11 2010 (r215317) @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(uma_zone_t, tcptw_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcptw_zone); #define V_tcptw_zone VNET(tcptw_zone) static int maxtcptw; @@ -102,7 +102,7 @@ static int maxtcptw; * queue pointers in each tcptw structure, are protected using the global * tcbinfo lock, which must be held over queue iteration and modification. */ -static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); +STATIC_VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); #define V_twq_2msl VNET(twq_2msl) static void tcp_tw_2msl_reset(struct tcptw *, int); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/udp_usrreq.c Sun Nov 14 20:38:11 2010 (r215317) @@ -131,7 +131,7 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS VNET_DEFINE(struct inpcbhead, udb); /* from udp_var.h */ VNET_DEFINE(struct inpcbinfo, udbinfo); -static VNET_DEFINE(uma_zone_t, udpcb_zone); +STATIC_VNET_DEFINE(uma_zone_t, udpcb_zone); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 20:40:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A542106566C; Sun, 14 Nov 2010 20:40:56 +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 09C018FC15; Sun, 14 Nov 2010 20:40: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 oAEKetjp093275; Sun, 14 Nov 2010 20:40:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKetST093270; Sun, 14 Nov 2010 20:40:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142040.oAEKetST093270@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:40: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: r215318 - in head/sys: net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:40:56 -0000 Author: dim Date: Sun Nov 14 20:40:55 2010 New Revision: 215318 URL: http://svn.freebsd.org/changeset/base/215318 Log: Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. Modified: head/sys/net/vnet.h head/sys/sys/cdefs.h head/sys/sys/linker_set.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/net/vnet.h Sun Nov 14 20:40:55 2010 (r215318) @@ -95,9 +95,7 @@ struct vnet { * Location of the kernel's 'set_vnet' linker set. */ extern uintptr_t *__start_set_vnet; -__GLOBL(__start_set_vnet); extern uintptr_t *__stop_set_vnet; -__GLOBL(__stop_set_vnet); #define VNET_START (uintptr_t)&__start_set_vnet #define VNET_STOP (uintptr_t)&__stop_set_vnet @@ -195,7 +193,10 @@ extern struct sx vnet_sxlock; */ #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) -#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used +#define VNET_DEFINE(t, n) \ + __GLOBL("__start_" VNET_SETNAME); \ + __GLOBL("__stop_" VNET_SETNAME); \ + t VNET_NAME(n) __section(VNET_SETNAME) __used #define STATIC_VNET_DEFINE(t, n) \ VNET_DEFINE(static t, n) #define _VNET_PTR(b, n) \ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/cdefs.h Sun Nov 14 20:40:55 2010 (r215318) @@ -401,8 +401,7 @@ #endif /* __STDC__ */ #endif /* __GNUC__ || __INTEL_COMPILER */ -#define __GLOBL1(sym) __asm__(".globl " #sym) -#define __GLOBL(sym) __GLOBL1(sym) +#define __GLOBL(sym) __asm__(".globl " sym) #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/linker_set.h Sun Nov 14 20:40:55 2010 (r215318) @@ -45,8 +45,8 @@ */ #ifdef __GNUCLIKE___SECTION #define __MAKE_SET(set, sym) \ - __GLOBL(__CONCAT(__start_set_,set)); \ - __GLOBL(__CONCAT(__stop_set_,set)); \ + __GLOBL("__start_set_" #set); \ + __GLOBL("__stop_set_" #set); \ static void const * const __set_##set##_sym_##sym \ __section("set_" #set) __used = &sym #else /* !__GNUCLIKE___SECTION */ Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/pcpu.h Sun Nov 14 20:40:55 2010 (r215318) @@ -51,9 +51,7 @@ * Define a set for pcpu data. */ extern uintptr_t *__start_set_pcpu; -__GLOBL(__start_set_pcpu); extern uintptr_t *__stop_set_pcpu; -__GLOBL(__stop_set_pcpu); /* * Array of dynamic pcpu base offsets. Indexed by id. @@ -75,7 +73,10 @@ extern uintptr_t dpcpu_off[]; */ #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) -#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#define DPCPU_DEFINE(t, n) \ + __GLOBL("__start_" DPCPU_SETNAME); \ + __GLOBL("__stop_" DPCPU_SETNAME); \ + t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used #define STATIC_DPCPU_DEFINE(t, n) \ DPCPU_DEFINE(static t, n) From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 20:41:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA721065679; Sun, 14 Nov 2010 20:41:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB358FC18; Sun, 14 Nov 2010 20: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 oAEKfNUp093328; Sun, 14 Nov 2010 20:41:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKfN6Y093321; Sun, 14 Nov 2010 20:41:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011142041.oAEKfN6Y093321@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Nov 2010 20:41: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: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:41:23 -0000 Author: thompsa Date: Sun Nov 14 20:41:22 2010 New Revision: 215319 URL: http://svn.freebsd.org/changeset/base/215319 Log: Provide a mutex around the read/modify/write of the IXP425_GPIO_* registers. Giant was used in some places, but not all. Modified: head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/avila_led.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425_iic.c head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Sun Nov 14 20:41:22 2010 (r215319) @@ -58,13 +58,8 @@ __FBSDID("$FreeBSD$"); #define GPIO_CLEAR_BITS(sc, reg, bits) \ GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, (reg)) & ~(bits)) -#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) - struct avila_gpio_softc { device_t sc_dev; - struct mtx sc_mtx; bus_space_tag_t sc_iot; bus_space_handle_t sc_gpio_ioh; uint32_t sc_valid; @@ -148,12 +143,12 @@ avila_gpio_pin_configure(struct avila_gp uint32_t mask; mask = 1 << pin->gp_pin; - GPIO_LOCK(sc); /* * Manage input/output */ if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { + IXP4XX_GPIO_LOCK(sc); pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); if (flags & GPIO_PIN_OUTPUT) { pin->gp_flags |= GPIO_PIN_OUTPUT; @@ -163,9 +158,8 @@ avila_gpio_pin_configure(struct avila_gp pin->gp_flags |= GPIO_PIN_INPUT; GPIO_SET_BITS(sc, IXP425_GPIO_GPOER, mask); } + IXP4XX_GPIO_UNLOCK(sc); } - - GPIO_UNLOCK(sc); } static int @@ -184,10 +178,7 @@ avila_gpio_pin_getcaps(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); *caps = sc->sc_pins[pin].gp_caps; - GPIO_UNLOCK(sc); - return (0); } @@ -199,11 +190,11 @@ avila_gpio_pin_getflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); /* refresh since we do not own all the pins */ sc->sc_pins[pin].gp_flags = avila_gpio_pin_flags(sc, pin); *flags = sc->sc_pins[pin].gp_flags; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -216,10 +207,7 @@ avila_gpio_pin_getname(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); memcpy(name, sc->sc_pins[pin].gp_name, GPIOMAXNAME); - GPIO_UNLOCK(sc); - return (0); } @@ -254,12 +242,12 @@ avila_gpio_pin_set(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); if (value) GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -272,9 +260,9 @@ avila_gpio_pin_get(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); *val = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & (1 << pin)) ? 1 : 0; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -289,13 +277,13 @@ avila_gpio_pin_toggle(device_t dev, uint if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); - res = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask) ? 1 : 0; + IXP4XX_GPIO_LOCK(sc); + res = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask; if (res) GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -320,9 +308,6 @@ avila_gpio_attach(device_t dev) sc->sc_iot = sa->sc_iot; sc->sc_gpio_ioh = sa->sc_gpio_ioh; - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF); - for (i = 0; i < N(avila_gpio_pins); i++) { struct avila_gpio_pin *p = &avila_gpio_pins[i]; @@ -342,14 +327,9 @@ avila_gpio_attach(device_t dev) static int avila_gpio_detach(device_t dev) { - struct avila_gpio_softc *sc = device_get_softc(dev); - - KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - mtx_destroy(&sc->sc_mtx); - return(0); } Modified: head/sys/arm/xscale/ixp425/avila_led.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_led.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/avila_led.c Sun Nov 14 20:41:22 2010 (r215319) @@ -52,12 +52,14 @@ led_func(void *arg, int onoff) struct led_avila_softc *sc = arg; uint32_t reg; + IXP4XX_GPIO_LOCK(); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); if (onoff) reg &= ~GPIO_LED_STATUS_BIT; else reg |= GPIO_LED_STATUS_BIT; GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + IXP4XX_GPIO_UNLOCK(); } static int Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Sun Nov 14 20:41:22 2010 (r215319) @@ -133,11 +133,11 @@ i2c_getsda(struct cambria_gpio_softc *sc { uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -145,13 +145,13 @@ static void i2c_setsda(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -159,13 +159,13 @@ static void i2c_setscl(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: head/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425.c Sun Nov 14 20:41:22 2010 (r215319) @@ -66,6 +66,8 @@ uint32_t intr_steer2 = 0; struct ixp425_softc *ixp425_softc = NULL; +struct mtx ixp425_gpio_mtx; + static int ixp425_probe(device_t); static void ixp425_identify(driver_t *, device_t); static int ixp425_attach(device_t); @@ -164,6 +166,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, { uint32_t gpiotr = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(pin)); + IXP4XX_GPIO_LOCK(); /* clear interrupt type */ GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(pin), gpiotr &~ GPIO_TYPE(pin, GPIO_TYPE_MASK)); @@ -176,6 +179,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, /* configure gpio line as an input */ GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1<sc_iot, IXP425_GPIO_HWBASE, IXP425_GPIO_SIZE, 0, &sc->sc_gpio_ioh)) panic("%s: unable to map GPIO registers", __func__); Modified: head/sys/arm/xscale/ixp425/ixp425_iic.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_iic.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425_iic.c Sun Nov 14 20:41:22 2010 (r215319) @@ -106,11 +106,11 @@ ixpiic_getscl(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SCL_BIT); } @@ -120,11 +120,11 @@ ixpiic_getsda(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -133,13 +133,13 @@ ixpiic_setsda(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -148,13 +148,13 @@ ixpiic_setscl(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: head/sys/arm/xscale/ixp425/ixp425var.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425var.h Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425var.h Sun Nov 14 20:41:22 2010 (r215319) @@ -93,6 +93,9 @@ struct ixppcib_softc { bus_space_write_4(sc->sc_iot, sc->sc_gpio_ioh, reg, data) #define GPIO_CONF_READ_4(sc, reg) \ bus_space_read_4(sc->sc_iot, sc->sc_gpio_ioh, reg) +#define IXP4XX_GPIO_LOCK() mtx_lock(&ixp425_gpio_mtx) +#define IXP4XX_GPIO_UNLOCK() mtx_unlock(&ixp425_gpio_mtx) +extern struct mtx ixp425_gpio_mtx; extern struct bus_space ixp425_bs_tag; extern struct bus_space ixp425_a4x_bs_tag; From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:20:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D49B5106564A; Sun, 14 Nov 2010 21:20:52 +0000 (UTC) (envelope-from swell.k@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 E8F878FC08; Sun, 14 Nov 2010 21:20:51 +0000 (UTC) Received: by wwi14 with SMTP id 14so298345wwi.31 for ; Sun, 14 Nov 2010 13:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=UXsuT7/pXe6suTKLTn9D/mtLlbAiTCKmP8LKmCHKjAM=; b=tXjC3lxuenbwoohskxp1vPSbv6faYB5VbT5dJPE5sbmxeLt9kXm7cdUgjAYh7CxWyo 4P/Fr/ZyW35yLpmGsZa8T9QhYJNv3fYnb5IUGbqiYZ6zxMeW9sNza1Gnnnb99Bx9A8tB aSd34JG6uoJMsc+hsRA3bsykn8kXNb8FWozFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=dpPFQxBNv95KQdiaji3pdgWQ/nirsMSjyP+Vq7eQsBx61IGctpHUWtKy26by+Rser2 vEBZ1vD7dzJd6FbdE01j+MmxbFvO44XvHtsfOoBDrbz7XmZ+2WvsCcyd4WtKaLZhvcnu ir5SNiY61etn+9sbu70TCobc2PfjKq+BcDgl8= Received: by 10.216.177.81 with SMTP id c59mr6228085wem.81.1289769650243; Sun, 14 Nov 2010 13:20:50 -0800 (PST) Received: from localhost ([109.169.29.56]) by mx.google.com with ESMTPS id p4sm3364544wer.29.2010.11.14.13.20.47 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 13:20:49 -0800 (PST) From: Anonymous To: Konstantin Belousov References: <201011141824.oAEIOCtN089920@svn.freebsd.org> Date: Mon, 15 Nov 2010 00:20:37 +0300 In-Reply-To: <201011141824.oAEIOCtN089920@svn.freebsd.org> (Konstantin Belousov's message of "Sun, 14 Nov 2010 18:24:12 +0000 (UTC)") Message-ID: <86wrofob4q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 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: Sun, 14 Nov 2010 21:20:53 -0000 Konstantin Belousov writes: > Author: kib > Date: Sun Nov 14 18:24:12 2010 > New Revision: 215309 > URL: http://svn.freebsd.org/changeset/base/215309 > > Log: > Use symbolic names instead of hardcoding values for magic p_osrel constants. > > MFC after: 1 week [...] > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > @@ -60,6 +60,11 @@ > #undef __FreeBSD_version > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > +#ifdef _KERNEL > +#define __FreeBSD_version_SIGSEGV 700004 > +#define __FreeBSD_version_MAP_ANON 800104 > +#endif > + This breaks bsd.port.mk regexp to determine OSVERSION. # Get __FreeBSD_version .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h .elif exists(/usr/src/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h .else OSVERSION!= ${SYSCTL} -n kern.osreldate .endif .endif $ make -V OSVERSION 900025 700004 800104 And every port chokes on it. $ make -C devel/libpthread-stubs "Makefile", line 26: warning: String comparison operator should be either == or != "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) "Makefile", line 28: if-less endif "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif make: fatal errors encountered -- cannot continue %% Index: Mk/bsd.port.mk =================================================================== RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v retrieving revision 1.654 diff -u -p -r1.654 bsd.port.mk --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 @@ -1219,9 +1219,9 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. # Get __FreeBSD_version .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h +OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/include/sys/param.h .elif exists(/usr/src/sys/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h +OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/src/sys/sys/param.h .else OSVERSION!= ${SYSCTL} -n kern.osreldate .endif %% From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:37:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 921881065672; Sun, 14 Nov 2010 21:37:57 +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 D47588FC14; Sun, 14 Nov 2010 21:37:56 +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 oAELboOO032201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Nov 2010 23:37:50 +0200 (EET) (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 oAELbnsP052232; Sun, 14 Nov 2010 23:37:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAELbnaj052231; Sun, 14 Nov 2010 23:37:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 14 Nov 2010 23:37:49 +0200 From: Kostik Belousov To: Anonymous Message-ID: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LKH70Ka7gWbFxE9+" Content-Disposition: inline In-Reply-To: <86wrofob4q.fsf@gmail.com> 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, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 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: Sun, 14 Nov 2010 21:37:57 -0000 --LKH70Ka7gWbFxE9+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: > Konstantin Belousov writes: >=20 > > Author: kib > > Date: Sun Nov 14 18:24:12 2010 > > New Revision: 215309 > > URL: http://svn.freebsd.org/changeset/base/215309 > > > > Log: > > Use symbolic names instead of hardcoding values for magic p_osrel con= stants. > > =20 > > MFC after: 1 week > [...] > > Modified: head/sys/sys/param.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > > @@ -60,6 +60,11 @@ > > #undef __FreeBSD_version > > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > =20 > > +#ifdef _KERNEL > > +#define __FreeBSD_version_SIGSEGV 700004 > > +#define __FreeBSD_version_MAP_ANON 800104 > > +#endif > > + >=20 > This breaks bsd.port.mk regexp to determine OSVERSION. >=20 > # Get __FreeBSD_version > .if !defined(OSVERSION) > .if exists(/usr/include/sys/param.h) > OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$= 3}' < /usr/include/sys/param.h > .elif exists(/usr/src/sys/sys/param.h) > OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $= $3}' < /usr/src/sys/sys/param.h > .else > OSVERSION!=3D ${SYSCTL} -n kern.osreldate > .endif > .endif >=20 > $ make -V OSVERSION > 900025 700004 800104 >=20 > And every port chokes on it. >=20 > $ make -C devel/libpthread-stubs > "Makefile", line 26: warning: String comparison operator should be eith= er =3D=3D or !=3D > "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) > "Makefile", line 28: if-less endif > "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison oper= ator should be either =3D=3D or !=3D > "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(= USE_XZ) && ( (${OSVERSION} >=3D 900000 && ${OSVERSION} < 900012) || ${OSVER= SION} < 800505 )) > "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif > make: fatal errors encountered -- cannot continue >=20 > %% > Index: Mk/bsd.port.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v > retrieving revision 1.654 > diff -u -p -r1.654 bsd.port.mk > --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 > +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 > @@ -1219,9 +1219,9 @@ OSREL!=3D ${UNAME} -r | ${SED} -e 's/[-(]. > # Get __FreeBSD_version > .if !defined(OSVERSION) > .if exists(/usr/include/sys/param.h) > -OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3= }' < /usr/include/sys/param.h > +OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/= {print $$3}' < /usr/include/sys/param.h > .elif exists(/usr/src/sys/sys/param.h) > -OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$= 3}' < /usr/src/sys/sys/param.h > +OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]= / {print $$3}' < /usr/src/sys/sys/param.h > .else > OSVERSION!=3D ${SYSCTL} -n kern.osreldate > .endif > %% I think it is better to select different namespace for the special versions. Can you confirm that the following patch fixes the ports mk for you ? It is enough to cd /usr/src/include && make install after patching. diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a1a3ebc..e5184a6 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -416,8 +416,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() =3D=3D SV_ABI_FREEBSD - && p->p_osrel >=3D - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >=3D P_OSREL_SIGSEGV) { i =3D SIGSEGV; ucode =3D SEGV_ACCERR; } else { diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index b6f843a..026ba9d 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -462,8 +462,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() =3D=3D SV_ABI_FREEBSD - && p->p_osrel >=3D - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >=3D P_OSREL_SIGSEGV) { i =3D SIGSEGV; ucode =3D SEGV_ACCERR; } else { diff --git a/sys/sys/param.h b/sys/sys/param.h index 3e4cdf6..ea90308 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -61,8 +61,8 @@ #define __FreeBSD_version 900025 /* Master, propagated to newvers */ =20 #ifdef _KERNEL -#define __FreeBSD_version_SIGSEGV 700004 -#define __FreeBSD_version_MAP_ANON 800104 +#define P_OSREL_SIGSEGV 700004 +#define P_OSREL_MAP_ANON 800104 #endif =20 #ifndef LOCORE diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 4d92573..a6decc3 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -232,7 +232,7 @@ mmap(td, uap) =20 /* Make sure mapping fits into numeric range, etc. */ if ((uap->len =3D=3D 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >=3D __FreeBSD_version_MAP_ANON) || + curproc->p_osrel >=3D P_OSREL_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd !=3D -1 || pos !=3D 0))) return (EINVAL); =20 --LKH70Ka7gWbFxE9+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzgVq0ACgkQC3+MBN1Mb4i5pACeN887Uxku6VZOrBfTMIuoDgh+ PrkAmQFkp9CRPb01V3/RIybTHUthu1Jg =Spak -----END PGP SIGNATURE----- --LKH70Ka7gWbFxE9+-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:41:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF9A106566B; Sun, 14 Nov 2010 21:41:43 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5B03D8FC14; Sun, 14 Nov 2010 21:41:43 +0000 (UTC) Received: by iwn39 with SMTP id 39so5978760iwn.13 for ; Sun, 14 Nov 2010 13:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=J77mXngbWsLjZa1ExqHdDgJziBvZl/gYOnxaH9mLknc=; b=rbeynVNg9XxiffZXoEOm1C/kNsDtxRUDXA/74mP8IG3LPA0G2KlxtW59QPF7D6wvAB qSCdvIFUZujhN++xolmcudqywCIdw6XnouzxQvJgnvCkeCDTPUEGH5nGako6i8gKjLp+ +WFZPJjC0q5Zbvv2mqVmDQx2Bu24rBbpp8XjE= 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=IGbDe2XzmQdlF0NPv26bwejV4rwwa/wzaPYanyfrcX0XgdPep1429Jx0MLZtfn9GLs 0+4iJlwFfubf/iaq5/zWIePNZ7F7qIT7V8NgWzxBCJpC0j9evVLTbRHlQcKJ9rlDYFgn o0X2AfYpznJ7KuhhYvlQjhnC1w+xrD+k5GCqU= MIME-Version: 1.0 Received: by 10.231.16.75 with SMTP id n11mr3805708iba.97.1289769195532; Sun, 14 Nov 2010 13:13:15 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.21.35 with HTTP; Sun, 14 Nov 2010 13:13:15 -0800 (PST) In-Reply-To: <201011142038.oAEKcB9M093130@svn.freebsd.org> References: <201011142038.oAEKcB9M093130@svn.freebsd.org> Date: Sun, 14 Nov 2010 13:13:15 -0800 X-Google-Sender-Auth: b0QQkCcLdDDa3AjCJ_uvW_YACME Message-ID: From: mdf@FreeBSD.org To: Dimitry Andric 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: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:41:43 -0000 On Sun, Nov 14, 2010 at 12:38 PM, Dimitry Andric wrote: > Author: dim > Date: Sun Nov 14 20:38:11 2010 > New Revision: 215317 > URL: http://svn.freebsd.org/changeset/base/215317 > > Log: > =A0Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout > =A0the tree. If "static DPCPU_DEFINE" and "STATIC_DPCPU_DEFINE" are the same thing, it seems backwards to prefer the macro over the C code. Is there a difference? Thanks, matthew > > Modified: > =A0head/sys/kern/kern_clock.c > =A0head/sys/kern/kern_clocksource.c > =A0head/sys/kern/sched_4bsd.c > =A0head/sys/kern/subr_pcpu.c > =A0head/sys/mips/mips/tick.c > =A0head/sys/mips/rmi/tick.c > =A0head/sys/net/flowtable.c > =A0head/sys/net/if.c > =A0head/sys/net/if_clone.c > =A0head/sys/net/if_ethersubr.c > =A0head/sys/net/if_gif.c > =A0head/sys/net/if_llatbl.c > =A0head/sys/net/if_loop.c > =A0head/sys/net/route.c > =A0head/sys/net/vnet.c > =A0head/sys/netgraph/ng_base.c > =A0head/sys/netgraph/ng_eiface.c > =A0head/sys/netgraph/ng_iface.c > =A0head/sys/netinet/if_ether.c > =A0head/sys/netinet/igmp.c > =A0head/sys/netinet/in.c > =A0head/sys/netinet/in_pcb.c > =A0head/sys/netinet/in_rmx.c > =A0head/sys/netinet/ip_divert.c > =A0head/sys/netinet/ip_fastfwd.c > =A0head/sys/netinet/ip_icmp.c > =A0head/sys/netinet/ip_input.c > =A0head/sys/netinet/ip_ipsec.c > =A0head/sys/netinet/ip_mroute.c > =A0head/sys/netinet/ipfw/ip_fw2.c > =A0head/sys/netinet/ipfw/ip_fw_dynamic.c > =A0head/sys/netinet/ipfw/ip_fw_nat.c > =A0head/sys/netinet/ipfw/ip_fw_pfil.c > =A0head/sys/netinet/siftr.c > =A0head/sys/netinet/tcp_hostcache.c > =A0head/sys/netinet/tcp_reass.c > =A0head/sys/netinet/tcp_subr.c > =A0head/sys/netinet/tcp_syncache.c > =A0head/sys/netinet/tcp_timewait.c > =A0head/sys/netinet/udp_usrreq.c > =A0head/sys/netinet6/frag6.c > =A0head/sys/netinet6/icmp6.c > =A0head/sys/netinet6/in6_rmx.c > =A0head/sys/netinet6/in6_src.c > =A0head/sys/netinet6/ip6_ipsec.c > =A0head/sys/netinet6/ip6_mroute.c > =A0head/sys/netinet6/mld6.c > =A0head/sys/netinet6/nd6.c > =A0head/sys/netinet6/nd6_nbr.c > =A0head/sys/netinet6/nd6_rtr.c > =A0head/sys/netinet6/scope6.c > =A0head/sys/netinet6/send.c > =A0head/sys/netipsec/key.c > =A0head/sys/netipsec/keysock.c > =A0head/sys/netipsec/xform_esp.c > =A0head/sys/powerpc/aim/clock.c > =A0head/sys/powerpc/booke/clock.c > > Modified: head/sys/kern/kern_clock.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/kern/kern_clock.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/kern_clock.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -373,7 +373,7 @@ int profprocs; > =A0int =A0 =A0ticks; > =A0int =A0 =A0psratio; > > -static DPCPU_DEFINE(int, pcputicks); =A0 /* Per-CPU version of ticks. */ > +STATIC_DPCPU_DEFINE(int, pcputicks); =A0 /* Per-CPU version of ticks. */ > =A0static int global_hardclock_run =3D 0; > > =A0/* > > Modified: head/sys/kern/kern_clocksource.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/kern/kern_clocksource.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/kern/kern_clocksource.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -135,7 +135,7 @@ struct pcpu_state { > =A0 =A0 =A0 =A0int =A0 =A0 =A0 =A0 =A0 =A0 idle; =A0 =A0 =A0 =A0 =A0 /* T= his CPU is in idle mode. */ > =A0}; > > -static DPCPU_DEFINE(struct pcpu_state, timerstate); > +STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate); > > =A0#define FREQ2BT(freq, bt) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0{ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > > Modified: head/sys/kern/sched_4bsd.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/kern/sched_4bsd.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/sched_4bsd.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -161,7 +161,7 @@ struct pcpuidlestat { > =A0 =A0 =A0 =A0u_int idlecalls; > =A0 =A0 =A0 =A0u_int oldidlecalls; > =A0}; > -static DPCPU_DEFINE(struct pcpuidlestat, idlestat); > +STATIC_DPCPU_DEFINE(struct pcpuidlestat, idlestat); > > =A0static void > =A0setup_runqs(void) > > Modified: head/sys/kern/subr_pcpu.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/kern/subr_pcpu.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/subr_pcpu.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -70,7 +70,7 @@ struct dpcpu_free { > =A0 =A0 =A0 =A0TAILQ_ENTRY(dpcpu_free) df_link; > =A0}; > > -static DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); > +STATIC_DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); > =A0static TAILQ_HEAD(, dpcpu_free) dpcpu_head =3D TAILQ_HEAD_INITIALIZER(= dpcpu_head); > =A0static struct sx dpcpu_lock; > =A0uintptr_t dpcpu_off[MAXCPU]; > > Modified: head/sys/mips/mips/tick.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/mips/mips/tick.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/mips/mips/tick.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -57,13 +57,13 @@ uint64_t counter_freq; > > =A0struct timecounter *platform_timecounter; > > -static DPCPU_DEFINE(uint32_t, cycles_per_tick); > +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); > =A0static uint32_t cycles_per_usec; > > -static DPCPU_DEFINE(volatile uint32_t, counter_upper); > -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > -static DPCPU_DEFINE(uint32_t, compare_ticks); > -static DPCPU_DEFINE(uint32_t, lost_ticks); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); > +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); > > =A0struct clock_softc { > =A0 =A0 =A0 =A0int intr_rid; > > Modified: head/sys/mips/rmi/tick.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/mips/rmi/tick.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/mips/rmi/tick.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -59,13 +59,13 @@ uint64_t counter_freq; > > =A0struct timecounter *platform_timecounter; > > -static DPCPU_DEFINE(uint32_t, cycles_per_tick); > +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); > =A0static uint32_t cycles_per_usec; > > -static DPCPU_DEFINE(volatile uint32_t, counter_upper); > -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > -static DPCPU_DEFINE(uint32_t, compare_ticks); > -static DPCPU_DEFINE(uint32_t, lost_ticks); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); > +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); > > =A0struct clock_softc { > =A0 =A0 =A0 =A0int intr_rid; > > Modified: head/sys/net/flowtable.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/net/flowtable.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/flowtable.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -184,10 +184,10 @@ struct flowtable { > =A0} __aligned(CACHE_LINE_SIZE); > > =A0static struct proc *flowcleanerproc; > -static VNET_DEFINE(struct flowtable *, flow_list_head); > -static VNET_DEFINE(uint32_t, flow_hashjitter); > -static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); > -static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); > +STATIC_VNET_DEFINE(struct flowtable *, flow_list_head); > +STATIC_VNET_DEFINE(uint32_t, flow_hashjitter); > +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone); > +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone); > > =A0#define =A0 =A0 =A0 =A0V_flow_list_head =A0 =A0 =A0 =A0VNET(flow_list_= head) > =A0#define =A0 =A0 =A0 =A0V_flow_hashjitter =A0 =A0 =A0 VNET(flow_hashjit= ter) > @@ -230,13 +230,13 @@ do { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0* - idetach() cleanup for options VIMAGE builds. > =A0*/ > =A0VNET_DEFINE(int, flowtable_enable) =3D 1; > -static VNET_DEFINE(int, flowtable_debug); > -static VNET_DEFINE(int, flowtable_syn_expire) =3D SYN_IDLE; > -static VNET_DEFINE(int, flowtable_udp_expire) =3D UDP_IDLE; > -static VNET_DEFINE(int, flowtable_fin_wait_expire) =3D FIN_WAIT_IDLE; > -static VNET_DEFINE(int, flowtable_tcp_expire) =3D TCP_IDLE; > -static VNET_DEFINE(int, flowtable_nmbflows); > -static VNET_DEFINE(int, flowtable_ready) =3D 0; > +STATIC_VNET_DEFINE(int, flowtable_debug); > +STATIC_VNET_DEFINE(int, flowtable_syn_expire) =3D SYN_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_udp_expire) =3D UDP_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) =3D FIN_WAIT_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_tcp_expire) =3D TCP_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_nmbflows); > +STATIC_VNET_DEFINE(int, flowtable_ready) =3D 0; > > =A0#define =A0 =A0 =A0 =A0V_flowtable_enable =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(flowtable_enable) > =A0#define =A0 =A0 =A0 =A0V_flowtable_debug =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(flowtable_debug) > > Modified: head/sys/net/if.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/net/if.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(r21531= 6) > +++ head/sys/net/if.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(r21531= 7) > @@ -183,7 +183,7 @@ int ifqmaxlen =3D IFQ_MAXLEN; > =A0VNET_DEFINE(struct ifnethead, ifnet); =A0/* depend on static init XXX = */ > =A0VNET_DEFINE(struct ifgrouphead, ifg_head); > > -static VNET_DEFINE(int, if_indexlim) =3D 8; > +STATIC_VNET_DEFINE(int, if_indexlim) =3D 8; > > =A0/* Table of ifnet by index. */ > =A0VNET_DEFINE(struct ifindex_entry *, ifindex_table); > > Modified: head/sys/net/if_clone.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/net/if_clone.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/if_clone.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -56,7 +56,7 @@ static int =A0 =A0if_clone_createif(struct if_c > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0caddr_t params); > > =A0static struct mtx =A0 =A0 =A0if_cloners_mtx; > -static VNET_DEFINE(int, if_cloners_count); > +STATIC_VNET_DEFINE(int, if_cloners_count); > =A0VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); > > =A0#define =A0 =A0 =A0 =A0V_if_cloners_count =A0 =A0 =A0VNET(if_cloners_c= ount) > > Modified: head/sys/net/if_ethersubr.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/net/if_ethersubr.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/net/if_ethersubr.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* > =A0#if defined(INET) || defined(INET6) > =A0int > =A0ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); > -static VNET_DEFINE(int, ether_ipfw); > +STATIC_VNET_DEFINE(int, ether_ipfw); > =A0#define =A0 =A0 =A0 =A0V_ether_ipfw =A0 =A0VNET(ether_ipfw) > =A0#endif > > > Modified: head/sys/net/if_gif.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/net/if_gif.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/if_gif.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -94,7 +94,7 @@ > =A0*/ > =A0static struct mtx gif_mtx; > =A0static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); > -static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); > +STATIC_VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); > =A0#define =A0 =A0 =A0 =A0V_gif_softc_list =A0 =A0 =A0 =A0VNET(gif_softc_= list) > > =A0void =A0 (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af= ); > @@ -124,7 +124,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL > =A0*/ > =A0#define MAX_GIF_NEST 1 > =A0#endif > -static VNET_DEFINE(int, max_gif_nesting) =3D MAX_GIF_NEST; > +STATIC_VNET_DEFINE(int, max_gif_nesting) =3D MAX_GIF_NEST; > =A0#define =A0 =A0 =A0 =A0V_max_gif_nesting =A0 =A0 =A0 VNET(max_gif_nest= ing) > =A0SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); > @@ -135,9 +135,9 @@ SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, > =A0* we allow control over this check here. > =A0*/ > =A0#ifdef XBONEHACK > -static VNET_DEFINE(int, parallel_tunnels) =3D 1; > +STATIC_VNET_DEFINE(int, parallel_tunnels) =3D 1; > =A0#else > -static VNET_DEFINE(int, parallel_tunnels) =3D 0; > +STATIC_VNET_DEFINE(int, parallel_tunnels) =3D 0; > =A0#endif > =A0#define =A0 =A0 =A0 =A0V_parallel_tunnels =A0 =A0 =A0VNET(parallel_tun= nels) > =A0SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, > > Modified: head/sys/net/if_llatbl.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/net/if_llatbl.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/if_llatbl.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); > > =A0MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables"); > > -static VNET_DEFINE(SLIST_HEAD(, lltable), lltables); > +STATIC_VNET_DEFINE(SLIST_HEAD(, lltable), lltables); > =A0#define =A0 =A0 =A0 =A0V_lltables =A0 =A0 =A0VNET(lltables) > > =A0extern void arprequest(struct ifnet *, struct in_addr *, struct in_add= r *, > > Modified: head/sys/net/if_loop.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/net/if_loop.c =A0 =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/if_loop.c =A0 =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifne > =A0VNET_DEFINE(struct ifnet *, loif); =A0 =A0 /* Used externally */ > > =A0#ifdef VIMAGE > -static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); > -static VNET_DEFINE(struct if_clone, lo_cloner); > +STATIC_VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); > +STATIC_VNET_DEFINE(struct if_clone, lo_cloner); > =A0#define =A0 =A0 =A0 =A0V_lo_cloner_data =A0 =A0 =A0 =A0VNET(lo_cloner_= data) > =A0#define =A0 =A0 =A0 =A0V_lo_cloner =A0 =A0 =A0 =A0 =A0 =A0 VNET(lo_clo= ner) > =A0#endif > > Modified: head/sys/net/route.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/net/route.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/route.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash); =A0 =A0 =A0 =A0 =A0/* rout= es no > =A0*/ > =A0#define RNTORT(p) =A0 =A0 =A0((struct rtentry *)(p)) > > -static VNET_DEFINE(uma_zone_t, rtzone); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * Routing table UMA zone. */ > +STATIC_VNET_DEFINE(uma_zone_t, rtzone); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * Routing table UMA zone. */ > =A0#define =A0 =A0 =A0 =A0V_rtzone =A0 =A0 =A0 =A0VNET(rtzone) > > =A0#if 0 > > Modified: head/sys/net/vnet.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/net/vnet.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(r215316) > +++ head/sys/net/vnet.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(r215317) > @@ -177,7 +177,7 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", > =A0* Space to store virtualized global variables from loadable kernel mod= ules, > =A0* and the free list to manage it. > =A0*/ > -static VNET_DEFINE(char, modspace[VNET_MODMIN]); > +STATIC_VNET_DEFINE(char, modspace[VNET_MODMIN]); > > =A0/* > =A0* Global lists of subsystem constructor and destructors for vnets. =A0= They are > > Modified: head/sys/netgraph/ng_base.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/netgraph/ng_base.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netgraph/ng_base.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -171,7 +171,7 @@ static struct mtx =A0 ng_typelist_mtx; > > =A0/* Hash related definitions */ > =A0/* XXX Don't need to initialise them because it's a LIST */ > -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); > +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); > =A0#define =A0 =A0 =A0 =A0V_ng_ID_hash =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(ng_ID_hash) > > =A0static struct mtx =A0 =A0 =A0ng_idhash_mtx; > @@ -189,7 +189,7 @@ static struct mtx =A0 ng_idhash_mtx; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > =A0 =A0 =A0 =A0} while (0) > > -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]= ); > +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]= ); > =A0#define =A0 =A0 =A0 =A0V_ng_name_hash =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(ng_name_hash) > > =A0static struct mtx =A0 =A0 =A0ng_namehash_mtx; > @@ -359,7 +359,7 @@ ng_alloc_node(void) > =A0#define TRAP_ERROR() > =A0#endif > > -static VNET_DEFINE(ng_ID_t, nextID) =3D 1; > +STATIC_VNET_DEFINE(ng_ID_t, nextID) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_nextID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0VNET(nextID) > > =A0#ifdef INVARIANTS > > Modified: head/sys/netgraph/ng_eiface.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/netgraph/ng_eiface.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netgraph/ng_eiface.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -114,7 +114,7 @@ static struct ng_type typestruct =3D { > =A0}; > =A0NETGRAPH_INIT(eiface, &typestruct); > > -static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); > +STATIC_VNET_DEFINE(struct unrhdr *, ng_eiface_unit); > =A0#define =A0 =A0 =A0 =A0V_ng_eiface_unit =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(ng_eiface_unit) > > =A0/*********************************************************************= *** > > Modified: head/sys/netgraph/ng_iface.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/netgraph/ng_iface.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netgraph/ng_iface.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -210,7 +210,7 @@ static struct ng_type typestruct =3D { > =A0}; > =A0NETGRAPH_INIT(iface, &typestruct); > > -static VNET_DEFINE(struct unrhdr *, ng_iface_unit); > +STATIC_VNET_DEFINE(struct unrhdr *, ng_iface_unit); > =A0#define =A0 =A0 =A0 =A0V_ng_iface_unit =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(ng_iface_unit) > > =A0/*********************************************************************= *** > > Modified: head/sys/netinet/if_ether.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/netinet/if_ether.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/if_ether.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, in > =A0SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); > > =A0/* timer values */ > -static VNET_DEFINE(int, arpt_keep) =3D (20*60); =A0/* once resolved, goo= d for 20 > +STATIC_VNET_DEFINE(int, arpt_keep) =3D (20*60); =A0/* once resolved, goo= d for 20 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 * minutes */ > -static VNET_DEFINE(int, arp_maxtries) =3D 5; > +STATIC_VNET_DEFINE(int, arp_maxtries) =3D 5; > =A0VNET_DEFINE(int, useloopback) =3D 1; =A0 =A0 /* use loopback interface= for > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 * local traffic */ > -static VNET_DEFINE(int, arp_proxyall) =3D 0; > -static VNET_DEFINE(int, arpt_down) =3D 20; =A0 =A0 =A0/* keep incomplete= entries for > +STATIC_VNET_DEFINE(int, arp_proxyall) =3D 0; > +STATIC_VNET_DEFINE(int, arpt_down) =3D 20; =A0 =A0 =A0/* keep incomplete= entries for > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 * 20 seconds */ > =A0VNET_DEFINE(struct arpstat, arpstat); =A0/* ARP statistics, see if_arp= .h */ > > -static VNET_DEFINE(int, arp_maxhold) =3D 1; > +STATIC_VNET_DEFINE(int, arp_maxhold) =3D 1; > > =A0#define =A0 =A0 =A0 =A0V_arpt_keep =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_k= eep) > =A0#define =A0 =A0 =A0 =A0V_arpt_down =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_d= own) > > Modified: head/sys/netinet/igmp.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/netinet/igmp.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/igmp.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp stat > =A0* FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address sele= ction > =A0* policy to control the address used by IGMP on the link. > =A0*/ > -static VNET_DEFINE(int, interface_timers_running); =A0 =A0 /* IGMPv3 gen= eral > +STATIC_VNET_DEFINE(int, interface_timers_running); =A0 =A0 /* IGMPv3 gen= eral > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * query response */ > -static VNET_DEFINE(int, state_change_timers_running); =A0/* IGMPv3 state= -change > +STATIC_VNET_DEFINE(int, state_change_timers_running); =A0/* IGMPv3 state= -change > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * retransmit */ > -static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host > +STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * report; IGMPv3 g/sg > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * query response */ > > @@ -218,24 +218,24 @@ static VNET_DEFINE(int, current_state_ti > =A0#define =A0 =A0 =A0 =A0V_state_change_timers_running =A0 VNET(state_ch= ange_timers_running) > =A0#define =A0 =A0 =A0 =A0V_current_state_timers_running =A0VNET(current_= state_timers_running) > > -static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); > -static VNET_DEFINE(struct igmpstat, igmpstat) =3D { > +STATIC_VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); > +STATIC_VNET_DEFINE(struct igmpstat, igmpstat) =3D { > =A0 =A0 =A0 =A0.igps_version =3D IGPS_VERSION_3, > =A0 =A0 =A0 =A0.igps_len =3D sizeof(struct igmpstat), > =A0}; > -static VNET_DEFINE(struct timeval, igmp_gsrdelay) =3D {10, 0}; > +STATIC_VNET_DEFINE(struct timeval, igmp_gsrdelay) =3D {10, 0}; > > =A0#define =A0 =A0 =A0 =A0V_igi_head =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(igi_head) > =A0#define =A0 =A0 =A0 =A0V_igmpstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(igmpstat) > =A0#define =A0 =A0 =A0 =A0V_igmp_gsrdelay =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(igmp_gsrdelay) > > -static VNET_DEFINE(int, igmp_recvifkludge) =3D 1; > -static VNET_DEFINE(int, igmp_sendra) =3D 1; > -static VNET_DEFINE(int, igmp_sendlocal) =3D 1; > -static VNET_DEFINE(int, igmp_v1enable) =3D 1; > -static VNET_DEFINE(int, igmp_v2enable) =3D 1; > -static VNET_DEFINE(int, igmp_legacysupp); > -static VNET_DEFINE(int, igmp_default_version) =3D IGMP_VERSION_3; > +STATIC_VNET_DEFINE(int, igmp_recvifkludge) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_sendra) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_sendlocal) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_v1enable) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_v2enable) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_legacysupp); > +STATIC_VNET_DEFINE(int, igmp_default_version) =3D IGMP_VERSION_3; > > =A0#define =A0 =A0 =A0 =A0V_igmp_recvifkludge =A0 =A0 =A0 =A0 =A0 =A0 VNE= T(igmp_recvifkludge) > =A0#define =A0 =A0 =A0 =A0V_igmp_sendra =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 VNET(igmp_sendra) > > Modified: head/sys/netinet/in.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/netinet/in.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/netinet/in.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -76,12 +76,12 @@ static int =A0in_ifinit(struct ifnet *, > =A0 =A0 =A0 =A0 =A0 =A0struct in_ifaddr *, struct sockaddr_in *, int); > =A0static void =A0 =A0in_purgemaddrs(struct ifnet *); > > -static VNET_DEFINE(int, subnetsarelocal); > +STATIC_VNET_DEFINE(int, subnetsarelocal); > =A0#define =A0 =A0 =A0 =A0V_subnetsarelocal =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(subnetsarelocal) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(subnetsarelocal), 0, > =A0 =A0 =A0 =A0"Treat all subnets as directly connected"); > -static VNET_DEFINE(int, sameprefixcarponly); > +STATIC_VNET_DEFINE(int, sameprefixcarponly); > =A0#define =A0 =A0 =A0 =A0V_sameprefixcarponly =A0 =A0 =A0 =A0 =A0 =A0VNE= T(sameprefixcarponly) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG= _RW, > =A0 =A0 =A0 =A0&VNET_NAME(sameprefixcarponly), 0, > > Modified: head/sys/netinet/in_pcb.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/netinet/in_pcb.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/in_pcb.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) =3D 10; > =A0VNET_DEFINE(int, ipport_randomtime) =3D 45; =A0 =A0 =A0/* user control= led via sysctl */ > =A0VNET_DEFINE(int, ipport_stoprandom); =A0 =A0 =A0 =A0 =A0 /* toggled by= ipport_tick */ > =A0VNET_DEFINE(int, ipport_tcpallocs); > -static VNET_DEFINE(int, ipport_tcplastcount); > +STATIC_VNET_DEFINE(int, ipport_tcplastcount); > > =A0#define =A0 =A0 =A0 =A0V_ipport_tcplastcount =A0 =A0 =A0 =A0 =A0 VNET(= ipport_tcplastcount) > > > Modified: head/sys/netinet/in_rmx.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/netinet/in_rmx.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/in_rmx.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_no > =A0 =A0 =A0 =A0return rn; > =A0} > > -static VNET_DEFINE(int, rtq_reallyold) =3D 60*60; /* one hour is "really= old" */ > +STATIC_VNET_DEFINE(int, rtq_reallyold) =3D 60*60; /* one hour is "really= old" */ > =A0#define =A0 =A0 =A0 =A0V_rtq_reallyold =A0 =A0 =A0 =A0 VNET(rtq_really= old) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(rtq_reallyold), 0, > =A0 =A0 "Default expiration time on dynamically learned routes"); > > =A0/* never automatically crank down to less */ > -static VNET_DEFINE(int, rtq_minreallyold) =3D 10; > +STATIC_VNET_DEFINE(int, rtq_minreallyold) =3D 10; > =A0#define =A0 =A0 =A0 =A0V_rtq_minreallyold =A0 =A0 =A0VNET(rtq_minreall= yold) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_= RW, > =A0 =A0 &VNET_NAME(rtq_minreallyold), 0, > =A0 =A0 "Minimum time to attempt to hold onto dynamically learned routes"= ); > > =A0/* 128 cached routes is "too many" */ > -static VNET_DEFINE(int, rtq_toomany) =3D 128; > +STATIC_VNET_DEFINE(int, rtq_toomany) =3D 128; > =A0#define =A0 =A0 =A0 =A0V_rtq_toomany =A0 =A0 =A0 =A0 =A0 VNET(rtq_toom= any) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW= , > =A0 =A0 &VNET_NAME(rtq_toomany), 0, > @@ -240,8 +240,8 @@ in_rtqkill(struct radix_node *rn, void * > =A0} > > =A0#define RTQ_TIMEOUT =A0 =A060*10 =A0 /* run no less than once every te= n minutes */ > -static VNET_DEFINE(int, rtq_timeout) =3D RTQ_TIMEOUT; > -static VNET_DEFINE(struct callout, rtq_timer); > +STATIC_VNET_DEFINE(int, rtq_timeout) =3D RTQ_TIMEOUT; > +STATIC_VNET_DEFINE(struct callout, rtq_timer); > > =A0#define =A0 =A0 =A0 =A0V_rtq_timeout =A0 =A0 =A0 =A0 =A0 VNET(rtq_time= out) > =A0#define =A0 =A0 =A0 =A0V_rtq_timer =A0 =A0 =A0 =A0 =A0 =A0 VNET(rtq_ti= mer) > > Modified: head/sys/netinet/ip_divert.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/netinet/ip_divert.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_divert.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -105,8 +105,8 @@ __FBSDID("$FreeBSD$"); > =A0*/ > > =A0/* Internal variables. */ > -static VNET_DEFINE(struct inpcbhead, divcb); > -static VNET_DEFINE(struct inpcbinfo, divcbinfo); > +STATIC_VNET_DEFINE(struct inpcbhead, divcb); > +STATIC_VNET_DEFINE(struct inpcbinfo, divcbinfo); > > =A0#define =A0 =A0 =A0 =A0V_divcb =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 VNET(divcb) > =A0#define =A0 =A0 =A0 =A0V_divcbinfo =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(divcbinfo) > > Modified: head/sys/netinet/ip_fastfwd.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/netinet/ip_fastfwd.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_fastfwd.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, ipfastforward_active); > +STATIC_VNET_DEFINE(int, ipfastforward_active); > =A0#define =A0 =A0 =A0 =A0V_ipfastforward_active =A0 =A0 =A0 =A0 =A0VNET(= ipfastforward_active) > > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, > > Modified: head/sys/netinet/ip_icmp.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/netinet/ip_icmp.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/ip_icmp.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -80,55 +80,55 @@ VNET_DEFINE(struct icmpstat, icmpstat); > =A0SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpstat), icmpstat, ""); > > -static VNET_DEFINE(int, icmpmaskrepl) =3D 0; > +STATIC_VNET_DEFINE(int, icmpmaskrepl) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpmaskrepl =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpmaskrepl) > =A0SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW= , > =A0 =A0 =A0 =A0&VNET_NAME(icmpmaskrepl), 0, > =A0 =A0 =A0 =A0"Reply to ICMP Address Mask Request packets."); > > -static VNET_DEFINE(u_int, icmpmaskfake) =3D 0; > +STATIC_VNET_DEFINE(u_int, icmpmaskfake) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpmaskfake =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpmaskfake) > =A0SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpmaskfake), 0, > =A0 =A0 =A0 =A0"Fake reply to ICMP Address Mask Request packets."); > > -static VNET_DEFINE(int, drop_redirect) =3D 0; > +STATIC_VNET_DEFINE(int, drop_redirect) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_drop_redirect =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(drop_redirect) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(drop_redirect), 0, > =A0 =A0 =A0 =A0"Ignore ICMP redirects"); > > -static VNET_DEFINE(int, log_redirect) =3D 0; > +STATIC_VNET_DEFINE(int, log_redirect) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_log_redirect =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(log_redirect) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(log_redirect), 0, > =A0 =A0 =A0 =A0"Log ICMP redirects to the console"); > > -static VNET_DEFINE(int, icmplim) =3D 200; > +STATIC_VNET_DEFINE(int, icmplim) =3D 200; > =A0#define =A0 =A0 =A0 =A0V_icmplim =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 VNET(icmplim) > =A0SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmplim), 0, > =A0 =A0 =A0 =A0"Maximum number of ICMP responses per second"); > > -static VNET_DEFINE(int, icmplim_output) =3D 1; > +STATIC_VNET_DEFINE(int, icmplim_output) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_icmplim_output =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmplim_output) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmplim_output), 0, > =A0 =A0 =A0 =A0"Enable rate limiting of ICMP responses"); > > -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); > +STATIC_VNET_DEFINE(char, reply_src[IFNAMSIZ]); > =A0#define =A0 =A0 =A0 =A0V_reply_src =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(reply_src) > =A0SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(reply_src), IFNAMSIZ, > =A0 =A0 =A0 =A0"icmp reply source for non-local packets."); > > -static VNET_DEFINE(int, icmp_rfi) =3D 0; > +STATIC_VNET_DEFINE(int, icmp_rfi) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmp_rfi =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(icmp_rfi) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLA= G_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmp_rfi), 0, > =A0 =A0 =A0 =A0"ICMP reply from incoming interface for non-local packets"= ); > > -static VNET_DEFINE(int, icmp_quotelen) =3D 8; > +STATIC_VNET_DEFINE(int, icmp_quotelen) =3D 8; > =A0#define =A0 =A0 =A0 =A0V_icmp_quotelen =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(icmp_quotelen) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmp_quotelen), 0, > @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO > =A0/* > =A0* ICMP broadcast echo sysctl > =A0*/ > -static VNET_DEFINE(int, icmpbmcastecho) =3D 0; > +STATIC_VNET_DEFINE(int, icmpbmcastecho) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpbmcastecho =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpbmcastecho) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpbmcastecho), 0, > > Modified: head/sys/netinet/ip_input.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/netinet/ip_input.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/ip_input.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORW > =A0 =A0 &VNET_NAME(ipforwarding), 0, > =A0 =A0 "Enable IP forwarding between interfaces"); > > -static VNET_DEFINE(int, ipsendredirects) =3D 1; =A0/* XXX */ > +STATIC_VNET_DEFINE(int, ipsendredirects) =3D 1; =A0/* XXX */ > =A0#define =A0 =A0 =A0 =A0V_ipsendredirects =A0 =A0 =A0 VNET(ipsendredire= cts) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_R= W, > =A0 =A0 &VNET_NAME(ipsendredirects), 0, > @@ -107,13 +107,13 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFT > =A0 =A0 &VNET_NAME(ip_defttl), 0, > =A0 =A0 "Maximum TTL on IP packets"); > > -static VNET_DEFINE(int, ip_keepfaith); > +STATIC_VNET_DEFINE(int, ip_keepfaith); > =A0#define =A0 =A0 =A0 =A0V_ip_keepfaith =A0 =A0 =A0 =A0 =A0VNET(ip_keepf= aith) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_keepfaith), 0, > =A0 =A0 "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); > > -static VNET_DEFINE(int, ip_sendsourcequench); > +STATIC_VNET_DEFINE(int, ip_sendsourcequench); > =A0#define =A0 =A0 =A0 =A0V_ip_sendsourcequench =A0 VNET(ip_sendsourceque= nch) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_sendsourcequench), 0, > @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, > =A0* to the loopback interface instead of the interface where the > =A0* packets for those addresses are received. > =A0*/ > -static VNET_DEFINE(int, ip_checkinterface); > +STATIC_VNET_DEFINE(int, ip_checkinterface); > =A0#define =A0 =A0 =A0 =A0V_ip_checkinterface =A0 =A0 VNET(ip_checkinterf= ace) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_checkinterface), 0, > @@ -164,8 +164,8 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_S > =A0 =A0 &VNET_NAME(ipstat), ipstat, > =A0 =A0 "IP statistics (struct ipstat, netinet/ip_var.h)"); > > -static VNET_DEFINE(uma_zone_t, ipq_zone); > -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); > +STATIC_VNET_DEFINE(uma_zone_t, ipq_zone); > +STATIC_VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); > =A0static struct mtx ipqlock; > > =A0#define =A0 =A0 =A0 =A0V_ipq_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(ipq_= zone) > @@ -180,15 +180,15 @@ static void =A0 =A0 =A0 maxnipq_update(void); > =A0static void =A0 =A0ipq_zone_change(void *); > =A0static void =A0 =A0ip_drain_locked(void); > > -static VNET_DEFINE(int, maxnipq); =A0/* Administrative limit on # reass = queues. */ > -static VNET_DEFINE(int, nipq); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Total = # of reass queues */ > +STATIC_VNET_DEFINE(int, maxnipq); =A0/* Administrative limit on # reass = queues. */ > +STATIC_VNET_DEFINE(int, nipq); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Total = # of reass queues */ > =A0#define =A0 =A0 =A0 =A0V_maxnipq =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(maxn= ipq) > =A0#define =A0 =A0 =A0 =A0V_nipq =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(= nipq) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(nipq), 0, > =A0 =A0 "Current number of IPv4 fragment reassembly queue entries"); > > -static VNET_DEFINE(int, maxfragsperpacket); > +STATIC_VNET_DEFINE(int, maxfragsperpacket); > =A0#define =A0 =A0 =A0 =A0V_maxfragsperpacket =A0 =A0 VNET(maxfragsperpac= ket) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(maxfragsperpacket), 0, > @@ -209,7 +209,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, > =A0#endif > > =A0#ifdef FLOWTABLE > -static VNET_DEFINE(int, ip_output_flowtable_size) =3D 2048; > +STATIC_VNET_DEFINE(int, ip_output_flowtable_size) =3D 2048; > =A0VNET_DEFINE(struct flowtable *, ip_ft); > =A0#define =A0 =A0 =A0 =A0V_ip_output_flowtable_size =A0 =A0 =A0VNET(ip_o= utput_flowtable_size) > > @@ -1719,7 +1719,7 @@ makedummy: > =A0* locking. =A0This code remains in ip_input.c as ip_mroute.c is option= ally > =A0* compiled. > =A0*/ > -static VNET_DEFINE(int, ip_rsvp_on); > +STATIC_VNET_DEFINE(int, ip_rsvp_on); > =A0VNET_DEFINE(struct socket *, ip_rsvpd); > > =A0#define =A0 =A0 =A0 =A0V_ip_rsvp_on =A0 =A0 =A0 =A0 =A0 =A0VNET(ip_rsv= p_on) > > Modified: head/sys/netinet/ip_ipsec.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/netinet/ip_ipsec.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/ip_ipsec.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -72,9 +72,9 @@ extern =A0 =A0 =A0 =A0struct protosw inetsw[]; > > =A0#ifdef IPSEC > =A0#ifdef IPSEC_FILTERTUNNEL > -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 1; > +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 1; > =A0#else > -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 0; > +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 0; > =A0#endif > =A0#define =A0 =A0 =A0 =A0V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtert= unnel) > > > Modified: head/sys/netinet/ip_mroute.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/netinet/ip_mroute.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_mroute.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VIFI_INVALID =A0 =A0((vifi_t) -= 1) > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0M_HASCL(m) =A0 =A0 =A0((m)->m_f= lags & M_EXT) > > -static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed thi= s */ > +STATIC_VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed thi= s */ > =A0#define =A0 =A0 =A0 =A0V_last_tv_sec =A0 VNET(last_tv_sec) > > =A0static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cac= he"); > @@ -145,14 +145,14 @@ static struct mtx mrouter_mtx; > =A0static int ip_mrouter_cnt; =A0 =A0 /* # of vnets with active mrouters = */ > =A0static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets= */ > > -static VNET_DEFINE(struct mrtstat, mrtstat); > +STATIC_VNET_DEFINE(struct mrtstat, mrtstat); > =A0#define =A0 =A0 =A0 =A0V_mrtstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(mrts= tat) > =A0SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(mrtstat), mrtstat, > =A0 =A0 "IPv4 Multicast Forwarding Statistics (struct mrtstat, " > =A0 =A0 "netinet/ip_mroute.h)"); > > -static VNET_DEFINE(u_long, mfchash); > +STATIC_VNET_DEFINE(u_long, mfchash); > =A0#define =A0 =A0 =A0 =A0V_mfchash =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(mfch= ash) > =A0#define =A0 =A0 =A0 =A0MFCHASH(a, g) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > =A0 =A0 =A0 =A0((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ > @@ -160,9 +160,9 @@ static VNET_DEFINE(u_long, mfchash); > =A0#define =A0 =A0 =A0 =A0MFCHASHSIZE =A0 =A0 256 > > =A0static u_long mfchashsize; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* = Hash size */ > -static VNET_DEFINE(u_char *, nexpire); =A0 =A0 =A0 =A0 /* 0..mfchashsize= -1 */ > +STATIC_VNET_DEFINE(u_char *, nexpire); =A0 =A0 =A0 =A0 /* 0..mfchashsize= -1 */ > =A0#define =A0 =A0 =A0 =A0V_nexpire =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(nexp= ire) > -static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); > +STATIC_VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); > =A0#define =A0 =A0 =A0 =A0V_mfchashtbl =A0 =A0 =A0 =A0 =A0 =A0VNET(mfchas= htbl) > > =A0static struct mtx mfc_mtx; > @@ -173,9 +173,9 @@ static struct mtx mfc_mtx; > =A0 =A0 =A0 =A0mtx_init(&mfc_mtx, "IPv4 multicast forwarding cache", NULL= , MTX_DEF) > =A0#define =A0 =A0 =A0 =A0MFC_LOCK_DESTROY() =A0 =A0 =A0mtx_destroy(&mfc_= mtx) > > -static VNET_DEFINE(vifi_t, numvifs); > +STATIC_VNET_DEFINE(vifi_t, numvifs); > =A0#define =A0 =A0 =A0 =A0V_numvifs =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(numv= ifs) > -static VNET_DEFINE(struct vif, viftable[MAXVIFS]); > +STATIC_VNET_DEFINE(struct vif, viftable[MAXVIFS]); > =A0#define =A0 =A0 =A0 =A0V_viftable =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(vift= able) > =A0SYSCTL_VNET_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(viftable), sizeof(V_viftable), "S,vif[MAXVIFS]", > @@ -191,7 +191,7 @@ static struct mtx vif_mtx; > > =A0static eventhandler_tag if_detach_event_tag =3D NULL; > > -static VNET_DEFINE(struct callout, expire_upcalls_ch); > +STATIC_VNET_DEFINE(struct callout, expire_upcalls_ch); > =A0#define =A0 =A0 =A0 =A0V_expire_upcalls_ch =A0 =A0 VNET(expire_upcalls= _ch) > > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0EXPIRE_TIMEOUT =A0(hz / 4) =A0 = =A0 =A0 =A0/* 4x / second =A0 =A0 =A0 =A0 =A0*/ > @@ -206,9 +206,9 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter > =A0* expiration time. Periodically, the entries are analysed and processe= d. > =A0*/ > =A0#define =A0 =A0 =A0 =A0BW_METER_BUCKETS =A0 =A0 =A0 =A01024 > -static VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); > +STATIC_VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); > =A0#define =A0 =A0 =A0 =A0V_bw_meter_timers =A0 =A0 =A0 VNET(bw_meter_tim= ers) > -static VNET_DEFINE(struct callout, bw_meter_ch); > +STATIC_VNET_DEFINE(struct callout, bw_meter_ch); > =A0#define =A0 =A0 =A0 =A0V_bw_meter_ch =A0 =A0 =A0 =A0 =A0 VNET(bw_meter= _ch) > =A0#define =A0 =A0 =A0 =A0BW_METER_PERIOD (hz) =A0 =A0 =A0 =A0 =A0 =A0/* = periodical handling of bw meters */ > > @@ -216,16 +216,16 @@ static VNET_DEFINE(struct callout, bw_me > =A0* Pending upcalls are stored in a vector which is flushed when > =A0* full, or periodically > =A0*/ > -static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); > +STATIC_VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls =A0 =A0 =A0 =A0 =A0 =A0VNET(bw_upc= alls) > -static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ > +STATIC_VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_n =A0 =A0 =A0 =A0 =A0VNET(bw_upcal= ls_n) > -static VNET_DEFINE(struct callout, bw_upcalls_ch); > +STATIC_VNET_DEFINE(struct callout, bw_upcalls_ch); > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_ch =A0 =A0 =A0 =A0 VNET(bw_upcalls= _ch) > > =A0#define BW_UPCALLS_PERIOD (hz) =A0 =A0 =A0 =A0 /* periodical flush of = bw upcalls */ > > -static VNET_DEFINE(struct pimstat, pimstat); > +STATIC_VNET_DEFINE(struct pimstat, pimstat); > =A0#define =A0 =A0 =A0 =A0V_pimstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(pims= tat) > > =A0SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM"); > @@ -296,9 +296,9 @@ static struct pim_encap_pimhdr pim_encap > =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* flags */ > =A0}; > > -static VNET_DEFINE(vifi_t, reg_vif_num) =3D VIFI_INVALID; > +STATIC_VNET_DEFINE(vifi_t, reg_vif_num) =3D VIFI_INVALID; > =A0#define =A0 =A0 =A0 =A0V_reg_vif_num =A0 =A0 =A0 =A0 =A0 VNET(reg_vif_= num) > -static VNET_DEFINE(struct ifnet, multicast_register_if); > +STATIC_VNET_DEFINE(struct ifnet, multicast_register_if); > =A0#define =A0 =A0 =A0 =A0V_multicast_register_if VNET(multicast_register= _if) > > =A0/* > @@ -367,9 +367,9 @@ static const uint32_t mrt_api_support =3D > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_FLAGS_BORDER_VIF | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_RP | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_BW_UPCALL); > -static VNET_DEFINE(uint32_t, mrt_api_config); > +STATIC_VNET_DEFINE(uint32_t, mrt_api_config); > =A0#define =A0 =A0 =A0 =A0V_mrt_api_config =A0 =A0 =A0 =A0VNET(mrt_api_co= nfig) > -static VNET_DEFINE(int, pim_assert_enabled); > +STATIC_VNET_DEFINE(int, pim_assert_enabled); > =A0#define =A0 =A0 =A0 =A0V_pim_assert_enabled =A0 =A0VNET(pim_assert_ena= bled) > =A0static struct timeval pim_assert_interval =3D { 3, 0 }; =A0/* Rate lim= it */ > > > Modified: head/sys/netinet/ipfw/ip_fw2.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/netinet/ipfw/ip_fw2.c =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw2.c =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -100,10 +100,10 @@ __FBSDID("$FreeBSD$"); > =A0*/ > > =A0/* ipfw_vnet_ready controls when we are open for business */ > -static VNET_DEFINE(int, ipfw_vnet_ready) =3D 0; > +STATIC_VNET_DEFINE(int, ipfw_vnet_ready) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_ipfw_vnet_ready =A0 =A0 =A0 VNET(ipfw_vnet_re= ady) > > -static VNET_DEFINE(int, fw_deny_unknown_exthdrs); > +STATIC_VNET_DEFINE(int, fw_deny_unknown_exthdrs); > =A0#define =A0 =A0 =A0 =A0V_fw_deny_unknown_exthdrs =A0 =A0 =A0 VNET(fw_d= eny_unknown_exthdrs) > > =A0#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT > > Modified: head/sys/netinet/ipfw/ip_fw_dynamic.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/netinet/ipfw/ip_fw_dynamic.c =A0 =A0 =A0 Sun Nov 14 20:23:02= 2010 =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_dynamic.c =A0 =A0 =A0 Sun Nov 14 20:38:11= 2010 =A0 =A0 =A0 =A0(r215317) > @@ -118,10 +118,10 @@ __FBSDID("$FreeBSD$"); > =A0/* > =A0* Static variables followed by global ones > =A0*/ > -static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); > -static VNET_DEFINE(u_int32_t, dyn_buckets); > -static VNET_DEFINE(u_int32_t, curr_dyn_buckets); > -static VNET_DEFINE(struct callout, ipfw_timeout); > +STATIC_VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); > +STATIC_VNET_DEFINE(u_int32_t, dyn_buckets); > +STATIC_VNET_DEFINE(u_int32_t, curr_dyn_buckets); > +STATIC_VNET_DEFINE(struct callout, ipfw_timeout); > =A0#define =A0 =A0 =A0 =A0V_ipfw_dyn_v =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(ipfw_dyn_v) > =A0#define =A0 =A0 =A0 =A0V_dyn_buckets =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 VNET(dyn_buckets) > =A0#define =A0 =A0 =A0 =A0V_curr_dyn_buckets =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(curr_dyn_buckets) > @@ -150,12 +150,12 @@ ipfw_dyn_unlock(void) > =A0/* > =A0* Timeouts for various events in handing dynamic rules. > =A0*/ > -static VNET_DEFINE(u_int32_t, dyn_ack_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_syn_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_fin_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_rst_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_short_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_ack_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_syn_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_fin_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_rst_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_udp_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime); > > =A0#define =A0 =A0 =A0 =A0V_dyn_ack_lifetime =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(dyn_ack_lifetime) > =A0#define =A0 =A0 =A0 =A0V_dyn_syn_lifetime =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(dyn_syn_lifetime) > @@ -172,16 +172,16 @@ static VNET_DEFINE(u_int32_t, dyn_short_ > =A0* than dyn_keepalive_period. > =A0*/ > > -static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); > -static VNET_DEFINE(u_int32_t, dyn_keepalive_period); > -static VNET_DEFINE(u_int32_t, dyn_keepalive); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_interval); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_period); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive); > > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive_interval =A0 =A0 =A0 =A0VNET(dy= n_keepalive_interval) > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive_period =A0 =A0 =A0 =A0 =A0VNET(= dyn_keepalive_period) > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(dyn_keepalive) > > -static VNET_DEFINE(u_int32_t, dyn_count); =A0 =A0 =A0/* # of dynamic rul= es */ > -static VNET_DEFINE(u_int32_t, dyn_max); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * max # of dynamic rules */ > +STATIC_VNET_DEFINE(u_int32_t, dyn_count); =A0 =A0 =A0/* # of dynamic rul= es */ > +STATIC_VNET_DEFINE(u_int32_t, dyn_max); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * max # of dynamic rules */ > > =A0#define =A0 =A0 =A0 =A0V_dyn_count =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(dyn_count) > =A0#define =A0 =A0 =A0 =A0V_dyn_max =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 VNET(dyn_max) > > Modified: head/sys/netinet/ipfw/ip_fw_nat.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/netinet/ipfw/ip_fw_nat.c =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_nat.c =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include =A0/* XXX for in_cksum */ > > -static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); > +STATIC_VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); > =A0#define =A0 =A0 =A0 =A0V_ifaddr_event_tag =A0 =A0 =A0VNET(ifaddr_event= _tag) > > =A0static void > > Modified: head/sys/netinet/ipfw/ip_fw_pfil.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/netinet/ipfw/ip_fw_pfil.c =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_pfil.c =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, fw_enable) =3D 1; > +STATIC_VNET_DEFINE(int, fw_enable) =3D 1; > =A0#define V_fw_enable =A0 =A0VNET(fw_enable) > > =A0#ifdef INET6 > -static VNET_DEFINE(int, fw6_enable) =3D 1; > +STATIC_VNET_DEFINE(int, fw6_enable) =3D 1; > =A0#define V_fw6_enable =A0 VNET(fw6_enable) > =A0#endif > > > Modified: head/sys/netinet/siftr.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/netinet/siftr.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/siftr.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -260,7 +260,7 @@ struct siftr_stats > =A0 =A0 =A0 =A0uint32_t nskip_out_dejavu; > =A0}; > > -static DPCPU_DEFINE(struct siftr_stats, ss); > +STATIC_DPCPU_DEFINE(struct siftr_stats, ss); > > =A0static volatile unsigned int siftr_exit_pkt_manager_thread =3D 0; > =A0static unsigned int siftr_enabled =3D 0; > > Modified: head/sys/netinet/tcp_hostcache.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/netinet/tcp_hostcache.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_hostcache.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -106,10 +106,10 @@ __FBSDID("$FreeBSD$"); > =A0#define TCP_HOSTCACHE_EXPIRE =A0 =A0 =A0 =A0 =A0 60*60 =A0 /* one hour= */ > =A0#define TCP_HOSTCACHE_PRUNE =A0 =A0 =A0 =A0 =A0 =A05*60 =A0 =A0/* ever= y 5 minutes */ > > -static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); > +STATIC_VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); > =A0#define =A0 =A0 =A0 =A0V_tcp_hostcache =A0 =A0 =A0 =A0 VNET(tcp_hostca= che) > > -static VNET_DEFINE(struct callout, tcp_hc_callout); > +STATIC_VNET_DEFINE(struct callout, tcp_hc_callout); > =A0#define =A0 =A0 =A0 =A0V_tcp_hc_callout =A0 =A0 =A0 =A0VNET(tcp_hc_cal= lout) > > =A0static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); > > Modified: head/sys/netinet/tcp_reass.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/netinet/tcp_reass.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_reass.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL > =A0SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, > =A0 =A0 "TCP Segment Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_maxseg) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_maxseg) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_maxseg =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(tcp_reass_maxseg) > =A0SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_R= DTUN, > =A0 =A0 &VNET_NAME(tcp_reass_maxseg), 0, &tcp_reass_sysctl_maxseg, "I", > =A0 =A0 "Global maximum number of TCP Segments in Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_qsize) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_qsize) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_qsize =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(tcp_reass_qsize) > =A0SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_R= D, > =A0 =A0 &VNET_NAME(tcp_reass_qsize), 0, &tcp_reass_sysctl_qsize, "I", > =A0 =A0 "Global number of TCP Segments currently in Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_overflows) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_overflows) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_overflows =A0 =A0 =A0 =A0 =A0 VNET(= tcp_reass_overflows) > =A0SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(tcp_reass_overflows), 0, > =A0 =A0 "Global number of TCP Segment Reassembly Queue Overflows"); > > -static VNET_DEFINE(uma_zone_t, tcp_reass_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcp_reass_zone); > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_reass_zone) > > =A0/* Initialize TCP reassembly queue */ > > Modified: head/sys/netinet/tcp_subr.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/netinet/tcp_subr.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/tcp_subr.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); > > -static VNET_DEFINE(int, icmp_may_rst) =3D 1; > +STATIC_VNET_DEFINE(int, icmp_may_rst) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_icmp_may_rst =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmp_may_rst) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(icmp_may_rst), 0, > =A0 =A0 "Certain ICMP unreachable messages may abort connections in SYN_S= ENT"); > > -static VNET_DEFINE(int, tcp_isn_reseed_interval) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_isn_reseed_interval) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_isn_reseed_interval =A0 =A0 =A0 VNET(tcp_= isn_reseed_interval) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_= RW, > =A0 =A0 &VNET_NAME(tcp_isn_reseed_interval), 0, > @@ -241,7 +241,7 @@ struct tcpcb_mem { > =A0 =A0 =A0 =A0struct cc_var =A0 =A0 =A0 =A0 =A0 ccv; > =A0}; > > -static VNET_DEFINE(uma_zone_t, tcpcb_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcpcb_zone); > =A0#define =A0 =A0 =A0 =A0V_tcpcb_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(tcpcb_zone) > > =A0MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers= "); > @@ -1453,10 +1453,10 @@ tcp6_ctlinput(int cmd, struct sockaddr * > =A0#define ISN_STATIC_INCREMENT 4096 > =A0#define ISN_RANDOM_INCREMENT (4096 - 1) > > -static VNET_DEFINE(u_char, isn_secret[32]); > -static VNET_DEFINE(int, isn_last_reseed); > -static VNET_DEFINE(u_int32_t, isn_offset); > -static VNET_DEFINE(u_int32_t, isn_offset_old); > +STATIC_VNET_DEFINE(u_char, isn_secret[32]); > +STATIC_VNET_DEFINE(int, isn_last_reseed); > +STATIC_VNET_DEFINE(u_int32_t, isn_offset); > +STATIC_VNET_DEFINE(u_int32_t, isn_offset_old); > > =A0#define =A0 =A0 =A0 =A0V_isn_secret =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(isn_secret) > =A0#define =A0 =A0 =A0 =A0V_isn_last_reseed =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(isn_last_reseed) > > Modified: head/sys/netinet/tcp_syncache.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/netinet/tcp_syncache.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_syncache.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -97,13 +97,13 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, tcp_syncookies) =3D 1; > +STATIC_VNET_DEFINE(int, tcp_syncookies) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_tcp_syncookies =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_syncookies) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(tcp_syncookies), 0, > =A0 =A0 "Use TCP SYN cookies if the syncache overflows"); > > -static VNET_DEFINE(int, tcp_syncookiesonly) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_syncookiesonly) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_syncookiesonly =A0 =A0 =A0 =A0 =A0 =A0VNE= T(tcp_syncookiesonly) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(tcp_syncookiesonly), 0, > @@ -143,7 +143,7 @@ static struct syncache > =A0#define TCP_SYNCACHE_HASHSIZE =A0 =A0 =A0 =A0 =A0512 > =A0#define TCP_SYNCACHE_BUCKETLIMIT =A0 =A0 =A0 30 > > -static VNET_DEFINE(struct tcp_syncache, tcp_syncache); > +STATIC_VNET_DEFINE(struct tcp_syncache, tcp_syncache); > =A0#define =A0 =A0 =A0 =A0V_tcp_syncache =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_syncache) > > =A0SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN= cache"); > > Modified: head/sys/netinet/tcp_timewait.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/netinet/tcp_timewait.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_timewait.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(uma_zone_t, tcptw_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcptw_zone); > =A0#define =A0 =A0 =A0 =A0V_tcptw_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(tcptw_zone) > =A0static int =A0 =A0 maxtcptw; > > @@ -102,7 +102,7 @@ static int =A0maxtcptw; > =A0* queue pointers in each tcptw structure, are protected using the glob= al > =A0* tcbinfo lock, which must be held over queue iteration and modificati= on. > =A0*/ > -static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); > +STATIC_VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); > =A0#define =A0 =A0 =A0 =A0V_twq_2msl =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(twq_2msl) > > =A0static void =A0 =A0tcp_tw_2msl_reset(struct tcptw *, int); > > Modified: head/sys/netinet/udp_usrreq.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/netinet/udp_usrreq.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/udp_usrreq.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -131,7 +131,7 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS > > =A0VNET_DEFINE(struct inpcbhead, udb); =A0 =A0 =A0 =A0 =A0 =A0/* from udp= _var.h */ > =A0VNET_DEFINE(struct inpcbinfo, udbinfo); > -static VNET_DEFINE(uma_zone_t, udpcb_zone); > +STATIC_VNET_DEFINE(uma_zone_t, udpcb_zone); > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:45:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97DC61065672; Sun, 14 Nov 2010 21:45:59 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 11A6D8FC15; Sun, 14 Nov 2010 21:45:58 +0000 (UTC) Received: by gxk9 with SMTP id 9so2809520gxk.13 for ; Sun, 14 Nov 2010 13:45:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=tdfqNNfZ/G7WO+YOmVXVdqdAb8eWEnuT8Hk6Tguye74=; b=hmEGpAAwgdrR8AAxY075yhHt3+XEugS+bNFr1kjqFqLVigowxusRH8G3liPoKkz+Sd JiOB+0Dgd/v+s1si0tC3HYgDQQOFqlvX+nRkGsVdB1ClyPMNK9+zf73o9J/Dz3h7PkCD WR/cvTmpO/8AimHyVSDB4KIMx5CXqjbA5gBI0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=jT9U0aMqP0PPUdcFD1+/e+jYMJmr7rApA6F3iwnInBUxUQvaengKo6HP+qROXGk8V6 P08edhtjLgkfyXwaA3LzZOXiGlzUoUcQ/DLFFGRjIZjJfh9KCBiyTXVvYpbPXICLlzxo gdJcoTrzq2Ll0yV4j1NJEUuNSPNu5E2VcnF5c= Received: by 10.100.174.5 with SMTP id w5mr3748415ane.28.1289771157405; Sun, 14 Nov 2010 13:45:57 -0800 (PST) Received: from localhost ([95.65.58.105]) by mx.google.com with ESMTPS id g18sm2945850anh.18.2010.11.14.13.45.51 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 13:45:56 -0800 (PST) From: Anonymous To: Kostik Belousov References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> <20101114213749.GW2392@deviant.kiev.zoral.com.ua> Date: Mon, 15 Nov 2010 00:45:11 +0300 In-Reply-To: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sun, 14 Nov 2010 23:37:49 +0200") Message-ID: <86wrofmvfc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 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: Sun, 14 Nov 2010 21:45:59 -0000 Kostik Belousov writes: > On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: >> Konstantin Belousov writes: >> >> > Author: kib >> > Date: Sun Nov 14 18:24:12 2010 >> > New Revision: 215309 >> > URL: http://svn.freebsd.org/changeset/base/215309 >> > >> > Log: >> > Use symbolic names instead of hardcoding values for magic p_osrel constants. >> > >> > MFC after: 1 week >> [...] >> > Modified: head/sys/sys/param.h >> > ============================================================================== >> > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) >> > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) >> > @@ -60,6 +60,11 @@ >> > #undef __FreeBSD_version >> > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ >> > >> > +#ifdef _KERNEL >> > +#define __FreeBSD_version_SIGSEGV 700004 >> > +#define __FreeBSD_version_MAP_ANON 800104 >> > +#endif >> > + >> >> This breaks bsd.port.mk regexp to determine OSVERSION. [...] >> >> $ make -C devel/libpthread-stubs >> "Makefile", line 26: warning: String comparison operator should be either == or != >> "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) >> "Makefile", line 28: if-less endif >> "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != >> "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) >> "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif >> make: fatal errors encountered -- cannot continue [...] > I think it is better to select different namespace for the special versions. > Can you confirm that the following patch fixes the ports mk for you ? > It is enough to cd /usr/src/include && make install after patching. [...] > diff --git a/sys/sys/param.h b/sys/sys/param.h > index 3e4cdf6..ea90308 100644 > --- a/sys/sys/param.h > +++ b/sys/sys/param.h > @@ -61,8 +61,8 @@ > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > #ifdef _KERNEL > -#define __FreeBSD_version_SIGSEGV 700004 > -#define __FreeBSD_version_MAP_ANON 800104 > +#define P_OSREL_SIGSEGV 700004 > +#define P_OSREL_MAP_ANON 800104 > #endif Yep, it does fix. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:49:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46C0A1065672; Sun, 14 Nov 2010 21:49:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 016458FC16; Sun, 14 Nov 2010 21:49:40 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:20d4:5ad4:8ef9:2ce4] (unknown [IPv6:2001:7b8:3a7:0:20d4:5ad4:8ef9:2ce4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 258F85C43; Sun, 14 Nov 2010 22:49:39 +0100 (CET) Message-ID: <4CE0597A.300@FreeBSD.org> Date: Sun, 14 Nov 2010 22:49:46 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101113 Lanikai/3.1.7pre MIME-Version: 1.0 To: mdf@FreeBSD.org References: <201011142038.oAEKcB9M093130@svn.freebsd.org> In-Reply-To: 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: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:49:40 -0000 On 2010-11-14 22:13, mdf@FreeBSD.org wrote: > If "static DPCPU_DEFINE" and "STATIC_DPCPU_DEFINE" are the same thing, > it seems backwards to prefer the macro over the C code. Is there a > difference? After a follow-up commit, r215318, they are different. This is because the macro then inserts __asm__(".globl") statements just before the actual definition of the variable, which was not possible before. E.g.: static __asm__(".globl foo") int bar; would not compile. From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 21:59:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E5D106566C; Sun, 14 Nov 2010 21:59:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35CAF8FC14; Sun, 14 Nov 2010 21:59: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 oAELxCgf095040; Sun, 14 Nov 2010 21:59:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAELxCMc095034; Sun, 14 Nov 2010 21:59:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011142159.oAELxCMc095034@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 21:59: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: r215321 - in head/sys: amd64/amd64 i386/i386 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: Sun, 14 Nov 2010 21:59:12 -0000 Author: kib Date: Sun Nov 14 21:59:11 2010 New Revision: 215321 URL: http://svn.freebsd.org/changeset/base/215321 Log: Do not use __FreeBSD_version prefix for the special osrel version. The ports/Mk/bsd.port.mk uses sys/param.h to fetch osrel, and cannot grok several constants with the prefix. Reported and tested by: swell.k gmail com MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/sys/param.h head/sys/vm/vm_mmap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/amd64/amd64/trap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -416,8 +416,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/i386/i386/trap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -462,8 +462,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/sys/param.h Sun Nov 14 21:59:11 2010 (r215321) @@ -61,8 +61,8 @@ #define __FreeBSD_version 900025 /* Master, propagated to newvers */ #ifdef _KERNEL -#define __FreeBSD_version_SIGSEGV 700004 -#define __FreeBSD_version_MAP_ANON 800104 +#define P_OSREL_SIGSEGV 700004 +#define P_OSREL_MAP_ANON 800104 #endif #ifndef LOCORE Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/vm/vm_mmap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -232,7 +232,7 @@ mmap(td, uap) /* Make sure mapping fits into numeric range, etc. */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= __FreeBSD_version_MAP_ANON) || + curproc->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 22:08:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE4B106566B; Sun, 14 Nov 2010 22:08:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB6B68FC1B; Sun, 14 Nov 2010 22:08: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 oAEM8uFd095336; Sun, 14 Nov 2010 22:08:56 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEM8uin095334; Sun, 14 Nov 2010 22:08:56 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201011142208.oAEM8uin095334@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 14 Nov 2010 22:08: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: r215322 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:08:56 -0000 Author: gonzo Date: Sun Nov 14 22:08:56 2010 New Revision: 215322 URL: http://svn.freebsd.org/changeset/base/215322 Log: Regenerate src.conf manpage after adding WITHOUT_GPIO build knob Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun Nov 14 21:59:11 2010 (r215321) +++ head/share/man/man5/src.conf.5 Sun Nov 14 22:08:56 2010 (r215322) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd August 25, 2010 +.Dd November 14, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -355,6 +355,9 @@ Set to build some programs without optio .It Va WITHOUT_GPIB .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. +.It Va WITH_GPIO +.\" from FreeBSD: head/tools/build/options/WITH_GPIO 213463 2010-10-05 22:26:01Z gonzo +Set to build gpioctl(8) as part of the base system. .It Va WITHOUT_GROFF .\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 156932 2006-03-21 07:50:50Z ru Set to not build From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 22:14:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33BA106564A; Sun, 14 Nov 2010 22:14:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1F818FC19; Sun, 14 Nov 2010 22:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEMEaiE095498; Sun, 14 Nov 2010 22:14:36 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMEagR095496; Sun, 14 Nov 2010 22:14:36 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201011142214.oAEMEagR095496@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 14 Nov 2010 22:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215323 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:14:36 -0000 Author: gonzo Date: Sun Nov 14 22:14:36 2010 New Revision: 215323 URL: http://svn.freebsd.org/changeset/base/215323 Log: Add optional files controlled by WITH_GPIO knob Submitted by: Alexander Best Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 22:08:56 2010 (r215322) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 22:14:36 2010 (r215323) @@ -808,6 +808,11 @@ OLD_FILES+=usr/lib32/libgpib_p.a .endif .endif +.if ${MK_GPIO} == no +OLD_FILES+=usr/sbin/gpioctl +OLD_FILES+=usr/share/man/man8/gpioctl.8.gz +.endif + .if ${MK_GSSAPI} == no OLD_FILES+=usr/lib/libgssapi.a OLD_FILES+=usr/lib/libgssapi.so From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 22:17:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBCBB1065672; Sun, 14 Nov 2010 22:17:12 +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 BACCD8FC1C; Sun, 14 Nov 2010 22:17: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 oAEMHCfJ095588; Sun, 14 Nov 2010 22:17:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMHCWT095586; Sun, 14 Nov 2010 22:17:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142217.oAEMHCWT095586@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 22:17: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: r215324 - head/lib/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:17:12 -0000 Author: dim Date: Sun Nov 14 22:17:12 2010 New Revision: 215324 URL: http://svn.freebsd.org/changeset/base/215324 Log: Don't use -fno-exceptions or -fno-rtti for .c files, when building llvm/clang. Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sun Nov 14 22:14:36 2010 (r215323) +++ head/lib/clang/clang.build.mk Sun Nov 14 22:17:12 2010 (r215324) @@ -18,14 +18,14 @@ TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" .ifndef LLVM_REQUIRES_EH -CFLAGS+=-fno-exceptions +CXXFLAGS+=-fno-exceptions .else # If the library or program requires EH, it also requires RTTI. LLVM_REQUIRES_RTTI= .endif .ifndef LLVM_REQUIRES_RTTI -CFLAGS+=-fno-rtti +CXXFLAGS+=-fno-rtti .endif .ifdef TOOLS_PREFIX From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 22:34:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F738106564A; Sun, 14 Nov 2010 22:34:34 +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 3DDBC8FC14; Sun, 14 Nov 2010 22:34: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 oAEMYYil096007; Sun, 14 Nov 2010 22:34:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMYYhu096005; Sun, 14 Nov 2010 22:34:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011142234.oAEMYYhu096005@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 22:34: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: r215325 - 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: Sun, 14 Nov 2010 22:34:34 -0000 Author: marius Date: Sun Nov 14 22:34:33 2010 New Revision: 215325 URL: http://svn.freebsd.org/changeset/base/215325 Log: Use the correct variable for determining the verbosity level in mpt_lprtc(). While at it, fix the whitespace of that macro. PR: 149502 Submitted by: Andrew Boyer MFC after: 1 week Modified: head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Sun Nov 14 22:17:12 2010 (r215324) +++ head/sys/dev/mpt/mpt.h Sun Nov 14 22:34:33 2010 (r215325) @@ -1112,10 +1112,10 @@ do { \ mpt_prt(mpt, __VA_ARGS__); \ } while (0) -#define mpt_lprtc(mpt, level, ...) \ -do { \ - if (level <= (mpt)->debug_level) \ - mpt_prtc(mpt, __VA_ARGS__); \ +#define mpt_lprtc(mpt, level, ...) \ +do { \ + if (level <= (mpt)->verbose) \ + mpt_prtc(mpt, __VA_ARGS__); \ } while (0) #else void mpt_lprt(struct mpt_softc *, int, const char *, ...) From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:00:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 867DC1065670; Sun, 14 Nov 2010 23:00:49 +0000 (UTC) Date: Sun, 14 Nov 2010 23:00:49 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114230049.GA23041@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> <201011141905.25634.bruce@cran.org.uk> <20101114192821.GA83707@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101114192821.GA83707@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:00:49 -0000 On Sun Nov 14 10, Alexander Best wrote: > On Sun Nov 14 10, Bruce Cran wrote: > > On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > > > > > while you're at it, could you add the following after MK_BOOT? > > > > > > #.if ${MK_BSNMP} == no > > > # to be filled in > > > #.endif > > > > > > i'll try to run two buildworld instances two see which files are being > > > affected by WITHOUT_BSNMP. > > > > It might make more sense to just leave it until we know which files to remove. > > you're right. a lot of options need imporovement actually. i'll get back to you > on that one. ;) > > however the following should take care of *_GPIO: just committed by gonzo@. ;) cheers. alex > > .if ${MK_GPIO} == no > OLD_FILES+=usr/sbin/gpioctl > OLD_FILES+=usr/share/man/man8/gpioctl.8.gz > .endif > > along with src.conf needing regeneration. > > cheers. > alex > > > > > -- > > Bruce Cran > > -- > a13x -- a13x From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:05:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224AC1065675; Sun, 14 Nov 2010 23:05:58 +0000 (UTC) (envelope-from dd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3818FC14; Sun, 14 Nov 2010 23:05: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 oAEN5vP9096753; Sun, 14 Nov 2010 23:05:57 GMT (envelope-from dd@svn.freebsd.org) Received: (from dd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEN5vFS096750; Sun, 14 Nov 2010 23:05:57 GMT (envelope-from dd@svn.freebsd.org) Message-Id: <201011142305.oAEN5vFS096750@svn.freebsd.org> From: Dima Dorfman Date: Sun, 14 Nov 2010 23:05: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: r215326 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:05:58 -0000 Author: dd Date: Sun Nov 14 23:05:57 2010 New Revision: 215326 URL: http://svn.freebsd.org/changeset/base/215326 Log: Add a special INIT product ID used by some models of the HUAWEI K3765 datacard. After ejecting this device, it reappears using the normal K3765 ID. It does not switch automatically Reviewed by: n_hibma Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Nov 14 22:34:33 2010 (r215325) +++ head/sys/dev/usb/serial/u3g.c Sun Nov 14 23:05:57 2010 (r215326) @@ -288,6 +288,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Nov 14 22:34:33 2010 (r215325) +++ head/sys/dev/usb/usbdevs Sun Nov 14 23:05:57 2010 (r215326) @@ -1857,6 +1857,7 @@ product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E14AC 0x14ac 3G modem +product HUAWEI K3765_INIT 0x1520 HUAWEI Mobile K3765 Initial /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:07:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89B3A106564A; Sun, 14 Nov 2010 23:07:02 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 97FA58FC08; Sun, 14 Nov 2010 23:07:00 +0000 (UTC) Received: from mail-gw14.york.ac.uk ([144.32.129.164]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 820039482 for ed@FreeBSD.org;2bfdefeaec0891c3; Sun, 14 Nov 2010 23:07:00 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:55922) by mail-gw14.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHlf1-0007UD-DC; Sun, 14 Nov 2010 23:06:59 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHlf1-00049q-4r; Sun, 14 Nov 2010 23:06:59 +0000 Date: Sun, 14 Nov 2010 23:06:59 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Ed Schouten In-Reply-To: <201011141842.oAEIgdqL090361@svn.freebsd.org> Message-ID: References: <201011141842.oAEIgdqL090361@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215310 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:07:02 -0000 On Sun, 14 Nov 2010, Ed Schouten wrote: > Author: ed > Date: Sun Nov 14 18:42:39 2010 > New Revision: 215310 > URL: http://svn.freebsd.org/changeset/base/215310 > > Log: > Always set errno to a sane value when pututxline(3) fails. > > For example, it will now return ESRCH when trying to replace a > nonexistent entry with DEAD_PROCESS. > > Modified: > head/lib/libc/gen/pututxline.c > > Modified: head/lib/libc/gen/pututxline.c > ============================================================================== > --- head/lib/libc/gen/pututxline.c Sun Nov 14 18:24:12 2010 (r215309) > +++ head/lib/libc/gen/pututxline.c Sun Nov 14 18:42:39 2010 (r215310) > @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -53,6 +54,7 @@ futx_open(const char *file) > /* Safety check: never use broken files. */ > if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { > _close(fd); > + errno = EINVAL; > return (NULL); > } setutxdb(3) returns EFTYPE here, for the same error. Should this be the same? > > @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) > } > > fclose(fp); > + errno = ESRCH; > return (1); > } These possible errors should probably also now be documented in pututxline(3). Gavin From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:07:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58944106564A; Sun, 14 Nov 2010 23:07:08 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 499848FC16; Sun, 14 Nov 2010 23:07:07 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 820036414 for thompsa@FreeBSD.org; 9523c0c76ff0152c; Sun, 14 Nov 2010 22:56:08 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:56297) by mail-gw12.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHlUW-0001Qs-2I; Sun, 14 Nov 2010 22:56:08 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHlUV-00048P-RR; Sun, 14 Nov 2010 22:56:07 +0000 Date: Sun, 14 Nov 2010 22:56:07 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Andrew Thompson In-Reply-To: <201011142041.oAEKfN6Y093321@svn.freebsd.org> Message-ID: References: <201011142041.oAEKfN6Y093321@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:07:08 -0000 On Sun, 14 Nov 2010, Andrew Thompson wrote: > Author: thompsa > Date: Sun Nov 14 20:41:22 2010 > New Revision: 215319 > URL: http://svn.freebsd.org/changeset/base/215319 > > Log: > Provide a mutex around the read/modify/write of the IXP425_GPIO_* > registers. Giant was used in some places, but not all. I believe this should fix my PR arm/134338, but don't have the bandwidth at the moment to verify that. Is there any chance you could see if you believe the same? Thanks, Gavin From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:13:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF325106566C; Sun, 14 Nov 2010 23:13:27 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id EDFFA8FC0A; Sun, 14 Nov 2010 23:13:26 +0000 (UTC) Received: from mail-gw13.york.ac.uk ([144.32.129.163]) by gse-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 810217688 for marius@FreeBSD.org; 6ae18208c040f1d1; Sun, 14 Nov 2010 23:13:25 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:45033) by mail-gw13.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHllE-0004I9-RV; Sun, 14 Nov 2010 23:13:24 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHllE-0004B7-K5; Sun, 14 Nov 2010 23:13:24 +0000 Date: Sun, 14 Nov 2010 23:13:24 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Marius Strobl In-Reply-To: <201011141309.oAED9Xcv082719@svn.freebsd.org> Message-ID: References: <201011141309.oAED9Xcv082719@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215295 - head/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:13:27 -0000 On Sun, 14 Nov 2010, Marius Strobl wrote: > Author: marius > Date: Sun Nov 14 13:09:32 2010 > New Revision: 215295 > URL: http://svn.freebsd.org/changeset/base/215295 > > Log: > Let cryptosoft(4) add its pseudo-device with a specific unit number and its > probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real > devices hanging off of nexus(4) with no specific devclass set. Actually, the > more desirable fix for this would be to get rid of the newbus interface of > cryptosoft(4) altogether but apparently crypto(9) was written with support > for cryptographic hardware in mind so that approach would require some KPI > breaking changes which don't seem worth it. I'm guessing this fixes kern/132129 and kern/136123? Thanks, Gavin From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:15:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C6D3106566B; Sun, 14 Nov 2010 23:15:29 +0000 (UTC) (envelope-from yanegomi@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 95B178FC19; Sun, 14 Nov 2010 23:15:28 +0000 (UTC) Received: by wyb36 with SMTP id 36so1957546wyb.13 for ; Sun, 14 Nov 2010 15:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=YB32VYogyHA9YUdDFInEiSNegR+Wipl5gaZTCgXoh/w=; b=ujnuBYTko3jXu9L4oXf3m2bUgwTFrGKxYZy0eXj2I181DpG9avvgnzZdCPh3h61NUe a0vghwfLzVZG7j0qgShepaXXcCdD0/rml+XrMv5Vm8Xz2q9SZCWQ+mdEFWD4U9Y9BTBm 1sNTvUpyvYrh0oA87p9p03AAo9m04CL2cYLWA= 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=A3yWs9VBT3tixDPPLEl2wQzvrxC6UbEF5yh/T7m6mDpXMoplUQBrk3qko9nQiH24Ko 6Co7mCOLhqmtRZcuOasa+ciibJI3PLPqOJY+P4dOMu433m2/hodOsMQzfJk1yS3lHwba xT2PH95f23zDXQiMF+Iwj5qry4C/0fXbVxNjU= MIME-Version: 1.0 Received: by 10.216.7.210 with SMTP id 60mr6585535wep.30.1289776527350; Sun, 14 Nov 2010 15:15:27 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 15:15:27 -0800 (PST) In-Reply-To: References: <201011141842.oAEIgdqL090361@svn.freebsd.org> Date: Sun, 14 Nov 2010 15:15:27 -0800 X-Google-Sender-Auth: T_jtEs22wMTU5pKjxlbtx6oAiCM Message-ID: From: Garrett Cooper To: Gavin Atkinson Content-Type: multipart/mixed; boundary=0016364c7576c09e0404950b7fbf Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Schouten Subject: Re: svn commit: r215310 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:15:30 -0000 --0016364c7576c09e0404950b7fbf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Nov 14, 2010 at 3:06 PM, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Ed Schouten wrote: >> Author: ed >> Date: Sun Nov 14 18:42:39 2010 >> New Revision: 215310 >> URL: http://svn.freebsd.org/changeset/base/215310 >> >> Log: >> =A0 Always set errno to a sane value when pututxline(3) fails. >> >> =A0 For example, it will now return ESRCH when trying to replace a >> =A0 nonexistent entry with DEAD_PROCESS. >> >> Modified: >> =A0 head/lib/libc/gen/pututxline.c >> >> Modified: head/lib/libc/gen/pututxline.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/lib/libc/gen/pututxline.c =A0 =A0Sun Nov 14 18:24:12 2010 =A0 = =A0 =A0 =A0(r215309) >> +++ head/lib/libc/gen/pututxline.c =A0 =A0Sun Nov 14 18:42:39 2010 =A0 = =A0 =A0 =A0(r215310) >> @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); >> =A0#include >> =A0#include >> =A0#include >> +#include >> =A0#include >> =A0#include >> =A0#include >> @@ -53,6 +54,7 @@ futx_open(const char *file) >> =A0 =A0 =A0 /* Safety check: never use broken files. */ >> =A0 =A0 =A0 if (_fstat(fd, &sb) !=3D -1 && sb.st_size % sizeof(struct fu= tx) !=3D 0) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 _close(fd); >> + =A0 =A0 =A0 =A0 =A0 =A0 errno =3D EINVAL; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (NULL); >> =A0 =A0 =A0 } > > setutxdb(3) returns EFTYPE here, for the same error. =A0Should this be th= e > same? > >> >> @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) >> =A0 =A0 =A0 } >> >> =A0 =A0 =A0 fclose(fp); >> + =A0 =A0 errno =3D ESRCH; >> =A0 =A0 =A0 return (1); >> =A0} > > These possible errors should probably also now be documented in > pututxline(3). I submitted another patch earlier to Ed that does this and a bit more (attached). He was going to take a look at the patch and get back to me (and I CCed Bruce Evans for additional comments), but please feel free to chime in :). Thanks, -Garrett --0016364c7576c09e0404950b7fbf Content-Type: text/x-patch; charset=US-ASCII; name="utx-changes-2.patch" Content-Disposition: attachment; filename="utx-changes-2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggijlnzh0 SW5kZXg6IGxpYi9saWJjL2dlbi9nZXR1dHhlbnQuMwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGliYy9n ZW4vZ2V0dXR4ZW50LjMJKHJldmlzaW9uIDIxNTMxNCkKKysrIGxpYi9saWJjL2dlbi9nZXR1dHhl bnQuMwkod29ya2luZyBjb3B5KQpAQCAtMzY3LDE2ICszNjcsMTUgQEAKIC5EdiBOVUxMCiB3aGVu IHRoZSBwcm92aWRlZAogLlZ0IHV0bXB4Ci1pcyBpbnZhbGlkLgotVGhpcyBtYXkgYmUgYmVjYXVz ZQoraXMgaW52YWxpZCwgb3IKIC5GYSB1dF90eXBlCi1pcyBpbnZhbGlkIG9yCi0uRmEgdXRfdHlw ZQogaGFzIGEgdmFsdWUgb2YKIC5EdiBERUFEX1BST0NFU1MKIGFuZCBhbiBlbnRyeSB3aXRoIGFu IGlkZW50aWZpZXIgd2l0aCBhIHZhbHVlIGVxdWFsIHRvIHRoZSBmaWVsZAogLkZhIHV0X2lkCi13 YXMgbm90IGZvdW5kLgord2FzIG5vdCBmb3VuZDsgdGhlIGdsb2JhbCB2YXJpYWJsZQorLlZhIGVy cm5vCitpcyBzZXQgdG8gaW5kaWNhdGUgdGhlIGVycm9yLgogLlBwCiBUaGUKIC5GbiBzZXR1dHhk YgpAQCAtMzg3LDggKzM4NiwyNiBAQAogaXMgc2V0IHRvIGluZGljYXRlIHRoZSBlcnJvci4KIC5T aCBFUlJPUlMKIEluIGFkZGl0aW9uIHRvIHRoZSBlcnJvciBjb25kaXRpb25zIGRlc2NyaWJlZCBp bgorLlhyIGZkb3BlbiAzICwKIC5YciBmb3BlbiAzICwKKy5YciBmc2VlayAzICwKKy5YciBvcGVu IDMgLAogdGhlCisuRm4gcHV0dXR4bGluZQorZnVuY3Rpb24gY2FuIGdlbmVyYXRlIHRoZSBmb2xs b3dpbmcgZXJyb3JzOgorLkJsIC10YWcgLXdpZHRoIEVyCisuSXQgQnEgRXIgRVNSQ0gKK1RoZSB2 YWx1ZSBvZgorLkZhIHV0X3R5cGUKK2lzIERFQURfUFJPQ0VTUywgYW5kIHRoZSBwcm9jZXNzIGVu dHJ5IGNvdWxkIG5vdCBiZSBmb3VuZC4KKy5JdCBCcSBFciBFSU5WQUwKK1RoZSB2YWx1ZSBvZgor LkZhIHV0X3R5cGUKK2lzIG5vdCBzdXBwb3J0ZWQgYnkgdGhpcyBpbXBsZW1lbnRhdGlvbi4KKy5F bAorSW4gYWRkaXRpb24gdG8gdGhlIGVycm9yIGNvbmRpdGlvbnMgZGVzY3JpYmVkIGluCisuWHIg Zm9wZW4gMyAsCit0aGUKIC5GbiBzZXR1dHhkYgogZnVuY3Rpb24gY2FuIGdlbmVyYXRlIHRoZSBm b2xsb3dpbmcgZXJyb3JzOgogLkJsIC10YWcgLXdpZHRoIEVyCkluZGV4OiBsaWIvbGliYy9nZW4v Z2V0dXR4ZW50LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGliL2xpYmMvZ2VuL2dldHV0eGVudC5jCShyZXZp c2lvbiAyMTUzMTQpCisrKyBsaWIvbGliYy9nZW4vZ2V0dXR4ZW50LmMJKHdvcmtpbmcgY29weSkK QEAgLTExMiwyMiArMTEyLDIyIEBACiAJaWYgKHVkYiA9PSBVVFhEQl9MT0cpIHsKIAkJdWludDE2 X3QgbGVuOwogCi0JCWlmIChmcmVhZCgmbGVuLCBzaXplb2YgbGVuLCAxLCB1ZikgIT0gMSkKKwkJ aWYgKGZyZWFkKCZsZW4sIHNpemVvZihsZW4pLCAxLCB1ZikgIT0gMSkKIAkJCXJldHVybiAoLTEp OwogCQlsZW4gPSBiZTE2dG9oKGxlbik7CiAJCWlmIChsZW4gPiBzaXplb2YgKmZ1KSB7CiAJCQkv KiBGb3J3YXJkIGNvbXBhdGliaWxpdHkuICovCi0JCQlpZiAoZnJlYWQoZnUsIHNpemVvZiAqZnUs IDEsIHVmKSAhPSAxKQorCQkJaWYgKGZyZWFkKGZ1LCBzaXplb2YoKmZ1KSwgMSwgdWYpICE9IDEp CiAJCQkJcmV0dXJuICgtMSk7Ci0JCQlmc2Vlayh1ZiwgbGVuIC0gc2l6ZW9mICpmdSwgU0VFS19D VVIpOworCQkJZnNlZWsodWYsIGxlbiAtIHNpemVvZigqZnUpLCBTRUVLX0NVUik7CiAJCX0gZWxz ZSB7CiAJCQkvKiBQYXJ0aWFsIHJlY29yZC4gKi8KLQkJCW1lbXNldChmdSwgMCwgc2l6ZW9mICpm dSk7CisJCQltZW1zZXQoZnUsIDAsIHNpemVvZigqZnUpKTsKIAkJCWlmIChmcmVhZChmdSwgbGVu LCAxLCB1ZikgIT0gMSkKIAkJCQlyZXR1cm4gKC0xKTsKIAkJfQogCX0gZWxzZSB7Ci0JCWlmIChm cmVhZChmdSwgc2l6ZW9mICpmdSwgMSwgdWYpICE9IDEpCisJCWlmIChmcmVhZChmdSwgc2l6ZW9m KCpmdSksIDEsIHVmKSAhPSAxKQogCQkJcmV0dXJuICgtMSk7CiAJfQogCXJldHVybiAoMCk7CkBA IC0xNjMsNyArMTYzLDggQEAKIAkJCWNhc2UgTE9HSU5fUFJPQ0VTUzoKIAkJCWNhc2UgREVBRF9Q Uk9DRVNTOgogCQkJCWlmIChtZW1jbXAoZnUuZnVfaWQsIGlkLT51dF9pZCwKLQkJCQkgICAgTUlO KHNpemVvZiBmdS5mdV9pZCwgc2l6ZW9mIGlkLT51dF9pZCkpID09IDApCisJCQkJICAgIE1JTihz aXplb2YoZnUuZnVfaWQpLCBzaXplb2YoaWQtPnV0X2lkKSkpID09CisJCQkJICAgIDApCiAJCQkJ CWdvdG8gZm91bmQ7CiAJCQl9CiAJCQlicmVhazsKQEAgLTE5MSw3ICsxOTIsOCBAQAogCQljYXNl IFVTRVJfUFJPQ0VTUzoKIAkJY2FzZSBMT0dJTl9QUk9DRVNTOgogCQkJaWYgKHN0cm5jbXAoZnUu ZnVfbGluZSwgbGluZS0+dXRfbGluZSwKLQkJCSAgICBNSU4oc2l6ZW9mIGZ1LmZ1X2xpbmUsIHNp emVvZiBsaW5lLT51dF9saW5lKSkgPT0gMCkKKwkJCSAgICBNSU4oc2l6ZW9mKGZ1LmZ1X2xpbmUp LCBzaXplb2YobGluZS0+dXRfbGluZSkpKSA9PQorCQkJICAgIDApCiAJCQkJZ290byBmb3VuZDsK IAkJCWJyZWFrOwogCQl9CkBAIC0yMTIsNyArMjE0LDcgQEAKIAogCQlzd2l0Y2ggKGZ1LmZ1X3R5 cGUpIHsKIAkJY2FzZSBVU0VSX1BST0NFU1M6Ci0JCQlpZiAoc3RybmNtcChmdS5mdV91c2VyLCB1 c2VyLCBzaXplb2YgZnUuZnVfdXNlcikgPT0gMCkKKwkJCWlmIChzdHJuY21wKGZ1LmZ1X3VzZXIs IHVzZXIsIHNpemVvZihmdS5mdV91c2VyKSkgPT0gMCkKIAkJCQlnb3RvIGZvdW5kOwogCQkJYnJl YWs7CiAJCX0KSW5kZXg6IGxpYi9saWJjL2dlbi9wdXR1dHhsaW5lLmMKPT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g bGliL2xpYmMvZ2VuL3B1dHV0eGxpbmUuYwkocmV2aXNpb24gMjE1MzE0KQorKysgbGliL2xpYmMv Z2VuL3B1dHV0eGxpbmUuYwkod29ya2luZyBjb3B5KQpAQCAtNDMsOSArNDMsOSBAQAogc3RhdGlj IEZJTEUgKgogZnV0eF9vcGVuKGNvbnN0IGNoYXIgKmZpbGUpCiB7CisJc3RydWN0IHN0YXQgc2I7 CisJRklMRSAqZnA7CiAJaW50IGZkOwotCUZJTEUgKmZwOwotCXN0cnVjdCBzdGF0IHNiOwogCiAJ ZmQgPSBfb3BlbihmaWxlLCBPX0NSRUFUfE9fUkRXUnxPX0VYTE9DSywgMDY0NCk7CiAJaWYgKGZk IDwgMCkKQEAgLTU0LDcgKzU0LDcgQEAKIAkvKiBTYWZldHkgY2hlY2s6IG5ldmVyIHVzZSBicm9r ZW4gZmlsZXMuICovCiAJaWYgKF9mc3RhdChmZCwgJnNiKSAhPSAtMSAmJiBzYi5zdF9zaXplICUg c2l6ZW9mKHN0cnVjdCBmdXR4KSAhPSAwKSB7CiAJCV9jbG9zZShmZCk7Ci0JCWVycm5vID0gRUlO VkFMOworCQllcnJubyA9IEVGVFlQRTsKIAkJcmV0dXJuIChOVUxMKTsKIAl9CiAJCkBAIC02Mywx NiArNjMsMTYgQEAKIAkJX2Nsb3NlKGZkKTsKIAkJcmV0dXJuIChOVUxMKTsKIAl9Ci0KIAlyZXR1 cm4gKGZwKTsKIH0KIAogc3RhdGljIGludAogdXR4X2FjdGl2ZV9hZGQoY29uc3Qgc3RydWN0IGZ1 dHggKmZ1KQogeworCXN0cnVjdCBmdXR4IGZlOwogCUZJTEUgKmZwOwotCXN0cnVjdCBmdXR4IGZl OwogCW9mZl90IHBhcnRpYWwgPSAtMTsKKwlpbnQgZXJyb3IsIHJldDsKIAogCS8qCiAJICogUmVn aXN0ZXIgdXNlciBsb2dpbiBzZXNzaW9ucy4gIE92ZXJ3cml0ZSBlbnRyaWVzIG9mIHNlc3Npb25z CkBAIC04MCwxNiArODAsMTcgQEAKIAkgKi8KIAlmcCA9IGZ1dHhfb3BlbihfUEFUSF9VVFhfQUNU SVZFKTsKIAlpZiAoZnAgPT0gTlVMTCkKLQkJcmV0dXJuICgxKTsKLQl3aGlsZSAoZnJlYWQoJmZl LCBzaXplb2YgZmUsIDEsIGZwKSA9PSAxKSB7CisJCXJldHVybiAoLTEpOworCXdoaWxlIChmcmVh ZCgmZmUsIHNpemVvZihmZSksIDEsIGZwKSA9PSAxKSB7CiAJCXN3aXRjaCAoZmUuZnVfdHlwZSkg ewogCQljYXNlIFVTRVJfUFJPQ0VTUzoKIAkJY2FzZSBJTklUX1BST0NFU1M6CiAJCWNhc2UgTE9H SU5fUFJPQ0VTUzoKIAkJY2FzZSBERUFEX1BST0NFU1M6CiAJCQkvKiBPdmVyd3JpdGUgd2hlbiB1 dF9pZCBtYXRjaGVzLiAqLwotCQkJaWYgKG1lbWNtcChmdS0+ZnVfaWQsIGZlLmZ1X2lkLCBzaXpl b2YgZmUuZnVfaWQpID09IDApIHsKLQkJCQlmc2Vla28oZnAsIC0ob2ZmX3Qpc2l6ZW9mIGZlLCBT RUVLX0NVUik7CisJCQlpZiAobWVtY21wKGZ1LT5mdV9pZCwgZmUuZnVfaWQsIHNpemVvZihmZS5m dV9pZCkpID09CisJCQkgICAgMCkgeworCQkJCXJldCA9IGZzZWVrbyhmcCwgLShvZmZfdClzaXpl b2YoZmUpLCBTRUVLX0NVUik7CiAJCQkJZ290byBleGFjdDsKIAkJCX0KIAkJCWlmIChmZS5mdV90 eXBlICE9IERFQURfUFJPQ0VTUykKQEAgLTk3LDU1ICs5OCw3MyBAQAogCQkJLyogRkFMTFRIUk9V R0ggKi8KIAkJZGVmYXVsdDoKIAkJCS8qIEFsbG93IHVzIHRvIG92ZXJ3cml0ZSB1bnVzZWQgcmVj b3Jkcy4gKi8KLQkJCWlmIChwYXJ0aWFsID09IC0xKQotCQkJCXBhcnRpYWwgPSBmdGVsbG8oZnAp IC0gKG9mZl90KXNpemVvZiBmZTsKKwkJCWlmIChwYXJ0aWFsID09IC0xKSB7CisJCQkJcGFydGlh bCA9IGZ0ZWxsbyhmcCk7CisJCQkJLyogCisJCQkJICogRGlzdGluZ3Vpc2ggZXJyb3JzIGZyb20g dmFsaWQgdmFsdWVzIHNvIHdlCisJCQkJICogZG9uJ3Qgb3ZlcndyaXRlIGdvb2QgZGF0YSBieSBh Y2NpZGVudC4KKwkJCQkgKi8KKwkJCQlpZiAocGFydGlhbCAhPSAtMSkKKwkJCQkJcGFydGlhbCAt PSAob2ZmX3Qpc2l6ZW9mKGZlKTsKKwkJCX0KIAkJCWJyZWFrOwogCQl9CiAJfQotCQorCiAJLyoK IAkgKiBObyBleGFjdCBtYXRjaCBmb3VuZC4gIFVzZSB0aGUgcGFydGlhbCBtYXRjaC4gIElmIG5v IHBhcnRpYWwKIAkgKiBtYXRjaCB3YXMgZm91bmQsIGp1c3QgYXBwZW5kIGEgbmV3IHJlY29yZC4K IAkgKi8KIAlpZiAocGFydGlhbCAhPSAtMSkKLQkJZnNlZWtvKGZwLCBwYXJ0aWFsLCBTRUVLX1NF VCk7CisJCXJldCA9IGZzZWVrbyhmcCwgcGFydGlhbCwgU0VFS19TRVQpOwogZXhhY3Q6Ci0JZndy aXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCk7CisJaWYgKHJldCA9PSAtMSkKKwkJZXJyb3IgPSBl cnJubzsKKwllbHNlIGlmIChmd3JpdGUoZnUsIHNpemVvZigqZnUpLCAxLCBmcCkgPCAxKQorCQll cnJvciA9IGVycm5vOworCWVsc2UKKwkJZXJyb3IgPSAwOwogCWZjbG9zZShmcCk7Ci0JcmV0dXJu ICgwKTsKKwllcnJubyA9IGVycm9yOworCXJldHVybiAoZXJyb3IgPT0gMCA/IDAgOiAxKTsKIH0K IAogc3RhdGljIGludAogdXR4X2FjdGl2ZV9yZW1vdmUoc3RydWN0IGZ1dHggKmZ1KQogeworCXN0 cnVjdCBmdXR4IGZlOwogCUZJTEUgKmZwOwotCXN0cnVjdCBmdXR4IGZlOworCWludCBlcnJvciwg cmV0OwogCiAJLyoKIAkgKiBSZW1vdmUgdXNlciBsb2dpbiBzZXNzaW9ucywgaGF2aW5nIHRoZSBz YW1lIHV0X2lkLgogCSAqLwogCWZwID0gZnV0eF9vcGVuKF9QQVRIX1VUWF9BQ1RJVkUpOwogCWlm IChmcCA9PSBOVUxMKQotCQlyZXR1cm4gKDEpOwotCXdoaWxlIChmcmVhZCgmZmUsIHNpemVvZiBm ZSwgMSwgZnApID09IDEpIHsKKwkJcmV0dXJuICgtMSk7CisJZXJyb3IgPSBFU1JDSDsKKwlyZXQg PSAtMTsKKwl3aGlsZSAoZnJlYWQoJmZlLCBzaXplb2YoZmUpLCAxLCBmcCkgPT0gMSAmJiByZXQg IT0gMCkKIAkJc3dpdGNoIChmZS5mdV90eXBlKSB7CiAJCWNhc2UgVVNFUl9QUk9DRVNTOgogCQlj YXNlIElOSVRfUFJPQ0VTUzoKIAkJY2FzZSBMT0dJTl9QUk9DRVNTOgotCQkJaWYgKG1lbWNtcChm dS0+ZnVfaWQsIGZlLmZ1X2lkLCBzaXplb2YgZmUuZnVfaWQpICE9IDApCisJCQlpZiAobWVtY21w KGZ1LT5mdV9pZCwgZmUuZnVfaWQsIHNpemVvZihmZS5mdV9pZCkpICE9IDApCiAJCQkJY29udGlu dWU7CiAKIAkJCS8qIFRlcm1pbmF0ZSBzZXNzaW9uLiAqLwotCQkJZnNlZWtvKGZwLCAtKG9mZl90 KXNpemVvZiBmZSwgU0VFS19DVVIpOwotCQkJZndyaXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCk7 Ci0JCQlmY2xvc2UoZnApOwotCQkJcmV0dXJuICgwKTsKKwkJCWlmIChmc2Vla28oZnAsIC0ob2Zm X3Qpc2l6ZW9mKGZlKSwgU0VFS19DVVIpID09IC0xKQorCQkJCWVycm9yID0gZXJybm87CisJCQll bHNlIGlmIChmd3JpdGUoZnUsIHNpemVvZigqZnUpLCAxLCBmcCkgPCAxKQorCQkJCWVycm9yID0g ZXJybm87CisJCQllbHNlCisJCQkJcmV0ID0gMDsKKwogCQl9Ci0JfQogCiAJZmNsb3NlKGZwKTsK LQllcnJubyA9IEVTUkNIOwotCXJldHVybiAoMSk7CisJZXJybm8gPSBlcnJvcjsKKwlyZXR1cm4g KHJldCk7CiB9CiAKIHN0YXRpYyB2b2lkCkBAIC0xNTgsOSArMTc3LDEyIEBACiBzdGF0aWMgaW50 CiB1dHhfbGFzdGxvZ2luX2FkZChjb25zdCBzdHJ1Y3QgZnV0eCAqZnUpCiB7CisJc3RydWN0IGZ1 dHggZmU7CiAJRklMRSAqZnA7Ci0Jc3RydWN0IGZ1dHggZmU7CisJaW50IGVycm9yLCByZXQ7CiAK KwlyZXQgPSAwOworCiAJLyoKIAkgKiBXcml0ZSBhbiBlbnRyeSB0byBsYXN0bG9naW4uICBPdmVy d3JpdGUgdGhlIGVudHJ5IGlmIHRoZQogCSAqIGN1cnJlbnQgdXNlciBhbHJlYWR5IGhhcyBhbiBl bnRyeS4gIElmIG5vdCwgYXBwZW5kIGEgbmV3CkBAIC0xNjgsMjUgKzE5MCwzMSBAQAogCSAqLwog CWZwID0gZnV0eF9vcGVuKF9QQVRIX1VUWF9MQVNUTE9HSU4pOwogCWlmIChmcCA9PSBOVUxMKQot CQlyZXR1cm4gKDEpOworCQlyZXR1cm4gKC0xKTsKIAl3aGlsZSAoZnJlYWQoJmZlLCBzaXplb2Yg ZmUsIDEsIGZwKSA9PSAxKSB7CiAJCWlmIChzdHJuY21wKGZ1LT5mdV91c2VyLCBmZS5mdV91c2Vy LCBzaXplb2YgZmUuZnVfdXNlcikgIT0gMCkKIAkJCWNvbnRpbnVlOwotCQkKKwogCQkvKiBGb3Vu ZCBhIHByZXZpb3VzIGxhc3Rsb2dpbiBlbnRyeSBmb3IgdGhpcyB1c2VyLiAqLwotCQlmc2Vla28o ZnAsIC0ob2ZmX3Qpc2l6ZW9mIGZlLCBTRUVLX0NVUik7CisJCXJldCA9IGZzZWVrbyhmcCwgLShv ZmZfdClzaXplb2YgZmUsIFNFRUtfQ1VSKTsKIAkJYnJlYWs7CiAJfQotCWZ3cml0ZShmdSwgc2l6 ZW9mICpmdSwgMSwgZnApOworCWlmIChyZXQgPT0gLTEpCisJCWVycm9yID0gZXJybm87CisJZWxz ZSBpZiAoZndyaXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCkgPCAxKSB7CisJCWVycm9yID0gZXJy bm87CisJCXJldCA9IC0xOworCX0KIAlmY2xvc2UoZnApOwotCXJldHVybiAoMCk7CisJZXJybm8g PSBlcnJvcjsKKwlyZXR1cm4gKHJldCk7CiB9CiAKIHN0YXRpYyB2b2lkCiB1dHhfbGFzdGxvZ2lu X3VwZ3JhZGUodm9pZCkKIHsKKwlzdHJ1Y3Qgc3RhdCBzYjsKIAlpbnQgZmQ7Ci0Jc3RydWN0IHN0 YXQgc2I7CiAKIAlmZCA9IF9vcGVuKF9QQVRIX1VUWF9MQVNUTE9HSU4sIE9fUkRXUiwgMDY0NCk7 CiAJaWYgKGZkIDwgMCkKQEAgLTIwNSw5ICsyMzMsOSBAQAogc3RhdGljIGludAogdXR4X2xvZ19h ZGQoY29uc3Qgc3RydWN0IGZ1dHggKmZ1KQogewotCWludCBmZDsKKwlzdHJ1Y3QgaW92ZWMgdmVj WzJdOworCWludCBlcnJvciwgZmQ7CiAJdWludDE2X3QgbDsKLQlzdHJ1Y3QgaW92ZWMgdmVjWzJd OwogCiAJLyoKIAkgKiBBcHBlbmQgYW4gZW50cnkgdG8gdGhlIGxvZyBmaWxlLiAgV2Ugb25seSBu ZWVkIHRvIGFwcGVuZApAQCAtMjE1LDE5ICsyNDMsMjMgQEAKIAkgKiB6ZXJvLWJ5dGVzLiAgUHJl cGVuZCBhIGxlbmd0aCBmaWVsZCwgaW5kaWNhdGluZyB0aGUgbGVuZ3RoIG9mCiAJICogdGhlIHJl Y29yZCwgZXhjbHVkaW5nIHRoZSBsZW5ndGggZmllbGQgaXRzZWxmLgogCSAqLwotCWZvciAobCA9 IHNpemVvZiAqZnU7IGwgPiAwICYmICgoY29uc3QgY2hhciAqKWZ1KVtsIC0gMV0gPT0gJ1wwJzsg bC0tKTsKKwlmb3IgKGwgPSBzaXplb2YoKmZ1KTsgbCA+IDAgJiYgKChjb25zdCBjaGFyICopZnUp W2wgLSAxXSA9PSAnXDAnOyBsLS0pIDsKIAl2ZWNbMF0uaW92X2Jhc2UgPSAmbDsKLQl2ZWNbMF0u aW92X2xlbiA9IHNpemVvZiBsOworCXZlY1swXS5pb3ZfbGVuID0gc2l6ZW9mKGwpOwogCXZlY1sx XS5pb3ZfYmFzZSA9IF9fREVDT05TVCh2b2lkICosIGZ1KTsKIAl2ZWNbMV0uaW92X2xlbiA9IGw7 CiAJbCA9IGh0b2JlMTYobCk7CiAKIAlmZCA9IF9vcGVuKF9QQVRIX1VUWF9MT0csIE9fQ1JFQVR8 T19XUk9OTFl8T19BUFBFTkQsIDA2NDQpOwogCWlmIChmZCA8IDApCi0JCXJldHVybiAoMSk7Ci0J X3dyaXRldihmZCwgdmVjLCAyKTsKKwkJcmV0dXJuICgtMSk7CisJaWYgKF93cml0ZXYoZmQsIHZl YywgMikgPT0gLTEpCisJCWVycm9yID0gZXJybm87CisJZWxzZQorCQllcnJvciA9IDA7CiAJX2Ns b3NlKGZkKTsKLQlyZXR1cm4gKDApOworCWVycm5vID0gZXJyb3I7CisJcmV0dXJuIChlcnJvciA9 PSAwID8gMCA6IDEpOwogfQogCiBzdHJ1Y3QgdXRtcHggKgpAQCAtMjM3LDcgKzI2OSw3IEBACiAJ aW50IGJhZCA9IDA7CiAKIAl1dHhfdG9fZnV0eCh1dG1weCwgJmZ1KTsKLQkKKwogCXN3aXRjaCAo ZnUuZnVfdHlwZSkgewogCWNhc2UgQk9PVF9USU1FOgogCWNhc2UgU0hVVERPV05fVElNRToKQEAg LTI2Nyw2ICsyOTksNyBAQAogCQkJcmV0dXJuIChOVUxMKTsKIAkJYnJlYWs7CiAJZGVmYXVsdDoK KwkJZXJybm8gPSBFSU5WQUw7CiAJCXJldHVybiAoTlVMTCk7CiAJfQogCkluZGV4OiBsaWIvbGli Yy9nZW4vdXR4ZGIuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGliYy9nZW4vdXR4ZGIuYwkocmV2aXNp b24gMjE1MzE0KQorKysgbGliL2xpYmMvZ2VuL3V0eGRiLmMJKHdvcmtpbmcgY29weSkKQEAgLTEz Miw5ICsxMzIsOCBAQAogCQl1dCA9IGNhbGxvYygxLCBzaXplb2YgKnV0KTsKIAkJaWYgKHV0ID09 IE5VTEwpCiAJCQlyZXR1cm4gKE5VTEwpOwotCX0gZWxzZSB7CisJfSBlbHNlCiAJCW1lbXNldCh1 dCwgMCwgc2l6ZW9mICp1dCk7Ci0JfQogCiAJc3dpdGNoIChmdS0+ZnVfdHlwZSkgewogCWNhc2Ug Qk9PVF9USU1FOgo= --0016364c7576c09e0404950b7fbf-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:25:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632131065695; Sun, 14 Nov 2010 23:25:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id E675A8FC15; Sun, 14 Nov 2010 23:25:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAENPKnV062469; Mon, 15 Nov 2010 00:25:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAENPKWx062468; Mon, 15 Nov 2010 00:25:20 +0100 (CET) (envelope-from marius) Date: Mon, 15 Nov 2010 00:25:20 +0100 From: Marius Strobl To: Gavin Atkinson Message-ID: <20101114232520.GB57077@alchemy.franken.de> References: <201011141309.oAED9Xcv082719@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: r215295 - head/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:25:22 -0000 On Sun, Nov 14, 2010 at 11:13:24PM +0000, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Marius Strobl wrote: > > Author: marius > > Date: Sun Nov 14 13:09:32 2010 > > New Revision: 215295 > > URL: http://svn.freebsd.org/changeset/base/215295 > > > > Log: > > Let cryptosoft(4) add its pseudo-device with a specific unit number and its > > probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real > > devices hanging off of nexus(4) with no specific devclass set. Actually, the > > more desirable fix for this would be to get rid of the newbus interface of > > cryptosoft(4) altogether but apparently crypto(9) was written with support > > for cryptographic hardware in mind so that approach would require some KPI > > breaking changes which don't seem worth it. > > I'm guessing this fixes kern/132129 and kern/136123? > Likely, I haven't seen the failure mode described in these PRs though. Marius From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:37:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8547A1065673; Sun, 14 Nov 2010 23:37:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6955D8FC13; Sun, 14 Nov 2010 23:37: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 oAENbhRt097427; Sun, 14 Nov 2010 23:37:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAENbheD097425; Sun, 14 Nov 2010 23:37:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011142337.oAENbheD097425@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 14 Nov 2010 23:37: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: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:37:43 -0000 Author: yongari Date: Sun Nov 14 23:37:43 2010 New Revision: 215327 URL: http://svn.freebsd.org/changeset/base/215327 Log: P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue such that nfe(4) does not work with MSI-X. When MSI-X support was introduced, I remember MCP55 controller worked without problems so the issue could be either PCI bridge or BIOS issue. But I also noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still not sure this is generic issue of MCP55 chipset. If this was PCI bridge issue we would have added it to a system wide black-list table but it's not clear to me at this moment whether it was caused by either broken BIOS or silicon bug of MCP55 chipset. To workaround the issue, maintain a MSI/MSI-X black-list table in driver and lookup base board manufacturer and product name from the table before attempting to use MSI-X. If driver find an matching entry, nfe(4) will not use MSI/MSI-X and fall back on traditional INTx mode. This approach should be the last resort since it relies on smbios and if another instance of MSI/MSI-X breakage is reported with different maker/product, we may have to get the PCI bridge black-listed instead of adding an new entry. PR: kern/152150 Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Sun Nov 14 23:05:57 2010 (r215326) +++ head/sys/dev/nfe/if_nfe.c Sun Nov 14 23:37:43 2010 (r215327) @@ -77,6 +77,7 @@ static int nfe_detach(device_t); static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); +static int nfe_can_use_msix(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -383,6 +384,13 @@ nfe_attach(device_t dev) "max. width of link(x%d)\n", width, v); } + if (nfe_can_use_msix(sc) == 0) { + device_printf(sc->nfe_dev, + "MSI/MSI-X capability black-listed, will use INTx\n"); + msix_disable = 1; + msi_disable = 1; + } + /* Allocate interrupt */ if (msix_disable == 0 || msi_disable == 0) { if (msix_disable == 0 && @@ -784,6 +792,41 @@ nfe_resume(device_t dev) } +static int +nfe_can_use_msix(struct nfe_softc *sc) +{ + static struct msix_blacklist { + char *maker; + char *product; + } msix_blacklists[] = { + { "ASUSTeK Computer INC.", "P5N32-SLI PREMIUM" } + }; + + struct msix_blacklist *mblp; + char *maker, *product; + int count, n; + + /* + * Search base board manufacturer and product name table + * to see this system has a known MSI/MSI-X issue. + */ + maker = getenv("smbios.planar.maker"); + product = getenv("smbios.planar.product"); + if (maker != NULL && product != NULL) { + count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); + mblp = msix_blacklists; + for (n = 0; n < count; n++) { + if (strcmp(maker, mblp->maker) == 0 && + strcmp(product, mblp->product) == 0) + return (0); + mblp++; + } + } + + return (1); +} + + /* Take PHY/NIC out of powerdown, from Linux */ static void nfe_power(struct nfe_softc *sc) From owner-svn-src-all@FreeBSD.ORG Sun Nov 14 23:53:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2689106564A; Sun, 14 Nov 2010 23:53:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 963668FC17; Sun, 14 Nov 2010 23:53: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 oAENrDSw097789; Sun, 14 Nov 2010 23:53:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAENrDu1097787; Sun, 14 Nov 2010 23:53:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011142353.oAENrDu1097787@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 14 Nov 2010 23:53: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: r215328 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:53:14 -0000 Author: yongari Date: Sun Nov 14 23:53:13 2010 New Revision: 215328 URL: http://svn.freebsd.org/changeset/base/215328 Log: Add flow control for 3C905B and newer controllers. Note, these controllers support RX pause only. Reviewed by: marius Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sun Nov 14 23:37:43 2010 (r215327) +++ head/sys/dev/xl/if_xl.c Sun Nov 14 23:53:13 2010 (r215328) @@ -555,6 +555,7 @@ xl_miibus_statchg(device_t dev) { struct xl_softc *sc; struct mii_data *mii; + uint8_t macctl; sc = device_get_softc(dev); mii = device_get_softc(sc->xl_miibus); @@ -563,11 +564,22 @@ xl_miibus_statchg(device_t dev) /* Set ASIC's duplex mode to match the PHY. */ XL_SEL_WIN(3); - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) - CSR_WRITE_1(sc, XL_W3_MAC_CTRL, XL_MACCTRL_DUPLEX); - else - CSR_WRITE_1(sc, XL_W3_MAC_CTRL, - (CSR_READ_1(sc, XL_W3_MAC_CTRL) & ~XL_MACCTRL_DUPLEX)); + macctl = CSR_READ_1(sc, XL_W3_MAC_CTRL); + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + macctl |= XL_MACCTRL_DUPLEX; + if (sc->xl_type == XL_TYPE_905B) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) + macctl |= XL_MACCTRL_FLOW_CONTROL_ENB; + else + macctl &= ~XL_MACCTRL_FLOW_CONTROL_ENB; + } + } else { + macctl &= ~XL_MACCTRL_DUPLEX; + if (sc->xl_type == XL_TYPE_905B) + macctl &= ~XL_MACCTRL_FLOW_CONTROL_ENB; + } + CSR_WRITE_1(sc, XL_W3_MAC_CTRL, macctl); } /* @@ -1464,7 +1476,8 @@ xl_attach(device_t dev) if ((sc->xl_flags & XL_FLAG_PHYOK) == 0) phy = 24; error = mii_attach(dev, &sc->xl_miibus, ifp, xl_ifmedia_upd, - xl_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + xl_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, + sc->xl_type == XL_TYPE_905B ? MIIF_DOPAUSE : 0); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 00:06:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE5C5106566B; Mon, 15 Nov 2010 00:06:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6BF8FC1A; Mon, 15 Nov 2010 00: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 oAF06JkD098154; Mon, 15 Nov 2010 00:06:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF06JcI098152; Mon, 15 Nov 2010 00:06:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011150006.oAF06JcI098152@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 15 Nov 2010 00:06: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: r215329 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:06:19 -0000 Author: yongari Date: Mon Nov 15 00:06:19 2010 New Revision: 215329 URL: http://svn.freebsd.org/changeset/base/215329 Log: Add flow control for all re(4) controllers. re(4) controllers do not provide any MAC configuration interface for resolved flow control parameters. There is even no register that configures water mark which will control generation of pause frames. However enabling flow control surely enhanced performance a lot. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Sun Nov 14 23:53:13 2010 (r215328) +++ head/sys/dev/re/if_re.c Mon Nov 15 00:06:19 2010 (r215329) @@ -1449,7 +1449,7 @@ re_attach(device_t dev) if (sc->rl_type == RL_8169) phy = 1; error = mii_attach(dev, &sc->rl_miibus, ifp, re_ifmedia_upd, - re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 00:11:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142F4106566C; Mon, 15 Nov 2010 00:11:54 +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 3A93E8FC08; Mon, 15 Nov 2010 00:11:52 +0000 (UTC) Received: by bwz2 with SMTP id 2so4698234bwz.13 for ; Sun, 14 Nov 2010 16:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=FoaCtLQSqDUBj3HpGPf1C+XsBkmevIw2iq2WuWTxtLA=; b=WjJo2f+uYOiu5B6gIfJzhC34Ss76ROpkncv4rUrOZFYZTEMgEZQwOpRn58TL8JiV1D vLMtgO6UXjb/QX3zIk4ZBzZMhttD6ugVnVeAvsV9RuHepDQc12KYPTidiJv4ZUxUNXX+ sOnZv2unXXT+vtiGU/q/nwoILML32T3o3Ju4o= 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=Tzf+TyysyaKCOGdWoVUMHV2YK62/J5j53KybOFj3L5SxvDlUn5HkQWCEn2eQF8ofON HmpJxG1Z7lMLAUn0jf1GPs7sTzL5cTPa4Jbhz6evFMicPhaQbKQ7Msp4zer3cMCBWipS Z5ipThQ9s3WWn7MFOu0fOfRIypCJF+YTyPceY= Received: by 10.204.53.4 with SMTP id k4mr5363777bkg.145.1289779911798; Sun, 14 Nov 2010 16:11:51 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g8sm2716388bkg.23.2010.11.14.16.11.49 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 16:11:50 -0800 (PST) Sender: Alexander Motin Message-ID: <4CE07AA3.6040205@FreeBSD.org> Date: Mon, 15 Nov 2010 02:11:15 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Pyun YongHyeon References: <201011142337.oAENbheD097425@svn.freebsd.org> In-Reply-To: <201011142337.oAENbheD097425@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:11:54 -0000 Pyun YongHyeon wrote: > Author: yongari > Date: Sun Nov 14 23:37:43 2010 > New Revision: 215327 > URL: http://svn.freebsd.org/changeset/base/215327 > > Log: > P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > such that nfe(4) does not work with MSI-X. When MSI-X support was > introduced, I remember MCP55 controller worked without problems so > the issue could be either PCI bridge or BIOS issue. But I also > noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > not sure this is generic issue of MCP55 chipset. If this was PCI > bridge issue we would have added it to a system wide black-list > table but it's not clear to me at this moment whether it was caused > by either broken BIOS or silicon bug of MCP55 chipset. MCP5x seem to be infinite source of surprises. Some reports I remember: - snd_hda not working with MSI enabled - AFAIR not just loosing interrupts but completely stops responding; - using regular HPET interrupts breaks HDA sound after some time (interrupts are not shared), while legacy_route mode operates properly; - at least on one system I've seen non-functioning SATA interrupts. It would be nice to find what's going on there. I've got tired to add workarounds for it. :( -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 00:14:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB74106576B; Mon, 15 Nov 2010 00:14:31 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 54C2A8FC14; Mon, 15 Nov 2010 00:14:29 +0000 (UTC) Received: by wyb36 with SMTP id 36so1988534wyb.13 for ; Sun, 14 Nov 2010 16:14:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.29.92 with SMTP id p28mr5352524wbc.70.1289778708696; Sun, 14 Nov 2010 15:51:48 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.146.67 with HTTP; Sun, 14 Nov 2010 15:51:48 -0800 (PST) In-Reply-To: References: <201011142041.oAEKfN6Y093321@svn.freebsd.org> Date: Mon, 15 Nov 2010 12:51:48 +1300 X-Google-Sender-Auth: h3mP9bKrH-y9GqyEH6qr4mBTuWg Message-ID: From: Andrew Thompson To: Gavin Atkinson 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: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:14:31 -0000 On 15 November 2010 11:56, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Andrew Thompson wrote: > >> Author: thompsa >> Date: Sun Nov 14 20:41:22 2010 >> New Revision: 215319 >> URL: http://svn.freebsd.org/changeset/base/215319 >> >> Log: >> =A0 Provide a mutex around the read/modify/write of the IXP425_GPIO_* >> =A0 registers. Giant was used in some places, but not all. > > I believe this should fix my PR arm/134338, but don't have the bandwidth > at the moment to verify that. =A0Is there any chance you could see if you > believe the same? It is essentially the same. I have not added locks around the probe/attach routines as interrupts/scheduler are still disabled. Andrew From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 00:28:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21295106566B; Mon, 15 Nov 2010 00:28:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 34E528FC08; Mon, 15 Nov 2010 00:28:05 +0000 (UTC) Received: by gxk9 with SMTP id 9so2844846gxk.13 for ; Sun, 14 Nov 2010 16:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=aWG0sf+fkxfhJAqhMtCZlBi/Q4PAioXnkCuIn5CkQkw=; b=f0iMTubu12fmCgZonaAwAH94KI7YsPNm/st2LcPbMUBoPFXIwrMdO2z7fwjP4NGJfT QuTZe+wW+AhXrSeW6ETylBs4olEQs54VCW//ku47Z7DlAcK52qTHaJNh6hvKIXEk8XSm Y1waOUS49KC+hD3IGB08sUqfLw0hMzVQJSjas= 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=OcACnu64sOfYRC1EgnBMPTz0zX1MIHTqmFiOuDrNdHZgyQpFNoed5FWOQ8JxPohohh xrvnJeey056s9HqkPcfvBJ4aVW6/XALbwKT8pydcsN293KUhDgx3ghrLdF/qe0cbH2Wv /UZ2avczTKvaXblh2PJa1BsQTfnGjYQ5Kqnaw= Received: by 10.150.190.3 with SMTP id n3mr8389258ybf.282.1289780884593; Sun, 14 Nov 2010 16:28:04 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 5sm4178402yhl.47.2010.11.14.16.28.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 16:28:02 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 14 Nov 2010 16:27:59 -0800 From: Pyun YongHyeon Date: Sun, 14 Nov 2010 16:27:59 -0800 To: Alexander Motin Message-ID: <20101115002759.GA1351@michelle.cdnetworks.com> References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE07AA3.6040205@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe 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, 15 Nov 2010 00:28:06 -0000 On Mon, Nov 15, 2010 at 02:11:15AM +0200, Alexander Motin wrote: > Pyun YongHyeon wrote: > > Author: yongari > > Date: Sun Nov 14 23:37:43 2010 > > New Revision: 215327 > > URL: http://svn.freebsd.org/changeset/base/215327 > > > > Log: > > P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > > such that nfe(4) does not work with MSI-X. When MSI-X support was > > introduced, I remember MCP55 controller worked without problems so > > the issue could be either PCI bridge or BIOS issue. But I also > > noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > > not sure this is generic issue of MCP55 chipset. If this was PCI > > bridge issue we would have added it to a system wide black-list > > table but it's not clear to me at this moment whether it was caused > > by either broken BIOS or silicon bug of MCP55 chipset. > > MCP5x seem to be infinite source of surprises. Some reports I remember: Yeah, they even do not release any errata. > - snd_hda not working with MSI enabled - AFAIR not just loosing > interrupts but completely stops responding; > - using regular HPET interrupts breaks HDA sound after some time > (interrupts are not shared), while legacy_route mode operates properly; > - at least on one system I've seen non-functioning SATA interrupts. > It would be nice to find what's going on there. I've got tired to add > workarounds for it. :( > Yeah, I agree but I'm sure not all MCP55 was broken because one user who tested MCP55 with MSI-X reported success. This is reason why I didn't add it to system-wide blacklist table. If you remember exact PCI bridge chipset I think you can compare it with the pciconf output in PR/152150 and if it's the same we can move it to PCI quirk table. From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 00:51:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 93E9A1065670; Mon, 15 Nov 2010 00:51:23 +0000 (UTC) Date: Mon, 15 Nov 2010 00:51:23 +0000 From: Alexander Best To: Steve Kargl Message-ID: <20101115005123.GA46134@freebsd.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101113164645.GB69612@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101113164645.GB69612@troutmask.apl.washington.edu> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:51:23 -0000 On Sat Nov 13 10, Steve Kargl wrote: > On Sat, Nov 13, 2010 at 12:56:48PM +0000, Alexander Best wrote: > > On Sat Nov 13 10, Ulrich Spoerlein wrote: > > > Author: uqs > > > Date: Sat Nov 13 10:54:10 2010 > > > New Revision: 215237 > > > URL: http://svn.freebsd.org/changeset/base/215237 > > > > > > Log: > > > Fix bug in jn(3) and jnf(3) that led to -inf results > > > > thank you very much for fixing this long outstanding issue. > > you might want to have a look at [1], where two more issues have been reported. > > > > cheers. > > alex > > > > [1] http://mailman.oakapple.net/pipermail/numeric-interest/2010-September/thread.html > > > > Ulrich, thanks. Of the two remaining issues, I can verify > one is indeed an issue. also it seems one of the regression tests in tools/regression/lib/msun fails (assert tripped): test-lrint. cheers. alex > > laptop:kargl[204] cat mn.c > #include > #include > > static const double z = 0.; > > int > main(void) > { > double x, y; > x = -1. / z; > y = exp( 0.5 * log(x)); > printf("pow(%f, 0.5) = %le, %le\n", x, pow(x, 0.5), y); > y = exp(-0.5 * log(x)); > printf("pow(%f, -0.5) = %le, %le\n", x, pow(x, -0.5), y); > return 0; > } > > laptop:kargl[205] cc -o z mn.c -fno-builtin -lm && ./z > pow(-inf, 0.5) = inf, nan > pow(-inf, -0.5) = 0.000000e+00, nan > > -- > Steve -- a13x From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 01:24:14 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1701B1065670; Mon, 15 Nov 2010 01:24:14 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id C91B78FC23; Mon, 15 Nov 2010 01:24:13 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 27B7B7E8A5; Mon, 15 Nov 2010 12:24:07 +1100 (EST) Message-ID: <4CE08BB6.1090304@freebsd.org> Date: Mon, 15 Nov 2010 12:24:06 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> In-Reply-To: <86pqu8q6lb.fsf@kopusha.home.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 01:24:14 -0000 On 11/15/10 02:15, Mikolaj Golub wrote: > > On Sun, 14 Nov 2010 12:24:40 +1100 Lawrence Stewart wrote: > > LS> On 11/13/10 20:40, Mikolaj Golub wrote: > >> > >> On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: > >> > >> LS> Author: lstewart > >> LS> Date: Fri Nov 12 06:41:55 2010 > >> LS> New Revision: 215166 > >> LS> URL: http://svn.freebsd.org/changeset/base/215166 > >> > >> LS> Log: > >> LS> This commit marks the first formal contribution of the "Five New TCP Congestion > >> LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details > >> LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ > >> > >> It looks like the code needs improvement to work with VIMAGE :-) > >> > >> options VIMAGE > >> > >> jail -i -c vnet persist path=/ > >> > >> panic: lock "cc_list" 0xc101c418 already initialized > >> [snip backtrace] > > LS> Would you mind testing the following patch? It fixes the panic for me. > > LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > > With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > ddb does not work. I am trying this under VirtualBox. I can't reproduce a hang, but please try this patch instead: http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch The previous patch had a bug, in that CC modules register with SI_ORDER_ANY in the same SI_SUB_PROTO_IFATTACHDOMAIN category as the CC framework's SYSINIT (which also ran with SI_ORDER_ANY). Therefore, there is a possibility an algo could have tried to register before the CC framework SYSINIT ran. To be honest though, I don't expect the updated patch will fix the hang. I would have expected a panic rather than a hang if you were seeing any complications due to the SYSINIT ordering because the algo registration would have attempted to use an uninitialised lock. I suspect your hang might be caused by something unrelated to the modular CC work, but let me know how you go. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 02:27:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C33F106564A; Mon, 15 Nov 2010 02:27:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0278FC15; Mon, 15 Nov 2010 02:27:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF2R1qv001139; Mon, 15 Nov 2010 02:27:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF2R11K001136; Mon, 15 Nov 2010 02:27:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011150227.oAF2R11K001136@svn.freebsd.org> From: Andrew Thompson Date: Mon, 15 Nov 2010 02:27: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: r215330 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 02:27:01 -0000 Author: thompsa Date: Mon Nov 15 02:27:01 2010 New Revision: 215330 URL: http://svn.freebsd.org/changeset/base/215330 Log: Add the Sierra MC8700. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Nov 15 00:06:19 2010 (r215329) +++ head/sys/dev/usb/serial/u3g.c Mon Nov 15 02:27:01 2010 (r215330) @@ -458,6 +458,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), U3G_DEV(SIERRA, MC8755_3, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Nov 15 00:06:19 2010 (r215329) +++ head/sys/dev/usb/usbdevs Mon Nov 15 02:27:01 2010 (r215330) @@ -2920,6 +2920,7 @@ product SIERRA C888 0x6890 C888 product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 +product SIERRA MC8700 0x68A3 MC8700 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 02:39:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACAFE1065672; Mon, 15 Nov 2010 02:39:52 +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 447468FC0C; Mon, 15 Nov 2010 02:39:51 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF2dlh9019650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 13:39:48 +1100 Date: Mon, 15 Nov 2010 13:39:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Best In-Reply-To: <20101115005123.GA46134@freebsd.org> Message-ID: <20101115124817.O1683@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101113164645.GB69612@troutmask.apl.washington.edu> <20101115005123.GA46134@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, Steve Kargl , Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 02:39:52 -0000 On Mon, 15 Nov 2010, Alexander Best wrote: > also it seems one of the regression tests in tools/regression/lib/msun fails > (assert tripped): test-lrint. I get this on amd64, and lots more failures starting with csqrt() on i386. Here is the output of make >foo 2>&1, after adding "set +e; " to the loop in the Makefile so that the shell loop doesn't abort on the first failure: % set +e; for p in test-conj test-csqrt test-exponential test-fenv test-fma test-fmaxmin test-ilogb test-invtrig test-lrint test-lround test-nan test-next test-rem test-trig; do /dumpster/home/bde/q/src/tools/regression/lib/msun/$p; done % 1..42 % ok 1 # conjf(0.0 + 0.0I) % ok 2 # conj(0.0 + 0.0I) % ok 3 # conjl(0.0 + 0.0I) % ok 4 # conjf(0.0 + 1.0I) % ok 5 # conj(0.0 + 1.0I) % ok 6 # conjl(0.0 + 1.0I) % ok 7 # conjf(1.0 + 0.0I) % ok 8 # conj(1.0 + 0.0I) % ok 9 # conjl(1.0 + 0.0I) % ok 10 # conjf(-1.0 + 0.0I) % ok 11 # conj(-1.0 + 0.0I) % ok 12 # conjl(-1.0 + 0.0I) % ok 13 # conjf(1.0 + -0.0I) % ok 14 # conj(1.0 + -0.0I) % ok 15 # conjl(1.0 + -0.0I) % ok 16 # conjf(0.0 + -1.0I) % ok 17 # conj(0.0 + -1.0I) % ok 18 # conjl(0.0 + -1.0I) % ok 19 # conjf(2.0 + 4.0I) % ok 20 # conj(2.0 + 4.0I) % ok 21 # conjl(2.0 + 4.0I) % ok 22 # conjf(0.0 + infI) % ok 23 # conj(0.0 + infI) % ok 24 # conjl(0.0 + infI) % ok 25 # conjf(0.0 + -infI) % ok 26 # conj(0.0 + -infI) % ok 27 # conjl(0.0 + -infI) % ok 28 # conjf(inf + 0.0I) % ok 29 # conj(inf + 0.0I) % ok 30 # conjl(inf + 0.0I) % ok 31 # conjf(nan + 1.0I) % ok 32 # conj(nan + 1.0I) % ok 33 # conjl(nan + 1.0I) % ok 34 # conjf(1.0 + nanI) % ok 35 # conj(1.0 + nanI) % ok 36 # conjl(1.0 + nanI) % ok 37 # conjf(nan + nanI) % ok 38 # conj(nan + nanI) % ok 39 # conjl(nan + nanI) % ok 40 # conjf(-inf + infI) % ok 41 # conj(-inf + infI) % ok 42 # conjl(-inf + infI) % Assertion failed: (creall(result) == ldexpl(14 * 0x1p-4, maxexp / 2)), function test_overflow, file test-csqrt.c, line 258. % 1..15 Probably just due to not setting the rounding precision to extended before calling the long double functions. Callers are expected to know about this bug, but the unreasonableness of this expectation is demonstrated by not all of the tests doing it, and the ones that do it do it incorrectly by setting it for all precisions, which breaks some of the double precision functions in msun and may give false successes by running the double or float precision functions in an abnormal environment. % ok 1 - csqrt % ok 2 - csqrt % ok 3 - csqrt % ok 4 - csqrt % ok 5 - csqrt % ok 6 - csqrt % ok 7 - csqrt % ok 8 - csqrt % ok 9 - csqrt % ok 10 - csqrt % ok 11 - csqrt % ok 12 - csqrt % ok 13 - csqrt % ok 14 - csqrt % Abort trap (core dumped) The tests are missing fflush()'s, so the error output for test 15 (?) occurs before the normal output for tests 1-14. Then the shell prints the abort message in the correct order. Output to a terminal is more readable due to the line buffering. % Assertion failed: (fpequal((exp2)(_d), (__builtin_inff()))), function run_generic_tests, file test-exponential.c, line 118. % 1..3 % Abort trap (core dumped) Unordered again. This is test 1 in test-exponential. test-exponential does set the rounding precision to extended. % 1..8 % ok 1 - fenv % ok 2 - fenv % ok 3 - fenv % ok 4 - fenv % ok 5 - fenv % ok 6 - fenv % ok 7 - fenv % ok 8 - fenv % Assertion failed: (fpequal((fmal)((1.1897314953572317650E+4932L), (1.1897314953572317650E+4932L), (-__builtin_inff())), (-__builtin_inff()))), function test_infinities, file test-fma.c, line 156. Maybe a general problem with __builting_inf() vs long doubles? % 1..18 % ok 1 - fma zeroes % ok 2 - fma zeroes % ok 3 - fma zeroes % ok 4 - fma zeroes % Abort trap (core dumped) % 1..12 % ok 1 - big = 1, small = 0 % ok 2 - big = 42, small = 41.999996185302734375 % ok 3 - big = 42.000003814697265625, small = 42 % ok 4 - big = -5, small = -5 % ok 5 - big = -3, small = -4 % ok 6 - big = 1, small = nan % ok 7 - big = inf, small = nan % ok 8 - big = inf, small = 1 % ok 9 - big = -3, small = -inf % ok 10 - big = 3, small = -inf % ok 11 - big = nan, small = nan % ok 12 - big = 0, small = -0 % 1..3 % ok 1 - ilogb % ok 2 - ilogbf % ok 3 - ilogbl % Assertion failed: (fpequal(acosf(_in), _out, ((0) * ldexpf(1.0, 1 - 24)))), function test_special, file test-invtrig.c, line 144. % 1..7 % Abort trap (core dumped) test-invtrig is missing setting of the rounding precision. % Assertion failed: ((lrint)(__builtin_inff()) == (0) || fetestexcept(FE_INVALID)), function run_tests, file test-lrint.c, line 79. % 1..1 % Abort trap (core dumped) Same as on amd64. This is compiler bug. (lrint)(__builtin_inff()) is evaluated at compile time despite being compiled with -O0, and it is evaluated incorrectly, without setting FE_INVALID as lrint() is specified to do when the result is not representable. In other words, gcc doesn't understand its own __builtin_inff() when combined with its builtin lrint(). Compiling the tests with -fno-builtin "fixes" this by avoiding the buggy builtin lrint(). The macros made debugging this painful. I preprocessed the source file using cpp -E and indent. indent made a mess of the hex constants by putting spaces in them. % 1..1 % ok 1 - lround % 1..1 % ok 1 - nan % 1..5 % ok 1 - next % ok 2 - next % ok 3 - next % ok 4 - next % ok 5 - next % 1..2 % ok 1 - rem % ok 2 - rem % 1..3 % ok 1 - trig % ok 2 - trig % ok 3 - trig Bruce From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 02:53:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC9F106564A; Mon, 15 Nov 2010 02:53:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 88ABA8FC0A; Mon, 15 Nov 2010 02:53:04 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF2r0Jk020979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 13:53:01 +1100 Date: Mon, 15 Nov 2010 13:53:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201011141610.oAEGAFK8086784@svn.freebsd.org> Message-ID: <20101115134014.D1683@besplex.bde.org> References: <201011141610.oAEGAFK8086784@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: r215304 - 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, 15 Nov 2010 02:53:05 -0000 On Sun, 14 Nov 2010, Bruce Cran wrote: > Log: > Fix some more style(9) issues. Better, but still has style bug(s) on almost every changed line... > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/kern_proc.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -145,7 +145,7 @@ uma_zone_t proc_zone; > > int kstack_pages = KSTACK_PAGES; > SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, > - "Kernel stack size in pages"); > + "Kernel stack size in pages"); ... Long SYSCTL declarations are conventionally always split after CTLFLAG* but aren't here... > Modified: head/sys/kern/kern_tc.c > ============================================================================== > --- head/sys/kern/kern_tc.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/kern_tc.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -770,7 +770,7 @@ pps_event(struct pps_state *pps, int eve > > static int tc_tick; > SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, > - "Approximate number of hardclock ticks in a millisecond"); > + "Approximate number of hardclock ticks in a millisecond"); ...or here... > void > tc_ticktock(int cnt) > > Modified: head/sys/kern/subr_clock.c > ============================================================================== > --- head/sys/kern/subr_clock.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/subr_clock.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -61,7 +61,7 @@ int tz_dsttime; > * kern. > */ > SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, > - CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); > + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); ...or here... (this one was an older mistake, split just before CTLFLAG* instead of long after). > @@ -74,8 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ > } > > SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, > - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", > - "Local offset from UTC in seconds"); > + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", > + "Local offset from UTC in seconds"); This one had normal splitting, but has the common bug of missing spaces around the binary operator "|", and had its single continuation line misindented. Then recent changes duplicated the misindentation of the coninued line. You fixed a lot of old bugs of this form. ... Bruce From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:03:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C3A1065696; Mon, 15 Nov 2010 03:03:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id B9ADA8FC1D; Mon, 15 Nov 2010 03:03:40 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF33aCt007174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 14:03:37 +1100 Date: Mon, 15 Nov 2010 14:03:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201011140609.oAE69oqd072190@svn.freebsd.org> Message-ID: <20101115135506.J1683@besplex.bde.org> References: <201011140609.oAE69oqd072190@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: r215281 - 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, 15 Nov 2010 03:03:41 -0000 On Sun, 14 Nov 2010, Bruce Cran wrote: > Log: > Add some descriptions to sys/kern sysctls. > Modified: head/sys/kern/kern_tc.c > ============================================================================== > --- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010 (r215280) > +++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010 (r215281) > @@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO, > > static int timestepwarnings; > SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, > - ×tepwarnings, 0, ""); > + ×tepwarnings, 0, "Log time steps"); Another problem (other than style bugs) with these and some old descriptions is inconsistent descriptions of boolean variables. I like always starting with "Enable". > @@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve > */ > > static int tc_tick; > -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); > +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); It can't possibly be that if a hardclock tick is much larger than a millisecond, and this doesn't describe its purpose. It is actually a rate limiter for timecounter updates, to avoid the natural rate of once per hardclock tick if that is considered too frequent. Thus it has nothing to do with milliseconds except once per millisecond is considered frequent enough. It is the number of hardclock ticks between timercounter updates. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:05:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96FCD106566C; Mon, 15 Nov 2010 03:05:33 +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 851C48FC1D; Mon, 15 Nov 2010 03:05: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 oAF35Xi1002235; Mon, 15 Nov 2010 03:05:33 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF35Xu1002233; Mon, 15 Nov 2010 03:05:33 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201011150305.oAF35Xu1002233@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 15 Nov 2010 03:05: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: r215331 - 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: Mon, 15 Nov 2010 03:05:33 -0000 Author: pjd Date: Mon Nov 15 03:05:33 2010 New Revision: 215331 URL: http://svn.freebsd.org/changeset/base/215331 Log: 1. Exit when we cannot create incoming connection. 2. Improve logging to inform which connection can't be created. Submitted by: [1] Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Nov 15 02:27:01 2010 (r215330) +++ head/sbin/hastd/primary.c Mon Nov 15 03:05:33 2010 (r215331) @@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, s /* Prepare outgoing connection with remote node. */ if (proto_client(res->hr_remoteaddr, &out) < 0) { - primary_exit(EX_TEMPFAIL, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create outgoing connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ @@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, s * Setup incoming connection with remote node. */ if (proto_client(res->hr_remoteaddr, &in) < 0) { - pjdlog_errno(LOG_WARNING, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create incoming connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:07:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3EB106566B; Mon, 15 Nov 2010 03:07:42 +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 BD5758FC13; Mon, 15 Nov 2010 03:07: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 oAF37gIq002304; Mon, 15 Nov 2010 03:07:42 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF37g0W002302; Mon, 15 Nov 2010 03:07:42 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201011150307.oAF37g0W002302@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 15 Nov 2010 03:07: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: r215332 - 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: Mon, 15 Nov 2010 03:07:42 -0000 Author: pjd Date: Mon Nov 15 03:07:42 2010 New Revision: 215332 URL: http://svn.freebsd.org/changeset/base/215332 Log: Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't modify it. Submitted by: Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Nov 15 03:05:33 2010 (r215331) +++ head/sbin/hastd/primary.c Mon Nov 15 03:07:42 2010 (r215332) @@ -2010,6 +2010,7 @@ guard_thread(void *arg) PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0); + timeout.tv_sec = RETRY_SLEEP; timeout.tv_nsec = 0; signo = -1; @@ -2035,7 +2036,6 @@ guard_thread(void *arg) guard_one(res, ii); lastcheck = now; } - timeout.tv_sec = RETRY_SLEEP; signo = sigtimedwait(&mask, NULL, &timeout); } /* NOTREACHED */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:34:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BC5241065673; Mon, 15 Nov 2010 03:34:09 +0000 (UTC) Date: Mon, 15 Nov 2010 03:34:09 +0000 From: Alexey Dokuchaev To: Warner Losh Message-ID: <20101115033409.GA52905@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201011140137.oAE1b9CW066153@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:34:09 -0000 On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: > Author: imp > Date: Sun Nov 14 01:37:08 2010 > New Revision: 215274 > URL: http://svn.freebsd.org/changeset/base/215274 > > Log: > This case is actually powerpc specific, and doesn't apply to powerpc64. > > Submitted by: nathanw@ finger nathanw@freebsd.org [...] finger: nathanw: no such user ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:38:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997EC106564A; Mon, 15 Nov 2010 03:38:54 +0000 (UTC) (envelope-from yanegomi@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 8493E8FC13; Mon, 15 Nov 2010 03:38:53 +0000 (UTC) Received: by wwi14 with SMTP id 14so512055wwi.31 for ; Sun, 14 Nov 2010 19:38:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=vFwmrsNc9+ag0D9plyH9QbZe1fvtlkRsivMaLWOwn70=; b=lZDKb4Z+GGWi9NvlkNQVLK+aYl4hkOUAlxYud+kXch96wn5ks9VgDmTZAYnvMdF3k3 ImxMtSOWNphmyVOyffNC6IbdS4WN2ryhfQHChyC8jj9PEitLJaxsayR+tMlOjRyP1/cD esoVvknphSz2T2O6eAL7q5cEdPxdIFSWtpMqQ= 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=a2tuojSAM4WwoXYuTNWWtvQJY65iBLmc9WJR/TGZv7uo3Zyi+MGE8CxYGh6aLc9LO4 +1d9oJSNVxYwprTspvZdK4gJ60Ju5XCOtmNkiPXAhb4hbcrDE589rrhmKgmxXM/H73i1 FoJYpySHPdGUcwmqs+z42a/sfbVmSm+kPOpPc= MIME-Version: 1.0 Received: by 10.216.175.18 with SMTP id y18mr5361036wel.30.1289792331391; Sun, 14 Nov 2010 19:38:51 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 19:38:51 -0800 (PST) In-Reply-To: <20101115033409.GA52905@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> Date: Sun, 14 Nov 2010 19:38:51 -0800 X-Google-Sender-Auth: ikijXThvhiAlvG226RC93f_K3hA Message-ID: From: Garrett Cooper To: Alexey Dokuchaev 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, Warner Losh Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:38:54 -0000 2010/11/14 Alexey Dokuchaev : > On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: >> Author: imp >> Date: Sun Nov 14 01:37:08 2010 >> New Revision: 215274 >> URL: http://svn.freebsd.org/changeset/base/215274 >> >> Log: >> =A0 This case is actually powerpc specific, and doesn't apply to powerpc= 64. >> >> =A0 Submitted by: =A0 =A0 =A0 nathanw@ > > finger nathanw@freebsd.org > [...] > finger: nathanw: no such user Was supposed to be nwhitehorn@ -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 03:47:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 07302106566C; Mon, 15 Nov 2010 03:47:30 +0000 (UTC) Date: Mon, 15 Nov 2010 03:47:30 +0000 From: Alexey Dokuchaev To: Garrett Cooper Message-ID: <20101115034729.GA68931@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:47:30 -0000 On Sun, Nov 14, 2010 at 07:38:51PM -0800, Garrett Cooper wrote: > 2010/11/14 Alexey Dokuchaev : > > On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: > >> Log: > >> š This case is actually powerpc specific, and doesn't apply to powerpc64. > >> > >> š Submitted by: š š š nathanw@ > > > > finger nathanw@freebsd.org > > [...] > > finger: nathanw: no such user > > Was supposed to be nwhitehorn@ You know that, I know, and others likely know it as well. My point, however, is that this might not be true to someone reading the logs 10 years from now. ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 04:12:50 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5B4E106564A; Mon, 15 Nov 2010 04:12:50 +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 A34A28FC19; Mon, 15 Nov 2010 04:12:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAF44llr010206; Sun, 14 Nov 2010 21:04:47 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CE0B15F.2050006@bsdimp.com> Date: Sun, 14 Nov 2010 21:04:47 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: Alexey Dokuchaev References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> <20101115034729.GA68931@FreeBSD.org> In-Reply-To: <20101115034729.GA68931@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Warner Losh , Garrett Cooper Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 04:12:51 -0000 On 11/14/2010 20:47, Alexey Dokuchaev wrote: > On Sun, Nov 14, 2010 at 07:38:51PM -0800, Garrett Cooper wrote: >> 2010/11/14 Alexey Dokuchaev: >>> On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: >>>> Log: >>>> This case is actually powerpc specific, and doesn't apply to powerpc64. >>>> >>>> Submitted by: nathanw@ >>> finger nathanw@freebsd.org >>> [...] >>> finger: nathanw: no such user >> Was supposed to be nwhitehorn@ > You know that, I know, and others likely know it as well. My point, > however, is that this might not be true to someone reading the logs 10 > years from now. Point taken. I'd forgotten he's backwards in email than in irc. :) Warner > ./danfe > > > From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 05:25:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B25106566C; Mon, 15 Nov 2010 05:25:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133568FC24; Mon, 15 Nov 2010 05:25: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 oAF5PpJI005453; Mon, 15 Nov 2010 05:25:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF5Pp8J005442; Mon, 15 Nov 2010 05:25:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201011150525.oAF5Pp8J005442@svn.freebsd.org> From: Doug Barton Date: Mon, 15 Nov 2010 05:25: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: r215334 - in head: share/doc/papers/jail share/doc/smm/01.setup share/man/man8 sys/dev/firewire sys/dev/tdfx usr.sbin/config/SMM.doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 05:25:52 -0000 Author: dougb Date: Mon Nov 15 05:25:51 2010 New Revision: 215334 URL: http://svn.freebsd.org/changeset/base/215334 Log: Remove references to MAKEDEV(8) Deleted: head/share/man/man8/MAKEDEV.8 Modified: head/share/doc/papers/jail/mgt.ms head/share/doc/smm/01.setup/2.t head/share/doc/smm/01.setup/4.t head/share/doc/smm/01.setup/5.t head/share/doc/smm/01.setup/spell.ok head/share/man/man8/Makefile head/sys/dev/firewire/00README head/sys/dev/tdfx/tdfx_pci.c head/usr.sbin/config/SMM.doc/6.t head/usr.sbin/config/SMM.doc/spell.ok Modified: head/share/doc/papers/jail/mgt.ms ============================================================================== --- head/share/doc/papers/jail/mgt.ms Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/papers/jail/mgt.ms Mon Nov 15 05:25:51 2010 (r215334) @@ -56,8 +56,6 @@ FreeBSD build environment. .PP One notable difference from the default FreeBSD install is that only a limited set of device nodes should be created. -MAKEDEV(8) has been modified to accept a ``jail'' argument that creates -the correct set of nodes. .PP To improve storage efficiency, a fair number of the binaries in the system tree may be deleted, as they are not relevant in a jail environment. Modified: head/share/doc/smm/01.setup/2.t ============================================================================== --- head/share/doc/smm/01.setup/2.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/2.t Mon Nov 15 05:25:51 2010 (r215334) @@ -482,13 +482,7 @@ lw(2i) l. \fB#\fP \fImount_mfs -s 1000 -T type /dev/null /tmp\fP (create a writable filesystem) (\fItype\fP is the disk type as determined from /etc/disktab) \fB#\fP \fIcd /tmp\fP (connect to that directory) -\fB#\fP \fI../dev/MAKEDEV \*(Dk#\fP (create special files for root disk) -(\fI\*(Dk\fP is the disk type, \fI#\fP is the unit number) -(ignore warning from ``sh'') \fB#\fP \fImount \-uw /tmp/\*(Dk#a /\fP (read-write mount root filesystem) -\fB#\fP \fIcd /dev\fP (go to device directory) -\fB#\fP \fI./MAKEDEV \*(Dk#\fP (create permanent special files for root disk) -(again, ignore warning from ``sh'') .TE .DE .Sh 4 "Step 4: (optional) restoring the root filesystem" @@ -513,8 +507,6 @@ To really create the root filesystem on you should first label the disk as described in step 5 below. Then run the following commands: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fI./MAKEDEV \*(Dk1a\fP \fB#\fP\|\fInewfs /dev/r\*(Dk1a\fP \fB#\fP\|\fImount /dev/\*(Dk1a /mnt\fP \fB#\fP\|\fIcd /mnt\fP @@ -1393,8 +1385,6 @@ To make the .Pn /var filesystem we would do: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV \*(Dk1\fP \fB#\fP \fIdisklabel -wr \*(Dk1 "disk type" "disk name"\fP \fB#\fP \fInewfs \*(Dk1f\fP (information about filesystem prints out) Modified: head/share/doc/smm/01.setup/4.t ============================================================================== --- head/share/doc/smm/01.setup/4.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/4.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)4.t 8.1 (Berkeley) 7/29/93 +.\" $FreeBSD$ .\" .ds LH "Installing/Operating \*(4B .ds CF \*(Dy @@ -152,38 +153,11 @@ directory. For all the devices supported by the distribution system, the files in .Pn /dev -are created by the -.Pn /dev/MAKEDEV -shell script. +are created by devfs. .PP Determine the set of devices that you have and create a new .Pn /dev -directory by running the MAKEDEV script. -First create a new directory -.Pn /newdev , -copy MAKEDEV into it, edit the file MAKEDEV.local -to provide an entry for local needs, -and run it to generate a -.Pn /newdev directory. -For instance, -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImkdir newdev\fP -\fB#\fP \fIcp dev/MAKEDEV newdev/MAKEDEV\fP -\fB#\fP \fIcd newdev\fP -\fB#\fP \fIMAKEDEV \*(Dk0 pt0 std LOCAL\fP -.DE -Note the ``std'' argument causes standard devices such as -.Pn /dev/console , -the machine console, to be created. -.PP -You can then do -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImv dev olddev ; mv newdev dev\fP -\fB#\fP \fIsync\fP -.DE -to install the new device directory. +directory by mounting devfs. .Sh 3 "Building new system images" .PP The kernel configuration of each UNIX system is described by @@ -232,8 +206,8 @@ the file must be edited. .PP To add a new terminal device, be sure the device is configured into the system -and that the special files for the device have been made by -.Pn /dev/MAKEDEV . +and that the special files for the device exist in +.Pn /dev . Then, enable the appropriate lines of .Pn /etc/ttys by setting the ``status'' @@ -335,9 +309,6 @@ Finally note that you should change the terminals to ttyd? where ? is in [0-9a-zA-Z], as some programs use this property of the names to determine if a terminal is a dialup. -Shell commands to do this should be put in the -.Pn /dev/MAKEDEV.local -script. .PP While it is possible to use truly arbitrary strings for terminal names, the accounting and noticeably the Modified: head/share/doc/smm/01.setup/5.t ============================================================================== --- head/share/doc/smm/01.setup/5.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/5.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)5.t 8.1 (Berkeley) 7/27/93 +.\" $FreeBSD$ .\" .ds lq `` .ds rq '' @@ -111,35 +112,6 @@ translations for machines that do not pa command. Additional information is provided in the manual page describing .Xr ESIS (4). -.PP -To use the pseudo terminals just configured, device -entries must be created in the -.Pn /dev -directory. To create 32 -pseudo terminals (plenty, unless you have a heavy network load) -execute the following commands. -.DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV pty0 pty1\fP -.DE -More pseudo terminals may be made by specifying -.Pn pty2 , -.Pn pty3 , -etc. The kernel normally includes support for 32 pseudo terminals -unless the configuration file specifies a different number. -Each pseudo terminal really consists of two files in -.Pn /dev : -a master and a slave. The master pseudo terminal file is named -.Pn /dev/ptyp? , -while the slave side is -.Pn /dev/ttyp? . -Pseudo terminals are also used by several programs not related to the network. -In addition to creating the pseudo terminals, -be sure to install them in the -.Pn /etc/ttys -file (with a `none' in the second column so no -.Xr getty -is started). .Sh 2 "Local subnets" .PP In \*(4B the Internet support Modified: head/share/doc/smm/01.setup/spell.ok ============================================================================== --- head/share/doc/smm/01.setup/spell.ok Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/spell.ok Mon Nov 15 05:25:51 2010 (r215334) @@ -1,3 +1,4 @@ +# $FreeBSD$ A1096A AA ACU @@ -91,7 +92,6 @@ LK201 LOGFILE Leffler Luna -MAKEDEV.local MB MC68040 MFS Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/man/man8/Makefile Mon Nov 15 05:25:51 2010 (r215334) @@ -4,7 +4,6 @@ MAN= crash.8 \ diskless.8 \ intro.8 \ - MAKEDEV.8 \ nanobsd.8 \ picobsd.8 \ rc.8 \ Modified: head/sys/dev/firewire/00README ============================================================================== --- head/sys/dev/firewire/00README Mon Nov 15 03:13:36 2010 (r215333) +++ head/sys/dev/firewire/00README Mon Nov 15 05:25:51 2010 (r215334) @@ -44,10 +44,6 @@ IEEE 1394 support for FreeBSD-5.X and 4. - make install - make load - For FreeBSD-4 user: - - - ./MAKEDEV - 3. SBP-II support (sbp) - You need CAM(SCSI) support in your kernel. Modified: head/sys/dev/tdfx/tdfx_pci.c ============================================================================== --- head/sys/dev/tdfx/tdfx_pci.c Mon Nov 15 03:13:36 2010 (r215333) +++ head/sys/dev/tdfx/tdfx_pci.c Mon Nov 15 05:25:51 2010 (r215334) @@ -250,7 +250,7 @@ tdfx_attach(device_t dev) { /* * make_dev registers the cdev to access the 3dfx card from /dev * use hex here for the dev num, simply to provide better support if > 10 - * voodoo cards, for the mad. The user must set the link, or use MAKEDEV. + * voodoo cards, for the mad. The user must set the link. * Why would we want that many voodoo cards anyhow? */ tdfx_info->devt = make_dev(&tdfx_cdev, device_get_unit(dev), Modified: head/usr.sbin/config/SMM.doc/6.t ============================================================================== --- head/usr.sbin/config/SMM.doc/6.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/usr.sbin/config/SMM.doc/6.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)6.t 8.1 (Berkeley) 6/8/93 +.\" $FreeBSD$ .\" .\".ds RH "Adding New Devices .ne 2i @@ -230,10 +231,3 @@ Remember that the position in the device table specifies the major device number. The block major number is needed in the ``devices.machine'' file if the device is a disk. -.PP -With the configuration information in place, your configuration -file appropriately modified, and a system reconfigured and rebooted -you should incorporate the shell commands needed to install the special -files in the file system to the file ``/dev/MAKEDEV'' or -``/dev/MAKEDEV.local''. This is discussed in the document ``Installing -and Operating 4.4BSD''. Modified: head/usr.sbin/config/SMM.doc/spell.ok ============================================================================== --- head/usr.sbin/config/SMM.doc/spell.ok Mon Nov 15 03:13:36 2010 (r215333) +++ head/usr.sbin/config/SMM.doc/spell.ok Mon Nov 15 05:25:51 2010 (r215334) @@ -1,3 +1,4 @@ +# $FreeBSD$ ACC ANSEL ARP @@ -38,8 +39,6 @@ Info Karels LH Leffler -MAKEDEV -MAKEDEV.local MASSBUS MAXDSIZ MAXTSIZ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 05:30:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3DA106566C for ; Mon, 15 Nov 2010 05:30:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id A72D18FC15 for ; Mon, 15 Nov 2010 05:30:51 +0000 (UTC) Received: (qmail 23861 invoked by uid 399); 15 Nov 2010 05:30:50 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Nov 2010 05:30:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4CE0C589.6030407@FreeBSD.org> Date: Sun, 14 Nov 2010 21:30:49 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101028 Thunderbird/3.1.6 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201011150525.oAF5Pp8J005442@svn.freebsd.org> In-Reply-To: <201011150525.oAF5Pp8J005442@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: Subject: Re: svn commit: r215334 - in head: share/doc/papers/jail share/doc/smm/01.setup share/man/man8 sys/dev/firewire sys/dev/tdfx usr.sbin/config/SMM.doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 05:30:52 -0000 If anyone has suggestions for better wording and/or markup on any of these changes feel free to commit them directly, and let me know. I plan to MFC these changes before the impending releases. Doug From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 06:04:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF02F106566B; Mon, 15 Nov 2010 06:04:25 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA918FC13; Mon, 15 Nov 2010 06:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF64PrW006270; Mon, 15 Nov 2010 06:04:25 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF64PFC006268; Mon, 15 Nov 2010 06:04:25 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011150604.oAF64PFC006268@svn.freebsd.org> From: Kevin Lo Date: Mon, 15 Nov 2010 06:04: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: r215335 - head/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 06:04:25 -0000 Author: kevlo Date: Mon Nov 15 06:04:25 2010 New Revision: 215335 URL: http://svn.freebsd.org/changeset/base/215335 Log: Remove unused struct rue_type Modified: head/sys/dev/usb/net/if_ruereg.h Modified: head/sys/dev/usb/net/if_ruereg.h ============================================================================== --- head/sys/dev/usb/net/if_ruereg.h Mon Nov 15 05:25:51 2010 (r215334) +++ head/sys/dev/usb/net/if_ruereg.h Mon Nov 15 06:04:25 2010 (r215335) @@ -157,11 +157,6 @@ struct rue_intrpkt { uint8_t rue_col_cnt; } __packed; -struct rue_type { - uint16_t rue_vid; - uint16_t rue_did; -}; - enum { RUE_BULK_DT_WR, RUE_BULK_DT_RD, From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 07:33:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1ACA106566B; Mon, 15 Nov 2010 07:33:54 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90A928FC18; Mon, 15 Nov 2010 07:33: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 oAF7Xswk008198; Mon, 15 Nov 2010 07:33:54 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF7XsQ1008196; Mon, 15 Nov 2010 07:33:54 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011150733.oAF7XsQ1008196@svn.freebsd.org> From: David Xu Date: Mon, 15 Nov 2010 07:33: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: r215336 - 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, 15 Nov 2010 07:33:54 -0000 Author: davidxu Date: Mon Nov 15 07:33:54 2010 New Revision: 215336 URL: http://svn.freebsd.org/changeset/base/215336 Log: Only unlock process if a thread is found. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Nov 15 06:04:25 2010 (r215335) +++ head/sys/kern/kern_umtx.c Mon Nov 15 07:33:54 2010 (r215336) @@ -1592,11 +1592,11 @@ umtxq_sleep_pi(struct umtx_q *uq, struct /* XXX Only look up thread in current process. */ td1 = tdfind(owner, curproc->p_pid); mtx_lock_spin(&umtx_lock); - if (td1 != NULL && pi->pi_owner == NULL) { - uq1 = td1->td_umtxq; - umtx_pi_setowner(pi, td1); + if (td1 != NULL) { + if (pi->pi_owner == NULL) + umtx_pi_setowner(pi, td1); + PROC_UNLOCK(td1->td_proc); } - PROC_UNLOCK(td1->td_proc); } TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) { From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 09:41:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44097106564A; Mon, 15 Nov 2010 09:41:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31BA08FC17; Mon, 15 Nov 2010 09:41: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 oAF9flww010830; Mon, 15 Nov 2010 09:41:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF9fluL010828; Mon, 15 Nov 2010 09:41:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011150941.oAF9fluL010828@svn.freebsd.org> From: Andriy Gapon Date: Mon, 15 Nov 2010 09:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215337 - stable/8/sys/x86/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 09:41:47 -0000 Author: avg Date: Mon Nov 15 09:41:46 2010 New Revision: 215337 URL: http://svn.freebsd.org/changeset/base/215337 Log: MFC r215131: make it possible to actually enable hwpstate_verbose Modified: stable/8/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/8/sys/x86/cpufreq/hwpstate.c Mon Nov 15 07:33:54 2010 (r215336) +++ stable/8/sys/x86/cpufreq/hwpstate.c Mon Nov 15 09:41:46 2010 (r215337) @@ -118,8 +118,9 @@ static int hwpstate_get_info_from_msr(de static int hwpstate_goto_pstate(device_t dev, int pstate_id); static int hwpstate_verbose = 0; -SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RDTUN, +SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RW | CTLFLAG_TUN, &hwpstate_verbose, 0, "Debug hwpstate"); +TUNABLE_INT("debug.hwpstate_verbose", &hwpstate_verbose); static device_method_t hwpstate_methods[] = { /* Device interface */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 09:43:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881D4106564A; Mon, 15 Nov 2010 09:43:42 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 931BE8FC08; Mon, 15 Nov 2010 09:43:41 +0000 (UTC) Received: by fxm19 with SMTP id 19so3765751fxm.13 for ; Mon, 15 Nov 2010 01:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=UPwD0FRMRveBWTA/8fY8cH+FKZwWXuHim5iQCf1hYg8=; b=QLvdmSaPr7SIymbyB+rLJxbgefeYB8+5N5ep5CucsvUMjFDqiUdmwWSLVwuc/fG5Z9 Bhk+7+zH01nePlPf1BB8liAEmLXFIu44T8YIJm+07nZANN17mRJTuOJivs5MQB2z5oxH BPlWVueSmHjjRU+sYbtWqj8Ta4K7A84Uf7wMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=utX1QlWP0OlC858mYj00lH1Xk3DEnWQiu57nb1JgJtA/V4T6oZmiFp5jxVKDcnk9cE /BXKUTp+G6q/lvJaF62bTuP1QSlclqO0TfTXOc3rn2Sf41Gd2YQ+ertnSFwO7KVp3Ccm XzwWP3sLOjL2iwmrl6HVOORiiZMyq0pixskAc= Received: by 10.223.116.5 with SMTP id k5mr2195235faq.123.1289814220535; Mon, 15 Nov 2010 01:43:40 -0800 (PST) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id a25sm420106fak.20.2010.11.15.01.43.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 01:43:39 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart Organization: TOA Ukraine References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> Date: Mon, 15 Nov 2010 11:43:36 +0200 In-Reply-To: <4CE08BB6.1090304@freebsd.org> (Lawrence Stewart's message of "Mon, 15 Nov 2010 12:24:06 +1100") Message-ID: <86ipzyncqf.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 09:43:42 -0000 On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: LS> On 11/15/10 02:15, Mikolaj Golub wrote: >> >> LS> Would you mind testing the following patch? It fixes the panic for me. >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into >> ddb does not work. I am trying this under VirtualBox. LS> I can't reproduce a hang, but please try this patch instead: LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch I can't try it now on the box where I observed the hang. Trying on another box I can't reproduce the hang -- both patches works for me: no hang and I can create/remove jail and tcp connections to jail work. I will try the patch on the "problem" box tonight. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 11:57:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16F771065673; Mon, 15 Nov 2010 11:57:13 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 725998FC08; Mon, 15 Nov 2010 11:57:12 +0000 (UTC) Received: by qwd6 with SMTP id 6so46784qwd.13 for ; Mon, 15 Nov 2010 03:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=h0uR2pJoonGKmjW2/vreEElHZ7yzwGu/gVNdTDy6V8M=; b=W19Rv7M+N0aOPl/+RjV1EFAoM8ua+YVcV8mFo+4F0hrH9hMDqIk1Oyj5b+T6eGPfwn p/QBxzqeApET9nkmrBqHv6IiDAErlC592EoMZskbxZpPnv/xKVMf1myjNk1nah5NR5Pl 7N6y0MM8Vy9ELDh9TffQorUlMjc/pPEE1VKaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=VO4MsrSQPShPWAR0BIAncNK78qbO8/DuZ4l9HwEyd5nPEMQTaTDXXNlsulrC3QEeMB TbmDmuZh5jDr/sqfoP0EImk5MVjJC9efQG+nzN5Rc9sorrHGlOArJJpKGwC2Plye2Ocl q0BUP79ACF7zC+KGS8r5op3EHeMnyA31e5hOw= Received: by 10.229.232.15 with SMTP id js15mr5032689qcb.161.1289822231084; Mon, 15 Nov 2010 03:57:11 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Mon, 15 Nov 2010 03:56:29 -0800 (PST) In-Reply-To: <201011121302.oACD2Qjt009385@svn.freebsd.org> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> From: Ivan Voras Date: Mon, 15 Nov 2010 12:56:29 +0100 X-Google-Sender-Auth: Ixzq7-YgIFk9l8yvYOUM3TD4Npw Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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, 15 Nov 2010 11:57:13 -0000 On 12 November 2010 14:02, Luigi Rizzo wrote: > Author: luigi > Date: Fri Nov 12 13:02:26 2010 > New Revision: 215178 > URL: http://svn.freebsd.org/changeset/base/215178 > > Log: > =C2=A0This commit implements the SO_USER_COOKIE socket option, which lets > =C2=A0you tag a socket with an uint32_t value. The cookie can then be > =C2=A0used by the kernel for various purposes, e.g. setting the skipto > =C2=A0rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has > =C2=A0been implemented; however there is nothing ipfw-specific in its > =C2=A0implementation). While at it, why not intptr_t? It would be marginally more useful and almost free. From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 13:03:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE31910656D0; Mon, 15 Nov 2010 13:03:36 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0DB68FC12; Mon, 15 Nov 2010 13:03: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 oAFD3ZIH017572; Mon, 15 Nov 2010 13:03:35 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFD3ZrE017569; Mon, 15 Nov 2010 13:03:35 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011151303.oAFD3ZrE017569@svn.freebsd.org> From: Alexander Leidinger Date: Mon, 15 Nov 2010 13:03: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: r215338 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:03:37 -0000 Author: netchild Date: Mon Nov 15 13:03:35 2010 New Revision: 215338 URL: http://svn.freebsd.org/changeset/base/215338 Log: - print out the PID and program name of the program trying to use an unsupported futex operation - for those futex operations which are known to be not supported, print out which futex operation it is - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in some cases: FUTEX_CLOCK_REALTIME can be used to tell linux to use CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME however must only be set, if either FUTEX_WAIT_BITSET or FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case we can die with ENOSYS right at the beginning. Submitted by: arundel Reviewed by: rdivacky (earlier iteration of the patch) MFC after: 1 week Modified: head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_futex.h Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Mon Nov 15 09:41:46 2010 (r215337) +++ head/sys/compat/linux/linux_futex.c Mon Nov 15 13:03:35 2010 (r215338) @@ -416,7 +416,7 @@ futex_atomic_op(struct thread *td, int e int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int op_ret, val, ret, nrwake; + int clockrt, nrwake, op_ret, ret, val; struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2 = NULL; @@ -429,7 +429,19 @@ linux_sys_futex(struct thread *td, struc * in most cases (ie. when futexes are not shared on file descriptor * or between different processes.). */ - args->op = (args->op & ~LINUX_FUTEX_PRIVATE_FLAG); + args->op = args->op & ~LINUX_FUTEX_PRIVATE_FLAG; + + /* + * Currently support for switching between CLOCK_MONOTONIC and + * CLOCK_REALTIME is not present. However Linux forbids the use of + * FUTEX_CLOCK_REALTIME with any op except FUTEX_WAIT_BITSET and + * FUTEX_WAIT_REQUEUE_PI. + */ + clockrt = args->op & LINUX_FUTEX_CLOCK_REALTIME; + args->op = args->op & ~LINUX_FUTEX_CLOCK_REALTIME; + if (clockrt && args->op != LINUX_FUTEX_WAIT_BITSET && + args->op != LINUX_FUTEX_WAIT_REQUEUE_PI) + return (ENOSYS); switch (args->op) { case LINUX_FUTEX_WAIT: @@ -612,14 +624,23 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_LOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_LOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_UNLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_UNLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_TRYLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_TRYLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_REQUEUE: @@ -632,15 +653,30 @@ linux_sys_futex(struct thread *td, struc */ em = em_find(td->td_proc, EMUL_DONTLOCK); if (em->used_requeue == 0) { - printf("linux(%s (%d)) sys_futex: " - "unsupported futex_requeue op\n", - td->td_proc->p_comm, td->td_proc->p_pid); + linux_msg(td, + "linux_sys_futex: " + "unsupported futex_requeue op\n"); em->used_requeue = 1; } return (EINVAL); + case LINUX_FUTEX_WAIT_BITSET: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_BITSET not implemented.\n"); + return (ENOSYS); + + case LINUX_FUTEX_WAIT_REQUEUE_PI: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_REQUEUE_PI not implemented.\n"); + return (ENOSYS); + default: - printf("linux_sys_futex: unknown op %d\n", args->op); + linux_msg(td, + "linux_sys_futex: unknown op %d\n", args->op); return (ENOSYS); } Modified: head/sys/compat/linux/linux_futex.h ============================================================================== --- head/sys/compat/linux/linux_futex.h Mon Nov 15 09:41:46 2010 (r215337) +++ head/sys/compat/linux/linux_futex.h Mon Nov 15 13:03:35 2010 (r215338) @@ -39,17 +39,20 @@ extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; -#define LINUX_FUTEX_WAIT 0 -#define LINUX_FUTEX_WAKE 1 -#define LINUX_FUTEX_FD 2 /* unused */ -#define LINUX_FUTEX_REQUEUE 3 -#define LINUX_FUTEX_CMP_REQUEUE 4 -#define LINUX_FUTEX_WAKE_OP 5 -#define LINUX_FUTEX_LOCK_PI 6 -#define LINUX_FUTEX_UNLOCK_PI 7 -#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT 0 +#define LINUX_FUTEX_WAKE 1 +#define LINUX_FUTEX_FD 2 /* unused */ +#define LINUX_FUTEX_REQUEUE 3 +#define LINUX_FUTEX_CMP_REQUEUE 4 +#define LINUX_FUTEX_WAKE_OP 5 +#define LINUX_FUTEX_LOCK_PI 6 +#define LINUX_FUTEX_UNLOCK_PI 7 +#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT_BITSET 9 +#define LINUX_FUTEX_WAIT_REQUEUE_PI 11 #define LINUX_FUTEX_PRIVATE_FLAG 128 +#define LINUX_FUTEX_CLOCK_REALTIME 256 #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 13:07:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A733D1065704; Mon, 15 Nov 2010 13:07:10 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 956B48FC21; Mon, 15 Nov 2010 13:07: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 oAFD7AFE017674; Mon, 15 Nov 2010 13:07:10 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFD7Ar3017672; Mon, 15 Nov 2010 13:07:10 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011151307.oAFD7Ar3017672@svn.freebsd.org> From: Alexander Leidinger Date: Mon, 15 Nov 2010 13:07: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: r215339 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:07:10 -0000 Author: netchild Date: Mon Nov 15 13:07:10 2010 New Revision: 215339 URL: http://svn.freebsd.org/changeset/base/215339 Log: Some style(9) fixes. Submitted by: arundel MFC after: 1 week Modified: head/sys/compat/linux/linux_futex.c Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Mon Nov 15 13:03:35 2010 (r215338) +++ head/sys/compat/linux/linux_futex.c Mon Nov 15 13:07:10 2010 (r215339) @@ -656,7 +656,7 @@ linux_sys_futex(struct thread *td, struc linux_msg(td, "linux_sys_futex: " "unsupported futex_requeue op\n"); - em->used_requeue = 1; + em->used_requeue = 1; } return (EINVAL); @@ -701,7 +701,7 @@ linux_set_robust_list(struct thread *td, em->robust_futexes = args->head; EMUL_UNLOCK(&emul_lock); - return (0); + return (0); } int @@ -719,7 +719,7 @@ linux_get_robust_list(struct thread *td, if (!args->pid) { em = em_find(td->td_proc, EMUL_DONTLOCK); - head = em->robust_futexes; + head = em->robust_futexes; } else { struct proc *p; @@ -729,14 +729,14 @@ linux_get_robust_list(struct thread *td, em = em_find(p, EMUL_DONTLOCK); /* XXX: ptrace? */ - if (priv_check(td, PRIV_CRED_SETUID) || + if (priv_check(td, PRIV_CRED_SETUID) || priv_check(td, PRIV_CRED_SETEUID) || p_candebug(td, p)) { PROC_UNLOCK(p); return (EPERM); } head = em->robust_futexes; - + PROC_UNLOCK(p); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 13:46:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B27351065672; Mon, 15 Nov 2010 13:46:50 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA2C8FC16; Mon, 15 Nov 2010 13:46:50 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id D1E807E84A; Tue, 16 Nov 2010 00:46:48 +1100 (EST) Message-ID: <4CE139C5.4010300@freebsd.org> Date: Tue, 16 Nov 2010 00:46:45 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> In-Reply-To: <86ipzyncqf.fsf@zhuzha.ua1> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 13:46:50 -0000 On 11/15/10 20:43, Mikolaj Golub wrote: > > On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: > > LS> On 11/15/10 02:15, Mikolaj Golub wrote: > >> > >> LS> Would you mind testing the following patch? It fixes the panic for me. > >> > >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > >> > >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > >> ddb does not work. I am trying this under VirtualBox. > > LS> I can't reproduce a hang, but please try this patch instead: > > LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch > > I can't try it now on the box where I observed the hang. Trying on another box > I can't reproduce the hang -- both patches works for me: no hang and I can > create/remove jail and tcp connections to jail work. > > I will try the patch on the "problem" box tonight. Ok thanks. If you are or anyone else is feeling really adventurous, I have created a series of patches that add better VIMAGE support to the framework. If you feel like testing them, they need to be applied in the following order: 1. Init the CC framework global state only once on system boot by switching to a SYSINIT. (You already have this one) http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch 2. When unloading an algo module, loop through all TCP control blocks in all vnets (instead of just the default vnet) to look for connections using the algo. http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnet_algounloadcleanup.patch 3. Move protocol specific implementation detail out of the core CC framework (not vnet specific but useful cleanup). http://people.freebsd.org/~lstewart/patches/5cc/modcc_tcpalgounload.patch 4. Create a per-vnet variable to store a ptr to the vnet's default CC algo and hook it up to a vnet aware sysctl handler. vnets can now choose their own default from the global list of registered algos independently of other vnets. http://people.freebsd.org/~lstewart/patches/5cc/modcc_pervnet_defaultalgo.patch It would be fine to test all of them in one go. The last one is the most intrusive and the one I'd most like to see some testing done with. Only if you feel like it of course. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 14:40:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74A1E106564A; Mon, 15 Nov 2010 14:40:55 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4508D8FC13; Mon, 15 Nov 2010 14:40:53 +0000 (UTC) Received: by fxm19 with SMTP id 19so3969547fxm.13 for ; Mon, 15 Nov 2010 06:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=PjsbLfKHmCq3dO8Of/Q+CDEsRve7OOY3EPwCMr5Popo=; b=Z14XVrZ0EXo4fP7e3e1fB32iK/jzU6T9s4uC2eg8lg5frndgmN+XsNVJWHgv+MadP5 g3VPwP/S9K1hLhtTbro8X5OLlSjUlMvGApQy1VcXZtZEQVMaAk7oJw6UfYk++qTaFGt0 xOJ+TI2TXLvPnOjmJDi+d5DKzK7Vl3vGHNomY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=FdxBEEaCqLwzru6rmoqsebJoPUazCBAe4sWwoQFffOVzBHi1aQyy3AItEeYCR6PchX b56+oxPDVJ1/zGfWzAytvOZ6IbUia0M733Rg0gtvZiiigv/OYYQOMB6mz9rWyzfNWvfW mCeikJxgrYZjb94r9CKkROSfFRbRe0uKezpkw= Received: by 10.223.97.73 with SMTP id k9mr875763fan.120.1289832053164; Mon, 15 Nov 2010 06:40:53 -0800 (PST) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id 16sm873620fal.0.2010.11.15.06.40.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 06:40:51 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart Organization: TOA Ukraine References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> Date: Mon, 15 Nov 2010 16:40:49 +0200 In-Reply-To: <4CE139C5.4010300@freebsd.org> (Lawrence Stewart's message of "Tue, 16 Nov 2010 00:46:45 +1100") Message-ID: <86aalamyz2.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 14:40:55 -0000 On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: LS> Ok thanks. If you are or anyone else is feeling really adventurous, I LS> have created a series of patches that add better VIMAGE support to the LS> framework. LS> If you feel like testing them, they need to be applied in the following LS> order: LS> 1. Init the CC framework global state only once on system boot by LS> switching to a SYSINIT. (You already have this one) LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch LS> 2. When unloading an algo module, loop through all TCP control blocks in LS> all vnets (instead of just the default vnet) to look for connections LS> using the algo. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnet_algounloadcleanup.patch LS> 3. Move protocol specific implementation detail out of the core CC LS> framework (not vnet specific but useful cleanup). LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_tcpalgounload.patch LS> 4. Create a per-vnet variable to store a ptr to the vnet's default CC LS> algo and hook it up to a vnet aware sysctl handler. vnets can now choose LS> their own default from the global list of registered algos independently LS> of other vnets. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_pervnet_defaultalgo.patch LS> It would be fine to test all of them in one go. The last one is the most LS> intrusive and the one I'd most like to see some testing done with. Only LS> if you feel like it of course. Feeling virtually adventurous, applied them all on VirtualBox :-). This is the box where the hang is not observed. It works ok for me so far. I will try at home too (where the hang is observed) and let you know if there are any issues. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 15:00:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E48C106564A; Mon, 15 Nov 2010 15:00:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 56DBE8FC0C; Mon, 15 Nov 2010 15:00:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 530C641C736; Mon, 15 Nov 2010 16:00:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id oYW82thhsoXB; Mon, 15 Nov 2010 16:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A9E4041C735; Mon, 15 Nov 2010 16:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 729234448F3; Mon, 15 Nov 2010 14:58:15 +0000 (UTC) Date: Mon, 15 Nov 2010 14:58:15 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Dimitry Andric In-Reply-To: <201011142040.oAEKetST093270@svn.freebsd.org> Message-ID: <20101115145153.C24596@maildrop.int.zabbadoz.net> References: <201011142040.oAEKetST093270@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 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: r215318 - in head/sys: net 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, 15 Nov 2010 15:00:20 -0000 On Sun, 14 Nov 2010, Dimitry Andric wrote: > Author: dim > Date: Sun Nov 14 20:40:55 2010 > New Revision: 215318 > URL: http://svn.freebsd.org/changeset/base/215318 > > Log: > Instead of unconditionally emitting .globl's for the __start_set_xxx and > __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu > sections are actually defined. Unless you have a very good reason that is NOT cosmetic for this I want to know it. None of you commit messages is giving this. This breaks the classic C semantics that we had gained with the former type of macros, which is a shame. Kind of annoying neither of the changes had a Reviewed by: and despite being about 2 weeks behind of most email I hadn't spotted this on arch@ before nor seen it on virtualization@ that it obviously touches. I would have loved to hear about them before foing to have a hard time integrating this white space into half a year of development work. Looking forward to the technical explanation. > Modified: > head/sys/net/vnet.h > head/sys/sys/cdefs.h > head/sys/sys/linker_set.h > head/sys/sys/pcpu.h -- Bjoern A. Zeeb Welcome a new stage of life. Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 15:32:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC44C106566C; Mon, 15 Nov 2010 15:32:15 +0000 (UTC) (envelope-from zec@icir.org) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE168FC0C; Mon, 15 Nov 2010 15:32:14 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 15 Nov 2010 16:20:10 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 15 Nov 2010 16:20:09 +0100 From: Marko Zec To: "Bjoern A. Zeeb" Date: Mon, 15 Nov 2010 16:19:36 +0100 User-Agent: KMail/1.9.10 References: <201011142040.oAEKetST093270@svn.freebsd.org> <20101115145153.C24596@maildrop.int.zabbadoz.net> In-Reply-To: <20101115145153.C24596@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201011151619.37758.zec@icir.org> X-OriginalArrivalTime: 15 Nov 2010 15:20:10.0654 (UTC) FILETIME=[97E7BBE0:01CB84D8] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r215318 - in head/sys: net 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, 15 Nov 2010 15:32:15 -0000 On Monday 15 November 2010 15:58:15 Bjoern A. Zeeb wrote: > On Sun, 14 Nov 2010, Dimitry Andric wrote: > > Author: dim > > Date: Sun Nov 14 20:40:55 2010 > > New Revision: 215318 > > URL: http://svn.freebsd.org/changeset/base/215318 > > > > Log: > > Instead of unconditionally emitting .globl's for the __start_set_xxx and > > __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu > > sections are actually defined. > > Unless you have a very good reason that is NOT cosmetic for this I > want to know it. None of you commit messages is giving this. > > This breaks the classic C semantics that we had gained with the former > type of macros, which is a shame. > > Kind of annoying neither of the changes had a Reviewed by: and despite > being about 2 weeks behind of most email I hadn't spotted this on arch@ > before nor seen it on virtualization@ that it obviously touches. I > would have loved to hear about them before foing to have a hard time > integrating this white space into half a year of development work. > > Looking forward to the technical explanation. Another fundamental problem is that the commit note doesn't include a MFC plan, so if we just leave it as is, starting from now on an extremely large portion MFCs of networking code will need to be hand-adjusted. Marko > > Modified: > > head/sys/net/vnet.h > > head/sys/sys/cdefs.h > > head/sys/sys/linker_set.h > > head/sys/sys/pcpu.h From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 15:44:50 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330E41065675; Mon, 15 Nov 2010 15:44:50 +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 D5B4E8FC12; Mon, 15 Nov 2010 15:44:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAFFcG3s017836; Mon, 15 Nov 2010 08:38:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 15 Nov 2010 08:38:16 -0700 (MST) Message-Id: <20101115.083816.74734305.imp@bsdimp.com> To: kostikbel@gmail.com From: Warner Losh In-Reply-To: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> <20101114213749.GW2392@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: swell.k@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-ports@FreeBSD.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:44:50 -0000 From: Kostik Belousov Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm Date: Sun, 14 Nov 2010 23:37:49 +0200 > On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: > > Konstantin Belousov writes: > > > > > Author: kib > > > Date: Sun Nov 14 18:24:12 2010 > > > New Revision: 215309 > > > URL: http://svn.freebsd.org/changeset/base/215309 > > > > > > Log: > > > Use symbolic names instead of hardcoding values for magic p_osrel constants. > > > > > > MFC after: 1 week > > [...] > > > Modified: head/sys/sys/param.h > > > ============================================================================== > > > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > > > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > > > @@ -60,6 +60,11 @@ > > > #undef __FreeBSD_version > > > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > > > > > +#ifdef _KERNEL > > > +#define __FreeBSD_version_SIGSEGV 700004 > > > +#define __FreeBSD_version_MAP_ANON 800104 > > > +#endif > > > + > > > > This breaks bsd.port.mk regexp to determine OSVERSION. > > > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > .endif > > > > $ make -V OSVERSION > > 900025 700004 800104 > > > > And every port chokes on it. > > > > $ make -C devel/libpthread-stubs > > "Makefile", line 26: warning: String comparison operator should be either == or != > > "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) > > "Makefile", line 28: if-less endif > > "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != > > "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) > > "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif > > make: fatal errors encountered -- cannot continue > > > > %% > > Index: Mk/bsd.port.mk > > =================================================================== > > RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v > > retrieving revision 1.654 > > diff -u -p -r1.654 bsd.port.mk > > --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 > > +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 > > @@ -1219,9 +1219,9 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > %% > > I think it is better to select different namespace for the special versions. > Can you confirm that the following patch fixes the ports mk for you ? > It is enough to cd /usr/src/include && make install after patching. I think this is a better idea. There's a number of other places lurking that make a similar assumption. Warner From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 15:57:15 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D71141065673; Mon, 15 Nov 2010 15:57:15 +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 705F38FC20; Mon, 15 Nov 2010 15:57:14 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAFFvB0F023999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Nov 2010 02:57:13 +1100 Date: Tue, 16 Nov 2010 02:57:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Best In-Reply-To: <20101113125648.GA25183@freebsd.org> Message-ID: <20101116011754.T1430@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@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, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:57:16 -0000 On Sat, 13 Nov 2010, Alexander Best wrote: > thank you very much for fixing this long outstanding issue. > you might want to have a look at [1], where two more issues have been reported. > > [1] http://mailman.oakapple.net/pipermail/numeric-interest/2010-September/thread.html These are either features or not our problem (yet?). The second issue is compiler bugs, mostly for VC++. For gcc, the corresponding bugs are that gcc is not a C99 compiler, so it doesn't support fenv. clang has even worse support for fenv (both have no direct support for fenv, but clang does more optimizations that are invalid if the environment is not the default). fdlibm's problems in this area are that it was written before fenv existed, so it just assumes that the compiler doesn't do too many optimizations -- an assumption that is almost but not quite satisifed with gcc <= 4.2.1 (unless you enable bugs like -ffast-math of course). The other issue is a (historical?) bug now standardized by C99: from n1256.pdf: % -- pow(-Inf, y) returns +0 for y<0 and not an odd integer. % -- pow(-Inf, y) returns +Inf for y>0 and not an odd integer. So pow(-Inf, 0.5) must return +Inf and pow(-Inf, -0.5) must return +0, although the bug reporter wants the value to be NaN in both cases, like it would be for sqrt(-Inf) and 1/sqrt(-Inf), respectively. pow(-Inf, -0.5) = +0 is reasonable, since it can be interpreted as either 1/sqrt(-Inf) or sqrt(1/-Inf) = sqrt(-0) = 0, and the latter is reasonable and Standard (sqrt(-0) could be required to be NaN since -0 can be regarded as being on the branch cut for sqrt(), but that would make -0 too special, especially for real sqrt()). pow(-Inf, 0.5) = +Inf is not so reasonable, but is consistent with other (historical?) and now Standard bugs in pow(): essentially, everywhere that there is a correct special case for the second arg being an odd integer (so that there is no branch cut involved, and the oddness affects the sign of the result in the natural way), there is a bogus special case when the second arg is finite and not an odd integer, and another bogus special case when the second arge is infinite. The finite non-odd-integer cases are generally treated by throwing away all signs so that the result is +Inf or +0 where it would be +-Inf or +-0 for an odd integer. Infinite args are sort of both even and odd, so they should give all of the results +-Inf or +-0, but this is impossible so the result should be NaN, but Standards say that it is just +Inf or +0, as results from ignoring the odd integer singularities. >From n1156.pdf (not quoting the complementatry odd integer cases): % -- pow(+-0, y) returns +Inf and raises the divide-by-zero % exception for y<0 and not an odd integer. This is uncontroversial for +0. However, for -0, it must be interpreted as 1/pow(-0, -y) and not as 1/pow(1/-0, y) = 1/(-Inf, y) to avoid a controversial operation on -Inf. % -- pow(+-0, y) returns +0 for y>0 and not an odd integer. Uncontroversial for +0, and less controversial than the above for -0. % -- pow(-1, +-Inf) returns 1. Indirectly related. This is a new bug in n1156.pdf. It wasn't in n869 (not sure if it was in initial-C99), and isn't in fdlibm. but this is needed for bug for bug compatibility with pow(-1-eps, +-Inf). The value of the latter should be NaN, since pow(-1-eps, y) has limits both +-Inf as y -> +-Inf (strictly the latter should be NaN unless y is an integer, since a correct complex result is unrepresentable), but it is +Inf. But since we fix the sign for the latter, we should fix the sign for this too. % -- pow(x, -Inf) returns +Inf for |x|<1. % -- pow(x, -Inf) returns +0 for |x|>1. % -- pow(x, +Inf) returns +0 for |x|<1. % -- pow(x, +Inf) returns +Inf for |x|>1. Historical(?) and Standard, but bogus for x < -1 since pow() should only be defined there when y is an integer and then the result approaches both +-Inf. Less bogus for -1 < x <= 0 since then the result (although it should never be defined :-)) approaches +-0. % -- pow(-Inf, y) returns +0 for y<0 and not an odd integer. % -- pow(-Inf, y) returns +Inf for y>0 and not an odd integer. These 2 were quoted earlier. They are just the rules for +-0 inverted. cpow() has to deal with pow(x, y) actually existing for negative x, so it should use projective infinity and not have special cases for +-Inf or +-0, but presumably it has to be bug for bug compatible with pow() on the real axis so its special cases can only be more complicated and/or bogus. I checked most cases specified in n1156.pdf and found only the following non-conforming behaviour in FreeBSD: %C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < 0. %fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) fdlibm error: returns +0 instead of -0. I'm not sure if I matched the rules correctly. %C99 rule -- pow(-1, +-Inf) returns 1. %fdlibm rule * 9. +-1 ** +-INF is NAN fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as claimed in the comment. I know of 1 other similar bug in C99: lgamma(-Inf) should be NaN, but is Inf. lgamma() has a very bad singularity at -Inf even when it is restricted to the real axis. This bug is missing for tgamma(). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 16:09:25 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D0581065673; Mon, 15 Nov 2010 16:09:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id A00D18FC16; Mon, 15 Nov 2010 16:09:24 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAFG9JqY026881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Nov 2010 03:09:22 +1100 Date: Tue, 16 Nov 2010 03:09:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans In-Reply-To: <20101116011754.T1430@besplex.bde.org> Message-ID: <20101116030331.L1885@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101116011754.T1430@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Alexander Best , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:09:25 -0000 On Tue, 16 Nov 2010, Bruce Evans wrote: > ... > I checked most cases specified in n1156.pdf and found only the following > non-conforming behaviour in FreeBSD: > > %C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < 0. > %fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) > > fdlibm error: returns +0 instead of -0. I'm not sure if I matched the > rules correctly. False alarm. It actually returns -0 as specified. > %C99 rule -- pow(-1, +-Inf) returns 1. > %fdlibm rule * 9. +-1 ** +-INF is NAN > > fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. > fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as > claimed in the comment. So I didn't find any non-conforming behaviour in fdlibm except for not conforming to the new pow(-1, +-Inf) bug (which is required for conistency with old bugs). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 16:28:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id A4C1E1065674; Mon, 15 Nov 2010 16:28:12 +0000 (UTC) Date: Mon, 15 Nov 2010 16:28:12 +0000 From: Alexander Best To: Bruce Evans Message-ID: <20101115162812.GA76761@freebsd.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101116011754.T1430@besplex.bde.org> <20101116030331.L1885@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101116030331.L1885@besplex.bde.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:28:12 -0000 On Tue Nov 16 10, Bruce Evans wrote: > On Tue, 16 Nov 2010, Bruce Evans wrote: > > >... > >I checked most cases specified in n1156.pdf and found only the following > >non-conforming behaviour in FreeBSD: > > > >%C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < > >0. > >%fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) > > > >fdlibm error: returns +0 instead of -0. I'm not sure if I matched the > >rules correctly. > > False alarm. It actually returns -0 as specified. > > >%C99 rule -- pow(-1, +-Inf) returns 1. > >%fdlibm rule * 9. +-1 ** +-INF is NAN > > > >fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. > >fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as > >claimed in the comment. > > So I didn't find any non-conforming behaviour in fdlibm except for not > conforming to the new pow(-1, +-Inf) bug (which is required for conistency > with old bugs). thanks for all your work. i don't think there are a lot of people able to understand the tiny details of arithmetics, so having your expertise is invaluable. :) if you are interested in solving two more msun mysteries, you might want to have a look at #PR kern/133583 and standards/143358. cheers. alex > > Bruce -- a13x From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 16:48:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06000106566C; Mon, 15 Nov 2010 16:48:16 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com [207.126.144.149]) by mx1.freebsd.org (Postfix) with SMTP id 9D8698FC20; Mon, 15 Nov 2010 16:48:13 +0000 (UTC) Received: from source ([63.174.175.251]) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKTOFkTMyYqxa+UI9ZMlovaqsCMnSctsKB@postini.com; Mon, 15 Nov 2010 16:48:15 UTC Received: from [172.17.10.53] (unknown [172.17.10.53]) by bbbx3.usdmm.com (Postfix) with ESMTP id 0CCA7FD01C; Mon, 15 Nov 2010 16:48:12 +0000 (UTC) Message-ID: <4CE16414.8060606@tomjudge.com> Date: Mon, 15 Nov 2010 10:47:16 -0600 From: Tom Judge User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Alexander Motin References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> In-Reply-To: <4CE07AA3.6040205@FreeBSD.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:48:16 -0000 On 11/14/2010 06:11 PM, Alexander Motin wrote: > Pyun YongHyeon wrote: >> Author: yongari >> Date: Sun Nov 14 23:37:43 2010 >> New Revision: 215327 >> URL: http://svn.freebsd.org/changeset/base/215327 >> >> Log: >> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue >> such that nfe(4) does not work with MSI-X. When MSI-X support was >> introduced, I remember MCP55 controller worked without problems so >> the issue could be either PCI bridge or BIOS issue. But I also >> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still >> not sure this is generic issue of MCP55 chipset. If this was PCI >> bridge issue we would have added it to a system wide black-list >> table but it's not clear to me at this moment whether it was caused >> by either broken BIOS or silicon bug of MCP55 chipset. > > MCP5x seem to be infinite source of surprises. Some reports I remember: > - snd_hda not working with MSI enabled - AFAIR not just loosing > interrupts but completely stops responding; > - using regular HPET interrupts breaks HDA sound after some time > (interrupts are not shared), while legacy_route mode operates properly; > - at least on one system I've seen non-functioning SATA interrupts. > It would be nice to find what's going on there. I've got tired to add > workarounds for it. :( > Another one for the list is Intel em cards not working with MSI enabled on MCP51 systems. (On 8.1) TJ -- TJU13-ARIN From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 17:16:42 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BA4A106566C; Mon, 15 Nov 2010 17:16:42 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7E58FC13; Mon, 15 Nov 2010 17:16:42 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A3D8973098; Mon, 15 Nov 2010 18:10:16 +0100 (CET) Date: Mon, 15 Nov 2010 18:10:16 +0100 From: Luigi Rizzo To: Ivan Voras Message-ID: <20101115171016.GB20524@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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, 15 Nov 2010 17:16:42 -0000 On Mon, Nov 15, 2010 at 12:56:29PM +0100, Ivan Voras wrote: > On 12 November 2010 14:02, Luigi Rizzo wrote: > > Author: luigi > > Date: Fri Nov 12 13:02:26 2010 > > New Revision: 215178 > > URL: http://svn.freebsd.org/changeset/base/215178 > > > > Log: > > ??This commit implements the SO_USER_COOKIE socket option, which lets > > ??you tag a socket with an uint32_t value. The cookie can then be > > ??used by the kernel for various purposes, e.g. setting the skipto > > ??rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has > > ??been implemented; however there is nothing ipfw-specific in its > > ??implementation). > > While at it, why not intptr_t? It would be marginally more useful and > almost free. several reasons, some generic, some specific to this application: 1. [generic] over time i have become more and more a fan of fixed-size, arch-indepentent fields in defining APIs/ABIs. I think this greatly improves code portability and reduces the chance of bugs induced by compilers or headers. 2. [generic] passing pointers between userland and kernel requires remapping the pointer when going up or down. As the mapping would be application specific, i don't see much use in allowing room for a pointer without kernel code to map userland <-> kernel pointers. 3. [specific] use of signed vs unsigned, of course the two choices are completely equivalent but since i needed an unsigned value i saw no reason to go for an int instead of uint; 4. [specific] choosing 64 bit might have given perhaps more flexibility, but then again a) the reason for introducing this change only needed 32-bit operand, and b) the use of 64-bit would make the code marginally bigger/slower for 32-bit architectures. I think #3 and #4 are completely debatable, but #1 and #2 are in my opinion a compelling reason to avoid intptr_t and int vs int32_t in an API. cheers luigi cheaper for 32-bit ma From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 17:48:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F0DE10656C2; Mon, 15 Nov 2010 17:48:15 +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 EC0208FC17; Mon, 15 Nov 2010 17:48: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 oAFHmEnU023846; Mon, 15 Nov 2010 17:48:14 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFHmDc0023783; Mon, 15 Nov 2010 17:48:13 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201011151748.oAFHmDc0023783@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 15 Nov 2010 17:48: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: r215342 - in stable/8/sys: arm/at91 arm/xscale/ixp425 dev/ae dev/an dev/ath dev/bwi dev/bwn dev/ce dev/cm dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed dev/ep dev/ex dev/fe dev/ie dev/i... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 17:48:15 -0000 Author: sobomax Date: Mon Nov 15 17:48:13 2010 New Revision: 215342 URL: http://svn.freebsd.org/changeset/base/215342 Log: MFC r207554: Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. Modified: stable/8/sys/arm/at91/if_ate.c stable/8/sys/arm/xscale/ixp425/if_npe.c stable/8/sys/dev/ae/if_ae.c stable/8/sys/dev/an/if_an.c stable/8/sys/dev/ath/if_ath.c stable/8/sys/dev/bwi/if_bwi.c stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/ce/if_ce.c stable/8/sys/dev/cm/smc90cx6.c stable/8/sys/dev/cp/if_cp.c stable/8/sys/dev/cs/if_cs.c stable/8/sys/dev/ctau/if_ct.c stable/8/sys/dev/cx/if_cx.c stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/ed/if_ed.c stable/8/sys/dev/ep/if_ep.c stable/8/sys/dev/ex/if_ex.c stable/8/sys/dev/fe/if_fe.c stable/8/sys/dev/ie/if_ie.c stable/8/sys/dev/iicbus/if_ic.c stable/8/sys/dev/ipw/if_ipw.c stable/8/sys/dev/iwi/if_iwi.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/le/lance.c stable/8/sys/dev/malo/if_malo.c stable/8/sys/dev/mwl/if_mwl.c stable/8/sys/dev/my/if_my.c stable/8/sys/dev/nxge/if_nxge.c stable/8/sys/dev/pdq/pdq_ifsubr.c stable/8/sys/dev/ppbus/if_plip.c stable/8/sys/dev/ral/rt2560.c stable/8/sys/dev/ral/rt2661.c stable/8/sys/dev/sbni/if_sbni.c stable/8/sys/dev/smc/if_smc.c stable/8/sys/dev/sn/if_sn.c stable/8/sys/dev/snc/dp83932.c stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/net/usb_ethernet.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/dev/vx/if_vx.c stable/8/sys/dev/wi/if_wi.c stable/8/sys/dev/wl/if_wl.c stable/8/sys/dev/wpi/if_wpi.c stable/8/sys/dev/xe/if_xe.c stable/8/sys/mips/adm5120/if_admsw.c stable/8/sys/net/if.c stable/8/sys/net/if_ef.c stable/8/sys/net/if_gif.c stable/8/sys/net/if_gre.c stable/8/sys/net/if_stf.c stable/8/sys/net80211/ieee80211.c stable/8/sys/netgraph/ng_eiface.c stable/8/sys/netgraph/ng_fec.c stable/8/sys/netgraph/ng_iface.c stable/8/sys/netgraph/ng_tty.c stable/8/sys/pci/if_rl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/at91/if_ate.c ============================================================================== --- stable/8/sys/arm/at91/if_ate.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/arm/at91/if_ate.c Mon Nov 15 17:48:13 2010 (r215342) @@ -274,8 +274,8 @@ ate_attach(device_t dev) ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; ifp->if_linkmib = &sc->mibdata; Modified: stable/8/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- stable/8/sys/arm/xscale/ixp425/if_npe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/arm/xscale/ixp425/if_npe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -359,7 +359,7 @@ npe_attach(device_t dev) ifp->if_ioctl = npeioctl; ifp->if_init = npeinit; IFQ_SET_MAXLEN(&ifp->if_snd, sc->txdma.nbuf - 1); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); Modified: stable/8/sys/dev/ae/if_ae.c ============================================================================== --- stable/8/sys/dev/ae/if_ae.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ae/if_ae.c Mon Nov 15 17:48:13 2010 (r215342) @@ -375,7 +375,7 @@ ae_attach(device_t dev) ifp->if_init = ae_init; ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; ifp->if_hwassist = 0; - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { Modified: stable/8/sys/dev/an/if_an.c ============================================================================== --- stable/8/sys/dev/an/if_an.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/an/if_an.c Mon Nov 15 17:48:13 2010 (r215342) @@ -773,8 +773,8 @@ an_attach(struct an_softc *sc, int unit, ifp->if_watchdog = an_watchdog; ifp->if_init = an_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); bzero(sc->an_config.an_nodename, sizeof(sc->an_config.an_nodename)); Modified: stable/8/sys/dev/ath/if_ath.c ============================================================================== --- stable/8/sys/dev/ath/if_ath.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ath/if_ath.c Mon Nov 15 17:48:13 2010 (r215342) @@ -562,8 +562,8 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_start = ath_start; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/8/sys/dev/bwi/if_bwi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/bwi/if_bwi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -462,8 +462,8 @@ bwi_attach(struct bwi_softc *sc) ifp->if_ioctl = bwi_ioctl; ifp->if_start = bwi_start; ifp->if_watchdog = bwi_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/bwn/if_bwn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1194,8 +1194,8 @@ bwn_attach_pre(struct bwn_softc *sc) ifp->if_init = bwn_init; ifp->if_ioctl = bwn_ioctl; ifp->if_start = bwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); return (0); Modified: stable/8/sys/dev/ce/if_ce.c ============================================================================== --- stable/8/sys/dev/ce/if_ce.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ce/if_ce.c Mon Nov 15 17:48:13 2010 (r215342) @@ -701,9 +701,9 @@ static int ce_attach (device_t dev) #endif continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); @@ -733,7 +733,7 @@ static int ce_attach (device_t dev) d->ifp->if_start = ce_ifstart; d->ifp->if_watchdog = ce_ifwatchdog; d->ifp->if_init = ce_initialize; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); #endif Modified: stable/8/sys/dev/cm/smc90cx6.c ============================================================================== --- stable/8/sys/dev/cm/smc90cx6.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cm/smc90cx6.c Mon Nov 15 17:48:13 2010 (r215342) @@ -197,7 +197,7 @@ cm_attach(dev) ifp->if_watchdog = cm_watchdog; ifp->if_init = cm_init; /* XXX IFQ_SET_READY(&ifp->if_snd); */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_timer = 0; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; Modified: stable/8/sys/dev/cp/if_cp.c ============================================================================== --- stable/8/sys/dev/cp/if_cp.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cp/if_cp.c Mon Nov 15 17:48:13 2010 (r215342) @@ -504,8 +504,8 @@ static int cp_attach (device_t dev) NG_NODE_UNREF (d->node); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cp_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cs/if_cs.c ============================================================================== --- stable/8/sys/dev/cs/if_cs.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cs/if_cs.c Mon Nov 15 17:48:13 2010 (r215342) @@ -500,7 +500,7 @@ cs_attach(device_t dev) ifp->if_start=cs_start; ifp->if_ioctl=cs_ioctl; ifp->if_init=cs_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_flags=(IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); Modified: stable/8/sys/dev/ctau/if_ct.c ============================================================================== --- stable/8/sys/dev/ctau/if_ct.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ctau/if_ct.c Mon Nov 15 17:48:13 2010 (r215342) @@ -721,8 +721,8 @@ static int ct_attach (device_t dev) ct_bus_dma_mem_free (&d->dmamem); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cx/if_cx.c ============================================================================== --- stable/8/sys/dev/cx/if_cx.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cx/if_cx.c Mon Nov 15 17:48:13 2010 (r215342) @@ -830,8 +830,8 @@ static int cx_attach (device_t dev) cx_bus_dma_mem_free (&d->dmamem); continue; } - d->lo_queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->lo_queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->lo_queue.ifq_mtx, "cx_queue_lo", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cx_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, CALLOUT_MPSAFE); Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/cxgb/cxgb_main.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1024,7 +1024,7 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; + ifp->if_snd.ifq_drv_maxlen = max(cxgb_snd_queue_len, ifqmaxlen); IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: stable/8/sys/dev/ed/if_ed.c ============================================================================== --- stable/8/sys/dev/ed/if_ed.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ed/if_ed.c Mon Nov 15 17:48:13 2010 (r215342) @@ -283,8 +283,8 @@ ed_attach(device_t dev) ifp->if_ioctl = ed_ioctl; ifp->if_watchdog = ed_watchdog; ifp->if_init = ed_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof sc->mibdata; Modified: stable/8/sys/dev/ep/if_ep.c ============================================================================== --- stable/8/sys/dev/ep/if_ep.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ep/if_ep.c Mon Nov 15 17:48:13 2010 (r215342) @@ -304,8 +304,8 @@ ep_attach(struct ep_softc *sc) ifp->if_ioctl = epioctl; ifp->if_watchdog = epwatchdog; ifp->if_init = epinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (!sc->epb.mii_trans) { Modified: stable/8/sys/dev/ex/if_ex.c ============================================================================== --- stable/8/sys/dev/ex/if_ex.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ex/if_ex.c Mon Nov 15 17:48:13 2010 (r215342) @@ -237,7 +237,7 @@ ex_attach(device_t dev) ifp->if_start = ex_start; ifp->if_ioctl = ex_ioctl; ifp->if_init = ex_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifmedia_init(&sc->ifmedia, 0, ex_ifmedia_upd, ex_ifmedia_sts); mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, Modified: stable/8/sys/dev/fe/if_fe.c ============================================================================== --- stable/8/sys/dev/fe/if_fe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/fe/if_fe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -766,7 +766,7 @@ fe_attach (device_t dev) * Set fixed interface flags. */ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); #if FE_SINGLE_TRANSMISSION /* Override txb config to allocate minimum. */ Modified: stable/8/sys/dev/ie/if_ie.c ============================================================================== --- stable/8/sys/dev/ie/if_ie.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ie/if_ie.c Mon Nov 15 17:48:13 2010 (r215342) @@ -318,7 +318,7 @@ ie_attach(device_t dev) ifp->if_start = iestart; ifp->if_ioctl = ieioctl; ifp->if_init = ieinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ether_ifattach(ifp, sc->enaddr); Modified: stable/8/sys/dev/iicbus/if_ic.c ============================================================================== --- stable/8/sys/dev/iicbus/if_ic.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iicbus/if_ic.c Mon Nov 15 17:48:13 2010 (r215342) @@ -181,7 +181,7 @@ icattach(device_t dev) ifp->if_output = icoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ic_alloc_buffers(sc, ICMTU); Modified: stable/8/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/8/sys/dev/ipw/if_ipw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ipw/if_ipw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -289,8 +289,8 @@ ipw_attach(device_t dev) ifp->if_init = ipw_init; ifp->if_ioctl = ipw_ioctl; ifp->if_start = ipw_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/8/sys/dev/iwi/if_iwi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iwi/if_iwi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -365,8 +365,8 @@ iwi_attach(device_t dev) ifp->if_init = iwi_init; ifp->if_ioctl = iwi_ioctl; ifp->if_start = iwi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/iwn/if_iwn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -640,8 +640,8 @@ iwn_attach(device_t dev) ifp->if_init = iwn_init; ifp->if_ioctl = iwn_ioctl; ifp->if_start = iwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/le/lance.c ============================================================================== --- stable/8/sys/dev/le/lance.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/le/lance.c Mon Nov 15 17:48:13 2010 (r215342) @@ -133,8 +133,8 @@ lance_config(struct lance_softc *sc, con ifp->if_flags &= ~IFF_MULTICAST; #endif ifp->if_baudrate = IF_Mbps(10); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Initialize ifmedia structures. */ Modified: stable/8/sys/dev/malo/if_malo.c ============================================================================== --- stable/8/sys/dev/malo/if_malo.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/malo/if_malo.c Mon Nov 15 17:48:13 2010 (r215342) @@ -275,8 +275,8 @@ malo_attach(uint16_t devid, struct malo_ ifp->if_watchdog = malo_watchdog; ifp->if_ioctl = malo_ioctl; ifp->if_init = malo_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/8/sys/dev/mwl/if_mwl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/mwl/if_mwl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -404,8 +404,8 @@ mwl_attach(uint16_t devid, struct mwl_so ifp->if_watchdog = mwl_watchdog; ifp->if_ioctl = mwl_ioctl; ifp->if_init = mwl_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/my/if_my.c ============================================================================== --- stable/8/sys/dev/my/if_my.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/my/if_my.c Mon Nov 15 17:48:13 2010 (r215342) @@ -889,8 +889,8 @@ my_attach(device_t dev) ifp->if_watchdog = my_watchdog; ifp->if_init = my_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (sc->my_info->my_did == MTD803ID) Modified: stable/8/sys/dev/nxge/if_nxge.c ============================================================================== --- stable/8/sys/dev/nxge/if_nxge.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/nxge/if_nxge.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1190,7 +1190,7 @@ xge_interface_setup(device_t dev) ifnetp->if_start = xge_send; /* TODO: Check and assign optimal value */ - ifnetp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifnetp->if_snd.ifq_maxlen = ifqmaxlen; ifnetp->if_capabilities = IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM; Modified: stable/8/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- stable/8/sys/dev/pdq/pdq_ifsubr.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/pdq/pdq_ifsubr.c Mon Nov 15 17:48:13 2010 (r215342) @@ -423,7 +423,7 @@ pdq_ifattach(pdq_softc_t *sc, const pdq_ ifp->if_softc = sc; ifp->if_init = (if_init_f_t *)pdq_ifinit; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST; ifp->if_watchdog = pdq_ifwatchdog; Modified: stable/8/sys/dev/ppbus/if_plip.c ============================================================================== --- stable/8/sys/dev/ppbus/if_plip.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ppbus/if_plip.c Mon Nov 15 17:48:13 2010 (r215342) @@ -262,7 +262,7 @@ lp_attach(device_t dev) ifp->if_output = lpoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ral/rt2560.c Mon Nov 15 17:48:13 2010 (r215342) @@ -267,8 +267,8 @@ rt2560_attach(device_t dev, int id) ifp->if_init = rt2560_init; ifp->if_ioctl = rt2560_ioctl; ifp->if_start = rt2560_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/ral/rt2661.c ============================================================================== --- stable/8/sys/dev/ral/rt2661.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/ral/rt2661.c Mon Nov 15 17:48:13 2010 (r215342) @@ -269,8 +269,8 @@ rt2661_attach(device_t dev, int id) ifp->if_init = rt2661_init; ifp->if_ioctl = rt2661_ioctl; ifp->if_start = rt2661_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/8/sys/dev/sbni/if_sbni.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/sbni/if_sbni.c Mon Nov 15 17:48:13 2010 (r215342) @@ -235,7 +235,7 @@ sbni_attach(struct sbni_softc *sc, int u ifp->if_init = sbni_init; ifp->if_start = sbni_start; ifp->if_ioctl = sbni_ioctl; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* report real baud rate */ csr0 = sbni_inb(sc, CSR0); Modified: stable/8/sys/dev/smc/if_smc.c ============================================================================== --- stable/8/sys/dev/smc/if_smc.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/smc/if_smc.c Mon Nov 15 17:48:13 2010 (r215342) @@ -348,7 +348,7 @@ smc_attach(device_t dev) ifp->if_init = smc_init; ifp->if_ioctl = smc_ioctl; ifp->if_start = smc_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = ifp->if_capenable = 0; Modified: stable/8/sys/dev/sn/if_sn.c ============================================================================== --- stable/8/sys/dev/sn/if_sn.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/sn/if_sn.c Mon Nov 15 17:48:13 2010 (r215342) @@ -205,8 +205,8 @@ sn_attach(device_t dev) ifp->if_watchdog = snwatchdog; ifp->if_init = sninit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; Modified: stable/8/sys/dev/snc/dp83932.c ============================================================================== --- stable/8/sys/dev/snc/dp83932.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/snc/dp83932.c Mon Nov 15 17:48:13 2010 (r215342) @@ -177,7 +177,7 @@ sncconfig(sc, media, nmedia, defmedia, m ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = sncinit; ifp->if_mtu = ETHERMTU; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* Initialize media goo. */ ifmedia_init(&sc->sc_media, 0, snc_mediachange, Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/net/uhso.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1471,8 +1471,8 @@ static int uhso_attach_ifnet(struct uhso ifp->if_output = uhso_if_output; ifp->if_flags = 0; ifp->if_softc = sc; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); Modified: stable/8/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/8/sys/dev/usb/net/usb_ethernet.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/net/usb_ethernet.c Mon Nov 15 17:48:13 2010 (r215342) @@ -214,8 +214,8 @@ ue_attach_post_task(struct usb_proc_msg ifp->if_ioctl = uether_ioctl; ifp->if_start = ue_start; ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ue->ue_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_rum.c Mon Nov 15 17:48:13 2010 (r215342) @@ -478,8 +478,8 @@ rum_attach(device_t self) ifp->if_init = rum_init; ifp->if_ioctl = rum_ioctl; ifp->if_start = rum_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_run.c Mon Nov 15 17:48:13 2010 (r215342) @@ -615,8 +615,8 @@ run_attach(device_t self) ifp->if_init = run_init; ifp->if_ioctl = run_ioctl; ifp->if_start = run_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_uath.c Mon Nov 15 17:48:13 2010 (r215342) @@ -438,8 +438,8 @@ uath_attach(device_t dev) ifp->if_ioctl = uath_ioctl; ifp->if_start = uath_start; /* XXX UATH_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Mon Nov 15 17:48:13 2010 (r215342) @@ -332,7 +332,7 @@ upgt_attach(device_t dev) ifp->if_init = upgt_init; ifp->if_ioctl = upgt_ioctl; ifp->if_start = upgt_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_ural.c Mon Nov 15 17:48:13 2010 (r215342) @@ -467,8 +467,8 @@ ural_attach(device_t self) ifp->if_init = ural_init; ifp->if_ioctl = ural_ioctl; ifp->if_start = ural_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -868,8 +868,8 @@ urtw_attach(device_t dev) ifp->if_ioctl = urtw_ioctl; ifp->if_start = urtw_start; /* XXX URTW_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Mon Nov 15 17:48:13 2010 (r215342) @@ -381,7 +381,7 @@ zyd_attach(device_t dev) ifp->if_init = zyd_init; ifp->if_ioctl = zyd_ioctl; ifp->if_start = zyd_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: stable/8/sys/dev/vx/if_vx.c ============================================================================== --- stable/8/sys/dev/vx/if_vx.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/vx/if_vx.c Mon Nov 15 17:48:13 2010 (r215342) @@ -188,7 +188,7 @@ vx_attach(device_t dev) } ifp->if_mtu = ETHERMTU; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = vx_start; ifp->if_ioctl = vx_ioctl; Modified: stable/8/sys/dev/wi/if_wi.c ============================================================================== --- stable/8/sys/dev/wi/if_wi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wi/if_wi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -333,8 +333,8 @@ wi_attach(device_t dev) ifp->if_ioctl = wi_ioctl; ifp->if_start = wi_start; ifp->if_init = wi_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/8/sys/dev/wl/if_wl.c ============================================================================== --- stable/8/sys/dev/wl/if_wl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wl/if_wl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -560,7 +560,7 @@ wlattach(device_t device) ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; ifp->if_timer = 0; /* paranoia */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* no entries ifp->if_watchdog ifp->if_done Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/wpi/if_wpi.c Mon Nov 15 17:48:13 2010 (r215342) @@ -662,8 +662,8 @@ wpi_attach(device_t dev) ifp->if_init = wpi_init; ifp->if_ioctl = wpi_ioctl; ifp->if_start = wpi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/xe/if_xe.c ============================================================================== --- stable/8/sys/dev/xe/if_xe.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/dev/xe/if_xe.c Mon Nov 15 17:48:13 2010 (r215342) @@ -254,7 +254,7 @@ xe_attach(device_t dev) scp->ifp->if_ioctl = xe_ioctl; scp->ifp->if_init = xe_init; scp->ifp->if_baudrate = 100000000; - IFQ_SET_MAXLEN(&scp->ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&scp->ifp->if_snd, ifqmaxlen); /* Initialise the ifmedia structure */ ifmedia_init(scp->ifm, 0, xe_media_change, xe_media_status); Modified: stable/8/sys/mips/adm5120/if_admsw.c ============================================================================== --- stable/8/sys/mips/adm5120/if_admsw.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/mips/adm5120/if_admsw.c Mon Nov 15 17:48:13 2010 (r215342) @@ -541,8 +541,8 @@ admsw_attach(device_t dev) ifp->if_init = admsw_init; ifp->if_mtu = ETHERMTU; ifp->if_baudrate = IF_Mbps(100); - IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, IFQ_MAXLEN)); - ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, ifqmaxlen)); + ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities |= IFCAP_VLAN_MTU; Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if.c Mon Nov 15 17:48:13 2010 (r215342) @@ -101,6 +101,10 @@ static int slowtimo_started; SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); +TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); +SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, + &ifqmaxlen, 0, "max send queue size"); + /* Log link state change events */ static int log_link_state_change = 1; Modified: stable/8/sys/net/if_ef.c ============================================================================== --- stable/8/sys/net/if_ef.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_ef.c Mon Nov 15 17:48:13 2010 (r215342) @@ -129,7 +129,7 @@ ef_attach(struct efnet *sc) ifp->if_start = ef_start; ifp->if_init = ef_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); /* * Attach the interface Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_gif.c Mon Nov 15 17:48:13 2010 (r215342) @@ -185,7 +185,7 @@ gif_clone_create(ifc, unit, params) GIF2IFP(sc)->if_ioctl = gif_ioctl; GIF2IFP(sc)->if_start = gif_start; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) Modified: stable/8/sys/net/if_gre.c ============================================================================== --- stable/8/sys/net/if_gre.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_gre.c Mon Nov 15 17:48:13 2010 (r215342) @@ -191,7 +191,7 @@ gre_clone_create(ifc, unit, params) GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), ifc->ifc_name, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; GRE2IFP(sc)->if_addrlen = 0; GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ GRE2IFP(sc)->if_mtu = GREMTU; Modified: stable/8/sys/net/if_stf.c ============================================================================== --- stable/8/sys/net/if_stf.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net/if_stf.c Mon Nov 15 17:48:13 2010 (r215342) @@ -252,7 +252,7 @@ stf_clone_create(struct if_clone *ifc, c ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl; ifp->if_output = stf_output; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); return (0); Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/net80211/ieee80211.c Mon Nov 15 17:48:13 2010 (r215342) @@ -394,8 +394,8 @@ ieee80211_vap_setup(struct ieee80211com ifp->if_ioctl = ieee80211_ioctl; ifp->if_init = ieee80211_init; /* NB: input+output filled in by ether_ifattach */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); vap->iv_ifp = ifp; Modified: stable/8/sys/netgraph/ng_eiface.c ============================================================================== --- stable/8/sys/netgraph/ng_eiface.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_eiface.c Mon Nov 15 17:48:13 2010 (r215342) @@ -369,7 +369,7 @@ ng_eiface_constructor(node_p node) ifp->if_output = ether_output; ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); /* Give this node the same name as the interface (if possible) */ Modified: stable/8/sys/netgraph/ng_fec.c ============================================================================== --- stable/8/sys/netgraph/ng_fec.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_fec.c Mon Nov 15 17:48:13 2010 (r215342) @@ -1227,7 +1227,7 @@ ng_fec_constructor(node_p node) ifp->if_start = ng_fec_start; ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); ifp->if_addrlen = 0; /* XXX */ Modified: stable/8/sys/netgraph/ng_iface.c ============================================================================== --- stable/8/sys/netgraph/ng_iface.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_iface.c Mon Nov 15 17:48:13 2010 (r215342) @@ -564,8 +564,8 @@ ng_iface_constructor(node_p node) ifp->if_addrlen = 0; /* XXX */ ifp->if_hdrlen = 0; /* XXX */ ifp->if_baudrate = 64000; /* XXX */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Give this node the same name as the interface (if possible) */ Modified: stable/8/sys/netgraph/ng_tty.c ============================================================================== --- stable/8/sys/netgraph/ng_tty.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/netgraph/ng_tty.c Mon Nov 15 17:48:13 2010 (r215342) @@ -164,7 +164,7 @@ ngt_constructor(node_p node) sc->node = node; mtx_init(&sc->outq.ifq_mtx, "ng_tty node+queue", NULL, MTX_DEF); - IFQ_SET_MAXLEN(&sc->outq, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->outq, ifqmaxlen); return (0); } Modified: stable/8/sys/pci/if_rl.c ============================================================================== --- stable/8/sys/pci/if_rl.c Mon Nov 15 17:40:48 2010 (r215341) +++ stable/8/sys/pci/if_rl.c Mon Nov 15 17:48:13 2010 (r215342) @@ -960,8 +960,8 @@ rl_attach(device_t dev) #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 17:59:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A386106566B; Mon, 15 Nov 2010 17:59:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-7.mx.aerioconnect.net [216.240.47.67]) by mx1.freebsd.org (Postfix) with ESMTP id 534A68FC19; Mon, 15 Nov 2010 17:59:42 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oAFHxcmn017417; Mon, 15 Nov 2010 09:59:40 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id B83412D6017; Mon, 15 Nov 2010 09:59:36 -0800 (PST) Message-ID: <4CE1750A.6040404@freebsd.org> Date: Mon, 15 Nov 2010 09:59:38 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Luigi Rizzo References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> In-Reply-To: <20101115171016.GB20524@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, Ivan Voras Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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, 15 Nov 2010 17:59:42 -0000 On 11/15/10 9:10 AM, Luigi Rizzo wrote: > On Mon, Nov 15, 2010 at 12:56:29PM +0100, Ivan Voras wrote: >> On 12 November 2010 14:02, Luigi Rizzo wrote: >>> Author: luigi >>> Date: Fri Nov 12 13:02:26 2010 >>> New Revision: 215178 >>> URL: http://svn.freebsd.org/changeset/base/215178 >>> >>> Log: >>> ??This commit implements the SO_USER_COOKIE socket option, which lets >>> ??you tag a socket with an uint32_t value. The cookie can then be >>> ??used by the kernel for various purposes, e.g. setting the skipto >>> ??rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has >>> ??been implemented; however there is nothing ipfw-specific in its >>> ??implementation). >> While at it, why not intptr_t? It would be marginally more useful and >> almost free. > several reasons, some generic, some specific to this application: > > 1. [generic] over time i have become more and more a fan of fixed-size, > arch-indepentent fields in defining APIs/ABIs. I think this > greatly improves code portability and reduces the chance of bugs > induced by compilers or headers. > > 2. [generic] passing pointers between userland and kernel > requires remapping the pointer when going up or down. > As the mapping would be application specific, i don't > see much use in allowing room for a pointer without kernel code > to map userland<-> kernel pointers. > > 3. [specific] use of signed vs unsigned, of course the two choices are > completely equivalent but since i needed an unsigned value i > saw no reason to go for an int instead of uint; > > 4. [specific] choosing 64 bit might have given perhaps more > flexibility, but then again a) the reason for introducing this > change only needed 32-bit operand, and b) the use of 64-bit would > make the code marginally bigger/slower for 32-bit architectures. also it's supposed to take the place of a tablearg which is 32 bits is it not? > I think #3 and #4 are completely debatable, but #1 and #2 are in > my opinion a compelling reason to avoid intptr_t and int vs int32_t > in an API. > > cheers > luigi > cheaper for 32-bit ma > From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 19:05:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E0E10656AB; Mon, 15 Nov 2010 19:05:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A9E8FC16; Mon, 15 Nov 2010 19:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFJ59T2025628; Mon, 15 Nov 2010 19:05:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFJ595x025626; Mon, 15 Nov 2010 19:05:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011151905.oAFJ595x025626@svn.freebsd.org> From: Warner Losh Date: Mon, 15 Nov 2010 19:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215344 - head/sys/boot/arm/uboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:05:10 -0000 Author: imp Date: Mon Nov 15 19:05:09 2010 New Revision: 215344 URL: http://svn.freebsd.org/changeset/base/215344 Log: We no longer need the OUTPUT_FORMAT line, so fix the build by removing it. Modified: head/sys/boot/arm/uboot/ldscript.arm Modified: head/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- head/sys/boot/arm/uboot/ldscript.arm Mon Nov 15 18:49:42 2010 (r215343) +++ head/sys/boot/arm/uboot/ldscript.arm Mon Nov 15 19:05:09 2010 (r215344) @@ -1,6 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 19:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31BC10656D2; Mon, 15 Nov 2010 19:55:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1DC88FC0A; Mon, 15 Nov 2010 19:55: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 oAFJtJMX026773; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFJtJ3R026771; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011151955.oAFJtJ3R026771@svn.freebsd.org> From: John Baldwin Date: Mon, 15 Nov 2010 19:55: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: r215345 - head/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: Mon, 15 Nov 2010 19:55:19 -0000 Author: jhb Date: Mon Nov 15 19:55:19 2010 New Revision: 215345 URL: http://svn.freebsd.org/changeset/base/215345 Log: Don't display option 2 (to toggle ACPI on or off) on x86 machines if the BIOS does not support ACPI. The other options in the menu retain their existing numbers, option 2 is simply blanked out (and '2' is ignored). MFC after: 1 month Modified: head/sys/boot/forth/beastie.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Nov 15 19:05:09 2010 (r215344) +++ head/sys/boot/forth/beastie.4th Mon Nov 15 19:55:19 2010 (r215345) @@ -140,12 +140,16 @@ at-xy ." `--{__________) " fbsdbw-logo ; -: acpienabled? ( -- flag ) +: acpipresent? ( -- flag ) s" hint.acpi.0.rsdp" getenv dup -1 = if drop false exit then 2drop + true +; + +: acpienabled? ( -- flag ) s" hint.acpi.0.disabled" getenv dup -1 <> if s" 0" compare 0<> if @@ -180,11 +184,18 @@ at-xy ." `--{__________) " printmenuitem ." Boot FreeBSD [default]" bootkey ! s" arch-i386" environment? if drop - printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! - acpienabled? if - ." disabled" + acpipresent? if + printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! + acpienabled? if + ." disabled" + else + ." enabled" + then else - ." enabled" + menuidx @ + 1+ dup + menuidx ! + -2 bootacpikey ! then else -2 bootacpikey ! From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 20:36:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F105106566C; Mon, 15 Nov 2010 20:36:20 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 54A838FC14; Mon, 15 Nov 2010 20:36:19 +0000 (UTC) Received: by ywa8 with SMTP id 8so2838221ywa.13 for ; Mon, 15 Nov 2010 12:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=gtAgVNB66Qot5KLRKvS2/HATkQInmvWuJE+8bmLXW4U=; b=ek88KhL0l8C2gc6l9ukhn1ZJO2J7ZUBHK49T5yoNd7oQzrzKY41heUKqC54uQE2Th8 za8bvfz5U9x0/LoloacJP27sKmbnqg0j9ACmtH7+mnUQm2h4LbSiNmaSAQs19Hdjp1li Mecq1mzbPIkdI0qAqVkRc9kSShl8MRIqJRCJ8= 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=goQnH4aeCIuR3uKfZ3Eq9nm2tsEK0r5gpl7cDjoFP9DAeHHmRjKAviuVSW6d+g+Z1B LNMr61AEckK33C7ZAJTote4HFb6x/ZbK7vqy0L1kUOAH6j9puJnEr/Wa18VPoKsk6AUF 0DwRel6hnLGow3nejidsT3E/0E17LdyyYLnHU= Received: by 10.151.78.12 with SMTP id f12mr6737827ybl.148.1289853378273; Mon, 15 Nov 2010 12:36:18 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id i9sm215560yha.42.2010.11.15.12.36.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 12:36:16 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 15 Nov 2010 12:36:09 -0800 From: Pyun YongHyeon Date: Mon, 15 Nov 2010 12:36:09 -0800 To: Tom Judge Message-ID: <20101115203609.GC1257@michelle.cdnetworks.com> References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> <4CE16414.8060606@tomjudge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE16414.8060606@tomjudge.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe 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, 15 Nov 2010 20:36:20 -0000 On Mon, Nov 15, 2010 at 10:47:16AM -0600, Tom Judge wrote: > On 11/14/2010 06:11 PM, Alexander Motin wrote: > > Pyun YongHyeon wrote: > >> Author: yongari > >> Date: Sun Nov 14 23:37:43 2010 > >> New Revision: 215327 > >> URL: http://svn.freebsd.org/changeset/base/215327 > >> > >> Log: > >> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > >> such that nfe(4) does not work with MSI-X. When MSI-X support was > >> introduced, I remember MCP55 controller worked without problems so > >> the issue could be either PCI bridge or BIOS issue. But I also > >> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > >> not sure this is generic issue of MCP55 chipset. If this was PCI > >> bridge issue we would have added it to a system wide black-list > >> table but it's not clear to me at this moment whether it was caused > >> by either broken BIOS or silicon bug of MCP55 chipset. > > > > MCP5x seem to be infinite source of surprises. Some reports I remember: > > - snd_hda not working with MSI enabled - AFAIR not just loosing > > interrupts but completely stops responding; > > - using regular HPET interrupts breaks HDA sound after some time > > (interrupts are not shared), while legacy_route mode operates properly; > > - at least on one system I've seen non-functioning SATA interrupts. > > It would be nice to find what's going on there. I've got tired to add > > workarounds for it. :( > > > > Another one for the list is Intel em cards not working with MSI enabled > on MCP51 systems. (On 8.1) > And your nfe(4) on MCP51 also does not work with MSI? If it does not work, show me the output of "pciconf -lcbv" and "kenv | grep smbios". I checked Linux and they does not seem to disable MSI/MSI-X for MCP51/MCP55. But they seems to maintain two entries to selectively disable MSI. From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 21:41:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2DE1065675; Mon, 15 Nov 2010 21:41:46 +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 18E908FC1B; Mon, 15 Nov 2010 21:41: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 oAFLfj0h029431; Mon, 15 Nov 2010 21:41:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLfj3A029429; Mon, 15 Nov 2010 21:41:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011152141.oAFLfj3A029429@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Nov 2010 21:41: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: r215348 - 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: Mon, 15 Nov 2010 21:41:46 -0000 Author: marius Date: Mon Nov 15 21:41:45 2010 New Revision: 215348 URL: http://svn.freebsd.org/changeset/base/215348 Log: Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari MFC after: 3 days Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Mon Nov 15 21:41:32 2010 (r215347) +++ head/sys/dev/mii/mii.c Mon Nov 15 21:41:45 2010 (r215348) @@ -438,6 +438,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 21:55:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63F451065673; Mon, 15 Nov 2010 21:55:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4D28FC12; Mon, 15 Nov 2010 21:55:23 +0000 (UTC) Received: by fxm19 with SMTP id 19so4398414fxm.13 for ; Mon, 15 Nov 2010 13:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :x-comment-to:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=E4YT82/3dOp1xOW2H9K2L3xHMmkSo1TVzi6Zlu8fv9I=; b=L/Zs/aPGL6j+zF3R1ZETRzaRbKf4oBtPZdasS3GQSRJqo3iOpe4O6yhUD1Ddm8E/ig 3LOUTPvdyAdGf2JE4A4GVPODUiy9SzK0OaXcBfOvu8oTaUwMr+7xlMW99Ik/ZGaI2m0u G/g22O5OooEJB6celhfRRDRymcTkIt0IHOKvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=RAav8JQLBbkmPn9nF29V1WADwvHKCgLOb41FhZXJeD20SnfOLmlzsCusj2XmPu/bT5 aGrJFIjmwj27iPuDQyvh2/1kpVNDOPSCEaVqZAX6W63ALJvEy/oY/E2Z7YOwji3GH5kG 34KIdO0v20B1QIHIJ94WeUuXm4TVQQ+wGXto0= Received: by 10.223.101.135 with SMTP id c7mr1454840fao.39.1289858122279; Mon, 15 Nov 2010 13:55:22 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id j8sm1071989fah.6.2010.11.15.13.55.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 13:55:20 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> X-Comment-To: Lawrence Stewart Date: Mon, 15 Nov 2010 23:55:18 +0200 In-Reply-To: <4CE139C5.4010300@freebsd.org> (Lawrence Stewart's message of "Tue, 16 Nov 2010 00:46:45 +1100") Message-ID: <86pqu65k1l.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 21:55:24 -0000 On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: LS> On 11/15/10 20:43, Mikolaj Golub wrote: >> >> On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: >> >> LS> On 11/15/10 02:15, Mikolaj Golub wrote: >> >> >> >> LS> Would you mind testing the following patch? It fixes the panic for me. >> >> >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch >> >> >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into >> >> ddb does not work. I am trying this under VirtualBox. >> >> LS> I can't reproduce a hang, but please try this patch instead: >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch >> >> I can't try it now on the box where I observed the hang. Trying on another box >> I can't reproduce the hang -- both patches works for me: no hang and I can >> create/remove jail and tcp connections to jail work. >> >> I will try the patch on the "problem" box tonight. Strange, I can't reproduce the hang today :-). I have tried both SI_ORDER_ANY and SI_ORDER_FIRST. I will keep running the kernel with your patches and let you know if I have any issues. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 21:58:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59C741065670; Mon, 15 Nov 2010 21:58:11 +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 482DF8FC18; Mon, 15 Nov 2010 21:58: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 oAFLwB4M029867; Mon, 15 Nov 2010 21:58:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLwBTM029864; Mon, 15 Nov 2010 21:58:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011152158.oAFLwBTM029864@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Nov 2010 21:58: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: r215349 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 21:58:12 -0000 Author: marius Date: Mon Nov 15 21:58:10 2010 New Revision: 215349 URL: http://svn.freebsd.org/changeset/base/215349 Log: Convert drivers somehow missed in r200874 to multipass probing. Modified: head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Mon Nov 15 21:41:45 2010 (r215348) +++ head/sys/sparc64/pci/psycho.c Mon Nov 15 21:58:10 2010 (r215349) @@ -159,7 +159,8 @@ static devclass_t psycho_devclass; DEFINE_CLASS_0(pcib, psycho_driver, psycho_methods, sizeof(struct psycho_softc)); -DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0); +EARLY_DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, psycho_softc) psycho_softcs = SLIST_HEAD_INITIALIZER(psycho_softcs); Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Mon Nov 15 21:41:45 2010 (r215348) +++ head/sys/sparc64/pci/schizo.c Mon Nov 15 21:58:10 2010 (r215349) @@ -158,7 +158,8 @@ static devclass_t schizo_devclass; DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods, sizeof(struct schizo_softc)); -DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0); +EARLY_DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, schizo_softc) schizo_softcs = SLIST_HEAD_INITIALIZER(schizo_softcs); From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 22:05:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712CC106566B; Mon, 15 Nov 2010 22:05:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F99A8FC1B; Mon, 15 Nov 2010 22:05: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 oAFM581P030119; Mon, 15 Nov 2010 22:05:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFM58Rf030117; Mon, 15 Nov 2010 22:05:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011152205.oAFM58Rf030117@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 15 Nov 2010 22:05: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: r215350 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:05:08 -0000 Author: yongari Date: Mon Nov 15 22:05:08 2010 New Revision: 215350 URL: http://svn.freebsd.org/changeset/base/215350 Log: Plug memory leakage introduced in r215327. Submitted by: jkim Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Mon Nov 15 21:58:10 2010 (r215349) +++ head/sys/dev/nfe/if_nfe.c Mon Nov 15 22:05:08 2010 (r215350) @@ -804,7 +804,7 @@ nfe_can_use_msix(struct nfe_softc *sc) struct msix_blacklist *mblp; char *maker, *product; - int count, n; + int count, n, use_msix; /* * Search base board manufacturer and product name table @@ -812,18 +812,25 @@ nfe_can_use_msix(struct nfe_softc *sc) */ maker = getenv("smbios.planar.maker"); product = getenv("smbios.planar.product"); + use_msix = 1; if (maker != NULL && product != NULL) { count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); mblp = msix_blacklists; for (n = 0; n < count; n++) { if (strcmp(maker, mblp->maker) == 0 && - strcmp(product, mblp->product) == 0) - return (0); + strcmp(product, mblp->product) == 0) { + use_msix = 0; + break; + } mblp++; } } + if (maker != NULL) + freeenv(maker); + if (product != NULL) + freeenv(product); - return (1); + return (use_msix); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 22:11:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D4F1065672; Mon, 15 Nov 2010 22:11:18 +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 A41F78FC15; Mon, 15 Nov 2010 22:11: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 oAFMBIUn030283; Mon, 15 Nov 2010 22:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFMBIMl030281; Mon, 15 Nov 2010 22:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011152211.oAFMBIMl030281@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Nov 2010 22:11: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: r215351 - head/gnu/usr.bin/binutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:11:18 -0000 Author: nwhitehorn Date: Mon Nov 15 22:11:18 2010 New Revision: 215351 URL: http://svn.freebsd.org/changeset/base/215351 Log: Try including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if it exists in order to allow arch-specific overrides. This fixes the binutils (and world) build on powerpc64 after recent TBEMD merges. Reviewed by: imp Modified: head/gnu/usr.bin/binutils/Makefile.inc0 Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Mon Nov 15 22:05:08 2010 (r215350) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Mon Nov 15 22:11:18 2010 (r215351) @@ -36,28 +36,15 @@ CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} -.endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -.PATH: ${.CURDIR}/${TARGET_CPUARCH} -.endif - ARCHS= ${TARGET_CPUARCH} -.for _arch in ${CROSS_ARCH} -.if (${ARCHS:R:M${_arch:R}} == "") -ARCHS+= $(_arch) -.endif -.endfor - -.for _arch in ${ARCHS} -.if exists(${.CURDIR}/Makefile.${_arch}) -.include "${.CURDIR}/Makefile.${_arch}" +.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) +.include "${.CURDIR}/Makefile.${TARGET_ARCH}" +.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) +.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" .endif -.endfor From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 22:12:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7184106566B; Mon, 15 Nov 2010 22:12:13 +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 948A08FC17; Mon, 15 Nov 2010 22:12: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 oAFMCDjf030336; Mon, 15 Nov 2010 22:12:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFMCDr4030333; Mon, 15 Nov 2010 22:12:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011152212.oAFMCDr4030333@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Nov 2010 22:12: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: r215352 - in head/gnu/usr.bin/binutils: as as/powerpc64-freebsd libbfd libopcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:12:13 -0000 Author: nwhitehorn Date: Mon Nov 15 22:12:13 2010 New Revision: 215352 URL: http://svn.freebsd.org/changeset/base/215352 Log: Garbage-collect some code made obsolete by the TBEMD import. Deleted: head/gnu/usr.bin/binutils/as/powerpc64-freebsd/ head/gnu/usr.bin/binutils/libopcodes/Makefile.powerpc64 Modified: head/gnu/usr.bin/binutils/as/Makefile head/gnu/usr.bin/binutils/libbfd/Makefile Modified: head/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/as/Makefile Mon Nov 15 22:11:18 2010 (r215351) +++ head/gnu/usr.bin/binutils/as/Makefile Mon Nov 15 22:12:13 2010 (r215352) @@ -26,7 +26,7 @@ SRCS+= itbl-ops.c itbl-parse.y itbl-lex. .if ${TARGET_ARCH} == "amd64" SRCS+= tc-i386.c -.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +.elif ${TARGET_CPUARCH} == "powerpc" SRCS+= tc-ppc.c .elif ${TARGET_ARCH} == "sparc64" # change back to tc-sparc.c when new binutils is imported Modified: head/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/libbfd/Makefile Mon Nov 15 22:11:18 2010 (r215351) +++ head/gnu/usr.bin/binutils/libbfd/Makefile Mon Nov 15 22:12:13 2010 (r215352) @@ -24,8 +24,6 @@ SELARCH= SELARCH= &bfd_i386_arch .elif ${TARGET_ARCH} == "sparc64" SELARCH= &bfd_sparc_arch -.elif ${TARGET_ARCH} == "powerpc64" -SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch .else .for _a in ${ARCHS} .if ${SELARCH} == "" From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:11:02 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE15F106564A; Mon, 15 Nov 2010 23:11:02 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6A38FC13; Mon, 15 Nov 2010 23:11:02 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 7E2867E84A; Tue, 16 Nov 2010 10:11:00 +1100 (EST) Message-ID: <4CE1BE04.7020003@freebsd.org> Date: Tue, 16 Nov 2010 10:11:00 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> <86pqu65k1l.fsf@kopusha.home.net> In-Reply-To: <86pqu65k1l.fsf@kopusha.home.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc 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, 15 Nov 2010 23:11:02 -0000 On 11/16/10 08:55, Mikolaj Golub wrote: > > On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: > > LS> On 11/15/10 20:43, Mikolaj Golub wrote: > >> > >> On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: > >> > >> LS> On 11/15/10 02:15, Mikolaj Golub wrote: > >> >> > >> >> LS> Would you mind testing the following patch? It fixes the panic for me. > >> >> > >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > >> >> > >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > >> >> ddb does not work. I am trying this under VirtualBox. > >> > >> LS> I can't reproduce a hang, but please try this patch instead: > >> > >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch > >> > >> I can't try it now on the box where I observed the hang. Trying on another box > >> I can't reproduce the hang -- both patches works for me: no hang and I can > >> create/remove jail and tcp connections to jail work. > >> > >> I will try the patch on the "problem" box tonight. > > Strange, I can't reproduce the hang today :-). I have tried both SI_ORDER_ANY > and SI_ORDER_FIRST. I will keep running the kernel with your patches and let > you know if I have any issues. Thanks Mikolaj, I really appreciate the help. I'll try to get the patches committed shortly. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:13:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75DB106564A; Mon, 15 Nov 2010 23:13:25 +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 C62CE8FC19; Mon, 15 Nov 2010 23:13: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 oAFNDPW4031705; Mon, 15 Nov 2010 23:13:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNDP7e031703; Mon, 15 Nov 2010 23:13:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011152313.oAFNDP7e031703@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Nov 2010 23:13: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: r215353 - 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: Mon, 15 Nov 2010 23:13:25 -0000 Author: jkim Date: Mon Nov 15 23:13:25 2010 New Revision: 215353 URL: http://svn.freebsd.org/changeset/base/215353 Log: Plug memory leakage introduced in r204989. Reported by: yongari Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Nov 15 22:12:13 2010 (r215352) +++ head/sys/dev/mii/brgphy.c Mon Nov 15 23:13:25 2010 (r215353) @@ -154,15 +154,18 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; + int found; - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) - return (0); - return (1); + found = 0; + if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strcmp(sysenv, HS21_PRODUCT_ID) == 0) + found = 1; + freeenv(sysenv); + } + } + return (found); } /* Search for our PHY in the list of known PHYs */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:14:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1072106566C; Mon, 15 Nov 2010 23:14:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFE0A8FC0A; Mon, 15 Nov 2010 23:14:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFNEEtw031763; Mon, 15 Nov 2010 23:14:14 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNEEaf031761; Mon, 15 Nov 2010 23:14:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201011152314.oAFNEEaf031761@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 15 Nov 2010 23:14: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: r215354 - head/sys/compat/linsysfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:14:15 -0000 Author: des Date: Mon Nov 15 23:14:14 2010 New Revision: 215354 URL: http://svn.freebsd.org/changeset/base/215354 Log: Remove no-op assignment. Submitted by: clang via arundel@ MFC after: 2 weeks Modified: head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Mon Nov 15 23:13:25 2010 (r215353) +++ head/sys/compat/linsysfs/linsysfs.c Mon Nov 15 23:14:14 2010 (r215354) @@ -182,8 +182,8 @@ linsysfs_run_bus(device_t dev, struct pf sprintf(host, "host%d", host_number++); strcat(new_path, "/"); strcat(new_path, host); - sub_dir = pfs_create_dir(dir, - host, NULL, NULL, NULL, 0); + pfs_create_dir(dir, host, + NULL, NULL, NULL, 0); scsi_host = malloc(sizeof( struct scsi_host_queue), M_DEVBUF, M_NOWAIT); From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:38:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295B1106567A; Mon, 15 Nov 2010 23:38:53 +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 181B48FC13; Mon, 15 Nov 2010 23:38: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 oAFNcqxT032300; Mon, 15 Nov 2010 23:38:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNcqjG032298; Mon, 15 Nov 2010 23:38:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011152338.oAFNcqjG032298@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Nov 2010 23:38: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: r215355 - 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: Mon, 15 Nov 2010 23:38:53 -0000 Author: jkim Date: Mon Nov 15 23:38:52 2010 New Revision: 215355 URL: http://svn.freebsd.org/changeset/base/215355 Log: Restore the previous behaviour of substring match. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Nov 15 23:14:14 2010 (r215354) +++ head/sys/dev/mii/brgphy.c Mon Nov 15 23:38:52 2010 (r215355) @@ -160,7 +160,8 @@ detect_hs21(struct bce_softc *bce_sc) if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { - if (strcmp(sysenv, HS21_PRODUCT_ID) == 0) + if (strncmp(sysenv, HS21_PRODUCT_ID, + strlen(HS21_PRODUCT_ID)) == 0) found = 1; freeenv(sysenv); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:51:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6E6106566C; Mon, 15 Nov 2010 23:51:12 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D25038FC0A; Mon, 15 Nov 2010 23:51: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 oAFNpB12032593; Mon, 15 Nov 2010 23:51:11 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNpBMQ032589; Mon, 15 Nov 2010 23:51:11 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011152351.oAFNpBMQ032589@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 15 Nov 2010 23:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215356 - in stable/8/sys/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, 15 Nov 2010 23:51:12 -0000 Author: lstewart Date: Mon Nov 15 23:51:11 2010 New Revision: 215356 URL: http://svn.freebsd.org/changeset/base/215356 Log: MFC r215152: The university does not require that its CRICOS number be included in source code. Remove all references from the tree. Modified: stable/8/sys/netinet/libalias/alias_sctp.c stable/8/sys/netinet/libalias/alias_sctp.h stable/8/sys/netinet/siftr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/libalias/alias_sctp.c ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.c Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/libalias/alias_sctp.c Mon Nov 15 23:51:11 2010 (r215356) @@ -1,8 +1,7 @@ /** * @file alias_sctp.c * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/8/sys/netinet/libalias/alias_sctp.h ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.h Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/libalias/alias_sctp.h Mon Nov 15 23:51:11 2010 (r215356) @@ -1,8 +1,7 @@ /** * @file alias_sctp.h * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Mon Nov 15 23:38:52 2010 (r215355) +++ stable/8/sys/netinet/siftr.c Mon Nov 15 23:51:11 2010 (r215356) @@ -1,7 +1,6 @@ /*- * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Mon Nov 15 23:57:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D71D1065675; Mon, 15 Nov 2010 23:57:07 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2FE8FC14; Mon, 15 Nov 2010 23:57: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 oAFNv6S4032753; Mon, 15 Nov 2010 23:57:06 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNv6CQ032751; Mon, 15 Nov 2010 23:57:06 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011152357.oAFNv6CQ032751@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 15 Nov 2010 23:57:06 +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: r215357 - 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: Mon, 15 Nov 2010 23:57:07 -0000 Author: lstewart Date: Mon Nov 15 23:57:06 2010 New Revision: 215357 URL: http://svn.freebsd.org/changeset/base/215357 Log: MFC r215152: The university does not require that its CRICOS number be included in source code. Remove all references from the tree. Modified: stable/7/sys/netinet/siftr.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/siftr.c ============================================================================== --- stable/7/sys/netinet/siftr.c Mon Nov 15 23:51:11 2010 (r215356) +++ stable/7/sys/netinet/siftr.c Mon Nov 15 23:57:06 2010 (r215357) @@ -1,7 +1,6 @@ /*- * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia - * (CRICOS number 00111D). + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:00:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4891B1065673; Tue, 16 Nov 2010 00:00:32 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 366348FC1D; Tue, 16 Nov 2010 00:00: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 oAG00WqQ032916; Tue, 16 Nov 2010 00:00:32 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG00Wb0032914; Tue, 16 Nov 2010 00:00:32 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160000.oAG00Wb0032914@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:00:32 +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: r215358 - 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, 16 Nov 2010 00:00:32 -0000 Author: lstewart Date: Tue Nov 16 00:00:31 2010 New Revision: 215358 URL: http://svn.freebsd.org/changeset/base/215358 Log: MFC r215153: Standardise all Swinburne related copyright/licence statements throughout the tree in preparation for another large code import. Swinburne University is the legal entity that owns copyright and the 2-clause BSD licence is acceptable. Modified: stable/7/sys/netinet/siftr.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/siftr.c ============================================================================== --- stable/7/sys/netinet/siftr.c Mon Nov 15 23:57:06 2010 (r215357) +++ stable/7/sys/netinet/siftr.c Tue Nov 16 00:00:31 2010 (r215358) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. + * Copyright (c) 2007-2009 + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:01:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B48106566B; Tue, 16 Nov 2010 00:01:45 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B098FC19; Tue, 16 Nov 2010 00:01: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 oAG01jUt032984; Tue, 16 Nov 2010 00:01:45 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG01jWB032980; Tue, 16 Nov 2010 00:01:45 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160001.oAG01jWB032980@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:01: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: r215359 - in stable/8/sys/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: Tue, 16 Nov 2010 00:01:45 -0000 Author: lstewart Date: Tue Nov 16 00:01:44 2010 New Revision: 215359 URL: http://svn.freebsd.org/changeset/base/215359 Log: MFC r215153: Standardise all Swinburne related copyright/licence statements throughout the tree in preparation for another large code import. Swinburne University is the legal entity that owns copyright and the 2-clause BSD licence is acceptable. Modified: stable/8/sys/netinet/libalias/alias_sctp.c stable/8/sys/netinet/libalias/alias_sctp.h stable/8/sys/netinet/siftr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/libalias/alias_sctp.c ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.c Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/libalias/alias_sctp.c Tue Nov 16 00:01:44 2010 (r215359) @@ -1,8 +1,7 @@ -/** - * @file alias_sctp.c - * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. - * +/*- + * Copyright (c) 2008 + * Swinburne University of Technology, Melbourne, Australia. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -11,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors, the "Centre for Advanced Internet Architectures" - * and "Swinburne University of Technology" may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * + * * 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 @@ -27,7 +22,9 @@ * 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. - * + */ + +/* * Alias_sctp forms part of the libalias kernel module to handle * Network Address Translation (NAT) for the SCTP protocol. * Modified: stable/8/sys/netinet/libalias/alias_sctp.h ============================================================================== --- stable/8/sys/netinet/libalias/alias_sctp.h Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/libalias/alias_sctp.h Tue Nov 16 00:01:44 2010 (r215359) @@ -1,8 +1,7 @@ -/** - * @file alias_sctp.h - * Copyright (c) 2008, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. - * +/*- + * Copyright (c) 2008 + * Swinburne University of Technology, Melbourne, Australia. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -11,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors, the "Centre for Advanced Internet Architectures" - * and "Swinburne University of Technology" may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * + * * 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 @@ -27,7 +22,9 @@ * 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. - * + */ + +/* * Alias_sctp forms part of the libalias kernel module to handle * Network Address Translation (NAT) for the SCTP protocol. * Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Tue Nov 16 00:00:31 2010 (r215358) +++ stable/8/sys/netinet/siftr.c Tue Nov 16 00:01:44 2010 (r215359) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2007-2009, Centre for Advanced Internet Architectures - * Swinburne University of Technology, Melbourne, Australia. + * Copyright (c) 2007-2009 + * Swinburne University of Technology, Melbourne, Australia. * Copyright (c) 2009-2010, The FreeBSD Foundation * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:06:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F7F2106566B; Tue, 16 Nov 2010 00:06:20 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0FB8FC08; Tue, 16 Nov 2010 00:06: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 oAG06Kku033166; Tue, 16 Nov 2010 00:06:20 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG06Knt033164; Tue, 16 Nov 2010 00:06:20 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160006.oAG06Knt033164@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:06:20 +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: r215360 - stable/7/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, 16 Nov 2010 00:06:20 -0000 Author: lstewart Date: Tue Nov 16 00:06:19 2010 New Revision: 215360 URL: http://svn.freebsd.org/changeset/base/215360 Log: MFC r215154: The first releases SIFTR will ship in will be 7.4 and 8.2. Modified: stable/7/share/man/man4/siftr.4 Directory Properties: stable/7/share/man/ (props changed) stable/7/share/man/man1/ (props changed) stable/7/share/man/man3/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/share/man/man5/ (props changed) stable/7/share/man/man7/ (props changed) stable/7/share/man/man8/ (props changed) stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man4/siftr.4 ============================================================================== --- stable/7/share/man/man4/siftr.4 Tue Nov 16 00:01:44 2010 (r215359) +++ stable/7/share/man/man4/siftr.4 Tue Nov 16 00:06:19 2010 (r215360) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2010 +.Dd November 12, 2010 .Dt SIFTR 4 .Os .Sh NAME @@ -610,7 +610,9 @@ and the FreeBSD Foundation. .Sh HISTORY .Nm first appeared in -.Fx 9.0 . +.Fx 7.4 +and +.Fx 8.2 . .Pp .Nm was first released in 2007 by Lawrence Stewart and James Healy whilst working on From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:06:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0837F1065670; Tue, 16 Nov 2010 00:06:49 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA3848FC21; Tue, 16 Nov 2010 00:06: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 oAG06mM2033209; Tue, 16 Nov 2010 00:06:48 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG06mWg033207; Tue, 16 Nov 2010 00:06:48 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160006.oAG06mWg033207@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 00:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215361 - 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, 16 Nov 2010 00:06:49 -0000 Author: lstewart Date: Tue Nov 16 00:06:48 2010 New Revision: 215361 URL: http://svn.freebsd.org/changeset/base/215361 Log: MFC r215154: The first releases SIFTR will ship in will be 7.4 and 8.2. Modified: stable/8/share/man/man4/siftr.4 Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man4/siftr.4 ============================================================================== --- stable/8/share/man/man4/siftr.4 Tue Nov 16 00:06:19 2010 (r215360) +++ stable/8/share/man/man4/siftr.4 Tue Nov 16 00:06:48 2010 (r215361) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2010 +.Dd November 12, 2010 .Dt SIFTR 4 .Os .Sh NAME @@ -610,7 +610,9 @@ and the FreeBSD Foundation. .Sh HISTORY .Nm first appeared in -.Fx 9.0 . +.Fx 7.4 +and +.Fx 8.2 . .Pp .Nm was first released in 2007 by Lawrence Stewart and James Healy whilst working on From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:32:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D0A61065673; Tue, 16 Nov 2010 00:32:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D43858FC18; Tue, 16 Nov 2010 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 oAG0WHka033756; Tue, 16 Nov 2010 00:32:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG0WHcf033754; Tue, 16 Nov 2010 00:32:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011160032.oAG0WHcf033754@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 00:32: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: r215362 - 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, 16 Nov 2010 00:32:18 -0000 Author: yongari Date: Tue Nov 16 00:32:17 2010 New Revision: 215362 URL: http://svn.freebsd.org/changeset/base/215362 Log: MFC r214968: Use shorten model name instead of showing all controller model numbers. bge(4) supports too many models such that it's unreasonable to list all these controllers in one line description of name. While I'm here mention that BCM590x/BCM5779x is Fast Ethernet controller. bge(4) still lacks support for some controllers but supporting these controllers should be easy now and adding new controllers do not require touching .Nd any more. Obtained from: OpenBSD Modified: stable/8/share/man/man4/bge.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/bge.4 ============================================================================== --- stable/8/share/man/man4/bge.4 Tue Nov 16 00:06:48 2010 (r215361) +++ stable/8/share/man/man4/bge.4 Tue Nov 16 00:32:17 2010 (r215362) @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2010 +.Dd November 7, 2010 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd "Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5761/5784/5789/57780 PCI Gigabit Ethernet adapter driver" +.Nd "Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,8 +56,8 @@ if_bge_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5722, 5750, 5751, 5752, 5761, 5784, 5789 and 57780 families -of Gigabit Ethernet controller chips. +571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller +chips and the 590x and 5779x Fast Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 copper cable, except for the SysKonnect SK-9D41 which supports only @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support +The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704 and BCM5717 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:32:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A84A1065674; Tue, 16 Nov 2010 00:32:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC9E8FC16; Tue, 16 Nov 2010 00:32: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 oAG0WjFs033800; Tue, 16 Nov 2010 00:32:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG0WjmT033798; Tue, 16 Nov 2010 00:32:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011160032.oAG0WjmT033798@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 00:32:45 +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: r215363 - stable/7/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, 16 Nov 2010 00:32:45 -0000 Author: yongari Date: Tue Nov 16 00:32:45 2010 New Revision: 215363 URL: http://svn.freebsd.org/changeset/base/215363 Log: MFC r214968: Use shorten model name instead of showing all controller model numbers. bge(4) supports too many models such that it's unreasonable to list all these controllers in one line description of name. While I'm here mention that BCM590x/BCM5779x is Fast Ethernet controller. bge(4) still lacks support for some controllers but supporting these controllers should be easy now and adding new controllers do not require touching .Nd any more. Obtained from: OpenBSD Modified: stable/7/share/man/man4/bge.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/bge.4 ============================================================================== --- stable/7/share/man/man4/bge.4 Tue Nov 16 00:32:17 2010 (r215362) +++ stable/7/share/man/man4/bge.4 Tue Nov 16 00:32:45 2010 (r215363) @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2010 +.Dd November 7, 2010 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd "Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5761/5784/5789/57780 PCI Gigabit Ethernet adapter driver" +.Nd "Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,8 +56,8 @@ if_bge_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5722, 5750, 5751, 5752, 5761, 5784, 5789 and 57780 families -of Gigabit Ethernet controller chips. +571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller +chips and the 590x and 5779x Fast Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 copper cable, except for the SysKonnect SK-9D41 which supports only @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support +The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704 and BCM5717 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 00:34:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3BA106564A; Tue, 16 Nov 2010 00:34:35 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id C842F8FC16; Tue, 16 Nov 2010 00:34:34 +0000 (UTC) Received: by qyk32 with SMTP id 32so416918qyk.13 for ; Mon, 15 Nov 2010 16:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=mkzxH9xDxcs5/0AYhsEZxlnrezRZOKDMWVxRw4lRHIY=; b=U3kIFN/t6P9vFdHiGKon01hOQkzi6DA061GrO3SKCBEOJrUAuG25HzQJxxqEfWT7zC WtpNakisFHlQ6CjoiPf8kBmmmSTGKZDHfGAVH7Dsby89lMsjJDzdR26MRMgZdX+swTqn h+OS3YKr7E0bIgfBByCvIhPqHexGePIipAReQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=hbFgnmVg5H63VJqIch9448+0xFyy0dlCM0Fxi1VxJrVQPLPe2ghxlhqWbpiRLL9XKZ mPAkRNAlk0rjY58I7wnuAsa3IfMMHnzWcFyZd+iHcpKeFu4K0toVsjF+ll30NSUe2YFE 7138hbIyhzkmqjalxiQzDpe2mkIeE/uFwhq3k= Received: by 10.229.212.5 with SMTP id gq5mr5572598qcb.275.1289867673596; Mon, 15 Nov 2010 16:34:33 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Mon, 15 Nov 2010 16:33:53 -0800 (PST) In-Reply-To: <20101115171016.GB20524@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> From: Ivan Voras Date: Tue, 16 Nov 2010 01:33:53 +0100 X-Google-Sender-Auth: zJWXgp7gaxFYd6597YXNOynBguI Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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: Tue, 16 Nov 2010 00:34:35 -0000 On 15 November 2010 18:10, Luigi Rizzo wrote: > 2. [generic] passing pointers between userland and kernel > requires remapping the pointer when going up or down. > As the mapping would be application specific, i don't > see much use in allowing room for a pointer without kernel code > to map userland <-> kernel pointers. I'm not thinking of passing a *working* pointer into the kernel but used as a cookie, similar to how it's used in kqueue: the intention being the application can send and get a pointer which means something to the application, not something usable to the kernel. Without using intptr_t, if an application wants to hang a structure on the cookie, it needs to maintain its own translation table (index-to-pointer). From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 01:35:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8E0E106564A; Tue, 16 Nov 2010 01:35:18 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 862168FC19; Tue, 16 Nov 2010 01:35:18 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id CCBDD73098; Tue, 16 Nov 2010 02:48:17 +0100 (CET) Date: Tue, 16 Nov 2010 02:48:17 +0100 From: Luigi Rizzo To: Ivan Voras Message-ID: <20101116014817.GA25713@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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: Tue, 16 Nov 2010 01:35:18 -0000 On Tue, Nov 16, 2010 at 01:33:53AM +0100, Ivan Voras wrote: > On 15 November 2010 18:10, Luigi Rizzo wrote: > > > 2. [generic] passing pointers between userland and kernel > > requires remapping the pointer when going up or down. > > As the mapping would be application specific, i don't > > see much use in allowing room for a pointer without kernel code > > to map userland <-> kernel pointers. > > I'm not thinking of passing a *working* pointer into the kernel but > used as a cookie, similar to how it's used in kqueue: the intention > being the application can send and get a pointer which means something > to the application, not something usable to the kernel. oh, but then you are thinking of something completely different. The SO_USER_COOKIE is never returned to the application; it is only passed to another kernel subsystem, so it must be significant there, not for the application. cheers luigi From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 03:20:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C6C8106566B; Tue, 16 Nov 2010 03:20:57 +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 5A7348FC12; Tue, 16 Nov 2010 03: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 oAG3KvlN037723; Tue, 16 Nov 2010 03:20:57 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG3KvXY037721; Tue, 16 Nov 2010 03:20:57 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011160320.oAG3KvXY037721@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 16 Nov 2010 03:20:57 +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: r215366 - stable/7/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 03:20:57 -0000 Author: bz Date: Tue Nov 16 03:20:57 2010 New Revision: 215366 URL: http://svn.freebsd.org/changeset/base/215366 Log: MFC r214565: Announce IPsec if available for feature_present(3) checks. Modified: stable/7/sys/netipsec/ipsec.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/netipsec/ipsec.c ============================================================================== --- stable/7/sys/netipsec/ipsec.c Tue Nov 16 02:01:12 2010 (r215365) +++ stable/7/sys/netipsec/ipsec.c Tue Nov 16 03:20:57 2010 (r215366) @@ -122,6 +122,8 @@ int ip4_esp_randpad = -1; */ int crypto_support = CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE; +FEATURE(ipsec, "Internet Protocol Security (IPsec)"); + SYSCTL_DECL(_net_inet_ipsec); /* net.inet.ipsec */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 03:43:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6BA10656D5; Tue, 16 Nov 2010 03:43:07 +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 EF56E8FC22; Tue, 16 Nov 2010 03:43: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 oAG3h6Io038195; Tue, 16 Nov 2010 03:43:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG3h683038188; Tue, 16 Nov 2010 03:43:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011160343.oAG3h683038188@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 16 Nov 2010 03:43: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: r215367 - 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: Tue, 16 Nov 2010 03:43:07 -0000 Author: nwhitehorn Date: Tue Nov 16 03:43:06 2010 New Revision: 215367 URL: http://svn.freebsd.org/changeset/base/215367 Log: Make drm(4) build, if not work reliably, on PowerPC. Modified: head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_agpsupport.c head/sys/dev/drm/drm_drv.c head/sys/dev/drm/drm_memory.c head/sys/dev/drm/drm_sysctl.c head/sys/dev/drm/radeon_cs.c Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drmP.h Tue Nov 16 03:43:06 2010 (r215367) @@ -80,7 +80,9 @@ struct drm_file; #include #include #include +#if defined(__i386__) || defined(__amd64__) #include +#endif #include #include #include @@ -246,20 +248,20 @@ typedef u_int8_t u8; *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) #define DRM_READ16(map, offset) \ - *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le16toh(*(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_READ32(map, offset) \ - *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le32toh(*(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_WRITE8(map, offset, val) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) = val #define DRM_WRITE16(map, offset, val) \ *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole16(val) #define DRM_WRITE32(map, offset, val) \ *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole32(val) #define DRM_VERIFYAREA_READ( uaddr, size ) \ (!useracc(__DECONST(caddr_t, uaddr), size, VM_PROT_READ)) Modified: head/sys/dev/drm/drm_agpsupport.c ============================================================================== --- head/sys/dev/drm/drm_agpsupport.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_agpsupport.c Tue Nov 16 03:43:06 2010 (r215367) @@ -318,7 +318,7 @@ int drm_agp_bind(struct drm_device *dev, if (!dev->agp || !dev->agp->acquired) return EINVAL; - DRM_DEBUG("agp_bind, page_size=%x\n", PAGE_SIZE); + DRM_DEBUG("agp_bind, page_size=%x\n", (int)PAGE_SIZE); entry = drm_agp_lookup_entry(dev, (void *)request->handle); if (entry == NULL || entry->bound) Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_drv.c Tue Nov 16 03:43:06 2010 (r215367) @@ -478,7 +478,7 @@ static int drm_load(struct drm_device *d retcode = ENOMEM; goto error; } - if (dev->agp != NULL) { + if (dev->agp != NULL && dev->agp->info.ai_aperture_base != 0) { if (drm_mtrr_add(dev->agp->info.ai_aperture_base, dev->agp->info.ai_aperture_size, DRM_MTRR_WC) == 0) dev->agp->mtrr = 1; Modified: head/sys/dev/drm/drm_memory.c ============================================================================== --- head/sys/dev/drm/drm_memory.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_memory.c Tue Nov 16 03:43:06 2010 (r215367) @@ -73,7 +73,7 @@ void drm_mem_uninit(void) void *drm_ioremap_wc(struct drm_device *dev, drm_local_map_t *map) { - return pmap_mapdev_attr(map->offset, map->size, PAT_WRITE_COMBINING); + return pmap_mapdev_attr(map->offset, map->size, VM_MEMATTR_WRITE_COMBINING); } void *drm_ioremap(struct drm_device *dev, drm_local_map_t *map) Modified: head/sys/dev/drm/drm_sysctl.c ============================================================================== --- head/sys/dev/drm/drm_sysctl.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_sysctl.c Tue Nov 16 03:43:06 2010 (r215367) @@ -259,7 +259,7 @@ static int drm_bufs_info DRM_SYSCTL_HAND *(1 << dma->bufs[i].page_order), (dma->bufs[i].seg_count * (1 << dma->bufs[i].page_order)) - * PAGE_SIZE / 1024); + * (int)PAGE_SIZE / 1024); } DRM_SYSCTL_PRINT("\n"); for (i = 0; i < dma->buf_count; i++) { Modified: head/sys/dev/drm/radeon_cs.c ============================================================================== --- head/sys/dev/drm/radeon_cs.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/radeon_cs.c Tue Nov 16 03:43:06 2010 (r215367) @@ -765,7 +765,7 @@ static int r600_cs_parse(struct drm_rade memcpy(parser->ib, ib_chunk->kdata, ib_chunk->length_dw * sizeof(uint32_t)); /* read back last byte to flush WC buffers */ - rb = readl(((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); + rb = *(volatile u_int32_t *) (((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); return 0; } From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 04:40:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E942106564A; Tue, 16 Nov 2010 04:40:05 +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 1E1AB8FC18; Tue, 16 Nov 2010 04:40: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 oAG4e5fP039492; Tue, 16 Nov 2010 04:40:05 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG4e3YU039413; Tue, 16 Nov 2010 04:40:03 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201011160440.oAG4e3YU039413@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 16 Nov 2010 04:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 04:40:05 -0000 Author: sobomax Date: Tue Nov 16 04:40:03 2010 New Revision: 215368 URL: http://svn.freebsd.org/changeset/base/215368 Log: MFC r207554: Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. Modified: stable/7/sys/arm/at91/if_ate.c stable/7/sys/arm/xscale/ixp425/if_npe.c stable/7/sys/contrib/dev/oltr/if_oltr.c stable/7/sys/dev/ae/if_ae.c stable/7/sys/dev/an/if_an.c stable/7/sys/dev/ar/if_ar.c stable/7/sys/dev/arl/if_arl.c stable/7/sys/dev/ath/if_ath.c stable/7/sys/dev/awi/awi.c stable/7/sys/dev/ce/if_ce.c stable/7/sys/dev/cm/smc90cx6.c stable/7/sys/dev/cnw/if_cnw.c stable/7/sys/dev/cp/if_cp.c stable/7/sys/dev/cs/if_cs.c stable/7/sys/dev/ctau/if_ct.c stable/7/sys/dev/cx/if_cx.c stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/ed/if_ed.c stable/7/sys/dev/ep/if_ep.c stable/7/sys/dev/ex/if_ex.c stable/7/sys/dev/ie/if_ie.c stable/7/sys/dev/iicbus/if_ic.c stable/7/sys/dev/ipw/if_ipw.c stable/7/sys/dev/iwi/if_iwi.c stable/7/sys/dev/le/lance.c stable/7/sys/dev/malo/if_malo.c stable/7/sys/dev/my/if_my.c stable/7/sys/dev/nxge/if_nxge.c stable/7/sys/dev/pdq/pdq_ifsubr.c stable/7/sys/dev/ppbus/if_plip.c stable/7/sys/dev/ral/rt2560.c stable/7/sys/dev/ral/rt2661.c stable/7/sys/dev/ray/if_ray.c stable/7/sys/dev/sbni/if_sbni.c stable/7/sys/dev/sbsh/if_sbsh.c stable/7/sys/dev/sn/if_sn.c stable/7/sys/dev/snc/dp83932.c stable/7/sys/dev/sr/if_sr.c stable/7/sys/dev/usb/if_aue.c stable/7/sys/dev/usb/if_axe.c stable/7/sys/dev/usb/if_cdce.c stable/7/sys/dev/usb/if_cue.c stable/7/sys/dev/usb/if_kue.c stable/7/sys/dev/usb/if_rue.c stable/7/sys/dev/usb/if_rum.c stable/7/sys/dev/usb/if_udav.c stable/7/sys/dev/usb/if_ural.c stable/7/sys/dev/usb/if_zyd.c stable/7/sys/dev/usb/udbp.c stable/7/sys/dev/vx/if_vx.c stable/7/sys/dev/wi/if_wi.c stable/7/sys/dev/wl/if_wl.c stable/7/sys/dev/wpi/if_wpi.c stable/7/sys/dev/xe/if_xe.c stable/7/sys/i4b/capi/capi_l4if.c stable/7/sys/i4b/driver/i4b_ing.c stable/7/sys/i4b/driver/i4b_isppp.c stable/7/sys/i4b/driver/i4b_trace.c stable/7/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c stable/7/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c stable/7/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c stable/7/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c stable/7/sys/i4b/layer1/isic/i4b_bchan.c stable/7/sys/i4b/layer1/itjc/i4b_itjc_pci.c stable/7/sys/i4b/layer1/iwic/i4b_iwic_bchan.c stable/7/sys/i4b/layer4/i4b_i4bdrv.c stable/7/sys/net/if.c stable/7/sys/net/if_ef.c stable/7/sys/net/if_gif.c stable/7/sys/net/if_gre.c stable/7/sys/net/if_ppp.c stable/7/sys/net/if_stf.c stable/7/sys/netatalk/ddp_usrreq.c stable/7/sys/netgraph/ng_eiface.c stable/7/sys/netgraph/ng_fec.c stable/7/sys/netgraph/ng_iface.c stable/7/sys/netgraph/ng_tty.c stable/7/sys/netinet/ip_input.c stable/7/sys/netinet6/ip6_input.c stable/7/sys/netipx/ipx_input.c stable/7/sys/pci/if_rl.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/arm/at91/if_ate.c ============================================================================== --- stable/7/sys/arm/at91/if_ate.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/arm/at91/if_ate.c Tue Nov 16 04:40:03 2010 (r215368) @@ -231,8 +231,8 @@ ate_attach(device_t dev) ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; ifp->if_linkmib = &sc->mibdata; Modified: stable/7/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- stable/7/sys/arm/xscale/ixp425/if_npe.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/arm/xscale/ixp425/if_npe.c Tue Nov 16 04:40:03 2010 (r215368) @@ -335,7 +335,7 @@ npe_attach(device_t dev) ifp->if_ioctl = npeioctl; ifp->if_init = npeinit; IFQ_SET_MAXLEN(&ifp->if_snd, sc->txdma.nbuf - 1); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); Modified: stable/7/sys/contrib/dev/oltr/if_oltr.c ============================================================================== --- stable/7/sys/contrib/dev/oltr/if_oltr.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/contrib/dev/oltr/if_oltr.c Tue Nov 16 04:40:03 2010 (r215368) @@ -171,7 +171,7 @@ oltr_attach(device_t dev) ifp->if_start = oltr_start; ifp->if_ioctl = oltr_ioctl; ifp->if_flags = IFF_BROADCAST | IFF_NEEDSGIANT; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* * Do ifmedia setup. Modified: stable/7/sys/dev/ae/if_ae.c ============================================================================== --- stable/7/sys/dev/ae/if_ae.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ae/if_ae.c Tue Nov 16 04:40:03 2010 (r215368) @@ -375,7 +375,7 @@ ae_attach(device_t dev) ifp->if_init = ae_init; ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; ifp->if_hwassist = 0; - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { Modified: stable/7/sys/dev/an/if_an.c ============================================================================== --- stable/7/sys/dev/an/if_an.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/an/if_an.c Tue Nov 16 04:40:03 2010 (r215368) @@ -742,8 +742,8 @@ an_attach(struct an_softc *sc, int unit, ifp->if_watchdog = an_watchdog; ifp->if_init = an_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); bzero(sc->an_config.an_nodename, sizeof(sc->an_config.an_nodename)); Modified: stable/7/sys/dev/ar/if_ar.c ============================================================================== --- stable/7/sys/dev/ar/if_ar.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ar/if_ar.c Tue Nov 16 04:40:03 2010 (r215368) @@ -333,8 +333,8 @@ ar_attach(device_t device) } NG_NODE_SET_PRIVATE(sc->node, sc); callout_handle_init(&sc->handle); - sc->xmitq.ifq_maxlen = IFQ_MAXLEN; - sc->xmitq_hipri.ifq_maxlen = IFQ_MAXLEN; + sc->xmitq.ifq_maxlen = ifqmaxlen; + sc->xmitq_hipri.ifq_maxlen = ifqmaxlen; mtx_init(&sc->xmitq.ifq_mtx, "ar_xmitq", NULL, MTX_DEF); mtx_init(&sc->xmitq_hipri.ifq_mtx, "ar_xmitq_hipri", NULL, MTX_DEF); Modified: stable/7/sys/dev/arl/if_arl.c ============================================================================== --- stable/7/sys/dev/arl/if_arl.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/arl/if_arl.c Tue Nov 16 04:40:03 2010 (r215368) @@ -227,7 +227,7 @@ arl_attach(dev) ifp->if_ioctl = arl_ioctl; ifp->if_watchdog = arl_watchdog; ifp->if_init = arl_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_baudrate = 2000000; ifp->if_timer = 0; Modified: stable/7/sys/dev/ath/if_ath.c ============================================================================== --- stable/7/sys/dev/ath/if_ath.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ath/if_ath.c Tue Nov 16 04:40:03 2010 (r215368) @@ -495,8 +495,8 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_watchdog = ath_watchdog; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/awi/awi.c ============================================================================== --- stable/7/sys/dev/awi/awi.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/awi/awi.c Tue Nov 16 04:40:03 2010 (r215368) @@ -295,7 +295,7 @@ awi_attach(struct awi_softc *sc) #endif #ifdef __FreeBSD__ ifp->if_init = awi_init0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); #endif Modified: stable/7/sys/dev/ce/if_ce.c ============================================================================== --- stable/7/sys/dev/ce/if_ce.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ce/if_ce.c Tue Nov 16 04:40:03 2010 (r215368) @@ -727,9 +727,9 @@ static int ce_attach (device_t dev) #endif continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); @@ -763,7 +763,7 @@ static int ce_attach (device_t dev) d->ifp->if_start = ce_ifstart; d->ifp->if_watchdog = ce_ifwatchdog; d->ifp->if_init = ce_initialize; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); #endif Modified: stable/7/sys/dev/cm/smc90cx6.c ============================================================================== --- stable/7/sys/dev/cm/smc90cx6.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cm/smc90cx6.c Tue Nov 16 04:40:03 2010 (r215368) @@ -197,7 +197,7 @@ cm_attach(dev) ifp->if_watchdog = cm_watchdog; ifp->if_init = cm_init; /* XXX IFQ_SET_READY(&ifp->if_snd); */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_timer = 0; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; Modified: stable/7/sys/dev/cnw/if_cnw.c ============================================================================== --- stable/7/sys/dev/cnw/if_cnw.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cnw/if_cnw.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1666,7 +1666,7 @@ static int cnw_pccard_attach(device_t de ifp->if_watchdog = cnw_watchdog; ifp->if_init = cnw_freebsd_init; ifp->if_baudrate = 1 * 1000* 1000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; cnw_freebsd_init(sc); cnw_stop(sc); Modified: stable/7/sys/dev/cp/if_cp.c ============================================================================== --- stable/7/sys/dev/cp/if_cp.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cp/if_cp.c Tue Nov 16 04:40:03 2010 (r215368) @@ -521,8 +521,8 @@ static int cp_attach (device_t dev) NG_NODE_UNREF (d->node); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cp_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, Modified: stable/7/sys/dev/cs/if_cs.c ============================================================================== --- stable/7/sys/dev/cs/if_cs.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cs/if_cs.c Tue Nov 16 04:40:03 2010 (r215368) @@ -602,7 +602,7 @@ cs_attach(device_t dev) ifp->if_ioctl=cs_ioctl; ifp->if_watchdog=cs_watchdog; ifp->if_init=cs_init; - ifp->if_snd.ifq_maxlen= IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen= ifqmaxlen; /* * MIB DATA */ Modified: stable/7/sys/dev/ctau/if_ct.c ============================================================================== --- stable/7/sys/dev/ctau/if_ct.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ctau/if_ct.c Tue Nov 16 04:40:03 2010 (r215368) @@ -737,8 +737,8 @@ static int ct_attach (device_t dev) ct_bus_dma_mem_free (&d->dmamem); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, Modified: stable/7/sys/dev/cx/if_cx.c ============================================================================== --- stable/7/sys/dev/cx/if_cx.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cx/if_cx.c Tue Nov 16 04:40:03 2010 (r215368) @@ -845,8 +845,8 @@ static int cx_attach (device_t dev) cx_bus_dma_mem_free (&d->dmamem); continue; } - d->lo_queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->lo_queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->lo_queue.ifq_mtx, "cx_queue_lo", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cx_queue_hi", NULL, MTX_DEF); callout_init (&d->timeout_handle, Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/cxgb/cxgb_main.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1075,7 +1075,7 @@ cxgb_port_attach(device_t dev) ifp->if_timer = 0; /* Disable ifnet watchdog */ ifp->if_watchdog = NULL; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; + ifp->if_snd.ifq_drv_maxlen = max(cxgb_snd_queue_len, ifqmaxlen); IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: stable/7/sys/dev/ed/if_ed.c ============================================================================== --- stable/7/sys/dev/ed/if_ed.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ed/if_ed.c Tue Nov 16 04:40:03 2010 (r215368) @@ -289,8 +289,8 @@ ed_attach(device_t dev) ifp->if_ioctl = ed_ioctl; ifp->if_watchdog = ed_watchdog; ifp->if_init = ed_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof sc->mibdata; Modified: stable/7/sys/dev/ep/if_ep.c ============================================================================== --- stable/7/sys/dev/ep/if_ep.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ep/if_ep.c Tue Nov 16 04:40:03 2010 (r215368) @@ -304,8 +304,8 @@ ep_attach(struct ep_softc *sc) ifp->if_ioctl = epioctl; ifp->if_watchdog = epwatchdog; ifp->if_init = epinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (!sc->epb.mii_trans) { Modified: stable/7/sys/dev/ex/if_ex.c ============================================================================== --- stable/7/sys/dev/ex/if_ex.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ex/if_ex.c Tue Nov 16 04:40:03 2010 (r215368) @@ -238,7 +238,7 @@ ex_attach(device_t dev) ifp->if_ioctl = ex_ioctl; ifp->if_watchdog = ex_watchdog; ifp->if_init = ex_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifmedia_init(&sc->ifmedia, 0, ex_ifmedia_upd, ex_ifmedia_sts); Modified: stable/7/sys/dev/ie/if_ie.c ============================================================================== --- stable/7/sys/dev/ie/if_ie.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ie/if_ie.c Tue Nov 16 04:40:03 2010 (r215368) @@ -319,7 +319,7 @@ ie_attach(device_t dev) ifp->if_start = iestart; ifp->if_ioctl = ieioctl; ifp->if_init = ieinit; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if (sc->hard_type == IE_EE16) EVENTHANDLER_REGISTER(shutdown_post_sync, ee16_shutdown, Modified: stable/7/sys/dev/iicbus/if_ic.c ============================================================================== --- stable/7/sys/dev/iicbus/if_ic.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/iicbus/if_ic.c Tue Nov 16 04:40:03 2010 (r215368) @@ -146,7 +146,7 @@ icattach(device_t dev) ifp->if_output = icoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); Modified: stable/7/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/7/sys/dev/ipw/if_ipw.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ipw/if_ipw.c Tue Nov 16 04:40:03 2010 (r215368) @@ -287,8 +287,8 @@ ipw_attach(device_t dev) ifp->if_init = ipw_init; ifp->if_ioctl = ipw_ioctl; ifp->if_start = ipw_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/7/sys/dev/iwi/if_iwi.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/iwi/if_iwi.c Tue Nov 16 04:40:03 2010 (r215368) @@ -368,8 +368,8 @@ iwi_attach(device_t dev) ifp->if_init = iwi_init; ifp->if_ioctl = iwi_ioctl; ifp->if_start = iwi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_wme.wme_update = iwi_wme_update; Modified: stable/7/sys/dev/le/lance.c ============================================================================== --- stable/7/sys/dev/le/lance.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/le/lance.c Tue Nov 16 04:40:03 2010 (r215368) @@ -133,8 +133,8 @@ lance_config(struct lance_softc *sc, con ifp->if_flags &= ~IFF_MULTICAST; #endif ifp->if_baudrate = IF_Mbps(10); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Initialize ifmedia structures. */ Modified: stable/7/sys/dev/malo/if_malo.c ============================================================================== --- stable/7/sys/dev/malo/if_malo.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/malo/if_malo.c Tue Nov 16 04:40:03 2010 (r215368) @@ -243,8 +243,8 @@ malo_attach(uint16_t devid, struct malo_ ifp->if_watchdog = malo_watchdog; ifp->if_ioctl = malo_ioctl; ifp->if_init = malo_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* NB: firmware looks that it does not export regdomain info API. */ Modified: stable/7/sys/dev/my/if_my.c ============================================================================== --- stable/7/sys/dev/my/if_my.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/my/if_my.c Tue Nov 16 04:40:03 2010 (r215368) @@ -889,8 +889,8 @@ my_attach(device_t dev) ifp->if_watchdog = my_watchdog; ifp->if_init = my_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (sc->my_info->my_did == MTD803ID) Modified: stable/7/sys/dev/nxge/if_nxge.c ============================================================================== --- stable/7/sys/dev/nxge/if_nxge.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/nxge/if_nxge.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1190,7 +1190,7 @@ xge_interface_setup(device_t dev) ifnetp->if_start = xge_send; /* TODO: Check and assign optimal value */ - ifnetp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifnetp->if_snd.ifq_maxlen = ifqmaxlen; ifnetp->if_capabilities = IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM; Modified: stable/7/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- stable/7/sys/dev/pdq/pdq_ifsubr.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/pdq/pdq_ifsubr.c Tue Nov 16 04:40:03 2010 (r215368) @@ -423,7 +423,7 @@ pdq_ifattach(pdq_softc_t *sc, const pdq_ ifp->if_softc = sc; ifp->if_init = (if_init_f_t *)pdq_ifinit; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST; ifp->if_watchdog = pdq_ifwatchdog; Modified: stable/7/sys/dev/ppbus/if_plip.c ============================================================================== --- stable/7/sys/dev/ppbus/if_plip.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ppbus/if_plip.c Tue Nov 16 04:40:03 2010 (r215368) @@ -248,7 +248,7 @@ lp_attach (device_t dev) ifp->if_output = lpoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: stable/7/sys/dev/ral/rt2560.c ============================================================================== --- stable/7/sys/dev/ral/rt2560.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ral/rt2560.c Tue Nov 16 04:40:03 2010 (r215368) @@ -261,8 +261,8 @@ rt2560_attach(device_t dev, int id) ifp->if_init = rt2560_init; ifp->if_ioctl = rt2560_ioctl; ifp->if_start = rt2560_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/ral/rt2661.c ============================================================================== --- stable/7/sys/dev/ral/rt2661.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ral/rt2661.c Tue Nov 16 04:40:03 2010 (r215368) @@ -285,8 +285,8 @@ rt2661_attach(device_t dev, int id) ifp->if_init = rt2661_init; ifp->if_ioctl = rt2661_ioctl; ifp->if_start = rt2661_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/ray/if_ray.c ============================================================================== --- stable/7/sys/dev/ray/if_ray.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/ray/if_ray.c Tue Nov 16 04:40:03 2010 (r215368) @@ -534,7 +534,7 @@ ray_attach(device_t dev) ifp->if_ioctl = ray_ioctl; ifp->if_watchdog = ray_watchdog; ifp->if_init = ray_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ether_ifattach(ifp, ep->e_station_addr); Modified: stable/7/sys/dev/sbni/if_sbni.c ============================================================================== --- stable/7/sys/dev/sbni/if_sbni.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/sbni/if_sbni.c Tue Nov 16 04:40:03 2010 (r215368) @@ -235,7 +235,7 @@ sbni_attach(struct sbni_softc *sc, int u ifp->if_start = sbni_start; ifp->if_ioctl = sbni_ioctl; ifp->if_watchdog = sbni_watchdog; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* report real baud rate */ csr0 = sbni_inb(sc, CSR0); Modified: stable/7/sys/dev/sbsh/if_sbsh.c ============================================================================== --- stable/7/sys/dev/sbsh/if_sbsh.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/sbsh/if_sbsh.c Tue Nov 16 04:40:03 2010 (r215368) @@ -288,7 +288,7 @@ sbsh_attach(device_t dev) ifp->if_watchdog = sbsh_watchdog; ifp->if_init = sbsh_init; ifp->if_baudrate = 4600000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ether_ifattach(ifp, eaddr); Modified: stable/7/sys/dev/sn/if_sn.c ============================================================================== --- stable/7/sys/dev/sn/if_sn.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/sn/if_sn.c Tue Nov 16 04:40:03 2010 (r215368) @@ -205,8 +205,8 @@ sn_attach(device_t dev) ifp->if_watchdog = snwatchdog; ifp->if_init = sninit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; Modified: stable/7/sys/dev/snc/dp83932.c ============================================================================== --- stable/7/sys/dev/snc/dp83932.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/snc/dp83932.c Tue Nov 16 04:40:03 2010 (r215368) @@ -186,7 +186,7 @@ sncconfig(sc, media, nmedia, defmedia, m ifp->if_watchdog = sncwatchdog; ifp->if_init = sncinit; ifp->if_mtu = ETHERMTU; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* Initialize media goo. */ ifmedia_init(&sc->sc_media, 0, snc_mediachange, Modified: stable/7/sys/dev/sr/if_sr.c ============================================================================== --- stable/7/sys/dev/sr/if_sr.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/sr/if_sr.c Tue Nov 16 04:40:03 2010 (r215368) @@ -440,8 +440,8 @@ sr_attach(device_t device) } NG_NODE_SET_PRIVATE(sc->node, sc); callout_handle_init(&sc->handle); - sc->xmitq.ifq_maxlen = IFQ_MAXLEN; - sc->xmitq_hipri.ifq_maxlen = IFQ_MAXLEN; + sc->xmitq.ifq_maxlen = ifqmaxlen; + sc->xmitq_hipri.ifq_maxlen = ifqmaxlen; mtx_init(&sc->xmitq.ifq_mtx, "sr_xmitq", NULL, MTX_DEF); mtx_init(&sc->xmitq_hipri.ifq_mtx, "sr_xmitq_hipri", NULL, MTX_DEF); Modified: stable/7/sys/dev/usb/if_aue.c ============================================================================== --- stable/7/sys/dev/usb/if_aue.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_aue.c Tue Nov 16 04:40:03 2010 (r215368) @@ -724,8 +724,8 @@ aue_attach(device_t self) ifp->if_ioctl = aue_ioctl; ifp->if_start = aue_start; ifp->if_init = aue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Modified: stable/7/sys/dev/usb/if_axe.c ============================================================================== --- stable/7/sys/dev/usb/if_axe.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_axe.c Tue Nov 16 04:40:03 2010 (r215368) @@ -653,8 +653,8 @@ device_printf(sc->axe_dev, "%s, bufsz %d ifp->if_start = axe_start; ifp->if_watchdog = axe_watchdog; ifp->if_init = axe_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); error = mii_attach(self, &sc->axe_miibus, ifp, axe_ifmedia_upd, Modified: stable/7/sys/dev/usb/if_cdce.c ============================================================================== --- stable/7/sys/dev/usb/if_cdce.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_cdce.c Tue Nov 16 04:40:03 2010 (r215368) @@ -322,7 +322,7 @@ cdce_attach(device_t self) ifp->if_start = cdce_start; ifp->if_init = cdce_init; ifp->if_baudrate = 11000000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; sc->q.ifp = ifp; sc->q.if_rxstart = cdce_rxstart; Modified: stable/7/sys/dev/usb/if_cue.c ============================================================================== --- stable/7/sys/dev/usb/if_cue.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_cue.c Tue Nov 16 04:40:03 2010 (r215368) @@ -501,7 +501,7 @@ cue_attach(device_t self) ifp->if_watchdog = cue_watchdog; ifp->if_init = cue_init; ifp->if_baudrate = 10000000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; sc->cue_qdat.ifp = ifp; sc->cue_qdat.if_rxstart = cue_rxstart; Modified: stable/7/sys/dev/usb/if_kue.c ============================================================================== --- stable/7/sys/dev/usb/if_kue.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_kue.c Tue Nov 16 04:40:03 2010 (r215368) @@ -488,7 +488,7 @@ kue_attach(device_t self) ifp->if_watchdog = kue_watchdog; ifp->if_init = kue_init; ifp->if_baudrate = 10000000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; sc->kue_qdat.ifp = ifp; sc->kue_qdat.if_rxstart = kue_rxstart; Modified: stable/7/sys/dev/usb/if_rue.c ============================================================================== --- stable/7/sys/dev/usb/if_rue.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_rue.c Tue Nov 16 04:40:03 2010 (r215368) @@ -664,7 +664,7 @@ rue_attach(device_t self) ifp->if_start = rue_start; ifp->if_watchdog = rue_watchdog; ifp->if_init = rue_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* * MII setup Modified: stable/7/sys/dev/usb/if_rum.c ============================================================================== --- stable/7/sys/dev/usb/if_rum.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_rum.c Tue Nov 16 04:40:03 2010 (r215368) @@ -482,8 +482,8 @@ rum_attach(device_t self) ifp->if_init = rum_init; ifp->if_ioctl = rum_ioctl; ifp->if_start = rum_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/usb/if_udav.c ============================================================================== --- stable/7/sys/dev/usb/if_udav.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_udav.c Tue Nov 16 04:40:03 2010 (r215368) @@ -417,7 +417,7 @@ udav_attach(device_t self) ifp->if_stop = udav_stop; #endif #if defined(__FreeBSD__) - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; #endif #if defined(__NetBSD__) IFQ_SET_READY(&ifp->if_snd); Modified: stable/7/sys/dev/usb/if_ural.c ============================================================================== --- stable/7/sys/dev/usb/if_ural.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_ural.c Tue Nov 16 04:40:03 2010 (r215368) @@ -470,8 +470,8 @@ ural_attach(device_t self) ifp->if_init = ural_init; ifp->if_ioctl = ural_ioctl; ifp->if_start = ural_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/usb/if_zyd.c ============================================================================== --- stable/7/sys/dev/usb/if_zyd.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/if_zyd.c Tue Nov 16 04:40:03 2010 (r215368) @@ -307,7 +307,7 @@ zyd_attach(device_t dev) ifp->if_init = zyd_init; ifp->if_ioctl = zyd_ioctl; ifp->if_start = zyd_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); STAILQ_INIT(&sc->sc_rqh); Modified: stable/7/sys/dev/usb/udbp.c ============================================================================== --- stable/7/sys/dev/usb/udbp.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/usb/udbp.c Tue Nov 16 04:40:03 2010 (r215368) @@ -387,8 +387,8 @@ udbp_attach(device_t self) goto bad; } else { NG_NODE_SET_PRIVATE(sc->node, sc); - sc->xmitq.ifq_maxlen = IFQ_MAXLEN; - sc->xmitq_hipri.ifq_maxlen = IFQ_MAXLEN; + sc->xmitq.ifq_maxlen = ifqmaxlen; + sc->xmitq_hipri.ifq_maxlen = ifqmaxlen; mtx_init(&sc->xmitq.ifq_mtx, "usb_xmitq", NULL, MTX_DEF); mtx_init(&sc->xmitq_hipri.ifq_mtx, Modified: stable/7/sys/dev/vx/if_vx.c ============================================================================== --- stable/7/sys/dev/vx/if_vx.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/vx/if_vx.c Tue Nov 16 04:40:03 2010 (r215368) @@ -188,7 +188,7 @@ vx_attach(device_t dev) } ifp->if_mtu = ETHERMTU; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = vx_start; ifp->if_ioctl = vx_ioctl; Modified: stable/7/sys/dev/wi/if_wi.c ============================================================================== --- stable/7/sys/dev/wi/if_wi.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/wi/if_wi.c Tue Nov 16 04:40:03 2010 (r215368) @@ -328,8 +328,8 @@ wi_attach(device_t dev) ifp->if_ioctl = wi_ioctl; ifp->if_start = wi_start; ifp->if_init = wi_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: stable/7/sys/dev/wl/if_wl.c ============================================================================== --- stable/7/sys/dev/wl/if_wl.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/wl/if_wl.c Tue Nov 16 04:40:03 2010 (r215368) @@ -560,7 +560,7 @@ wlattach(device_t device) ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; ifp->if_timer = 0; /* paranoia */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* no entries ifp->if_watchdog ifp->if_done Modified: stable/7/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/7/sys/dev/wpi/if_wpi.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/wpi/if_wpi.c Tue Nov 16 04:40:03 2010 (r215368) @@ -660,8 +660,8 @@ wpi_attach(device_t dev) ifp->if_init = wpi_init; ifp->if_ioctl = wpi_ioctl; ifp->if_start = wpi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic); Modified: stable/7/sys/dev/xe/if_xe.c ============================================================================== --- stable/7/sys/dev/xe/if_xe.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/dev/xe/if_xe.c Tue Nov 16 04:40:03 2010 (r215368) @@ -245,7 +245,7 @@ xe_attach (device_t dev) scp->ifp->if_watchdog = xe_watchdog; scp->ifp->if_init = xe_init; scp->ifp->if_baudrate = 100000000; - scp->ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + scp->ifp->if_snd.ifq_maxlen = ifqmaxlen; /* Initialise the ifmedia structure */ ifmedia_init(scp->ifm, 0, xe_media_change, xe_media_status); Modified: stable/7/sys/i4b/capi/capi_l4if.c ============================================================================== --- stable/7/sys/i4b/capi/capi_l4if.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/capi/capi_l4if.c Tue Nov 16 04:40:03 2010 (r215368) @@ -93,13 +93,13 @@ i4b_capi_bch_config(int unit, int chan, capi_softc_t *sc = capi_sc[unit]; i4b_Bcleanifq(&sc->sc_bchan[chan].tx_queue); - sc->sc_bchan[chan].tx_queue.ifq_maxlen = IFQ_MAXLEN; + sc->sc_bchan[chan].tx_queue.ifq_maxlen = ifqmaxlen; sc->sc_bchan[chan].txcount = 0; /* The telephony drivers use rx_queue for receive. */ i4b_Bcleanifq(&sc->sc_bchan[chan].rx_queue); - sc->sc_bchan[chan].rx_queue.ifq_maxlen = IFQ_MAXLEN; + sc->sc_bchan[chan].rx_queue.ifq_maxlen = ifqmaxlen; sc->sc_bchan[chan].rxcount = 0; /* HDLC frames are put to in_mbuf */ @@ -235,8 +235,8 @@ capi_ll_attach(capi_softc_t *sc) memset(&sc->sc_bchan[i].tx_queue, 0, sizeof(struct ifqueue)); memset(&sc->sc_bchan[i].rx_queue, 0, sizeof(struct ifqueue)); - sc->sc_bchan[i].tx_queue.ifq_maxlen = IFQ_MAXLEN; - sc->sc_bchan[i].rx_queue.ifq_maxlen = IFQ_MAXLEN; + sc->sc_bchan[i].tx_queue.ifq_maxlen = ifqmaxlen; + sc->sc_bchan[i].rx_queue.ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&sc->sc_bchan[i].tx_queue.ifq_mtx)) mtx_init(&sc->sc_bchan[i].tx_queue.ifq_mtx, "i4b_capi_tx", NULL, MTX_DEF); Modified: stable/7/sys/i4b/driver/i4b_ing.c ============================================================================== --- stable/7/sys/i4b/driver/i4b_ing.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/driver/i4b_ing.c Tue Nov 16 04:40:03 2010 (r215368) @@ -281,8 +281,8 @@ i4bingattach(void *dummy) NG_NODE_SET_PRIVATE(sc->node, sc); - sc->xmitq.ifq_maxlen = IFQ_MAXLEN; - sc->xmitq_hipri.ifq_maxlen = IFQ_MAXLEN; + sc->xmitq.ifq_maxlen = ifqmaxlen; + sc->xmitq_hipri.ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&sc->xmitq.ifq_mtx)) mtx_init(&sc->xmitq.ifq_mtx, "i4b_ing_xmitq", NULL, MTX_DEF); if(!mtx_initialized(&sc->xmitq_hipri.ifq_mtx)) Modified: stable/7/sys/i4b/driver/i4b_isppp.c ============================================================================== --- stable/7/sys/i4b/driver/i4b_isppp.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/driver/i4b_isppp.c Tue Nov 16 04:40:03 2010 (r215368) @@ -187,7 +187,7 @@ i4bispppattach(void *dummy) ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_ipackets = 0; ifp->if_ierrors = 0; Modified: stable/7/sys/i4b/driver/i4b_trace.c ============================================================================== --- stable/7/sys/i4b/driver/i4b_trace.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/driver/i4b_trace.c Tue Nov 16 04:40:03 2010 (r215368) @@ -105,7 +105,7 @@ i4btrcattach(void *dummy) { make_dev(&i4btrc_cdevsw, i, UID_ROOT, GID_WHEEL, 0600, "i4btrc%d", i); - trace_queue[i].ifq_maxlen = IFQ_MAXLEN; + trace_queue[i].ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&trace_queue[i].ifq_mtx)) mtx_init(&trace_queue[i].ifq_mtx, "i4b_trace", NULL, MTX_DEF); Modified: stable/7/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c ============================================================================== --- stable/7/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1137,7 +1137,7 @@ avma1pp_bchannel_setup(int unit, int h_c /* receiver part */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */ @@ -1151,7 +1151,7 @@ avma1pp_bchannel_setup(int unit, int h_c /* transmitter part */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */ Modified: stable/7/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c ============================================================================== --- stable/7/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1084,7 +1084,7 @@ avma1pp2_bchannel_setup(int unit, int h_ /* receiver part */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */ @@ -1098,7 +1098,7 @@ avma1pp2_bchannel_setup(int unit, int h_ /* transmitter part */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */ Modified: stable/7/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c ============================================================================== --- stable/7/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1047,7 +1047,7 @@ avm_pnp_bchannel_setup(int unit, int h_c /* receiver part */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&chan->rx_queue.ifq_mtx)) @@ -1066,7 +1066,7 @@ avm_pnp_bchannel_setup(int unit, int h_c /* transmitter part */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&chan->tx_queue.ifq_mtx)) Modified: stable/7/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c ============================================================================== --- stable/7/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c Tue Nov 16 04:40:03 2010 (r215368) @@ -354,7 +354,7 @@ ihfc_init (ihfc_sc_t *sc, u_char chan, i RESET_SOFT_CHAN(sc, chan); - S_IFQUEUE.ifq_maxlen = IFQ_MAXLEN; + S_IFQUEUE.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&S_IFQUEUE.ifq_mtx)) @@ -380,7 +380,7 @@ ihfc_init (ihfc_sc_t *sc, u_char chan, i RESET_SOFT_CHAN(sc, chan); - S_IFQUEUE.ifq_maxlen = IFQ_MAXLEN; + S_IFQUEUE.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&S_IFQUEUE.ifq_mtx)) Modified: stable/7/sys/i4b/layer1/isic/i4b_bchan.c ============================================================================== --- stable/7/sys/i4b/layer1/isic/i4b_bchan.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/isic/i4b_bchan.c Tue Nov 16 04:40:03 2010 (r215368) @@ -84,7 +84,7 @@ isic_bchannel_setup(int unit, int h_chan /* receiver part */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&chan->rx_queue.ifq_mtx)) mtx_init(&chan->rx_queue.ifq_mtx, "i4b_isic_rx", NULL, MTX_DEF); @@ -101,7 +101,7 @@ isic_bchannel_setup(int unit, int h_chan /* transmitter part */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&chan->tx_queue.ifq_mtx)) mtx_init(&chan->tx_queue.ifq_mtx, "i4b_isic_tx", NULL, MTX_DEF); Modified: stable/7/sys/i4b/layer1/itjc/i4b_itjc_pci.c ============================================================================== --- stable/7/sys/i4b/layer1/itjc/i4b_itjc_pci.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/itjc/i4b_itjc_pci.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1858,7 +1858,7 @@ itjc_bchannel_setup(int unit, int h_chan i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; chan->rxcount = 0; /* reset rx counter */ @@ -1872,7 +1872,7 @@ itjc_bchannel_setup(int unit, int h_chan i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; chan->txcount = 0; /* reset tx counter */ Modified: stable/7/sys/i4b/layer1/iwic/i4b_iwic_bchan.c ============================================================================== --- stable/7/sys/i4b/layer1/iwic/i4b_iwic_bchan.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer1/iwic/i4b_iwic_bchan.c Tue Nov 16 04:40:03 2010 (r215368) @@ -428,7 +428,7 @@ iwic_bchannel_setup(int unit, int chan_n /* receiver part */ - chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->rx_queue.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&chan->rx_queue.ifq_mtx)) @@ -447,7 +447,7 @@ iwic_bchannel_setup(int unit, int chan_n /* transmitter part */ - chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; + chan->tx_queue.ifq_maxlen = ifqmaxlen; #if defined (__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&chan->tx_queue.ifq_mtx)) Modified: stable/7/sys/i4b/layer4/i4b_i4bdrv.c ============================================================================== --- stable/7/sys/i4b/layer4/i4b_i4bdrv.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/i4b/layer4/i4b_i4bdrv.c Tue Nov 16 04:40:03 2010 (r215368) @@ -96,7 +96,7 @@ i4battach(void *dummy) { printf("i4b: ISDN call control device attached\n"); - i4b_rdqueue.ifq_maxlen = IFQ_MAXLEN; + i4b_rdqueue.ifq_maxlen = ifqmaxlen; if(!mtx_initialized(&i4b_rdqueue.ifq_mtx)) mtx_init(&i4b_rdqueue.ifq_mtx, "i4b_rdqueue", NULL, MTX_DEF); Modified: stable/7/sys/net/if.c ============================================================================== --- stable/7/sys/net/if.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if.c Tue Nov 16 04:40:03 2010 (r215368) @@ -89,6 +89,10 @@ static int slowtimo_started; SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); +TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); +SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, + &ifqmaxlen, 0, "max send queue size"); + /* Log link state change events */ static int log_link_state_change = 1; Modified: stable/7/sys/net/if_ef.c ============================================================================== --- stable/7/sys/net/if_ef.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if_ef.c Tue Nov 16 04:40:03 2010 (r215368) @@ -130,7 +130,7 @@ ef_attach(struct efnet *sc) ifp->if_start = ef_start; ifp->if_watchdog = NULL; ifp->if_init = ef_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); /* * Attach the interface Modified: stable/7/sys/net/if_gif.c ============================================================================== --- stable/7/sys/net/if_gif.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if_gif.c Tue Nov 16 04:40:03 2010 (r215368) @@ -182,7 +182,7 @@ gif_clone_create(ifc, unit, params) GIF2IFP(sc)->if_ioctl = gif_ioctl; GIF2IFP(sc)->if_start = gif_start; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) Modified: stable/7/sys/net/if_gre.c ============================================================================== --- stable/7/sys/net/if_gre.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if_gre.c Tue Nov 16 04:40:03 2010 (r215368) @@ -190,7 +190,7 @@ gre_clone_create(ifc, unit, params) GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), ifc->ifc_name, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; GRE2IFP(sc)->if_addrlen = 0; GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ GRE2IFP(sc)->if_mtu = GREMTU; Modified: stable/7/sys/net/if_ppp.c ============================================================================== --- stable/7/sys/net/if_ppp.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if_ppp.c Tue Nov 16 04:40:03 2010 (r215368) @@ -228,10 +228,10 @@ ppp_clone_create(struct if_clone *ifc, i ifp->if_hdrlen = PPP_HDRLEN; ifp->if_ioctl = pppsioctl; ifp->if_output = pppoutput; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - sc->sc_inq.ifq_maxlen = IFQ_MAXLEN; - sc->sc_fastq.ifq_maxlen = IFQ_MAXLEN; - sc->sc_rawq.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; + sc->sc_inq.ifq_maxlen = ifqmaxlen; + sc->sc_fastq.ifq_maxlen = ifqmaxlen; + sc->sc_rawq.ifq_maxlen = ifqmaxlen; mtx_init(&sc->sc_inq.ifq_mtx, "ppp_inq", NULL, MTX_DEF); mtx_init(&sc->sc_fastq.ifq_mtx, "ppp_fastq", NULL, MTX_DEF); mtx_init(&sc->sc_rawq.ifq_mtx, "ppp_rawq", NULL, MTX_DEF); Modified: stable/7/sys/net/if_stf.c ============================================================================== --- stable/7/sys/net/if_stf.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/net/if_stf.c Tue Nov 16 04:40:03 2010 (r215368) @@ -252,7 +252,7 @@ stf_clone_create(struct if_clone *ifc, c ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl; ifp->if_output = stf_output; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); return (0); Modified: stable/7/sys/netatalk/ddp_usrreq.c ============================================================================== --- stable/7/sys/netatalk/ddp_usrreq.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/netatalk/ddp_usrreq.c Tue Nov 16 04:40:03 2010 (r215368) @@ -256,9 +256,9 @@ void ddp_init(void) { - atintrq1.ifq_maxlen = IFQ_MAXLEN; - atintrq2.ifq_maxlen = IFQ_MAXLEN; - aarpintrq.ifq_maxlen = IFQ_MAXLEN; + atintrq1.ifq_maxlen = ifqmaxlen; + atintrq2.ifq_maxlen = ifqmaxlen; + aarpintrq.ifq_maxlen = ifqmaxlen; mtx_init(&atintrq1.ifq_mtx, "at1_inq", NULL, MTX_DEF); mtx_init(&atintrq2.ifq_mtx, "at2_inq", NULL, MTX_DEF); mtx_init(&aarpintrq.ifq_mtx, "aarp_inq", NULL, MTX_DEF); Modified: stable/7/sys/netgraph/ng_eiface.c ============================================================================== --- stable/7/sys/netgraph/ng_eiface.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/netgraph/ng_eiface.c Tue Nov 16 04:40:03 2010 (r215368) @@ -364,7 +364,7 @@ ng_eiface_constructor(node_p node) ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; ifp->if_watchdog = NULL; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); #if 0 Modified: stable/7/sys/netgraph/ng_fec.c ============================================================================== --- stable/7/sys/netgraph/ng_fec.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/netgraph/ng_fec.c Tue Nov 16 04:40:03 2010 (r215368) @@ -1227,7 +1227,7 @@ ng_fec_constructor(node_p node) ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; ifp->if_watchdog = NULL; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); ifp->if_addrlen = 0; /* XXX */ Modified: stable/7/sys/netgraph/ng_iface.c ============================================================================== --- stable/7/sys/netgraph/ng_iface.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/netgraph/ng_iface.c Tue Nov 16 04:40:03 2010 (r215368) @@ -560,8 +560,8 @@ ng_iface_constructor(node_p node) ifp->if_addrlen = 0; /* XXX */ ifp->if_hdrlen = 0; /* XXX */ ifp->if_baudrate = 64000; /* XXX */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Give this node the same name as the interface (if possible) */ Modified: stable/7/sys/netgraph/ng_tty.c ============================================================================== --- stable/7/sys/netgraph/ng_tty.c Tue Nov 16 03:43:06 2010 (r215367) +++ stable/7/sys/netgraph/ng_tty.c Tue Nov 16 04:40:03 2010 (r215368) @@ -202,7 +202,7 @@ ngt_open(struct cdev *dev, struct tty *t sc->tp = tp; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 04:40:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07B011065704; Tue, 16 Nov 2010 04:40:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA22A8FC12; Tue, 16 Nov 2010 04:40: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 oAG4eRA0039535; Tue, 16 Nov 2010 04:40:27 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG4eRr9039533; Tue, 16 Nov 2010 04:40:27 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160440.oAG4eRr9039533@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 04:40: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: r215369 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 04:40:28 -0000 Author: alc Date: Tue Nov 16 04:40:27 2010 New Revision: 215369 URL: http://svn.freebsd.org/changeset/base/215369 Log: MFC r214953 In case the stack size reaches its limit and its growth must be restricted, ensure that grow_amount is a multiple of the page size. Otherwise, the kernel may crash in swap_reserve_by_uid() on HEAD and FreeBSD 8.x, and produce a core file with a missing stack on FreeBSD 7.x. Modified: stable/8/sys/vm/vm_map.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_map.c ============================================================================== --- stable/8/sys/vm/vm_map.c Tue Nov 16 04:40:03 2010 (r215368) +++ stable/8/sys/vm/vm_map.c Tue Nov 16 04:40:27 2010 (r215369) @@ -3343,7 +3343,8 @@ Retry: if (grow_amount > stack_entry->avail_ssize) grow_amount = stack_entry->avail_ssize; if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { - grow_amount = stacklim - ctob(vm->vm_ssize); + grow_amount = trunc_page((vm_size_t)stacklim) - + ctob(vm->vm_ssize); } /* If we would blow our VMEM resource limit, no go */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 04:51:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4879106566B; Tue, 16 Nov 2010 04:51:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 934E48FC08; Tue, 16 Nov 2010 04:51: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 oAG4p7r7039858; Tue, 16 Nov 2010 04:51:07 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG4p7d8039856; Tue, 16 Nov 2010 04:51:07 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160451.oAG4p7d8039856@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 04:51: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: r215370 - stable/7/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: Tue, 16 Nov 2010 04:51:07 -0000 Author: alc Date: Tue Nov 16 04:51:07 2010 New Revision: 215370 URL: http://svn.freebsd.org/changeset/base/215370 Log: MFC r214953 In case the stack size reaches its limit and its growth must be restricted, ensure that grow_amount is a multiple of the page size. Otherwise, the kernel may crash in swap_reserve_by_uid() on HEAD and FreeBSD 8.x, and produce a core file with a missing stack on FreeBSD 7.x. Modified: stable/7/sys/vm/vm_map.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/vm/vm_map.c ============================================================================== --- stable/7/sys/vm/vm_map.c Tue Nov 16 04:40:27 2010 (r215369) +++ stable/7/sys/vm/vm_map.c Tue Nov 16 04:51:07 2010 (r215370) @@ -2927,7 +2927,8 @@ Retry: if (grow_amount > stack_entry->avail_ssize) grow_amount = stack_entry->avail_ssize; if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { - grow_amount = stacklim - ctob(vm->vm_ssize); + grow_amount = trunc_page((vm_size_t)stacklim) - + ctob(vm->vm_ssize); } /* If we would blow our VMEM resource limit, no go */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 05:01:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29CD3106564A; Tue, 16 Nov 2010 05:01:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1F558FC0C; Tue, 16 Nov 2010 05:01: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 oAG51RGl040125; Tue, 16 Nov 2010 05:01:27 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG51Re5040123; Tue, 16 Nov 2010 05:01:27 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160501.oAG51Re5040123@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 05:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215371 - stable/7/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 05:01:28 -0000 Author: alc Date: Tue Nov 16 05:01:27 2010 New Revision: 215371 URL: http://svn.freebsd.org/changeset/base/215371 Log: MFC r214938 Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on superpage promotion or demotion. Micro-optimize pmap_kenter_pde(). Modified: stable/7/sys/i386/i386/pmap.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/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Nov 16 04:51:07 2010 (r215370) +++ stable/7/sys/i386/i386/pmap.c Tue Nov 16 05:01:27 2010 (r215371) @@ -1639,11 +1639,19 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return pmap_unwire_pte_hold(pmap, mpte, free); } +/* + * Initialize the pmap for the swapper process. + */ void pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); + /* + * Since the page table directory is shared with the kernel pmap, + * which is already included in the list "allpmaps", this pmap does + * not need to be inserted into that list. + */ pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); #ifdef PAE pmap->pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT); @@ -1653,9 +1661,6 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); - mtx_lock_spin(&allpmaps_lock); - LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); } /* @@ -1720,9 +1725,9 @@ pmap_pinit(pmap_t pmap) mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); - /* Wire in kernel global address entries. */ + /* Copy the kernel page table directory entries. */ bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); + mtx_unlock_spin(&allpmaps_lock); /* install self-referential address mapping entry(s) */ for (i = 0; i < NPGPTD; i++) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 05:06:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43311065679; Tue, 16 Nov 2010 05:06:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985F28FC15; Tue, 16 Nov 2010 05:06: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 oAG56Kxw040265; Tue, 16 Nov 2010 05:06:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG56K99040263; Tue, 16 Nov 2010 05:06:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160506.oAG56K99040263@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 05:06: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: r215372 - stable/8/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 05:06:20 -0000 Author: alc Date: Tue Nov 16 05:06:20 2010 New Revision: 215372 URL: http://svn.freebsd.org/changeset/base/215372 Log: MFC r214938 Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on superpage promotion or demotion. Micro-optimize pmap_kenter_pde(). Modified: stable/8/sys/i386/i386/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:01:27 2010 (r215371) +++ stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:06:20 2010 (r215372) @@ -1649,11 +1649,19 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return pmap_unwire_pte_hold(pmap, mpte, free); } +/* + * Initialize the pmap for the swapper process. + */ void pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); + /* + * Since the page table directory is shared with the kernel pmap, + * which is already included in the list "allpmaps", this pmap does + * not need to be inserted into that list. + */ pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); #ifdef PAE pmap->pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT); @@ -1663,9 +1671,6 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); - mtx_lock_spin(&allpmaps_lock); - LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); } /* @@ -1730,9 +1735,9 @@ pmap_pinit(pmap_t pmap) mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); - /* Wire in kernel global address entries. */ + /* Copy the kernel page table directory entries. */ bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); + mtx_unlock_spin(&allpmaps_lock); /* install self-referential address mapping entry(s) */ for (i = 0; i < NPGPTD; i++) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 05:46:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A219106566B; Tue, 16 Nov 2010 05:46:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379158FC0C; Tue, 16 Nov 2010 05:46: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 oAG5ka82041158; Tue, 16 Nov 2010 05:46:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG5kaS7041154; Tue, 16 Nov 2010 05:46:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160546.oAG5kaS7041154@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 05:46: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: r215373 - in stable/8/sys/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: Tue, 16 Nov 2010 05:46:36 -0000 Author: alc Date: Tue Nov 16 05:46:35 2010 New Revision: 215373 URL: http://svn.freebsd.org/changeset/base/215373 Log: MFC r213455 Initialize KPTmap in locore so that vm86.c can call vtophys() (or really pmap_kextract()) before pmap_bootstrap() is called. Document the set of pmap functions that may be called before pmap_bootstrap() is called. Modified: stable/8/sys/i386/i386/locore.s stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/include/pmap.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/locore.s ============================================================================== --- stable/8/sys/i386/i386/locore.s Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/i386/locore.s Tue Nov 16 05:46:35 2010 (r215373) @@ -104,6 +104,9 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif + .globl KPTmap +KPTmap: .long 0 /* address of kernel page tables */ + .globl KPTphys KPTphys: .long 0 /* phys addr of kernel page tables */ @@ -717,6 +720,8 @@ no_kernend: /* Allocate Kernel Page Tables */ ALLOCPAGES(NKPT) movl %esi,R(KPTphys) + addl $(KERNBASE-(KPTDI<<(PDRSHIFT-PAGE_SHIFT+PTESHIFT))),%esi + movl %esi,R(KPTmap) /* Allocate Page Table Directory */ #ifdef PAE @@ -780,6 +785,11 @@ no_kernend: shrl $PAGE_SHIFT,%ecx fillkptphys($PG_RW) +/* Map page table pages. */ + movl R(KPTphys),%eax + movl $NKPT,%ecx + fillkptphys($PG_RW) + /* Map page directory. */ #ifdef PAE movl R(IdlePDPT), %eax Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/i386/pmap.c Tue Nov 16 05:46:35 2010 (r215373) @@ -243,7 +243,7 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0, *KPTmap; +pt_entry_t *CMAP1 = 0; static pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t CADDR1 = 0, ptvmmap = 0; @@ -375,12 +375,11 @@ pmap_bootstrap(vm_paddr_t firstaddr) int i; /* - * XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too - * large. It should instead be correctly calculated in locore.s and - * not based on 'first' (which is a physical address, not a virtual - * address, for the start of unused physical memory). The kernel - * page tables are NOT double mapped and thus should not be included - * in this calculation. + * Initialize the first available kernel virtual address. However, + * using "firstaddr" may waste a few pages of the kernel virtual + * address space, because locore may not have mapped every physical + * page that it allocated. Preferably, locore would provide a first + * unused virtual address in addition to "firstaddr". */ virtual_avail = (vm_offset_t) KERNBASE + firstaddr; virtual_avail = pmap_kmem_choose(virtual_avail); @@ -452,6 +451,10 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * KPTmap is used by pmap_kextract(). + * + * KPTmap is first initialized by locore. However, that initial + * KPTmap can only support NKPT page table pages. Here, a larger + * KPTmap is created that can support KVA_PAGES page table pages. */ SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES) @@ -1364,6 +1367,8 @@ pmap_extract_and_hold(pmap_t pmap, vm_of /* * Add a wired page to the kva. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa) @@ -1386,6 +1391,8 @@ pmap_kenter_attr(vm_offset_t va, vm_padd /* * Remove a page from the kernel pagetables. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kremove(vm_offset_t va) Modified: stable/8/sys/i386/include/pmap.h ============================================================================== --- stable/8/sys/i386/include/pmap.h Tue Nov 16 05:06:20 2010 (r215372) +++ stable/8/sys/i386/include/pmap.h Tue Nov 16 05:46:35 2010 (r215373) @@ -191,12 +191,21 @@ extern pdpt_entry_t *IdlePDPT; extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */ /* - * virtual address to page table entry and - * to physical address. - * Note: these work recursively, thus vtopte of a pte will give - * the corresponding pde that in turn maps it. + * Translate a virtual address to the kernel virtual address of its page table + * entry (PTE). This can be used recursively. If the address of a PTE as + * previously returned by this macro is itself given as the argument, then the + * address of the page directory entry (PDE) that maps the PTE will be + * returned. + * + * This macro may be used before pmap_bootstrap() is called. */ #define vtopte(va) (PTmap + i386_btop(va)) + +/* + * Translate a virtual address to its physical address. + * + * This macro may be used before pmap_bootstrap() is called. + */ #define vtophys(va) pmap_kextract((vm_offset_t)(va)) #ifdef XEN @@ -272,14 +281,18 @@ pte_load_store_ma(pt_entry_t *ptep, pt_e * table pages, and not user page table pages, and (2) it provides access to * a kernel page table page after the corresponding virtual addresses have * been promoted to a 2/4MB page mapping. + * + * KPTmap is first initialized by locore to support just NPKT page table + * pages. Later, it is reinitialized by pmap_bootstrap() to allow for + * expansion of the kernel page table. */ extern pt_entry_t *KPTmap; /* - * Routine: pmap_kextract - * Function: - * Extract the physical page address associated - * kernel virtual address. + * Extract from the kernel page table the physical address that is mapped by + * the given virtual address "va". + * + * This function may be used before pmap_bootstrap() is called. */ static __inline vm_paddr_t pmap_kextract(vm_offset_t va) @@ -483,6 +496,11 @@ extern vm_offset_t virtual_end; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) +/* + * Only the following functions or macros may be used before pmap_bootstrap() + * is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and + * vtopte(). + */ void pmap_bootstrap(vm_paddr_t); int pmap_cache_bits(int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 06:20:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7431A106564A; Tue, 16 Nov 2010 06:20:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61DBB8FC19; Tue, 16 Nov 2010 06:20: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 oAG6KCPC041934; Tue, 16 Nov 2010 06:20:12 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG6KC5R041930; Tue, 16 Nov 2010 06:20:12 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011160620.oAG6KC5R041930@svn.freebsd.org> From: Alan Cox Date: Tue, 16 Nov 2010 06:20:12 +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: r215374 - in stable/7/sys/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: Tue, 16 Nov 2010 06:20:12 -0000 Author: alc Date: Tue Nov 16 06:20:12 2010 New Revision: 215374 URL: http://svn.freebsd.org/changeset/base/215374 Log: MFC r213455 Initialize KPTmap in locore so that vm86.c can call vtophys() (or really pmap_kextract()) before pmap_bootstrap() is called. Document the set of pmap functions that may be called before pmap_bootstrap() is called. Modified: stable/7/sys/i386/i386/locore.s stable/7/sys/i386/i386/pmap.c stable/7/sys/i386/include/pmap.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/i386/i386/locore.s ============================================================================== --- stable/7/sys/i386/i386/locore.s Tue Nov 16 05:46:35 2010 (r215373) +++ stable/7/sys/i386/i386/locore.s Tue Nov 16 06:20:12 2010 (r215374) @@ -104,6 +104,9 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif + .globl KPTmap +KPTmap: .long 0 /* address of kernel page tables */ + .globl KPTphys KPTphys: .long 0 /* phys addr of kernel page tables */ @@ -717,6 +720,8 @@ no_kernend: /* Allocate Kernel Page Tables */ ALLOCPAGES(NKPT) movl %esi,R(KPTphys) + addl $(KERNBASE-(KPTDI<<(PDRSHIFT-PAGE_SHIFT+PTESHIFT))),%esi + movl %esi,R(KPTmap) /* Allocate Page Table Directory */ #ifdef PAE @@ -780,6 +785,11 @@ no_kernend: shrl $PAGE_SHIFT,%ecx fillkptphys($PG_RW) +/* Map page table pages. */ + movl R(KPTphys),%eax + movl $NKPT,%ecx + fillkptphys($PG_RW) + /* Map page directory. */ #ifdef PAE movl R(IdlePDPT), %eax Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Nov 16 05:46:35 2010 (r215373) +++ stable/7/sys/i386/i386/pmap.c Tue Nov 16 06:20:12 2010 (r215374) @@ -241,7 +241,7 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0, *KPTmap; +pt_entry_t *CMAP1 = 0; static pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t CADDR1 = 0, ptvmmap = 0; @@ -372,12 +372,11 @@ pmap_bootstrap(vm_paddr_t firstaddr) int i; /* - * XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too - * large. It should instead be correctly calculated in locore.s and - * not based on 'first' (which is a physical address, not a virtual - * address, for the start of unused physical memory). The kernel - * page tables are NOT double mapped and thus should not be included - * in this calculation. + * Initialize the first available kernel virtual address. However, + * using "firstaddr" may waste a few pages of the kernel virtual + * address space, because locore may not have mapped every physical + * page that it allocated. Preferably, locore would provide a first + * unused virtual address in addition to "firstaddr". */ virtual_avail = (vm_offset_t) KERNBASE + firstaddr; virtual_avail = pmap_kmem_choose(virtual_avail); @@ -449,6 +448,10 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * KPTmap is used by pmap_kextract(). + * + * KPTmap is first initialized by locore. However, that initial + * KPTmap can only support NKPT page table pages. Here, a larger + * KPTmap is created that can support KVA_PAGES page table pages. */ SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES) @@ -1357,6 +1360,8 @@ pmap_extract_and_hold(pmap_t pmap, vm_of /* * Add a wired page to the kva. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kenter(vm_offset_t va, vm_paddr_t pa) @@ -1379,6 +1384,8 @@ pmap_kenter_attr(vm_offset_t va, vm_padd /* * Remove a page from the kernel pagetables. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kremove(vm_offset_t va) Modified: stable/7/sys/i386/include/pmap.h ============================================================================== --- stable/7/sys/i386/include/pmap.h Tue Nov 16 05:46:35 2010 (r215373) +++ stable/7/sys/i386/include/pmap.h Tue Nov 16 06:20:12 2010 (r215374) @@ -193,12 +193,21 @@ extern pd_entry_t *IdlePTD; /* physical #ifdef _KERNEL /* - * virtual address to page table entry and - * to physical address. - * Note: these work recursively, thus vtopte of a pte will give - * the corresponding pde that in turn maps it. + * Translate a virtual address to the kernel virtual address of its page table + * entry (PTE). This can be used recursively. If the address of a PTE as + * previously returned by this macro is itself given as the argument, then the + * address of the page directory entry (PDE) that maps the PTE will be + * returned. + * + * This macro may be used before pmap_bootstrap() is called. */ #define vtopte(va) (PTmap + i386_btop(va)) + +/* + * Translate a virtual address to its physical address. + * + * This macro may be used before pmap_bootstrap() is called. + */ #define vtophys(va) pmap_kextract((vm_offset_t)(va)) @@ -208,14 +217,18 @@ extern pd_entry_t *IdlePTD; /* physical * table pages, and not user page table pages, and (2) it provides access to * a kernel page table page after the corresponding virtual addresses have * been promoted to a 2/4MB page mapping. + * + * KPTmap is first initialized by locore to support just NPKT page table + * pages. Later, it is reinitialized by pmap_bootstrap() to allow for + * expansion of the kernel page table. */ extern pt_entry_t *KPTmap; /* - * Routine: pmap_kextract - * Function: - * Extract the physical page address associated - * kernel virtual address. + * Extract from the kernel page table the physical address that is mapped by + * the given virtual address "va". + * + * This function may be used before pmap_bootstrap() is called. */ static __inline vm_paddr_t pmap_kextract(vm_offset_t va) @@ -431,6 +444,11 @@ extern vm_offset_t virtual_end; #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) +/* + * Only the following functions or macros may be used before pmap_bootstrap() + * is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and + * vtopte(). + */ void pmap_bootstrap(vm_paddr_t); int pmap_cache_bits(int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:09:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CBA106566B; Tue, 16 Nov 2010 07:09:06 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0398FC08; Tue, 16 Nov 2010 07:09: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 oAG795Pu043017; Tue, 16 Nov 2010 07:09:05 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7955Q043013; Tue, 16 Nov 2010 07:09:05 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160709.oAG7955Q043013@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 07:09: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: r215377 - in head/sys/netinet: . cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:09:06 -0000 Author: lstewart Date: Tue Nov 16 07:09:05 2010 New Revision: 215377 URL: http://svn.freebsd.org/changeset/base/215377 Log: cc_init() should only be run once on system boot, but with VIMAGE kernels it runs on boot and each time a vnet jail is created. Running cc_init() multiple times results in a panic when attempting to initialise the cc_list lock again, and so r215166 effectively broke the use of vnet jails. Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is initialised before module registration is attempted. Sponsored by: FreeBSD Foundation Reported and tested by: Mikolaj Golub MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc.h head/sys/netinet/cc/cc.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/cc.h Tue Nov 16 07:09:05 2010 (r215377) @@ -62,7 +62,6 @@ extern struct cc_algo newreno_cc_algo; SYSCTL_DECL(_net_inet_tcp_cc); /* CC housekeeping functions. */ -void cc_init(void); int cc_register_algo(struct cc_algo *add_cc); int cc_deregister_algo(struct cc_algo *remove_cc); Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/cc/cc.c Tue Nov 16 07:09:05 2010 (r215377) @@ -176,8 +176,8 @@ cc_list_available(SYSCTL_HANDLER_ARGS) /* * Initialise CC subsystem on system boot. */ -void -cc_init() +static void +cc_init(void) { CC_LIST_LOCK_INIT(); STAILQ_INIT(&cc_list); @@ -328,6 +328,8 @@ cc_modevent(module_t mod, int event_type return (err); } +SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, cc_init, NULL); + /* Declare sysctl tree and populate it. */ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, "congestion control related settings"); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/tcp_subr.c Tue Nov 16 07:09:05 2010 (r215377) @@ -278,8 +278,6 @@ tcp_init(void) { int hashsize; - cc_init(); - hashsize = TCBHASHSIZE; TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize); if (!powerof2(hashsize)) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:16:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A122C1065672; Tue, 16 Nov 2010 07:16:40 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1898FC14; Tue, 16 Nov 2010 07:16: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 oAG7GeQ0043238; Tue, 16 Nov 2010 07:16:40 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7GeiQ043236; Tue, 16 Nov 2010 07:16:40 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160716.oAG7GeiQ043236@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215378 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:16:40 -0000 Author: brucec Date: Tue Nov 16 07:16:40 2010 New Revision: 215378 URL: http://svn.freebsd.org/changeset/base/215378 Log: MFC r215263: Add ftp4.se.freebsd.org to the set of mirrors. PR: bin/150552 Submitted by: Niclas Zeising Modified: stable/8/usr.sbin/sysinstall/menus.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/8/usr.sbin/sysinstall/menus.c Tue Nov 16 07:09:05 2010 (r215377) +++ stable/8/usr.sbin/sysinstall/menus.c Tue Nov 16 07:16:40 2010 (r215378) @@ -793,6 +793,8 @@ DMenu MenuMediaFTP = { VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, + { " Sweden #4", "ftp4.se.freebsd.org", NULL, dmenuSetVariable, NULL, + VAR_FTP_PATH "=ftp://ftp4.se.freebsd.org" }, { " Sweden #5", "ftp5.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.se.freebsd.org" }, From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:19:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7EB106567A; Tue, 16 Nov 2010 07:19:06 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CB478FC18; Tue, 16 Nov 2010 07:19: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 oAG7J6f5043323; Tue, 16 Nov 2010 07:19:06 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7J6v6043321; Tue, 16 Nov 2010 07:19:06 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160719.oAG7J6v6043321@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:19:06 +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: r215379 - stable/7/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:19:06 -0000 Author: brucec Date: Tue Nov 16 07:19:05 2010 New Revision: 215379 URL: http://svn.freebsd.org/changeset/base/215379 Log: MFC r215263: Add ftp4.se.freebsd.org to the set of mirrors. PR: bin/150552 Submitted by: Niclas Zeising Modified: stable/7/usr.sbin/sysinstall/menus.c Directory Properties: stable/7/usr.sbin/sysinstall/ (props changed) Modified: stable/7/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/7/usr.sbin/sysinstall/menus.c Tue Nov 16 07:16:40 2010 (r215378) +++ stable/7/usr.sbin/sysinstall/menus.c Tue Nov 16 07:19:05 2010 (r215379) @@ -740,6 +740,8 @@ DMenu MenuMediaFTP = { VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" }, + { " Sweden #4", "ftp4.se.freebsd.org", NULL, dmenuSetVariable, NULL, + VAR_FTP_PATH "=ftp://ftp4.se.freebsd.org" }, { " Sweden #5", "ftp5.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.se.freebsd.org" }, From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:24:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC30106564A; Tue, 16 Nov 2010 07:24:18 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5C9A8FC14; Tue, 16 Nov 2010 07:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7OHuj043510; Tue, 16 Nov 2010 07:24:17 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7OHuF043508; Tue, 16 Nov 2010 07:24:17 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160724.oAG7OHuF043508@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:24: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: r215380 - stable/8/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:24:18 -0000 Author: brucec Date: Tue Nov 16 07:24:17 2010 New Revision: 215380 URL: http://svn.freebsd.org/changeset/base/215380 Log: MFC r215239: Memory stats are reported in bytes, not pages. PR: docs/151283 Submitted by: Bas Smeelen Modified: stable/8/usr.bin/top/top.local.1 Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/top.local.1 ============================================================================== --- stable/8/usr.bin/top/top.local.1 Tue Nov 16 07:19:05 2010 (r215379) +++ stable/8/usr.bin/top/top.local.1 Tue Nov 16 07:24:17 2010 (r215380) @@ -6,8 +6,8 @@ The '-H' option will toggle the display At runtime the 'H' key will toggle this mode. The default is OFF. .SH DESCRIPTION OF MEMORY -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out +Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free +Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out .B K: Kilobyte @@ -19,23 +19,23 @@ Megabyte 1/100 .TP .B Active: -number of pages active +number of bytes active .TP .B Inact: -number of pages inactive +number of bytes inactive .TP .B Wired: -number of pages wired down, including cached file data pages +number of bytes wired down, including cached file data pages .TP .B Cache: -number of clean pages caching data that are available for +number of clean bytes caching data that are available for immediate reallocation .TP .B Buf: -number of pages used for BIO-level disk caching +number of bytes used for BIO-level disk caching .TP .B Free: -number of pages free +number of bytes free .TP .B Total: total available swap usage @@ -47,7 +47,7 @@ total free swap usage swap usage .TP .B In: -pages paged in from swap devices (last interval) +bytes paged in from swap devices (last interval) .TP .B Out: -pages paged out to swap devices (last interval) +bytes paged out to swap devices (last interval) From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:26:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 927DB10657E4; Tue, 16 Nov 2010 07:26:49 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666528FC16; Tue, 16 Nov 2010 07:26: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 oAG7QnBg043624; Tue, 16 Nov 2010 07:26:49 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7Qn1O043622; Tue, 16 Nov 2010 07:26:49 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160726.oAG7Qn1O043622@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:26:49 +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: r215381 - stable/7/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:26:49 -0000 Author: brucec Date: Tue Nov 16 07:26:49 2010 New Revision: 215381 URL: http://svn.freebsd.org/changeset/base/215381 Log: MFC r215239: Memory stats are reported in bytes, not pages. PR: docs/151283 Submitted by: Bas Smeelen Modified: stable/7/usr.bin/top/top.local.1 Directory Properties: stable/7/usr.bin/top/ (props changed) Modified: stable/7/usr.bin/top/top.local.1 ============================================================================== --- stable/7/usr.bin/top/top.local.1 Tue Nov 16 07:24:17 2010 (r215380) +++ stable/7/usr.bin/top/top.local.1 Tue Nov 16 07:26:49 2010 (r215381) @@ -6,8 +6,8 @@ The '-H' option will toggle the display At runtime the 'H' key will toggle this mode. The default is OFF. .SH DESCRIPTION OF MEMORY -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out +Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free +Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out .B K: Kilobyte @@ -19,23 +19,23 @@ Megabyte 1/100 .TP .B Active: -number of pages active +number of bytes active .TP .B Inact: -number of pages inactive +number of bytes inactive .TP .B Wired: -number of pages wired down, including cached file data pages +number of bytes wired down, including cached file data pages .TP .B Cache: -number of clean pages caching data that are available for +number of clean bytes caching data that are available for immediate reallocation .TP .B Buf: -number of pages used for BIO-level disk caching +number of bytes used for BIO-level disk caching .TP .B Free: -number of pages free +number of bytes free .TP .B Total: total available swap usage @@ -47,7 +47,7 @@ total free swap usage swap usage .TP .B In: -pages paged in from swap devices (last interval) +bytes paged in from swap devices (last interval) .TP .B Out: -pages paged out to swap devices (last interval) +bytes paged out to swap devices (last interval) From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:30:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DF61065674; Tue, 16 Nov 2010 07:30:52 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2060B8FC19; Tue, 16 Nov 2010 07:30: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 oAG7UqD9043769; Tue, 16 Nov 2010 07:30:52 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7Uqi0043767; Tue, 16 Nov 2010 07:30:52 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160730.oAG7Uqi0043767@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215382 - 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, 16 Nov 2010 07:30:52 -0000 Author: brucec Date: Tue Nov 16 07:30:51 2010 New Revision: 215382 URL: http://svn.freebsd.org/changeset/base/215382 Log: MFC r214381: Add information about the values and default setting of the kern.cam.ada.spindown_shutdown sysctl. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:26:49 2010 (r215381) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:30:51 2010 (r215382) @@ -121,6 +121,7 @@ seconds. .It 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. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:33:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A88421065675; Tue, 16 Nov 2010 07:33:53 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D5D8FC0C; Tue, 16 Nov 2010 07:33: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 oAG7Xrca043877; Tue, 16 Nov 2010 07:33:53 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7XrW2043875; Tue, 16 Nov 2010 07:33:53 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160733.oAG7XrW2043875@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:33: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: r215383 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:33:53 -0000 Author: brucec Date: Tue Nov 16 07:33:53 2010 New Revision: 215383 URL: http://svn.freebsd.org/changeset/base/215383 Log: MFC r213763: Use the RFC2606 domain example.com in examples. Modified: stable/8/usr.sbin/sysinstall/tcpip.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/tcpip.c ============================================================================== --- stable/8/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:30:51 2010 (r215382) +++ stable/8/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:33:53 2010 (r215383) @@ -72,12 +72,12 @@ static char ipv6addr[INET6_ADDRSTRLEN]; static Layout layout[] = { #define LAYOUT_HOSTNAME 0 { 1, 2, 25, HOSTNAME_FIELD_LEN - 1, - "Host:", "Your fully-qualified hostname, e.g. foo.bar.com", + "Host:", "Your fully-qualified hostname, e.g. foo.example.com", hostname, STRINGOBJ, NULL }, #define LAYOUT_DOMAINNAME 1 { 1, 35, 20, HOSTNAME_FIELD_LEN - 1, "Domain:", - "The name of the domain that your machine is in, e.g. bar.com", + "The name of the domain that your machine is in, e.g. example.com", domainname, STRINGOBJ, NULL }, #define LAYOUT_GATEWAY 2 { 5, 2, 18, IPADDR_FIELD_LEN - 1, From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:35:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39BCC1065679; Tue, 16 Nov 2010 07:35:30 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 282478FC19; Tue, 16 Nov 2010 07:35: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 oAG7ZUBB043964; Tue, 16 Nov 2010 07:35:30 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7ZUH5043962; Tue, 16 Nov 2010 07:35:30 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160735.oAG7ZUH5043962@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:35:30 +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: r215384 - stable/7/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:35:30 -0000 Author: brucec Date: Tue Nov 16 07:35:29 2010 New Revision: 215384 URL: http://svn.freebsd.org/changeset/base/215384 Log: MFC r213763: Use the RFC2606 domain example.com in examples. Modified: stable/7/usr.sbin/sysinstall/tcpip.c Directory Properties: stable/7/usr.sbin/sysinstall/ (props changed) Modified: stable/7/usr.sbin/sysinstall/tcpip.c ============================================================================== --- stable/7/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:33:53 2010 (r215383) +++ stable/7/usr.sbin/sysinstall/tcpip.c Tue Nov 16 07:35:29 2010 (r215384) @@ -65,12 +65,12 @@ static char ipv6addr[INET6_ADDRSTRLEN]; static Layout layout[] = { #define LAYOUT_HOSTNAME 0 { 1, 2, 25, HOSTNAME_FIELD_LEN - 1, - "Host:", "Your fully-qualified hostname, e.g. foo.bar.com", + "Host:", "Your fully-qualified hostname, e.g. foo.example.com", hostname, STRINGOBJ, NULL }, #define LAYOUT_DOMAINNAME 1 { 1, 35, 20, HOSTNAME_FIELD_LEN - 1, "Domain:", - "The name of the domain that your machine is in, e.g. bar.com", + "The name of the domain that your machine is in, e.g. example.com", domainname, STRINGOBJ, NULL }, #define LAYOUT_GATEWAY 2 { 5, 2, 18, IPADDR_FIELD_LEN - 1, From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:38:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33CFF106564A; Tue, 16 Nov 2010 07:38:27 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 222FF8FC1B; Tue, 16 Nov 2010 07:38:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7cR03044059; Tue, 16 Nov 2010 07:38:27 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7cRTK044057; Tue, 16 Nov 2010 07:38:27 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160738.oAG7cRTK044057@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215385 - stable/8/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:38:27 -0000 Author: brucec Date: Tue Nov 16 07:38:26 2010 New Revision: 215385 URL: http://svn.freebsd.org/changeset/base/215385 Log: MFC r214021: Fix grammar. Modified: stable/8/sys/dev/firewire/fwohci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/firewire/fwohci.c ============================================================================== --- stable/8/sys/dev/firewire/fwohci.c Tue Nov 16 07:35:29 2010 (r215384) +++ stable/8/sys/dev/firewire/fwohci.c Tue Nov 16 07:38:26 2010 (r215385) @@ -1971,8 +1971,8 @@ fwohci_intr_dma(struct fwohci_softc *sc, OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCTIMER); #endif OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); - device_printf(fc->dev, "too many cycle lost, " - "no cycle master presents?\n"); + device_printf(fc->dev, "too many cycles lost, " + "no cycle master present?\n"); } } if (stat & OHCI_INT_DMA_ATRQ) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:39:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77C9F106566B; Tue, 16 Nov 2010 07:39:52 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 663AA8FC1C; Tue, 16 Nov 2010 07:39: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 oAG7dq6e044135; Tue, 16 Nov 2010 07:39:52 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7dqF3044133; Tue, 16 Nov 2010 07:39:52 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160739.oAG7dqF3044133@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215386 - stable/7/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:39:52 -0000 Author: brucec Date: Tue Nov 16 07:39:52 2010 New Revision: 215386 URL: http://svn.freebsd.org/changeset/base/215386 Log: MFC r214021: Fix grammar. Modified: stable/7/sys/dev/firewire/fwohci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/firewire/fwohci.c ============================================================================== --- stable/7/sys/dev/firewire/fwohci.c Tue Nov 16 07:38:26 2010 (r215385) +++ stable/7/sys/dev/firewire/fwohci.c Tue Nov 16 07:39:52 2010 (r215386) @@ -1969,8 +1969,8 @@ fwohci_intr_dma(struct fwohci_softc *sc, OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCTIMER); #endif OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); - device_printf(fc->dev, "too many cycle lost, " - "no cycle master presents?\n"); + device_printf(fc->dev, "too many cycles lost, " + "no cycle master present?\n"); } } if (stat & OHCI_INT_DMA_ATRQ) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:47:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EEDF106566B; Tue, 16 Nov 2010 07:47:44 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6378FC12; Tue, 16 Nov 2010 07:47:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7lhnT044330; Tue, 16 Nov 2010 07:47:43 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7lhdo044328; Tue, 16 Nov 2010 07:47:43 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160747.oAG7lhdo044328@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:47: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: r215387 - stable/8/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:47:44 -0000 Author: brucec Date: Tue Nov 16 07:47:43 2010 New Revision: 215387 URL: http://svn.freebsd.org/changeset/base/215387 Log: MFC r214022: Remove extra word, which looks like a left-over from a deleted sentence. Modified: stable/8/contrib/netcat/nc.1 Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/nc.1 ============================================================================== --- stable/8/contrib/netcat/nc.1 Tue Nov 16 07:39:52 2010 (r215386) +++ stable/8/contrib/netcat/nc.1 Tue Nov 16 07:47:43 2010 (r215387) @@ -158,7 +158,6 @@ TCP_NOOPT socket option. .It Fl O Ar length Specifies the size of the TCP send buffer. -When .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:51:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7C881065672; Tue, 16 Nov 2010 07:51:35 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64B98FC08; Tue, 16 Nov 2010 07: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 oAG7pZUw044469; Tue, 16 Nov 2010 07:51:35 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7pZKb044466; Tue, 16 Nov 2010 07:51:35 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160751.oAG7pZKb044466@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215388 - stable/8/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:51:35 -0000 Author: brucec Date: Tue Nov 16 07:51:35 2010 New Revision: 215388 URL: http://svn.freebsd.org/changeset/base/215388 Log: MFC r214073: Stop disallowing device nodes to be passed to camcontrol(8) since libcam already allows both device names and nodes to be specified. Modified: stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Tue Nov 16 07:47:43 2010 (r215387) +++ stable/8/sbin/camcontrol/camcontrol.8 Tue Nov 16 07:51:35 2010 (r215388) @@ -207,9 +207,6 @@ A device identifier can take one of thre .Bl -tag -width 14n .It deviceUNIT Specify a device name and unit number combination, like "da5" or "cd3". -Note that character device node names (e.g.\& /dev/da0) are -.Em not -allowed here. .It bus:target Specify a bus number and target id. The bus number can be determined from Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Tue Nov 16 07:47:43 2010 (r215387) +++ stable/8/sbin/camcontrol/camcontrol.c Tue Nov 16 07:51:35 2010 (r215388) @@ -4607,15 +4607,7 @@ main(int argc, char **argv) char name[30]; int rv; - /* - * First catch people who try to do things like: - * camcontrol tur /dev/da0 - * camcontrol doesn't take device nodes as arguments. - */ - if (argv[2][0] == '/') { - warnx("%s is not a valid device identifier", argv[2]); - errx(1, "please read the camcontrol(8) man page"); - } else if (isdigit(argv[2][0])) { + if (isdigit(argv[2][0])) { /* device specified as bus:target[:lun] */ rv = parse_btl(argv[2], &bus, &target, &lun, &arglist); if (rv < 2) From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:53:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6356106566C; Tue, 16 Nov 2010 07:53:14 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D485C8FC19; Tue, 16 Nov 2010 07:53: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 oAG7rEra044558; Tue, 16 Nov 2010 07:53:14 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7rEtO044556; Tue, 16 Nov 2010 07:53:14 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160753.oAG7rEtO044556@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:53: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: r215389 - 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, 16 Nov 2010 07:53:15 -0000 Author: brucec Date: Tue Nov 16 07:53:14 2010 New Revision: 215389 URL: http://svn.freebsd.org/changeset/base/215389 Log: MFC r214395: Fix formatting. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:51:35 2010 (r215388) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:53:14 2010 (r215389) @@ -121,7 +121,8 @@ seconds. .It 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. +Set to 1 to enable spin-down, 0 to disable. +The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:55:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9820106566C; Tue, 16 Nov 2010 07:55:36 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97E8F8FC1A; Tue, 16 Nov 2010 07:55: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 oAG7taBV044677; Tue, 16 Nov 2010 07:55:36 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7tagE044675; Tue, 16 Nov 2010 07:55:36 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011160755.oAG7tagE044675@svn.freebsd.org> From: Bruce Cran Date: Tue, 16 Nov 2010 07:55: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: r215390 - 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, 16 Nov 2010 07:55:36 -0000 Author: brucec Date: Tue Nov 16 07:55:36 2010 New Revision: 215390 URL: http://svn.freebsd.org/changeset/base/215390 Log: MFC r215136: Bump .Dd due to additions in r214279. Modified: stable/8/share/man/man4/ada.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ada.4 ============================================================================== --- stable/8/share/man/man4/ada.4 Tue Nov 16 07:53:14 2010 (r215389) +++ stable/8/share/man/man4/ada.4 Tue Nov 16 07:55:36 2010 (r215390) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2009 +.Dd October 24, 2010 .Dt ADA 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 07:57:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CFF1065694; Tue, 16 Nov 2010 07:57:56 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 547E18FC12; Tue, 16 Nov 2010 07:57: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 oAG7vuHY044750; Tue, 16 Nov 2010 07:57:56 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7vuVJ044748; Tue, 16 Nov 2010 07:57:56 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160757.oAG7vuVJ044748@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 07:57: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: r215391 - head/sys/netinet/cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:57:56 -0000 Author: lstewart Date: Tue Nov 16 07:57:56 2010 New Revision: 215391 URL: http://svn.freebsd.org/changeset/base/215391 Log: On CC algorithm module unload, we walk the list of active TCP control blocks. Any found to be using the algorithm that is about to go away are switched back to NewReno to avoid leaving dangling pointers which would trigger a panic. For VIMAGE kernels, there is a list per vnet to walk, yet the implementation was only examining one of the vnet lists. Fix the implementation of the above feature for VIMAGE kernels by looping through all active TCP control blocks across all vnets. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub Reviewed by: bz (briefly) MFC after: 11 weeks Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:55:36 2010 (r215390) +++ head/sys/netinet/cc/cc.c Tue Nov 16 07:57:56 2010 (r215391) @@ -193,6 +193,7 @@ cc_deregister_algo(struct cc_algo *remov struct tcpcb *tp; struct inpcb *inp; int err; + VNET_ITERATOR_DECL(vnet_iter); err = ENOENT; @@ -221,9 +222,10 @@ cc_deregister_algo(struct cc_algo *remov if (!err) { /* - * Check all active control blocks and change any that are - * using this algorithm back to newreno. If the algorithm that - * was in use requires cleanup code to be run, call it. + * Check all active control blocks across all network stacks and + * change any that are using this algorithm back to newreno. If + * the algorithm that was in use requires cleanup code to be + * run, call it. * * New connections already part way through being initialised * with the CC algo we're removing will not race with this code @@ -231,30 +233,39 @@ cc_deregister_algo(struct cc_algo *remov * We therefore don't enter the loop below until the connection * list has stabilised. */ - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inp, &V_tcb, inp_list) { - INP_WLOCK(inp); - /* Important to skip tcptw structs. */ - if (!(inp->inp_flags & INP_TIMEWAIT) && - (tp = intotcpcb(inp)) != NULL) { - /* - * By holding INP_WLOCK here, we are - * assured that the connection is not - * currently executing inside the CC - * module's functions i.e. it is safe to - * make the switch back to newreno. - */ - if (CC_ALGO(tp) == remove_cc) { - tmpfuncs = CC_ALGO(tp); - /* Newreno does not require any init. */ - CC_ALGO(tp) = &newreno_cc_algo; - if (tmpfuncs->cb_destroy != NULL) - tmpfuncs->cb_destroy(tp->ccv); + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + INP_INFO_RLOCK(&V_tcbinfo); + LIST_FOREACH(inp, &V_tcb, inp_list) { + INP_WLOCK(inp); + /* Important to skip tcptw structs. */ + if (!(inp->inp_flags & INP_TIMEWAIT) && + (tp = intotcpcb(inp)) != NULL) { + /* + * By holding INP_WLOCK here, we are + * assured that the connection is not + * currently executing inside the CC + * module's functions i.e. it is safe + * to make the switch back to newreno. + */ + if (CC_ALGO(tp) == remove_cc) { + tmpfuncs = CC_ALGO(tp); + /* + * Newreno does not + * require any init. + */ + CC_ALGO(tp) = &newreno_cc_algo; + if (tmpfuncs->cb_destroy != NULL) + tmpfuncs->cb_destroy(tp->ccv); + } } + INP_WUNLOCK(inp); } - INP_WUNLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); } - INP_INFO_RUNLOCK(&V_tcbinfo); + VNET_LIST_RUNLOCK(); } return (err); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 08:30:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 542D8106564A; Tue, 16 Nov 2010 08:30:40 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 427F08FC16; Tue, 16 Nov 2010 08:30: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 oAG8Ue9U045751; Tue, 16 Nov 2010 08:30:40 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG8Ue0I045747; Tue, 16 Nov 2010 08:30:40 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160830.oAG8Ue0I045747@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 08:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215392 - in head/sys/netinet: . cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 08:30:40 -0000 Author: lstewart Date: Tue Nov 16 08:30:39 2010 New Revision: 215392 URL: http://svn.freebsd.org/changeset/base/215392 Log: Move protocol specific implementation detail out of the core CC framework. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc/cc.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/cc/cc.c Tue Nov 16 08:30:39 2010 (r215392) @@ -190,10 +190,7 @@ int cc_deregister_algo(struct cc_algo *remove_cc) { struct cc_algo *funcs, *tmpfuncs; - struct tcpcb *tp; - struct inpcb *inp; int err; - VNET_ITERATOR_DECL(vnet_iter); err = ENOENT; @@ -220,53 +217,14 @@ cc_deregister_algo(struct cc_algo *remov } CC_LIST_WUNLOCK(); - if (!err) { + if (!err) /* - * Check all active control blocks across all network stacks and - * change any that are using this algorithm back to newreno. If - * the algorithm that was in use requires cleanup code to be - * run, call it. - * - * New connections already part way through being initialised - * with the CC algo we're removing will not race with this code - * because the INP_INFO_WLOCK is held during initialisation. - * We therefore don't enter the loop below until the connection - * list has stabilised. + * XXXLAS: + * - We may need to handle non-zero return values in future. + * - If we add CC framework support for protocols other than + * TCP, we may want a more generic way to handle this step. */ - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inp, &V_tcb, inp_list) { - INP_WLOCK(inp); - /* Important to skip tcptw structs. */ - if (!(inp->inp_flags & INP_TIMEWAIT) && - (tp = intotcpcb(inp)) != NULL) { - /* - * By holding INP_WLOCK here, we are - * assured that the connection is not - * currently executing inside the CC - * module's functions i.e. it is safe - * to make the switch back to newreno. - */ - if (CC_ALGO(tp) == remove_cc) { - tmpfuncs = CC_ALGO(tp); - /* - * Newreno does not - * require any init. - */ - CC_ALGO(tp) = &newreno_cc_algo; - if (tmpfuncs->cb_destroy != NULL) - tmpfuncs->cb_destroy(tp->ccv); - } - } - INP_WUNLOCK(inp); - } - INP_INFO_RUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK(); - } + tcp_ccalgounload(remove_cc); return (err); } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/tcp_subr.c Tue Nov 16 08:30:39 2010 (r215392) @@ -708,6 +708,69 @@ tcp_newtcpcb(struct inpcb *inp) } /* + * Switch the congestion control algorithm back to NewReno for any active + * control blocks using an algorithm which is about to go away. + * This ensures the CC framework can allow the unload to proceed without leaving + * any dangling pointers which would trigger a panic. + * Returning non-zero would inform the CC framework that something went wrong + * and it would be unsafe to allow the unload to proceed. However, there is no + * way for this to occur with this implementation so we always return zero. + */ +int +tcp_ccalgounload(struct cc_algo *unload_algo) +{ + struct cc_algo *tmpalgo; + struct inpcb *inp; + struct tcpcb *tp; + VNET_ITERATOR_DECL(vnet_iter); + + /* + * Check all active control blocks across all network stacks and change + * any that are using "unload_algo" back to NewReno. If "unload_algo" + * requires cleanup code to be run, call it. + */ + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + INP_INFO_RLOCK(&V_tcbinfo); + /* + * New connections already part way through being initialised + * with the CC algo we're removing will not race with this code + * because the INP_INFO_WLOCK is held during initialisation. We + * therefore don't enter the loop below until the connection + * list has stabilised. + */ + LIST_FOREACH(inp, &V_tcb, inp_list) { + INP_WLOCK(inp); + /* Important to skip tcptw structs. */ + if (!(inp->inp_flags & INP_TIMEWAIT) && + (tp = intotcpcb(inp)) != NULL) { + /* + * By holding INP_WLOCK here, we are assured + * that the connection is not currently + * executing inside the CC module's functions + * i.e. it is safe to make the switch back to + * NewReno. + */ + if (CC_ALGO(tp) == unload_algo) { + tmpalgo = CC_ALGO(tp); + /* NewReno does not require any init. */ + CC_ALGO(tp) = &newreno_cc_algo; + if (tmpalgo->cb_destroy != NULL) + tmpalgo->cb_destroy(tp->ccv); + } + } + INP_WUNLOCK(inp); + } + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK(); + + return (0); +} + +/* * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/tcp_var.h Tue Nov 16 08:30:39 2010 (r215392) @@ -605,6 +605,7 @@ VNET_DECLARE(int, tcp_ecn_maxretries); #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) int tcp_addoptions(struct tcpopt *, u_char *); +int tcp_ccalgounload(struct cc_algo *unload_algo); struct tcpcb * tcp_close(struct tcpcb *); void tcp_discardcb(struct tcpcb *); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 08:43:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18636106564A; Tue, 16 Nov 2010 08:43:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0733F8FC1A; Tue, 16 Nov 2010 08:43: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 oAG8hPci046082; Tue, 16 Nov 2010 08:43:25 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG8hPCm046080; Tue, 16 Nov 2010 08:43:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160843.oAG8hPCm046080@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 08:43: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: r215393 - head/sys/netinet/cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 08:43:26 -0000 Author: lstewart Date: Tue Nov 16 08:43:25 2010 New Revision: 215393 URL: http://svn.freebsd.org/changeset/base/215393 Log: - Querying the default CC algo is more common than setting it and the function is small, so there is no good reason not to declare the buffer at the top. - Fix a whitespace nit. Sponsored by: FreeBSD Foundation MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 08:30:39 2010 (r215392) +++ head/sys/netinet/cc/cc.c Tue Nov 16 08:43:25 2010 (r215393) @@ -106,14 +106,13 @@ cc_set_default(struct cc_algo *new_defau static int cc_default_algo(SYSCTL_HANDLER_ARGS) { + char default_cc[TCP_CA_NAME_MAX]; struct cc_algo *funcs; int err, found; err = found = 0; if (req->newptr == NULL) { - char default_cc[TCP_CA_NAME_MAX]; - /* Just print the current default. */ CC_LIST_RLOCK(); strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX); @@ -216,7 +215,7 @@ cc_deregister_algo(struct cc_algo *remov } } CC_LIST_WUNLOCK(); - + if (!err) /* * XXXLAS: From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 09:01:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EAA8106564A; Tue, 16 Nov 2010 09:01:20 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BF1E8FC17; Tue, 16 Nov 2010 09:01: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 oAG91KhZ046584; Tue, 16 Nov 2010 09:01:20 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG91KHn046582; Tue, 16 Nov 2010 09:01:20 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011160901.oAG91KHn046582@svn.freebsd.org> From: Alexander Leidinger Date: Tue, 16 Nov 2010 09:01: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: r215394 - stable/8/sys/compat/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 09:01:20 -0000 Author: netchild Date: Tue Nov 16 09:01:19 2010 New Revision: 215394 URL: http://svn.freebsd.org/changeset/base/215394 Log: MFC r206081: Fix some bogus values in linprocfs. Submitted by: Petr Salinger Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) PR: 144584 Reviewed by / discussed with: kib, des, jhb, submitter Requested by: emaste Tested by: olli Modified: stable/8/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/8/sys/compat/linprocfs/linprocfs.c Tue Nov 16 08:43:25 2010 (r215393) +++ stable/8/sys/compat/linprocfs/linprocfs.c Tue Nov 16 09:01:19 2010 (r215394) @@ -115,12 +115,14 @@ __FBSDID("$FreeBSD$"); /* * Various conversion macros */ -#define T2J(x) (((x) * 100UL) / (stathz ? stathz : hz)) /* ticks to jiffies */ +#define T2J(x) ((long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to jiffies */ +#define T2CS(x) ((unsigned long)(((x) * 100ULL) / (stathz ? stathz : hz))) /* ticks to centiseconds */ #define T2S(x) ((x) / (stathz ? stathz : hz)) /* ticks to seconds */ #define B2K(x) ((x) >> 10) /* bytes to kbytes */ #define B2P(x) ((x) >> PAGE_SHIFT) /* bytes to pages */ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +#define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) /** * @brief Mapping of ki_stat in struct kinfo_proc to the linux state @@ -510,9 +512,10 @@ linprocfs_douptime(PFS_FILL_ARGS) getmicrouptime(&tv); read_cpu_time(cp_time); - sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", + sbuf_printf(sb, "%lld.%02ld %ld.%02lu\n", (long long)tv.tv_sec, tv.tv_usec / 10000, - T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); + T2S(cp_time[CP_IDLE] / mp_ncpus), + T2CS(cp_time[CP_IDLE] / mp_ncpus) % 100); return (0); } @@ -618,9 +621,17 @@ linprocfs_doprocstat(PFS_FILL_ARGS) struct kinfo_proc kp; char state; static int ratelimit = 0; + vm_offset_t startcode, startdata; PROC_LOCK(p); fill_kinfo_proc(p, &kp); + if (p->p_vmspace) { + startcode = (vm_offset_t)p->p_vmspace->vm_taddr; + startdata = (vm_offset_t)p->p_vmspace->vm_daddr; + } else { + startcode = 0; + startdata = 0; + }; sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); @@ -639,30 +650,27 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); - PS_ADD("tty", "%d", 0); /* XXX */ + PS_ADD("tty", "%d", kp.ki_tdev); PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); PS_ADD("majflt", "%lu", kp.ki_rusage.ru_majflt); PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); - PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); - PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); - PS_ADD("cutime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); - PS_ADD("cstime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("utime", "%ld", TV2J(&kp.ki_rusage.ru_utime)); + PS_ADD("stime", "%ld", TV2J(&kp.ki_rusage.ru_stime)); + PS_ADD("cutime", "%ld", TV2J(&kp.ki_rusage_ch.ru_utime)); + PS_ADD("cstime", "%ld", TV2J(&kp.ki_rusage_ch.ru_stime)); PS_ADD("priority", "%d", kp.ki_pri.pri_user); PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ - /* XXX: starttime is not right, it is the _same_ for _every_ process. - It should be the number of jiffies between system boot and process - start. */ - PS_ADD("starttime", "%lu", T2J(tvtohz(&kp.ki_start))); + PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); - PS_ADD("startcode", "%u", (unsigned)0); - PS_ADD("endcode", "%u", 0); /* XXX */ + PS_ADD("startcode", "%ju", (uintmax_t)startcode); + PS_ADD("endcode", "%ju", (uintmax_t)startdata); PS_ADD("startstack", "%u", 0); /* XXX */ PS_ADD("kstkesp", "%u", 0); /* XXX */ PS_ADD("kstkeip", "%u", 0); /* XXX */ @@ -805,7 +813,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) */ sbuf_printf(sb, "VmSize:\t%8ju kB\n", B2K((uintmax_t)kp.ki_size)); sbuf_printf(sb, "VmLck:\t%8u kB\n", P2K(0)); /* XXX */ - sbuf_printf(sb, "VmRss:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); + sbuf_printf(sb, "VmRSS:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); sbuf_printf(sb, "VmData:\t%8ju kB\n", P2K((uintmax_t)kp.ki_dsize)); sbuf_printf(sb, "VmStk:\t%8ju kB\n", P2K((uintmax_t)kp.ki_ssize)); sbuf_printf(sb, "VmExe:\t%8ju kB\n", P2K((uintmax_t)kp.ki_tsize)); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 09:34:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CA01065672; Tue, 16 Nov 2010 09:34:32 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 089C88FC16; Tue, 16 Nov 2010 09: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 oAG9YVA3047278; Tue, 16 Nov 2010 09:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG9YV4V047275; Tue, 16 Nov 2010 09:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160934.oAG9YV4V047275@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 09: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: r215395 - in head/sys/netinet: . cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 09:34:33 -0000 Author: lstewart Date: Tue Nov 16 09:34:31 2010 New Revision: 215395 URL: http://svn.freebsd.org/changeset/base/215395 Log: Make the CC framework more VIMAGE friendly by adding the machinery to allow vnets to select their own default CC algorithm independent of each other and the base system. If the base system or a vnet has set a default which gets unloaded, we reset that netstack's default to NewReno. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub Reviewed by: bz (briefly) MFC after: 3 months Modified: head/sys/netinet/cc.h head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Tue Nov 16 09:01:19 2010 (r215394) +++ head/sys/netinet/cc.h Tue Nov 16 09:34:31 2010 (r215395) @@ -58,6 +58,10 @@ extern STAILQ_HEAD(cc_head, cc_algo) cc_ extern const int tcprexmtthresh; extern struct cc_algo newreno_cc_algo; +/* Per-netstack bits. */ +VNET_DECLARE(struct cc_algo *, default_cc_ptr); +#define V_default_cc_ptr VNET(default_cc_ptr) + /* Define the new net.inet.tcp.cc sysctl tree. */ SYSCTL_DECL(_net_inet_tcp_cc); @@ -146,7 +150,7 @@ struct cc_algo { #define CC_DATA(tp) ((tp)->ccv->cc_data) /* Macro to obtain the system default CC algo's struct ptr. */ -#define CC_DEFAULT() STAILQ_FIRST(&cc_list) +#define CC_DEFAULT() V_default_cc_ptr extern struct rwlock cc_list_lock; #define CC_LIST_LOCK_INIT() rw_init(&cc_list_lock, "cc_list") @@ -155,6 +159,6 @@ extern struct rwlock cc_list_lock; #define CC_LIST_RUNLOCK() rw_runlock(&cc_list_lock) #define CC_LIST_WLOCK() rw_wlock(&cc_list_lock) #define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock) -#define CC_LIST_WLOCK_ASSERT() rw_assert(&cc_list_lock, RA_WLOCKED) +#define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED) #endif /* _NETINET_CC_H_ */ Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 09:01:19 2010 (r215394) +++ head/sys/netinet/cc/cc.c Tue Nov 16 09:34:31 2010 (r215395) @@ -81,24 +81,7 @@ struct cc_head cc_list = STAILQ_HEAD_INI /* Protects the cc_list TAILQ. */ struct rwlock cc_list_lock; -/* - * Set the default CC algorithm to new_default. The default is identified - * by being the first element in the cc_list TAILQ. - */ -static void -cc_set_default(struct cc_algo *new_default) -{ - CC_LIST_WLOCK_ASSERT(); - - /* - * Make the requested system default CC algorithm the first element in - * the list if it isn't already. - */ - if (new_default != CC_DEFAULT()) { - STAILQ_REMOVE(&cc_list, new_default, cc_algo, entries); - STAILQ_INSERT_HEAD(&cc_list, new_default, entries); - } -} +VNET_DEFINE(struct cc_algo *, default_cc_ptr) = &newreno_cc_algo; /* * Sysctl handler to show and change the default CC algorithm. @@ -120,15 +103,15 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) err = sysctl_handle_string(oidp, default_cc, 1, req); } else { /* Find algo with specified name and set it to default. */ - CC_LIST_WLOCK(); + CC_LIST_RLOCK(); STAILQ_FOREACH(funcs, &cc_list, entries) { if (strncmp((char *)req->newptr, funcs->name, TCP_CA_NAME_MAX) == 0) { found = 1; - cc_set_default(funcs); + V_default_cc_ptr = funcs; } } - CC_LIST_WUNLOCK(); + CC_LIST_RUNLOCK(); if (!found) err = ESRCH; @@ -173,6 +156,28 @@ cc_list_available(SYSCTL_HANDLER_ARGS) } /* + * Reset the default CC algo to NewReno for any netstack which is using the algo + * that is about to go away as its default. + */ +static void +cc_checkreset_default(struct cc_algo *remove_cc) +{ + VNET_ITERATOR_DECL(vnet_iter); + + CC_LIST_LOCK_ASSERT(); + + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + if (strncmp(CC_DEFAULT()->name, remove_cc->name, + TCP_CA_NAME_MAX) == 0) + V_default_cc_ptr = &newreno_cc_algo; + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); +} + +/* * Initialise CC subsystem on system boot. */ static void @@ -201,14 +206,7 @@ cc_deregister_algo(struct cc_algo *remov CC_LIST_WLOCK(); STAILQ_FOREACH_SAFE(funcs, &cc_list, entries, tmpfuncs) { if (funcs == remove_cc) { - /* - * If we're removing the current system default, - * reset the default to newreno. - */ - if (strncmp(CC_DEFAULT()->name, remove_cc->name, - TCP_CA_NAME_MAX) == 0) - cc_set_default(&newreno_cc_algo); - + cc_checkreset_default(remove_cc); STAILQ_REMOVE(&cc_list, funcs, cc_algo, entries); err = 0; break; @@ -302,7 +300,7 @@ SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, "congestion control related settings"); -SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, +SYSCTL_VNET_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, NULL, 0, cc_default_algo, "A", "default congestion control algorithm"); SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, CTLTYPE_STRING|CTLFLAG_RD, From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 10:55:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EBA51065675; Tue, 16 Nov 2010 10:55:12 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 914538FC15; Tue, 16 Nov 2010 10:55:11 +0000 (UTC) Received: by qyk7 with SMTP id 7so568517qyk.13 for ; Tue, 16 Nov 2010 02:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=oIRuuwCzK986QI93anxIcXDqJ5NKYlR1nIRcg082M8g=; b=bZoWst8miB+/wk/6x8y86if+QtnHT4zhJD08f0ADgt204Bv8uPsdmFK6kLmJE7L13I QJZHB/rUo6RwUyZMn8GVB/EiWU1EmVUmOYbJA7IOOAe1qzgB/zt38XYdFV0/GtGLKx8B x6X9Gzn7VlvlebA6484F3dtTu8IM27cokmrj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=m5jW2DtR/UM7jjZOz5MgtmzlpZtu5pjMFD7cDkHs74AjXTqyXycAcAC2ABk4pqYN51 Tk9WnTynogrO6fCIjG9KIl73KYvxTZKAmejznD6ZMou1iiajnmzg+Oto0Io6USo0sLSX NOtfoG93jD1yZo3x4aMBapUbAjlt4PmscTnzA= Received: by 10.229.82.70 with SMTP id a6mr6280078qcl.9.1289904910837; Tue, 16 Nov 2010 02:55:10 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Tue, 16 Nov 2010 02:54:30 -0800 (PST) In-Reply-To: <20101116014817.GA25713@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> <20101116014817.GA25713@onelab2.iet.unipi.it> From: Ivan Voras Date: Tue, 16 Nov 2010 11:54:30 +0100 X-Google-Sender-Auth: On0h3FL75zAc2UzvO5wnjJUGQ28 Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys 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: Tue, 16 Nov 2010 10:55:12 -0000 On 16 November 2010 02:48, Luigi Rizzo wrote: > On Tue, Nov 16, 2010 at 01:33:53AM +0100, Ivan Voras wrote: >> On 15 November 2010 18:10, Luigi Rizzo wrote: >> >> > 2. [generic] passing pointers between userland and kernel >> > requires remapping the pointer when going up or down. >> > As the mapping would be application specific, i don't >> > see much use in allowing room for a pointer without kernel code >> > to map userland <-> kernel pointers. >> >> I'm not thinking of passing a *working* pointer into the kernel but >> used as a cookie, similar to how it's used in kqueue: the intention >> being the application can send and get a pointer which means something >> to the application, not something usable to the kernel. > > oh, but then you are thinking of something completely different. > The SO_USER_COOKIE is never returned to the application; it is > only passed to another kernel subsystem, so it must be significant > there, not for the application. Ah, ok then. I was thinking you are maybe trying to do something else, like tagging a socket with additional information from userland. From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 12:30:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 743CE1065673; Tue, 16 Nov 2010 12:30:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 622E08FC19; Tue, 16 Nov 2010 12:30:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGCUlSs053880; Tue, 16 Nov 2010 12:30:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGCUlVX053878; Tue, 16 Nov 2010 12:30:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161230.oAGCUlVX053878@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 12:30: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: r215397 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 12:30:47 -0000 Author: avg Date: Tue Nov 16 12:30:47 2010 New Revision: 215397 URL: http://svn.freebsd.org/changeset/base/215397 Log: fix misspelling in a comment Reported by: Daniel Braniss MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 16 10:33:41 2010 (r215396) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 16 12:30:47 2010 (r215397) @@ -1557,7 +1557,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 12:43:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162EF106566B; Tue, 16 Nov 2010 12:43:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE5D28FC16; Tue, 16 Nov 2010 12:43: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 oAGChjWD054220; Tue, 16 Nov 2010 12:43:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGChjpi054218; Tue, 16 Nov 2010 12:43:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161243.oAGChjpi054218@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 12:43: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: r215398 - head/sys/x86/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 12:43:46 -0000 Author: avg Date: Tue Nov 16 12:43:45 2010 New Revision: 215398 URL: http://svn.freebsd.org/changeset/base/215398 Log: hwpstate: use CPU_FOREACH when binding to all available processors Also, add a comment mentioning _PSD - on some systems it's enough to put one logical CPU into a particular P-state to make other CPUs in the same domain to enter that P-state. Also, call sched_unbind() after the loop - sched_bind() automatically rebinds from previous CPU to a new one, and the new arrangement of code is safer against early loop exit. Plus one minor style nit. MFC after: 10 days Modified: head/sys/x86/cpufreq/hwpstate.c Modified: head/sys/x86/cpufreq/hwpstate.c ============================================================================== --- head/sys/x86/cpufreq/hwpstate.c Tue Nov 16 12:30:47 2010 (r215397) +++ head/sys/x86/cpufreq/hwpstate.c Tue Nov 16 12:43:45 2010 (r215398) @@ -157,7 +157,6 @@ DRIVER_MODULE(hwpstate, cpu, hwpstate_dr static int hwpstate_goto_pstate(device_t dev, int pstate) { - struct pcpu *pc; int i; uint64_t msr; int j; @@ -171,18 +170,15 @@ hwpstate_goto_pstate(device_t dev, int p if(limit > id) id = limit; - error = 0; /* * We are going to the same Px-state on all cpus. + * Probably should take _PSD into account. */ - for (i = 0; i < mp_ncpus; i++) { - /* Find each cpu. */ - pc = pcpu_find(i); - if (pc == NULL) - return (ENXIO); - thread_lock(curthread); + error = 0; + CPU_FOREACH(i) { /* Bind to each cpu. */ - sched_bind(curthread, pc->pc_cpuid); + thread_lock(curthread); + sched_bind(curthread, i); thread_unlock(curthread); HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, PCPU_GET(cpuid)); @@ -204,10 +200,10 @@ hwpstate_goto_pstate(device_t dev, int p HWPSTATE_DEBUG(dev, "error: loop is not enough.\n"); error = ENXIO; } - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 13:26:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686EE10656A4; Tue, 16 Nov 2010 13:26:58 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 12E028FC17; Tue, 16 Nov 2010 13:26:57 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1D02F1FFC33; Tue, 16 Nov 2010 13:11:23 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id ECCCB84571; Tue, 16 Nov 2010 14:11:22 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Maxim Sobolev References: <201011160440.oAG4e3YU039413@svn.freebsd.org> Date: Tue, 16 Nov 2010 14:11:22 +0100 In-Reply-To: <201011160440.oAG4e3YU039413@svn.freebsd.org> (Maxim Sobolev's message of "Tue, 16 Nov 2010 04:40:03 +0000 (UTC)") Message-ID: <86k4kd8lc5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 13:26:58 -0000 Maxim Sobolev writes: > Index: freebsd/base/stable/7/sys/netipx/ipx_input.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 > --- freebsd/base/stable/7/sys/netipx/ipx_input.c (revision > 215367) > +++ freebsd/base/stable/7/sys/netipx/ipx_input.c (revision > 215368) > @@ -119,7 +119,7 @@ > struct ipxpcbhead ipxpcb_list; > struct ipxpcbhead ipxrawpcb_list; >=20=20 > -static int ipxqmaxlen =3D IFQ_MAXLEN; > +static int ipxqmaxlen =3D ifqmaxlen; > static struct ifqueue ipxintrq; >=20=20 > long ipx_pexseq; /* Locked with ipxpcb_list_mtx. */ That's not going to fly. cc -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -Wall -Wredundant-decls -= Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -= Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdin= c -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HE= ADERS -include opt_global.h -fno-common -finline-limit=3D15000 --param inli= ne-unit-growth=3D100 --param large-function-growth=3D1000 -fno-builtin -mcm= odel=3Dmedany -msoft-float -ffreestanding -Werror /src/sys/netipx/ipx_inpu= t.c /src/sys/netipx/ipx_input.c:122: error: initializer element is not constant *** Error code 1 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 14:08:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1077106566B; Tue, 16 Nov 2010 14:08:21 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF5128FC13; Tue, 16 Nov 2010 14:08: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 oAGE8LQp056750; Tue, 16 Nov 2010 14:08:21 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGE8LMX056748; Tue, 16 Nov 2010 14:08:21 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201011161408.oAGE8LMX056748@svn.freebsd.org> From: Olivier Houchard Date: Tue, 16 Nov 2010 14:08: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: r215399 - 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, 16 Nov 2010 14:08:22 -0000 Author: cognet Date: Tue Nov 16 14:08:21 2010 New Revision: 215399 URL: http://svn.freebsd.org/changeset/base/215399 Log: No need to include sys/systm.h twice. Modified: head/sys/kern/kern_rmlock.c Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Tue Nov 16 12:43:45 2010 (r215398) +++ head/sys/kern/kern_rmlock.c Tue Nov 16 14:08:21 2010 (r215399) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 15:02:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1939106566C; Tue, 16 Nov 2010 15:02:53 +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 DF9A88FC08; Tue, 16 Nov 2010 15:02: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 oAGF2r7r058302; Tue, 16 Nov 2010 15:02:53 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGF2rfr058300; Tue, 16 Nov 2010 15:02:53 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201011161502.oAGF2rfr058300@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 16 Nov 2010 15:02:53 +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: r215400 - stable/7/sys/netipx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:02:54 -0000 Author: sobomax Date: Tue Nov 16 15:02:53 2010 New Revision: 215400 URL: http://svn.freebsd.org/changeset/base/215400 Log: Fix build problem introduced in r215368 MFC when IPX is enabled. Submitted by: des Modified: stable/7/sys/netipx/ipx_input.c Modified: stable/7/sys/netipx/ipx_input.c ============================================================================== --- stable/7/sys/netipx/ipx_input.c Tue Nov 16 14:08:21 2010 (r215399) +++ stable/7/sys/netipx/ipx_input.c Tue Nov 16 15:02:53 2010 (r215400) @@ -119,7 +119,6 @@ struct mtx ipxpcb_list_mtx; struct ipxpcbhead ipxpcb_list; struct ipxpcbhead ipxrawpcb_list; -static int ipxqmaxlen = ifqmaxlen; static struct ifqueue ipxintrq; long ipx_pexseq; /* Locked with ipxpcb_list_mtx. */ @@ -151,7 +150,7 @@ ipx_init(void) ipx_hostmask.sipx_addr.x_net = ipx_broadnet; ipx_hostmask.sipx_addr.x_host = ipx_broadhost; - ipxintrq.ifq_maxlen = ipxqmaxlen; + ipxintrq.ifq_maxlen = ifqmaxlen; mtx_init(&ipxintrq.ifq_mtx, "ipx_inq", NULL, MTX_DEF); netisr_register(NETISR_IPX, ipxintr, &ipxintrq, NETISR_MPSAFE); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 15:23:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA2D106566B; Tue, 16 Nov 2010 15:23:27 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from eu1sys200aog118.obsmtp.com (eu1sys200aog118.obsmtp.com [207.126.144.145]) by mx1.freebsd.org (Postfix) with SMTP id 379B38FC15; Tue, 16 Nov 2010 15:23:24 +0000 (UTC) Received: from source ([63.174.175.251]) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTOKh65I/U4894NaK0+ZfvdN4vyVn5cJj@postini.com; Tue, 16 Nov 2010 15:23:26 UTC Received: from [172.17.10.53] (unknown [172.17.10.53]) by bbbx3.usdmm.com (Postfix) with ESMTP id 7A7D5FD01B; Tue, 16 Nov 2010 15:23:22 +0000 (UTC) Message-ID: <4CE2A1B1.5030209@tomjudge.com> Date: Tue, 16 Nov 2010 09:22:25 -0600 From: Tom Judge User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: pyunyh@gmail.com References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> <4CE16414.8060606@tomjudge.com> <20101115203609.GC1257@michelle.cdnetworks.com> In-Reply-To: <20101115203609.GC1257@michelle.cdnetworks.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:23:27 -0000 On 11/15/2010 02:36 PM, Pyun YongHyeon wrote: > On Mon, Nov 15, 2010 at 10:47:16AM -0600, Tom Judge wrote: >> On 11/14/2010 06:11 PM, Alexander Motin wrote: >>> Pyun YongHyeon wrote: >>>> Author: yongari >>>> Date: Sun Nov 14 23:37:43 2010 >>>> New Revision: 215327 >>>> URL: http://svn.freebsd.org/changeset/base/215327 >>>> >>>> Log: >>>> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue >>>> such that nfe(4) does not work with MSI-X. When MSI-X support was >>>> introduced, I remember MCP55 controller worked without problems so >>>> the issue could be either PCI bridge or BIOS issue. But I also >>>> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still >>>> not sure this is generic issue of MCP55 chipset. If this was PCI >>>> bridge issue we would have added it to a system wide black-list >>>> table but it's not clear to me at this moment whether it was caused >>>> by either broken BIOS or silicon bug of MCP55 chipset. >>> >>> MCP5x seem to be infinite source of surprises. Some reports I remember: >>> - snd_hda not working with MSI enabled - AFAIR not just loosing >>> interrupts but completely stops responding; >>> - using regular HPET interrupts breaks HDA sound after some time >>> (interrupts are not shared), while legacy_route mode operates properly; >>> - at least on one system I've seen non-functioning SATA interrupts. >>> It would be nice to find what's going on there. I've got tired to add >>> workarounds for it. :( >>> >> >> Another one for the list is Intel em cards not working with MSI enabled >> on MCP51 systems. (On 8.1) >> > > And your nfe(4) on MCP51 also does not work with MSI? > If it does not work, show me the output of "pciconf -lcbv" and > "kenv | grep smbios". > I checked Linux and they does not seem to disable MSI/MSI-X for > MCP51/MCP55. But they seems to maintain two entries to selectively > disable MSI. I was using the default driver for the NIC that ships in GENERIC for 8.1 release. I did not see any issues with that. Unfortunately I have the on board nic disabled now, I will be able to reboot the system to test over the weekend. In the mean time here is the output requested: == pciconf == root@store '20:39:08' '/home/tj' > # pciconf -lcbv none0@pci0:0:0:0: class=0x050000 card=0x50001458 chip=0x02f110de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Host Bridge' class = memory subclass = RAM cap 08[44] = HT slave cap 08[e0] = HT MSI address window disabled at 0xfee00000 none1@pci0:0:0:1: class=0x050000 card=0x50001458 chip=0x02fa10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 0' class = memory subclass = RAM none2@pci0:0:0:2: class=0x050000 card=0x50001458 chip=0x02fe10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 1' class = memory subclass = RAM none3@pci0:0:0:3: class=0x050000 card=0x50001458 chip=0x02f810de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 5' class = memory subclass = RAM none4@pci0:0:0:4: class=0x050000 card=0x50001458 chip=0x02f910de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 4' class = memory subclass = RAM none5@pci0:0:0:5: class=0x050000 card=0x50001458 chip=0x02ff10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Host Bridge' class = memory subclass = RAM cap 00[44] = unknown cap 00[fe] = unknown none6@pci0:0:0:6: class=0x050000 card=0x50001458 chip=0x027f10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 3' class = memory subclass = RAM none7@pci0:0:0:7: class=0x050000 card=0x50001458 chip=0x027e10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 2' class = memory subclass = RAM pcib1@pci0:0:3:0: class=0x060400 card=0x000010de chip=0x02fd10de rev=0xa1 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'C51 PCIe Bridge' class = bridge subclass = PCI-PCI cap 0d[40] = PCI Bridge card=0x000010de cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 2 messages, 64 bit cap 08[60] = HT MSI address window disabled at 0xfee00000 cap 10[80] = PCI-Express 1 root port max data 128(128) link x1(x1) pcib2@pci0:0:4:0: class=0x060400 card=0x000010de chip=0x02fb10de rev=0xa1 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'C51 PCIe Bridge' class = bridge subclass = PCI-PCI cap 0d[40] = PCI Bridge card=0x000010de cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 2 messages, 64 bit cap 08[60] = HT MSI address window disabled at 0xfee00000 cap 10[80] = PCI-Express 1 root port max data 128(128) link x8(x16) vgapci0@pci0:0:5:0: class=0x030000 card=0xd0001458 chip=0x024210de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA GeForce 6100 (C51)' class = display subclass = VGA bar [10] = type Memory, range 32, base 0xf2000000, size 16777216, enabled bar [14] = type Prefetchable Memory, range 64, base 0xe0000000, size 268435456, enabled bar [1c] = type Memory, range 64, base 0xf3000000, size 16777216, enabled cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit none8@pci0:0:9:0: class=0x050000 card=0x50011458 chip=0x027010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Host Bridge' class = memory subclass = RAM cap 08[44] = HT slave cap 08[e0] = HT MSI address window disabled at 0xfee00000 isab0@pci0:0:10:0: class=0x060100 card=0x50011458 chip=0x026010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 LPC Bridge' class = bridge subclass = PCI-ISA none9@pci0:0:10:1: class=0x0c0500 card=0x02641458 chip=0x026410de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce PCI System Management (NVIDIA SMB Bus Controller)' class = serial bus subclass = SMBus bar [20] = type I/O Port, range 32, base 0x1c00, size 64, enabled bar [24] = type I/O Port, range 32, base 0x1c80, size 64, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 none10@pci0:0:10:2: class=0x050000 card=0x02641458 chip=0x027210de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Memory Controller 0' class = memory subclass = RAM ohci0@pci0:0:11:0: class=0x0c0310 card=0x50041458 chip=0x026d10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 USB Controller' class = serial bus subclass = USB bar [10] = type Memory, range 32, base 0xf7204000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D1 D2 D3 current D0 ehci0@pci0:0:11:1: class=0x0c0320 card=0x50041458 chip=0x026e10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 USB Controller' class = serial bus subclass = USB bar [10] = type Memory, range 32, base 0xf7205000, size 256, enabled cap 0a[44] = EHCI Debug Port at offset 0x98 in map 0x14 cap 01[80] = powerspec 2 supports D0 D1 D2 D3 current D0 atapci0@pci0:0:13:0: class=0x01018a card=0xb0001458 chip=0x026510de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Parallel ATA Controller' class = mass storage subclass = ATA bar [20] = type I/O Port, range 32, base 0xf000, size 16, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 atapci1@pci0:0:14:0: class=0x010185 card=0xb0021458 chip=0x026610de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce 430/410 Serial ATA Controller (MCP51S)' class = mass storage subclass = ATA bar [10] = type I/O Port, range 32, base 0x9f0, size 8, enabled bar [14] = type I/O Port, range 32, base 0xbf0, size 4, enabled bar [18] = type I/O Port, range 32, base 0x970, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xb70, size 4, enabled bar [20] = type I/O Port, range 32, base 0xdc00, size 16, enabled bar [24] = type Memory, range 32, base 0xf7207000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[b0] = MSI supports 4 messages, 64 bit cap 08[cc] = HT MSI fixed address window disabled at 0xfee00000 atapci2@pci0:0:15:0: class=0x010185 card=0xb0021458 chip=0x026710de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce 430/410 Serial ATA Controller (MCP51S)' class = mass storage subclass = ATA bar [10] = type I/O Port, range 32, base 0x9e0, size 8, enabled bar [14] = type I/O Port, range 32, base 0xbe0, size 4, enabled bar [18] = type I/O Port, range 32, base 0x960, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xb60, size 4, enabled bar [20] = type I/O Port, range 32, base 0xc800, size 16, enabled bar [24] = type Memory, range 32, base 0xf7206000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[b0] = MSI supports 4 messages, 64 bit cap 08[cc] = HT MSI fixed address window disabled at 0xfee00000 pcib4@pci0:0:16:0: class=0x060401 card=0x00000000 chip=0x026f10de rev=0xa2 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'MCP51 PCI Bridge' class = bridge subclass = PCI-PCI cap 0d[b8] = PCI Bridge card=0x00000000 cap 08[8c] = HT MSI address window disabled at 0xfee00000 none11@pci0:0:16:1: class=0x040300 card=0xa1021458 chip=0x026c10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'High Definition Audio Controller (MCP51)' class = multimedia subclass = HDA bar [10] = type Memory, range 32, base 0xf7200000, size 16384, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit, vector masks cap 08[6c] = HT MSI fixed address window disabled at 0xfee00000 hostb0@pci0:0:24:0: class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) HyperTransport Technology Configuration' class = bridge subclass = HOST-PCI cap 08[80] = HT host hostb1@pci0:0:24:1: class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) Address Map' class = bridge subclass = HOST-PCI hostb2@pci0:0:24:2: class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) DRAM Controller' class = bridge subclass = HOST-PCI hostb3@pci0:0:24:3: class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) Miscellaneous Control' class = bridge subclass = HOST-PCI em0@pci0:4:0:0: class=0x020000 card=0x10848086 chip=0x107d8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = 'PRO/1000 PT' class = network subclass = ethernet bar [10] = type Memory, range 32, base 0xf7100000, size 131072, enabled bar [14] = type Memory, range 32, base 0xf7120000, size 131072, enabled bar [18] = type I/O Port, range 32, base 0xb000, size 32, enabled cap 01[c8] = powerspec 2 supports D0 D3 current D0 cap 05[d0] = MSI supports 1 message, 64 bit cap 10[e0] = PCI-Express 1 endpoint max data 128(256) link x1(x1) pcib3@pci0:2:0:0: class=0x060400 card=0x00000000 chip=0x032c8086 rev=0x09 hdr=0x01 vendor = 'Intel Corporation' device = 'PCI Express-to-PCI Express Bridge (6702PXH)' class = bridge subclass = PCI-PCI cap 10[44] = PCI-Express 1 PCI bridge max data 128(256) link x8(x8) cap 05[5c] = MSI supports 1 message, 64 bit cap 01[6c] = powerspec 2 supports D0 D3 current D0 cap 07[d8] = PCI-X bridge mpt0@pci0:3:8:0: class=0x010000 card=0x1f091028 chip=0x00541000 rev=0x01 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'SAS 3000 series, 8-port with 1068 -StorPort' class = mass storage subclass = SCSI bar [10] = type I/O Port, range 32, base 0xa000, size 256, disabled bar [14] = type Memory, range 64, base 0xf6010000, size 16384, enabled bar [1c] = type Memory, range 64, base 0xf6000000, size 65536, enabled cap 01[50] = powerspec 2 supports D0 D1 D2 D3 current D0 cap 05[98] = MSI supports 1 message, 64 bit cap 07[68] = PCI-X 64-bit supports 133MHz, 2048 burst read, 16 split transactions cap 11[b0] = MSI-X supports 1 message in map 0x14 fwohci0@pci0:1:14:0: class=0x0c0010 card=0x10001458 chip=0x30441106 rev=0x80 hdr=0x00 vendor = 'VIA Technologies, Inc.' device = 'VT6306 VIA Fire II IEEE-1394 OHCI Link Layer Controller' class = serial bus subclass = FireWire bar [10] = type Memory, range 32, base 0xf7000000, size 2048, enabled bar [14] = type I/O Port, range 32, base 0x9000, size 128, enabled cap 01[50] = powerspec 2 supports D0 D2 D3 current D0 == kenv == root@store '20:39:13' '/home/tj' > # kenv | grep smbios smbios.bios.reldate="10/06/2005" smbios.bios.vendor="Award Software International, Inc." smbios.bios.version="F2" smbios.chassis.maker=" " smbios.chassis.serial=" " smbios.chassis.tag=" " smbios.chassis.version=" " smbios.memory.enabled="1572864" smbios.planar.maker="Gigabyte Technology Co., Ltd." smbios.planar.product="C51-MCP51" smbios.planar.serial="Thu Oct 20 23:29:13 2005 smbios.planar.version="x.x" smbios.socket.enabled="1" smbios.socket.populated="2" smbios.system.maker=" " smbios.system.product=" " smbios.system.serial=" " smbios.system.version=" " smbios.version="2.3" -- TJU13-ARIN From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 15:31:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17A81065672; Tue, 16 Nov 2010 15:31:16 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id B35258FC0C; Tue, 16 Nov 2010 15:31:16 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PIN4E-0001j3-HZ; Tue, 16 Nov 2010 07:03:33 -0800 Message-ID: <4CE29D3C.5040809@sippysoft.com> Date: Tue, 16 Nov 2010 07:03:24 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <201011160440.oAG4e3YU039413@svn.freebsd.org> <86k4kd8lc5.fsf@ds4.des.no> In-Reply-To: <86k4kd8lc5.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "mail.sippysoft.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 11/16/2010 5:11 AM, Dag-Erling Smørgrav wrote: > That's not going to fly. Should be fixed in r215400. Sorry about that. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:31:17 -0000 On 11/16/2010 5:11 AM, Dag-Erling Smørgrav wrote: > That's not going to fly. Should be fixed in r215400. Sorry about that. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 15:53:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE6D1065670; Tue, 16 Nov 2010 15:53:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F0778FC0C; Tue, 16 Nov 2010 15:53: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 oAGFriYr059426; Tue, 16 Nov 2010 15:53:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGFri1a059424; Tue, 16 Nov 2010 15:53:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161553.oAGFri1a059424@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 15:53: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: r215401 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:53:44 -0000 Author: avg Date: Tue Nov 16 15:53:44 2010 New Revision: 215401 URL: http://svn.freebsd.org/changeset/base/215401 Log: zfs+sendfile: populate all requested pages, not just those already cached kern_sendfile() uses vm_rdwr() to read-ahead blocks of data to populate page cache. When sendfile stumbles upon a page that is not populated yet, it sends out all the mbufs that it collected so far. This resulted in very poor performance with ZFS when file data is not in the page cache, because ZFS vop_read for UIO_NOCOPY case populated only those pages that are already in cache, but not valid. Which means that most of the time it populated only the first requested page in the described above scenario. Reported by: Alexander Zagrebin Tested by: Alexander Zagrebin , Artemiev Igor MFC after: 12 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 16 15:02:53 2010 (r215400) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 16 15:53:44 2010 (r215401) @@ -67,6 +67,7 @@ #include #include #include +#include /* * Programming rules. @@ -481,7 +482,7 @@ again: uiomove_fromphys(&m, off, bytes, uio); VM_OBJECT_LOCK(obj); vm_page_wakeup(m); - } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { + } else if (uio->uio_segflg == UIO_NOCOPY) { /* * The code below is here to make sendfile(2) work * correctly with ZFS. As pointed out by ups@ @@ -491,7 +492,7 @@ again: */ KASSERT(off == 0, ("unexpected offset in mappedread for sendfile")); - if ((m->oflags & VPO_BUSY) != 0) { + if (m != NULL && (m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -501,8 +502,17 @@ again: vm_page_flag_set(m, PG_REFERENCED); vm_page_sleep(m, "zfsmrb"); goto again; + } else if (m == NULL) { + m = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL); + if (m == NULL) { + VM_OBJECT_UNLOCK(obj); + VM_WAIT; + VM_OBJECT_LOCK(obj); + goto again; + } } - vm_page_busy(m); + vm_page_io_start(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { error = dmu_read_uio(os, zp->z_id, uio, @@ -520,7 +530,7 @@ again: VM_OBJECT_LOCK(obj); if (error == 0) m->valid = VM_PAGE_BITS_ALL; - vm_page_wakeup(m); + vm_page_io_finish(m); if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes; From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 16:12:29 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E721106566C; Tue, 16 Nov 2010 16:12:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5BA8FC13; Tue, 16 Nov 2010 16:12:28 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAGGCPq9008655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Nov 2010 03:12:26 +1100 Date: Wed, 17 Nov 2010 03:12:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Maxim Sobolev In-Reply-To: <201011160440.oAG4e3YU039413@svn.freebsd.org> Message-ID: <20101117030118.X1203@besplex.bde.org> References: <201011160440.oAG4e3YU039413@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 16:12:29 -0000 On Tue, 16 Nov 2010, Maxim Sobolev wrote: > Log: > MFC r207554: > > Add new tunable 'net.link.ifqmaxlen' to set default send interface > queue length. The default value for this parameter is 50, which is > quite low for many of today's uses and the only way to modify this > parameter right now is to edit if_var.h file. Also add read-only > sysctl with the same name, so that it's possible to retrieve the > current value. This was quite low for yestdeay's uses (starting in about 1995), but today it is little missed since only yesterday's low-end hardware uses it. Most of today's interfaces are 1Gbps, and for this it is almost essential for the hardware to have a ring buffer with > 50 entries, so most of today's drivers ignore ifqmaxlen and set the queue length to the almost equally bogus value of the ring buffer size (-1). I set it to about 10000 instead in bge and em (10000 is too large, but fixes streaming under certain loads when hz is small). > Modified: > stable/7/sys/arm/at91/if_ate.c > stable/7/sys/arm/xscale/ixp425/if_npe.c > stable/7/sys/contrib/dev/oltr/if_oltr.c > stable/7/sys/dev/ae/if_ae.c > stable/7/sys/dev/an/if_an.c > stable/7/sys/dev/ar/if_ar.c > stable/7/sys/dev/arl/if_arl.c > stable/7/sys/dev/ath/if_ath.c > stable/7/sys/dev/awi/awi.c > stable/7/sys/dev/ce/if_ce.c > stable/7/sys/dev/cm/smc90cx6.c > stable/7/sys/dev/cnw/if_cnw.c > stable/7/sys/dev/cp/if_cp.c > stable/7/sys/dev/cs/if_cs.c > stable/7/sys/dev/ctau/if_ct.c > stable/7/sys/dev/cx/if_cx.c > stable/7/sys/dev/cxgb/cxgb_main.c > stable/7/sys/dev/ed/if_ed.c > stable/7/sys/dev/ep/if_ep.c > stable/7/sys/dev/ex/if_ex.c > stable/7/sys/dev/ie/if_ie.c > stable/7/sys/dev/iicbus/if_ic.c > stable/7/sys/dev/ipw/if_ipw.c > stable/7/sys/dev/iwi/if_iwi.c > stable/7/sys/dev/le/lance.c > stable/7/sys/dev/malo/if_malo.c > stable/7/sys/dev/my/if_my.c > stable/7/sys/dev/nxge/if_nxge.c > stable/7/sys/dev/pdq/pdq_ifsubr.c > stable/7/sys/dev/ppbus/if_plip.c > stable/7/sys/dev/ral/rt2560.c > stable/7/sys/dev/ral/rt2661.c > stable/7/sys/dev/ray/if_ray.c > stable/7/sys/dev/sbni/if_sbni.c > stable/7/sys/dev/sbsh/if_sbsh.c > stable/7/sys/dev/sn/if_sn.c > stable/7/sys/dev/snc/dp83932.c > stable/7/sys/dev/sr/if_sr.c > stable/7/sys/dev/usb/if_aue.c > stable/7/sys/dev/usb/if_axe.c > stable/7/sys/dev/usb/if_cdce.c > stable/7/sys/dev/usb/if_cue.c > stable/7/sys/dev/usb/if_kue.c > stable/7/sys/dev/usb/if_rue.c > stable/7/sys/dev/usb/if_rum.c > stable/7/sys/dev/usb/if_udav.c > stable/7/sys/dev/usb/if_ural.c > stable/7/sys/dev/usb/if_zyd.c > stable/7/sys/dev/usb/udbp.c > stable/7/sys/dev/vx/if_vx.c > stable/7/sys/dev/wi/if_wi.c > stable/7/sys/dev/wl/if_wl.c > stable/7/sys/dev/wpi/if_wpi.c > stable/7/sys/dev/xe/if_xe.c > stable/7/sys/i4b/capi/capi_l4if.c > stable/7/sys/i4b/driver/i4b_ing.c > stable/7/sys/i4b/driver/i4b_isppp.c > stable/7/sys/i4b/driver/i4b_trace.c > stable/7/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c > stable/7/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c > stable/7/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c > stable/7/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c > stable/7/sys/i4b/layer1/isic/i4b_bchan.c > stable/7/sys/i4b/layer1/itjc/i4b_itjc_pci.c > stable/7/sys/i4b/layer1/iwic/i4b_iwic_bchan.c > stable/7/sys/i4b/layer4/i4b_i4bdrv.c Note that there is only yeterday's hardware in this list. The queue length should be per-interface and configured only by a sysctl, or better, drivers dynamically configure it to a good value. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 17:44:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 155BC1065675; Tue, 16 Nov 2010 17:44:10 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9298FC19; Tue, 16 Nov 2010 17:44: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 oAGHi9Cf061922; Tue, 16 Nov 2010 17:44:09 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGHi9Zl061920; Tue, 16 Nov 2010 17:44:09 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201011161744.oAGHi9Zl061920@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 16 Nov 2010 17:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215402 - stable/8/release/picobsd/build X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 17:44:10 -0000 Author: luigi Date: Tue Nov 16 17:44:09 2010 New Revision: 215402 URL: http://svn.freebsd.org/changeset/base/215402 Log: sync with the version in HEAD -- use ${BINMAKE} built by the toolchain and not the hosts's make Modified: stable/8/release/picobsd/build/picobsd Modified: stable/8/release/picobsd/build/picobsd ============================================================================== --- stable/8/release/picobsd/build/picobsd Tue Nov 16 15:53:44 2010 (r215401) +++ stable/8/release/picobsd/build/picobsd Tue Nov 16 17:44:09 2010 (r215402) @@ -176,9 +176,9 @@ create_includes_and_libraries2() { # opt ( cd ${SRC}; # make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld if [ -d "$1" ] ; then - cd $1 ; make $2 # specific target, e.g. ld-elf.so + cd $1 ; ${BINMAKE} $2 # specific target, e.g. ld-elf.so else - make _+_= $no toolchain _includes _libraries + ${BINMAKE} _+_= $no toolchain _includes _libraries fi ) } @@ -297,11 +297,6 @@ build_image() { PICO_OBJ=${l_objtree}/picobsd/${THETYPE} log "PICO_OBJ is ${PICO_OBJ}" - if [ ${OSVERSION} -ge 500035 ] ; then - export MAKEOBJDIRPREFIX=${l_objtree} - eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" - eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` - fi # create build directory and subtree mkdir -p ${BUILDDIR}/crunch # remove any old stuff @@ -979,10 +974,17 @@ set_build_parameters() { l_usrtree=${USR:-${SRC}/../usr} fi l_objtree=${l_usrtree}/obj-pico + PICO_TREE=${PICO_TREE:-${SRC}/release/picobsd} set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h` OSVERSION=$3 log "OSVERSION is ${OSVERSION}" + if [ ${OSVERSION} -ge 500035 ] ; then + export MAKEOBJDIRPREFIX=${l_objtree} + eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" + eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` + fi + if [ "${o_init_src}" != "" ] ; then if [ ${OSVERSION} -lt 500035 ] ; then create_includes_and_libraries From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:21:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FFE11065698; Tue, 16 Nov 2010 20:21:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 339888FC31; Tue, 16 Nov 2010 20:21: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 oAGKLs1l066203; Tue, 16 Nov 2010 20:21:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKLsNg066201; Tue, 16 Nov 2010 20:21:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162021.oAGKLsNg066201@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215403 - stable/8/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:21:54 -0000 Author: yongari Date: Tue Nov 16 20:21:53 2010 New Revision: 215403 URL: http://svn.freebsd.org/changeset/base/215403 Log: MFC r214992: Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does. Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Tue Nov 16 17:44:09 2010 (r215402) +++ stable/8/sys/dev/re/if_re.c Tue Nov 16 20:21:53 2010 (r215403) @@ -423,13 +423,12 @@ re_gmii_readreg(device_t dev, int phy, i } CSR_WRITE_4(sc, RL_PHYAR, reg << 16); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (rval & RL_PHYAR_BUSY) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -437,6 +436,11 @@ re_gmii_readreg(device_t dev, int phy, i return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (rval & RL_PHYAR_PHYDATA); } @@ -451,13 +455,12 @@ re_gmii_writereg(device_t dev, int phy, CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (!(rval & RL_PHYAR_BUSY)) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -465,6 +468,11 @@ re_gmii_writereg(device_t dev, int phy, return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:27:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EE571065675; Tue, 16 Nov 2010 20:27:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 123C48FC08; Tue, 16 Nov 2010 20:27: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 oAGKR105066368; Tue, 16 Nov 2010 20:27:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKR1dJ066366; Tue, 16 Nov 2010 20:27:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162027.oAGKR1dJ066366@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215404 - stable/7/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:27:02 -0000 Author: yongari Date: Tue Nov 16 20:27:01 2010 New Revision: 215404 URL: http://svn.freebsd.org/changeset/base/215404 Log: MFC r214992: Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does. Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Nov 16 20:21:53 2010 (r215403) +++ stable/7/sys/dev/re/if_re.c Tue Nov 16 20:27:01 2010 (r215404) @@ -424,13 +424,12 @@ re_gmii_readreg(device_t dev, int phy, i } CSR_WRITE_4(sc, RL_PHYAR, reg << 16); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (rval & RL_PHYAR_BUSY) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -438,6 +437,11 @@ re_gmii_readreg(device_t dev, int phy, i return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (rval & RL_PHYAR_PHYDATA); } @@ -452,13 +456,12 @@ re_gmii_writereg(device_t dev, int phy, CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); - DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); if (!(rval & RL_PHYAR_BUSY)) break; - DELAY(100); + DELAY(25); } if (i == RL_PHY_TIMEOUT) { @@ -466,6 +469,11 @@ re_gmii_writereg(device_t dev, int phy, return (0); } + /* + * Controller requires a 20us delay to process next MDIO request. + */ + DELAY(20); + return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:32:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03C310656A7; Tue, 16 Nov 2010 20:32:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C39DA8FC1A; Tue, 16 Nov 2010 20:32: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 oAGKW9YK066537; Tue, 16 Nov 2010 20:32:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKW98l066534; Tue, 16 Nov 2010 20:32:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162032.oAGKW98l066534@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215405 - in stable/8/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:32:10 -0000 Author: yongari Date: Tue Nov 16 20:32:09 2010 New Revision: 215405 URL: http://svn.freebsd.org/changeset/base/215405 Log: MFC r215017,215025: Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver MFC r215025: Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation. Modified: stable/8/sys/dev/re/if_re.c stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Tue Nov 16 20:27:01 2010 (r215404) +++ stable/8/sys/dev/re/if_re.c Tue Nov 16 20:32:09 2010 (r215405) @@ -2715,6 +2715,24 @@ re_init_locked(struct rl_softc *sc) */ re_set_rxmode(sc); + /* Configure interrupt moderation. */ + if (sc->rl_type == RL_8169) { + switch (sc->rl_hwrev) { + case RL_HWREV_8100E: + case RL_HWREV_8101E: + case RL_HWREV_8102E: + case RL_HWREV_8102EL: + case RL_HWREV_8102EL_SPIN1: + case RL_HWREV_8103E: + CSR_WRITE_2(sc, RL_INTRMOD, 0); + break; + default: + /* Magic from vendor. */ + CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); + break; + } + } + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:27:01 2010 (r215404) +++ stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:32:09 2010 (r215405) @@ -125,6 +125,7 @@ /* * Registers specific to the 8169 gigE chip */ +#define RL_GTXSTART 0x0038 /* 8 bits */ #define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ #define RL_PHYAR 0x0060 #define RL_TBICSR 0x0064 @@ -135,7 +136,7 @@ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ #define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:34:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17FB81065673; Tue, 16 Nov 2010 20:34:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1008FC25; Tue, 16 Nov 2010 20:34: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 oAGKY0fR066649; Tue, 16 Nov 2010 20:34:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKY020066646; Tue, 16 Nov 2010 20:34:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162034.oAGKY020066646@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:34:00 +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: r215406 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:34:01 -0000 Author: yongari Date: Tue Nov 16 20:34:00 2010 New Revision: 215406 URL: http://svn.freebsd.org/changeset/base/215406 Log: MFC r215017,215025: Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver MFC r215025: Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation. Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Nov 16 20:32:09 2010 (r215405) +++ stable/7/sys/dev/re/if_re.c Tue Nov 16 20:34:00 2010 (r215406) @@ -2709,6 +2709,24 @@ re_init_locked(struct rl_softc *sc) */ re_set_rxmode(sc); + /* Configure interrupt moderation. */ + if (sc->rl_type == RL_8169) { + switch (sc->rl_hwrev) { + case RL_HWREV_8100E: + case RL_HWREV_8101E: + case RL_HWREV_8102E: + case RL_HWREV_8102EL: + case RL_HWREV_8102EL_SPIN1: + case RL_HWREV_8103E: + CSR_WRITE_2(sc, RL_INTRMOD, 0); + break; + default: + /* Magic from vendor. */ + CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); + break; + } + } + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Nov 16 20:32:09 2010 (r215405) +++ stable/7/sys/pci/if_rlreg.h Tue Nov 16 20:34:00 2010 (r215406) @@ -125,6 +125,7 @@ /* * Registers specific to the 8169 gigE chip */ +#define RL_GTXSTART 0x0038 /* 8 bits */ #define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ #define RL_PHYAR 0x0060 #define RL_TBICSR 0x0064 @@ -135,7 +136,7 @@ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ #define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:36:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE43E106566C; Tue, 16 Nov 2010 20:36:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB4B58FC1B; Tue, 16 Nov 2010 20:36: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 oAGKaqQ1066778; Tue, 16 Nov 2010 20:36:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKaqh6066776; Tue, 16 Nov 2010 20:36:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162036.oAGKaqh6066776@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215407 - stable/8/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:36:53 -0000 Author: yongari Date: Tue Nov 16 20:36:52 2010 New Revision: 215407 URL: http://svn.freebsd.org/changeset/base/215407 Log: MFC r215018-215020: r215018: Consistently use tab character instead of using space character. No functional changes. r215019: Remove trailing white spaces. r215020: Remove standard PCI configuration space register definitions. Modified: stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:34:00 2010 (r215406) +++ stable/8/sys/pci/if_rlreg.h Tue Nov 16 20:36:52 2010 (r215407) @@ -36,211 +36,211 @@ * RealTek 8129/8139 register offsets */ #define RL_IDR0 0x0000 /* ID register 0 (station addr) */ -#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ -#define RL_IDR2 0x0002 -#define RL_IDR3 0x0003 -#define RL_IDR4 0x0004 -#define RL_IDR5 0x0005 +#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ +#define RL_IDR2 0x0002 +#define RL_IDR3 0x0003 +#define RL_IDR4 0x0004 +#define RL_IDR5 0x0005 /* 0006-0007 reserved */ -#define RL_MAR0 0x0008 /* Multicast hash table */ -#define RL_MAR1 0x0009 -#define RL_MAR2 0x000A -#define RL_MAR3 0x000B -#define RL_MAR4 0x000C -#define RL_MAR5 0x000D -#define RL_MAR6 0x000E -#define RL_MAR7 0x000F - -#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ -#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ -#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ -#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ - -#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ -#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ -#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ -#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ - -#define RL_RXADDR 0x0030 /* RX ring start address */ -#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ -#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ -#define RL_COMMAND 0x0037 /* command register */ -#define RL_CURRXADDR 0x0038 /* current address of packet read */ -#define RL_CURRXBUF 0x003A /* current RX buffer address */ -#define RL_IMR 0x003C /* interrupt mask register */ -#define RL_ISR 0x003E /* interrupt status register */ -#define RL_TXCFG 0x0040 /* transmit config */ -#define RL_RXCFG 0x0044 /* receive config */ -#define RL_TIMERCNT 0x0048 /* timer count register */ -#define RL_MISSEDPKT 0x004C /* missed packet counter */ -#define RL_EECMD 0x0050 /* EEPROM command register */ -#define RL_CFG0 0x0051 /* config register #0 */ -#define RL_CFG1 0x0052 /* config register #1 */ +#define RL_MAR0 0x0008 /* Multicast hash table */ +#define RL_MAR1 0x0009 +#define RL_MAR2 0x000A +#define RL_MAR3 0x000B +#define RL_MAR4 0x000C +#define RL_MAR5 0x000D +#define RL_MAR6 0x000E +#define RL_MAR7 0x000F + +#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ +#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ +#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ +#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ + +#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ +#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ +#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ +#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ + +#define RL_RXADDR 0x0030 /* RX ring start address */ +#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ +#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ +#define RL_COMMAND 0x0037 /* command register */ +#define RL_CURRXADDR 0x0038 /* current address of packet read */ +#define RL_CURRXBUF 0x003A /* current RX buffer address */ +#define RL_IMR 0x003C /* interrupt mask register */ +#define RL_ISR 0x003E /* interrupt status register */ +#define RL_TXCFG 0x0040 /* transmit config */ +#define RL_RXCFG 0x0044 /* receive config */ +#define RL_TIMERCNT 0x0048 /* timer count register */ +#define RL_MISSEDPKT 0x004C /* missed packet counter */ +#define RL_EECMD 0x0050 /* EEPROM command register */ +#define RL_CFG0 0x0051 /* config register #0 */ +#define RL_CFG1 0x0052 /* config register #1 */ #define RL_CFG2 0x0053 /* config register #2 */ #define RL_CFG3 0x0054 /* config register #3 */ #define RL_CFG4 0x0055 /* config register #4 */ #define RL_CFG5 0x0056 /* config register #5 */ /* 0057 reserved */ -#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ +#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ /* 0059-005A reserved */ -#define RL_MII 0x005A /* 8129 chip only */ -#define RL_HALTCLK 0x005B -#define RL_MULTIINTR 0x005C /* multiple interrupt */ -#define RL_PCIREV 0x005E /* PCI revision value */ +#define RL_MII 0x005A /* 8129 chip only */ +#define RL_HALTCLK 0x005B +#define RL_MULTIINTR 0x005C /* multiple interrupt */ +#define RL_PCIREV 0x005E /* PCI revision value */ /* 005F reserved */ -#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ +#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ /* Direct PHY access registers only available on 8139 */ -#define RL_BMCR 0x0062 /* PHY basic mode control */ -#define RL_BMSR 0x0064 /* PHY basic mode status */ -#define RL_ANAR 0x0066 /* PHY autoneg advert */ -#define RL_LPAR 0x0068 /* PHY link partner ability */ -#define RL_ANER 0x006A /* PHY autoneg expansion */ - -#define RL_DISCCNT 0x006C /* disconnect counter */ -#define RL_FALSECAR 0x006E /* false carrier counter */ -#define RL_NWAYTST 0x0070 /* NWAY test register */ -#define RL_RX_ER 0x0072 /* RX_ER counter */ -#define RL_CSCFG 0x0074 /* CS configuration register */ +#define RL_BMCR 0x0062 /* PHY basic mode control */ +#define RL_BMSR 0x0064 /* PHY basic mode status */ +#define RL_ANAR 0x0066 /* PHY autoneg advert */ +#define RL_LPAR 0x0068 /* PHY link partner ability */ +#define RL_ANER 0x006A /* PHY autoneg expansion */ + +#define RL_DISCCNT 0x006C /* disconnect counter */ +#define RL_FALSECAR 0x006E /* false carrier counter */ +#define RL_NWAYTST 0x0070 /* NWAY test register */ +#define RL_RX_ER 0x0072 /* RX_ER counter */ +#define RL_CSCFG 0x0074 /* CS configuration register */ /* * When operating in special C+ mode, some of the registers in an * 8139C+ chip have different definitions. These are also used for * the 8169 gigE chip. */ -#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ -#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ -#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ -#define RL_CFG2 0x0053 -#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ -#define RL_TXSTART 0x00D9 /* 8 bits */ -#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ -#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ -#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ -#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ +#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ +#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ +#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ +#define RL_CFG2 0x0053 +#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ +#define RL_TXSTART 0x00D9 /* 8 bits */ +#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ +#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ +#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ +#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ /* * Registers specific to the 8169 gigE chip */ -#define RL_GTXSTART 0x0038 /* 8 bits */ -#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ -#define RL_PHYAR 0x0060 -#define RL_TBICSR 0x0064 -#define RL_TBI_ANAR 0x0068 -#define RL_TBI_LPAR 0x006A -#define RL_GMEDIASTAT 0x006C /* 8 bits */ -#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ -#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ -#define RL_PMCH 0x006F /* 8 bits */ -#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_INTRMOD 0x00E2 /* 16 bits */ +#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ +#define RL_PHYAR 0x0060 +#define RL_TBICSR 0x0064 +#define RL_TBI_ANAR 0x0068 +#define RL_TBI_LPAR 0x006A +#define RL_GMEDIASTAT 0x006C /* 8 bits */ +#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ +#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ +#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits */ -#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ -#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ -#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ -#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ -#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ -#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ -#define RL_TXCFG_HWREV 0x7CC00000 - -#define RL_LOOPTEST_OFF 0x00000000 -#define RL_LOOPTEST_ON 0x00020000 -#define RL_LOOPTEST_ON_CPLUS 0x00060000 +#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ +#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ +#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ +#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ +#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ +#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ +#define RL_TXCFG_HWREV 0x7CC00000 + +#define RL_LOOPTEST_OFF 0x00000000 +#define RL_LOOPTEST_ON 0x00020000 +#define RL_LOOPTEST_ON_CPLUS 0x00060000 /* Known revision codes. */ -#define RL_HWREV_8169 0x00000000 -#define RL_HWREV_8169S 0x00800000 -#define RL_HWREV_8110S 0x04000000 -#define RL_HWREV_8169_8110SB 0x10000000 -#define RL_HWREV_8169_8110SC 0x18000000 -#define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24C00000 -#define RL_HWREV_8168D 0x28000000 -#define RL_HWREV_8168DP 0x28800000 -#define RL_HWREV_8168E 0x2C000000 -#define RL_HWREV_8168_SPIN1 0x30000000 -#define RL_HWREV_8100E 0x30800000 -#define RL_HWREV_8101E 0x34000000 -#define RL_HWREV_8102E 0x34800000 -#define RL_HWREV_8103E 0x34C00000 -#define RL_HWREV_8168_SPIN2 0x38000000 -#define RL_HWREV_8168_SPIN3 0x38400000 -#define RL_HWREV_8168C 0x3C000000 -#define RL_HWREV_8168C_SPIN2 0x3C400000 -#define RL_HWREV_8168CP 0x3C800000 -#define RL_HWREV_8139 0x60000000 -#define RL_HWREV_8139A 0x70000000 -#define RL_HWREV_8139AG 0x70800000 -#define RL_HWREV_8139B 0x78000000 -#define RL_HWREV_8130 0x7C000000 -#define RL_HWREV_8139C 0x74000000 -#define RL_HWREV_8139D 0x74400000 -#define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74C00000 -#define RL_HWREV_8100 0x78800000 -#define RL_HWREV_8169_8110SBL 0x7CC00000 -#define RL_HWREV_8169_8110SCE 0x98000000 - -#define RL_TXDMA_16BYTES 0x00000000 -#define RL_TXDMA_32BYTES 0x00000100 -#define RL_TXDMA_64BYTES 0x00000200 -#define RL_TXDMA_128BYTES 0x00000300 -#define RL_TXDMA_256BYTES 0x00000400 -#define RL_TXDMA_512BYTES 0x00000500 -#define RL_TXDMA_1024BYTES 0x00000600 -#define RL_TXDMA_2048BYTES 0x00000700 +#define RL_HWREV_8169 0x00000000 +#define RL_HWREV_8169S 0x00800000 +#define RL_HWREV_8110S 0x04000000 +#define RL_HWREV_8169_8110SB 0x10000000 +#define RL_HWREV_8169_8110SC 0x18000000 +#define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 +#define RL_HWREV_8168D 0x28000000 +#define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 +#define RL_HWREV_8168_SPIN1 0x30000000 +#define RL_HWREV_8100E 0x30800000 +#define RL_HWREV_8101E 0x34000000 +#define RL_HWREV_8102E 0x34800000 +#define RL_HWREV_8103E 0x34C00000 +#define RL_HWREV_8168_SPIN2 0x38000000 +#define RL_HWREV_8168_SPIN3 0x38400000 +#define RL_HWREV_8168C 0x3C000000 +#define RL_HWREV_8168C_SPIN2 0x3C400000 +#define RL_HWREV_8168CP 0x3C800000 +#define RL_HWREV_8139 0x60000000 +#define RL_HWREV_8139A 0x70000000 +#define RL_HWREV_8139AG 0x70800000 +#define RL_HWREV_8139B 0x78000000 +#define RL_HWREV_8130 0x7C000000 +#define RL_HWREV_8139C 0x74000000 +#define RL_HWREV_8139D 0x74400000 +#define RL_HWREV_8139CPLUS 0x74800000 +#define RL_HWREV_8101 0x74C00000 +#define RL_HWREV_8100 0x78800000 +#define RL_HWREV_8169_8110SBL 0x7CC00000 +#define RL_HWREV_8169_8110SCE 0x98000000 + +#define RL_TXDMA_16BYTES 0x00000000 +#define RL_TXDMA_32BYTES 0x00000100 +#define RL_TXDMA_64BYTES 0x00000200 +#define RL_TXDMA_128BYTES 0x00000300 +#define RL_TXDMA_256BYTES 0x00000400 +#define RL_TXDMA_512BYTES 0x00000500 +#define RL_TXDMA_1024BYTES 0x00000600 +#define RL_TXDMA_2048BYTES 0x00000700 /* * Transmit descriptor status register bits. */ -#define RL_TXSTAT_LENMASK 0x00001FFF -#define RL_TXSTAT_OWN 0x00002000 -#define RL_TXSTAT_TX_UNDERRUN 0x00004000 -#define RL_TXSTAT_TX_OK 0x00008000 -#define RL_TXSTAT_EARLY_THRESH 0x003F0000 -#define RL_TXSTAT_COLLCNT 0x0F000000 -#define RL_TXSTAT_CARR_HBEAT 0x10000000 -#define RL_TXSTAT_OUTOFWIN 0x20000000 -#define RL_TXSTAT_TXABRT 0x40000000 -#define RL_TXSTAT_CARRLOSS 0x80000000 +#define RL_TXSTAT_LENMASK 0x00001FFF +#define RL_TXSTAT_OWN 0x00002000 +#define RL_TXSTAT_TX_UNDERRUN 0x00004000 +#define RL_TXSTAT_TX_OK 0x00008000 +#define RL_TXSTAT_EARLY_THRESH 0x003F0000 +#define RL_TXSTAT_COLLCNT 0x0F000000 +#define RL_TXSTAT_CARR_HBEAT 0x10000000 +#define RL_TXSTAT_OUTOFWIN 0x20000000 +#define RL_TXSTAT_TXABRT 0x40000000 +#define RL_TXSTAT_CARRLOSS 0x80000000 /* * Interrupt status register bits. */ -#define RL_ISR_RX_OK 0x0001 -#define RL_ISR_RX_ERR 0x0002 -#define RL_ISR_TX_OK 0x0004 -#define RL_ISR_TX_ERR 0x0008 -#define RL_ISR_RX_OVERRUN 0x0010 -#define RL_ISR_PKT_UNDERRUN 0x0020 -#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ -#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ -#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ -#define RL_ISR_SWI 0x0100 /* C+ only */ -#define RL_ISR_CABLE_LEN_CHGD 0x2000 -#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ -#define RL_ISR_TIMEOUT_EXPIRED 0x4000 -#define RL_ISR_SYSTEM_ERR 0x8000 +#define RL_ISR_RX_OK 0x0001 +#define RL_ISR_RX_ERR 0x0002 +#define RL_ISR_TX_OK 0x0004 +#define RL_ISR_TX_ERR 0x0008 +#define RL_ISR_RX_OVERRUN 0x0010 +#define RL_ISR_PKT_UNDERRUN 0x0020 +#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ +#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ +#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ +#define RL_ISR_SWI 0x0100 /* C+ only */ +#define RL_ISR_CABLE_LEN_CHGD 0x2000 +#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ +#define RL_ISR_TIMEOUT_EXPIRED 0x4000 +#define RL_ISR_SYSTEM_ERR 0x8000 -#define RL_INTRS \ +#define RL_INTRS \ (RL_ISR_TX_OK|RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR) #ifdef RE_TX_MODERATION -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) #else -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR|RL_ISR_TX_OK| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) @@ -249,169 +249,169 @@ /* * Media status register. (8139 only) */ -#define RL_MEDIASTAT_RXPAUSE 0x01 -#define RL_MEDIASTAT_TXPAUSE 0x02 -#define RL_MEDIASTAT_LINK 0x04 -#define RL_MEDIASTAT_SPEED10 0x08 -#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ -#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ +#define RL_MEDIASTAT_RXPAUSE 0x01 +#define RL_MEDIASTAT_TXPAUSE 0x02 +#define RL_MEDIASTAT_LINK 0x04 +#define RL_MEDIASTAT_SPEED10 0x08 +#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ +#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ /* * Receive config register. */ -#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ -#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ -#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ -#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ -#define RL_RXCFG_RX_RUNT 0x00000010 -#define RL_RXCFG_RX_ERRPKT 0x00000020 -#define RL_RXCFG_WRAP 0x00000080 -#define RL_RXCFG_MAXDMA 0x00000700 -#define RL_RXCFG_BUFSZ 0x00001800 -#define RL_RXCFG_FIFOTHRESH 0x0000E000 -#define RL_RXCFG_EARLYTHRESH 0x07000000 - -#define RL_RXDMA_16BYTES 0x00000000 -#define RL_RXDMA_32BYTES 0x00000100 -#define RL_RXDMA_64BYTES 0x00000200 -#define RL_RXDMA_128BYTES 0x00000300 -#define RL_RXDMA_256BYTES 0x00000400 -#define RL_RXDMA_512BYTES 0x00000500 -#define RL_RXDMA_1024BYTES 0x00000600 -#define RL_RXDMA_UNLIMITED 0x00000700 - -#define RL_RXBUF_8 0x00000000 -#define RL_RXBUF_16 0x00000800 -#define RL_RXBUF_32 0x00001000 -#define RL_RXBUF_64 0x00001800 - -#define RL_RXFIFO_16BYTES 0x00000000 -#define RL_RXFIFO_32BYTES 0x00002000 -#define RL_RXFIFO_64BYTES 0x00004000 -#define RL_RXFIFO_128BYTES 0x00006000 -#define RL_RXFIFO_256BYTES 0x00008000 -#define RL_RXFIFO_512BYTES 0x0000A000 -#define RL_RXFIFO_1024BYTES 0x0000C000 -#define RL_RXFIFO_NOTHRESH 0x0000E000 +#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ +#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ +#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ +#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ +#define RL_RXCFG_RX_RUNT 0x00000010 +#define RL_RXCFG_RX_ERRPKT 0x00000020 +#define RL_RXCFG_WRAP 0x00000080 +#define RL_RXCFG_MAXDMA 0x00000700 +#define RL_RXCFG_BUFSZ 0x00001800 +#define RL_RXCFG_FIFOTHRESH 0x0000E000 +#define RL_RXCFG_EARLYTHRESH 0x07000000 + +#define RL_RXDMA_16BYTES 0x00000000 +#define RL_RXDMA_32BYTES 0x00000100 +#define RL_RXDMA_64BYTES 0x00000200 +#define RL_RXDMA_128BYTES 0x00000300 +#define RL_RXDMA_256BYTES 0x00000400 +#define RL_RXDMA_512BYTES 0x00000500 +#define RL_RXDMA_1024BYTES 0x00000600 +#define RL_RXDMA_UNLIMITED 0x00000700 + +#define RL_RXBUF_8 0x00000000 +#define RL_RXBUF_16 0x00000800 +#define RL_RXBUF_32 0x00001000 +#define RL_RXBUF_64 0x00001800 + +#define RL_RXFIFO_16BYTES 0x00000000 +#define RL_RXFIFO_32BYTES 0x00002000 +#define RL_RXFIFO_64BYTES 0x00004000 +#define RL_RXFIFO_128BYTES 0x00006000 +#define RL_RXFIFO_256BYTES 0x00008000 +#define RL_RXFIFO_512BYTES 0x0000A000 +#define RL_RXFIFO_1024BYTES 0x0000C000 +#define RL_RXFIFO_NOTHRESH 0x0000E000 /* * Bits in RX status header (included with RX'ed packet * in ring buffer). */ -#define RL_RXSTAT_RXOK 0x00000001 -#define RL_RXSTAT_ALIGNERR 0x00000002 -#define RL_RXSTAT_CRCERR 0x00000004 -#define RL_RXSTAT_GIANT 0x00000008 -#define RL_RXSTAT_RUNT 0x00000010 -#define RL_RXSTAT_BADSYM 0x00000020 -#define RL_RXSTAT_BROAD 0x00002000 -#define RL_RXSTAT_INDIV 0x00004000 -#define RL_RXSTAT_MULTI 0x00008000 -#define RL_RXSTAT_LENMASK 0xFFFF0000 +#define RL_RXSTAT_RXOK 0x00000001 +#define RL_RXSTAT_ALIGNERR 0x00000002 +#define RL_RXSTAT_CRCERR 0x00000004 +#define RL_RXSTAT_GIANT 0x00000008 +#define RL_RXSTAT_RUNT 0x00000010 +#define RL_RXSTAT_BADSYM 0x00000020 +#define RL_RXSTAT_BROAD 0x00002000 +#define RL_RXSTAT_INDIV 0x00004000 +#define RL_RXSTAT_MULTI 0x00008000 +#define RL_RXSTAT_LENMASK 0xFFFF0000 -#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ +#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ /* * Command register. */ -#define RL_CMD_EMPTY_RXBUF 0x0001 -#define RL_CMD_TX_ENB 0x0004 -#define RL_CMD_RX_ENB 0x0008 -#define RL_CMD_RESET 0x0010 -#define RL_CMD_STOPREQ 0x0080 +#define RL_CMD_EMPTY_RXBUF 0x0001 +#define RL_CMD_TX_ENB 0x0004 +#define RL_CMD_RX_ENB 0x0008 +#define RL_CMD_RESET 0x0010 +#define RL_CMD_STOPREQ 0x0080 /* * Twister register values. These are completely undocumented and derived * from public sources. */ -#define RL_CSCFG_LINK_OK 0x0400 -#define RL_CSCFG_CHANGE 0x0800 -#define RL_CSCFG_STATUS 0xf000 -#define RL_CSCFG_ROW3 0x7000 -#define RL_CSCFG_ROW2 0x3000 -#define RL_CSCFG_ROW1 0x1000 -#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 -#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 - -#define RL_NWAYTST_RESET 0 -#define RL_NWAYTST_CBL_TEST 0x20 - -#define RL_PARA78 0x78 -#define RL_PARA78_DEF 0x78fa8388 -#define RL_PARA7C 0x7C -#define RL_PARA7C_DEF 0xcb38de43 -#define RL_PARA7C_RETUNE 0xfb38de03 +#define RL_CSCFG_LINK_OK 0x0400 +#define RL_CSCFG_CHANGE 0x0800 +#define RL_CSCFG_STATUS 0xf000 +#define RL_CSCFG_ROW3 0x7000 +#define RL_CSCFG_ROW2 0x3000 +#define RL_CSCFG_ROW1 0x1000 +#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 +#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 + +#define RL_NWAYTST_RESET 0 +#define RL_NWAYTST_CBL_TEST 0x20 + +#define RL_PARA78 0x78 +#define RL_PARA78_DEF 0x78fa8388 +#define RL_PARA7C 0x7C +#define RL_PARA7C_DEF 0xcb38de43 +#define RL_PARA7C_RETUNE 0xfb38de03 /* * EEPROM control register */ -#define RL_EE_DATAOUT 0x01 /* Data out */ -#define RL_EE_DATAIN 0x02 /* Data in */ -#define RL_EE_CLK 0x04 /* clock */ -#define RL_EE_SEL 0x08 /* chip select */ -#define RL_EE_MODE (0x40|0x80) - -#define RL_EEMODE_OFF 0x00 -#define RL_EEMODE_AUTOLOAD 0x40 -#define RL_EEMODE_PROGRAM 0x80 -#define RL_EEMODE_WRITECFG (0x80|0x40) +#define RL_EE_DATAOUT 0x01 /* Data out */ +#define RL_EE_DATAIN 0x02 /* Data in */ +#define RL_EE_CLK 0x04 /* clock */ +#define RL_EE_SEL 0x08 /* chip select */ +#define RL_EE_MODE (0x40|0x80) + +#define RL_EEMODE_OFF 0x00 +#define RL_EEMODE_AUTOLOAD 0x40 +#define RL_EEMODE_PROGRAM 0x80 +#define RL_EEMODE_WRITECFG (0x80|0x40) /* 9346 EEPROM commands */ -#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ -#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ +#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ +#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ -#define RL_9346_WRITE 0x5 -#define RL_9346_READ 0x6 -#define RL_9346_ERASE 0x7 -#define RL_9346_EWEN 0x4 -#define RL_9346_EWEN_ADDR 0x30 -#define RL_9456_EWDS 0x4 -#define RL_9346_EWDS_ADDR 0x00 - -#define RL_EECMD_WRITE 0x140 -#define RL_EECMD_READ_6BIT 0x180 -#define RL_EECMD_READ_8BIT 0x600 -#define RL_EECMD_ERASE 0x1c0 - -#define RL_EE_ID 0x00 -#define RL_EE_PCI_VID 0x01 -#define RL_EE_PCI_DID 0x02 +#define RL_9346_WRITE 0x5 +#define RL_9346_READ 0x6 +#define RL_9346_ERASE 0x7 +#define RL_9346_EWEN 0x4 +#define RL_9346_EWEN_ADDR 0x30 +#define RL_9456_EWDS 0x4 +#define RL_9346_EWDS_ADDR 0x00 + +#define RL_EECMD_WRITE 0x140 +#define RL_EECMD_READ_6BIT 0x180 +#define RL_EECMD_READ_8BIT 0x600 +#define RL_EECMD_ERASE 0x1c0 + +#define RL_EE_ID 0x00 +#define RL_EE_PCI_VID 0x01 +#define RL_EE_PCI_DID 0x02 /* Location of station address inside EEPROM */ -#define RL_EE_EADDR 0x07 +#define RL_EE_EADDR 0x07 /* * MII register (8129 only) */ -#define RL_MII_CLK 0x01 -#define RL_MII_DATAIN 0x02 -#define RL_MII_DATAOUT 0x04 -#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ +#define RL_MII_CLK 0x01 +#define RL_MII_DATAIN 0x02 +#define RL_MII_DATAOUT 0x04 +#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ /* * Config 0 register */ -#define RL_CFG0_ROM0 0x01 -#define RL_CFG0_ROM1 0x02 -#define RL_CFG0_ROM2 0x04 -#define RL_CFG0_PL0 0x08 -#define RL_CFG0_PL1 0x10 -#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ -#define RL_CFG0_PCS 0x40 -#define RL_CFG0_SCR 0x80 +#define RL_CFG0_ROM0 0x01 +#define RL_CFG0_ROM1 0x02 +#define RL_CFG0_ROM2 0x04 +#define RL_CFG0_PL0 0x08 +#define RL_CFG0_PL1 0x10 +#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ +#define RL_CFG0_PCS 0x40 +#define RL_CFG0_SCR 0x80 /* * Config 1 register */ -#define RL_CFG1_PWRDWN 0x01 -#define RL_CFG1_PME 0x01 -#define RL_CFG1_SLEEP 0x02 -#define RL_CFG1_VPDEN 0x02 -#define RL_CFG1_IOMAP 0x04 -#define RL_CFG1_MEMMAP 0x08 -#define RL_CFG1_RSVD 0x10 +#define RL_CFG1_PWRDWN 0x01 +#define RL_CFG1_PME 0x01 +#define RL_CFG1_SLEEP 0x02 +#define RL_CFG1_VPDEN 0x02 +#define RL_CFG1_IOMAP 0x04 +#define RL_CFG1_MEMMAP 0x08 +#define RL_CFG1_RSVD 0x10 #define RL_CFG1_LWACT 0x10 -#define RL_CFG1_DRVLOAD 0x20 -#define RL_CFG1_LED0 0x40 -#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ -#define RL_CFG1_LED1 0x80 +#define RL_CFG1_DRVLOAD 0x20 +#define RL_CFG1_LED0 0x40 +#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ +#define RL_CFG1_LED1 0x80 /* * Config 2 register @@ -451,35 +451,35 @@ /* RL_DUMPSTATS_LO register */ -#define RL_DUMPSTATS_START 0x00000008 +#define RL_DUMPSTATS_START 0x00000008 /* Transmit start register */ -#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ -#define RL_TXSTART_START 0x40 /* start normal queue transmit */ -#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ +#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ +#define RL_TXSTART_START 0x40 /* start normal queue transmit */ +#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ /* * Config 2 register, 8139C+/8169/8169S/8110S only */ -#define RL_CFG2_BUSFREQ 0x07 -#define RL_CFG2_BUSWIDTH 0x08 -#define RL_CFG2_AUXPWRSTS 0x10 - -#define RL_BUSFREQ_33MHZ 0x00 -#define RL_BUSFREQ_66MHZ 0x01 - -#define RL_BUSWIDTH_32BITS 0x00 -#define RL_BUSWIDTH_64BITS 0x08 +#define RL_CFG2_BUSFREQ 0x07 +#define RL_CFG2_BUSWIDTH 0x08 +#define RL_CFG2_AUXPWRSTS 0x10 + +#define RL_BUSFREQ_33MHZ 0x00 +#define RL_BUSFREQ_66MHZ 0x01 + +#define RL_BUSWIDTH_32BITS 0x00 +#define RL_BUSWIDTH_64BITS 0x08 /* C+ mode command register */ -#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ -#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ -#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ -#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ -#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ -#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ +#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ +#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ +#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ +#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ +#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ +#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ #define RL_CPLUSCMD_MACSTAT_DIS 0x0080 /* 8168B/C/CP */ #define RL_CPLUSCMD_ASF 0x0100 /* 8168C/CP */ #define RL_CPLUSCMD_DBG_SEL 0x0200 /* 8168C/CP */ @@ -492,27 +492,27 @@ /* C+ early transmit threshold */ -#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ +#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ /* * Gigabit PHY access register (8169 only) */ -#define RL_PHYAR_PHYDATA 0x0000FFFF -#define RL_PHYAR_PHYREG 0x001F0000 -#define RL_PHYAR_BUSY 0x80000000 +#define RL_PHYAR_PHYDATA 0x0000FFFF +#define RL_PHYAR_PHYREG 0x001F0000 +#define RL_PHYAR_BUSY 0x80000000 /* * Gigabit media status (8169 only) */ -#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ -#define RL_GMEDIASTAT_LINK 0x02 /* link up */ -#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ -#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ -#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ -#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ -#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ -#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ +#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ +#define RL_GMEDIASTAT_LINK 0x02 /* link up */ +#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ +#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ +#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ +#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ +#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ +#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ /* * The RealTek doesn't use a fragment-based descriptor mechanism. @@ -529,25 +529,25 @@ * all received packets. */ -#define RL_RX_BUF_SZ RL_RXBUF_64 -#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) -#define RL_TX_LIST_CNT 4 -#define RL_MIN_FRAMELEN 60 +#define RL_RX_BUF_SZ RL_RXBUF_64 +#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) +#define RL_TX_LIST_CNT 4 +#define RL_MIN_FRAMELEN 60 #define RL_TX_8139_BUF_ALIGN 4 #define RL_RX_8139_BUF_ALIGN 8 #define RL_RX_8139_BUF_RESERVE sizeof(int64_t) #define RL_RX_8139_BUF_GUARD_SZ \ - (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) -#define RL_TXTHRESH(x) ((x) << 11) -#define RL_TX_THRESH_INIT 96 -#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH -#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED -#define RL_TX_MAXDMA RL_TXDMA_2048BYTES + (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) +#define RL_TXTHRESH(x) ((x) << 11) +#define RL_TX_THRESH_INIT 96 +#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH +#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED +#define RL_TX_MAXDMA RL_TXDMA_2048BYTES -#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) -#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) +#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) +#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) -#define RL_ETHER_ALIGN 2 +#define RL_ETHER_ALIGN 2 /* * re(4) hardware ip4csum-tx could be mangled with 28 bytes or less IP packets. @@ -570,15 +570,15 @@ struct rl_chain_data { uint8_t cur_tx; }; -#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) -#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) -#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) -#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) -#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) -#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) -#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) -#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) -#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) +#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) +#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) +#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) +#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) +#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) +#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) +#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) +#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) +#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) struct rl_type { uint16_t rl_vid; @@ -605,17 +605,17 @@ struct rl_mii_frame { /* * MII constants */ -#define RL_MII_STARTDELIM 0x01 -#define RL_MII_READOP 0x02 -#define RL_MII_WRITEOP 0x01 -#define RL_MII_TURNAROUND 0x02 - -#define RL_8129 1 -#define RL_8139 2 -#define RL_8139CPLUS 3 -#define RL_8169 4 +#define RL_MII_STARTDELIM 0x01 +#define RL_MII_READOP 0x02 +#define RL_MII_WRITEOP 0x01 +#define RL_MII_TURNAROUND 0x02 + +#define RL_8129 1 +#define RL_8139 2 +#define RL_8139CPLUS 3 +#define RL_8169 4 -#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ +#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ (x)->rl_type == RL_8169) /* @@ -639,85 +639,85 @@ struct rl_desc { uint32_t rl_bufaddr_hi; }; -#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF -#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ -#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ -#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ -#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ -#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ -#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ -#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ -#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ -#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ -#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ +#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF +#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ +#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ +#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ +#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ +#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ +#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ +#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ +#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ +#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ +#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ -#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ -#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ +#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_TDESC_CMD_UDPCSUMV2 0x80000000 -#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 -#define RL_TDESC_CMD_IPCSUMV2 0x20000000 +#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 +#define RL_TDESC_CMD_IPCSUMV2 0x20000000 /* * Error bits are valid only on the last descriptor of a frame * (i.e. RL_TDESC_CMD_EOF == 1) */ -#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ -#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ -#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ -#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ -#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ -#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ -#define RL_TDESC_STAT_OWN 0x80000000 +#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ +#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ +#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ +#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ +#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ +#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ +#define RL_TDESC_STAT_OWN 0x80000000 /* * RX descriptor cmd/vlan definitions */ -#define RL_RDESC_CMD_EOR 0x40000000 -#define RL_RDESC_CMD_OWN 0x80000000 -#define RL_RDESC_CMD_BUFLEN 0x00001FFF - -#define RL_RDESC_STAT_OWN 0x80000000 -#define RL_RDESC_STAT_EOR 0x40000000 -#define RL_RDESC_STAT_SOF 0x20000000 -#define RL_RDESC_STAT_EOF 0x10000000 -#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ -#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ -#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ -#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ -#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ -#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ -#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ -#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ -#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ -#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ -#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ +#define RL_RDESC_CMD_EOR 0x40000000 +#define RL_RDESC_CMD_OWN 0x80000000 +#define RL_RDESC_CMD_BUFLEN 0x00001FFF + +#define RL_RDESC_STAT_OWN 0x80000000 +#define RL_RDESC_STAT_EOR 0x40000000 +#define RL_RDESC_STAT_SOF 0x20000000 +#define RL_RDESC_STAT_EOF 0x10000000 +#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ +#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ +#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ +#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ +#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ +#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ +#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ +#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ +#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ +#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ +#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ #define RL_RDESC_STAT_UDP 0x00020000 /* UDP, 8168C/CP, 8111C/CP */ #define RL_RDESC_STAT_TCP 0x00010000 /* TCP, 8168C/CP, 8111C/CP */ -#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ -#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ -#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ -#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ +#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ +#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ +#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ +#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ RL_RDESC_STAT_CRCERR) -#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available +#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available (rl_vlandata valid)*/ -#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_RDESC_IPV6 0x80000000 #define RL_RDESC_IPV4 0x40000000 -#define RL_PROTOID_NONIP 0x00000000 -#define RL_PROTOID_TCPIP 0x00010000 -#define RL_PROTOID_UDPIP 0x00020000 -#define RL_PROTOID_IP 0x00030000 -#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_PROTOID_NONIP 0x00000000 +#define RL_PROTOID_TCPIP 0x00010000 +#define RL_PROTOID_UDPIP 0x00020000 +#define RL_PROTOID_IP 0x00030000 +#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_TCPIP) -#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_UDPIP) /* @@ -747,7 +747,7 @@ struct rl_stats { * Descriptor alignment : 256 bytes * Tx buffer : At least 4 bytes in length. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:38:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008E6106566C; Tue, 16 Nov 2010 20:38:42 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1D388FC17; Tue, 16 Nov 2010 20:38: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 oAGKcf0K066920; Tue, 16 Nov 2010 20:38:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKcf5R066918; Tue, 16 Nov 2010 20:38:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011162038.oAGKcf5R066918@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Nov 2010 20:38:41 +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: r215408 - stable/7/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:38:42 -0000 Author: yongari Date: Tue Nov 16 20:38:41 2010 New Revision: 215408 URL: http://svn.freebsd.org/changeset/base/215408 Log: MFC r215018-215020: r215018: Consistently use tab character instead of using space character. No functional changes. r215019: Remove trailing white spaces. r215020: Remove standard PCI configuration space register definitions. Modified: stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Nov 16 20:36:52 2010 (r215407) +++ stable/7/sys/pci/if_rlreg.h Tue Nov 16 20:38:41 2010 (r215408) @@ -36,211 +36,211 @@ * RealTek 8129/8139 register offsets */ #define RL_IDR0 0x0000 /* ID register 0 (station addr) */ -#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ -#define RL_IDR2 0x0002 -#define RL_IDR3 0x0003 -#define RL_IDR4 0x0004 -#define RL_IDR5 0x0005 +#define RL_IDR1 0x0001 /* Must use 32-bit accesses (?) */ +#define RL_IDR2 0x0002 +#define RL_IDR3 0x0003 +#define RL_IDR4 0x0004 +#define RL_IDR5 0x0005 /* 0006-0007 reserved */ -#define RL_MAR0 0x0008 /* Multicast hash table */ -#define RL_MAR1 0x0009 -#define RL_MAR2 0x000A -#define RL_MAR3 0x000B -#define RL_MAR4 0x000C -#define RL_MAR5 0x000D -#define RL_MAR6 0x000E -#define RL_MAR7 0x000F - -#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ -#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ -#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ -#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ - -#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ -#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ -#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ -#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ - -#define RL_RXADDR 0x0030 /* RX ring start address */ -#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ -#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ -#define RL_COMMAND 0x0037 /* command register */ -#define RL_CURRXADDR 0x0038 /* current address of packet read */ -#define RL_CURRXBUF 0x003A /* current RX buffer address */ -#define RL_IMR 0x003C /* interrupt mask register */ -#define RL_ISR 0x003E /* interrupt status register */ -#define RL_TXCFG 0x0040 /* transmit config */ -#define RL_RXCFG 0x0044 /* receive config */ -#define RL_TIMERCNT 0x0048 /* timer count register */ -#define RL_MISSEDPKT 0x004C /* missed packet counter */ -#define RL_EECMD 0x0050 /* EEPROM command register */ -#define RL_CFG0 0x0051 /* config register #0 */ -#define RL_CFG1 0x0052 /* config register #1 */ +#define RL_MAR0 0x0008 /* Multicast hash table */ +#define RL_MAR1 0x0009 +#define RL_MAR2 0x000A +#define RL_MAR3 0x000B +#define RL_MAR4 0x000C +#define RL_MAR5 0x000D +#define RL_MAR6 0x000E +#define RL_MAR7 0x000F + +#define RL_TXSTAT0 0x0010 /* status of TX descriptor 0 */ +#define RL_TXSTAT1 0x0014 /* status of TX descriptor 1 */ +#define RL_TXSTAT2 0x0018 /* status of TX descriptor 2 */ +#define RL_TXSTAT3 0x001C /* status of TX descriptor 3 */ + +#define RL_TXADDR0 0x0020 /* address of TX descriptor 0 */ +#define RL_TXADDR1 0x0024 /* address of TX descriptor 1 */ +#define RL_TXADDR2 0x0028 /* address of TX descriptor 2 */ +#define RL_TXADDR3 0x002C /* address of TX descriptor 3 */ + +#define RL_RXADDR 0x0030 /* RX ring start address */ +#define RL_RX_EARLY_BYTES 0x0034 /* RX early byte count */ +#define RL_RX_EARLY_STAT 0x0036 /* RX early status */ +#define RL_COMMAND 0x0037 /* command register */ +#define RL_CURRXADDR 0x0038 /* current address of packet read */ +#define RL_CURRXBUF 0x003A /* current RX buffer address */ +#define RL_IMR 0x003C /* interrupt mask register */ +#define RL_ISR 0x003E /* interrupt status register */ +#define RL_TXCFG 0x0040 /* transmit config */ +#define RL_RXCFG 0x0044 /* receive config */ +#define RL_TIMERCNT 0x0048 /* timer count register */ +#define RL_MISSEDPKT 0x004C /* missed packet counter */ +#define RL_EECMD 0x0050 /* EEPROM command register */ +#define RL_CFG0 0x0051 /* config register #0 */ +#define RL_CFG1 0x0052 /* config register #1 */ #define RL_CFG2 0x0053 /* config register #2 */ #define RL_CFG3 0x0054 /* config register #3 */ #define RL_CFG4 0x0055 /* config register #4 */ #define RL_CFG5 0x0056 /* config register #5 */ /* 0057 reserved */ -#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ +#define RL_MEDIASTAT 0x0058 /* media status register (8139) */ /* 0059-005A reserved */ -#define RL_MII 0x005A /* 8129 chip only */ -#define RL_HALTCLK 0x005B -#define RL_MULTIINTR 0x005C /* multiple interrupt */ -#define RL_PCIREV 0x005E /* PCI revision value */ +#define RL_MII 0x005A /* 8129 chip only */ +#define RL_HALTCLK 0x005B +#define RL_MULTIINTR 0x005C /* multiple interrupt */ +#define RL_PCIREV 0x005E /* PCI revision value */ /* 005F reserved */ -#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ +#define RL_TXSTAT_ALL 0x0060 /* TX status of all descriptors */ /* Direct PHY access registers only available on 8139 */ -#define RL_BMCR 0x0062 /* PHY basic mode control */ -#define RL_BMSR 0x0064 /* PHY basic mode status */ -#define RL_ANAR 0x0066 /* PHY autoneg advert */ -#define RL_LPAR 0x0068 /* PHY link partner ability */ -#define RL_ANER 0x006A /* PHY autoneg expansion */ - -#define RL_DISCCNT 0x006C /* disconnect counter */ -#define RL_FALSECAR 0x006E /* false carrier counter */ -#define RL_NWAYTST 0x0070 /* NWAY test register */ -#define RL_RX_ER 0x0072 /* RX_ER counter */ -#define RL_CSCFG 0x0074 /* CS configuration register */ +#define RL_BMCR 0x0062 /* PHY basic mode control */ +#define RL_BMSR 0x0064 /* PHY basic mode status */ +#define RL_ANAR 0x0066 /* PHY autoneg advert */ +#define RL_LPAR 0x0068 /* PHY link partner ability */ +#define RL_ANER 0x006A /* PHY autoneg expansion */ + +#define RL_DISCCNT 0x006C /* disconnect counter */ +#define RL_FALSECAR 0x006E /* false carrier counter */ +#define RL_NWAYTST 0x0070 /* NWAY test register */ +#define RL_RX_ER 0x0072 /* RX_ER counter */ +#define RL_CSCFG 0x0074 /* CS configuration register */ /* * When operating in special C+ mode, some of the registers in an * 8139C+ chip have different definitions. These are also used for * the 8169 gigE chip. */ -#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ -#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ -#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ -#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ -#define RL_CFG2 0x0053 -#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ -#define RL_TXSTART 0x00D9 /* 8 bits */ -#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ -#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ -#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ -#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ +#define RL_DUMPSTATS_LO 0x0010 /* counter dump command register */ +#define RL_DUMPSTATS_HI 0x0014 /* counter dump command register */ +#define RL_TXLIST_ADDR_LO 0x0020 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HI 0x0024 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_LO 0x0028 /* 64 bits, 256 byte alignment */ +#define RL_TXLIST_ADDR_HPRIO_HI 0x002C /* 64 bits, 256 byte alignment */ +#define RL_CFG2 0x0053 +#define RL_TIMERINT 0x0054 /* interrupt on timer expire */ +#define RL_TXSTART 0x00D9 /* 8 bits */ +#define RL_CPLUS_CMD 0x00E0 /* 16 bits */ +#define RL_RXLIST_ADDR_LO 0x00E4 /* 64 bits, 256 byte alignment */ +#define RL_RXLIST_ADDR_HI 0x00E8 /* 64 bits, 256 byte alignment */ +#define RL_EARLY_TX_THRESH 0x00EC /* 8 bits */ /* * Registers specific to the 8169 gigE chip */ -#define RL_GTXSTART 0x0038 /* 8 bits */ -#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ -#define RL_PHYAR 0x0060 -#define RL_TBICSR 0x0064 -#define RL_TBI_ANAR 0x0068 -#define RL_TBI_LPAR 0x006A -#define RL_GMEDIASTAT 0x006C /* 8 bits */ -#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ -#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ -#define RL_PMCH 0x006F /* 8 bits */ -#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ -#define RL_INTRMOD 0x00E2 /* 16 bits */ +#define RL_GTXSTART 0x0038 /* 8 bits */ +#define RL_TIMERINT_8169 0x0058 /* different offset than 8139 */ +#define RL_PHYAR 0x0060 +#define RL_TBICSR 0x0064 +#define RL_TBI_ANAR 0x0068 +#define RL_TBI_LPAR 0x006A +#define RL_GMEDIASTAT 0x006C /* 8 bits */ +#define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ +#define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ +#define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ +#define RL_INTRMOD 0x00E2 /* 16 bits */ /* * TX config register bits */ -#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ -#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ -#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ -#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ -#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ -#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ -#define RL_TXCFG_HWREV 0x7CC00000 - -#define RL_LOOPTEST_OFF 0x00000000 -#define RL_LOOPTEST_ON 0x00020000 -#define RL_LOOPTEST_ON_CPLUS 0x00060000 +#define RL_TXCFG_CLRABRT 0x00000001 /* retransmit aborted pkt */ +#define RL_TXCFG_MAXDMA 0x00000700 /* max DMA burst size */ +#define RL_TXCFG_CRCAPPEND 0x00010000 /* CRC append (0 = yes) */ +#define RL_TXCFG_LOOPBKTST 0x00060000 /* loopback test */ +#define RL_TXCFG_IFG2 0x00080000 /* 8169 only */ +#define RL_TXCFG_IFG 0x03000000 /* interframe gap */ +#define RL_TXCFG_HWREV 0x7CC00000 + +#define RL_LOOPTEST_OFF 0x00000000 +#define RL_LOOPTEST_ON 0x00020000 +#define RL_LOOPTEST_ON_CPLUS 0x00060000 /* Known revision codes. */ -#define RL_HWREV_8169 0x00000000 -#define RL_HWREV_8169S 0x00800000 -#define RL_HWREV_8110S 0x04000000 -#define RL_HWREV_8169_8110SB 0x10000000 -#define RL_HWREV_8169_8110SC 0x18000000 -#define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24C00000 -#define RL_HWREV_8168D 0x28000000 -#define RL_HWREV_8168DP 0x28800000 -#define RL_HWREV_8168E 0x2C000000 -#define RL_HWREV_8168_SPIN1 0x30000000 -#define RL_HWREV_8100E 0x30800000 -#define RL_HWREV_8101E 0x34000000 -#define RL_HWREV_8102E 0x34800000 -#define RL_HWREV_8103E 0x34C00000 -#define RL_HWREV_8168_SPIN2 0x38000000 -#define RL_HWREV_8168_SPIN3 0x38400000 -#define RL_HWREV_8168C 0x3C000000 -#define RL_HWREV_8168C_SPIN2 0x3C400000 -#define RL_HWREV_8168CP 0x3C800000 -#define RL_HWREV_8139 0x60000000 -#define RL_HWREV_8139A 0x70000000 -#define RL_HWREV_8139AG 0x70800000 -#define RL_HWREV_8139B 0x78000000 -#define RL_HWREV_8130 0x7C000000 -#define RL_HWREV_8139C 0x74000000 -#define RL_HWREV_8139D 0x74400000 -#define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74C00000 -#define RL_HWREV_8100 0x78800000 -#define RL_HWREV_8169_8110SBL 0x7CC00000 -#define RL_HWREV_8169_8110SCE 0x98000000 - -#define RL_TXDMA_16BYTES 0x00000000 -#define RL_TXDMA_32BYTES 0x00000100 -#define RL_TXDMA_64BYTES 0x00000200 -#define RL_TXDMA_128BYTES 0x00000300 -#define RL_TXDMA_256BYTES 0x00000400 -#define RL_TXDMA_512BYTES 0x00000500 -#define RL_TXDMA_1024BYTES 0x00000600 -#define RL_TXDMA_2048BYTES 0x00000700 +#define RL_HWREV_8169 0x00000000 +#define RL_HWREV_8169S 0x00800000 +#define RL_HWREV_8110S 0x04000000 +#define RL_HWREV_8169_8110SB 0x10000000 +#define RL_HWREV_8169_8110SC 0x18000000 +#define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 +#define RL_HWREV_8168D 0x28000000 +#define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 +#define RL_HWREV_8168_SPIN1 0x30000000 +#define RL_HWREV_8100E 0x30800000 +#define RL_HWREV_8101E 0x34000000 +#define RL_HWREV_8102E 0x34800000 +#define RL_HWREV_8103E 0x34C00000 +#define RL_HWREV_8168_SPIN2 0x38000000 +#define RL_HWREV_8168_SPIN3 0x38400000 +#define RL_HWREV_8168C 0x3C000000 +#define RL_HWREV_8168C_SPIN2 0x3C400000 +#define RL_HWREV_8168CP 0x3C800000 +#define RL_HWREV_8139 0x60000000 +#define RL_HWREV_8139A 0x70000000 +#define RL_HWREV_8139AG 0x70800000 +#define RL_HWREV_8139B 0x78000000 +#define RL_HWREV_8130 0x7C000000 +#define RL_HWREV_8139C 0x74000000 +#define RL_HWREV_8139D 0x74400000 +#define RL_HWREV_8139CPLUS 0x74800000 +#define RL_HWREV_8101 0x74C00000 +#define RL_HWREV_8100 0x78800000 +#define RL_HWREV_8169_8110SBL 0x7CC00000 +#define RL_HWREV_8169_8110SCE 0x98000000 + +#define RL_TXDMA_16BYTES 0x00000000 +#define RL_TXDMA_32BYTES 0x00000100 +#define RL_TXDMA_64BYTES 0x00000200 +#define RL_TXDMA_128BYTES 0x00000300 +#define RL_TXDMA_256BYTES 0x00000400 +#define RL_TXDMA_512BYTES 0x00000500 +#define RL_TXDMA_1024BYTES 0x00000600 +#define RL_TXDMA_2048BYTES 0x00000700 /* * Transmit descriptor status register bits. */ -#define RL_TXSTAT_LENMASK 0x00001FFF -#define RL_TXSTAT_OWN 0x00002000 -#define RL_TXSTAT_TX_UNDERRUN 0x00004000 -#define RL_TXSTAT_TX_OK 0x00008000 -#define RL_TXSTAT_EARLY_THRESH 0x003F0000 -#define RL_TXSTAT_COLLCNT 0x0F000000 -#define RL_TXSTAT_CARR_HBEAT 0x10000000 -#define RL_TXSTAT_OUTOFWIN 0x20000000 -#define RL_TXSTAT_TXABRT 0x40000000 -#define RL_TXSTAT_CARRLOSS 0x80000000 +#define RL_TXSTAT_LENMASK 0x00001FFF +#define RL_TXSTAT_OWN 0x00002000 +#define RL_TXSTAT_TX_UNDERRUN 0x00004000 +#define RL_TXSTAT_TX_OK 0x00008000 +#define RL_TXSTAT_EARLY_THRESH 0x003F0000 +#define RL_TXSTAT_COLLCNT 0x0F000000 +#define RL_TXSTAT_CARR_HBEAT 0x10000000 +#define RL_TXSTAT_OUTOFWIN 0x20000000 +#define RL_TXSTAT_TXABRT 0x40000000 +#define RL_TXSTAT_CARRLOSS 0x80000000 /* * Interrupt status register bits. */ -#define RL_ISR_RX_OK 0x0001 -#define RL_ISR_RX_ERR 0x0002 -#define RL_ISR_TX_OK 0x0004 -#define RL_ISR_TX_ERR 0x0008 -#define RL_ISR_RX_OVERRUN 0x0010 -#define RL_ISR_PKT_UNDERRUN 0x0020 -#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ -#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ -#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ -#define RL_ISR_SWI 0x0100 /* C+ only */ -#define RL_ISR_CABLE_LEN_CHGD 0x2000 -#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ -#define RL_ISR_TIMEOUT_EXPIRED 0x4000 -#define RL_ISR_SYSTEM_ERR 0x8000 +#define RL_ISR_RX_OK 0x0001 +#define RL_ISR_RX_ERR 0x0002 +#define RL_ISR_TX_OK 0x0004 +#define RL_ISR_TX_ERR 0x0008 +#define RL_ISR_RX_OVERRUN 0x0010 +#define RL_ISR_PKT_UNDERRUN 0x0020 +#define RL_ISR_LINKCHG 0x0020 /* 8169 only */ +#define RL_ISR_FIFO_OFLOW 0x0040 /* 8139 only */ +#define RL_ISR_TX_DESC_UNAVAIL 0x0080 /* C+ only */ +#define RL_ISR_SWI 0x0100 /* C+ only */ +#define RL_ISR_CABLE_LEN_CHGD 0x2000 +#define RL_ISR_PCS_TIMEOUT 0x4000 /* 8129 only */ +#define RL_ISR_TIMEOUT_EXPIRED 0x4000 +#define RL_ISR_SYSTEM_ERR 0x8000 -#define RL_INTRS \ +#define RL_INTRS \ (RL_ISR_TX_OK|RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR) #ifdef RE_TX_MODERATION -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) #else -#define RL_INTRS_CPLUS \ +#define RL_INTRS_CPLUS \ (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_TX_ERR|RL_ISR_TX_OK| \ RL_ISR_RX_OVERRUN|RL_ISR_PKT_UNDERRUN|RL_ISR_FIFO_OFLOW| \ RL_ISR_PCS_TIMEOUT|RL_ISR_SYSTEM_ERR|RL_ISR_TIMEOUT_EXPIRED) @@ -249,169 +249,169 @@ /* * Media status register. (8139 only) */ -#define RL_MEDIASTAT_RXPAUSE 0x01 -#define RL_MEDIASTAT_TXPAUSE 0x02 -#define RL_MEDIASTAT_LINK 0x04 -#define RL_MEDIASTAT_SPEED10 0x08 -#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ -#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ +#define RL_MEDIASTAT_RXPAUSE 0x01 +#define RL_MEDIASTAT_TXPAUSE 0x02 +#define RL_MEDIASTAT_LINK 0x04 +#define RL_MEDIASTAT_SPEED10 0x08 +#define RL_MEDIASTAT_RXFLOWCTL 0x40 /* duplex mode */ +#define RL_MEDIASTAT_TXFLOWCTL 0x80 /* duplex mode */ /* * Receive config register. */ -#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ -#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ -#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ -#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ -#define RL_RXCFG_RX_RUNT 0x00000010 -#define RL_RXCFG_RX_ERRPKT 0x00000020 -#define RL_RXCFG_WRAP 0x00000080 -#define RL_RXCFG_MAXDMA 0x00000700 -#define RL_RXCFG_BUFSZ 0x00001800 -#define RL_RXCFG_FIFOTHRESH 0x0000E000 -#define RL_RXCFG_EARLYTHRESH 0x07000000 - -#define RL_RXDMA_16BYTES 0x00000000 -#define RL_RXDMA_32BYTES 0x00000100 -#define RL_RXDMA_64BYTES 0x00000200 -#define RL_RXDMA_128BYTES 0x00000300 -#define RL_RXDMA_256BYTES 0x00000400 -#define RL_RXDMA_512BYTES 0x00000500 -#define RL_RXDMA_1024BYTES 0x00000600 -#define RL_RXDMA_UNLIMITED 0x00000700 - -#define RL_RXBUF_8 0x00000000 -#define RL_RXBUF_16 0x00000800 -#define RL_RXBUF_32 0x00001000 -#define RL_RXBUF_64 0x00001800 - -#define RL_RXFIFO_16BYTES 0x00000000 -#define RL_RXFIFO_32BYTES 0x00002000 -#define RL_RXFIFO_64BYTES 0x00004000 -#define RL_RXFIFO_128BYTES 0x00006000 -#define RL_RXFIFO_256BYTES 0x00008000 -#define RL_RXFIFO_512BYTES 0x0000A000 -#define RL_RXFIFO_1024BYTES 0x0000C000 -#define RL_RXFIFO_NOTHRESH 0x0000E000 +#define RL_RXCFG_RX_ALLPHYS 0x00000001 /* accept all nodes */ +#define RL_RXCFG_RX_INDIV 0x00000002 /* match filter */ +#define RL_RXCFG_RX_MULTI 0x00000004 /* accept all multicast */ +#define RL_RXCFG_RX_BROAD 0x00000008 /* accept all broadcast */ +#define RL_RXCFG_RX_RUNT 0x00000010 +#define RL_RXCFG_RX_ERRPKT 0x00000020 +#define RL_RXCFG_WRAP 0x00000080 +#define RL_RXCFG_MAXDMA 0x00000700 +#define RL_RXCFG_BUFSZ 0x00001800 +#define RL_RXCFG_FIFOTHRESH 0x0000E000 +#define RL_RXCFG_EARLYTHRESH 0x07000000 + +#define RL_RXDMA_16BYTES 0x00000000 +#define RL_RXDMA_32BYTES 0x00000100 +#define RL_RXDMA_64BYTES 0x00000200 +#define RL_RXDMA_128BYTES 0x00000300 +#define RL_RXDMA_256BYTES 0x00000400 +#define RL_RXDMA_512BYTES 0x00000500 +#define RL_RXDMA_1024BYTES 0x00000600 +#define RL_RXDMA_UNLIMITED 0x00000700 + +#define RL_RXBUF_8 0x00000000 +#define RL_RXBUF_16 0x00000800 +#define RL_RXBUF_32 0x00001000 +#define RL_RXBUF_64 0x00001800 + +#define RL_RXFIFO_16BYTES 0x00000000 +#define RL_RXFIFO_32BYTES 0x00002000 +#define RL_RXFIFO_64BYTES 0x00004000 +#define RL_RXFIFO_128BYTES 0x00006000 +#define RL_RXFIFO_256BYTES 0x00008000 +#define RL_RXFIFO_512BYTES 0x0000A000 +#define RL_RXFIFO_1024BYTES 0x0000C000 +#define RL_RXFIFO_NOTHRESH 0x0000E000 /* * Bits in RX status header (included with RX'ed packet * in ring buffer). */ -#define RL_RXSTAT_RXOK 0x00000001 -#define RL_RXSTAT_ALIGNERR 0x00000002 -#define RL_RXSTAT_CRCERR 0x00000004 -#define RL_RXSTAT_GIANT 0x00000008 -#define RL_RXSTAT_RUNT 0x00000010 -#define RL_RXSTAT_BADSYM 0x00000020 -#define RL_RXSTAT_BROAD 0x00002000 -#define RL_RXSTAT_INDIV 0x00004000 -#define RL_RXSTAT_MULTI 0x00008000 -#define RL_RXSTAT_LENMASK 0xFFFF0000 +#define RL_RXSTAT_RXOK 0x00000001 +#define RL_RXSTAT_ALIGNERR 0x00000002 +#define RL_RXSTAT_CRCERR 0x00000004 +#define RL_RXSTAT_GIANT 0x00000008 +#define RL_RXSTAT_RUNT 0x00000010 +#define RL_RXSTAT_BADSYM 0x00000020 +#define RL_RXSTAT_BROAD 0x00002000 +#define RL_RXSTAT_INDIV 0x00004000 +#define RL_RXSTAT_MULTI 0x00008000 +#define RL_RXSTAT_LENMASK 0xFFFF0000 -#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ +#define RL_RXSTAT_UNFINISHED 0xFFF0 /* DMA still in progress */ /* * Command register. */ -#define RL_CMD_EMPTY_RXBUF 0x0001 -#define RL_CMD_TX_ENB 0x0004 -#define RL_CMD_RX_ENB 0x0008 -#define RL_CMD_RESET 0x0010 -#define RL_CMD_STOPREQ 0x0080 +#define RL_CMD_EMPTY_RXBUF 0x0001 +#define RL_CMD_TX_ENB 0x0004 +#define RL_CMD_RX_ENB 0x0008 +#define RL_CMD_RESET 0x0010 +#define RL_CMD_STOPREQ 0x0080 /* * Twister register values. These are completely undocumented and derived * from public sources. */ -#define RL_CSCFG_LINK_OK 0x0400 -#define RL_CSCFG_CHANGE 0x0800 -#define RL_CSCFG_STATUS 0xf000 -#define RL_CSCFG_ROW3 0x7000 -#define RL_CSCFG_ROW2 0x3000 -#define RL_CSCFG_ROW1 0x1000 -#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 -#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 - -#define RL_NWAYTST_RESET 0 -#define RL_NWAYTST_CBL_TEST 0x20 - -#define RL_PARA78 0x78 -#define RL_PARA78_DEF 0x78fa8388 -#define RL_PARA7C 0x7C -#define RL_PARA7C_DEF 0xcb38de43 -#define RL_PARA7C_RETUNE 0xfb38de03 +#define RL_CSCFG_LINK_OK 0x0400 +#define RL_CSCFG_CHANGE 0x0800 +#define RL_CSCFG_STATUS 0xf000 +#define RL_CSCFG_ROW3 0x7000 +#define RL_CSCFG_ROW2 0x3000 +#define RL_CSCFG_ROW1 0x1000 +#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 +#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 + +#define RL_NWAYTST_RESET 0 +#define RL_NWAYTST_CBL_TEST 0x20 + +#define RL_PARA78 0x78 +#define RL_PARA78_DEF 0x78fa8388 +#define RL_PARA7C 0x7C +#define RL_PARA7C_DEF 0xcb38de43 +#define RL_PARA7C_RETUNE 0xfb38de03 /* * EEPROM control register */ -#define RL_EE_DATAOUT 0x01 /* Data out */ -#define RL_EE_DATAIN 0x02 /* Data in */ -#define RL_EE_CLK 0x04 /* clock */ -#define RL_EE_SEL 0x08 /* chip select */ -#define RL_EE_MODE (0x40|0x80) - -#define RL_EEMODE_OFF 0x00 -#define RL_EEMODE_AUTOLOAD 0x40 -#define RL_EEMODE_PROGRAM 0x80 -#define RL_EEMODE_WRITECFG (0x80|0x40) +#define RL_EE_DATAOUT 0x01 /* Data out */ +#define RL_EE_DATAIN 0x02 /* Data in */ +#define RL_EE_CLK 0x04 /* clock */ +#define RL_EE_SEL 0x08 /* chip select */ +#define RL_EE_MODE (0x40|0x80) + +#define RL_EEMODE_OFF 0x00 +#define RL_EEMODE_AUTOLOAD 0x40 +#define RL_EEMODE_PROGRAM 0x80 +#define RL_EEMODE_WRITECFG (0x80|0x40) /* 9346 EEPROM commands */ -#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ -#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ +#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */ +#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */ -#define RL_9346_WRITE 0x5 -#define RL_9346_READ 0x6 -#define RL_9346_ERASE 0x7 -#define RL_9346_EWEN 0x4 -#define RL_9346_EWEN_ADDR 0x30 -#define RL_9456_EWDS 0x4 -#define RL_9346_EWDS_ADDR 0x00 - -#define RL_EECMD_WRITE 0x140 -#define RL_EECMD_READ_6BIT 0x180 -#define RL_EECMD_READ_8BIT 0x600 -#define RL_EECMD_ERASE 0x1c0 - -#define RL_EE_ID 0x00 -#define RL_EE_PCI_VID 0x01 -#define RL_EE_PCI_DID 0x02 +#define RL_9346_WRITE 0x5 +#define RL_9346_READ 0x6 +#define RL_9346_ERASE 0x7 +#define RL_9346_EWEN 0x4 +#define RL_9346_EWEN_ADDR 0x30 +#define RL_9456_EWDS 0x4 +#define RL_9346_EWDS_ADDR 0x00 + +#define RL_EECMD_WRITE 0x140 +#define RL_EECMD_READ_6BIT 0x180 +#define RL_EECMD_READ_8BIT 0x600 +#define RL_EECMD_ERASE 0x1c0 + +#define RL_EE_ID 0x00 +#define RL_EE_PCI_VID 0x01 +#define RL_EE_PCI_DID 0x02 /* Location of station address inside EEPROM */ -#define RL_EE_EADDR 0x07 +#define RL_EE_EADDR 0x07 /* * MII register (8129 only) */ -#define RL_MII_CLK 0x01 -#define RL_MII_DATAIN 0x02 -#define RL_MII_DATAOUT 0x04 -#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ +#define RL_MII_CLK 0x01 +#define RL_MII_DATAIN 0x02 +#define RL_MII_DATAOUT 0x04 +#define RL_MII_DIR 0x80 /* 0 == input, 1 == output */ /* * Config 0 register */ -#define RL_CFG0_ROM0 0x01 -#define RL_CFG0_ROM1 0x02 -#define RL_CFG0_ROM2 0x04 -#define RL_CFG0_PL0 0x08 -#define RL_CFG0_PL1 0x10 -#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ -#define RL_CFG0_PCS 0x40 -#define RL_CFG0_SCR 0x80 +#define RL_CFG0_ROM0 0x01 +#define RL_CFG0_ROM1 0x02 +#define RL_CFG0_ROM2 0x04 +#define RL_CFG0_PL0 0x08 +#define RL_CFG0_PL1 0x10 +#define RL_CFG0_10MBPS 0x20 /* 10 Mbps internal mode */ +#define RL_CFG0_PCS 0x40 +#define RL_CFG0_SCR 0x80 /* * Config 1 register */ -#define RL_CFG1_PWRDWN 0x01 -#define RL_CFG1_PME 0x01 -#define RL_CFG1_SLEEP 0x02 -#define RL_CFG1_VPDEN 0x02 -#define RL_CFG1_IOMAP 0x04 -#define RL_CFG1_MEMMAP 0x08 -#define RL_CFG1_RSVD 0x10 +#define RL_CFG1_PWRDWN 0x01 +#define RL_CFG1_PME 0x01 +#define RL_CFG1_SLEEP 0x02 +#define RL_CFG1_VPDEN 0x02 +#define RL_CFG1_IOMAP 0x04 +#define RL_CFG1_MEMMAP 0x08 +#define RL_CFG1_RSVD 0x10 #define RL_CFG1_LWACT 0x10 -#define RL_CFG1_DRVLOAD 0x20 -#define RL_CFG1_LED0 0x40 -#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ -#define RL_CFG1_LED1 0x80 +#define RL_CFG1_DRVLOAD 0x20 +#define RL_CFG1_LED0 0x40 +#define RL_CFG1_FULLDUPLEX 0x40 /* 8129 only */ +#define RL_CFG1_LED1 0x80 /* * Config 2 register @@ -451,35 +451,35 @@ /* RL_DUMPSTATS_LO register */ -#define RL_DUMPSTATS_START 0x00000008 +#define RL_DUMPSTATS_START 0x00000008 /* Transmit start register */ -#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ -#define RL_TXSTART_START 0x40 /* start normal queue transmit */ -#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ +#define RL_TXSTART_SWI 0x01 /* generate TX interrupt */ +#define RL_TXSTART_START 0x40 /* start normal queue transmit */ +#define RL_TXSTART_HPRIO_START 0x80 /* start hi prio queue transmit */ /* * Config 2 register, 8139C+/8169/8169S/8110S only */ -#define RL_CFG2_BUSFREQ 0x07 -#define RL_CFG2_BUSWIDTH 0x08 -#define RL_CFG2_AUXPWRSTS 0x10 - -#define RL_BUSFREQ_33MHZ 0x00 -#define RL_BUSFREQ_66MHZ 0x01 - -#define RL_BUSWIDTH_32BITS 0x00 -#define RL_BUSWIDTH_64BITS 0x08 +#define RL_CFG2_BUSFREQ 0x07 +#define RL_CFG2_BUSWIDTH 0x08 +#define RL_CFG2_AUXPWRSTS 0x10 + +#define RL_BUSFREQ_33MHZ 0x00 +#define RL_BUSFREQ_66MHZ 0x01 + +#define RL_BUSWIDTH_32BITS 0x00 +#define RL_BUSWIDTH_64BITS 0x08 /* C+ mode command register */ -#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ -#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ -#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ -#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ -#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ -#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ +#define RL_CPLUSCMD_TXENB 0x0001 /* enable C+ transmit mode */ +#define RL_CPLUSCMD_RXENB 0x0002 /* enable C+ receive mode */ +#define RL_CPLUSCMD_PCI_MRW 0x0008 /* enable PCI multi-read/write */ +#define RL_CPLUSCMD_PCI_DAC 0x0010 /* PCI dual-address cycle only */ +#define RL_CPLUSCMD_RXCSUM_ENB 0x0020 /* enable RX checksum offload */ +#define RL_CPLUSCMD_VLANSTRIP 0x0040 /* enable VLAN tag stripping */ #define RL_CPLUSCMD_MACSTAT_DIS 0x0080 /* 8168B/C/CP */ #define RL_CPLUSCMD_ASF 0x0100 /* 8168C/CP */ #define RL_CPLUSCMD_DBG_SEL 0x0200 /* 8168C/CP */ @@ -492,27 +492,27 @@ /* C+ early transmit threshold */ -#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ +#define RL_EARLYTXTHRESH_CNT 0x003F /* byte count times 8 */ /* * Gigabit PHY access register (8169 only) */ -#define RL_PHYAR_PHYDATA 0x0000FFFF -#define RL_PHYAR_PHYREG 0x001F0000 -#define RL_PHYAR_BUSY 0x80000000 +#define RL_PHYAR_PHYDATA 0x0000FFFF +#define RL_PHYAR_PHYREG 0x001F0000 +#define RL_PHYAR_BUSY 0x80000000 /* * Gigabit media status (8169 only) */ -#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ -#define RL_GMEDIASTAT_LINK 0x02 /* link up */ -#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ -#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ -#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ -#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ -#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ -#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ +#define RL_GMEDIASTAT_FDX 0x01 /* full duplex */ +#define RL_GMEDIASTAT_LINK 0x02 /* link up */ +#define RL_GMEDIASTAT_10MBPS 0x04 /* 10mps link */ +#define RL_GMEDIASTAT_100MBPS 0x08 /* 100mbps link */ +#define RL_GMEDIASTAT_1000MBPS 0x10 /* gigE link */ +#define RL_GMEDIASTAT_RXFLOW 0x20 /* RX flow control on */ +#define RL_GMEDIASTAT_TXFLOW 0x40 /* TX flow control on */ +#define RL_GMEDIASTAT_TBI 0x80 /* TBI enabled */ /* * The RealTek doesn't use a fragment-based descriptor mechanism. @@ -529,25 +529,25 @@ * all received packets. */ -#define RL_RX_BUF_SZ RL_RXBUF_64 -#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) -#define RL_TX_LIST_CNT 4 -#define RL_MIN_FRAMELEN 60 +#define RL_RX_BUF_SZ RL_RXBUF_64 +#define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) +#define RL_TX_LIST_CNT 4 +#define RL_MIN_FRAMELEN 60 #define RL_TX_8139_BUF_ALIGN 4 #define RL_RX_8139_BUF_ALIGN 8 #define RL_RX_8139_BUF_RESERVE sizeof(int64_t) #define RL_RX_8139_BUF_GUARD_SZ \ - (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) -#define RL_TXTHRESH(x) ((x) << 11) -#define RL_TX_THRESH_INIT 96 -#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH -#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED -#define RL_TX_MAXDMA RL_TXDMA_2048BYTES + (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + RL_RX_8139_BUF_RESERVE) +#define RL_TXTHRESH(x) ((x) << 11) +#define RL_TX_THRESH_INIT 96 +#define RL_RX_FIFOTHRESH RL_RXFIFO_NOTHRESH +#define RL_RX_MAXDMA RL_RXDMA_UNLIMITED +#define RL_TX_MAXDMA RL_TXDMA_2048BYTES -#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) -#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) +#define RL_RXCFG_CONFIG (RL_RX_FIFOTHRESH|RL_RX_MAXDMA|RL_RX_BUF_SZ) +#define RL_TXCFG_CONFIG (RL_TXCFG_IFG|RL_TX_MAXDMA) -#define RL_ETHER_ALIGN 2 +#define RL_ETHER_ALIGN 2 /* * re(4) hardware ip4csum-tx could be mangled with 28 bytes or less IP packets. @@ -570,15 +570,15 @@ struct rl_chain_data { uint8_t cur_tx; }; -#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) -#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) -#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) -#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) -#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) -#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) -#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) -#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) -#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) +#define RL_INC(x) (x = (x + 1) % RL_TX_LIST_CNT) +#define RL_CUR_TXADDR(x) ((x->rl_cdata.cur_tx * 4) + RL_TXADDR0) +#define RL_CUR_TXSTAT(x) ((x->rl_cdata.cur_tx * 4) + RL_TXSTAT0) +#define RL_CUR_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.cur_tx]) +#define RL_CUR_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.cur_tx]) +#define RL_LAST_TXADDR(x) ((x->rl_cdata.last_tx * 4) + RL_TXADDR0) +#define RL_LAST_TXSTAT(x) ((x->rl_cdata.last_tx * 4) + RL_TXSTAT0) +#define RL_LAST_TXMBUF(x) (x->rl_cdata.rl_tx_chain[x->rl_cdata.last_tx]) +#define RL_LAST_DMAMAP(x) (x->rl_cdata.rl_tx_dmamap[x->rl_cdata.last_tx]) struct rl_type { uint16_t rl_vid; @@ -605,17 +605,17 @@ struct rl_mii_frame { /* * MII constants */ -#define RL_MII_STARTDELIM 0x01 -#define RL_MII_READOP 0x02 -#define RL_MII_WRITEOP 0x01 -#define RL_MII_TURNAROUND 0x02 - -#define RL_8129 1 -#define RL_8139 2 -#define RL_8139CPLUS 3 -#define RL_8169 4 +#define RL_MII_STARTDELIM 0x01 +#define RL_MII_READOP 0x02 +#define RL_MII_WRITEOP 0x01 +#define RL_MII_TURNAROUND 0x02 + +#define RL_8129 1 +#define RL_8139 2 +#define RL_8139CPLUS 3 +#define RL_8169 4 -#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ +#define RL_ISCPLUS(x) ((x)->rl_type == RL_8139CPLUS || \ (x)->rl_type == RL_8169) /* @@ -639,85 +639,85 @@ struct rl_desc { uint32_t rl_bufaddr_hi; }; -#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF -#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ -#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ -#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ -#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ -#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ -#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ -#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ -#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ -#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ -#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ +#define RL_TDESC_CMD_FRAGLEN 0x0000FFFF +#define RL_TDESC_CMD_TCPCSUM 0x00010000 /* TCP checksum enable */ +#define RL_TDESC_CMD_UDPCSUM 0x00020000 /* UDP checksum enable */ +#define RL_TDESC_CMD_IPCSUM 0x00040000 /* IP header checksum enable */ +#define RL_TDESC_CMD_MSSVAL 0x07FF0000 /* Large send MSS value */ +#define RL_TDESC_CMD_MSSVAL_SHIFT 16 /* Large send MSS value shift */ +#define RL_TDESC_CMD_LGSEND 0x08000000 /* TCP large send enb */ +#define RL_TDESC_CMD_EOF 0x10000000 /* end of frame marker */ +#define RL_TDESC_CMD_SOF 0x20000000 /* start of frame marker */ +#define RL_TDESC_CMD_EOR 0x40000000 /* end of ring marker */ +#define RL_TDESC_CMD_OWN 0x80000000 /* chip owns descriptor */ -#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ -#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_TDESC_VLANCTL_TAG 0x00020000 /* Insert VLAN tag */ +#define RL_TDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_TDESC_CMD_UDPCSUMV2 0x80000000 -#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 -#define RL_TDESC_CMD_IPCSUMV2 0x20000000 +#define RL_TDESC_CMD_TCPCSUMV2 0x40000000 +#define RL_TDESC_CMD_IPCSUMV2 0x20000000 /* * Error bits are valid only on the last descriptor of a frame * (i.e. RL_TDESC_CMD_EOF == 1) */ -#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ -#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ -#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ -#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ -#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ -#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ -#define RL_TDESC_STAT_OWN 0x80000000 +#define RL_TDESC_STAT_COLCNT 0x000F0000 /* collision count */ +#define RL_TDESC_STAT_EXCESSCOL 0x00100000 /* excessive collisions */ +#define RL_TDESC_STAT_LINKFAIL 0x00200000 /* link faulure */ +#define RL_TDESC_STAT_OWINCOL 0x00400000 /* out-of-window collision */ +#define RL_TDESC_STAT_TXERRSUM 0x00800000 /* transmit error summary */ +#define RL_TDESC_STAT_UNDERRUN 0x02000000 /* TX underrun occured */ +#define RL_TDESC_STAT_OWN 0x80000000 /* * RX descriptor cmd/vlan definitions */ -#define RL_RDESC_CMD_EOR 0x40000000 -#define RL_RDESC_CMD_OWN 0x80000000 -#define RL_RDESC_CMD_BUFLEN 0x00001FFF - -#define RL_RDESC_STAT_OWN 0x80000000 -#define RL_RDESC_STAT_EOR 0x40000000 -#define RL_RDESC_STAT_SOF 0x20000000 -#define RL_RDESC_STAT_EOF 0x10000000 -#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ -#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ -#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ -#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ -#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ -#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ -#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ -#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ -#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ -#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ -#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ +#define RL_RDESC_CMD_EOR 0x40000000 +#define RL_RDESC_CMD_OWN 0x80000000 +#define RL_RDESC_CMD_BUFLEN 0x00001FFF + +#define RL_RDESC_STAT_OWN 0x80000000 +#define RL_RDESC_STAT_EOR 0x40000000 +#define RL_RDESC_STAT_SOF 0x20000000 +#define RL_RDESC_STAT_EOF 0x10000000 +#define RL_RDESC_STAT_FRALIGN 0x08000000 /* frame alignment error */ +#define RL_RDESC_STAT_MCAST 0x04000000 /* multicast pkt received */ +#define RL_RDESC_STAT_UCAST 0x02000000 /* unicast pkt received */ +#define RL_RDESC_STAT_BCAST 0x01000000 /* broadcast pkt received */ +#define RL_RDESC_STAT_BUFOFLOW 0x00800000 /* out of buffer space */ +#define RL_RDESC_STAT_FIFOOFLOW 0x00400000 /* FIFO overrun */ +#define RL_RDESC_STAT_GIANT 0x00200000 /* pkt > 4096 bytes */ +#define RL_RDESC_STAT_RXERRSUM 0x00100000 /* RX error summary */ +#define RL_RDESC_STAT_RUNT 0x00080000 /* runt packet received */ +#define RL_RDESC_STAT_CRCERR 0x00040000 /* CRC error */ +#define RL_RDESC_STAT_PROTOID 0x00030000 /* Protocol type */ #define RL_RDESC_STAT_UDP 0x00020000 /* UDP, 8168C/CP, 8111C/CP */ #define RL_RDESC_STAT_TCP 0x00010000 /* TCP, 8168C/CP, 8111C/CP */ -#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ -#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ -#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ -#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ -#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ +#define RL_RDESC_STAT_IPSUMBAD 0x00008000 /* IP header checksum bad */ +#define RL_RDESC_STAT_UDPSUMBAD 0x00004000 /* UDP checksum bad */ +#define RL_RDESC_STAT_TCPSUMBAD 0x00002000 /* TCP checksum bad */ +#define RL_RDESC_STAT_FRAGLEN 0x00001FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_GFRAGLEN 0x00003FFF /* RX'ed frame/frag len */ +#define RL_RDESC_STAT_ERRS (RL_RDESC_STAT_GIANT|RL_RDESC_STAT_RUNT| \ RL_RDESC_STAT_CRCERR) -#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available +#define RL_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available (rl_vlandata valid)*/ -#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ +#define RL_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */ /* RTL8168C/RTL8168CP/RTL8111C/RTL8111CP */ #define RL_RDESC_IPV6 0x80000000 #define RL_RDESC_IPV4 0x40000000 -#define RL_PROTOID_NONIP 0x00000000 -#define RL_PROTOID_TCPIP 0x00010000 -#define RL_PROTOID_UDPIP 0x00020000 -#define RL_PROTOID_IP 0x00030000 -#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_PROTOID_NONIP 0x00000000 +#define RL_PROTOID_TCPIP 0x00010000 +#define RL_PROTOID_UDPIP 0x00020000 +#define RL_PROTOID_IP 0x00030000 +#define RL_TCPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_TCPIP) -#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ +#define RL_UDPPKT(x) (((x) & RL_RDESC_STAT_PROTOID) == \ RL_PROTOID_UDPIP) /* @@ -747,7 +747,7 @@ struct rl_stats { * Descriptor alignment : 256 bytes * Tx buffer : At least 4 bytes in length. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 20:39:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1201B1065670; Tue, 16 Nov 2010 20:39:53 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007668FC1F; Tue, 16 Nov 2010 20:39: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 oAGKdqMW066990; Tue, 16 Nov 2010 20:39:52 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKdqLZ066988; Tue, 16 Nov 2010 20:39:52 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201011162039.oAGKdqLZ066988@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 16 Nov 2010 20:39: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: r215409 - head/tools/tools/mctest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:39:53 -0000 Author: gnn Date: Tue Nov 16 20:39:52 2010 New Revision: 215409 URL: http://svn.freebsd.org/changeset/base/215409 Log: Fix an error in our results printing. Modified: head/tools/tools/mctest/mctest.cc Modified: head/tools/tools/mctest/mctest.cc ============================================================================== --- head/tools/tools/mctest/mctest.cc Tue Nov 16 20:38:41 2010 (r215408) +++ head/tools/tools/mctest/mctest.cc Tue Nov 16 20:39:52 2010 (r215409) @@ -419,7 +419,7 @@ int source(char *interface, struct in_ad // cout << "sec: " << result.tv_sec; // cout << " usecs: " << result.tv_usec << endl; } - cout << "comparing %lu deltas" << long(deltas.size()) << endl; + cout << "comparing " << long(deltas.size()) << " deltas" << endl; cout << "number represents usecs of round-trip time" << endl; sort(deltas.begin(), deltas.end()); for (int i = 0; idx[i] != 0; ++i) { From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:16:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E58106566C; Tue, 16 Nov 2010 22:16:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86A508FC15; Tue, 16 Nov 2010 22:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMGc8d069026; Tue, 16 Nov 2010 22:16:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMGcUv069022; Tue, 16 Nov 2010 22:16:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011162216.oAGMGcUv069022@svn.freebsd.org> From: Michael Tuexen Date: Tue, 16 Nov 2010 22:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215410 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:16:38 -0000 Author: tuexen Date: Tue Nov 16 22:16:38 2010 New Revision: 215410 URL: http://svn.freebsd.org/changeset/base/215410 Log: Add an SCTP socket option to retrieve the number of timeouts of an association. MFC after: 3 days. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp.h Tue Nov 16 22:16:38 2010 (r215410) @@ -123,6 +123,7 @@ struct sctp_paramhdr { #define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ +#define SCTP_TIMEOUTS 0x00000106 /* * user socket options: BSD implementation specific Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp_uio.h Tue Nov 16 22:16:38 2010 (r215410) @@ -563,6 +563,17 @@ struct sctp_sack_info { uint32_t sack_freq; }; +struct sctp_timeouts { + sctp_assoc_t stimo_assoc_id; + uint32_t stimo_init; + uint32_t stimo_data; + uint32_t stimo_sack; + uint32_t stimo_shutdown; + uint32_t stimo_heartbeat; + uint32_t stimo_cookie; + uint32_t stimo_shutdownack; +}; + struct sctp_cwnd_args { struct sctp_nets *net; /* network to *//* FIXME: LP64 issue */ uint32_t cwnd_new_value;/* cwnd in k */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp_usrreq.c Tue Nov 16 22:16:38 2010 (r215410) @@ -2441,6 +2441,29 @@ flags_out: *optsize = sizeof(*srto); } break; + case SCTP_TIMEOUTS: + { + struct sctp_timeouts *stimo; + + SCTP_CHECK_AND_CAST(stimo, optval, struct sctp_timeouts, *optsize); + SCTP_FIND_STCB(inp, stcb, stimo->stimo_assoc_id); + + if (stcb) { + stimo->stimo_init = stcb->asoc.timoinit; + stimo->stimo_data = stcb->asoc.timodata; + stimo->stimo_sack = stcb->asoc.timosack; + stimo->stimo_shutdown = stcb->asoc.timoshutdown; + stimo->stimo_heartbeat = stcb->asoc.timoheartbeat; + stimo->stimo_cookie = stcb->asoc.timocookie; + stimo->stimo_shutdownack = stcb->asoc.timoshutdownack; + SCTP_TCB_UNLOCK(stcb); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); + error = EINVAL; + } + *optsize = sizeof(*stimo); + } + break; case SCTP_ASSOCINFO: { struct sctp_assocparams *sasoc; From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:21:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA771065670; Tue, 16 Nov 2010 22:21:15 +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 0A2458FC14; Tue, 16 Nov 2010 22:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMLEC2069157; Tue, 16 Nov 2010 22:21:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMLEFN069155; Tue, 16 Nov 2010 22:21:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162221.oAGMLEFN069155@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:21: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: r215411 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:21:15 -0000 Author: adrian Date: Tue Nov 16 22:21:14 2010 New Revision: 215411 URL: http://svn.freebsd.org/changeset/base/215411 Log: Add in forgotten install rule. Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Tue Nov 16 22:16:38 2010 (r215410) +++ head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) @@ -12,7 +12,7 @@ FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk -FILES+= sys.mk version_gen.awk +FILES+= sys.mk version_gen.awk bsd.crunchgen.mk NO_OBJ= FILESDIR= ${BINDIR}/mk From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:22:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6E10106566C; Tue, 16 Nov 2010 22:22:16 +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 B51EC8FC13; Tue, 16 Nov 2010 22:22: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 oAGMMGZf069224; Tue, 16 Nov 2010 22:22:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMMGA1069222; Tue, 16 Nov 2010 22:22:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162222.oAGMMGA1069222@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:22: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: r215412 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:22:16 -0000 Author: adrian Date: Tue Nov 16 22:22:16 2010 New Revision: 215412 URL: http://svn.freebsd.org/changeset/base/215412 Log: .. and then notice that the list of mk files is ordered, and update to suit. Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) +++ head/share/mk/Makefile Tue Nov 16 22:22:16 2010 (r215412) @@ -5,14 +5,14 @@ FILES= bsd.README FILES+= bsd.arch.inc.mk FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk FILES+= bsd.endian.mk -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk -FILES+= sys.mk version_gen.awk bsd.crunchgen.mk +FILES+= sys.mk version_gen.awk NO_OBJ= FILESDIR= ${BINDIR}/mk From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:23:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E9B1065670; Tue, 16 Nov 2010 22:23: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 D05FA8FC08; Tue, 16 Nov 2010 22:23: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 oAGMNKlF069280; Tue, 16 Nov 2010 22:23:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMNKvI069278; Tue, 16 Nov 2010 22:23:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162223.oAGMNKvI069278@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:23: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: r215413 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:23:21 -0000 Author: adrian Date: Tue Nov 16 22:23:20 2010 New Revision: 215413 URL: http://svn.freebsd.org/changeset/base/215413 Log: Re-enable generating links. Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Tue Nov 16 22:22:16 2010 (r215412) +++ head/share/mk/bsd.crunchgen.mk Tue Nov 16 22:23:20 2010 (r215413) @@ -51,17 +51,14 @@ $(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefi .else $(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile .endif -# Disable building links for bsdbox - whatever is installing the binaries into -# the embedded system should (for now) do the linking there. This may change -# in the future. -adrian -#.ifndef CRUNCH_SUPPRESS_LINK_${P} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) -#.endif -#.for A in $(CRUNCH_ALIAS_$(P)) -#.ifndef CRUNCH_SUPPRESS_LINK_${A} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) -#.endif -#.endfor +.ifndef CRUNCH_SUPPRESS_LINK_${P} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +.endif +.for A in $(CRUNCH_ALIAS_$(P)) +.ifndef CRUNCH_SUPPRESS_LINK_${A} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +.endif +.endfor .endfor .endfor From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:39:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD8C9106566B; Tue, 16 Nov 2010 22:39:38 +0000 (UTC) (envelope-from adrian.chadd@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 1C1FA8FC13; Tue, 16 Nov 2010 22:39:37 +0000 (UTC) Received: by wyb35 with SMTP id 35so422529wyb.13 for ; Tue, 16 Nov 2010 14:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=XC3pPm4YClO71zp3TxG6lTqMbyIJqbd1Uupi9Fn4Osg=; b=O5XQ9jcrZYWn+usePvqvho3w7bPi/bAjrsHYVpaSwVJ9ZBd0XYajhuyH0LD08VZvGf BnDV7gn0KOF2vQI8mIfquG1i0+M64OJN4drK6TbJ6tVItWIx+Qj8HhAHvdjqOQ5lyVyR PPTzK3pJfM+xfDwXTas3T0caJCm/vCzLlgtkg= 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:content-type :content-transfer-encoding; b=bps870PCYjb/5lAc7H2nI73i4sdyZ9wreS+RBcMzA1oAGhyUZuTAAuFWIRwbXmWI3F G9RzfMu1KuUd0y3UnY89ANxshNwG+iidvWI08x14F6jk2HWQZ+GXk49WHPexr70DNw+7 N30D06qDhzMMoHCWtYYbZWvht+e3IJPkclb/M= MIME-Version: 1.0 Received: by 10.216.142.131 with SMTP id i3mr906334wej.5.1289945573881; Tue, 16 Nov 2010 14:12:53 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Tue, 16 Nov 2010 14:12:53 -0800 (PST) In-Reply-To: <201011130311.oAD3BSxX033195@svn.freebsd.org> References: <201011130311.oAD3BSxX033195@svn.freebsd.org> Date: Wed, 17 Nov 2010 06:12:53 +0800 X-Google-Sender-Auth: v8gEsjwVMMnXZzq4QRxgPdHQ0mE Message-ID: From: Adrian Chadd To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r215226 - in head: rescue/rescue share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:39:39 -0000 This has apparently broken symlink generation. I thought I had tested that locally. Grr. In any case, I'll investigate this over the weekend. I have an exam tomorro= w. Thanks, Adrian On 13 November 2010 11:11, Adrian Chadd wrote: > > Author: adrian > Date: Sat Nov 13 03:11:27 2010 > New Revision: 215226 > URL: http://svn.freebsd.org/changeset/base/215226 > > Log: > =A0Break out the rules which generate crunchgen'ed binaries into a separa= te > =A0.mk file so they can be reused. > > =A0Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries th= at > =A0require tools built in the local architecture. sh and csh both require= this. > =A0It was previously hardcoded in rescue/rescue/Makefile . > > =A0Introduce a new option, CRUNCH_SHLIBS, which lists the shared librarie= s > =A0to link against. These override the static libraries listed in CRUNCH_= LIBS. > =A0Some build environments may wish to use a handful of shared libraries > =A0(eg libc.so) so other small, dynamic binaries can be run in the enviro= nment. > > =A0Remove the now-shared code from rescue/rescue/Makefile and introduce t= he > =A0CRUNCH_BUILDTOOLS option for the above shells. > > Added: > =A0head/share/mk/bsd.crunchgen.mk =A0 (contents, props changed) > Modified: > =A0head/rescue/rescue/Makefile > > Modified: head/rescue/rescue/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/rescue/rescue/Makefile Sat Nov 13 01:28:56 2010 =A0 =A0 =A0 =A0(= r215225) > +++ head/rescue/rescue/Makefile Sat Nov 13 03:11:27 2010 =A0 =A0 =A0 =A0(= r215226) > @@ -22,27 +22,7 @@ dhclient_FIXED: ../../sbin/dhclient/dhcl > =A0 =A0 =A0 =A0sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} > =A0CLEANFILES+=3D dhclient_FIXED > > -################################################################# > -# > -# General notes: > -# > -# A number of Make variables are used to generate the crunchgen config f= ile. > -# > -# =A0CRUNCH_SRCDIRS: lists directories to search for included programs > -# =A0CRUNCH_PROGS: =A0lists programs to be included > -# =A0CRUNCH_LIBS: =A0libraries to link with > -# =A0CRUNCH_BUILDOPTS: generic build options to be added to every progra= m > -# > -# Special options can be specified for individual programs > -# =A0CRUNCH_SRCDIR_$(P): base source directory for program $(P) > -# =A0CRUNCH_BUILDOPTS_$(P): additional build options for $(P) > -# =A0CRUNCH_ALIAS_$(P): additional names to be used for $(P) > -# > -# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} > -# will be used to generate a hard link to the resulting binary. > -# Specific links can be suppressed by setting > -# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. > -# > +# The help which used to be here is now in mk/bsd.crunchgen.mk > > =A0# Define Makefile variable RESCUE > =A0CRUNCH_BUILDOPTS+=3D -DRESCUE > @@ -73,6 +53,7 @@ CRUNCH_PROGS_bin=3D cat chflags chio chmod > =A0 =A0 =A0 =A0 ed expr getfacl hostname kenv kill ln ls mkdir mv =A0 =A0= =A0\ > =A0 =A0 =A0 =A0 pkill ps pwd realpath rm rmdir setfacl sh stty sync test > =A0CRUNCH_LIBS+=3D -lcrypt -ledit -lkvm -ll -ltermcap -lutil > +CRUNCH_BUILDTOOLS+=3D bin/sh > > =A0# Additional options for specific programs > =A0CRUNCH_ALIAS_test=3D [ > @@ -91,6 +72,7 @@ CRUNCH_PROGS_bin+=3D rcp > =A0.if ${MK_TCSH} !=3D "no" > =A0CRUNCH_PROGS_bin+=3D csh > =A0CRUNCH_ALIAS_csh=3D -csh tcsh -tcsh > +CRUNCH_BUILDTOOLS+=3D bin/csh > =A0CRUNCH_SUPPRESS_LINK_-csh=3D 1 > =A0CRUNCH_SUPPRESS_LINK_-tcsh=3D 1 > =A0.endif > @@ -236,132 +218,5 @@ CRUNCH_ALIAS_chown=3D chgrp > =A0################################################################## > =A0CRUNCH_LIBS+=3D -lm > > -################################################################## > -# =A0The following is pretty nearly a generic crunchgen-handling makefil= e > -# > - > -CONF=3D =A0$(PROG).conf > -OUTMK=3D $(PROG).mk > -OUTC=3D =A0 $(PROG).c > -OUTPUTS=3D$(OUTMK) $(OUTC) $(PROG).cache > -CRUNCHOBJS=3D ${.OBJDIR} > -.if defined(MAKEOBJDIRPREFIX) > -CANONICALOBJDIR:=3D ${MAKEOBJDIRPREFIX}${.CURDIR} > -.else > -CANONICALOBJDIR:=3D /usr/obj${.CURDIR} > -.endif > - > -CLEANFILES+=3D $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h > - > -# Program names and their aliases contribute hardlinks to 'rescue' execu= table, > -# except for those that get suppressed. > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > -$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile > -.else > -$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile > -.endif > -.ifndef CRUNCH_SUPPRESS_LINK_${P} > -LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(P) > -.endif > -.for A in $(CRUNCH_ALIAS_$(P)) > -.ifndef CRUNCH_SUPPRESS_LINK_${A} > -LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(A) > -.endif > -.endfor > -.endfor > -.endfor > - > -all: $(PROG) > -exe: $(PROG) > - > -$(CONF): Makefile > - =A0 =A0 =A0 echo \# Auto-generated, do not edit >$(.TARGET) > -.ifdef CRUNCH_BUILDOPTS > - =A0 =A0 =A0 echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) > -.endif > -.ifdef CRUNCH_LIBS > - =A0 =A0 =A0 echo libs $(CRUNCH_LIBS) >>$(.TARGET) > -.endif > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > - =A0 =A0 =A0 echo progs $(P) >>$(.TARGET) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) > -.else > - =A0 =A0 =A0 echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TA= RGET) > -.endif > -.ifdef CRUNCH_BUILDOPTS_${P} > - =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ \ > - =A0 =A0 =A0 =A0 =A0 $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) > -.else > - =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ >>$(.= TARGET) > -.endif > -.for A in $(CRUNCH_ALIAS_$(P)) > - =A0 =A0 =A0 echo ln $(P) $(A) >>$(.TARGET) > -.endfor > -.endfor > -.endfor > - > -# XXX Make sure we don't pass -P to crunchgen(1). > -.MAKEFLAGS:=3D ${.MAKEFLAGS:N-P} > -.ORDER: $(OUTPUTS) objs > -$(OUTPUTS): $(CONF) > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) = \ > - =A0 =A0 =A0 =A0 =A0 -c $(OUTC) $(CONF) > - > -$(PROG): $(OUTPUTS) objs > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe > - > -objs: $(OUTMK) > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs > - > -# Someone should replace the bin/csh and bin/sh build-tools with > -# shell scripts so we can remove this nonsense. > -build-tools: > -.for _tool in bin/csh bin/sh > - =A0 =A0 =A0 cd $(.CURDIR)/../../${_tool}; \ > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} obj; \ > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} build-tools > -.endfor > - > -# Use a separate build tree to hold files compiled for this crunchgen bi= nary > -# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't > -# get that to cooperate with bsd.prog.mk. =A0Besides, many of the standa= rd > -# targets should NOT be propagated into the components. > -cleandepend cleandir obj objlink: > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.else > - =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.endif > -.endfor > -.endfor > - > -clean: > - =A0 =A0 =A0 rm -f ${CLEANFILES} > - =A0 =A0 =A0 if [ -e ${.OBJDIR}/$(OUTMK) ]; then =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f= $(OUTMK) clean; =A0 =A0 =A0 \ > - =A0 =A0 =A0 fi > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.else > - =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.endif > -.endfor > -.endfor > - > +.include > =A0.include > > Added: head/share/mk/bsd.crunchgen.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null =A0 00:00:00 1970 =A0 (empty, because file is newly added) > +++ head/share/mk/bsd.crunchgen.mk =A0 =A0 =A0Sat Nov 13 03:11:27 2010 = =A0 =A0 =A0 =A0(r215226) > @@ -0,0 +1,160 @@ > +################################################################# > +# > +# General notes: > +# > +# A number of Make variables are used to generate the crunchgen config f= ile. > +# > +# =A0CRUNCH_SRCDIRS: lists directories to search for included programs > +# =A0CRUNCH_PROGS: =A0lists programs to be included > +# =A0CRUNCH_LIBS: =A0libraries to statically link with > +# =A0CRUNCH_SHLIBS: =A0libraries to dynamically link with > +# =A0CRUNCH_BUILDOPTS: generic build options to be added to every progra= m > +# =A0CRUNCH_BUILDTOOLS: lists programs that need build tools built in th= e > +# =A0 =A0 =A0 local architecture. > +# > +# Special options can be specified for individual programs > +# =A0CRUNCH_SRCDIR_$(P): base source directory for program $(P) > +# =A0CRUNCH_BUILDOPTS_$(P): additional build options for $(P) > +# =A0CRUNCH_ALIAS_$(P): additional names to be used for $(P) > +# > +# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} > +# will be used to generate a hard link to the resulting binary. > +# Specific links can be suppressed by setting > +# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. > +# > + > +# $FreeBSD$ > + > +################################################################## > +# =A0The following is pretty nearly a generic crunchgen-handling makefil= e > +# > + > +CONF=3D =A0$(PROG).conf > +OUTMK=3D $(PROG).mk > +OUTC=3D =A0 $(PROG).c > +OUTPUTS=3D$(OUTMK) $(OUTC) $(PROG).cache > +CRUNCHOBJS=3D ${.OBJDIR} > +.if defined(MAKEOBJDIRPREFIX) > +CANONICALOBJDIR:=3D ${MAKEOBJDIRPREFIX}${.CURDIR} > +.else > +CANONICALOBJDIR:=3D /usr/obj${.CURDIR} > +.endif > + > +CLEANFILES+=3D $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h > + > +# Program names and their aliases contribute hardlinks to 'rescue' execu= table, > +# except for those that get suppressed. > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > +$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile > +.else > +$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile > +.endif > +# Disable building links for bsdbox - whatever is installing the binarie= s into > +# the embedded system should (for now) do the linking there. This may ch= ange > +# in the future. -adrian > +#.ifndef CRUNCH_SUPPRESS_LINK_${P} > +#LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(P) > +#.endif > +#.for A in $(CRUNCH_ALIAS_$(P)) > +#.ifndef CRUNCH_SUPPRESS_LINK_${A} > +#LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(A) > +#.endif > +#.endfor > +.endfor > +.endfor > + > +all: $(PROG) > +exe: $(PROG) > + > +$(CONF): Makefile > + =A0 =A0 =A0 echo \# Auto-generated, do not edit >$(.TARGET) > +.ifdef CRUNCH_BUILDOPTS > + =A0 =A0 =A0 echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) > +.endif > +.ifdef CRUNCH_LIBS > + =A0 =A0 =A0 echo libs $(CRUNCH_LIBS) >>$(.TARGET) > +.endif > +.ifdef CRUNCH_SHLIBS > + =A0 =A0 =A0 echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET) > +.endif > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > + =A0 =A0 =A0 echo progs $(P) >>$(.TARGET) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) > +.else > + =A0 =A0 =A0 echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TA= RGET) > +.endif > +.ifdef CRUNCH_BUILDOPTS_${P} > + =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ \ > + =A0 =A0 =A0 =A0 =A0 $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) > +.else > + =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ >>$(.= TARGET) > +.endif > +.for A in $(CRUNCH_ALIAS_$(P)) > + =A0 =A0 =A0 echo ln $(P) $(A) >>$(.TARGET) > +.endfor > +.endfor > +.endfor > + > +# XXX Make sure we don't pass -P to crunchgen(1). > +.MAKEFLAGS:=3D ${.MAKEFLAGS:N-P} > +.ORDER: $(OUTPUTS) objs > +$(OUTPUTS): $(CONF) > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) = \ > + =A0 =A0 =A0 =A0 =A0 -c $(OUTC) $(CONF) > + > +$(PROG): $(OUTPUTS) objs > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe > + > +objs: $(OUTMK) > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs > + > +# Someone should replace the bin/csh and bin/sh build-tools with > +# shell scripts so we can remove this nonsense. > +build-tools: > +.for _tool in $(CRUNCH_BUILDTOOLS) > + =A0 =A0 =A0 cd $(.CURDIR)/../../${_tool}; \ > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} obj; \ > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} build-tools > +.endfor > + > +# Use a separate build tree to hold files compiled for this crunchgen bi= nary > +# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't > +# get that to cooperate with bsd.prog.mk. =A0Besides, many of the standa= rd > +# targets should NOT be propagated into the components. > +cleandepend cleandir obj objlink: > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.else > + =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.endif > +.endfor > +.endfor > + > +clean: > + =A0 =A0 =A0 rm -f ${CLEANFILES} > + =A0 =A0 =A0 if [ -e ${.OBJDIR}/$(OUTMK) ]; then =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f= $(OUTMK) clean; =A0 =A0 =A0 \ > + =A0 =A0 =A0 fi > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.else > + =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.endif > +.endfor > +.endfor From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 22:44:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0C21065672; Tue, 16 Nov 2010 22:44:58 +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 97EC98FC13; Tue, 16 Nov 2010 22:44: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 oAGMiw95069800; Tue, 16 Nov 2010 22:44:58 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMiwnO069797; Tue, 16 Nov 2010 22:44:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011162244.oAGMiwnO069797@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Nov 2010 22:44: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: r215414 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:44:58 -0000 Author: jkim Date: Tue Nov 16 22:44:58 2010 New Revision: 215414 URL: http://svn.freebsd.org/changeset/base/215414 Log: Invalidate TLBs explicitly. r1.4 of sys/i386/i386/i686_mem.c removed this code but probably it only worked by chance because modifying CR4.PGE bit causes invlidation of entire TLBs. Since these are very rare events, this micro-optimization seems useless. Reviewed by: jhb Modified: head/sys/amd64/amd64/amd64_mem.c head/sys/i386/i386/i686_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c ============================================================================== --- head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:23:20 2010 (r215413) +++ head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:44:58 2010 (r215414) @@ -321,6 +321,7 @@ amd64_mrstoreone(void *arg) /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -388,8 +389,9 @@ amd64_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); Modified: head/sys/i386/i386/i686_mem.c ============================================================================== --- head/sys/i386/i386/i686_mem.c Tue Nov 16 22:23:20 2010 (r215413) +++ head/sys/i386/i386/i686_mem.c Tue Nov 16 22:44:58 2010 (r215414) @@ -315,6 +315,7 @@ i686_mrstoreone(void *arg) /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -382,8 +383,9 @@ i686_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); From owner-svn-src-all@FreeBSD.ORG Tue Nov 16 23:26:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36BEC1065670; Tue, 16 Nov 2010 23:26:03 +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 0A7118FC1B; Tue, 16 Nov 2010 23:26: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 oAGNQ2La070645; Tue, 16 Nov 2010 23:26:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGNQ2Ll070642; Tue, 16 Nov 2010 23:26:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011162326.oAGNQ2Ll070642@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Nov 2010 23:26: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: r215415 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 23:26:03 -0000 Author: jkim Date: Tue Nov 16 23:26:02 2010 New Revision: 215415 URL: http://svn.freebsd.org/changeset/base/215415 Log: Restore CR0 after MTRR initialization for correctness sakes. There will be no noticeable change because we enable caches before we enter here for both BSP and AP cases. Remove another pointless optimization for CR4.PGE bit while I am here. Modified: head/sys/amd64/amd64/amd64_mem.c head/sys/i386/i386/i686_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c ============================================================================== --- head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:44:58 2010 (r215414) +++ head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 23:26:02 2010 (r215415) @@ -307,17 +307,17 @@ amd64_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); @@ -396,11 +396,9 @@ amd64_mrstoreone(void *arg) /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* Modified: head/sys/i386/i386/i686_mem.c ============================================================================== --- head/sys/i386/i386/i686_mem.c Tue Nov 16 22:44:58 2010 (r215414) +++ head/sys/i386/i386/i686_mem.c Tue Nov 16 23:26:02 2010 (r215415) @@ -301,17 +301,17 @@ i686_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); @@ -390,11 +390,9 @@ i686_mrstoreone(void *arg) /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 09:25:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEE361065672; Wed, 17 Nov 2010 09:25: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 9D4978FC1F; Wed, 17 Nov 2010 09:25: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 oAH9P8tw084667; Wed, 17 Nov 2010 09:25:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9P8Lq084665; Wed, 17 Nov 2010 09:25:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011170925.oAH9P8Lq084665@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 17 Nov 2010 09:25: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: r215418 - 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, 17 Nov 2010 09:25:08 -0000 Author: bz Date: Wed Nov 17 09:25:08 2010 New Revision: 215418 URL: http://svn.freebsd.org/changeset/base/215418 Log: No need to re-initialize the callout. We initially do it in in6_lltable_new() right after allocation. Worse, we are losing the right flags here. MFC after: 4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Nov 17 08:56:01 2010 (r215417) +++ head/sys/netinet6/nd6.c Wed Nov 17 09:25:08 2010 (r215418) @@ -851,10 +851,8 @@ nd6_lookup(struct in6_addr *addr6, int f llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)&sin6); - if ((ln != NULL) && (flags & LLE_CREATE)) { + if ((ln != NULL) && (flags & LLE_CREATE)) ln->ln_state = ND6_LLINFO_NOSTATE; - callout_init(&ln->ln_timer_ch, 0); - } return (ln); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 09:28:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6CAA106566B; Wed, 17 Nov 2010 09:28:17 +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 A4D5D8FC1B; Wed, 17 Nov 2010 09: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 oAH9SHA9084759; Wed, 17 Nov 2010 09:28:17 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9SHCA084756; Wed, 17 Nov 2010 09:28:17 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011170928.oAH9SHCA084756@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 17 Nov 2010 09: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: r215419 - head/sys/compat/ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:28:17 -0000 Author: bschmidt Date: Wed Nov 17 09:28:17 2010 New Revision: 215419 URL: http://svn.freebsd.org/changeset/base/215419 Log: Use kmem_alloc_contig() to honour the cache_type variable. Pointed out by: alc Modified: head/sys/compat/ndis/ntoskrnl_var.h head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:28:17 2010 (r215419) @@ -162,6 +162,16 @@ typedef struct mdl mdl, ndis_buffer; #define WDM_MINOR_WINXP 0x20 #define WDM_MINOR_WIN2003 0x30 +enum nt_caching_type { + MmNonCached = 0, + MmCached = 1, + MmWriteCombined = 2, + MmHardwareCoherentCached = 3, + MmNonCachedUnordered = 4, + MmUSWCCached = 5, + MmMaximumCacheType = 6 +}; + /*- * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows. * According to the Windows DDK header files, KSPIN_LOCK is defined like this: Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:28:17 2010 (r215419) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -197,9 +198,10 @@ static uint32_t InterlockedDecrement(vol static void ExInterlockedAddLargeStatistic(uint64_t *, uint32_t); static void *MmAllocateContiguousMemory(uint32_t, uint64_t); static void *MmAllocateContiguousMemorySpecifyCache(uint32_t, - uint64_t, uint64_t, uint64_t, uint32_t); + uint64_t, uint64_t, uint64_t, enum nt_caching_type); static void MmFreeContiguousMemory(void *); -static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, uint32_t); +static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, + enum nt_caching_type); static uint32_t MmSizeOfMdl(void *, size_t); static void *MmMapLockedPages(mdl *, uint8_t); static void *MmMapLockedPagesSpecifyCache(mdl *, @@ -2424,11 +2426,34 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_t lowest; uint64_t highest; uint64_t boundary; - uint32_t cachetype; + enum nt_caching_type cachetype; { + vm_memattr_t memattr; + void *ret; - return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, - highest, PAGE_SIZE, boundary)); + switch (cachetype) { + case MmNonCached: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmWriteCombined: + memattr = VM_MEMATTR_WRITE_COMBINING; + break; + case MmNonCachedUnordered: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmCached: + case MmHardwareCoherentCached: + case MmUSWCCached: + default: + memattr = VM_MEMATTR_DEFAULT; + break; + } + + ret = (void *)kmem_alloc_contig(kernel_map, size, M_ZERO | M_NOWAIT, + lowest, highest, PAGE_SIZE, boundary, memattr); + if (ret != NULL) + malloc_type_allocated(M_DEVBUF, round_page(size)); + return (ret); } static void @@ -2442,7 +2467,7 @@ static void MmFreeContiguousMemorySpecifyCache(base, size, cachetype) void *base; uint32_t size; - uint32_t cachetype; + enum nt_caching_type cachetype; { contigfree(base, size, M_DEVBUF); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 09:32:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2D71065694; Wed, 17 Nov 2010 09:32:39 +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 C751E8FC16; Wed, 17 Nov 2010 09:32: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 oAH9WdSj084878; Wed, 17 Nov 2010 09:32:39 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9WdLe084876; Wed, 17 Nov 2010 09:32:39 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011170932.oAH9WdLe084876@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 17 Nov 2010 09:32: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: r215420 - head/sys/compat/ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:32:40 -0000 Author: bschmidt Date: Wed Nov 17 09:32:39 2010 New Revision: 215420 URL: http://svn.freebsd.org/changeset/base/215420 Log: Fix a panic on i386 for drivers using MmAllocateContiguousMemory() and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:28:17 2010 (r215419) +++ head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:32:39 2010 (r215420) @@ -4237,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), IMPORT_SFUNC(IoAllocateMdl, 5), IMPORT_SFUNC(IoFreeMdl, 1), - IMPORT_SFUNC(MmAllocateContiguousMemory, 2), - IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5), + IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1), + IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3), IMPORT_SFUNC(MmFreeContiguousMemory, 1), IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3), IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1), From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 09:48:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E055106566B; Wed, 17 Nov 2010 09:48:19 +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 1B3D78FC19; Wed, 17 Nov 2010 09:48: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 oAH9mJYg085242; Wed, 17 Nov 2010 09:48:19 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9mIWh085240; Wed, 17 Nov 2010 09:48:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201011170948.oAH9mIWh085240@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 17 Nov 2010 09:48: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: r215421 - stable/8/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:48:19 -0000 Author: pluknet Date: Wed Nov 17 09:48:18 2010 New Revision: 215421 URL: http://svn.freebsd.org/changeset/base/215421 Log: MFC r215186: Add 'jid' as a possible sort order to the help screen. PR: bin/150992 Submitted by: Frederic Culot Approved by: avg (mentor) Modified: stable/8/contrib/top/commands.c Directory Properties: stable/8/contrib/top/ (props changed) stable/8/contrib/top/install-sh (props changed) Modified: stable/8/contrib/top/commands.c ============================================================================== --- stable/8/contrib/top/commands.c Wed Nov 17 09:32:39 2010 (r215420) +++ stable/8/contrib/top/commands.c Wed Nov 17 09:48:18 2010 (r215421) @@ -80,10 +80,12 @@ n or # - change number of processes to #ifdef ORDER if (displaymode == DISP_CPU) fputs("\ -o - specify sort order (pri, size, res, cpu, time, threads)\n", stdout); +o - specify sort order (pri, size, res, cpu, time, threads, jid)\n", + stdout); else fputs("\ -o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout); +o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n", + stdout); #endif fputs("\ r - renice a process\n\ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 09:49:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E83C106566B; Wed, 17 Nov 2010 09:49:51 +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 6BD9A8FC16; Wed, 17 Nov 2010 09:49: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 oAH9npda085315; Wed, 17 Nov 2010 09:49:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9npSa085313; Wed, 17 Nov 2010 09:49:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201011170949.oAH9npSa085313@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 17 Nov 2010 09:49:51 +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: r215422 - stable/7/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:49:51 -0000 Author: pluknet Date: Wed Nov 17 09:49:51 2010 New Revision: 215422 URL: http://svn.freebsd.org/changeset/base/215422 Log: MFC r215186: Add 'jid' as a possible sort order to the help screen. PR: bin/150992 Submitted by: Frederic Culot Approved by: avg (mentor) Modified: stable/7/contrib/top/commands.c Directory Properties: stable/7/contrib/top/ (props changed) Modified: stable/7/contrib/top/commands.c ============================================================================== --- stable/7/contrib/top/commands.c Wed Nov 17 09:48:18 2010 (r215421) +++ stable/7/contrib/top/commands.c Wed Nov 17 09:49:51 2010 (r215422) @@ -80,10 +80,12 @@ n or # - change number of processes to #ifdef ORDER if (displaymode == DISP_CPU) fputs("\ -o - specify sort order (pri, size, res, cpu, time, threads)\n", stdout); +o - specify sort order (pri, size, res, cpu, time, threads, jid)\n", + stdout); else fputs("\ -o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout); +o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n", + stdout); #endif fputs("\ r - renice a process\n\ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 10:43:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D70F7106564A; Wed, 17 Nov 2010 10:43:20 +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 AABDE8FC0C; Wed, 17 Nov 2010 10:43: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 oAHAhKcn086552; Wed, 17 Nov 2010 10:43:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHAhKNo086550; Wed, 17 Nov 2010 10:43:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011171043.oAHAhKNo086550@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 17 Nov 2010 10:43: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: r215423 - 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, 17 Nov 2010 10:43:20 -0000 Author: bz Date: Wed Nov 17 10:43:20 2010 New Revision: 215423 URL: http://svn.freebsd.org/changeset/base/215423 Log: Do not initialize flag variables before needed. Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix for nd6_lookup() even though both are defined the same. Use the right flag variable when checking each. No real functional change. MFC after: 4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Nov 17 09:49:51 2010 (r215422) +++ head/sys/netinet6/nd6.c Wed Nov 17 10:43:20 2010 (r215423) @@ -836,7 +836,7 @@ nd6_lookup(struct in6_addr *addr6, int f { struct sockaddr_in6 sin6; struct llentry *ln; - int llflags = 0; + int llflags; bzero(&sin6, sizeof(sin6)); sin6.sin6_len = sizeof(struct sockaddr_in6); @@ -845,13 +845,14 @@ nd6_lookup(struct in6_addr *addr6, int f IF_AFDATA_LOCK_ASSERT(ifp); + llflags = 0; if (flags & ND6_CREATE) llflags |= LLE_CREATE; if (flags & ND6_EXCLUSIVE) llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)&sin6); - if ((ln != NULL) && (flags & LLE_CREATE)) + if ((ln != NULL) && (llflags & LLE_CREATE)) ln->ln_state = ND6_LLINFO_NOSTATE; return (ln); @@ -1451,7 +1452,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru int do_update; int olladdr; int llchange; - int flags = 0; + int flags; int newstate = 0; uint16_t router = 0; struct sockaddr_in6 sin6; @@ -1478,13 +1479,13 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Spec says nothing in sections for RA, RS and NA. There's small * description on it in NS section (RFC 2461 7.2.3). */ - flags |= lladdr ? ND6_EXCLUSIVE : 0; + flags = lladdr ? ND6_EXCLUSIVE : 0; IF_AFDATA_LOCK(ifp); ln = nd6_lookup(from, flags, ifp); if (ln == NULL) { - flags |= LLE_EXCLUSIVE; - ln = nd6_lookup(from, flags |ND6_CREATE, ifp); + flags |= ND6_EXCLUSIVE; + ln = nd6_lookup(from, flags | ND6_CREATE, ifp); IF_AFDATA_UNLOCK(ifp); is_newentry = 1; } else { From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 13:59:26 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 268B81065695; Wed, 17 Nov 2010 13:59:26 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id D55418FC17; Wed, 17 Nov 2010 13:59:25 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PIiXi-0005K3-1B; Wed, 17 Nov 2010 05:59:24 -0800 Message-ID: <4CE3DFB3.4060809@sippysoft.com> Date: Wed, 17 Nov 2010 05:59:15 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Bruce Evans References: <201011160440.oAG4e3YU039413@svn.freebsd.org> <20101117030118.X1203@besplex.bde.org> In-Reply-To: <20101117030118.X1203@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "mail.sippysoft.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 11/16/2010 8:12 AM, Bruce Evans wrote: > This was quite low for yestdeay's uses (starting in about 1995), but today > it is little missed since only yesterday's low-end hardware uses it. Most > of today's interfaces are 1Gbps, and for this it is almost essential for > the hardware to have a ring buffer with > 50 entries, so most of today's > drivers ignore ifqmaxlen and set the queue length to the almost equally > bogus value of the ring buffer size (-1). I set it to about 10000 instead > in bge and em (10000 is too large, but fixes streaming under certain loads > when hz is small). [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 13:59:26 -0000 On 11/16/2010 8:12 AM, Bruce Evans wrote: > This was quite low for yestdeay's uses (starting in about 1995), but today > it is little missed since only yesterday's low-end hardware uses it. Most > of today's interfaces are 1Gbps, and for this it is almost essential for > the hardware to have a ring buffer with > 50 entries, so most of today's > drivers ignore ifqmaxlen and set the queue length to the almost equally > bogus value of the ring buffer size (-1). I set it to about 10000 instead > in bge and em (10000 is too large, but fixes streaming under certain loads > when hz is small). One of those interfaces is if_rl, which is still quite popular these days and supports speeds up to 1gbps (which I believe triggered this change). But in general I agree, unfortunately FreeBSD network subsystem is tuned for yesteday's speeds. We are seeing lot of lookups and other issues under high PPS. I wish somebody could stand and pick up the task of cleaning it up and re-tuning eventually for 2010. We could probably even sponsor in part such a work (anyone). Apart from interface tuning for Gbps speeds, another area that needs more work is splitting up memory pool for the IPC from the memory pool for the other networking. Today's software is highly distributed and rock-solid IPC is a must for the FreeBSD being a solid server application platform. That's OK when under the load we drop some packets, but it's not OK when extreme network activity can bring down communications between application and database system within the host itself. And that's exactly what can happen in FreeBSD. Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 15:12:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A3D1106567A; Wed, 17 Nov 2010 15:12:10 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58EDC8FC08; Wed, 17 Nov 2010 15:12: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 oAHFCArZ095098; Wed, 17 Nov 2010 15:12:10 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHFCAg5095095; Wed, 17 Nov 2010 15:12:10 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201011171512.oAHFCAg5095095@svn.freebsd.org> From: Ivan Voras Date: Wed, 17 Nov 2010 15:12: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: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 15:12:10 -0000 Author: ivoras Date: Wed Nov 17 15:12:10 2010 New Revision: 215425 URL: http://svn.freebsd.org/changeset/base/215425 Log: Change "wait" banner to "qlen" to be more indicative of its purpose and to be more inline with what gstat uses. Reviewed by: gnn Silence from: phk, keramida Modified: head/usr.sbin/iostat/iostat.8 head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.8 ============================================================================== --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) @@ -348,7 +348,7 @@ write operations per second kilobytes read per second .It kw/s kilobytes write per second -.It wait +.It qlen transactions queue length .It svc_t average duration of transactions, in milliseconds Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) @@ -750,11 +750,11 @@ devstats(int perf_select, long double et printf("\n"); if (Iflag == 0) printf( - "device r/s w/s kr/s kw/s wait svc_t %%b " + "device r/s w/s kr/s kw/s qlen svc_t %%b " ); else printf( - "device r/i w/i kr/i kw/i wait svc_t %%b " + "device r/i w/i kr/i kw/i qlen svc_t %%b " ); if (Tflag > 0) printf("tin tout "); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 15:42:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76E0106566C; Wed, 17 Nov 2010 15:42:47 +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 8C42F8FC08; Wed, 17 Nov 2010 15:42: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 oAHFglha096218; Wed, 17 Nov 2010 15:42:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHFglsf096217; Wed, 17 Nov 2010 15:42:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011171542.oAHFglsf096217@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Nov 2010 15:42: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: r215426 - in head: lib/libautofs sbin/mount_autofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 15:42:47 -0000 Author: jhb Date: Wed Nov 17 15:42:47 2010 New Revision: 215426 URL: http://svn.freebsd.org/changeset/base/215426 Log: Remove unused autofs userland bits. Approved by: core Deleted: head/lib/libautofs/ head/sbin/mount_autofs/ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 16:17:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C501065672; Wed, 17 Nov 2010 16:17:16 +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 C99BD8FC15; Wed, 17 Nov 2010 16:17:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHGHFNJ097108; Wed, 17 Nov 2010 16:17:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHGHFSW097106; Wed, 17 Nov 2010 16:17:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011171617.oAHGHFSW097106@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Nov 2010 16:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 16:17:16 -0000 Author: kib Date: Wed Nov 17 16:17:15 2010 New Revision: 215427 URL: http://svn.freebsd.org/changeset/base/215427 Log: Only save FPU context when not executing in the context of the crypto thread. Tested by: Mike Tancsa Modified: head/sys/crypto/aesni/aesni_wrap.c Modified: head/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 15:42:47 2010 (r215426) +++ head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 16:17:15 2010 (r215427) @@ -246,14 +246,21 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error; + int error, saved_ctx; td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + saved_ctx = 1; + } else { + error = 0; + saved_ctx = 0; + } if (error == 0) { error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); } return (error); } @@ -264,16 +271,22 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated; + int error, allocated, saved_ctx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (error != 0) + goto out; + saved_ctx = 1; + } else { + saved_ctx = 0; + error = 0; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -311,7 +324,8 @@ aesni_cipher_process(struct aesni_sessio ses->iv); } } - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); if (allocated) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 16:17:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22C5B106580A; Wed, 17 Nov 2010 16:17: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 11EE78FC23; Wed, 17 Nov 2010 16: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 oAHGHZlK097150; Wed, 17 Nov 2010 16:17:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHGHZSg097148; Wed, 17 Nov 2010 16:17:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011171617.oAHGHZSg097148@svn.freebsd.org> From: Alexander Motin Date: Wed, 17 Nov 2010 16:17: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: r215428 - 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: Wed, 17 Nov 2010 16:17:36 -0000 Author: mav Date: Wed Nov 17 16:17:35 2010 New Revision: 215428 URL: http://svn.freebsd.org/changeset/base/215428 Log: Add IDs for VIA VX900 chipset SATA controller. MFC after: 1 week Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:15 2010 (r215427) +++ head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:35 2010 (r215428) @@ -106,6 +106,7 @@ ata_via_probe(device_t dev) { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, "CX700" }, { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, "VX800" }, { ATA_VIAVX855, 0x00, VIA133, 0x00, ATA_UDMA6, "VX855" }, + { ATA_VIAVX900, 0x00, VIA133, VIASATA, ATA_SA300, "VX900" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00, ATA_UDMA6, "6410" }, @@ -123,7 +124,9 @@ ata_via_probe(device_t dev) if (pci_get_devid(dev) == ATA_VIA82C571 || pci_get_devid(dev) == ATA_VIACX700IDE || - pci_get_devid(dev) == ATA_VIASATAIDE) { + pci_get_devid(dev) == ATA_VIASATAIDE || + pci_get_devid(dev) == ATA_VIASATAIDE2 || + pci_get_devid(dev) == ATA_VIASATAIDE3) { if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) return ENXIO; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 17:12:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8995E1066100; Wed, 17 Nov 2010 17:12:42 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB228FC16; Wed, 17 Nov 2010 17: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 oAHHCgIT098381; Wed, 17 Nov 2010 17:12:42 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHCgin098377; Wed, 17 Nov 2010 17:12:42 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011171712.oAHHCgin098377@svn.freebsd.org> From: Mark Murray Date: Wed, 17 Nov 2010 17:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215429 - in stable/8: share/man/man5 tools/build/mk usr.sbin/mailwrapper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:12:42 -0000 Author: markm Date: Wed Nov 17 17:12:41 2010 New Revision: 215429 URL: http://svn.freebsd.org/changeset/base/215429 Log: MFC: Add /bin/rmail symlink to mailwrapper if sendmail is not being built and mailwrapper is being built. Ensure that it is not removed by "make delete-old". Add Exim example to man page. Modified: stable/8/share/man/man5/mailer.conf.5 stable/8/tools/build/mk/OptionalObsoleteFiles.inc stable/8/usr.sbin/mailwrapper/Makefile Modified: stable/8/share/man/man5/mailer.conf.5 ============================================================================== --- stable/8/share/man/man5/mailer.conf.5 Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/share/man/man5/mailer.conf.5 Wed Nov 17 17:12:41 2010 (r215429) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2006 +.Dd November 17, 2010 .Dt MAILER.CONF 5 .Os .Sh NAME @@ -110,6 +110,22 @@ mailq /usr/local/sbin/sendmail newaliases /usr/local/sbin/sendmail .Ed .Pp +This example shows +how to invoke +a sendmail-workalike with +.Nm Exim +(from ports) +in place of +.Xr sendmail 8 : +.Bd -literal -offset indent +# Emulate sendmail using exim +sendmail /usr/local/sbin/exim +send-mail /usr/local/sbin/exim +mailq /usr/local/sbin/exim -bp +newaliases /usr/bin/true +rmail /usr/local/sbin/exim -i -oee +.Ed +.Pp This example shows the use of the .Nm mini_sendmail package from ports in place of Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Wed Nov 17 17:12:41 2010 (r215429) @@ -1130,7 +1130,9 @@ OLD_FILES+=usr/share/man/man8/rshd.8.gz #.endif .if ${MK_SENDMAIL} == no +.if ${MK_MAILWRAPPER} == no OLD_FILES+=bin/rmail +.endif OLD_FILES+=usr/bin/vacation OLD_FILES+=usr/include/libmilter/mfapi.h OLD_FILES+=usr/include/libmilter/mfdef.h Modified: stable/8/usr.sbin/mailwrapper/Makefile ============================================================================== --- stable/8/usr.sbin/mailwrapper/Makefile Wed Nov 17 16:17:35 2010 (r215428) +++ stable/8/usr.sbin/mailwrapper/Makefile Wed Nov 17 17:12:41 2010 (r215429) @@ -23,6 +23,10 @@ SYMLINKS+= /usr/libexec/sendmail/sendmai .endif .endif +.if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no" +SYMLINKS+= ${BINDIR}/mailwrapper /bin/rmail +.endif + .if ${MK_MAILWRAPPER} != "no" .if !exists(${DESTDIR}/etc/mail/mailer.conf) FILES= ${.CURDIR}/../../etc/mail/mailer.conf From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 17:29:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B9FD106661F; Wed, 17 Nov 2010 17:29:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39CC18FC20; Wed, 17 Nov 2010 17:29: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 oAHHTNa0098779; Wed, 17 Nov 2010 17:29:23 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHTNKk098773; Wed, 17 Nov 2010 17:29:23 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011171729.oAHHTNKk098773@svn.freebsd.org> From: Alan Cox Date: Wed, 17 Nov 2010 17:29: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: r215430 - in stable/8/sys: kern 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: Wed, 17 Nov 2010 17:29:23 -0000 Author: alc Date: Wed Nov 17 17:29:22 2010 New Revision: 215430 URL: http://svn.freebsd.org/changeset/base/215430 Log: MFC r209407, r209648, r209650 Introduce and use vm_page_next() and vm_page_prev(). They provide both a simpler and faster interface for iterating over the pages of an object. Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/vm/vm_fault.c stable/8/sys/vm/vm_page.c stable/8/sys/vm/vm_page.h stable/8/sys/vm/vm_pageout.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/kern/kern_exec.c Wed Nov 17 17:29:22 2010 (r215430) @@ -935,7 +935,7 @@ exec_map_first_page(imgp) if (initial_pagein > object->size) initial_pagein = object->size; for (i = 1; i < initial_pagein; i++) { - if ((ma[i] = vm_page_lookup(object, i)) != NULL) { + if ((ma[i] = vm_page_next(ma[i - 1])) != NULL) { if (ma[i]->valid) break; if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy) Modified: stable/8/sys/vm/vm_fault.c ============================================================================== --- stable/8/sys/vm/vm_fault.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_fault.c Wed Nov 17 17:29:22 2010 (r215430) @@ -215,7 +215,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr boolean_t are_queues_locked, growstack, wired; int map_generation; vm_object_t next_object; - vm_page_t marray[VM_FAULT_READ]; + vm_page_t marray[VM_FAULT_READ], mt, mt_prev; int hardfault; int faultcount, ahead, behind, alloc_req; struct faultstate fs; @@ -486,12 +486,18 @@ readrest: fs.first_object->type != OBJT_DEVICE && fs.first_object->type != OBJT_PHYS && fs.first_object->type != OBJT_SG) { - vm_pindex_t firstpindex, tmppindex; + vm_pindex_t firstpindex; if (fs.first_pindex < 2 * VM_FAULT_READ) firstpindex = 0; else firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; + mt = fs.first_object != fs.object ? + fs.first_m : fs.m; + KASSERT(mt != NULL, ("vm_fault: missing mt")); + KASSERT((mt->oflags & VPO_BUSY) != 0, + ("vm_fault: mt %p not busy", mt)); + mt_prev = vm_page_prev(mt); are_queues_locked = FALSE; /* @@ -499,14 +505,10 @@ readrest: * included in the lookahead - NFS piecemeal * writes will barf on it badly. */ - for (tmppindex = fs.first_pindex - 1; - tmppindex >= firstpindex; - --tmppindex) { - vm_page_t mt; - - mt = vm_page_lookup(fs.first_object, tmppindex); - if (mt == NULL || (mt->valid != VM_PAGE_BITS_ALL)) - break; + while ((mt = mt_prev) != NULL && + mt->pindex >= firstpindex && + mt->valid == VM_PAGE_BITS_ALL) { + mt_prev = vm_page_prev(mt); if (mt->busy || (mt->oflags & VPO_BUSY)) continue; Modified: stable/8/sys/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_page.c Wed Nov 17 17:29:22 2010 (r215430) @@ -811,6 +811,42 @@ vm_page_find_least(vm_object_t object, v } /* + * Returns the given page's successor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_next(vm_page_t m) +{ + vm_page_t next; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((next = TAILQ_NEXT(m, listq)) != NULL && + next->pindex != m->pindex + 1) + next = NULL; + return (next); +} + +/* + * Returns the given page's predecessor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_prev(vm_page_t m) +{ + vm_page_t prev; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->pindex != m->pindex - 1) + prev = NULL; + return (prev); +} + +/* * vm_page_rename: * * Move the given memory entry from its Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_page.h Wed Nov 17 17:29:22 2010 (r215430) @@ -315,6 +315,8 @@ void vm_page_deactivate (vm_page_t); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); +vm_page_t vm_page_next(vm_page_t m); +vm_page_t vm_page_prev(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_requeue(vm_page_t m); Modified: stable/8/sys/vm/vm_pageout.c ============================================================================== --- stable/8/sys/vm/vm_pageout.c Wed Nov 17 17:12:41 2010 (r215429) +++ stable/8/sys/vm/vm_pageout.c Wed Nov 17 17:29:22 2010 (r215430) @@ -279,7 +279,7 @@ vm_pageout_clean(m) vm_page_t m; { vm_object_t object; - vm_page_t mc[2*vm_pageout_page_count]; + vm_page_t mc[2*vm_pageout_page_count], pb, ps; int pageout_count; int ib, is, page_base; vm_pindex_t pindex = m->pindex; @@ -304,7 +304,7 @@ vm_pageout_clean(m) return 0; } - mc[vm_pageout_page_count] = m; + mc[vm_pageout_page_count] = pb = ps = m; pageout_count = 1; page_base = vm_pageout_page_count; ib = 1; @@ -339,11 +339,8 @@ more: break; } - if ((p = vm_page_lookup(object, pindex - ib)) == NULL) { - ib = 0; - break; - } - if ((p->oflags & VPO_BUSY) || p->busy) { + if ((p = vm_page_prev(pb)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) { ib = 0; break; } @@ -354,7 +351,7 @@ more: ib = 0; break; } - mc[--page_base] = p; + mc[--page_base] = pb = p; ++pageout_count; ++ib; /* @@ -369,18 +366,16 @@ more: pindex + is < object->size) { vm_page_t p; - if ((p = vm_page_lookup(object, pindex + is)) == NULL) + if ((p = vm_page_next(ps)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) break; - if ((p->oflags & VPO_BUSY) || p->busy) { - break; - } vm_page_test_dirty(p); if (p->dirty == 0 || p->queue != PQ_INACTIVE || p->hold_count != 0) { /* may be undergoing I/O */ break; } - mc[page_base + pageout_count] = p; + mc[page_base + pageout_count] = ps = p; ++pageout_count; ++is; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 17:52:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426AA1065696; Wed, 17 Nov 2010 17:52:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 320678FC0C; Wed, 17 Nov 2010 17:52: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 oAHHq5n8099338; Wed, 17 Nov 2010 17:52:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHq5M8099336; Wed, 17 Nov 2010 17:52:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011171752.oAHHq5M8099336@svn.freebsd.org> From: Alexander Motin Date: Wed, 17 Nov 2010 17:52: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: r215431 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:52:05 -0000 Author: mav Date: Wed Nov 17 17:52:04 2010 New Revision: 215431 URL: http://svn.freebsd.org/changeset/base/215431 Log: Add IDs for VIA VX900 chipset SATA controller. (Missed part of r215428) Modified: head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Wed Nov 17 17:29:22 2010 (r215430) +++ head/sys/dev/ata/ata-pci.h Wed Nov 17 17:52:04 2010 (r215431) @@ -512,7 +512,10 @@ struct ata_pci_controller { #define ATA_VIACX700 0x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX800 0x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX855 0x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX900 0x84101106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 17:59:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 12E6E1065674; Wed, 17 Nov 2010 17:59:01 +0000 (UTC) Date: Wed, 17 Nov 2010 17:59:01 +0000 From: Alexander Best To: Ivan Voras Message-ID: <20101117175901.GA9012@freebsd.org> References: <201011171512.oAHFCAg5095095@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <201011171512.oAHFCAg5095095@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:59:01 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed Nov 17 10, Ivan Voras wrote: > Author: ivoras > Date: Wed Nov 17 15:12:10 2010 > New Revision: 215425 > URL: http://svn.freebsd.org/changeset/base/215425 > > Log: > Change "wait" banner to "qlen" to be more indicative of its purpose and to > be more inline with what gstat uses. any thoughts on this manual page change? cheers. alex > > Reviewed by: gnn > Silence from: phk, keramida > > Modified: > head/usr.sbin/iostat/iostat.8 > head/usr.sbin/iostat/iostat.c > > Modified: head/usr.sbin/iostat/iostat.8 > ============================================================================== > --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) > +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) > @@ -348,7 +348,7 @@ write operations per second > kilobytes read per second > .It kw/s > kilobytes write per second > -.It wait > +.It qlen > transactions queue length > .It svc_t > average duration of transactions, in milliseconds > > Modified: head/usr.sbin/iostat/iostat.c > ============================================================================== > --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) > +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) > @@ -750,11 +750,11 @@ devstats(int perf_select, long double et > printf("\n"); > if (Iflag == 0) > printf( > - "device r/s w/s kr/s kw/s wait svc_t %%b " > + "device r/s w/s kr/s kw/s qlen svc_t %%b " > ); > else > printf( > - "device r/i w/i kr/i kw/i wait svc_t %%b " > + "device r/i w/i kr/i kw/i qlen svc_t %%b " > ); > if (Tflag > 0) > printf("tin tout "); -- a13x --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iostat.8.diff" diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 6a9ef02..3b03acc 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -60,7 +60,7 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd April 17, 2006 +.Dd November 17, 2010 .Dt IOSTAT 8 .Os .Sh NAME @@ -102,11 +102,15 @@ Repeat the display times. If no repeat .Ar count -is specified, the default is infinity. +is specified, and +.Fl w +is specified, the default is infinity, otherwise the default is one. .It Fl C Display CPU statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl d Display only device statistics. @@ -231,6 +235,8 @@ output, up to the number of devices that can be displayed in Display TTY statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl w Pause --oyUTqETQ0mS9luUI-- From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 18:09:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 832021065670; Wed, 17 Nov 2010 18:09:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 726E38FC12; Wed, 17 Nov 2010 18:09: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 oAHI924Q099778; Wed, 17 Nov 2010 18:09:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHI9268099776; Wed, 17 Nov 2010 18:09:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011171809.oAHI9268099776@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 17 Nov 2010 18:09: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: r215432 - head/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:09:02 -0000 Author: yongari Date: Wed Nov 17 18:09:02 2010 New Revision: 215432 URL: http://svn.freebsd.org/changeset/base/215432 Log: MCP55 is the only NVIDIA controller that supports VLAN tag insertion/stripping and it also supports TSO over VLAN. Implement TSO over VLAN support for MCP55 controller. While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4) sets ifp capabilities based on various hardware flags in device attach, there is no need to check hardware flags again in SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and RX checksum offloading even if user requested either TX or RX checksum configuration change. Tested by: Rob Farmer ( rfarmer <> predatorlabs dot net ) Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Wed Nov 17 17:52:04 2010 (r215431) +++ head/sys/dev/nfe/if_nfe.c Wed Nov 17 18:09:02 2010 (r215432) @@ -593,7 +593,8 @@ nfe_attach(device_t dev) if ((sc->nfe_flags & NFE_HW_VLAN) != 0) { ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; if ((ifp->if_capabilities & IFCAP_HWCSUM) != 0) - ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; + ifp->if_capabilities |= IFCAP_VLAN_HWCSUM | + IFCAP_VLAN_HWTSO; } if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) @@ -1777,20 +1778,35 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, if ((mask & IFCAP_WOL_MAGIC) != 0 && (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) ifp->if_capenable ^= IFCAP_WOL_MAGIC; - - if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && - (mask & IFCAP_HWCSUM) != 0) { - ifp->if_capenable ^= IFCAP_HWCSUM; - if ((IFCAP_TXCSUM & ifp->if_capenable) != 0 && - (IFCAP_TXCSUM & ifp->if_capabilities) != 0) + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) ifp->if_hwassist |= NFE_CSUM_FEATURES; else ifp->if_hwassist &= ~NFE_CSUM_FEATURES; + } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; init++; } - if ((sc->nfe_flags & NFE_HW_VLAN) != 0 && - (mask & IFCAP_VLAN_HWTAGGING) != 0) { + if ((mask & IFCAP_TSO4) != 0 && + (ifp->if_capabilities & IFCAP_TSO4) != 0) { + ifp->if_capenable ^= IFCAP_TSO4; + if ((IFCAP_TSO4 & ifp->if_capenable) != 0) + ifp->if_hwassist |= CSUM_TSO; + else + ifp->if_hwassist &= ~CSUM_TSO; + } + if ((mask & IFCAP_VLAN_HWTSO) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTSO) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) + ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; init++; } /* @@ -1800,28 +1816,17 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, * VLAN stripping. So when we know Rx checksum offload is * disabled turn entire hardware VLAN assist off. */ - if ((sc->nfe_flags & (NFE_HW_CSUM | NFE_HW_VLAN)) == - (NFE_HW_CSUM | NFE_HW_VLAN)) { - if ((ifp->if_capenable & IFCAP_RXCSUM) == 0) - ifp->if_capenable &= ~IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_RXCSUM) == 0) { + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + init++; + ifp->if_capenable &= ~(IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWTSO); } - - if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && - (mask & IFCAP_TSO4) != 0) { - ifp->if_capenable ^= IFCAP_TSO4; - if ((IFCAP_TSO4 & ifp->if_capenable) != 0 && - (IFCAP_TSO4 & ifp->if_capabilities) != 0) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; - } - if (init > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; nfe_init(sc); } - if ((sc->nfe_flags & NFE_HW_VLAN) != 0) - VLAN_CAPABILITIES(ifp); + VLAN_CAPABILITIES(ifp); break; default: error = ether_ioctl(ifp, cmd, data); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 18:21:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22EDB1065670; Wed, 17 Nov 2010 18:21:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1145B8FC08; Wed, 17 Nov 2010 18:21: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 oAHILTAK000242; Wed, 17 Nov 2010 18:21:29 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHILTIO000236; Wed, 17 Nov 2010 18:21:29 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011171821.oAHILTIO000236@svn.freebsd.org> From: Alan Cox Date: Wed, 17 Nov 2010 18:21:29 +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: r215433 - in stable/7/sys: kern 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: Wed, 17 Nov 2010 18:21:30 -0000 Author: alc Date: Wed Nov 17 18:21:29 2010 New Revision: 215433 URL: http://svn.freebsd.org/changeset/base/215433 Log: MFC r209407, r209648, r209650 Introduce and use vm_page_next() and vm_page_prev(). They provide both a simpler and faster interface for iterating over the pages of an object. Modified: stable/7/sys/kern/kern_exec.c stable/7/sys/vm/vm_fault.c stable/7/sys/vm/vm_page.c stable/7/sys/vm/vm_page.h stable/7/sys/vm/vm_pageout.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Wed Nov 17 18:09:02 2010 (r215432) +++ stable/7/sys/kern/kern_exec.c Wed Nov 17 18:21:29 2010 (r215433) @@ -884,7 +884,7 @@ exec_map_first_page(imgp) if (initial_pagein > object->size) initial_pagein = object->size; for (i = 1; i < initial_pagein; i++) { - if ((ma[i] = vm_page_lookup(object, i)) != NULL) { + if ((ma[i] = vm_page_next(ma[i - 1])) != NULL) { if (ma[i]->valid) break; if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy) Modified: stable/7/sys/vm/vm_fault.c ============================================================================== --- stable/7/sys/vm/vm_fault.c Wed Nov 17 18:09:02 2010 (r215432) +++ stable/7/sys/vm/vm_fault.c Wed Nov 17 18:21:29 2010 (r215433) @@ -214,7 +214,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr boolean_t growstack, wired; int map_generation; vm_object_t next_object; - vm_page_t marray[VM_FAULT_READ]; + vm_page_t marray[VM_FAULT_READ], mt, mt_prev; int hardfault; int faultcount; struct faultstate fs; @@ -487,12 +487,18 @@ readrest: fs.first_object->type != OBJT_DEVICE && fs.first_object->type != OBJT_PHYS && fs.first_object->type != OBJT_SG) { - vm_pindex_t firstpindex, tmppindex; + vm_pindex_t firstpindex; if (fs.first_pindex < 2 * VM_FAULT_READ) firstpindex = 0; else firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; + mt = fs.first_object != fs.object ? + fs.first_m : fs.m; + KASSERT(mt != NULL, ("vm_fault: missing mt")); + KASSERT((mt->oflags & VPO_BUSY) != 0, + ("vm_fault: mt %p not busy", mt)); + mt_prev = vm_page_prev(mt); vm_page_lock_queues(); /* @@ -500,14 +506,10 @@ readrest: * included in the lookahead - NFS piecemeal * writes will barf on it badly. */ - for (tmppindex = fs.first_pindex - 1; - tmppindex >= firstpindex; - --tmppindex) { - vm_page_t mt; - - mt = vm_page_lookup(fs.first_object, tmppindex); - if (mt == NULL || (mt->valid != VM_PAGE_BITS_ALL)) - break; + while ((mt = mt_prev) != NULL && + mt->pindex >= firstpindex && + mt->valid == VM_PAGE_BITS_ALL) { + mt_prev = vm_page_prev(mt); if (mt->busy || (mt->oflags & VPO_BUSY) || mt->hold_count || Modified: stable/7/sys/vm/vm_page.c ============================================================================== --- stable/7/sys/vm/vm_page.c Wed Nov 17 18:09:02 2010 (r215432) +++ stable/7/sys/vm/vm_page.c Wed Nov 17 18:21:29 2010 (r215433) @@ -772,6 +772,42 @@ vm_page_lookup(vm_object_t object, vm_pi } /* + * Returns the given page's successor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_next(vm_page_t m) +{ + vm_page_t next; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((next = TAILQ_NEXT(m, listq)) != NULL && + next->pindex != m->pindex + 1) + next = NULL; + return (next); +} + +/* + * Returns the given page's predecessor (by pindex) within the object if it is + * resident; if none is found, NULL is returned. + * + * The object must be locked. + */ +vm_page_t +vm_page_prev(vm_page_t m) +{ + vm_page_t prev; + + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->pindex != m->pindex - 1) + prev = NULL; + return (prev); +} + +/* * vm_page_rename: * * Move the given memory entry from its Modified: stable/7/sys/vm/vm_page.h ============================================================================== --- stable/7/sys/vm/vm_page.h Wed Nov 17 18:09:02 2010 (r215432) +++ stable/7/sys/vm/vm_page.h Wed Nov 17 18:21:29 2010 (r215433) @@ -325,6 +325,8 @@ void vm_page_dontneed (register vm_page_ void vm_page_deactivate (vm_page_t); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); +vm_page_t vm_page_next(vm_page_t m); +vm_page_t vm_page_prev(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_requeue(vm_page_t m); Modified: stable/7/sys/vm/vm_pageout.c ============================================================================== --- stable/7/sys/vm/vm_pageout.c Wed Nov 17 18:09:02 2010 (r215432) +++ stable/7/sys/vm/vm_pageout.c Wed Nov 17 18:21:29 2010 (r215433) @@ -281,7 +281,7 @@ vm_pageout_clean(m) vm_page_t m; { vm_object_t object; - vm_page_t mc[2*vm_pageout_page_count]; + vm_page_t mc[2*vm_pageout_page_count], pb, ps; int pageout_count; int ib, is, page_base; vm_pindex_t pindex = m->pindex; @@ -306,7 +306,7 @@ vm_pageout_clean(m) return 0; } - mc[vm_pageout_page_count] = m; + mc[vm_pageout_page_count] = pb = ps = m; pageout_count = 1; page_base = vm_pageout_page_count; ib = 1; @@ -341,11 +341,8 @@ more: break; } - if ((p = vm_page_lookup(object, pindex - ib)) == NULL) { - ib = 0; - break; - } - if ((p->oflags & VPO_BUSY) || p->busy) { + if ((p = vm_page_prev(pb)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) { ib = 0; break; } @@ -357,7 +354,7 @@ more: ib = 0; break; } - mc[--page_base] = p; + mc[--page_base] = pb = p; ++pageout_count; ++ib; /* @@ -372,11 +369,9 @@ more: pindex + is < object->size) { vm_page_t p; - if ((p = vm_page_lookup(object, pindex + is)) == NULL) + if ((p = vm_page_next(ps)) == NULL || + (p->oflags & VPO_BUSY) != 0 || p->busy != 0) break; - if ((p->oflags & VPO_BUSY) || p->busy) { - break; - } vm_page_test_dirty(p); if ((p->dirty & p->valid) == 0 || p->queue != PQ_INACTIVE || @@ -384,7 +379,7 @@ more: p->hold_count != 0) { /* may be undergoing I/O */ break; } - mc[page_base + pageout_count] = p; + mc[page_base + pageout_count] = ps = p; ++pageout_count; ++is; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 18:35:14 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 690041065673; Wed, 17 Nov 2010 18:35:14 +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 DF0158FC13; Wed, 17 Nov 2010 18:35:13 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAHIZAeL013262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 05:35:11 +1100 Date: Thu, 18 Nov 2010 05:35:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Adrian Chadd In-Reply-To: <201011162222.oAGMMGA1069222@svn.freebsd.org> Message-ID: <20101118052216.I1172@besplex.bde.org> References: <201011162222.oAGMMGA1069222@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: r215412 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:35:14 -0000 On Tue, 16 Nov 2010, Adrian Chadd wrote: > Log: > .. and then notice that the list of mk files is ordered, and update to suit. Please also notice that c is before d, e and f in the English alphapbet. Also note that cr is after c[o-p] in lexicographical order. > Modified: head/share/mk/Makefile > ============================================================================== > --- head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) > +++ head/share/mk/Makefile Tue Nov 16 22:22:16 2010 (r215412) > @@ -5,14 +5,14 @@ FILES= bsd.README > FILES+= bsd.arch.inc.mk > FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk > FILES+= bsd.endian.mk > -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk > +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk > FILES+= bsd.kmod.mk > FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk > FILES+= bsd.obj.mk bsd.own.mk > FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk > FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk > FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk > -FILES+= sys.mk version_gen.awk bsd.crunchgen.mk > +FILES+= sys.mk version_gen.awk > NO_OBJ= > FILESDIR= ${BINDIR}/mk The previous (and only other) insertion sort error in this file was putting bsd.symver.mk after bsd.sys.mk. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 18:54:19 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74D10106564A; Wed, 17 Nov 2010 18:54:19 +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 0C4A38FC17; Wed, 17 Nov 2010 18:54:18 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAHIsEEG004106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 05:54:15 +1100 Date: Thu, 18 Nov 2010 05:54:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Maxim Sobolev In-Reply-To: <4CE3DFB3.4060809@sippysoft.com> Message-ID: <20101118053830.K1202@besplex.bde.org> References: <201011160440.oAG4e3YU039413@svn.freebsd.org> <20101117030118.X1203@besplex.bde.org> <4CE3DFB3.4060809@sippysoft.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable-7@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r215368 - in stable/7/sys: arm/at91 arm/xscale/ixp425 contrib/dev/oltr dev/ae dev/an dev/ar dev/arl dev/ath dev/awi dev/ce dev/cm dev/cnw dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:54:19 -0000 On Wed, 17 Nov 2010, Maxim Sobolev wrote: > On 11/16/2010 8:12 AM, Bruce Evans wrote: >> This was quite low for yestdeay's uses (starting in about 1995), but today >> it is little missed since only yesterday's low-end hardware uses it. Most >> of today's interfaces are 1Gbps, and for this it is almost essential for >> the hardware to have a ring buffer with > 50 entries, so most of today's >> drivers ignore ifqmaxlen and set the queue length to the almost equally >> bogus value of the ring buffer size (-1). I set it to about 10000 instead >> in bge and em (10000 is too large, but fixes streaming under certain loads >> when hz is small). > > One of those interfaces is if_rl, which is still quite popular these days and > supports speeds up to 1gbps (which I believe triggered this change). But in It is the only one on the list that I used. Maybe it should be handled specially. Just bump up its queue lengths to maybe 128 for 100 Mbps and 512 for 1 Gbps in all cases, or tune this depending on the amount of memory? > general I agree, unfortunately FreeBSD network subsystem is tuned for > yesteday's speeds. We are seeing lot of lookups and other issues under high > PPS. I wish somebody could stand and pick up the task of cleaning it up and > re-tuning eventually for 2010. We could probably even sponsor in part such a > work (anyone). I haven't seen any lockups, but just the maximum pps on fixed hardware decreasing with every increase in the FreeBSD version number (about 30% since FreeBSD-5). My hardware CPU and bus are saturated by low-end em 1 Gbps and medium-end bge 1 Gbps, so bloat in the stack translates into lower pps. I tuned bge a lot to make it fast under the version of FreeBSD-5 that I usually run, but barely touched upper layers. > Apart from interface tuning for Gbps speeds, another area that needs more > work is splitting up memory pool for the IPC from the memory pool for the > other networking. Today's software is highly distributed and rock-solid IPC > is a must for the FreeBSD being a solid server application platform. That's > OK when under the load we drop some packets, but it's not OK when extreme > network activity can bring down communications between application and > database system within the host itself. And that's exactly what can happen in > FreeBSD. Does flow control help here? I think it should prevent most dropped packets, but be actively harmful if it stops the flow when IPC packets are queued behind non-IPC ones. Large queue lengths are also bad for latency. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 18:55:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C5B2106564A; Wed, 17 Nov 2010 18:55:13 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2698FC19; Wed, 17 Nov 2010 18:55: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 oAHItDGR001095; Wed, 17 Nov 2010 18:55:13 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHItD95001085; Wed, 17 Nov 2010 18:55:13 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201011171855.oAHItD95001085@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 17 Nov 2010 18:55: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: r215434 - in head: sys/netinet usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:55:13 -0000 Author: gnn Date: Wed Nov 17 18:55:12 2010 New Revision: 215434 URL: http://svn.freebsd.org/changeset/base/215434 Log: Add new, per connection, statistics for TCP, including: Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks Modified: head/sys/netinet/tcp.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.1 head/usr.bin/netstat/netstat.h Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp.h Wed Nov 17 18:55:12 2010 (r215434) @@ -225,9 +225,12 @@ struct tcp_info { u_int32_t tcpi_snd_nxt; /* Next egress seqno */ u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ + u_int32_t tcpi_snd_rexmitpack; /* Retransmitted packets */ + u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ + u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[29]; /* Padding. */ + u_int32_t __tcpi_pad[26]; /* Padding. */ }; #endif Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_output.c Wed Nov 17 18:55:12 2010 (r215434) @@ -803,6 +803,7 @@ send: if ((tp->t_flags & TF_FORCEDATA) && len == 1) TCPSTAT_INC(tcps_sndprobe); else if (SEQ_LT(tp->snd_nxt, tp->snd_max) || sack_rxmit) { + tp->t_sndrexmitpack++; TCPSTAT_INC(tcps_sndrexmitpack); TCPSTAT_ADD(tcps_sndrexmitbyte, len); } else { @@ -1027,9 +1028,10 @@ send: * to read more data than can be buffered prior to transmitting on * the connection. */ - if (th->th_win == 0) + if (th->th_win == 0) { + tp->t_sndzerowin++; tp->t_flags |= TF_RXWIN0SENT; - else + } else tp->t_flags &= ~TF_RXWIN0SENT; if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt)); Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_reass.c Wed Nov 17 18:55:12 2010 (r215434) @@ -266,6 +266,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd th->th_seq += i; } } + tp->t_rcvoopack++; TCPSTAT_INC(tcps_rcvoopack); TCPSTAT_ADD(tcps_rcvoobyte, *tlenp); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:55:12 2010 (r215434) @@ -1218,6 +1218,9 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_rcv_mss = tp->t_maxseg; if (tp->t_flags & TF_TOE) ti->tcpi_options |= TCPI_OPT_TOE; + ti->tcpi_snd_rexmitpack = tp->t_sndrexmitpack; + ti->tcpi_rcv_ooopack = tp->t_rcvoopack; + ti->tcpi_snd_zerowin = tp->t_sndzerowin; } /* Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_var.h Wed Nov 17 18:55:12 2010 (r215434) @@ -177,6 +177,7 @@ struct tcpcb { u_long snd_cwnd_prev; /* cwnd prior to retransmit */ u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ + int t_sndzerowin; /* zero-window updates sent */ u_int t_badrxtwin; /* window for retransmit recovery */ u_char snd_limited; /* segments limited transmitted */ /* SACK related state */ @@ -193,6 +194,8 @@ struct tcpcb { u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rfbuf_cnt; /* recv buffer autoscaling byte count */ struct toe_usrreqs *t_tu; /* offload operations vector */ + int t_sndrexmitpack; /* retransmit packets sent */ + int t_rcvoopack; /* out-of-order packets received */ void *t_toe; /* TOE pcb pointer */ int t_bytes_acked; /* # bytes acked during current RTT */ struct cc_algo *cc_algo; /* congestion control algorithm */ Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/inet.c Wed Nov 17 18:55:12 2010 (r215434) @@ -411,25 +411,30 @@ protopr(u_long off, const char *name, in if (Lflag) printf("%-5.5s %-14.14s %-22.22s\n", "Proto", "Listen", "Local Address"); - else { + if (Tflag) + printf((Aflag && !Wflag) ? + "%-5.5s %-6.6s %-6.6s %-6.6s %-18.18s %s\n" : + "%-5.5s %-6.6s %-6.6s %-6.6s %-22.22s %s\n", + "Proto", "Rexmit", "OOORcv", "0-win", + "Local Address", "Foreign Address"); + if (xflag) { + printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ", + "R-MBUF", "S-MBUF", "R-CLUS", + "S-CLUS", "R-HIWA", "S-HIWA", + "R-LOWA", "S-LOWA", "R-BCNT", + "S-BCNT", "R-BMAX", "S-BMAX"); + printf("%7.7s %7.7s %7.7s %7.7s %7.7s %7.7s %s\n", + "rexmt", "persist", "keep", + "2msl", "delack", "rcvtime", + "(state)"); + } + if (!xflag && !Tflag) printf((Aflag && !Wflag) ? "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", "Proto", "Recv-Q", "Send-Q", "Local Address", "Foreign Address"); - if (xflag) { - printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ", - "R-MBUF", "S-MBUF", "R-CLUS", - "S-CLUS", "R-HIWA", "S-HIWA", - "R-LOWA", "S-LOWA", "R-BCNT", - "S-BCNT", "R-BMAX", "S-BMAX"); - printf("%7.7s %7.7s %7.7s %7.7s %7.7s %7.7s %s\n", - "rexmt", "persist", "keep", - "2msl", "delack", "rcvtime", - "(state)"); - } else - printf("(state)\n"); - } + first = 0; } if (Lflag && so->so_qlimit == 0) @@ -455,6 +460,10 @@ protopr(u_long off, const char *name, in snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf1); + } else if (Tflag) { + if (istcp) + printf("%6u %6u %6u ", tp->t_sndrexmitpack, + tp->t_rcvoopack, tp->t_sndzerowin); } else { printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } @@ -540,7 +549,7 @@ protopr(u_long off, const char *name, in timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); } } - if (istcp && !Lflag) { + if (istcp && !Lflag && !xflag && !Tflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) printf("%d", tp->t_state); else { Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/main.c Wed Nov 17 18:55:12 2010 (r215434) @@ -342,6 +342,7 @@ int Qflag; /* show netisr information * int rflag; /* show routing tables (or routing stats) */ int sflag; /* show protocol statistics */ int Wflag; /* wide display */ +int Tflag; /* TCP Information */ int xflag; /* extra information, includes all socket buffer info */ int zflag; /* zero stats */ @@ -361,7 +362,7 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSsuWw:xz")) + while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) != -1) switch(ch) { case 'A': @@ -476,6 +477,9 @@ main(int argc, char *argv[]) interval = atoi(optarg); iflag = 1; break; + case 'T': + Tflag = 1; + break; case 'x': xflag = 1; break; @@ -515,6 +519,9 @@ main(int argc, char *argv[]) if (!live) setgid(getgid()); + if (xflag && Tflag) + errx(1, "-x and -T are incompatible, pick one."); + if (Bflag) { if (!live) usage(); @@ -794,7 +801,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-AaLnSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface [-abdhnW] [-f address_family]\n" " [-M core] [-N system]", Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/netstat.1 Wed Nov 17 18:55:12 2010 (r215434) @@ -49,7 +49,7 @@ depending on the options for the informa .It Xo .Bk -words .Nm -.Op Fl AaLnSWx +.Op Fl AaLnSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -88,6 +88,10 @@ but show ports symbolically. If .Fl x is present, display socket buffer and tcp timer statistics for each internet socket. +When +.Fl T +is present, display information from the TCP control block, including +retransmits, out-of-order packets received, and zero-sized windows advertised. .It Xo .Bk -words .Nm Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/netstat.h Wed Nov 17 18:55:12 2010 (r215434) @@ -50,6 +50,7 @@ extern int numeric_addr; /* show address extern int numeric_port; /* show ports numerically */ extern int rflag; /* show routing tables (or routing stats) */ extern int sflag; /* show protocol statistics */ +extern int Tflag; /* show TCP control block info */ extern int Wflag; /* wide display */ extern int xflag; /* extended display, includes all socket buffer info */ extern int zflag; /* zero stats */ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:25:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F5841065782; Wed, 17 Nov 2010 19:25:38 +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 1EA308FC16; Wed, 17 Nov 2010 19:25: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 oAHJPcUS001779; Wed, 17 Nov 2010 19:25:38 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJPcUS001777; Wed, 17 Nov 2010 19:25:38 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171925.oAHJPcUS001777@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:25: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: r215435 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:25:38 -0000 Author: andreast Date: Wed Nov 17 19:25:37 2010 New Revision: 215435 URL: http://svn.freebsd.org/changeset/base/215435 Log: Load the full 16k stack space. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 18:55:12 2010 (r215434) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) @@ -48,7 +48,7 @@ stack: \n\ _start: \n\ lis %r1,stack@ha \n\ addi %r1,%r1,stack@l \n\ - addi %r1,%r1,8192 \n\ + addi %r1,%r1,16384 \n\ \n\ b startup \n\ "); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:28:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B4AD1065672; Wed, 17 Nov 2010 19:28:49 +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 2A7068FC1C; Wed, 17 Nov 2010 19:28: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 oAHJSnAf001882; Wed, 17 Nov 2010 19:28:49 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJSnao001880; Wed, 17 Nov 2010 19:28:49 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171928.oAHJSnao001880@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:28: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: r215436 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:28:49 -0000 Author: andreast Date: Wed Nov 17 19:28:48 2010 New Revision: 215436 URL: http://svn.freebsd.org/changeset/base/215436 Log: Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does not clear .bss automatically. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:28:48 2010 (r215436) @@ -50,7 +50,20 @@ _start: \n\ addi %r1,%r1,stack@l \n\ addi %r1,%r1,16384 \n\ \n\ - b startup \n\ + /* Clear the .bss!!! */ \n\ + li %r0,0 \n\ + lis %r8,_edata@ha \n\ + addi %r8,%r8,_edata@l\n\ + lis %r9,_end@ha \n\ + addi %r9,%r9,_end@l \n\ + \n\ +1: cmpw 0,%r8,%r9 \n\ + bge 2f \n\ + stw %r0,0(%r8) \n\ + addi %r8,%r8,4 \n\ + b 1b \n\ + \n\ +2: b startup \n\ "); void From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:31:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524E2106566B; Wed, 17 Nov 2010 19:31:49 +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 419168FC0A; Wed, 17 Nov 2010 19:31: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 oAHJVnd0002002; Wed, 17 Nov 2010 19:31:49 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJVn0s002000; Wed, 17 Nov 2010 19:31:49 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171931.oAHJVn0s002000@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:31: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: r215437 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:31:49 -0000 Author: andreast Date: Wed Nov 17 19:31:48 2010 New Revision: 215437 URL: http://svn.freebsd.org/changeset/base/215437 Log: Move the declaration of the eh struct (used only when debugging is enabled) from ofwn_put into the debug section. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_net.c Modified: head/sys/boot/ofw/libofw/ofw_net.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:28:48 2010 (r215436) +++ head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:31:48 2010 (r215437) @@ -90,11 +90,11 @@ ofwn_probe(struct netif *nif, void *mach static int ofwn_put(struct iodesc *desc, void *pkt, size_t len) { - struct ether_header *eh; size_t sendlen; ssize_t rv; #if defined(NETIF_DEBUG) + struct ether_header *eh; printf("netif_put: desc=0x%x pkt=0x%x len=%d\n", desc, pkt, len); eh = pkt; printf("dst: %s ", ether_sprintf(eh->ether_dhost)); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:35:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A96810656A6; Wed, 17 Nov 2010 19:35:56 +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 606E58FC23; Wed, 17 Nov 2010 19:35: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 oAHJZud7002142; Wed, 17 Nov 2010 19:35:56 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJZuW4002138; Wed, 17 Nov 2010 19:35:56 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171935.oAHJZuW4002138@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:35: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: r215438 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:35:56 -0000 Author: andreast Date: Wed Nov 17 19:35:56 2010 New Revision: 215438 URL: http://svn.freebsd.org/changeset/base/215438 Log: Check the real-mode? OF property to find out whether we operate in real or virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is usually false while on pSeries we have found that it is true. The real-mode? property is not available on sparc64. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_copy.c head/sys/boot/ofw/libofw/openfirm.c head/sys/boot/ofw/libofw/openfirm.h Modified: head/sys/boot/ofw/libofw/ofw_copy.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:35:56 2010 (r215438) @@ -91,16 +91,22 @@ ofw_mapmem(vm_offset_t dest, const size_ return (ENOMEM); } - if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) == -1) { - printf("ofw_mapmem: virtual claim failed\n"); - return (ENOMEM); - } - - if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) == -1) { - printf("ofw_mapmem: map failed\n"); - return (ENOMEM); - } + /* + * We only do virtual memory management when real_mode is false. + */ + if (real_mode == 0) { + if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) + == -1) { + printf("ofw_mapmem: virtual claim failed\n"); + return (ENOMEM); + } + if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) + == -1) { + printf("ofw_mapmem: map failed\n"); + return (ENOMEM); + } + } last_dest = (vm_offset_t) destp; last_len = dlen; Modified: head/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:35:56 2010 (r215438) @@ -69,12 +69,15 @@ int (*openfirmware)(void *); phandle_t chosen; ihandle_t mmu; ihandle_t memory; +int real_mode = 0; /* Initialiser */ void OF_init(int (*openfirm)(void *)) { + phandle_t options; + char mode[8]; openfirmware = openfirm; @@ -89,6 +92,15 @@ OF_init(int (*openfirm)(void *)) } if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); + + /* + * Check if we run in real mode. If so, we do not need to map + * memory later on. + */ + options = OF_finddevice("/options"); + OF_getprop(options, "real-mode?", mode, sizeof(mode)); + if (strncmp(mode, "true", 4) == 0) + real_mode = 1; } /* Modified: head/sys/boot/ofw/libofw/openfirm.h ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:35:56 2010 (r215438) @@ -72,6 +72,7 @@ typedef unsigned long int cell_t; extern int (*openfirmware)(void *); extern phandle_t chosen; extern ihandle_t memory, mmu; +extern int real_mode; /* * This isn't actually an Open Firmware function, but it seemed like the right From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:42:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC4D106564A; Wed, 17 Nov 2010 19:42:44 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 062DA8FC08; Wed, 17 Nov 2010 19:42:42 +0000 (UTC) Received: by qwi4 with SMTP id 4so222456qwi.13 for ; Wed, 17 Nov 2010 11:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=xHy8DAs+cO8XgaHHDR2gs4f+WeKgFXDJLZ75UcfX+Sw=; b=OPu+kOtkSCi2qLsVhRXcRiyjFjCKuiO3A5Uk0jjg4eASvL/bojSjqKYzmqJADK+GFe 45B58GbIEZz3jsTrPb8NGa1jEgSEkHTCQMa3CUvIH4C6k2mILJ2B4b7vfKXXaP84KPCL xj7WnUZ5qrVaOrg2dl7bcu5b4ODKqi9IsKBPI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=XJUTrWpvoBf0StLdRDtCgYSaf3UariLDv1cp0jgmETgSwI54pzgBV7wHjQIgTbFnzP sbQDaSur5KtUPc/NMKO8k7DGdb0WiNk1tbf6Q00hLrJ3sNF2wnFcvIcImnL6aiqns5CZ ourqn0tmjkRtnvIqJIWU/MyrF4x3DDk+WtyPg= Received: by 10.229.212.5 with SMTP id gq5mr7728946qcb.275.1290022961505; Wed, 17 Nov 2010 11:42:41 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Wed, 17 Nov 2010 11:42:01 -0800 (PST) In-Reply-To: <20101117175901.GA9012@freebsd.org> References: <201011171512.oAHFCAg5095095@svn.freebsd.org> <20101117175901.GA9012@freebsd.org> From: Ivan Voras Date: Wed, 17 Nov 2010 20:42:01 +0100 X-Google-Sender-Auth: x2abwMi7irqBz8Ebw7fYf9mbLCk Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:42:44 -0000 On 17 November 2010 18:59, Alexander Best wrote: > On Wed Nov 17 10, Ivan Voras wrote: >> Author: ivoras >> Date: Wed Nov 17 15:12:10 2010 >> New Revision: 215425 >> URL: http://svn.freebsd.org/changeset/base/215425 >> >> Log: >> =C2=A0 Change "wait" banner to "qlen" to be more indicative of its purpo= se and to >> =C2=A0 be more inline with what gstat uses. > > any thoughts on this manual page change? Looks reasonable. From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 19:54:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B2A10656A9; Wed, 17 Nov 2010 19:54:02 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117938FC27; Wed, 17 Nov 2010 19:54: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 oAHJs18Z002527; Wed, 17 Nov 2010 19:54:01 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJs1pt002524; Wed, 17 Nov 2010 19:54:01 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201011171954.oAHJs1pt002524@svn.freebsd.org> From: Tijl Coosemans Date: Wed, 17 Nov 2010 19:54: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: r215439 - in head/gnu/usr.bin: binutils/ld cc/cc_tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:54:02 -0000 Author: tijl Date: Wed Nov 17 19:54:01 2010 New Revision: 215439 URL: http://svn.freebsd.org/changeset/base/215439 Log: Let gcc and ld know where to find 32 bit libraries on amd64. Reviewed by: arch@ Approved by: kib (mentor) Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 head/gnu/usr.bin/cc/cc_tools/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:54:01 2010 (r215439) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:54:01 2010 (r215439) @@ -307,7 +307,7 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: -.if ${TARGET_ARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64" echo 'static const char *const multilib_raw[] = { \ ". !m64 !m32;", \ "64:../lib m64 !m32;", \ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 20:21:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F37E41065670; Wed, 17 Nov 2010 20:21:10 +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 E194B8FC1F; Wed, 17 Nov 2010 20:21:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHKLA0X003236; Wed, 17 Nov 2010 20:21:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHKLAdR003234; Wed, 17 Nov 2010 20:21:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011172021.oAHKLAdR003234@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Nov 2010 20:21:10 +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: r215440 - stable/7/tools/regression/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 20:21:11 -0000 Author: jilles Date: Wed Nov 17 20:21:10 2010 New Revision: 215440 URL: http://svn.freebsd.org/changeset/base/215440 Log: MFC r174692: Fix wordexp() testsuite. Original commit by das. Modified: stable/7/tools/regression/lib/libc/gen/test-wordexp.c Directory Properties: stable/7/tools/regression/lib/libc/ (props changed) Modified: stable/7/tools/regression/lib/libc/gen/test-wordexp.c ============================================================================== --- stable/7/tools/regression/lib/libc/gen/test-wordexp.c Wed Nov 17 19:54:01 2010 (r215439) +++ stable/7/tools/regression/lib/libc/gen/test-wordexp.c Wed Nov 17 20:21:10 2010 (r215440) @@ -45,7 +45,7 @@ main(int argc, char *argv[]) int r; /* Test that the macros are there. */ - (void)(WRDE_APPEND + WRDE_DOOFS + WRDE_NOCMD + WRDE_REUSE + + (void)(WRDE_APPEND + WRDE_DOOFFS + WRDE_NOCMD + WRDE_REUSE + WRDE_SHOWERR + WRDE_UNDEF); (void)(WRDE_BADCHAR + WRDE_BADVAL + WRDE_CMDSUB + WRDE_NOSPACE + WRDE_SYNTAX); @@ -59,9 +59,9 @@ main(int argc, char *argv[]) assert(we.we_wordv[2] == NULL); wordfree(&we); - /* WRDE_DOOFS */ + /* WRDE_DOOFFS */ we.we_offs = 3; - r = wordexp("hello world", &we, WRDE_DOOFS); + r = wordexp("hello world", &we, WRDE_DOOFFS); assert(r == 0); assert(we.we_wordc == 2); assert(we.we_wordv[0] == NULL); @@ -95,13 +95,13 @@ main(int argc, char *argv[]) assert(we.we_wordv[4] == NULL); wordfree(&we); - /* WRDE_DOOFS + WRDE_APPEND */ + /* WRDE_DOOFFS + WRDE_APPEND */ we.we_offs = 2; - r = wordexp("this is", &we, WRDE_DOOFS); + r = wordexp("this is", &we, WRDE_DOOFFS); assert(r == 0); - r = wordexp("a test", &we, WRDE_APPEND|WRDE_DOOFS); + r = wordexp("a test", &we, WRDE_APPEND|WRDE_DOOFFS); assert(r == 0); - r = wordexp("of wordexp", &we, WRDE_APPEND|WRDE_DOOFS); + r = wordexp("of wordexp", &we, WRDE_APPEND|WRDE_DOOFFS); assert(r == 0); assert(we.we_wordc == 6); assert(we.we_wordv[0] == NULL); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 20:37:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119C91065673; Wed, 17 Nov 2010 20:37:17 +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 006D58FC13; Wed, 17 Nov 2010 20:37: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 oAHKbGCE003636; Wed, 17 Nov 2010 20:37:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHKbGGD003634; Wed, 17 Nov 2010 20:37:16 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011172037.oAHKbGGD003634@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 20:37: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: r215441 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 20:37:17 -0000 Author: andreast Date: Wed Nov 17 20:37:16 2010 New Revision: 215441 URL: http://svn.freebsd.org/changeset/base/215441 Log: Revert r215435. We need to figure out the exact value to be loaded. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:21:10 2010 (r215440) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:37:16 2010 (r215441) @@ -48,7 +48,7 @@ stack: \n\ _start: \n\ lis %r1,stack@ha \n\ addi %r1,%r1,stack@l \n\ - addi %r1,%r1,16384 \n\ + addi %r1,%r1,8192 \n\ \n\ /* Clear the .bss!!! */ \n\ li %r0,0 \n\ From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 21:45:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5531065672; Wed, 17 Nov 2010 21:45:11 +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 68BC08FC14; Wed, 17 Nov 2010 21:45: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 oAHLjBHf005155; Wed, 17 Nov 2010 21:45:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHLjBhE005152; Wed, 17 Nov 2010 21:45:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011172145.oAHLjBhE005152@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Nov 2010 21:45:11 +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: r215442 - in stable/7: lib/libc/gen tools/regression/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 21:45:11 -0000 Author: jilles Date: Wed Nov 17 21:45:11 2010 New Revision: 215442 URL: http://svn.freebsd.org/changeset/base/215442 Log: MFC r198406: wordexp(3): fix some bugs with signals and long outputs * retry various system calls on EINTR * retry the rest after a short read (common if there is more than about 1K of output) * block SIGCHLD like system(3) does (note that this does not and cannot work fully in threaded programs, they will need to be careful with wait functions) PR: 90580 Modified: stable/7/lib/libc/gen/wordexp.c stable/7/tools/regression/lib/libc/gen/test-wordexp.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/wordexp.c ============================================================================== --- stable/7/lib/libc/gen/wordexp.c Wed Nov 17 20:37:16 2010 (r215441) +++ stable/7/lib/libc/gen/wordexp.c Wed Nov 17 21:45:11 2010 (r215442) @@ -28,8 +28,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -73,6 +75,24 @@ wordexp(const char * __restrict words, w return (0); } +static size_t +we_read_fully(int fd, char *buffer, size_t len) +{ + size_t done; + ssize_t nread; + + done = 0; + do { + nread = _read(fd, buffer + done, len - done); + if (nread == -1 && errno == EINTR) + continue; + if (nread <= 0) + break; + done += nread; + } while (done != len); + return done; +} + /* * we_askshell -- * Use the `wordexp' /bin/sh builtin function to do most of the work @@ -90,20 +110,31 @@ we_askshell(const char *words, wordexp_t size_t sofs; /* Offset into we->we_strings */ size_t vofs; /* Offset into we->we_wordv */ pid_t pid; /* Process ID of child */ + pid_t wpid; /* waitpid return value */ int status; /* Child exit status */ + int error; /* Our return value */ + int serrno; /* errno to return */ char *ifs; /* IFS env. var. */ char *np, *p; /* Handy pointers */ char *nstrings; /* Temporary for realloc() */ char **nwv; /* Temporary for realloc() */ + sigset_t newsigblock, oldsigblock; + serrno = errno; if ((ifs = getenv("IFS")) == NULL) ifs = " \t\n"; if (pipe(pdes) < 0) return (WRDE_NOSPACE); /* XXX */ + (void)sigemptyset(&newsigblock); + (void)sigaddset(&newsigblock, SIGCHLD); + (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); if ((pid = fork()) < 0) { + serrno = errno; _close(pdes[0]); _close(pdes[1]); + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + errno = serrno; return (WRDE_NOSPACE); /* XXX */ } else if (pid == 0) { @@ -114,6 +145,7 @@ we_askshell(const char *words, wordexp_t int devnull; char *cmd; + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); _close(pdes[0]); if (_dup2(pdes[1], STDOUT_FILENO) < 0) _exit(1); @@ -139,10 +171,11 @@ we_askshell(const char *words, wordexp_t * the expanded words separated by nulls. */ _close(pdes[1]); - if (_read(pdes[0], wbuf, 8) != 8 || _read(pdes[0], bbuf, 8) != 8) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); + if (we_read_fully(pdes[0], wbuf, 8) != 8 || + we_read_fully(pdes[0], bbuf, 8) != 8) { + error = flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX; + serrno = errno; + goto cleanup; } wbuf[8] = bbuf[8] = '\0'; nwords = strtol(wbuf, NULL, 16); @@ -162,33 +195,38 @@ we_askshell(const char *words, wordexp_t if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + (flags & WRDE_DOOFFS ? we->we_offs : 0)) * sizeof(char *))) == NULL) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (WRDE_NOSPACE); + error = WRDE_NOSPACE; + goto cleanup; } we->we_wordv = nwv; if ((nstrings = realloc(we->we_strings, we->we_nbytes)) == NULL) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (WRDE_NOSPACE); + error = WRDE_NOSPACE; + goto cleanup; } for (i = 0; i < vofs; i++) if (we->we_wordv[i] != NULL) we->we_wordv[i] += nstrings - we->we_strings; we->we_strings = nstrings; - if (_read(pdes[0], we->we_strings + sofs, nbytes) != nbytes) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); + if (we_read_fully(pdes[0], we->we_strings + sofs, nbytes) != nbytes) { + error = flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX; + serrno = errno; + goto cleanup; } - if (_waitpid(pid, &status, 0) < 0 || !WIFEXITED(status) || - WEXITSTATUS(status) != 0) { - _close(pdes[0]); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); - } + error = 0; +cleanup: _close(pdes[0]); + do + wpid = _waitpid(pid, &status, 0); + while (wpid < 0 && errno == EINTR); + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + if (error != 0) { + errno = serrno; + return (error); + } + if (wpid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) + return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); /* * Break the null-terminated expanded word strings out into Modified: stable/7/tools/regression/lib/libc/gen/test-wordexp.c ============================================================================== --- stable/7/tools/regression/lib/libc/gen/test-wordexp.c Wed Nov 17 20:37:16 2010 (r215441) +++ stable/7/tools/regression/lib/libc/gen/test-wordexp.c Wed Nov 17 21:45:11 2010 (r215442) @@ -32,17 +32,36 @@ #include __FBSDID("$FreeBSD$"); +#include + #include +#include +#include #include #include #include #include +static void +chld_handler(int x) +{ + int status, serrno; + + (void)x; + serrno = errno; + while (waitpid(-1, &status, WNOHANG) > 0) + ; + errno = serrno; +} + int main(int argc, char *argv[]) { + struct sigaction sa; wordexp_t we; int r; + int i; + char longdata[6 * 10000 + 1]; /* Test that the macros are there. */ (void)(WRDE_APPEND + WRDE_DOOFFS + WRDE_NOCMD + WRDE_REUSE + @@ -59,6 +78,15 @@ main(int argc, char *argv[]) assert(we.we_wordv[2] == NULL); wordfree(&we); + /* Long output. */ + for (i = 0; i < 10000; i++) + snprintf(longdata + 6 * i, 7, "%05d ", i); + r = wordexp(longdata, &we, 0); + assert(r == 0); + assert(we.we_wordc == 10000); + assert(we.we_wordv[10000] == NULL); + wordfree(&we); + /* WRDE_DOOFFS */ we.we_offs = 3; r = wordexp("hello world", &we, WRDE_DOOFFS); @@ -167,6 +195,20 @@ main(int argc, char *argv[]) r = wordexp("test } test", &we, 0); assert(r == WRDE_BADCHAR); + /* With a SIGCHLD handler that reaps all zombies. */ + sa.sa_flags = 0; + sigemptyset(&sa.sa_mask); + sa.sa_handler = chld_handler; + r = sigaction(SIGCHLD, &sa, NULL); + assert(r == 0); + r = wordexp("hello world", &we, 0); + assert(r == 0); + assert(we.we_wordc == 2); + assert(strcmp(we.we_wordv[0], "hello") == 0); + assert(strcmp(we.we_wordv[1], "world") == 0); + assert(we.we_wordv[2] == NULL); + wordfree(&we); + printf("PASS wordexp()\n"); printf("PASS wordfree()\n"); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 22:03:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB851065673; Wed, 17 Nov 2010 22:03:10 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 94CC58FC26; Wed, 17 Nov 2010 22:03:10 +0000 (UTC) Received: from smtp.hudson-trading.com ([209.249.190.9] helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PInPu-0001R1-Ts; Wed, 17 Nov 2010 14:11:38 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <201011171855.oAHItD95001085@svn.freebsd.org> Date: Wed, 17 Nov 2010 14:11:36 -0500 Content-Transfer-Encoding: 7bit Message-Id: <252070B4-8939-4C10-A5B2-09615B1A597E@neville-neil.com> References: <201011171855.oAHItD95001085@svn.freebsd.org> To: George V. Neville-Neil X-Mailer: Apple Mail (2.1082) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [0 0] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Source: X-Source-Args: X-Source-Dir: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215434 - in head: sys/netinet usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 22:03:10 -0000 On Nov 17, 2010, at 13:55 , George V. Neville-Neil wrote: > Author: gnn > Date: Wed Nov 17 18:55:12 2010 > New Revision: 215434 > URL: http://svn.freebsd.org/changeset/base/215434 > > Log: > Add new, per connection, statistics for TCP, including: > Retransmitted Packets > Zero Window Advertisements > Out of Order Receives > > These statistics are available via the -T argument to > netstat(1). > MFC after: 2 weeks > One quick note, I forgot to point out: Submitted by: jhb@ Apologies to John. Best, George From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 22:28:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF95C1065672; Wed, 17 Nov 2010 22:28:04 +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 BDD918FC08; Wed, 17 Nov 2010 22:28: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 oAHMS4MA006144; Wed, 17 Nov 2010 22:28:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHMS4PV006140; Wed, 17 Nov 2010 22:28:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011172228.oAHMS4PV006140@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Nov 2010 22:28: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: r215443 - in head/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: Wed, 17 Nov 2010 22:28:04 -0000 Author: jhb Date: Wed Nov 17 22:28:04 2010 New Revision: 215443 URL: http://svn.freebsd.org/changeset/base/215443 Log: Add a resource_list_reserved() method that returns true if a resource list entry contains a reserved resource. Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Nov 17 21:45:11 2010 (r215442) +++ head/sys/kern/subr_bus.c Wed Nov 17 22:28:04 2010 (r215443) @@ -2934,6 +2934,30 @@ resource_list_busy(struct resource_list } /** + * @brief Determine if a resource entry is reserved. + * + * Returns true if a resource entry is reserved meaning that it has an + * associated "reserved" resource. The resource can either be + * allocated or unallocated. + * + * @param rl the resource list to search + * @param type the resource entry type (e.g. SYS_RES_MEMORY) + * @param rid the resource identifier + * + * @returns Non-zero if the entry is reserved, zero otherwise. + */ +int +resource_list_reserved(struct resource_list *rl, int type, int rid) +{ + struct resource_list_entry *rle; + + rle = resource_list_find(rl, type, rid); + if (rle != NULL && rle->flags & RLE_RESERVED) + return (1); + return (0); +} + +/** * @brief Find a resource entry by type and rid. * * @param rl the resource list to search Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Wed Nov 17 21:45:11 2010 (r215442) +++ head/sys/sys/bus.h Wed Nov 17 22:28:04 2010 (r215443) @@ -256,6 +256,7 @@ int resource_list_add_next(struct resour u_long start, u_long end, u_long count); int resource_list_busy(struct resource_list *rl, int type, int rid); +int resource_list_reserved(struct resource_list *rl, int type, int rid); struct resource_list_entry* resource_list_find(struct resource_list *rl, int type, int rid); From owner-svn-src-all@FreeBSD.ORG Wed Nov 17 23:13:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98F7F1065670; Wed, 17 Nov 2010 23:13:02 +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 85A2F8FC0A; Wed, 17 Nov 2010 23:13: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 oAHND269007317; Wed, 17 Nov 2010 23:13:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHND2hc007315; Wed, 17 Nov 2010 23:13:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011172313.oAHND2hc007315@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 17 Nov 2010 23:13: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: r215444 - in stable/8: bin/test tools/regression/bin tools/regression/bin/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 23:13:02 -0000 Author: jilles Date: Wed Nov 17 23:13:02 2010 New Revision: 215444 URL: http://svn.freebsd.org/changeset/base/215444 Log: MFC r215022: test: Move tests to tools/regression/bin/test. Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh). Added: stable/8/tools/regression/bin/test/ - copied from r215022, head/tools/regression/bin/test/ Deleted: stable/8/bin/test/TEST.README stable/8/bin/test/TEST.csh stable/8/bin/test/TEST.sh Modified: stable/8/tools/regression/bin/Makefile Directory Properties: stable/8/bin/test/ (props changed) stable/8/tools/regression/bin/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/tools/regression/bin/Makefile ============================================================================== --- stable/8/tools/regression/bin/Makefile Wed Nov 17 22:28:04 2010 (r215443) +++ stable/8/tools/regression/bin/Makefile Wed Nov 17 23:13:02 2010 (r215444) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= date mv pax sh +SUBDIR= date mv pax sh test .include From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 01:14:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EA11065675; Thu, 18 Nov 2010 01:14:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32A168FC12; Thu, 18 Nov 2010 01:14:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI1EJ27009869; Thu, 18 Nov 2010 01:14:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI1EJn9009865; Thu, 18 Nov 2010 01:14:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011180114.oAI1EJn9009865@svn.freebsd.org> From: Xin LI Date: Thu, 18 Nov 2010 01:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215445 - stable/8/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 01:14:19 -0000 Author: delphij Date: Thu Nov 18 01:14:18 2010 New Revision: 215445 URL: http://svn.freebsd.org/changeset/base/215445 Log: MFC through r214047: nc from OpenBSD 4.8. Modified: stable/8/contrib/netcat/nc.1 stable/8/contrib/netcat/netcat.c stable/8/contrib/netcat/socks.c Directory Properties: stable/8/contrib/netcat/ (props changed) Modified: stable/8/contrib/netcat/nc.1 ============================================================================== --- stable/8/contrib/netcat/nc.1 Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/nc.1 Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.53 2010/02/23 23:00:52 schwarze Exp $ +.\" $OpenBSD: nc.1,v 1.55 2010/07/25 07:51:39 guenther Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2010 +.Dd July 25, 2010 .Dt NC 1 .Os .Sh NAME @@ -46,7 +46,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS -.Op Fl V Ar fib +.Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -201,8 +201,10 @@ Specifies to use sockets. .It Fl u Use UDP instead of the default option of TCP. -.It Fl V Ar fib -Set the routing table (FIB). +.It Fl V Ar rtable +Set the routing table +.Pq Dq FIB +to be used. The default is 0. .It Fl v Have Modified: stable/8/contrib/netcat/netcat.c ============================================================================== --- stable/8/contrib/netcat/netcat.c Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/netcat.c Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.95 2010/02/27 00:58:56 nicm Exp $ */ +/* $OpenBSD: netcat.c,v 1.98 2010/07/03 04:44:51 guenther Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -93,7 +93,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ -u_int rdomain; +u_int rtableid; int timeout = -1; int family = AF_UNSPEC; @@ -139,7 +139,6 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; - rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -235,10 +234,10 @@ main(int argc, char *argv[]) case 'V': if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(1, "Multiple FIBS not supported"); - rdomain = (unsigned int)strtonum(optarg, 0, + rtableid = (unsigned int)strtonum(optarg, 0, numfibs - 1, &errstr); if (errstr) - errx(1, "FIB %s: %s", errstr, optarg); + errx(1, "rtable %s: %s", errstr, optarg); break; case 'v': vflag = 1; @@ -371,11 +370,11 @@ main(int argc, char *argv[]) */ if (uflag) { int rv, plen; - char buf[8192]; + char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -561,8 +560,8 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -634,8 +633,8 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -680,12 +679,12 @@ void readwrite(int nfd) { struct pollfd pfd[2]; - unsigned char buf[8192]; + unsigned char buf[16384]; int n, wfd = fileno(stdin); int lfd = fileno(stdout); int plen; - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -827,10 +826,9 @@ build_ports(char *p) hi = strtonum(p, 1, PORT_MAX, &errstr); if (errstr) errx(1, "port number %s: %s", errstr, p); - portlist[0] = calloc(1, PORT_MAX_LEN); + portlist[0] = strdup(p); if (portlist[0] == NULL) err(1, NULL); - portlist[0] = p; } } @@ -947,7 +945,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ - \t-V fib Specify alternate routing table (FIB)\n\ + \t-V rtable Specify alternate routing table\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -992,7 +990,7 @@ usage(int ret) "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); Modified: stable/8/contrib/netcat/socks.c ============================================================================== --- stable/8/contrib/netcat/socks.c Wed Nov 17 23:13:02 2010 (r215444) +++ stable/8/contrib/netcat/socks.c Thu Nov 18 01:14:18 2010 (r215445) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.17 2006/09/25 04:51:20 ray Exp $ */ +/* $OpenBSD: socks.c,v 1.18 2010/04/20 07:26:35 nicm Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -167,11 +167,11 @@ socks_connect(const char *host, const ch buf[2] = SOCKS_NOAUTH; cnt = atomicio(vwrite, proxyfd, buf, 3); if (cnt != 3) - err(1, "write failed (%d/3)", cnt); + err(1, "write failed (%zu/3)", cnt); cnt = atomicio(read, proxyfd, buf, 2); if (cnt != 2) - err(1, "read failed (%d/3)", cnt); + err(1, "read failed (%zu/3)", cnt); if (buf[1] == SOCKS_NOMETHOD) errx(1, "authentication method negotiation failed"); @@ -220,11 +220,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 10); if (cnt != 10) - err(1, "read failed (%d/10)", cnt); + err(1, "read failed (%zu/10)", cnt); if (buf[1] != 0) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == 4) { @@ -242,11 +242,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 8); if (cnt != 8) - err(1, "read failed (%d/8)", cnt); + err(1, "read failed (%zu/8)", cnt); if (buf[1] != 90) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == -1) { @@ -272,7 +272,7 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, r); if (cnt != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); if (authretry > 1) { char resp[1024]; @@ -290,7 +290,7 @@ socks_connect(const char *host, const ch errx(1, "Proxy auth response too long"); r = strlen(buf); if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); } /* Terminate headers */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 01:21:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10525106566C; Thu, 18 Nov 2010 01:21:56 +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 F0BF48FC0C; Thu, 18 Nov 2010 01:21: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 oAI1Lt0a010096; Thu, 18 Nov 2010 01:21:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI1Lt1b010092; Thu, 18 Nov 2010 01:21:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011180121.oAI1Lt1b010092@svn.freebsd.org> From: Xin LI Date: Thu, 18 Nov 2010 01:21: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: r215446 - stable/7/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 01:21:56 -0000 Author: delphij Date: Thu Nov 18 01:21:55 2010 New Revision: 215446 URL: http://svn.freebsd.org/changeset/base/215446 Log: MFC through r214047: nc from OpenBSD 4.8. Modified: stable/7/contrib/netcat/nc.1 stable/7/contrib/netcat/netcat.c stable/7/contrib/netcat/socks.c Directory Properties: stable/7/contrib/netcat/ (props changed) Modified: stable/7/contrib/netcat/nc.1 ============================================================================== --- stable/7/contrib/netcat/nc.1 Thu Nov 18 01:14:18 2010 (r215445) +++ stable/7/contrib/netcat/nc.1 Thu Nov 18 01:21:55 2010 (r215446) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ +.\" $OpenBSD: nc.1,v 1.55 2010/07/25 07:51:39 guenther Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5 2009 +.Dd July 25, 2010 .Dt NC 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh SYNOPSIS .Nm nc .Bk -words -.Op Fl 46DdEhklnorStUuvz +.Op Fl 46DdEhklnrStUuvz .Op Fl e Ar IPsec_policy .Op Fl I Ar length .Op Fl i Ar interval @@ -46,13 +46,13 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS -.Op Fl V Ar fib +.Op Fl V Ar rtable .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo .Fl x Ar proxy_address Ns Oo : Ns -.Ar port Oc Oc -.Xc +.Ar port Oc +.Xc Oc .Op Ar hostname .Op Ar port .Ek @@ -158,16 +158,6 @@ TCP_NOOPT socket option. .It Fl O Ar length Specifies the size of the TCP send buffer. -When -.It Fl o -.Dq Once-only mode . -By default, -.Nm -does not terminate on EOF condition on input, -but continues until the network side has been closed down. -Specifying -.Fl o -will make it terminate on EOF as well. .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. @@ -206,11 +196,15 @@ This makes it possible to use .Nm to script telnet sessions. .It Fl U -Specifies to use Unix Domain Sockets. +Specifies to use +.Ux Ns -domain +sockets. .It Fl u Use UDP instead of the default option of TCP. -.It Fl V Ar fib -Set the routing table (FIB). +.It Fl V Ar rtable +Set the routing table +.Pq Dq FIB +to be used. The default is 0. .It Fl v Have @@ -347,7 +341,7 @@ when it might be necessary to verify wha in response to commands issued by the client. For example, to retrieve the home page of a web site: .Bd -literal -offset indent -$ echo -n "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80 +$ printf "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80 .Ed .Pp Note that this also displays the headers sent by the web server. @@ -428,7 +422,9 @@ outgoing traffic only. .Pp .Dl $ nc -e 'out ipsec esp/transport//require' host.example.com 42 .Pp -Create and listen on a Unix Domain Socket: +Create and listen on a +.Ux Ns -domain +socket: .Pp .Dl $ nc -lU /var/tmp/dsocket .Pp Modified: stable/7/contrib/netcat/netcat.c ============================================================================== --- stable/7/contrib/netcat/netcat.c Thu Nov 18 01:14:18 2010 (r215445) +++ stable/7/contrib/netcat/netcat.c Thu Nov 18 01:21:55 2010 (r215446) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ +/* $OpenBSD: netcat.c,v 1.98 2010/07/03 04:44:51 guenther Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -72,14 +72,12 @@ #define PORT_MAX_LEN 6 /* Command Line Options */ -int Eflag; /* Use IPsec ESP */ int dflag; /* detached, no stdin */ unsigned int iflag; /* Interval Flag */ int jflag; /* use jumbo frames if we can */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ -int oflag; /* Once only: stop on EOF */ int FreeBSD_Oflag; /* Do not use TCP options */ char *Pflag; /* Proxy username */ char *pflag; /* Localport flag */ @@ -95,7 +93,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ -u_int rdomain; +u_int rtableid; int timeout = -1; int family = AF_UNSPEC; @@ -141,7 +139,6 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; - rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -151,7 +148,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:jklnO:oP:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:hI:i:jklnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -214,7 +211,7 @@ main(int argc, char *argv[]) nflag = 1; break; case 'o': - oflag = 1; + fprintf(stderr, "option -o is deprecated.\n"); break; case 'P': Pflag = optarg; @@ -237,10 +234,10 @@ main(int argc, char *argv[]) case 'V': if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(1, "Multiple FIBS not supported"); - rdomain = (unsigned int)strtonum(optarg, 0, + rtableid = (unsigned int)strtonum(optarg, 0, numfibs - 1, &errstr); if (errstr) - errx(1, "FIB %s: %s", errstr, optarg); + errx(1, "rtable %s: %s", errstr, optarg); break; case 'v': vflag = 1; @@ -282,8 +279,6 @@ main(int argc, char *argv[]) case 'T': Tflag = parse_iptos(optarg); break; - case 0: - break; default: usage(1); } @@ -375,11 +370,11 @@ main(int argc, char *argv[]) */ if (uflag) { int rv, plen; - char buf[8192]; + char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -455,8 +450,10 @@ main(int argc, char *argv[]) uflag ? "udp" : "tcp"); } - printf("Connection to %s %s port [%s/%s] succeeded!\n", - host, portlist[i], uflag ? "udp" : "tcp", + fprintf(stderr, + "Connection to %s %s port [%s/%s] " + "succeeded!\n", host, portlist[i], + uflag ? "udp" : "tcp", sv ? sv->s_name : "*"); } if (!zflag) @@ -563,8 +560,8 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -572,10 +569,8 @@ remote_connect(const char *host, const c if (sflag || pflag) { struct addrinfo ahints, *ares; -#ifdef SO_BINDANY - /* try SO_BINDANY, but don't insist */ - setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); -#endif + /* try IP_BINDANY, but don't insist */ + setsockopt(s, IPPROTO_IP, IP_BINDANY, &on, sizeof(on)); memset(&ahints, 0, sizeof(struct addrinfo)); ahints.ai_family = res0->ai_family; ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; @@ -638,8 +633,8 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; - if (rdomain) { - if (setfib(rdomain) == -1) + if (rtableid) { + if (setfib(rtableid) == -1) err(1, "setfib"); } @@ -684,12 +679,12 @@ void readwrite(int nfd) { struct pollfd pfd[2]; - unsigned char buf[8192]; + unsigned char buf[16384]; int n, wfd = fileno(stdin); int lfd = fileno(stdout); int plen; - plen = jflag ? 8192 : 1024; + plen = jflag ? 16384 : 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -727,10 +722,9 @@ readwrite(int nfd) } if (!dflag && pfd[1].revents & POLLIN) { - if ((n = read(wfd, buf, plen)) < 0 || - (oflag && n == 0)) { + if ((n = read(wfd, buf, plen)) < 0) return; - } else if (n == 0) { + else if (n == 0) { shutdown(nfd, SHUT_WR); pfd[1].fd = -1; pfd[1].events = 0; @@ -749,27 +743,27 @@ atelnet(int nfd, unsigned char *buf, uns unsigned char *p, *end; unsigned char obuf[4]; - end = buf + size; - obuf[0] = '\0'; + if (size < 3) + return; + end = buf + size - 2; for (p = buf; p < end; p++) { if (*p != IAC) - break; + continue; obuf[0] = IAC; p++; if ((*p == WILL) || (*p == WONT)) obuf[1] = DONT; - if ((*p == DO) || (*p == DONT)) + else if ((*p == DO) || (*p == DONT)) obuf[1] = WONT; - if (obuf) { - p++; - obuf[2] = *p; - obuf[3] = '\0'; - if (atomicio(vwrite, nfd, obuf, 3) != 3) - warn("Write Error!"); - obuf[0] = '\0'; - } + else + continue; + + p++; + obuf[2] = *p; + if (atomicio(vwrite, nfd, obuf, 3) != 3) + warn("Write Error!"); } } @@ -832,10 +826,9 @@ build_ports(char *p) hi = strtonum(p, 1, PORT_MAX, &errstr); if (errstr) errx(1, "port number %s: %s", errstr, p); - portlist[0] = calloc(1, PORT_MAX_LEN); + portlist[0] = strdup(p); if (portlist[0] == NULL) err(1, NULL); - portlist[0] = p; } } @@ -943,7 +936,6 @@ help(void) \t-n Suppress name/port resolutions\n\ \t--no-tcpopt Disable TCP options\n\ \t-O length TCP send buffer length\n\ - \t-o Terminate on EOF on input\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ \t-r Randomize remote ports\n\ @@ -953,7 +945,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ - \t-V fib Specify alternate routing table (FIB)\n\ + \t-V rtable Specify alternate routing table\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -993,12 +985,12 @@ usage(int ret) { fprintf(stderr, #ifdef IPSEC - "usage: nc [-46DdEhklnorStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdEhklnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" #else - "usage: nc [-46DdhklnorStUuvz] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-V rtable] [-w timeout] [-X proxy_protocol]\n" "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); Modified: stable/7/contrib/netcat/socks.c ============================================================================== --- stable/7/contrib/netcat/socks.c Thu Nov 18 01:14:18 2010 (r215445) +++ stable/7/contrib/netcat/socks.c Thu Nov 18 01:21:55 2010 (r215446) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.17 2006/09/25 04:51:20 ray Exp $ */ +/* $OpenBSD: socks.c,v 1.18 2010/04/20 07:26:35 nicm Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -167,11 +167,11 @@ socks_connect(const char *host, const ch buf[2] = SOCKS_NOAUTH; cnt = atomicio(vwrite, proxyfd, buf, 3); if (cnt != 3) - err(1, "write failed (%d/3)", cnt); + err(1, "write failed (%zu/3)", cnt); cnt = atomicio(read, proxyfd, buf, 2); if (cnt != 2) - err(1, "read failed (%d/3)", cnt); + err(1, "read failed (%zu/3)", cnt); if (buf[1] == SOCKS_NOMETHOD) errx(1, "authentication method negotiation failed"); @@ -220,11 +220,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 10); if (cnt != 10) - err(1, "read failed (%d/10)", cnt); + err(1, "read failed (%zu/10)", cnt); if (buf[1] != 0) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == 4) { @@ -242,11 +242,11 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, wlen); if (cnt != wlen) - err(1, "write failed (%d/%d)", cnt, wlen); + err(1, "write failed (%zu/%zu)", cnt, wlen); cnt = atomicio(read, proxyfd, buf, 8); if (cnt != 8) - err(1, "read failed (%d/8)", cnt); + err(1, "read failed (%zu/8)", cnt); if (buf[1] != 90) errx(1, "connection failed, SOCKS error %d", buf[1]); } else if (socksv == -1) { @@ -272,7 +272,7 @@ socks_connect(const char *host, const ch cnt = atomicio(vwrite, proxyfd, buf, r); if (cnt != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); if (authretry > 1) { char resp[1024]; @@ -290,7 +290,7 @@ socks_connect(const char *host, const ch errx(1, "Proxy auth response too long"); r = strlen(buf); if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r) - err(1, "write failed (%d/%d)", cnt, r); + err(1, "write failed (%zu/%d)", cnt, r); } /* Terminate headers */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 06:17:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BE5E106566C for ; Thu, 18 Nov 2010 06:17:48 +0000 (UTC) (envelope-from bounce-1557992-5471732-757496-255656@imnicamail.com) Received: from smtp.imnicamail.com (imnicamail.com [67.215.233.94]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF448FC17 for ; Thu, 18 Nov 2010 06:17:47 +0000 (UTC) Received: from smtp.imnicamail.com (localhost.localdomain [127.0.0.1]) by smtp.imnicamail.com (Postfix) with ESMTP id E0AE310DE1D65 for ; Thu, 18 Nov 2010 05:52:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=imnicamail.com; h=date:to :from:reply-to:subject:message-id:sender:list-unsubscribe :mime-version:content-type:content-transfer-encoding; s=default; bh=u/mJJ93h0BTXM2jw5F0QEwcops4=; b=tAIxrUj/TEC0Guvp7apa1jdwsQSi Voej199DXV/04vxiP8nH1cAqZ5dyL8G2VgJUUZ4G1jtT8vPWBaQg4RzoH/QXUTzq RdGdm9FHlL5gLzMVBD/1ohQq9+8Rttsj7+sDX2j1GvXxbNNlaKqNsO0oWkBifqNb vYUEvG0yqv/msY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=imnicamail.com; h=date:to :from:reply-to:subject:message-id:sender:list-unsubscribe :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=uYM3vpWfO1skZpLmWkpIMXBbEhEq+VYwCdAqX5Sf5tjEDSwSE3xCM 71mioY4gGUzxAqVRHNHtmB38bf47R65lwSMavH0AYVrJbfZWlr9UXXF0Si9Jafm4 Y8Euw8CpfyCie6hFUs3UB6IJdMdnRWor0/ucNxvXs29v7ZzrQdi1A0= Received: by smtp.imnicamail.com (Postfix, from userid 5001) id DEC0010DE1D56; Thu, 18 Nov 2010 05:52:10 +0000 (GMT) Date: Thu, 18 Nov 2010 05:52:10 +0000 To: "svn-src-all@freebsd.org" From: Godthoughts Wired Message-ID: X-Priority: 3 Sender: X-Mailer: ImnicaMail X-Complaints-To: complaints@imnicamail.com X-MessageID: NzYzN3x8fHwyNjgyMnx8fHxzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZ3x8fHwzNzEzfHx8fDEyNTN8fHx8MA%3D%3D X-Report-Abuse: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Celebrating SIN! X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Godthoughts Wired List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 06:17:48 -0000 GodThoughtsWired! &= nbsp; Wednesday, November 17, 2010 Evangelizing the Church in the Age of Delus= ion You are subs= cribed as svn-src-all@freebsd.org celebrating sin! "Enjoy the passing pleasures of = sin..." Hebrews 11:25 I'll bet you didn't know the Bible said THAT!&= nbsp; Go ahead, look it up! See! I told ya! It's just = another way of saying the motto that "everyone of consenting age in any l= and knows," "What happens in Vegas, stays in Vegas."<= /b> As I sit here re-reading the article fro= m the USA Today Newspaper* whose entire premise is the celebration of sin= , I weep for the United States of America. T= he slogan is seven years old now, the article tells me, The key moment came in 2004 when Laura Bush ap= peared on the Tonight Show after a Sin City visit. Jay Leno ask= ed if she'd seen the Chippendales male strippers. Her re= sponse, worth more than $1 million in advertising; "Jay, what h= appens in Vegas, stays in Vegas." "There are no rules here," gushes one sati= sfied customer. "Nowadays, visitors may feel let down if they ha= ven't done what they wouldn't do back home," proclaims the marketing = director of a "sin club" where clients pay $400.00 per hour for..."sin."<= br /> "The city's mayor, a former defense lawyer for gangsters," sob= erly laments that, "The real estate market is in the dumps, but he thi= nks new attractions, such as the downtown Mob Museum-due in fall 2= 011-will lure visitors." Ahh, the celebration of sin.= By now, I trust that many of you are aware that the Bible verse a= t the top of the page? from Hebrews 11:25? I took it completely ou= t of context! Did you look it up? Well, ho= w 'bout ending with a couple of Bible verses that are completely "in" con= text: "There is a way which seems right to a man,= but its end is the way of death." Proverbs 16:25 And, "The wages of sin is death." Romans= 6:23 Always has been...Always will be. Now there's a sl= ogan for ya'. *quotations taken from, The USA Today newspa= per, Friday, November 12, 2010. p.5D. For more informat= ion about the GodThoughts Ministry, click [1]here. For more information about the author of G= odThoughts, click [2]here. [3]Click here to unsubscribe 3D"." References 1. 3D"http://www.imnicamai=/ 2. 3D"http://www.imnicamail.com/v4/tl.php?p=3D6nx/= 3. 3D"http://www.imnicamail.com/v4/u.php?p=3D6nx= From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 08:03:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94FD01065695; Thu, 18 Nov 2010 08:03: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 82F1C8FC18; Thu, 18 Nov 2010 08:03: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 oAI83eIe018654; Thu, 18 Nov 2010 08:03:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI83e5q018652; Thu, 18 Nov 2010 08:03:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011180803.oAI83e5q018652@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 08:03: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: r215449 - 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, 18 Nov 2010 08:03:40 -0000 Author: mav Date: Thu Nov 18 08:03:40 2010 New Revision: 215449 URL: http://svn.freebsd.org/changeset/base/215449 Log: Some VIA SATA controllers provide access to non-standard SATA registers via PCI config space. Use them to implement hot-plug and link speed reporting. Tested on ASRock PV530 board with VX900 chipset. Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 02:16:06 2010 (r215448) +++ head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 08:03:40 2010 (r215449) @@ -63,6 +63,12 @@ static int ata_via_new_setmode(device_t static int ata_via_sata_ch_attach(device_t dev); static int ata_via_sata_getrev(device_t dev, int target); static int ata_via_sata_setmode(device_t dev, int target, int mode); +static void ata_via_sata_reset(device_t dev); +static int ata_via_sata_scr_read(device_t dev, int port, int reg, + u_int32_t *result); +static int ata_via_sata_scr_write(device_t dev, int port, int reg, + u_int32_t value); +static int ata_via_sata_status(device_t dev); /* misc defines */ #define VIA33 0 @@ -153,11 +159,12 @@ ata_via_chipinit(device_t dev) if (ata_ahci_chipinit(dev) != ENXIO) return (0); } - /* 2 SATA without SATA registers on first channel + 1 PATA on second */ + /* 2 SATA with "SATA registers" at PCI config space + PATA on secondary */ if (ctlr->chip->cfg2 & VIASATA) { ctlr->ch_attach = ata_via_sata_ch_attach; ctlr->setmode = ata_via_sata_setmode; ctlr->getrev = ata_via_sata_getrev; + ctlr->reset = ata_via_sata_reset; return 0; } /* Legacy SATA/SATA+PATA with SATA registers in BAR(5). */ @@ -405,18 +412,30 @@ ata_via_sata_ch_attach(device_t dev) if (ata_pci_ch_attach(dev)) return ENXIO; - if (ch->unit == 0) + if (ch->unit == 0) { + ch->hw.status = ata_via_sata_status; + ch->hw.pm_read = ata_via_sata_scr_read; + ch->hw.pm_write = ata_via_sata_scr_write; + ch->flags |= ATA_PERIODIC_POLL; ch->flags |= ATA_SATA; + ata_sata_scr_write(ch, 0, ATA_SERROR, 0xffffffff); + ata_sata_scr_write(ch, 1, ATA_SERROR, 0xffffffff); + } return (0); } static int ata_via_sata_getrev(device_t dev, int target) { + device_t parent = device_get_parent(dev); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit == 0) - return (1); + if (ch->unit == 0) { + if (pci_read_config(parent, 0xa0 + target, 1) & 0x10) + return (2); + else + return (1); + } return (0); } @@ -430,5 +449,110 @@ ata_via_sata_setmode(device_t dev, int t return (ata_via_old_setmode(dev, target, mode)); } +static void +ata_via_sata_reset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + int devs; + + if (ch->unit == 0) { + devs = ata_sata_phy_reset(dev, 0, 0); + DELAY(10000); + devs += ata_sata_phy_reset(dev, 1, 0); + } else + devs = 1; + if (devs) + ata_generic_reset(dev); +} + +static int +ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SSTATUS: + val = pci_read_config(parent, 0xa0 + port, 1); + *result = val & 0x03; + if (*result != ATA_SS_DET_NO_DEVICE) { + if (val & 0x04) + *result |= ATA_SS_IPM_PARTIAL; + else if (val & 0x08) + *result |= ATA_SS_IPM_SLUMBER; + else + *result |= ATA_SS_IPM_ACTIVE; + if (val & 0x10) + *result |= ATA_SS_SPD_GEN2; + else + *result |= ATA_SS_SPD_GEN1; + } + break; + case ATA_SERROR: + *result = pci_read_config(parent, 0xa8 + port * 4, 4); + break; + case ATA_SCONTROL: + val = pci_read_config(parent, 0xa4 + port, 1); + *result = 0; + if (val & 0x01) + *result |= ATA_SC_DET_RESET; + if (val & 0x02) + *result |= ATA_SC_DET_DISABLE; + if (val & 0x04) + *result |= ATA_SC_IPM_DIS_PARTIAL; + if (val & 0x08) + *result |= ATA_SC_IPM_DIS_SLUMBER; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SERROR: + pci_write_config(parent, 0xa8 + port * 4, value, 4); + break; + case ATA_SCONTROL: + val = 0; + if (value & ATA_SC_DET_RESET) + val |= 0x01; + if (value & ATA_SC_DET_DISABLE) + val |= 0x02; + if (value & ATA_SC_IPM_DIS_PARTIAL) + val |= 0x04; + if (value & ATA_SC_IPM_DIS_SLUMBER) + val |= 0x08; + pci_write_config(parent, 0xa4 + port, val, 1); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_status(device_t dev) +{ + + ata_sata_phy_check_events(dev, 0); + ata_sata_phy_check_events(dev, 1); + return (ata_pci_status(dev)); +} + ATA_DECLARE_DRIVER(ata_via); MODULE_DEPEND(ata_via, ata_ahci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 08:32:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E5D21065674; Thu, 18 Nov 2010 08:32:48 +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 F02608FC16; Thu, 18 Nov 2010 08:32: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 oAI8WlaE019409; Thu, 18 Nov 2010 08:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI8Wldn019407; Thu, 18 Nov 2010 08:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201011180832.oAI8Wldn019407@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 18 Nov 2010 08: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: r215450 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 08:32:48 -0000 Author: hselasky Date: Thu Nov 18 08:32:47 2010 New Revision: 215450 URL: http://svn.freebsd.org/changeset/base/215450 Log: Correct description of the return values of the LibUSB v1.0 libusb_control_transfer() function. PR: usb/151851 Submitted by: HIROSHI OOTA Approved by: thompsa (mentor) Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Nov 18 08:03:40 2010 (r215449) +++ head/lib/libusb/libusb.3 Thu Nov 18 08:32:47 2010 (r215450) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 10:34:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38BEF1065670; Thu, 18 Nov 2010 10:34:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2799D8FC1B; Thu, 18 Nov 2010 10:34: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 oAIAYJIo022379; Thu, 18 Nov 2010 10:34:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIAYJxI022377; Thu, 18 Nov 2010 10:34:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181034.oAIAYJxI022377@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 10:34: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: r215451 - 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, 18 Nov 2010 10:34:19 -0000 Author: mav Date: Thu Nov 18 10:34:18 2010 New Revision: 215451 URL: http://svn.freebsd.org/changeset/base/215451 Log: Record that there is no devices if SATA reset found none. Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 08:32:47 2010 (r215450) +++ head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 10:34:18 2010 (r215451) @@ -463,6 +463,8 @@ ata_via_sata_reset(device_t dev) devs = 1; if (devs) ata_generic_reset(dev); + else + ch->devices = 0; } static int From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 11:58:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581FB106564A; Thu, 18 Nov 2010 11:58: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 4790D8FC08; Thu, 18 Nov 2010 11:58: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 oAIBwHCP029527; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIBwHpA029525; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181158.oAIBwHpA029525@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 11:58: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: r215453 - 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, 18 Nov 2010 11:58:17 -0000 Author: mav Date: Thu Nov 18 11:58:17 2010 New Revision: 215453 URL: http://svn.freebsd.org/changeset/base/215453 Log: Even if we are skipping SATA hard reset - set power management bits in SControl register. This should make things consistent and help to avoid unexpected PHY events that I've noticed in some cases on VIA controllers. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Thu Nov 18 11:19:23 2010 (r215452) +++ head/sys/dev/ata/ata-sata.c Thu Nov 18 11:58:17 2010 (r215453) @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int por if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) return (0); - if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) + if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) { + ata_sata_scr_write(ch, port, ATA_SCONTROL, + ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)); return ata_sata_connect(ch, port, quick); + } } if (bootverbose) { From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 13:25:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055011065694; Thu, 18 Nov 2010 13:25:08 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 9CD598FC18; Thu, 18 Nov 2010 13:25:07 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E30D745C9C; Thu, 18 Nov 2010 14:25:05 +0100 (CET) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 6B25E45C89; Thu, 18 Nov 2010 14:25:00 +0100 (CET) Date: Thu, 18 Nov 2010 14:24:17 +0100 From: Pawel Jakub Dawidek To: Konstantin Belousov Message-ID: <20101118132417.GA2011@garage.freebsd.pl> References: <201011171617.oAHGHFSW097106@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <201011171617.oAHGHFSW097106@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 13:25:08 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 17, 2010 at 04:17:15PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Nov 17 16:17:15 2010 > New Revision: 215427 > URL: http://svn.freebsd.org/changeset/base/215427 >=20 > Log: > Only save FPU context when not executing in the context of the crypto > thread. Is this just performance improvement or some kind of a bug fix? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzlKQEACgkQForvXbEpPzS2xQCdEb+4nWJRxB0FP2Qow3MIgW0d R6kAoJ02PCovMohRA++LuJF82asPWPg8 =9To7 -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 13:38:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 510271065696; Thu, 18 Nov 2010 13:38: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 3FF998FC16; Thu, 18 Nov 2010 13:38: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 oAIDcYDc034218; Thu, 18 Nov 2010 13:38:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIDcYwL034216; Thu, 18 Nov 2010 13:38:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181338.oAIDcYwL034216@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 13:38: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: r215454 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 13:38:34 -0000 Author: mav Date: Thu Nov 18 13:38:33 2010 New Revision: 215454 URL: http://svn.freebsd.org/changeset/base/215454 Log: If HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) - handle all of them as disabled. This was original cause of the problem, workarounded by r215453. MFC after: 1 week Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Nov 18 11:58:17 2010 (r215453) +++ head/sys/cam/ata/ata_xpt.c Thu Nov 18 13:38:33 2010 (r215454) @@ -963,6 +963,8 @@ noerror: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1103,6 +1105,8 @@ notsata: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 14:17:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC04B106566B; Thu, 18 Nov 2010 14:17:32 +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 22C528FC19; Thu, 18 Nov 2010 14:17:31 +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 oAIEHSZW048433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 16:17:28 +0200 (EET) (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 oAIEHReB022003; Thu, 18 Nov 2010 16:17:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAIEHRik022002; Thu, 18 Nov 2010 16:17:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Nov 2010 16:17:27 +0200 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20101118141727.GG2392@deviant.kiev.zoral.com.ua> References: <201011171617.oAHGHFSW097106@svn.freebsd.org> <20101118132417.GA2011@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PDiuv7PNAHapHaHA" Content-Disposition: inline In-Reply-To: <20101118132417.GA2011@garage.freebsd.pl> 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: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 14:17:32 -0000 --PDiuv7PNAHapHaHA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 18, 2010 at 02:24:17PM +0100, Pawel Jakub Dawidek wrote: > On Wed, Nov 17, 2010 at 04:17:15PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Nov 17 16:17:15 2010 > > New Revision: 215427 > > URL: http://svn.freebsd.org/changeset/base/215427 > >=20 > > Log: > > Only save FPU context when not executing in the context of the crypto > > thread. >=20 > Is this just performance improvement or some kind of a bug fix? Only performance improvement. --PDiuv7PNAHapHaHA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzlNXcACgkQC3+MBN1Mb4jMUwCguVzFKUkqtRxBSXM6oX7bfLsF gwkAoMWUtJk7ozmiuxzEqXzLDVzV30fH =qeS1 -----END PGP SIGNATURE----- --PDiuv7PNAHapHaHA-- From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 16:32:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 549561065695; Thu, 18 Nov 2010 16:32:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 455E78FC17; Thu, 18 Nov 2010 16:32: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 oAIGWru0038081; Thu, 18 Nov 2010 16:32:53 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIGWrje038078; Thu, 18 Nov 2010 16:32:53 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011181632.oAIGWrje038078@svn.freebsd.org> From: Mark Murray Date: Thu, 18 Nov 2010 16:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215455 - in head: . cddl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 16:32:53 -0000 Author: markm Date: Thu Nov 18 16:32:52 2010 New Revision: 215455 URL: http://svn.freebsd.org/changeset/base/215455 Log: Do not lint code beyond necessity (with apologies to Wiliam of Ockham). Don't lint externally maintained CDDL code, or relint the 32-bit libraries in amd64 mode. Modified: head/Makefile.inc1 head/cddl/Makefile.inc Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 18 13:38:33 2010 (r215454) +++ head/Makefile.inc1 Thu Nov 18 16:32:52 2010 (r215455) @@ -322,7 +322,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif Modified: head/cddl/Makefile.inc ============================================================================== --- head/cddl/Makefile.inc Thu Nov 18 13:38:33 2010 (r215454) +++ head/cddl/Makefile.inc Thu Nov 18 16:32:52 2010 (r215455) @@ -9,3 +9,8 @@ CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 CSTD?= gnu89 + +# Do not lint the CDDL stuff. It is all externally maintained and +# lint output is wasteful noise here. + +NO_LINT= From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 17:44:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34DFB1065670; Thu, 18 Nov 2010 17:44:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDF08FC1D; Thu, 18 Nov 2010 17:44: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 oAIHi2jc039624; Thu, 18 Nov 2010 17:44:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHi2Fu039620; Thu, 18 Nov 2010 17:44:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011181744.oAIHi2Fu039620@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Nov 2010 17:44: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: r215456 - stable/8/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 17:44:03 -0000 Author: yongari Date: Thu Nov 18 17:44:02 2010 New Revision: 215456 URL: http://svn.freebsd.org/changeset/base/215456 Log: MFC r215132,215194: r215132: Add basic WOL support for MCP ethernet controllers. It seems the controller does not perform automatic switching from 1000Mbps link to 10/100Mbps link when WOL is activated. Implement establishing 10/100Mps link with auto-negotiation in driver. Link status change handler was modified to remove taskqueue based approach since driver now needs synchronous handling for link establishment. Submitted by: Yamagi Burmeister (lists <> yamagi.org ) (initial version) Tested by: Yamagi Burmeister (lists <> yamagi.org ) r215194: Fix regression introduced in r215132. Caller always holds a driver lock before accessing mii, so locking is not needed here. Reported by: Rob Farmer (rfarmer <> predatorlabs dot net) Modified: stable/8/sys/dev/nfe/if_nfe.c stable/8/sys/dev/nfe/if_nfereg.h stable/8/sys/dev/nfe/if_nfevar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/8/sys/dev/nfe/if_nfe.c Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfe.c Thu Nov 18 17:44:02 2010 (r215456) @@ -81,7 +81,7 @@ static void nfe_power(struct nfe_softc * static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); static void nfe_miibus_statchg(device_t); -static void nfe_link_task(void *, int); +static void nfe_mac_config(struct nfe_softc *, struct mii_data *); static void nfe_set_intr(struct nfe_softc *); static __inline void nfe_enable_intr(struct nfe_softc *); static __inline void nfe_disable_intr(struct nfe_softc *); @@ -125,6 +125,8 @@ static int sysctl_hw_nfe_proc_limit(SYSC static void nfe_sysctl_node(struct nfe_softc *); static void nfe_stats_clear(struct nfe_softc *); static void nfe_stats_update(struct nfe_softc *); +static void nfe_set_linkspeed(struct nfe_softc *); +static void nfe_set_wol(struct nfe_softc *); #ifdef NFE_DEBUG static int nfedebug = 0; @@ -348,7 +350,6 @@ nfe_attach(device_t dev) mtx_init(&sc->nfe_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->nfe_stat_ch, &sc->nfe_mtx, 0); - TASK_INIT(&sc->nfe_link_task, 0, nfe_link_task, sc); pci_enable_busmaster(dev); @@ -586,6 +587,9 @@ nfe_attach(device_t dev) if ((ifp->if_capabilities & IFCAP_HWCSUM) != 0) ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; } + + if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) + ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; /* @@ -666,7 +670,6 @@ nfe_detach(device_t dev) NFE_UNLOCK(sc); callout_drain(&sc->nfe_stat_ch); taskqueue_drain(taskqueue_fast, &sc->nfe_tx_task); - taskqueue_drain(taskqueue_swi, &sc->nfe_link_task); ether_ifdetach(ifp); } @@ -752,6 +755,7 @@ nfe_suspend(device_t dev) NFE_LOCK(sc); nfe_stop(sc->nfe_ifp); + nfe_set_wol(sc); sc->nfe_suspended = 1; NFE_UNLOCK(sc); @@ -768,6 +772,7 @@ nfe_resume(device_t dev) sc = device_get_softc(dev); NFE_LOCK(sc); + nfe_power(sc); ifp = sc->nfe_ifp; if (ifp->if_flags & IFF_UP) nfe_init_locked(sc); @@ -806,37 +811,51 @@ static void nfe_miibus_statchg(device_t dev) { struct nfe_softc *sc; - - sc = device_get_softc(dev); - taskqueue_enqueue(taskqueue_swi, &sc->nfe_link_task); -} - - -static void -nfe_link_task(void *arg, int pending) -{ - struct nfe_softc *sc; struct mii_data *mii; struct ifnet *ifp; - uint32_t phy, seed, misc = NFE_MISC1_MAGIC, link = NFE_MEDIA_SET; - uint32_t gmask, rxctl, txctl, val; + uint32_t rxctl, txctl; - sc = (struct nfe_softc *)arg; - - NFE_LOCK(sc); + sc = device_get_softc(dev); mii = device_get_softc(sc->nfe_miibus); ifp = sc->nfe_ifp; - if (mii == NULL || ifp == NULL) { - NFE_UNLOCK(sc); - return; - } - if (mii->mii_media_status & IFM_ACTIVE) { - if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) + sc->nfe_link = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_1000_T: sc->nfe_link = 1; - } else - sc->nfe_link = 0; + break; + default: + break; + } + } + + nfe_mac_config(sc, mii); + txctl = NFE_READ(sc, NFE_TX_CTL); + rxctl = NFE_READ(sc, NFE_RX_CTL); + if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + txctl |= NFE_TX_START; + rxctl |= NFE_RX_START; + } else { + txctl &= ~NFE_TX_START; + rxctl &= ~NFE_RX_START; + } + NFE_WRITE(sc, NFE_TX_CTL, txctl); + NFE_WRITE(sc, NFE_RX_CTL, rxctl); +} + + +static void +nfe_mac_config(struct nfe_softc *sc, struct mii_data *mii) +{ + uint32_t link, misc, phy, seed; + uint32_t val; + + NFE_LOCK_ASSERT(sc); phy = NFE_READ(sc, NFE_PHY_IFACE); phy &= ~(NFE_PHY_HDX | NFE_PHY_100TX | NFE_PHY_1000T); @@ -844,7 +863,10 @@ nfe_link_task(void *arg, int pending) seed = NFE_READ(sc, NFE_RNDSEED); seed &= ~NFE_SEED_MASK; - if (((mii->mii_media_active & IFM_GMASK) & IFM_FDX) == 0) { + misc = NFE_MISC1_MAGIC; + link = NFE_MEDIA_SET; + + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) == 0) { phy |= NFE_PHY_HDX; /* half-duplex */ misc |= NFE_MISC1_HDX; } @@ -881,18 +903,18 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, misc); NFE_WRITE(sc, NFE_LINKSPEED, link); - gmask = mii->mii_media_active & IFM_GMASK; - if ((gmask & IFM_FDX) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { /* It seems all hardwares supports Rx pause frames. */ val = NFE_READ(sc, NFE_RXFILTER); - if ((gmask & IFM_FLAG0) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) != 0) val |= NFE_PFF_RX_PAUSE; else val &= ~NFE_PFF_RX_PAUSE; NFE_WRITE(sc, NFE_RXFILTER, val); if ((sc->nfe_flags & NFE_TX_FLOW_CTRL) != 0) { val = NFE_READ(sc, NFE_MISC1); - if ((gmask & IFM_FLAG1) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_FLAG1) != 0) { NFE_WRITE(sc, NFE_TX_PAUSE_FRAME, NFE_TX_PAUSE_FRAME_ENABLE); val |= NFE_MISC1_TX_PAUSE; @@ -916,20 +938,6 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, val); } } - - txctl = NFE_READ(sc, NFE_TX_CTL); - rxctl = NFE_READ(sc, NFE_RX_CTL); - if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - txctl |= NFE_TX_START; - rxctl |= NFE_RX_START; - } else { - txctl &= ~NFE_TX_START; - rxctl &= ~NFE_RX_START; - } - NFE_WRITE(sc, NFE_TX_CTL, txctl); - NFE_WRITE(sc, NFE_RX_CTL, rxctl); - - NFE_UNLOCK(sc); } @@ -1714,6 +1722,10 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, } } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && (mask & IFCAP_HWCSUM) != 0) { ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2746,7 +2758,8 @@ nfe_init_locked(void *xsc) NFE_WRITE(sc, NFE_STATUS, sc->mii_phyaddr << 24 | NFE_STATUS_MAGIC); NFE_WRITE(sc, NFE_SETUP_R4, NFE_R4_MAGIC); - NFE_WRITE(sc, NFE_WOL_CTL, NFE_WOL_MAGIC); + /* Disable WOL. */ + NFE_WRITE(sc, NFE_WOL_CTL, 0); sc->rxtxctl &= ~NFE_RXTX_BIT2; NFE_WRITE(sc, NFE_RXTX_CTL, sc->rxtxctl); @@ -2917,18 +2930,8 @@ nfe_tick(void *xsc) static int nfe_shutdown(device_t dev) { - struct nfe_softc *sc; - struct ifnet *ifp; - - sc = device_get_softc(dev); - NFE_LOCK(sc); - ifp = sc->nfe_ifp; - nfe_stop(ifp); - /* nfe_reset(sc); */ - NFE_UNLOCK(sc); - - return (0); + return (nfe_suspend(dev)); } @@ -3212,3 +3215,115 @@ nfe_stats_update(struct nfe_softc *sc) stats->rx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST); } } + + +static void +nfe_set_linkspeed(struct nfe_softc *sc) +{ + struct mii_softc *miisc; + struct mii_data *mii; + int aneg, i, phyno; + + NFE_LOCK_ASSERT(sc); + + mii = device_get_softc(sc->nfe_miibus); + mii_pollstat(mii); + aneg = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch IFM_SUBTYPE(mii->mii_media_active) { + case IFM_10_T: + case IFM_100_TX: + return; + case IFM_1000_T: + aneg++; + break; + default: + break; + } + } + phyno = 0; + if (mii->mii_instance) { + miisc = LIST_FIRST(&mii->mii_phys); + phyno = miisc->mii_phy; + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + mii_phy_reset(miisc); + } else + return; + nfe_miibus_writereg(sc->nfe_dev, phyno, MII_100T2CR, 0); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_ANAR, ANAR_TX_FD | ANAR_TX | ANAR_10_FD | ANAR_10 | ANAR_CSMA); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG); + DELAY(1000); + if (aneg != 0) { + /* + * Poll link state until nfe(4) get a 10/100Mbps link. + */ + for (i = 0; i < MII_ANEGTICKS_GIGE; i++) { + mii_pollstat(mii); + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) + == (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + nfe_mac_config(sc, mii); + return; + default: + break; + } + } + NFE_UNLOCK(sc); + pause("nfelnk", hz); + NFE_LOCK(sc); + } + if (i == MII_ANEGTICKS_GIGE) + device_printf(sc->nfe_dev, + "establishing a link failed, WOL may not work!"); + } + /* + * No link, force MAC to have 100Mbps, full-duplex link. + * This is the last resort and may/may not work. + */ + mii->mii_media_status = IFM_AVALID | IFM_ACTIVE; + mii->mii_media_active = IFM_ETHER | IFM_100_TX | IFM_FDX; + nfe_mac_config(sc, mii); +} + + +static void +nfe_set_wol(struct nfe_softc *sc) +{ + struct ifnet *ifp; + uint32_t wolctl; + int pmc; + uint16_t pmstat; + + NFE_LOCK_ASSERT(sc); + + if (pci_find_extcap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) + return; + ifp = sc->nfe_ifp; + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + wolctl = NFE_WOL_MAGIC; + else + wolctl = 0; + NFE_WRITE(sc, NFE_WOL_CTL, wolctl); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) { + nfe_set_linkspeed(sc); + if ((sc->nfe_flags & NFE_PWR_MGMT) != 0) + NFE_WRITE(sc, NFE_PWR2_CTL, + NFE_READ(sc, NFE_PWR2_CTL) & ~NFE_PWR2_GATE_CLOCKS); + /* Enable RX. */ + NFE_WRITE(sc, NFE_RX_RING_ADDR_HI, 0); + NFE_WRITE(sc, NFE_RX_RING_ADDR_LO, 0); + NFE_WRITE(sc, NFE_RX_CTL, NFE_READ(sc, NFE_RX_CTL) | + NFE_RX_START); + } + /* Request PME if WOL is requested. */ + pmstat = pci_read_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} Modified: stable/8/sys/dev/nfe/if_nfereg.h ============================================================================== --- stable/8/sys/dev/nfe/if_nfereg.h Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfereg.h Thu Nov 18 17:44:02 2010 (r215456) @@ -190,6 +190,7 @@ #define NFE_PWR2_WAKEUP_MASK 0x0f11 #define NFE_PWR2_REVA3 (1 << 0) +#define NFE_PWR2_GATE_CLOCKS 0x0f00 #define NFE_MEDIA_SET 0x10000 #define NFE_MEDIA_1000T 0x00032 Modified: stable/8/sys/dev/nfe/if_nfevar.h ============================================================================== --- stable/8/sys/dev/nfe/if_nfevar.h Thu Nov 18 16:32:52 2010 (r215455) +++ stable/8/sys/dev/nfe/if_nfevar.h Thu Nov 18 17:44:02 2010 (r215456) @@ -140,7 +140,6 @@ struct nfe_softc { struct taskqueue *nfe_tq; struct task nfe_int_task; struct task nfe_tx_task; - struct task nfe_link_task; int nfe_link; int nfe_suspended; int nfe_framesize; From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 17:49:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9988106564A; Thu, 18 Nov 2010 17:49:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B90FD8FC0A; Thu, 18 Nov 2010 17:49: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 oAIHnOHx039815; Thu, 18 Nov 2010 17:49:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHnOCj039811; Thu, 18 Nov 2010 17:49:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011181749.oAIHnOCj039811@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Nov 2010 17:49:24 +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: r215457 - stable/7/sys/dev/nfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 17:49:24 -0000 Author: yongari Date: Thu Nov 18 17:49:24 2010 New Revision: 215457 URL: http://svn.freebsd.org/changeset/base/215457 Log: MFC r215132,215194: r215132: Add basic WOL support for MCP ethernet controllers. It seems the controller does not perform automatic switching from 1000Mbps link to 10/100Mbps link when WOL is activated. Implement establishing 10/100Mps link with auto-negotiation in driver. Link status change handler was modified to remove taskqueue based approach since driver now needs synchronous handling for link establishment. Submitted by: Yamagi Burmeister (lists <> yamagi.org ) (initial version) Tested by: Yamagi Burmeister (lists <> yamagi.org ) r215194: Fix regression introduced in r215132. Caller always holds a driver lock before accessing mii, so locking is not needed here. Reported by: Rob Farmer (rfarmer <> predatorlabs dot net) Modified: stable/7/sys/dev/nfe/if_nfe.c stable/7/sys/dev/nfe/if_nfereg.h stable/7/sys/dev/nfe/if_nfevar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/7/sys/dev/nfe/if_nfe.c Thu Nov 18 17:44:02 2010 (r215456) +++ stable/7/sys/dev/nfe/if_nfe.c Thu Nov 18 17:49:24 2010 (r215457) @@ -81,7 +81,7 @@ static void nfe_power(struct nfe_softc * static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); static void nfe_miibus_statchg(device_t); -static void nfe_link_task(void *, int); +static void nfe_mac_config(struct nfe_softc *, struct mii_data *); static void nfe_set_intr(struct nfe_softc *); static __inline void nfe_enable_intr(struct nfe_softc *); static __inline void nfe_disable_intr(struct nfe_softc *); @@ -125,6 +125,8 @@ static int sysctl_hw_nfe_proc_limit(SYSC static void nfe_sysctl_node(struct nfe_softc *); static void nfe_stats_clear(struct nfe_softc *); static void nfe_stats_update(struct nfe_softc *); +static void nfe_set_linkspeed(struct nfe_softc *); +static void nfe_set_wol(struct nfe_softc *); #ifdef NFE_DEBUG static int nfedebug = 0; @@ -348,7 +350,6 @@ nfe_attach(device_t dev) mtx_init(&sc->nfe_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->nfe_stat_ch, &sc->nfe_mtx, 0); - TASK_INIT(&sc->nfe_link_task, 0, nfe_link_task, sc); pci_enable_busmaster(dev); @@ -587,6 +588,9 @@ nfe_attach(device_t dev) if ((ifp->if_capabilities & IFCAP_HWCSUM) != 0) ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; } + + if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) + ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; /* @@ -667,7 +671,6 @@ nfe_detach(device_t dev) NFE_UNLOCK(sc); callout_drain(&sc->nfe_stat_ch); taskqueue_drain(taskqueue_fast, &sc->nfe_tx_task); - taskqueue_drain(taskqueue_swi, &sc->nfe_link_task); ether_ifdetach(ifp); } @@ -753,6 +756,7 @@ nfe_suspend(device_t dev) NFE_LOCK(sc); nfe_stop(sc->nfe_ifp); + nfe_set_wol(sc); sc->nfe_suspended = 1; NFE_UNLOCK(sc); @@ -769,6 +773,7 @@ nfe_resume(device_t dev) sc = device_get_softc(dev); NFE_LOCK(sc); + nfe_power(sc); ifp = sc->nfe_ifp; if (ifp->if_flags & IFF_UP) nfe_init_locked(sc); @@ -807,37 +812,51 @@ static void nfe_miibus_statchg(device_t dev) { struct nfe_softc *sc; - - sc = device_get_softc(dev); - taskqueue_enqueue(taskqueue_swi, &sc->nfe_link_task); -} - - -static void -nfe_link_task(void *arg, int pending) -{ - struct nfe_softc *sc; struct mii_data *mii; struct ifnet *ifp; - uint32_t phy, seed, misc = NFE_MISC1_MAGIC, link = NFE_MEDIA_SET; - uint32_t gmask, rxctl, txctl, val; + uint32_t rxctl, txctl; - sc = (struct nfe_softc *)arg; - - NFE_LOCK(sc); + sc = device_get_softc(dev); mii = device_get_softc(sc->nfe_miibus); ifp = sc->nfe_ifp; - if (mii == NULL || ifp == NULL) { - NFE_UNLOCK(sc); - return; - } - if (mii->mii_media_status & IFM_ACTIVE) { - if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) + sc->nfe_link = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_1000_T: sc->nfe_link = 1; - } else - sc->nfe_link = 0; + break; + default: + break; + } + } + + nfe_mac_config(sc, mii); + txctl = NFE_READ(sc, NFE_TX_CTL); + rxctl = NFE_READ(sc, NFE_RX_CTL); + if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + txctl |= NFE_TX_START; + rxctl |= NFE_RX_START; + } else { + txctl &= ~NFE_TX_START; + rxctl &= ~NFE_RX_START; + } + NFE_WRITE(sc, NFE_TX_CTL, txctl); + NFE_WRITE(sc, NFE_RX_CTL, rxctl); +} + + +static void +nfe_mac_config(struct nfe_softc *sc, struct mii_data *mii) +{ + uint32_t link, misc, phy, seed; + uint32_t val; + + NFE_LOCK_ASSERT(sc); phy = NFE_READ(sc, NFE_PHY_IFACE); phy &= ~(NFE_PHY_HDX | NFE_PHY_100TX | NFE_PHY_1000T); @@ -845,7 +864,10 @@ nfe_link_task(void *arg, int pending) seed = NFE_READ(sc, NFE_RNDSEED); seed &= ~NFE_SEED_MASK; - if (((mii->mii_media_active & IFM_GMASK) & IFM_FDX) == 0) { + misc = NFE_MISC1_MAGIC; + link = NFE_MEDIA_SET; + + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) == 0) { phy |= NFE_PHY_HDX; /* half-duplex */ misc |= NFE_MISC1_HDX; } @@ -882,18 +904,18 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, misc); NFE_WRITE(sc, NFE_LINKSPEED, link); - gmask = mii->mii_media_active & IFM_GMASK; - if ((gmask & IFM_FDX) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { /* It seems all hardwares supports Rx pause frames. */ val = NFE_READ(sc, NFE_RXFILTER); - if ((gmask & IFM_FLAG0) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) != 0) val |= NFE_PFF_RX_PAUSE; else val &= ~NFE_PFF_RX_PAUSE; NFE_WRITE(sc, NFE_RXFILTER, val); if ((sc->nfe_flags & NFE_TX_FLOW_CTRL) != 0) { val = NFE_READ(sc, NFE_MISC1); - if ((gmask & IFM_FLAG1) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_FLAG1) != 0) { NFE_WRITE(sc, NFE_TX_PAUSE_FRAME, NFE_TX_PAUSE_FRAME_ENABLE); val |= NFE_MISC1_TX_PAUSE; @@ -917,20 +939,6 @@ nfe_link_task(void *arg, int pending) NFE_WRITE(sc, NFE_MISC1, val); } } - - txctl = NFE_READ(sc, NFE_TX_CTL); - rxctl = NFE_READ(sc, NFE_RX_CTL); - if (sc->nfe_link != 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - txctl |= NFE_TX_START; - rxctl |= NFE_RX_START; - } else { - txctl &= ~NFE_TX_START; - rxctl &= ~NFE_RX_START; - } - NFE_WRITE(sc, NFE_TX_CTL, txctl); - NFE_WRITE(sc, NFE_RX_CTL, rxctl); - - NFE_UNLOCK(sc); } @@ -1713,6 +1721,10 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, } } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && (mask & IFCAP_HWCSUM) != 0) { ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2737,7 +2749,8 @@ nfe_init_locked(void *xsc) NFE_WRITE(sc, NFE_STATUS, sc->mii_phyaddr << 24 | NFE_STATUS_MAGIC); NFE_WRITE(sc, NFE_SETUP_R4, NFE_R4_MAGIC); - NFE_WRITE(sc, NFE_WOL_CTL, NFE_WOL_MAGIC); + /* Disable WOL. */ + NFE_WRITE(sc, NFE_WOL_CTL, 0); sc->rxtxctl &= ~NFE_RXTX_BIT2; NFE_WRITE(sc, NFE_RXTX_CTL, sc->rxtxctl); @@ -2908,18 +2921,8 @@ nfe_tick(void *xsc) static int nfe_shutdown(device_t dev) { - struct nfe_softc *sc; - struct ifnet *ifp; - - sc = device_get_softc(dev); - NFE_LOCK(sc); - ifp = sc->nfe_ifp; - nfe_stop(ifp); - /* nfe_reset(sc); */ - NFE_UNLOCK(sc); - - return (0); + return (nfe_suspend(dev)); } @@ -3203,3 +3206,115 @@ nfe_stats_update(struct nfe_softc *sc) stats->rx_broadcast += NFE_READ(sc, NFE_TX_BROADCAST); } } + + +static void +nfe_set_linkspeed(struct nfe_softc *sc) +{ + struct mii_softc *miisc; + struct mii_data *mii; + int aneg, i, phyno; + + NFE_LOCK_ASSERT(sc); + + mii = device_get_softc(sc->nfe_miibus); + mii_pollstat(mii); + aneg = 0; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch IFM_SUBTYPE(mii->mii_media_active) { + case IFM_10_T: + case IFM_100_TX: + return; + case IFM_1000_T: + aneg++; + break; + default: + break; + } + } + phyno = 0; + if (mii->mii_instance) { + miisc = LIST_FIRST(&mii->mii_phys); + phyno = miisc->mii_phy; + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + mii_phy_reset(miisc); + } else + return; + nfe_miibus_writereg(sc->nfe_dev, phyno, MII_100T2CR, 0); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_ANAR, ANAR_TX_FD | ANAR_TX | ANAR_10_FD | ANAR_10 | ANAR_CSMA); + nfe_miibus_writereg(sc->nfe_dev, phyno, + MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG); + DELAY(1000); + if (aneg != 0) { + /* + * Poll link state until nfe(4) get a 10/100Mbps link. + */ + for (i = 0; i < MII_ANEGTICKS_GIGE; i++) { + mii_pollstat(mii); + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) + == (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + nfe_mac_config(sc, mii); + return; + default: + break; + } + } + NFE_UNLOCK(sc); + pause("nfelnk", hz); + NFE_LOCK(sc); + } + if (i == MII_ANEGTICKS_GIGE) + device_printf(sc->nfe_dev, + "establishing a link failed, WOL may not work!"); + } + /* + * No link, force MAC to have 100Mbps, full-duplex link. + * This is the last resort and may/may not work. + */ + mii->mii_media_status = IFM_AVALID | IFM_ACTIVE; + mii->mii_media_active = IFM_ETHER | IFM_100_TX | IFM_FDX; + nfe_mac_config(sc, mii); +} + + +static void +nfe_set_wol(struct nfe_softc *sc) +{ + struct ifnet *ifp; + uint32_t wolctl; + int pmc; + uint16_t pmstat; + + NFE_LOCK_ASSERT(sc); + + if (pci_find_extcap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) + return; + ifp = sc->nfe_ifp; + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + wolctl = NFE_WOL_MAGIC; + else + wolctl = 0; + NFE_WRITE(sc, NFE_WOL_CTL, wolctl); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) { + nfe_set_linkspeed(sc); + if ((sc->nfe_flags & NFE_PWR_MGMT) != 0) + NFE_WRITE(sc, NFE_PWR2_CTL, + NFE_READ(sc, NFE_PWR2_CTL) & ~NFE_PWR2_GATE_CLOCKS); + /* Enable RX. */ + NFE_WRITE(sc, NFE_RX_RING_ADDR_HI, 0); + NFE_WRITE(sc, NFE_RX_RING_ADDR_LO, 0); + NFE_WRITE(sc, NFE_RX_CTL, NFE_READ(sc, NFE_RX_CTL) | + NFE_RX_START); + } + /* Request PME if WOL is requested. */ + pmstat = pci_read_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} Modified: stable/7/sys/dev/nfe/if_nfereg.h ============================================================================== --- stable/7/sys/dev/nfe/if_nfereg.h Thu Nov 18 17:44:02 2010 (r215456) +++ stable/7/sys/dev/nfe/if_nfereg.h Thu Nov 18 17:49:24 2010 (r215457) @@ -190,6 +190,7 @@ #define NFE_PWR2_WAKEUP_MASK 0x0f11 #define NFE_PWR2_REVA3 (1 << 0) +#define NFE_PWR2_GATE_CLOCKS 0x0f00 #define NFE_MEDIA_SET 0x10000 #define NFE_MEDIA_1000T 0x00032 Modified: stable/7/sys/dev/nfe/if_nfevar.h ============================================================================== --- stable/7/sys/dev/nfe/if_nfevar.h Thu Nov 18 17:44:02 2010 (r215456) +++ stable/7/sys/dev/nfe/if_nfevar.h Thu Nov 18 17:49:24 2010 (r215457) @@ -140,7 +140,6 @@ struct nfe_softc { struct taskqueue *nfe_tq; struct task nfe_int_task; struct task nfe_tx_task; - struct task nfe_link_task; int nfe_link; int nfe_suspended; int nfe_framesize; From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 17:58:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A68871065672; Thu, 18 Nov 2010 17:58: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 97F428FC15; Thu, 18 Nov 2010 17:58: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 oAIHwxKc040175; Thu, 18 Nov 2010 17:58:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHwxkS040173; Thu, 18 Nov 2010 17:58:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011181758.oAIHwxkS040173@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Nov 2010 17:58: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: r215459 - 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: Thu, 18 Nov 2010 17:58:59 -0000 Author: marius Date: Thu Nov 18 17:58:59 2010 New Revision: 215459 URL: http://svn.freebsd.org/changeset/base/215459 Log: Fix a bug introduced with r215298; when atphy_reset() is called from atphy_attach() the current media has not been set, yet, leading to a NULL-dereference in atphy_setmedia(). Submitted by: jkim (initial version) Modified: head/sys/dev/mii/atphy.c Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Thu Nov 18 17:50:23 2010 (r215458) +++ head/sys/dev/mii/atphy.c Thu Nov 18 17:58:59 2010 (r215459) @@ -317,6 +317,7 @@ atphy_status(struct mii_softc *sc) static void atphy_reset(struct mii_softc *sc) { + struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur; struct atphy_softc *asc; uint32_t reg; int i; @@ -339,7 +340,7 @@ atphy_reset(struct mii_softc *sc) PHY_WRITE(sc, ATPHY_SCR, reg); /* Workaround F1 bug to reset phy. */ - atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media); + atphy_setmedia(sc, ife == NULL ? IFM_AUTO : ife->ifm_media); for (i = 0; i < 1000; i++) { DELAY(1); From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 18:03:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5800106564A; Thu, 18 Nov 2010 18:03: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 D63B88FC12; Thu, 18 Nov 2010 18:03: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 oAII3qMQ040362; Thu, 18 Nov 2010 18:03:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAII3qfk040360; Thu, 18 Nov 2010 18:03:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011181803.oAII3qfk040360@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Nov 2010 18:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215460 - stable/8/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: Thu, 18 Nov 2010 18:03:53 -0000 Author: marius Date: Thu Nov 18 18:03:52 2010 New Revision: 215460 URL: http://svn.freebsd.org/changeset/base/215460 Log: MFC: r215348 Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari Modified: stable/8/sys/dev/mii/mii.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/mii.c ============================================================================== --- stable/8/sys/dev/mii/mii.c Thu Nov 18 17:58:59 2010 (r215459) +++ stable/8/sys/dev/mii/mii.c Thu Nov 18 18:03:52 2010 (r215460) @@ -449,6 +449,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 18:05:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1F0F106566B; Thu, 18 Nov 2010 18:05: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 E29B48FC0A; Thu, 18 Nov 2010 18:05: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 oAII5xSD040444; Thu, 18 Nov 2010 18:05:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAII5xGI040442; Thu, 18 Nov 2010 18:05:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011181805.oAII5xGI040442@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Nov 2010 18:05:59 +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: r215461 - stable/7/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: Thu, 18 Nov 2010 18:06:00 -0000 Author: marius Date: Thu Nov 18 18:05:59 2010 New Revision: 215461 URL: http://svn.freebsd.org/changeset/base/215461 Log: MFC: r215348 Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari Modified: stable/7/sys/dev/mii/mii.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/mii.c ============================================================================== --- stable/7/sys/dev/mii/mii.c Thu Nov 18 18:03:52 2010 (r215460) +++ stable/7/sys/dev/mii/mii.c Thu Nov 18 18:05:59 2010 (r215461) @@ -447,6 +447,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 18:09:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29578106566C; Thu, 18 Nov 2010 18:09:26 +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 1AF108FC1C; Thu, 18 Nov 2010 18:09: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 oAII9Pb5040537; Thu, 18 Nov 2010 18:09:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAII9Ph1040535; Thu, 18 Nov 2010 18:09:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181809.oAII9Ph1040535@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 18:09: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: r215462 - 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: Thu, 18 Nov 2010 18:09:26 -0000 Author: mav Date: Thu Nov 18 18:09:25 2010 New Revision: 215462 URL: http://svn.freebsd.org/changeset/base/215462 Log: Add VIA VX900 to the list of supported chipsets. Modified: head/share/man/man4/ata.4 Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Thu Nov 18 18:05:59 2010 (r215461) +++ head/share/man/man4/ata.4 Thu Nov 18 18:09:25 2010 (r215462) @@ -183,7 +183,7 @@ SIS963, SIS964, SIS965. .It VIA: VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, -VT8237A, VT8237S, VT8251, CX700, VX800, VX855. +VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900. .El .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 18:22:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1F811065673; Thu, 18 Nov 2010 18:22:58 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A37358FC0A; Thu, 18 Nov 2010 18:22: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 oAIIMwck040855; Thu, 18 Nov 2010 18:22:58 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIIMwwk040852; Thu, 18 Nov 2010 18:22:58 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011181822.oAIIMwwk040852@svn.freebsd.org> From: Mark Murray Date: Thu, 18 Nov 2010 18:22: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: r215463 - head/contrib/ipfilter/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, 18 Nov 2010 18:22:58 -0000 Author: markm Date: Thu Nov 18 18:22:58 2010 New Revision: 215463 URL: http://svn.freebsd.org/changeset/base/215463 Log: Fix paths for example files. Modified: head/contrib/ipfilter/man/ipnat.8 head/contrib/ipfilter/man/mkfilters.1 Modified: head/contrib/ipfilter/man/ipnat.8 ============================================================================== --- head/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:09:25 2010 (r215462) +++ head/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:22:58 2010 (r215463) @@ -66,6 +66,6 @@ and active rules/table entries. .SH FILES /dev/ipnat .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipnat(5), ipf(8), ipfstat(8) Modified: head/contrib/ipfilter/man/mkfilters.1 ============================================================================== --- head/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:09:25 2010 (r215462) +++ head/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:22:58 2010 (r215463) @@ -6,7 +6,7 @@ mkfilters \- generate a minimal firewall .SH SYNOPSIS .B mkfilters .SH FILES -/usr/share/examples/ipf/mkfilters +/usr/share/examples/ipfilter/mkfilters .SH DESCRIPTION .PP \fBmkfilters\fP is a perl script that generates a minimal filter rule set for From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 19:06:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB16106566B; Thu, 18 Nov 2010 19:06:57 +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 1E10E8FC08; Thu, 18 Nov 2010 19:06: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 oAIJ6v3j042133; Thu, 18 Nov 2010 19:06:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIJ6uNW042131; Thu, 18 Nov 2010 19:06:56 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201011181906.oAIJ6uNW042131@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 18 Nov 2010 19:06: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: r215466 - stable/8/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 19:06:57 -0000 Author: jh Date: Thu Nov 18 19:06:56 2010 New Revision: 215466 URL: http://svn.freebsd.org/changeset/base/215466 Log: MFC r215235: Set FD_CLOEXEC for the output file only when the file has been specified with the -o option. Setting the flag for stderr (the default) could cause the traced process to redirect stderr to a random file. PR: bin/152151 Modified: stable/8/usr.bin/truss/main.c Directory Properties: stable/8/usr.bin/truss/ (props changed) Modified: stable/8/usr.bin/truss/main.c ============================================================================== --- stable/8/usr.bin/truss/main.c Thu Nov 18 18:49:04 2010 (r215465) +++ stable/8/usr.bin/truss/main.c Thu Nov 18 19:06:56 2010 (r215466) @@ -238,13 +238,14 @@ main(int ac, char **av) if (fname != NULL) { /* Use output file */ if ((trussinfo->outfile = fopen(fname, "w")) == NULL) errx(1, "cannot open %s", fname); + /* + * Set FD_CLOEXEC, so that the output file is not shared with + * the traced process. + */ + if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == + -1) + warn("fcntl()"); } - /* - * Set FD_CLOEXEC, so that the output file is not shared with - * the traced process. - */ - if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == -1) - warn("fcntl()"); /* * If truss starts the process itself, it will ignore some signals -- From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 19:08:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453111065672; Thu, 18 Nov 2010 19:08:57 +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 368838FC15; Thu, 18 Nov 2010 19:08: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 oAIJ8vJE042215; Thu, 18 Nov 2010 19:08:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIJ8v8g042213; Thu, 18 Nov 2010 19:08:57 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201011181908.oAIJ8v8g042213@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 18 Nov 2010 19:08:57 +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: r215467 - stable/7/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 19:08:57 -0000 Author: jh Date: Thu Nov 18 19:08:56 2010 New Revision: 215467 URL: http://svn.freebsd.org/changeset/base/215467 Log: MFC r215235: Set FD_CLOEXEC for the output file only when the file has been specified with the -o option. Setting the flag for stderr (the default) could cause the traced process to redirect stderr to a random file. PR: bin/152151 Modified: stable/7/usr.bin/truss/main.c Directory Properties: stable/7/usr.bin/truss/ (props changed) Modified: stable/7/usr.bin/truss/main.c ============================================================================== --- stable/7/usr.bin/truss/main.c Thu Nov 18 19:06:56 2010 (r215466) +++ stable/7/usr.bin/truss/main.c Thu Nov 18 19:08:56 2010 (r215467) @@ -230,13 +230,14 @@ main(int ac, char **av) if (fname != NULL) { /* Use output file */ if ((trussinfo->outfile = fopen(fname, "w")) == NULL) errx(1, "cannot open %s", fname); + /* + * Set FD_CLOEXEC, so that the output file is not shared with + * the traced process. + */ + if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == + -1) + warn("fcntl()"); } - /* - * Set FD_CLOEXEC, so that the output file is not shared with - * the traced process. - */ - if (fcntl(fileno(trussinfo->outfile), F_SETFD, FD_CLOEXEC) == -1) - warn("fcntl()"); /* * If truss starts the process itself, it will ignore some signals -- From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 19:28:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E359106566C; Thu, 18 Nov 2010 19:28: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 25F4F8FC0A; Thu, 18 Nov 2010 19:28: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 oAIJSkGd042656; Thu, 18 Nov 2010 19:28:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIJSkBE042653; Thu, 18 Nov 2010 19:28:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181928.oAIJSkBE042653@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 19:28: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: r215468 - 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, 18 Nov 2010 19:28:46 -0000 Author: mav Date: Thu Nov 18 19:28:45 2010 New Revision: 215468 URL: http://svn.freebsd.org/changeset/base/215468 Log: Make ATA_CAM wrapper to report SATA power management capabilities to CAM to make it configure device to initiate transitions if controller configured to accept them. This makes hint.ata.X.pm_level=1 mode working. Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Nov 18 19:08:56 2010 (r215467) +++ head/sys/dev/ata/ata-all.c Thu Nov 18 19:28:45 2010 (r215468) @@ -171,7 +171,12 @@ ata_attach(device_t dev) ch->user[i].bytecount = 8192; else ch->user[i].bytecount = MAXPHYS; + ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; + if (ch->pm_level > 0) + ch->user[i].caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->pm_level > 1) + ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; } #endif callout_init(&ch->poll_callout, 1); @@ -1627,6 +1632,8 @@ ataaction(struct cam_sim *sim, union ccb d->bytecount = min(8192, cts->xport_specific.sata.bytecount); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; } else { if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { @@ -1672,9 +1679,21 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + 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 &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= + CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Thu Nov 18 19:08:56 2010 (r215467) +++ head/sys/dev/ata/ata-all.h Thu Nov 18 19:28:45 2010 (r215468) @@ -535,6 +535,7 @@ struct ata_cam_device { int mode; u_int bytecount; u_int atapi; + u_int caps; }; #endif From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 20:46:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EA9106564A; Thu, 18 Nov 2010 20:46:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 388B68FC12; Thu, 18 Nov 2010 20:46: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 oAIKkTFx044374; Thu, 18 Nov 2010 20:46:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIKkTUe044371; Thu, 18 Nov 2010 20:46:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011182046.oAIKkTUe044371@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 18 Nov 2010 20:46: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: r215469 - 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: Thu, 18 Nov 2010 20:46:29 -0000 Author: kib Date: Thu Nov 18 20:46:28 2010 New Revision: 215469 URL: http://svn.freebsd.org/changeset/base/215469 Log: Only increment object generation count when inserting the page into object page list. The only use of object generation count now is a restart of the scan in vm_object_page_clean(), which makes sense to do on the page addition. Page removals do not affect the dirtiness of the object, as well as manipulations with the shadow chain. Suggested and reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_object.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Nov 18 19:28:45 2010 (r215468) +++ head/sys/vm/vm_object.c Thu Nov 18 20:46:28 2010 (r215469) @@ -600,7 +600,6 @@ doterm: VM_OBJECT_LOCK(temp); LIST_REMOVE(object, shadow_list); temp->shadow_count--; - temp->generation++; VM_OBJECT_UNLOCK(temp); object->backing_object = NULL; } @@ -1192,7 +1191,6 @@ vm_object_shadow( VM_OBJECT_LOCK(source); LIST_INSERT_HEAD(&source->shadow_head, result, shadow_list); source->shadow_count++; - source->generation++; #if VM_NRESERVLEVEL > 0 result->flags |= source->flags & OBJ_COLORED; result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & @@ -1260,7 +1258,6 @@ vm_object_split(vm_map_entry_t entry) LIST_INSERT_HEAD(&source->shadow_head, new_object, shadow_list); source->shadow_count++; - source->generation++; vm_object_reference_locked(source); /* for new_object */ vm_object_clear_flag(source, OBJ_ONEMAPPING); VM_OBJECT_UNLOCK(source); @@ -1651,7 +1648,6 @@ vm_object_collapse(vm_object_t object) */ LIST_REMOVE(object, shadow_list); backing_object->shadow_count--; - backing_object->generation++; if (backing_object->backing_object) { VM_OBJECT_LOCK(backing_object->backing_object); LIST_REMOVE(backing_object, shadow_list); @@ -1661,7 +1657,6 @@ vm_object_collapse(vm_object_t object) /* * The shadow_count has not changed. */ - backing_object->backing_object->generation++; VM_OBJECT_UNLOCK(backing_object->backing_object); } object->backing_object = backing_object->backing_object; @@ -1703,7 +1698,6 @@ vm_object_collapse(vm_object_t object) */ LIST_REMOVE(object, shadow_list); backing_object->shadow_count--; - backing_object->generation++; new_backing_object = backing_object->backing_object; if ((object->backing_object = new_backing_object) != NULL) { @@ -1714,7 +1708,6 @@ vm_object_collapse(vm_object_t object) shadow_list ); new_backing_object->shadow_count++; - new_backing_object->generation++; vm_object_reference_locked(new_backing_object); VM_OBJECT_UNLOCK(new_backing_object); object->backing_object_offset += Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Nov 18 19:28:45 2010 (r215468) +++ head/sys/vm/vm_page.c Thu Nov 18 20:46:28 2010 (r215469) @@ -846,7 +846,6 @@ vm_page_remove(vm_page_t m) * And show that the object has one fewer resident page. */ object->resident_page_count--; - object->generation++; /* * The vnode may now be recycled. */ @@ -1983,7 +1982,6 @@ vm_page_cache(vm_page_t m) object->root = root; TAILQ_REMOVE(&object->memq, m, listq); object->resident_page_count--; - object->generation++; /* * Restore the default memory attribute to the page. @@ -2395,7 +2393,6 @@ vm_page_set_invalid(vm_page_t m, int bas ("vm_page_set_invalid: page %p is mapped", m)); m->valid &= ~bits; m->dirty &= ~bits; - m->object->generation++; } /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 21:02:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 904EF106567A; Thu, 18 Nov 2010 21:02:40 +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 830668FC0A; Thu, 18 Nov 2010 21:02: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 oAIL2eat044889; Thu, 18 Nov 2010 21:02:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIL2enA044887; Thu, 18 Nov 2010 21:02:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011182102.oAIL2enA044887@svn.freebsd.org> From: Colin Percival Date: Thu, 18 Nov 2010 21:02: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: r215470 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 21:02:40 -0000 Author: cperciva Date: Thu Nov 18 21:02:40 2010 New Revision: 215470 URL: http://svn.freebsd.org/changeset/base/215470 Log: Don't KASSERT in pmap_release that xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME) for i = NPGPTD, since pmap->pm_pdpt[i] is only initialized for 0 <= i < NPGPTD. This fixes an inevitable panic with XEN && PAE && INVARIANTS when pmap_release is called (e.g., when /sbin/init is launched). Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Nov 18 20:46:28 2010 (r215469) +++ head/sys/i386/xen/pmap.c Thu Nov 18 21:02:40 2010 (r215470) @@ -1877,8 +1877,9 @@ pmap_release(pmap_t pmap) /* unpinning L1 and L2 treated the same */ xen_pgd_unpin(ma); #ifdef PAE - KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), - ("pmap_release: got wrong ptd page")); + if (i < NPGPTD) + KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), + ("pmap_release: got wrong ptd page")); #endif m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 21:09:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757161065673; Thu, 18 Nov 2010 21:09:02 +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 6809F8FC1B; Thu, 18 Nov 2010 21:09: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 oAIL92Of045041; Thu, 18 Nov 2010 21:09:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIL92lb045036; Thu, 18 Nov 2010 21:09:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011182109.oAIL92lb045036@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 18 Nov 2010 21:09: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: r215471 - 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: Thu, 18 Nov 2010 21:09:02 -0000 Author: kib Date: Thu Nov 18 21:09:02 2010 New Revision: 215471 URL: http://svn.freebsd.org/changeset/base/215471 Log: vm_pageout_flush() might cache the pages that finished write to the backing storage. Such pages might be then reused, racing with the assert in vm_object_page_collect_flush() that verified that dirty pages from the run (most likely, pages with VM_PAGER_AGAIN status) are write-protected still. In fact, the page indexes for the pages that were removed from the object page list should be ignored by vm_object_page_clean(). Return the length of successfully written run from vm_pageout_flush(), that is, the count of pages between requested page and first page after requested with status VM_PAGER_AGAIN. Supply the requested page index in the array to vm_pageout_flush(). Use the returned run length to forward the index of next page to clean in vm_object_page_clean(). Reported by: avg Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_object.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_contig.c Thu Nov 18 21:09:02 2010 (r215471) @@ -140,7 +140,7 @@ vm_contig_launder_page(vm_page_t m, vm_p object->type == OBJT_DEFAULT) { vm_page_unlock_queues(); m_tmp = m; - vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC); + vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, NULL); VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); return (0); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_object.c Thu Nov 18 21:09:02 2010 (r215471) @@ -884,30 +884,9 @@ vm_object_page_collect_flush(vm_object_t index = (maxb + i) + 1; ma[index] = maf[i]; } - runlen = maxb + maxf + 1; - vm_pageout_flush(ma, runlen, pagerflags); - for (i = 0; i < runlen; i++) { - if (ma[i]->dirty != 0) { - KASSERT((ma[i]->flags & PG_WRITEABLE) == 0, - ("vm_object_page_collect_flush: page %p is not write protected", - ma[i])); - } - } - for (i = 0; i < maxf; i++) { - if (ma[i + maxb + 1]->dirty != 0) { - /* - * maxf will end up being the actual number of pages - * we wrote out contiguously, non-inclusive of the - * first page. We do not count look-behind pages. - */ - if (maxf > i) { - maxf = i; - break; - } - } - } - return (maxf + 1); + vm_pageout_flush(ma, maxb + maxf + 1, pagerflags, maxb + 1, &runlen); + return (runlen); } /* Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_pageout.c Thu Nov 18 21:09:02 2010 (r215471) @@ -438,7 +438,7 @@ more: /* * we allow reads during pageouts... */ - return (vm_pageout_flush(&mc[page_base], pageout_count, 0)); + return (vm_pageout_flush(&mc[page_base], pageout_count, 0, 0, NULL)); } /* @@ -449,14 +449,17 @@ more: * reference count all in here rather then in the parent. If we want * the parent to do more sophisticated things we may have to change * the ordering. + * + * Returned runlen is the count of pages between mreq and first + * page after mreq with status VM_PAGER_AGAIN. */ int -vm_pageout_flush(vm_page_t *mc, int count, int flags) +vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen) { vm_object_t object = mc[0]->object; int pageout_status[count]; int numpagedout = 0; - int i; + int i, runlen; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); @@ -482,6 +485,7 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_pager_put_pages(object, mc, count, flags, pageout_status); + runlen = count - mreq; for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; @@ -513,6 +517,8 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_page_unlock(mt); break; case VM_PAGER_AGAIN: + if (i >= mreq && i - mreq < runlen) + runlen = i - mreq; break; } @@ -532,6 +538,8 @@ vm_pageout_flush(vm_page_t *mc, int coun } } } + if (prunlen != NULL) + *prunlen = runlen; return (numpagedout); } Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_pageout.h Thu Nov 18 21:09:02 2010 (r215471) @@ -102,7 +102,7 @@ extern void vm_waitpfault(void); #ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); -int vm_pageout_flush(vm_page_t *, int, int); +int vm_pageout_flush(vm_page_t *, int, int, int, int *); void vm_pageout_oom(int shortage); boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); void vm_contig_grow_cache(int, vm_paddr_t, vm_paddr_t); From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 21:29:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B6A106566C; Thu, 18 Nov 2010 21:29:43 +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 63B638FC15; Thu, 18 Nov 2010 21:29: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 oAILTh80045514; Thu, 18 Nov 2010 21:29:43 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAILThtO045512; Thu, 18 Nov 2010 21:29:43 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011182129.oAILThtO045512@svn.freebsd.org> From: Colin Percival Date: Thu, 18 Nov 2010 21:29: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: r215472 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 21:29:43 -0000 Author: cperciva Date: Thu Nov 18 21:29:43 2010 New Revision: 215472 URL: http://svn.freebsd.org/changeset/base/215472 Log: Make pmap_release match pmap_pinit by invoking pmap_qremove(pmap->pm_pdpt) to match pmap_pinit's pmap_qenter(pmap->pm_pdpt) call in the case of PAE. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Nov 18 21:09:02 2010 (r215471) +++ head/sys/i386/xen/pmap.c Thu Nov 18 21:29:43 2010 (r215472) @@ -1885,6 +1885,9 @@ pmap_release(pmap_t pmap) atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free(m); } +#ifdef PAE + pmap_qremove((vm_offset_t)pmap->pm_pdpt, 1); +#endif PMAP_LOCK_DESTROY(pmap); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 22:17:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B3E106566C; Thu, 18 Nov 2010 22:17:20 +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 A062A8FC0A; Thu, 18 Nov 2010 22: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 oAIMHKOs046695; Thu, 18 Nov 2010 22:17:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIMHKSa046692; Thu, 18 Nov 2010 22:17:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011182217.oAIMHKSa046692@svn.freebsd.org> From: John Baldwin Date: Thu, 18 Nov 2010 22:17: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: r215473 - in head/sys/dev: acpica atkbdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 22:17:20 -0000 Author: jhb Date: Thu Nov 18 22:17:20 2010 New Revision: 215473 URL: http://svn.freebsd.org/changeset/base/215473 Log: Various small typos and grammar nits in comments. Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Thu Nov 18 21:29:43 2010 (r215472) +++ head/sys/dev/acpica/acpi_hpet.c Thu Nov 18 22:17:20 2010 (r215473) @@ -501,7 +501,7 @@ hpet_attach(device_t dev) /* * Neither QEMU nor VirtualBox report supported IRQs correctly. * The only way to use HPET there is to specify IRQs manually - * and/or use legacy_route. Legacy_route mode work on both. + * and/or use legacy_route. Legacy_route mode works on both. */ if (vm_guest) sc->allowed_irqs = 0x00000000; @@ -591,7 +591,7 @@ hpet_attach(device_t dev) bus_write_4(sc->mem_res, HPET_ISR, 0xffffffff); sc->irq = -1; sc->intr_rid = -1; - /* If at least one timer needs legacy IRQ - setup it. */ + /* If at least one timer needs legacy IRQ - set it up. */ if (sc->useirq) { j = i = fls(cvectors) - 1; while (j > 0 && (cvectors & (1 << (j - 1))) != 0) Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu Nov 18 21:29:43 2010 (r215472) +++ head/sys/dev/atkbdc/psm.c Thu Nov 18 22:17:20 2010 (r215473) @@ -1214,12 +1214,12 @@ psmprobe(device_t dev) * be that this is only the case when the controller DOES have the aux * port but the port is not wired on the motherboard.) The keyboard * controllers without the port, such as the original AT, are - * supporsed to return with an error code or simply time out. In any + * supposed to return with an error code or simply time out. In any * case, we have to continue probing the port even when the controller * passes this test. * * XXX: some controllers erroneously return the error code 1, 2 or 3 - * when it has the perfectly functional aux port. We have to ignore + * when it has a perfectly functional aux port. We have to ignore * this error code. Even if the controller HAS error with the aux * port, it will be detected later... * XXX: another incompatible controller returns PSM_ACK (0xfa)... @@ -1250,7 +1250,7 @@ psmprobe(device_t dev) if (sc->config & PSM_CONFIG_NORESET) { /* * Don't try to reset the pointing device. It may possibly be - * left in the unknown state, though... + * left in an unknown state, though... */ } else { /* @@ -1277,7 +1277,7 @@ psmprobe(device_t dev) } /* - * both the aux port and the aux device is functioning, see if the + * both the aux port and the aux device are functioning, see if the * device can be enabled. NOTE: when enabled, the device will start * sending data; we shall immediately disable the device once we know * the device can be enabled. From owner-svn-src-all@FreeBSD.ORG Thu Nov 18 23:46:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F113310656A9; Thu, 18 Nov 2010 23:46:55 +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 E20048FC20; Thu, 18 Nov 2010 23:46: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 oAINktPH048840; Thu, 18 Nov 2010 23:46:55 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAINktwl048838; Thu, 18 Nov 2010 23:46:55 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011182346.oAINktwl048838@svn.freebsd.org> From: Ryan Stone Date: Thu, 18 Nov 2010 23:46: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: r215474 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 23:46:56 -0000 Author: rstone Date: Thu Nov 18 23:46:55 2010 New Revision: 215474 URL: http://svn.freebsd.org/changeset/base/215474 Log: When netstat was run with -i/-I and -w1 to produce running counters, the idrop field printed an absolute value rather than the delta from the last value Approved by: emaste (mentor) MFC after: 1 week Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Thu Nov 18 22:17:20 2010 (r215473) +++ head/usr.bin/netstat/if.c Thu Nov 18 23:46:55 2010 (r215474) @@ -627,6 +627,7 @@ loop: } ip->ift_ip = ifnet.if_ipackets; ip->ift_ie = ifnet.if_ierrors; + ip->ift_id = ifnet.if_iqdrops; ip->ift_ib = ifnet.if_ibytes; ip->ift_op = ifnet.if_opackets; ip->ift_oe = ifnet.if_oerrors; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:17:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A836106564A; Fri, 19 Nov 2010 01:17:50 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19F138FC12; Fri, 19 Nov 2010 01:17: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 oAJ1HnXO051023; Fri, 19 Nov 2010 01:17:49 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1HnOT051021; Fri, 19 Nov 2010 01:17:49 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190117.oAJ1HnOT051021@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:17:50 -0000 Author: thompsa Date: Fri Nov 19 01:17:49 2010 New Revision: 215475 URL: http://svn.freebsd.org/changeset/base/215475 Log: MFC r203774 Use more standard way for setting nonblocking flag for a filedescriptor. This makes libusb porting a bit easier. Modified: stable/8/lib/libusb/libusb10.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Thu Nov 18 23:46:55 2010 (r215474) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:17:49 2010 (r215475) @@ -25,17 +25,16 @@ * SUCH DAMAGE. */ +#include #include #include #include #include #include -#include #include #include -#include +#include #include -#include #define libusb_device_handle libusb20_device @@ -75,6 +74,7 @@ libusb_init(libusb_context **context) { struct libusb_context *ctx; char *debug; + int flag; int ret; ctx = malloc(sizeof(*ctx)); @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) return (LIBUSB_ERROR_OTHER); } /* set non-blocking mode on the control pipe to avoid deadlock */ - ret = 1; - ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); - ret = 1; - ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); + flag = 1; + ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:18:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52AB6106566C; Fri, 19 Nov 2010 01:18:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379058FC13; Fri, 19 Nov 2010 01:18: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 oAJ1IrN0051095; Fri, 19 Nov 2010 01:18:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Irv5051088; Fri, 19 Nov 2010 01:18:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190118.oAJ1Irv5051088@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:18: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: r215476 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:18:53 -0000 Author: thompsa Date: Fri Nov 19 01:18:52 2010 New Revision: 215476 URL: http://svn.freebsd.org/changeset/base/215476 Log: MFC r203775 Remove redundand headers and use more standard ones where necessary. Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c stable/8/lib/libusb/usb.h (contents, props changed) Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 01:18:52 2010 (r215476) @@ -29,12 +29,7 @@ #include #include -#include -#include -#include -#include -#include #ifdef __cplusplus Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:18:52 2010 (r215476) @@ -26,7 +26,6 @@ #include #include -#include #include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:18:52 2010 (r215476) @@ -32,7 +32,6 @@ #include #include #include -#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:18:52 2010 (r215476) @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "libusb20.h" Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:18:52 2010 (r215476) @@ -31,7 +31,6 @@ #include #include #include -#include #include #include Modified: stable/8/lib/libusb/usb.h ============================================================================== --- stable/8/lib/libusb/usb.h Fri Nov 19 01:17:49 2010 (r215475) +++ stable/8/lib/libusb/usb.h Fri Nov 19 01:18:52 2010 (r215476) @@ -27,8 +27,7 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define _LIBUSB20_COMPAT_01_H_ -#include -#include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:20:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 099A81065673; Fri, 19 Nov 2010 01:20:54 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9218FC0A; Fri, 19 Nov 2010 01:20: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 oAJ1KrLt051206; Fri, 19 Nov 2010 01:20:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1KraM051195; Fri, 19 Nov 2010 01:20:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190120.oAJ1KraM051195@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:20: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: r215477 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:20:54 -0000 Author: thompsa Date: Fri Nov 19 01:20:53 2010 New Revision: 215477 URL: http://svn.freebsd.org/changeset/base/215477 Log: MFC r203815 Resort includes to match style(9) a bit more. No functional change is expected after this commit. Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20.h stable/8/lib/libusb/libusb20_compat01.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c stable/8/lib/libusb/usb.h (contents, props changed) Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 01:20:53 2010 (r215477) @@ -30,8 +30,6 @@ #include #include - - #ifdef __cplusplus extern "C" { #endif Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:20:53 2010 (r215477) @@ -25,16 +25,17 @@ * SUCH DAMAGE. */ +#include +#include +#include + #include -#include -#include -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10_desc.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,12 +24,13 @@ * SUCH DAMAGE. */ -#include -#include #include #define libusb_device_handle libusb20_device +#include +#include + #include "libusb20.h" #include "libusb20_desc.h" #include "libusb20_int.h" Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb10_io.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,14 +24,15 @@ * SUCH DAMAGE. */ -#include -#include -#include +#include + +#include #include #include +#include +#include #include -#include -#include +#include #define libusb_device_handle libusb20_device Modified: stable/8/lib/libusb/libusb20.c ============================================================================== --- stable/8/lib/libusb/libusb20.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,12 +24,13 @@ * SUCH DAMAGE. */ +#include + +#include +#include #include #include #include -#include -#include -#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20.h ============================================================================== --- stable/8/lib/libusb/libusb20.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20.h Fri Nov 19 01:20:53 2010 (r215477) @@ -29,13 +29,13 @@ #ifndef _LIBUSB20_H_ #define _LIBUSB20_H_ -#include -#include -#include - +#include #include #include -#include + +#include +#include +#include #ifdef __cplusplus extern "C" { Modified: stable/8/lib/libusb/libusb20_compat01.c ============================================================================== --- stable/8/lib/libusb/libusb20_compat01.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_compat01.c Fri Nov 19 01:20:53 2010 (r215477) @@ -30,9 +30,9 @@ #include -#include -#include #include +#include +#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_desc.c Fri Nov 19 01:20:53 2010 (r215477) @@ -24,10 +24,11 @@ * SUCH DAMAGE. */ +#include + #include #include #include -#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/libusb20_ugen20.c Fri Nov 19 01:20:53 2010 (r215477) @@ -27,12 +27,12 @@ #include #include +#include +#include #include #include -#include #include -#include -#include +#include #include "libusb20.h" #include "libusb20_desc.h" Modified: stable/8/lib/libusb/usb.h ============================================================================== --- stable/8/lib/libusb/usb.h Fri Nov 19 01:18:52 2010 (r215476) +++ stable/8/lib/libusb/usb.h Fri Nov 19 01:20:53 2010 (r215477) @@ -27,9 +27,10 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define _LIBUSB20_COMPAT_01_H_ -#include -#include #include +#include + +#include /* USB interface class codes */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:23:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732EA1065698; Fri, 19 Nov 2010 01:23:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E618FC13; Fri, 19 Nov 2010 01:23: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 oAJ1NARX051333; Fri, 19 Nov 2010 01:23:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1NA1r051329; Fri, 19 Nov 2010 01:23:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190123.oAJ1NA1r051329@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215478 - in stable/8: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:23:10 -0000 Author: thompsa Date: Fri Nov 19 01:23:09 2010 New Revision: 215478 URL: http://svn.freebsd.org/changeset/base/215478 Log: MFC r210275 - Support for Globetrotter iCON 452. - Fixed the interface probe routine to only attach to USB interfaces the driver actually supports. This allows other drivers to attach to things like MicroSD slots etc. - Fixed network interface enumeration to be globally sequential instead of relying on the USB interface numbers. This make sure the first network interface always is at uhso0 and the second at usho1 and so on. - Added a radio kill switch; exposed through sysctl. - Updated the manual page to be verbose about the number of serial ports and include iCON 452 in the set of tested hardware. Submitted by: Fredrik Lindberg Modified: stable/8/share/man/man4/uhso.4 stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/usbdevs 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/uhso.4 ============================================================================== --- stable/8/share/man/man4/uhso.4 Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/share/man/man4/uhso.4 Fri Nov 19 01:23:09 2010 (r215478) @@ -43,8 +43,9 @@ based on their packet interface. Each device has a set of serial ports and a raw IP packet interface. The serial ports of the device are accessed through the .Xr ucom 4 -driver which makes them behave like a -.Xr tty 4 . +driver which makes them behave like +.Xr tty 4 +devices. The packet interface is exposed as a network interface. .Pp Establishing a connection on the packet interface is achieved by using the @@ -60,10 +61,19 @@ these calls. Each device usually have at least two or more serial ports, their individual purpose can be identified through .Xr sysctl 8 . +Ports identified as +.Dq Modem +features a normal modem interface that can be used with PPP. +Ports identified as +.Dq Diagnostic +uses a proprietary binary interface used for firmware upgrades, this port does not +have a AT command interface and can not be used to control the device. +Other ports features an AT command interface that can be used for normal device control. .Sh HARDWARE The .Nm -driver supports at least the following cards +driver should work with most devices from Option. +The following devices have been verified to work .Pp .Bl -bullet -compact .It @@ -71,6 +81,8 @@ Option GlobeSurfer iCON 7.2 (new firmwar .It Option iCON 225 .It +Option iCON 452 +.It Option iCON 505 .El .Pp @@ -88,7 +100,8 @@ This behavior can be disabled by setting to 0 using .Xr sysctl 8 .Sh EXAMPLES -Establishing a packet interface connection +Establishing a packet interface connection using the AT command interface available +at one of the serial ports .Bd -literal -offset indent AT+CGDCONT=1,,"apn.provider" AT_OWANCALL=1,1,1 Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:23:09 2010 (r215478) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Fredrik Lindberg + * Copyright (c) 2010 Fredrik Lindberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -81,6 +82,7 @@ struct uhso_softc { struct usb_device *sc_udev; struct mtx sc_mtx; uint32_t sc_type; /* Interface definition */ + int sc_radio; struct usb_xfer *sc_xfer[3]; uint8_t sc_iface_no; @@ -155,6 +157,7 @@ struct uhso_softc { * Note that these definitions are arbitrary and do not match the values * returned by the auto config descriptor. */ +#define UHSO_PORT_TYPE_UNKNOWN 0x00 #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 #define UHSO_PORT_TYPE_APP2 0x03 @@ -185,7 +188,7 @@ static char *uhso_port[] = { * descriptor values. */ static unsigned char uhso_port_map[] = { - 0, + UHSO_PORT_TYPE_UNKNOWN, UHSO_PORT_TYPE_DIAG, UHSO_PORT_TYPE_GPS, UHSO_PORT_TYPE_GPSCTL, @@ -243,6 +246,9 @@ static char *uhso_port_type_sysctl[] = { #define UHSO_STATIC_IFACE 0x01 #define UHSO_AUTO_IFACE 0x02 +/* ifnet device unit allocations */ +static struct unrhdr *uhso_ifnet_unit = NULL; + static const struct usb_device_id uhso_devs[] = { #define UHSO_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } /* Option GlobeSurfer iCON 7.2 */ @@ -272,6 +278,8 @@ static const struct usb_device_id uhso_d UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE), /* Option iCON 505 */ UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), + /* Option iCON 452 */ + UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), #undef UHSO_DEV }; @@ -432,9 +440,9 @@ static const struct usb_config uhso_bs_c }; static int uhso_probe_iface(struct uhso_softc *, int, - int (*probe)(struct uhso_softc *, int)); -static int uhso_probe_iface_auto(struct uhso_softc *, int); -static int uhso_probe_iface_static(struct uhso_softc *, int); + int (*probe)(struct usb_device *, int)); +static int uhso_probe_iface_auto(struct usb_device *, int); +static int uhso_probe_iface_static(struct usb_device *, int); static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, int type); static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, @@ -444,6 +452,8 @@ static int uhso_attach_ifnet(struct uhs static void uhso_test_autoinst(void *, struct usb_device *, struct usb_attach_arg *); static int uhso_driver_loaded(struct module *, int, void *); +static int uhso_radio_sysctl(SYSCTL_HANDLER_ARGS); +static int uhso_radio_ctrl(struct uhso_softc *, int); static void uhso_ucom_start_read(struct ucom_softc *); static void uhso_ucom_stop_read(struct ucom_softc *); @@ -497,6 +507,7 @@ static int uhso_probe(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); + int error; if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); @@ -505,7 +516,20 @@ uhso_probe(device_t self) if (uaa->device->ddesc.bDeviceClass != 0xff) return (ENXIO); - return (usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa)); + error = usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa); + if (error != 0) + return (error); + + /* + * Probe device to see if we are able to attach + * to this interface or not. + */ + if (USB_GET_DRIVER_INFO(uaa) == UHSO_AUTO_IFACE) { + if (uhso_probe_iface_auto(uaa->device, + uaa->info.bIfaceNum) == 0) + return (ENXIO); + } + return (error); } static int @@ -517,7 +541,7 @@ uhso_attach(device_t self) struct usb_interface_descriptor *id; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; - struct sysctl_oid *tree, *tty_node; + struct sysctl_oid *tree = NULL, *tty_node; struct ucom_softc *ucom; struct uhso_tty *ht; int i, error, port; @@ -531,6 +555,7 @@ uhso_attach(device_t self) sc->sc_ucom = NULL; sc->sc_ttys = 0; + sc->sc_radio = 1; cd = usbd_get_config_descriptor(uaa->device); id = usbd_get_interface_descriptor(uaa->iface); @@ -566,6 +591,8 @@ uhso_attach(device_t self) SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "type", CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); /* * The default interface description on most Option devices isn't @@ -655,6 +682,7 @@ uhso_detach(device_t self) if (sc->sc_ifp != NULL) { callout_drain(&sc->sc_c); + free_unr(uhso_ifnet_unit, sc->sc_ifp->if_dunit); mtx_lock(&sc->sc_mtx); uhso_if_stop(sc); bpfdetach(sc->sc_ifp); @@ -701,9 +729,12 @@ uhso_driver_loaded(struct module *mod, i /* register our autoinstall handler */ uhso_etag = EVENTHANDLER_REGISTER(usb_dev_configured, uhso_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + /* create our unit allocator for inet devs */ + uhso_ifnet_unit = new_unrhdr(0, INT_MAX, NULL); break; case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(usb_dev_configured, uhso_etag); + delete_unrhdr(uhso_ifnet_unit); break; default: return (EOPNOTSUPP); @@ -717,7 +748,7 @@ uhso_driver_loaded(struct module *mod, i * Returns a bit mask with the interface capabilities. */ static int -uhso_probe_iface_auto(struct uhso_softc *sc, int index) +uhso_probe_iface_auto(struct usb_device *udev, int index) { struct usb_device_request req; usb_error_t uerr; @@ -731,11 +762,11 @@ uhso_probe_iface_auto(struct uhso_softc USETW(req.wIndex, 0); USETW(req.wLength, 17); - uerr = usbd_do_request_flags(sc->sc_udev, NULL, &req, buf, + uerr = usbd_do_request_flags(udev, NULL, &req, buf, 0, &actlen, USB_MS_HZ); if (uerr != 0) { - device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", - usbd_errstr(uerr)); + printf("%s: usbd_do_request_flags failed, %s\n", + __func__, usbd_errstr(uerr)); return (0); } @@ -759,23 +790,35 @@ uhso_probe_iface_auto(struct uhso_softc case UHSO_PORT_TYPE_NETWORK: return (UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); - case UHSO_PORT_TYPE_VOICE: - /* Don't claim 'voice' ports */ - return (0); - default: + case UHSO_PORT_TYPE_DIAG: + case UHSO_PORT_TYPE_DIAG2: + case UHSO_PORT_TYPE_CTL: + case UHSO_PORT_TYPE_APP: + case UHSO_PORT_TYPE_APP2: + case UHSO_PORT_TYPE_MODEM: return (UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, port)); + case UHSO_PORT_TYPE_MSD: + return (0); + case UHSO_PORT_TYPE_UNKNOWN: + default: + return (0); } return (0); } +/* + * Returns the capabilities of interfaces for devices that don't + * support the automatic query. + * Returns a bit mask with the interface capabilities. + */ static int -uhso_probe_iface_static(struct uhso_softc *sc, int index) +uhso_probe_iface_static(struct usb_device *udev, int index) { struct usb_config_descriptor *cd; - cd = usbd_get_config_descriptor(sc->sc_udev); + cd = usbd_get_config_descriptor(udev); if (cd->bNumInterface <= 3) { /* Cards with 3 or less interfaces */ switch (index) { @@ -817,14 +860,14 @@ uhso_probe_iface_static(struct uhso_soft */ static int uhso_probe_iface(struct uhso_softc *sc, int index, - int (*probe)(struct uhso_softc *, int)) + int (*probe)(struct usb_device *, int)) { struct usb_interface *iface; int type, error; UHSO_DPRINTF(1, "Probing for interface %d, probe_func=%p\n", index, probe); - type = probe(sc, index); + type = probe(sc->sc_udev, index); UHSO_DPRINTF(1, "Probe result %x\n", type); if (type <= 0) return (ENXIO); @@ -888,6 +931,47 @@ uhso_probe_iface(struct uhso_softc *sc, return (0); } +static int +uhso_radio_ctrl(struct uhso_softc *sc, int onoff) +{ + struct usb_device_request req; + usb_error_t uerr; + + req.bmRequestType = UT_VENDOR; + req.bRequest = onoff ? 0x82 : 0x81; + USETW(req.wValue, 0); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + + uerr = usbd_do_request(sc->sc_udev, NULL, &req, NULL); + if (uerr != 0) { + device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", + usbd_errstr(uerr)); + return (-1); + } + return (onoff); +} + +static int +uhso_radio_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct uhso_softc *sc = arg1; + int error, radio; + + radio = sc->sc_radio; + error = sysctl_handle_int(oidp, &radio, 0, req); + if (error) + return (error); + if (radio != sc->sc_radio) { + radio = radio != 0 ? 1 : 0; + error = uhso_radio_ctrl(sc, radio); + if (error != -1) + sc->sc_radio = radio; + + } + return (0); +} + /* * Expands allocated memory to fit an additional TTY. * Two arrays are kept with matching indexes, one for ucom and one @@ -1435,13 +1519,14 @@ uhso_ucom_stop_write(struct ucom_softc * } } -static int uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, - int type) +static int +uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, int type) { struct ifnet *ifp; usb_error_t uerr; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; + unsigned int devunit; uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_if_xfer, @@ -1463,7 +1548,14 @@ static int uhso_attach_ifnet(struct uhso callout_reset(&sc->sc_c, 1, uhso_if_rxflush, sc); mtx_unlock(&sc->sc_mtx); - if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); + /* + * We create our own unit numbers for ifnet devices because the + * USB interface unit numbers can be at arbitrary positions yielding + * odd looking device names. + */ + devunit = alloc_unr(uhso_ifnet_unit); + + if_initname(ifp, device_get_name(sc->sc_dev), devunit); ifp->if_mtu = UHSO_MAX_MTU; ifp->if_ioctl = uhso_if_ioctl; ifp->if_init = uhso_if_init; Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:20:53 2010 (r215477) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:23:09 2010 (r215478) @@ -2398,6 +2398,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 +product OPTION_ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:24:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CB4106564A; Fri, 19 Nov 2010 01:24:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF98C8FC08; Fri, 19 Nov 2010 01:24: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 oAJ1Oafe051427; Fri, 19 Nov 2010 01:24:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Oaq2051426; Fri, 19 Nov 2010 01:24:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190124.oAJ1Oaq2051426@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:24: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: r215479 - in stable/8: share/man/man4 sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/contrib/dev/acpica sys/contrib/pf sys/dev/xen/xenpci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:24:37 -0000 Author: thompsa Date: Fri Nov 19 01:24:36 2010 New Revision: 215479 URL: http://svn.freebsd.org/changeset/base/215479 Log: MFC r212980 Add new device ids. Buffalo (Melco Inc.) LUA3-U2-AGT Logitec LAN-GTJ/U2A(usb/119981) PR: usb/119981 Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:27:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19C911065673; Fri, 19 Nov 2010 01:27:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095C08FC19; Fri, 19 Nov 2010 01:27: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 oAJ1RLi1051545; Fri, 19 Nov 2010 01:27:21 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1RLfW051543; Fri, 19 Nov 2010 01:27:21 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190127.oAJ1RLfW051543@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:27: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: r215480 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:27:22 -0000 Author: thompsa Date: Fri Nov 19 01:27:21 2010 New Revision: 215480 URL: http://svn.freebsd.org/changeset/base/215480 Log: MFC r206369 Remove debugging code that snuck in. Modified: stable/8/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:24:36 2010 (r215479) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:27:21 2010 (r215480) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); -#define URTW_DEBUG #ifdef URTW_DEBUG int urtw_debug = 0; SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:28:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CFB1106566C; Fri, 19 Nov 2010 01:28:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5644B8FC1E; Fri, 19 Nov 2010 01:28: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 oAJ1SMkO051618; Fri, 19 Nov 2010 01:28:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1SMIK051615; Fri, 19 Nov 2010 01:28:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190128.oAJ1SMIK051615@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215481 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:28:22 -0000 Author: thompsa Date: Fri Nov 19 01:28:22 2010 New Revision: 215481 URL: http://svn.freebsd.org/changeset/base/215481 Log: MFC r209144 - Because hostapd calls iv_key_set() before if_init(), make sure key_set callback function will be executed, and that the key won't be deleted during the init process. - txmic and rxmic are written into the chip the same place regardless of opmode. - Make the hardware generate 802.11 sequence numbers. Submitted by: Akinori Furukoshi Modified: stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:27:21 2010 (r215480) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:28:22 2010 (r215481) @@ -718,6 +718,10 @@ run_detach(device_t self) usbd_transfer_unsetup(sc->sc_xfer, RUN_N_XFER); RUN_LOCK(sc); + + sc->ratectl_run = RUN_RATECTL_OFF; + sc->cmdq_run = sc->cmdq_key_set = RUN_CMDQ_ABORT; + /* free TX list, if any */ for (i = 0; i != RUN_EP_QUEUES; i++) run_unsetup_tx_list(sc, &sc->sc_epq[i]); @@ -827,6 +831,9 @@ run_vap_create(struct ieee80211com *ic, if(sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; + if(opmode == IEEE80211_M_HOSTAP) + sc->cmdq_run = RUN_CMDQ_GO; + DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); @@ -1952,19 +1959,14 @@ run_key_set_cb(void *arg) struct ieee80211_node *ni; uint32_t attr; uint16_t base, associd; - uint8_t mode, wcid, txmic, rxmic, iv[8]; + uint8_t mode, wcid, iv[8]; RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if(vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); - txmic = 24; - rxmic = 16; - } else { + else ni = vap->iv_bss; - txmic = 16; - rxmic = 24; - } associd = (ni != NULL) ? ni->ni_associd : 0; /* map net80211 cipher to RT2860 security mode */ @@ -2003,9 +2005,9 @@ run_key_set_cb(void *arg) if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_TKIP) { if(run_write_region_1(sc, base, k->wk_key, 16)) return; - if(run_write_region_1(sc, base + 16, &k->wk_key[txmic], 8)) /* wk_txmic */ + if(run_write_region_1(sc, base + 16, &k->wk_key[16], 8)) /* wk_txmic */ return; - if(run_write_region_1(sc, base + 24, &k->wk_key[rxmic], 8)) /* wk_rxmic */ + if(run_write_region_1(sc, base + 24, &k->wk_key[24], 8)) /* wk_rxmic */ return; } else { /* roundup len to 16-bit: XXX fix write_region_1() instead */ @@ -2086,6 +2088,16 @@ run_key_set(struct ieee80211vap *vap, st IEEE80211_ADDR_COPY(sc->cmdq[i].mac, mac); ieee80211_runtask(ic, &sc->cmdq_task); + /* + * To make sure key will be set when hostapd + * calls iv_key_set() before if_init(). + */ + if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + RUN_LOCK(sc); + sc->cmdq_key_set = RUN_CMDQ_GO; + RUN_UNLOCK(sc); + } + return(1); } @@ -2896,6 +2908,9 @@ run_set_tx_desc(struct run_softc *sc, st txwi->txop |= RT2860_TX_TXOP_HT; else txwi->txop |= RT2860_TX_TXOP_BACKOFF; + + if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + txwi->xflags |= RT2860_TX_NSEQ; } /* This function must be called locked */ @@ -2975,7 +2990,7 @@ run_tx(struct run_softc *sc, struct mbuf if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && (!hasqos || (qos & IEEE80211_QOS_ACKPOLICY) != IEEE80211_QOS_ACKPOLICY_NOACK)) { - xflags = RT2860_TX_ACK; + xflags |= RT2860_TX_ACK; if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) dur = rt2860_rates[ctl_ridx].sp_ack_dur; else @@ -2997,8 +3012,8 @@ run_tx(struct run_softc *sc, struct mbuf txd->flags = qflags; txwi = (struct rt2860_txwi *)(txd + 1); txwi->xflags = xflags; - txwi->wcid = (type == IEEE80211_FC0_TYPE_DATA) ? - RUN_AID2WCID(ni->ni_associd) : 0xff; + txwi->wcid = IEEE80211_IS_MULTICAST(wh->i_addr1) ? + 0 : RUN_AID2WCID(ni->ni_associd); /* clear leftover garbage bits */ txwi->flags = 0; txwi->txop = 0; @@ -3921,6 +3936,7 @@ run_update_beacon_cb(void *arg) txwi.phy |= htole16(RT2860_PHY_OFDM); txwi.txop = RT2860_TX_TXOP_HT; txwi.flags = RT2860_TX_TS; + txwi.xflags = RT2860_TX_NSEQ; run_write_region_1(sc, RT2860_BCN_BASE(RUN_VAP(vap)->rvp_id), (uint8_t *)&txwi, sizeof txwi); @@ -4668,10 +4684,14 @@ run_init_locked(struct run_softc *sc) run_set_region_4(sc, RT2860_WCID_ENTRY(0), 0, 512); /* clear WCID attribute table */ run_set_region_4(sc, RT2860_WCID_ATTR(0), 0, 8 * 32); - /* clear shared key table */ - run_set_region_4(sc, RT2860_SKEY(0, 0), 0, 8 * 32); - /* clear shared key mode */ - run_set_region_4(sc, RT2860_SKEY_MODE_0_7, 0, 4); + + /* hostapd sets a key before init. So, don't clear it. */ + if(sc->cmdq_key_set != RUN_CMDQ_GO){ + /* clear shared key table */ + run_set_region_4(sc, RT2860_SKEY(0, 0), 0, 8 * 32); + /* clear shared key mode */ + run_set_region_4(sc, RT2860_SKEY_MODE_0_7, 0, 4); + } run_read(sc, RT2860_US_CYC_CNT, &tmp); tmp = (tmp & ~0xff) | 0x1e; @@ -4779,7 +4799,7 @@ run_stop(void *arg) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->ratectl_run = RUN_RATECTL_OFF; - sc->cmdq_run = RUN_CMDQ_ABORT; + sc->cmdq_run = sc->cmdq_key_set; RUN_UNLOCK(sc); Modified: stable/8/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/8/sys/dev/usb/wlan/if_runvar.h Fri Nov 19 01:27:21 2010 (r215480) +++ stable/8/sys/dev/usb/wlan/if_runvar.h Fri Nov 19 01:28:22 2010 (r215481) @@ -218,6 +218,7 @@ struct run_softc { uint32_t cmdq_store; uint8_t cmdq_exec; uint8_t cmdq_run; + uint8_t cmdq_key_set; #define RUN_CMDQ_ABORT 0 #define RUN_CMDQ_GO 1 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:29:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8C510656A3; Fri, 19 Nov 2010 01:29:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805A88FC1C; Fri, 19 Nov 2010 01:29: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 oAJ1TKBg051686; Fri, 19 Nov 2010 01:29:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1TKmM051681; Fri, 19 Nov 2010 01:29:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190129.oAJ1TKmM051681@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:29: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: r215482 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:29:20 -0000 Author: thompsa Date: Fri Nov 19 01:29:20 2010 New Revision: 215482 URL: http://svn.freebsd.org/changeset/base/215482 Log: MFC r209443 Add support for LOW speed BULK transfers. This mode is not recommended by the USB 2.0 standard, though some USB devices use it anyway. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3792,9 +3792,7 @@ ehci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &ehci_device_bulk_methods; - } + ep->methods = &ehci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -2614,9 +2614,7 @@ ohci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &ohci_device_bulk_methods; - } + ep->methods = &ohci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3068,9 +3068,7 @@ uhci_ep_init(struct usb_device *udev, st } break; case UE_BULK: - if (udev->speed != USB_SPEED_LOW) { - ep->methods = &uhci_device_bulk_methods; - } + ep->methods = &uhci_device_bulk_methods; break; default: /* do nothing */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:28:22 2010 (r215481) +++ stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:29:20 2010 (r215482) @@ -3057,7 +3057,7 @@ usbd_get_std_packet_size(struct usb_std_ }; static const uint16_t bulk_min[USB_SPEED_MAX] = { - [USB_SPEED_LOW] = 0, /* not supported */ + [USB_SPEED_LOW] = 8, [USB_SPEED_FULL] = 8, [USB_SPEED_HIGH] = 512, [USB_SPEED_VARIABLE] = 512, From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:30:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA8A1065695; Fri, 19 Nov 2010 01:30:24 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF028FC1A; Fri, 19 Nov 2010 01:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1UNGg051763; Fri, 19 Nov 2010 01:30:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1UN9L051761; Fri, 19 Nov 2010 01:30:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190130.oAJ1UN9L051761@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215483 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:30:24 -0000 Author: thompsa Date: Fri Nov 19 01:30:23 2010 New Revision: 215483 URL: http://svn.freebsd.org/changeset/base/215483 Log: MFC r209450 Reduce MIDI input buffer size to one USB packet, hence some USB devices don't properly short terminate their transfers. This fixes a problem where input appears several seconds late. Reported by: Alexander Yerenkow Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:29:20 2010 (r215482) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:23 2010 (r215483) @@ -507,8 +507,8 @@ static const struct usb_config .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = UMIDI_BULK_SIZE, - .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 4, /* bytes */ + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.proxy_buffer = 1,}, .callback = &umidi_bulk_read_callback, }, @@ -3366,10 +3366,6 @@ umidi_bulk_read_callback(struct usb_xfer DPRINTF("actlen=%d bytes\n", actlen); - if (actlen == 0) { - /* should not happen */ - goto tr_error; - } pos = 0; pc = usbd_xfer_get_frame(xfer, 0); @@ -3404,8 +3400,6 @@ umidi_bulk_read_callback(struct usb_xfer return; default: -tr_error: - DPRINTF("error=%s\n", usbd_errstr(error)); if (error != USB_ERR_CANCELLED) { From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:31:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0C810656A3; Fri, 19 Nov 2010 01:31:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3A348FC24; Fri, 19 Nov 2010 01:30: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 oAJ1Uxif051822; Fri, 19 Nov 2010 01:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Ux3a051819; Fri, 19 Nov 2010 01:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190130.oAJ1Ux3a051819@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:30: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: r215484 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:31:00 -0000 Author: thompsa Date: Fri Nov 19 01:30:59 2010 New Revision: 215484 URL: http://svn.freebsd.org/changeset/base/215484 Log: MFC r209452 - fix for USB audio devices which use the 7-byte endpoint descriptor instead of the 9-byte one. - remove sync-endpoint code, which is currently unused. Reported by: Antun Matanovi Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:23 2010 (r215483) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:59 2010 (r215484) @@ -792,7 +792,8 @@ uaudio_chan_dump_ep_desc(const usb_endpo ed, ed->bLength, ed->bDescriptorType, ed->bEndpointAddress, ed->bmAttributes, UGETW(ed->wMaxPacketSize), ed->bInterval, - ed->bRefresh, ed->bSynchAddress); + UEP_HAS_REFRESH(ed) ? ed->bRefresh : 0, + UEP_HAS_SYNCADDR(ed) ? ed->bSynchAddress : 0); } } @@ -817,8 +818,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint16_t alt_index = 0; uint16_t wFormat; uint8_t ep_dir; - uint8_t ep_type; - uint8_t ep_sync; uint8_t bChannels; uint8_t bBitResolution; uint8_t x; @@ -896,34 +895,12 @@ uaudio_chan_fill_info_sub(struct uaudio_ } } if ((desc->bDescriptorType == UDESC_ENDPOINT) && - (desc->bLength >= sizeof(*ed1))) { + (desc->bLength >= UEP_MINSIZE)) { if (ed1 == NULL) { ed1 = (void *)desc; if (UE_GET_XFERTYPE(ed1->bmAttributes) != UE_ISOCHRONOUS) { ed1 = NULL; } - } else { - if (ed2 == NULL) { - ed2 = (void *)desc; - if (UE_GET_XFERTYPE(ed2->bmAttributes) != UE_ISOCHRONOUS) { - ed2 = NULL; - continue; - } - if (ed2->bSynchAddress != 0) { - DPRINTFN(11, "invalid endpoint: bSynchAddress != 0\n"); - ed2 = NULL; - continue; - } - if (ed2->bEndpointAddress != ed1->bSynchAddress) { - DPRINTFN(11, "invalid endpoint addresses: " - "ep[0]->bSynchAddress=0x%x " - "ep[1]->bEndpointAddress=0x%x\n", - ed1->bSynchAddress, - ed2->bEndpointAddress); - ed2 = NULL; - continue; - } - } } } if ((desc->bDescriptorType == UDESC_CS_ENDPOINT) && @@ -936,35 +913,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ if (audio_if && asid && asf1d && ed1 && sed) { ep_dir = UE_GET_DIR(ed1->bEndpointAddress); - ep_type = UE_GET_ISO_TYPE(ed1->bmAttributes); - ep_sync = 0; - - if ((sc->sc_uq_au_inp_async) && - (ep_dir == UE_DIR_IN) && (ep_type == UE_ISO_ADAPT)) { - ep_type = UE_ISO_ASYNC; - } - if ((ep_dir == UE_DIR_IN) && (ep_type == UE_ISO_ADAPT)) { - ep_sync = 1; - } - if ((ep_dir != UE_DIR_IN) && (ep_type == UE_ISO_ASYNC)) { - ep_sync = 1; - } - /* Ignore sync endpoint information until further. */ -#if 0 - if (ep_sync && (!ed2)) { - continue; - } - /* - * we can't handle endpoints that need a sync pipe - * yet - */ - if (ep_sync) { - DPRINTF("skipped sync interface\n"); - audio_if = 0; - continue; - } -#endif + /* We ignore sync endpoint information until further. */ wFormat = UGETW(asid->wFormatTag); bChannels = UAUDIO_MAX_CHAN(asf1d->bNrChannels); Modified: stable/8/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudioreg.h Fri Nov 19 01:30:23 2010 (r215483) +++ stable/8/sys/dev/sound/usb/uaudioreg.h Fri Nov 19 01:30:59 2010 (r215484) @@ -47,6 +47,11 @@ #define UDESCSUB_AC_PROCESSING 7 #define UDESCSUB_AC_EXTENSION 8 +/* These macros check if the endpoint descriptor has additional fields */ +#define UEP_MINSIZE 7 +#define UEP_HAS_REFRESH(ep) ((ep)->bLength >= 8) +#define UEP_HAS_SYNCADDR(ep) ((ep)->bLength >= 9) + /* The first fields are identical to struct usb_endpoint_descriptor */ typedef struct { uByte bLength; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:32:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E249A106566C; Fri, 19 Nov 2010 01:32:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02318FC1D; Fri, 19 Nov 2010 01:32: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 oAJ1WNBD051899; Fri, 19 Nov 2010 01:32:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1WNP3051897; Fri, 19 Nov 2010 01:32:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190132.oAJ1WNP3051897@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:32: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: r215485 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:32:24 -0000 Author: thompsa Date: Fri Nov 19 01:32:23 2010 New Revision: 215485 URL: http://svn.freebsd.org/changeset/base/215485 Log: MFC r209917 Update for style(9). Submitted by: Akinori Furukoshi (author) Modified: stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:30:59 2010 (r215484) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:32:23 2010 (r215485) @@ -569,7 +569,7 @@ run_attach(device_t self) /* wait for the chip to settle */ for (ntries = 0; ntries < 100; ntries++) { - if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){ + if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0) { RUN_UNLOCK(sc); goto detach; } @@ -699,11 +699,11 @@ run_attach(device_t self) if (bootverbose) ieee80211_announce(ic); - return 0; + return (0); detach: run_detach(self); - return(ENXIO); + return (ENXIO); } static int @@ -754,9 +754,9 @@ run_vap_create(struct ieee80211com *ic, struct ieee80211vap *vap; int i; - if(sc->rvp_cnt >= RUN_VAP_MAX){ + if (sc->rvp_cnt >= RUN_VAP_MAX) { if_printf(ifp, "number of VAPs maxed out\n"); - return NULL; + return (NULL); } switch (opmode) { @@ -770,7 +770,7 @@ run_vap_create(struct ieee80211com *ic, case IEEE80211_M_MBSS: /* other than WDS vaps, only one at a time */ if (!TAILQ_EMPTY(&ic->ic_vaps)) - return NULL; + return (NULL); break; case IEEE80211_M_WDS: TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next){ @@ -780,20 +780,20 @@ run_vap_create(struct ieee80211com *ic, flags &= ~IEEE80211_CLONE_BSSID; break; } - if(vap == NULL){ + if (vap == NULL) { if_printf(ifp, "wds only supported in ap mode\n"); - return NULL; + return (NULL); } break; default: if_printf(ifp, "unknown opmode %d\n", opmode); - return NULL; + return (NULL); } rvp = (struct run_vap *) malloc(sizeof(struct run_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (rvp == NULL) - return NULL; + return (NULL); vap = &rvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); @@ -821,23 +821,23 @@ run_vap_create(struct ieee80211com *ic, ieee80211_vap_attach(vap, run_media_change, ieee80211_media_status); /* make sure id is always unique */ - for(i = 0; i < RUN_VAP_MAX; i++){ + for (i = 0; i < RUN_VAP_MAX; i++) { if((sc->rvp_bmap & 1 << i) == 0){ sc->rvp_bmap |= 1 << i; rvp->rvp_id = i; break; } } - if(sc->rvp_cnt++ == 0) + if (sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; - if(opmode == IEEE80211_M_HOSTAP) + if (opmode == IEEE80211_M_HOSTAP) sc->cmdq_run = RUN_CMDQ_GO; DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); - return vap; + return (vap); } static void @@ -849,7 +849,7 @@ run_vap_delete(struct ieee80211vap *vap) struct run_softc *sc; uint8_t rvp_id; - if(vap == NULL) + if (vap == NULL) return; ic = vap->iv_ic; @@ -892,15 +892,15 @@ run_cmdq_cb(void *arg, int pending) /* call cmdq[].func locked */ RUN_LOCK(sc); - for(i = sc->cmdq_exec; sc->cmdq[i].func && pending; - i = sc->cmdq_exec, pending--){ + for (i = sc->cmdq_exec; sc->cmdq[i].func && pending; + i = sc->cmdq_exec, pending--) { DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending); - if(sc->cmdq_run == RUN_CMDQ_GO){ + if (sc->cmdq_run == RUN_CMDQ_GO) { /* * If arg0 is NULL, callback func needs more * than one arg. So, pass ptr to cmdq struct. */ - if(sc->cmdq[i].arg0) + if (sc->cmdq[i].arg0) sc->cmdq[i].func(sc->cmdq[i].arg0); else sc->cmdq[i].func(&sc->cmdq[i]); @@ -943,7 +943,7 @@ run_unsetup_tx_list(struct run_softc *sc /* free up all node references and mbufs */ for (data = &pq->tx_data[0]; - data < &pq->tx_data[RUN_TX_RING_COUNT]; data++){ + data < &pq->tx_data[RUN_TX_RING_COUNT]; data++) { if (data->m != NULL) { m_freem(data->m); data->m = NULL; @@ -969,7 +969,7 @@ run_load_microcode(struct run_softc *sc) RUN_UNLOCK(sc); fw = firmware_get("runfw"); RUN_LOCK(sc); - if(fw == NULL){ + if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", "runfw"); return ENOENT; @@ -991,14 +991,14 @@ run_load_microcode(struct run_softc *sc) base = fw->data; if ((sc->mac_ver) != 0x2860 && (sc->mac_ver) != 0x2872 && - (sc->mac_ver) != 0x3070){ + (sc->mac_ver) != 0x3070) { base += 4096; } /* cheap sanity check */ temp = fw->data; bytes = *temp; - if(bytes != be64toh(0xffffff0210280210)) { + if (bytes != be64toh(0xffffff0210280210)) { device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; @@ -1059,7 +1059,7 @@ run_reset(struct run_softc *sc) USETW(req.wValue, 1); USETW(req.wIndex, 0); USETW(req.wLength, 0); - return usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); } static usb_error_t @@ -1094,7 +1094,7 @@ run_read(struct run_softc *sc, uint16_t *val = le32toh(tmp); else *val = 0xffffffff; - return error; + return (error); } static int @@ -1108,7 +1108,7 @@ run_read_region_1(struct run_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); } static int @@ -1122,7 +1122,7 @@ run_write_2(struct run_softc *sc, uint16 USETW(req.wIndex, reg); USETW(req.wLength, 0); - return run_do_request(sc, &req, NULL); + return (run_do_request(sc, &req, NULL)); } static int @@ -1132,7 +1132,7 @@ run_write(struct run_softc *sc, uint16_t if ((error = run_write_2(sc, reg, val & 0xffff)) == 0) error = run_write_2(sc, reg + 2, val >> 16); - return error; + return (error); } static int @@ -1148,7 +1148,7 @@ run_write_region_1(struct run_softc *sc, KASSERT((len & 1) == 0, ("run_write_region_1: Data too long.\n")); for (i = 0; i < len && error == 0; i += 2) error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8); - return error; + return (error); #else usb_device_request_t req; @@ -1157,7 +1157,7 @@ run_write_region_1(struct run_softc *sc, USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); #endif } @@ -1169,7 +1169,7 @@ run_set_region_4(struct run_softc *sc, u KASSERT((len & 3) == 0, ("run_set_region_4: Invalid data length.\n")); for (i = 0; i < len && error == 0; i += 4) error = run_write(sc, reg + i, val); - return error; + return (error); } /* Read 16-bit from eFUSE ROM (RT3070 only.) */ @@ -1181,7 +1181,7 @@ run_efuse_read_2(struct run_softc *sc, u int error, ntries; if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); addr *= 2; /*- @@ -1196,25 +1196,25 @@ run_efuse_read_2(struct run_softc *sc, u run_write(sc, RT3070_EFUSE_CTRL, tmp); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_EFSROM_KICK)) break; run_delay(sc, 2); } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { *val = 0xffff; /* address not found */ - return 0; + return (0); } /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) - return error; + return (error); *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - return 0; + return (0); } static int @@ -1236,7 +1236,7 @@ run_eeprom_read_2(struct run_softc *sc, *val = le16toh(tmp); else *val = 0xffff; - return error; + return (error); } static __inline int @@ -1254,17 +1254,17 @@ run_rt2870_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_RF_CSR_CFG0, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_RF_REG_CTRL)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); /* RF registers are 24-bit on the RT2860 */ tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | (val & 0x3fffff) << 2 | (reg & 3); - return run_write(sc, RT2860_RF_CSR_CFG0, tmp); + return (run_write(sc, RT2860_RF_CSR_CFG0, tmp)); } static int @@ -1275,28 +1275,28 @@ run_rt3070_rf_read(struct run_softc *sc, for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_KICK | reg << 8; if ((error = run_write(sc, RT3070_RF_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1307,15 +1307,15 @@ run_rt3070_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_WRITE | RT3070_RF_KICK | reg << 8 | val; - return run_write(sc, RT3070_RF_CSR_CFG, tmp); + return (run_write(sc, RT3070_RF_CSR_CFG, tmp)); } static int @@ -1326,28 +1326,28 @@ run_bbp_read(struct run_softc *sc, uint8 for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_READ | RT2860_BBP_CSR_KICK | reg << 8; if ((error = run_write(sc, RT2860_BBP_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1358,15 +1358,15 @@ run_bbp_write(struct run_softc *sc, uint for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_KICK | reg << 8 | val; - return run_write(sc, RT2860_BBP_CSR_CFG, tmp); + return (run_write(sc, RT2860_BBP_CSR_CFG, tmp)); } /* @@ -1390,7 +1390,7 @@ run_mcu_cmd(struct run_softc *sc, uint8_ tmp = RT2860_H2M_BUSY | RT2860_TOKEN_NO_INTR << 16 | arg; if ((error = run_write(sc, RT2860_H2M_MAILBOX, tmp)) == 0) error = run_write(sc, RT2860_HOST_CMD, cmd); - return error; + return (error); } /* @@ -1411,7 +1411,7 @@ b4inc(uint32_t b32, int8_t delta) b4 = 0xf; b32 = b32 >> 4 | b4 << 28; } - return b32; + return (b32); } static const char * @@ -1428,7 +1428,7 @@ run_get_rf(int rev) case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; } - return "unknown"; + return ("unknown"); } int @@ -1679,7 +1679,7 @@ run_read_eeprom(struct run_softc *sc) sc->rssi_5ghz[ant] = 0; } } - return 0; + return (0); } struct ieee80211_node * @@ -1702,9 +1702,9 @@ run_media_change(struct ifnet *ifp) RUN_LOCK(sc); error = ieee80211_media_change(ifp); - if (error != ENETRESET){ + if (error != ENETRESET) { RUN_UNLOCK(sc); - return error; + return (error); } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; @@ -1727,7 +1727,7 @@ run_media_change(struct ifnet *ifp) RUN_UNLOCK(sc); - return 0; + return (0); } static int @@ -1773,7 +1773,7 @@ run_newstate(struct ieee80211vap *vap, e sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if(--sc->running == 0){ + if (--sc->running == 0) { run_read(sc, RT2860_BCN_TIME_CFG, &tmp); run_write(sc, RT2860_BCN_TIME_CFG, tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | @@ -1784,13 +1784,13 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: ni = vap->iv_bss; - if(!(sc->runbmap & bid)){ + if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; sc->runbmap |= bid; } - switch(vap->iv_opmode){ + switch (vap->iv_opmode) { case IEEE80211_M_HOSTAP: case IEEE80211_M_MBSS: sc->ap_running |= bid; @@ -1799,13 +1799,13 @@ run_newstate(struct ieee80211vap *vap, e break; case IEEE80211_M_IBSS: sc->adhoc_running |= bid; - if(!sc->ap_running) + if (!sc->ap_running) ic->ic_opmode = vap->iv_opmode; run_update_beacon_cb(vap); break; case IEEE80211_M_STA: sc->sta_running |= bid; - if(!sc->ap_running && !sc->adhoc_running) + if (!sc->ap_running && !sc->adhoc_running) ic->ic_opmode = vap->iv_opmode; /* read statistic counters (clear on read) */ @@ -1845,7 +1845,7 @@ run_newstate(struct ieee80211vap *vap, e } /* restart amrr for running VAPs */ - if((sc->ratectl_run = ratectl) && restart_ratectl) + if ((sc->ratectl_run = ratectl) && restart_ratectl) usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc); RUN_UNLOCK(sc); @@ -1872,7 +1872,7 @@ run_wme_update_cb(void *arg) wmesp->wme_params[aci].wmep_logcwmin << 12 | wmesp->wme_params[aci].wmep_aifsn << 8 | wmesp->wme_params[aci].wmep_txopLimit); - if(error) goto err; + if (error) goto err; } /* update SCH/DMA registers too */ @@ -1881,29 +1881,29 @@ run_wme_update_cb(void *arg) wmesp->wme_params[WME_AC_VI].wmep_aifsn << 8 | wmesp->wme_params[WME_AC_BK].wmep_aifsn << 4 | wmesp->wme_params[WME_AC_BE].wmep_aifsn); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMIN_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmin << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmin << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmin << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmin); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMAX_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmax << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmax << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmax << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmax); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP0_CFG, wmesp->wme_params[WME_AC_BK].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_BE].wmep_txopLimit); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP1_CFG, wmesp->wme_params[WME_AC_VO].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_VI].wmep_txopLimit); err: - if(error) + if (error) DPRINTF("WME update failed\n"); return; @@ -1915,13 +1915,13 @@ run_wme_update(struct ieee80211com *ic) struct run_softc *sc = ic->ic_ifp->if_softc; /* sometime called wothout lock */ - if(mtx_owned(&ic->ic_comlock.mtx)){ + if (mtx_owned(&ic->ic_comlock.mtx)) { uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store); DPRINTF("cmdq_store=%d\n", i); sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return (0); + return 0; } RUN_LOCK(sc); @@ -1963,7 +1963,7 @@ run_key_set_cb(void *arg) RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP) + if (vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); else ni = vap->iv_bss; @@ -2018,7 +2018,7 @@ run_key_set_cb(void *arg) if (!(k->wk_flags & IEEE80211_KEY_GROUP) || (k->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV))) { /* set initial packet number in IV+EIV */ - if (k->wk_cipher == IEEE80211_CIPHER_WEP){ + if (k->wk_cipher == IEEE80211_CIPHER_WEP) { memset(iv, 0, sizeof iv); iv[3] = vap->iv_def_txkey << 6; } else { @@ -2037,24 +2037,24 @@ run_key_set_cb(void *arg) iv[6] = k->wk_keytsc >> 32; iv[7] = k->wk_keytsc >> 40; } - if(run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) + if (run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) return; } if (k->wk_flags & IEEE80211_KEY_GROUP) { /* install group key */ - if(run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) + if (run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) return; attr &= ~(0xf << (k->wk_keyix * 4)); attr |= mode << (k->wk_keyix * 4); - if(run_write(sc, RT2860_SKEY_MODE_0_7, attr)) + if (run_write(sc, RT2860_SKEY_MODE_0_7, attr)) return; } else { /* install pairwise key */ - if(run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) + if (run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) return; attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; - if(run_write(sc, RT2860_WCID_ATTR(wcid), attr)) + if (run_write(sc, RT2860_WCID_ATTR(wcid), attr)) return; } @@ -2092,13 +2092,13 @@ run_key_set(struct ieee80211vap *vap, st * To make sure key will be set when hostapd * calls iv_key_set() before if_init(). */ - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if (vap->iv_opmode == IEEE80211_M_HOSTAP) { RUN_LOCK(sc); sc->cmdq_key_set = RUN_CMDQ_GO; RUN_UNLOCK(sc); } - return(1); + return (1); } /* @@ -2187,10 +2187,10 @@ run_ratectl_cb(void *arg, int pending) struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if(vap == NULL) + if (vap == NULL) return; - if(sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) + if (sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) run_iter_func(sc, vap->iv_bss); else { /* @@ -2228,7 +2228,7 @@ run_drain_fifo(void *arg) /* drain Tx status FIFO (maxsize = 16) */ run_read(sc, RT2860_TX_STAT_FIFO, &stat); DPRINTFN(4, "tx stat 0x%08x\n", stat); - if(!(stat & RT2860_TXQ_VLD)) + if (!(stat & RT2860_TXQ_VLD)) break; wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff; @@ -2239,7 +2239,7 @@ run_drain_fifo(void *arg) continue; ni = sc->sc_ni[wcid]; - if(ni->ni_rctls == NULL) + if (ni->ni_rctls == NULL) continue; /* update per-STA AMRR stats */ @@ -2282,8 +2282,8 @@ run_iter_func(void *arg, struct ieee8021 int txcnt = 0, success = 0, retrycnt = 0; int error; - if(sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_STA)){ + if (sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_STA)) { RUN_LOCK(sc); /* read statistic counters (clear on read) and update AMRR state */ @@ -2348,13 +2348,13 @@ run_newassoc(struct ieee80211_node *ni, uint8_t wcid = RUN_AID2WCID(ni->ni_associd); int i, j; - if(wcid > RT2870_WCID_MAX){ + if (wcid > RT2870_WCID_MAX) { device_printf(sc->sc_dev, "wcid=%d out of range\n", wcid); return; } /* only interested in true associations */ - if (isnew && ni->ni_associd != 0){ + if (isnew && ni->ni_associd != 0) { /* * This function could is called though timeout function. @@ -2423,7 +2423,7 @@ run_maxrssi_chain(struct run_softc *sc, if (rxwi->rssi[2] > rxwi->rssi[rxchain]) rxchain = 2; } - return rxchain; + return (rxchain); } static void @@ -2464,12 +2464,12 @@ run_rx_frame(struct run_softc *sc, struc wh = mtod(m, struct ieee80211_frame *); - if (wh->i_fc[1] & IEEE80211_FC1_WEP){ + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { wh->i_fc[1] &= ~IEEE80211_FC1_WEP; m->m_flags |= M_WEP; } - if (flags & RT2860_RX_L2PAD){ + if (flags & RT2860_RX_L2PAD) { DPRINTFN(8, "received RT2860_RX_L2PAD frame\n"); len += 2; } @@ -2479,7 +2479,7 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(flags & RT2860_RX_MICERR)) { /* report MIC failures to net80211 for TKIP */ - if(ni != NULL) + if (ni != NULL) ieee80211_notify_michael_failure(ni->ni_vap, wh, rxwi->keyidx); m_freem(m); ifp->if_ierrors++; @@ -2501,7 +2501,7 @@ run_rx_frame(struct run_softc *sc, struc (void)ieee80211_input_all(ic, m, rssi, nf); } - if(__predict_false(ieee80211_radiotap_active(ic))){ + if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -2602,7 +2602,7 @@ tr_setup: goto tr_setup; } - if(sc->rx_m != NULL){ + if (sc->rx_m != NULL) { m_freem(sc->rx_m); sc->rx_m = NULL; } @@ -2633,7 +2633,7 @@ tr_setup: } /* If it is the last one or a single frame, we won't copy. */ - if((xferlen -= dmalen + 8) <= 8){ + if ((xferlen -= dmalen + 8) <= 8) { /* trim 32-bit DMA-len header */ m->m_data += 4; m->m_pkthdr.len = m->m_len -= 4; @@ -2673,7 +2673,7 @@ run_tx_free(struct run_endpoint_queue *p m_freem(data->m); data->m = NULL; - if(data->ni == NULL) { + if (data->ni == NULL) { DPRINTF("no node\n"); } else { ieee80211_free_node(data->ni); @@ -2703,7 +2703,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - switch (USB_GET_STATE(xfer)){ + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete: %d " "bytes @ index %d\n", actlen, index); @@ -2721,7 +2721,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x case USB_ST_SETUP: tr_setup: data = STAILQ_FIRST(&pq->tx_qh); - if(data == NULL) + if (data == NULL) break; STAILQ_REMOVE_HEAD(&pq->tx_qh, next); @@ -2791,7 +2791,7 @@ tr_setup: run_tx_free(pq, data, error); usbd_xfer_set_priv(xfer, NULL); } - if(vap == NULL) + if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); if (error != USB_ERR_CANCELLED) { @@ -2909,7 +2909,7 @@ run_set_tx_desc(struct run_softc *sc, st else txwi->txop |= RT2860_TX_TXOP_BACKOFF; - if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + if (vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) txwi->xflags |= RT2860_TX_NSEQ; } @@ -3037,8 +3037,8 @@ run_tx(struct run_softc *sc, struct mbuf * * FIFO stats doesn't count Tx with WCID 0xff, so we do this in run_tx(). */ - if(sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || - vap->iv_opmode == IEEE80211_M_MBSS){ + if (sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_MBSS) { uint16_t pid = (rt2860_rates[ridx].mcs + 1) & 0xf; txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); @@ -3054,7 +3054,7 @@ run_tx(struct run_softc *sc, struct mbuf * run_ratectl_cb() via callout. * Call it early. Otherwise overflow. */ - if(sc->fifo_cnt++ == 10){ + if (sc->fifo_cnt++ == 10) { /* * With multiple vaps or if_bridge, if_start() is called * with a non-sleepable lock, tcpinp. So, need to defer. @@ -3275,7 +3275,7 @@ run_tx_param(struct run_softc *sc, struc rate); if (error) { /* let caller free mbuf */ - return (error); + return error; } opflags |= /*XXX RT2573_TX_LONG_RETRY |*/ RT2860_TX_TXOP_SIFS; } @@ -3314,7 +3314,7 @@ run_tx_param(struct run_softc *sc, struc usbd_transfer_start(sc->sc_xfer[0]); - return (0); + return (0); } static int @@ -3335,14 +3335,14 @@ run_raw_xmit(struct ieee80211_node *ni, if (params == NULL) { /* tx mgt packet */ - if ((error = run_tx_mgt(sc, m, ni)) != 0){ + if ((error = run_tx_mgt(sc, m, ni)) != 0) { ifp->if_oerrors++; DPRINTF("mgt tx failed\n"); goto done; } } else { /* tx raw packet with param */ - if ((error = run_tx_param(sc, m, ni, params)) != 0){ + if ((error = run_tx_param(sc, m, ni, params)) != 0) { ifp->if_oerrors++; DPRINTF("tx with param failed\n"); goto done; @@ -3354,7 +3354,7 @@ run_raw_xmit(struct ieee80211_node *ni, done: RUN_UNLOCK(sc); - if(error != 0){ + if (error != 0) { if(m != NULL) m_freem(m); ieee80211_free_node(ni); @@ -3413,13 +3413,13 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } else run_update_promisc_locked(ifp); } else { - if(ifp->if_drv_flags & IFF_DRV_RUNNING && - (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)){ + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)) { run_stop(sc); } } RUN_UNLOCK(sc); - if(startall) + if (startall) ieee80211_start_all(ic); break; case SIOCGIFMEDIA: @@ -3814,7 +3814,7 @@ run_set_chan(struct run_softc *sc, struc chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) - return EINVAL; + return (EINVAL); if (sc->mac_ver == 0x3572) run_rt3572_set_chan(sc, chan); @@ -3838,7 +3838,7 @@ run_set_chan(struct run_softc *sc, struc run_delay(sc, 10); - return 0; + return (0); } static void @@ -3919,7 +3919,7 @@ run_update_beacon_cb(void *arg) struct mbuf *m; uint8_t ridx; - if(vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; if ((m = ieee80211_beacon_alloc(vap->iv_bss, &RUN_VAP(vap)->bo)) == NULL) @@ -3982,7 +3982,7 @@ run_usb_timeout_cb(void *arg) if(vap->iv_state == IEEE80211_S_RUN && vap->iv_opmode != IEEE80211_M_STA) run_reset_livelock(sc); - else if(vap->iv_state == IEEE80211_S_SCAN){ + else if (vap->iv_state == IEEE80211_S_SCAN) { DPRINTF("timeout caused by scan\n"); /* cancel bgscan */ ieee80211_cancel_scan(vap); @@ -4004,7 +4004,7 @@ run_reset_livelock(struct run_softc *sc) */ run_read(sc, RT2860_DEBUG, &tmp); DPRINTFN(3, "debug reg %08x\n", tmp); - if((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))){ + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { DPRINTF("CTS-to-self livelock detected\n"); run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); run_delay(sc, 1); @@ -4203,7 +4203,7 @@ run_rssi2dbm(struct run_softc *sc, uint8 } else delta = sc->rssi_2ghz[rxchain] - sc->lna[0]; - return -12 - delta - rssi; + return (-12 - delta - rssi); } static int @@ -4220,7 +4220,7 @@ run_bbp_init(struct run_softc *sc) break; } if (ntries == 20) - return ETIMEDOUT; + return (ETIMEDOUT); /* initialize BBP registers to default values */ for (i = 0; i < nitems(rt2860_def_bbp); i++) { @@ -4240,7 +4240,7 @@ run_bbp_init(struct run_softc *sc) run_bbp_write(sc, 69, 0x16); run_bbp_write(sc, 73, 0x12); } - return 0; + return (0); } static int @@ -4292,7 +4292,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_read(sc, RT3070_GPIO_SWITCH, &tmp); run_write(sc, RT3070_GPIO_SWITCH, tmp & ~0x20); - } else if(sc->mac_ver == 0x3572){ + } else if (sc->mac_ver == 0x3572) { run_rt3070_rf_read(sc, 6, &rf); run_rt3070_rf_write(sc, 6, rf | 0x40); @@ -4301,7 +4301,7 @@ run_rt3070_rf_init(struct run_softc *sc) tmp = (tmp & ~0x1f000000) | 0x0d000000; run_write(sc, RT3070_LDO_CFG0, tmp); - if (sc->mac_rev < 0x0211 || !sc->patch_dac){ + if (sc->mac_rev < 0x0211 || !sc->patch_dac) { run_delay(sc, 1); /* wait for 1msec */ /* decrease voltage back to 1.2V */ tmp = (tmp & ~0x1f000000) | 0x01000000; @@ -4379,7 +4379,7 @@ run_rt3070_rf_init(struct run_softc *sc) rf |= 0x03; run_rt3070_rf_write(sc, 27, rf); } - return 0; + return (0); } static int @@ -4444,7 +4444,7 @@ run_rt3070_filter_calib(struct run_softc run_rt3070_rf_read(sc, 22, &rf22); run_rt3070_rf_write(sc, 22, rf22 & ~0x01); - return 0; + return (0); } static void @@ -4570,7 +4570,7 @@ run_txrx_enable(struct run_softc *sc) run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:34:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30196106566C; Fri, 19 Nov 2010 01:34:19 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3C08FC0C; Fri, 19 Nov 2010 01:34: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 oAJ1YJCh051994; Fri, 19 Nov 2010 01:34:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1YJLR051992; Fri, 19 Nov 2010 01:34:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190134.oAJ1YJLR051992@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215486 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:34:19 -0000 Author: thompsa Date: Fri Nov 19 01:34:18 2010 New Revision: 215486 URL: http://svn.freebsd.org/changeset/base/215486 Log: MFC r209918 Use more compact deviceid table. Modified: stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:32:23 2010 (r215485) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:34:18 2010 (r215486) @@ -97,199 +97,201 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, #define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const struct usb_device_id run_devs[] = { - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2770) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2870) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3070) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3071) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3072) }, - { USB_VP(USB_VENDOR_ABOCOM2, USB_PRODUCT_ABOCOM2_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2770) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_5) }, - { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2770) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2870) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3071) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3072) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3572) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIT2, USB_PRODUCT_AMIT2_RT2870) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_1) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_2) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_USBN13) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT3070_1) }, - { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8053V3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8055) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS2, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS3, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_4) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_5) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_2) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_3) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT3070) }, - { USB_VP(USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA130) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_5) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072_1) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_2) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_3) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB31N) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB32L) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_RT2870_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_2) }, - { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWNU300) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_HWUN2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_1) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT3070) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_1) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_RT3070) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600NV2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_1) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_2) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT2770) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT3070) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_4) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_8) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_9) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_10) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_11) }, - { USB_VP(USB_VENDOR_OVISLINK, USB_PRODUCT_OVISLINK_RT3072) }, - { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_3) }, - { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070) }, - { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2870) }, - { USB_VP(USB_VENDOR_QUANTA, USB_PRODUCT_QUANTA_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2770) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2870) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3370) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT8070) }, - { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3070) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3071) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2770) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3071) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_6) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW153) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, - { USB_VP(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_RT3070) }, - { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3070) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_2) }, +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } + RUN_DEV(ABOCOM, RT2770), + RUN_DEV(ABOCOM, RT2870), + RUN_DEV(ABOCOM, RT3070), + RUN_DEV(ABOCOM, RT3071), + RUN_DEV(ABOCOM, RT3072), + RUN_DEV(ABOCOM2, RT2870_1), + RUN_DEV(ACCTON, RT2770), + RUN_DEV(ACCTON, RT2870_1), + RUN_DEV(ACCTON, RT2870_2), + RUN_DEV(ACCTON, RT2870_3), + RUN_DEV(ACCTON, RT2870_4), + RUN_DEV(ACCTON, RT2870_5), + RUN_DEV(ACCTON, RT3070), + RUN_DEV(ACCTON, RT3070_1), + RUN_DEV(ACCTON, RT3070_2), + RUN_DEV(ACCTON, RT3070_3), + RUN_DEV(ACCTON, RT3070_4), + RUN_DEV(ACCTON, RT3070_5), + RUN_DEV(AIRTIES, RT3070), + RUN_DEV(ALLWIN, RT2070), + RUN_DEV(ALLWIN, RT2770), + RUN_DEV(ALLWIN, RT2870), + RUN_DEV(ALLWIN, RT3070), + RUN_DEV(ALLWIN, RT3071), + RUN_DEV(ALLWIN, RT3072), + RUN_DEV(ALLWIN, RT3572), + RUN_DEV(AMIGO, RT2870_1), + RUN_DEV(AMIGO, RT2870_2), + RUN_DEV(AMIT, CGWLUSB2GNR), + RUN_DEV(AMIT, RT2870_1), + RUN_DEV(AMIT2, RT2870), + RUN_DEV(ASUS, RT2870_1), + RUN_DEV(ASUS, RT2870_2), + RUN_DEV(ASUS, RT2870_3), + RUN_DEV(ASUS, RT2870_4), + RUN_DEV(ASUS, RT2870_5), + RUN_DEV(ASUS, USBN13), + RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS2, USBN11), + RUN_DEV(AZUREWAVE, RT2870_1), + RUN_DEV(AZUREWAVE, RT2870_2), + RUN_DEV(AZUREWAVE, RT3070_1), + RUN_DEV(AZUREWAVE, RT3070_2), + RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F5D8053V3), + RUN_DEV(BELKIN, F5D8055), + RUN_DEV(BELKIN, F6D4050V1), + RUN_DEV(BELKIN, RT2870_1), + RUN_DEV(BELKIN, RT2870_2), + RUN_DEV(CISCOLINKSYS2, RT3070), + RUN_DEV(CISCOLINKSYS3, RT3070), + RUN_DEV(CONCEPTRONIC2, RT2870_1), + RUN_DEV(CONCEPTRONIC2, RT2870_2), + RUN_DEV(CONCEPTRONIC2, RT2870_3), + RUN_DEV(CONCEPTRONIC2, RT2870_4), + RUN_DEV(CONCEPTRONIC2, RT2870_5), + RUN_DEV(CONCEPTRONIC2, RT2870_6), + RUN_DEV(CONCEPTRONIC2, RT2870_7), + RUN_DEV(CONCEPTRONIC2, RT2870_8), + RUN_DEV(CONCEPTRONIC2, RT3070_1), + RUN_DEV(CONCEPTRONIC2, RT3070_2), + RUN_DEV(CONCEPTRONIC2, VIGORN61), + RUN_DEV(COREGA, CGWLUSB300GNM), + RUN_DEV(COREGA, RT2870_1), + RUN_DEV(COREGA, RT2870_2), + RUN_DEV(COREGA, RT2870_3), + RUN_DEV(COREGA, RT3070), + RUN_DEV(CYBERTAN, RT2870), + RUN_DEV(DLINK, RT2870), + RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK2, DWA130), + RUN_DEV(DLINK2, RT2870_1), + RUN_DEV(DLINK2, RT2870_2), + RUN_DEV(DLINK2, RT3070_1), + RUN_DEV(DLINK2, RT3070_2), + RUN_DEV(DLINK2, RT3070_3), + RUN_DEV(DLINK2, RT3070_4), + RUN_DEV(DLINK2, RT3070_5), + RUN_DEV(DLINK2, RT3072), + RUN_DEV(DLINK2, RT3072_1), + RUN_DEV(EDIMAX, EW7717), + RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, RT2870_1), + RUN_DEV(ENCORE, RT3070_1), + RUN_DEV(ENCORE, RT3070_2), + RUN_DEV(ENCORE, RT3070_3), + RUN_DEV(GIGABYTE, GNWB31N), + RUN_DEV(GIGABYTE, GNWB32L), + RUN_DEV(GIGABYTE, RT2870_1), + RUN_DEV(GIGASET, RT3070_1), + RUN_DEV(GIGASET, RT3070_2), + RUN_DEV(GUILLEMOT, HWNU300), + RUN_DEV(HAWKING, HWUN2), + RUN_DEV(HAWKING, RT2870_1), + RUN_DEV(HAWKING, RT2870_2), + RUN_DEV(HAWKING, RT3070), + RUN_DEV(IODATA, RT3072_1), + RUN_DEV(IODATA, RT3072_2), + RUN_DEV(IODATA, RT3072_3), + RUN_DEV(IODATA, RT3072_4), + RUN_DEV(LINKSYS4, RT3070), + RUN_DEV(LINKSYS4, WUSB100), + RUN_DEV(LINKSYS4, WUSB54GCV3), + RUN_DEV(LINKSYS4, WUSB600N), + RUN_DEV(LINKSYS4, WUSB600NV2), + RUN_DEV(LOGITEC, RT2870_1), + RUN_DEV(LOGITEC, RT2870_2), + RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, RT2870_2), + RUN_DEV(MELCO, WLIUCAG300N), + RUN_DEV(MELCO, WLIUCG300N), + RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MOTOROLA4, RT2770), + RUN_DEV(MOTOROLA4, RT3070), + RUN_DEV(MSI, RT3070_1), + RUN_DEV(MSI, RT3070_2), + RUN_DEV(MSI, RT3070_3), + RUN_DEV(MSI, RT3070_4), + RUN_DEV(MSI, RT3070_5), + RUN_DEV(MSI, RT3070_6), + RUN_DEV(MSI, RT3070_7), + RUN_DEV(MSI, RT3070_8), + RUN_DEV(MSI, RT3070_9), + RUN_DEV(MSI, RT3070_10), + RUN_DEV(MSI, RT3070_11), + RUN_DEV(OVISLINK, RT3072), + RUN_DEV(PARA, RT3070), + RUN_DEV(PEGATRON, RT2870), + RUN_DEV(PEGATRON, RT3070), + RUN_DEV(PEGATRON, RT3070_2), + RUN_DEV(PEGATRON, RT3070_3), + RUN_DEV(PHILIPS, RT2870), + RUN_DEV(PLANEX2, GWUS300MINIS), + RUN_DEV(PLANEX2, GWUSMICRON), + RUN_DEV(PLANEX2, RT2870), + RUN_DEV(PLANEX2, RT3070), + RUN_DEV(QCOM, RT2870), + RUN_DEV(QUANTA, RT3070), + RUN_DEV(RALINK, RT2070), + RUN_DEV(RALINK, RT2770), + RUN_DEV(RALINK, RT2870), + RUN_DEV(RALINK, RT3070), + RUN_DEV(RALINK, RT3071), + RUN_DEV(RALINK, RT3072), + RUN_DEV(RALINK, RT3370), + RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT8070), + RUN_DEV(SAMSUNG2, RT2870_1), + RUN_DEV(SENAO, RT2870_1), + RUN_DEV(SENAO, RT2870_2), + RUN_DEV(SENAO, RT2870_3), + RUN_DEV(SENAO, RT2870_4), + RUN_DEV(SENAO, RT3070), + RUN_DEV(SENAO, RT3071), + RUN_DEV(SENAO, RT3072_1), + RUN_DEV(SENAO, RT3072_2), + RUN_DEV(SENAO, RT3072_3), + RUN_DEV(SENAO, RT3072_4), + RUN_DEV(SENAO, RT3072_5), + RUN_DEV(SITECOMEU, RT2770), + RUN_DEV(SITECOMEU, RT2870_1), + RUN_DEV(SITECOMEU, RT2870_2), + RUN_DEV(SITECOMEU, RT2870_3), + RUN_DEV(SITECOMEU, RT2870_4), + RUN_DEV(SITECOMEU, RT3070), + RUN_DEV(SITECOMEU, RT3070_2), + RUN_DEV(SITECOMEU, RT3070_3), + RUN_DEV(SITECOMEU, RT3070_4), + RUN_DEV(SITECOMEU, RT3071), + RUN_DEV(SITECOMEU, RT3072_1), + RUN_DEV(SITECOMEU, RT3072_2), + RUN_DEV(SITECOMEU, RT3072_3), + RUN_DEV(SITECOMEU, RT3072_4), + RUN_DEV(SITECOMEU, RT3072_5), + RUN_DEV(SITECOMEU, RT3072_6), + RUN_DEV(SITECOMEU, WL608), + RUN_DEV(SPARKLAN, RT2870_1), + RUN_DEV(SPARKLAN, RT3070), + RUN_DEV(SWEEX2, LW153), + RUN_DEV(SWEEX2, LW303), + RUN_DEV(SWEEX2, LW313), + RUN_DEV(TOSHIBA, RT3070), + RUN_DEV(UMEDIA, RT2870_1), + RUN_DEV(ZCOM, RT2870_1), + RUN_DEV(ZCOM, RT2870_2), + RUN_DEV(ZINWELL, RT2870_1), + RUN_DEV(ZINWELL, RT2870_2), + RUN_DEV(ZINWELL, RT3070), + RUN_DEV(ZINWELL, RT3072_1), + RUN_DEV(ZINWELL, RT3072_2), + RUN_DEV(ZYXEL, RT2870_1), + RUN_DEV(ZYXEL, RT2870_2), +#undef RUN_DEV }; MODULE_DEPEND(run, wlan, 1, 1, 1); @@ -1921,7 +1923,7 @@ run_wme_update(struct ieee80211com *ic) sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return 0; + return (0); } RUN_LOCK(sc); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:35:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6AFE106566C; Fri, 19 Nov 2010 01:35:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A64768FC14; Fri, 19 Nov 2010 01:35: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 oAJ1ZEUJ052066; Fri, 19 Nov 2010 01:35:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ZELi052064; Fri, 19 Nov 2010 01:35:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190135.oAJ1ZELi052064@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:35: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: r215487 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:35:14 -0000 Author: thompsa Date: Fri Nov 19 01:35:14 2010 New Revision: 215487 URL: http://svn.freebsd.org/changeset/base/215487 Log: MFC r210018 Add a 4 and 7 port USB hub from NEC. PR: 148189 Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:34:18 2010 (r215486) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:14 2010 (r215487) @@ -2255,6 +2255,8 @@ product NATIONAL BEARPAW1200 0x1000 Bear product NATIONAL BEARPAW2400 0x1001 BearPaw 2400 /* NEC products */ +product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub +product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC HUB 0x55aa hub product NEC HUB_B 0x55ab hub From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:35:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD87B10656A4; Fri, 19 Nov 2010 01:35:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 686E88FC0C; Fri, 19 Nov 2010 01:35: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 oAJ1ZvF4052124; Fri, 19 Nov 2010 01:35:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1Zv3B052121; Fri, 19 Nov 2010 01:35:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190135.oAJ1Zv3B052121@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:35: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: r215488 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:35:57 -0000 Author: thompsa Date: Fri Nov 19 01:35:57 2010 New Revision: 215488 URL: http://svn.freebsd.org/changeset/base/215488 Log: MFC r210469 Give a name to the HTC Wizard Smartphone PR: usb/135575 Modified: stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:35:14 2010 (r215487) +++ stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:35:57 2010 (r215488) @@ -690,14 +690,14 @@ static const struct usb_device_id uipaq_ {USB_VPI(USB_VENDOR_HTC, 0x0a9e, 0)}, /* SmartPhone USB Sync */ {USB_VPI(USB_VENDOR_HTC, 0x0a9f, 0)}, - /* "High Tech Computer Corp" */ - {USB_VPI(USB_VENDOR_HTC, 0x0bce, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0)}, + /* High Tech Computer Wizard Smartphone */ + {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WIZARD, 0)}, /* JVC USB Sync */ {USB_VPI(USB_VENDOR_JVC, 0x3011, 0)}, /* JVC USB Sync */ Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:14 2010 (r215487) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:57 2010 (r215488) @@ -1761,6 +1761,7 @@ product HP HS2300 0x1e1d hs2300 HSDPA product HTC WINMOBILE 0x00ce HTC USB Sync product HTC PPC6700MODEM 0x00cf PPC6700 Modem product HTC SMARTPHONE 0x0a51 SmartPhone USB Sync +product HTC WIZARD 0x0bce HTC Wizard USB Sync /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA371065670; Fri, 19 Nov 2010 01:36:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1E38FC19; Fri, 19 Nov 2010 01:36: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 oAJ1aeUa052186; Fri, 19 Nov 2010 01:36:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1aeco052184; Fri, 19 Nov 2010 01:36:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190136.oAJ1aeco052184@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215489 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:36:40 -0000 Author: thompsa Date: Fri Nov 19 01:36:40 2010 New Revision: 215489 URL: http://svn.freebsd.org/changeset/base/215489 Log: MFC r210553 Fix the entry for the Option ICON452 where an underscore was used instead of whitespace. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:35:57 2010 (r215488) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:36:40 2010 (r215489) @@ -2401,7 +2401,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 -product OPTION_ICON452 0x7901 Globetrotter iCON 452 +product OPTION ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E04106564A; Fri, 19 Nov 2010 01:39:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A13F98FC1F; Fri, 19 Nov 2010 01:39: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 oAJ1dTov052280; Fri, 19 Nov 2010 01:39:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1dTIW052278; Fri, 19 Nov 2010 01:39:29 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190139.oAJ1dTIW052278@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:39: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: r215490 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:39:29 -0000 Author: thompsa Date: Fri Nov 19 01:39:29 2010 New Revision: 215490 URL: http://svn.freebsd.org/changeset/base/215490 Log: MFC r211021 Sort this file a little better: the vendors are supposed to be sorted by vendor ID in the vendor section, and by symbolic name in the product section. Products are sorted by product ID. While here, get rid of a duplicate Microsoft Mouse entry, revealed by sorting. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:36:40 2010 (r215489) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:39:29 2010 (r215490) @@ -560,6 +560,7 @@ vendor DYNASTREAM 0x0fcf Dynastream Inno vendor QUALCOMM 0x1004 Qualcomm vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola +vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital @@ -574,7 +575,6 @@ vendor SILABS 0x10c4 Silicon Labs vendor SILABS3 0x10c5 Silicon Labs vendor SILABS4 0x10ce Silicon Labs vendor ACTIONS 0x10d6 Actions -vendor AIRPLUS 0x1011 Airplus vendor ANALOG 0x1110 Analog Devices vendor TENX 0x1130 Ten X Technology, Inc. vendor ISSC 0x1131 Integrated System Solution Corp. @@ -2161,11 +2161,10 @@ product MICROSOFT MN110 0x007a 10/100 U product MICROSOFT WLINTELLIMOUSE 0x008c Wireless Optical IntelliMouse product MICROSOFT WLNOTEBOOK 0x00b9 Wireless Optical Mouse (Model 1023) product MICROSOFT COMFORT3000 0x00d1 Comfort Optical Mouse 3000 (Model 1043) -product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) -product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse -product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN product MICROSOFT NATURAL4000 0x00db Natural Ergonomic Keyboard 4000 +product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) +product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN /* Microtech products */ product MICROTECH SCSIDB25 0x0004 USB-SCSI-DB25 @@ -3229,6 +3228,9 @@ product UNKNOWN4 USBMEMSTICK 0x6025 Flas /* Unknown vendors */ product UNKNOWN5 USB2IDEBRIDGE 0x00ff USB 2.0 ATA/SATA Bridge +/* USI products */ +product USI MC60 0x10c5 MC60 Serial + /* U.S. Robotics products */ product USR USR5422 0x0118 USR5422 WLAN product USR USR5423 0x0121 USR5423 WLAN @@ -3236,9 +3238,6 @@ product USR USR5423 0x0121 USR5423 WLAN /* VIA Technologies products */ product VIA USB2IDEBRIDGE 0x6204 USB 2.0 IDE Bridge -/* USI products */ -product USI MC60 0x10c5 MC60 Serial - /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable @@ -3309,9 +3308,6 @@ product XIRLINK PCCAM 0x8080 IBM PC Cam product XYRATEX PRISM_GT_1 0x2000 PrismGT USB 2.0 WLAN product XYRATEX PRISM_GT_2 0x2002 PrismGT USB 2.0 WLAN -/* Y-E Data products */ -product YEDATA FLASHBUSTERU 0x0000 Flashbuster-U - /* Yamaha products */ product YAMAHA UX256 0x1000 UX256 MIDI I/F product YAMAHA UX96 0x1008 UX96 MIDI I/F From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:40:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE240106564A; Fri, 19 Nov 2010 01:40:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAEDE8FC1E; Fri, 19 Nov 2010 01: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 oAJ1eYNM052353; Fri, 19 Nov 2010 01:40:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1eYGm052351; Fri, 19 Nov 2010 01:40:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190140.oAJ1eYGm052351@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215491 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:40:35 -0000 Author: thompsa Date: Fri Nov 19 01:40:34 2010 New Revision: 215491 URL: http://svn.freebsd.org/changeset/base/215491 Log: MFC r211104 Add entries for some devices I have locally. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:39:29 2010 (r215490) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:40:34 2010 (r215491) @@ -677,6 +677,7 @@ vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications +vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works vendor TLAYTECH 0x20b9 Tlay Tech vendor ENCORE 0x203d Encore vendor PARA 0x20b8 PARA Industrial @@ -992,6 +993,8 @@ product AOX USB101 0x0008 Ethernet product APC UPS 0x0002 Uninterruptible Power Supply /* Apple Computer products */ +product APPLE IMAC_KBD 0x0201 USB iMac Keyboard +product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard product APPLE KBD_TP_ANSI 0x0223 Apple Internal Keyboard/Trackpad (Wellspring/ANSI) product APPLE KBD_TP_ISO 0x0224 Apple Internal Keyboard/Trackpad (Wellspring/ISO) @@ -999,8 +1002,10 @@ product APPLE KBD_TP_JIS 0x0225 Apple In product APPLE KBD_TP_ANSI2 0x0230 Apple Internal Keyboard/Trackpad (Wellspring2/ANSI) product APPLE KBD_TP_ISO2 0x0231 Apple Internal Keyboard/Trackpad (Wellspring2/ISO) product APPLE KBD_TP_JIS2 0x0232 Apple Internal Keyboard/Trackpad (Wellspring2/JIS) +product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse +product APPLE KBD_HUB 0x1001 Hub in Apple USB Keyboard product APPLE EXT_KBD_HUB 0x1003 Hub in Apple Extended USB Keyboard product APPLE SPEAKERS 0x1101 Speakers product APPLE IPOD 0x1201 iPod @@ -1014,7 +1019,11 @@ product APPLE IPOD_08 0x1208 iPod '08' product APPLE IPODVIDEO 0x1209 iPod Video product APPLE IPODNANO 0x120a iPod Nano product APPLE IPHONE 0x1290 iPhone +product APPLE IPOD_TOUCH 0x1291 iPod Touch product APPLE IPHONE_3G 0x1292 iPhone 3G +product APPLE IPHONE_3GS 0x1294 iPhone 3GS +product APPLE IPHONE_4 0x1297 iPhone 4 +product APPLE IPAD 0x129a iPad product APPLE ETHERNET 0x1402 Ethernet A1277 /* Arkmicro Technologies */ @@ -1080,6 +1089,9 @@ product ATMEL BW002 0x7605 BW002 Wirele product ATMEL WL1130USB 0x7613 WL-1130 USB product ATMEL AT76C505A 0x7614 AT76c505a Wireless Adapter +/* AuthenTec products */ +product AUTHENTEC AES1610 0x1600 AES1610 Fingerprint Sensor + /* Avision products */ product AVISION 1200U 0x0268 1200U scanner @@ -1146,6 +1158,7 @@ product BROTHER HL1050 0x0002 HL-1050 l product BROTHER MFC8600_9650 0x0100 MFC8600/9650 multifunction device /* Behavior Technology Computer products */ +product BTC BTC6100 0x5550 6100C Keyboard product BTC BTC7932 0x6782 Keyboard with mouse port /* Canon, Inc. products */ @@ -1190,6 +1203,7 @@ product CHIC CYPRESS 0x0003 Cypress USB /* Chicony products */ product CHICONY KB8933 0x0001 KB-8933 keyboard +product CHICONY KU0325 0x0116 KU-0325 keyboard product CHICONY CNF7129 0xb071 Notebook Web Camera product CHICONY2 TWINKLECAM 0x600d TwinkleCam USB camera @@ -1690,6 +1704,7 @@ product HANDSPRING TREO600 0x0300 Handsp /* Hauppauge Computer Works */ product HAUPPAUGE WINTV_USB_FM 0x4d12 WinTV USB FM +product HAUPPAUGE2 NOVAT500 0x9580 NovaT 500Stick /* Hawking Technologies products */ product HAWKING RT2870_1 0x0001 RT2870 @@ -1762,6 +1777,9 @@ product HTC WINMOBILE 0x00ce HTC USB Sy product HTC PPC6700MODEM 0x00cf PPC6700 Modem product HTC SMARTPHONE 0x0a51 SmartPhone USB Sync product HTC WIZARD 0x0bce HTC Wizard USB Sync +product HTC LEGENDSYNC 0x0c97 HTC Legend USB Sync +product HTC LEGEND 0x0ff9 HTC Legend +product HTC LEGENDINTERNET 0x0ffe HTC Legend Internet Sharing /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile @@ -2155,6 +2173,8 @@ product MICROSOFT INETPRO 0x001c Interne product MICROSOFT TBEXPLORER 0x0024 Trackball Explorer product MICROSOFT INTELLIEYE 0x0025 IntelliEye mouse product MICROSOFT INETPRO2 0x002b Internet Keyboard Pro +product MICROSOFT INTELLIMOUSE5 0x0039 IntelliMouse 1.1 5-Button Mouse +product MICROSOFT WHEELMOUSE 0x0040 Wheel Mouse Optical product MICROSOFT MN510 0x006e MN510 Wireless product MICROSOFT 700WX 0x0079 Palm 700WX product MICROSOFT MN110 0x007a 10/100 USB NIC @@ -2338,6 +2358,10 @@ product NOVATEL2 FLEXPACKGPS 0x0100 NovA /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 +/* O2Micro products */ +product O2MICRO OZ776_HUB 0x7761 OZ776 hub +product O2MICRO OZ776_CCID_SC 0x7772 OZ776 CCID SC Reader + /* Olympus products */ product OLYMPUS C1 0x0102 C-1 Digital Camera product OLYMPUS C700 0x0105 C-700 Ultra Zoom @@ -2529,6 +2553,7 @@ product PRIMAX G2E600 0x0383 G2E-600 sc product PRIMAX COMFORT 0x4d01 Comfort product PRIMAX MOUSEINABOX 0x4d02 Mouse-in-a-Box product PRIMAX PCGAUMS1 0x4d04 Sony PCGA-UMS1 +product PRIMAX HP_RH304AA 0x4d17 HP RH304AA mouse /* Prolific products */ product PROLIFIC PL2301 0x0000 PL2301 Host-Host interface From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:41:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4959F106566C; Fri, 19 Nov 2010 01:41:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35E2A8FC1A; Fri, 19 Nov 2010 01: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 oAJ1fTif052456; Fri, 19 Nov 2010 01:41:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1fSYp052416; Fri, 19 Nov 2010 01:41:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190141.oAJ1fSYp052416@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:41: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: r215492 - in stable/8/sys/dev: if_ndis usb usb/input usb/misc usb/net usb/serial usb/storage usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:41:29 -0000 Author: thompsa Date: Fri Nov 19 01:41:28 2010 New Revision: 215492 URL: http://svn.freebsd.org/changeset/base/215492 Log: MFC r212122 Add missing MODULE_VERSION() definitions, this resolves problems around duplicate module loads. PR: usb/125736 Submitted by: danger, mm Modified: stable/8/sys/dev/if_ndis/if_ndis_usb.c stable/8/sys/dev/usb/input/atp.c stable/8/sys/dev/usb/input/uep.c stable/8/sys/dev/usb/input/uhid.c stable/8/sys/dev/usb/input/ukbd.c stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/misc/udbp.c stable/8/sys/dev/usb/misc/ufm.c stable/8/sys/dev/usb/net/if_aue.c stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_cue.c stable/8/sys/dev/usb/net/if_kue.c stable/8/sys/dev/usb/net/if_rue.c stable/8/sys/dev/usb/net/if_udav.c stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/serial/uark.c stable/8/sys/dev/usb/serial/ubsa.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/serial/ucycom.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/ugensa.c stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/serial/ulpt.c stable/8/sys/dev/usb/serial/umct.c stable/8/sys/dev/usb/serial/umoscom.c stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/storage/urio.c stable/8/sys/dev/usb/usb_compat_linux.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- stable/8/sys/dev/if_ndis/if_ndis_usb.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/if_ndis/if_ndis_usb.c Fri Nov 19 01:41:28 2010 (r215492) @@ -107,6 +107,7 @@ static driver_t ndis_driver = { static devclass_t ndis_devclass; DRIVER_MODULE(ndis, uhub, ndis_driver, ndis_devclass, ndisdrv_modevent, 0); +MODULE_VERSION(ndis, 1); static int ndisusb_devcompare(interface_type bustype, struct ndis_usb_type *t, device_t dev) Modified: stable/8/sys/dev/usb/input/atp.c ============================================================================== --- stable/8/sys/dev/usb/input/atp.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/atp.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2222,3 +2222,4 @@ static devclass_t atp_devclass; DRIVER_MODULE(atp, uhub, atp_driver, atp_devclass, NULL, 0); MODULE_DEPEND(atp, usb, 1, 1, 1); +MODULE_VERSION(atp, 1); Modified: stable/8/sys/dev/usb/input/uep.c ============================================================================== --- stable/8/sys/dev/usb/input/uep.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/uep.c Fri Nov 19 01:41:28 2010 (r215492) @@ -439,3 +439,4 @@ static driver_t uep_driver = { DRIVER_MODULE(uep, uhub, uep_driver, uep_devclass, NULL, NULL); MODULE_DEPEND(uep, usb, 1, 1, 1); +MODULE_VERSION(uep, 1); Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/uhid.c Fri Nov 19 01:41:28 2010 (r215492) @@ -808,3 +808,4 @@ static driver_t uhid_driver = { DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, NULL, 0); MODULE_DEPEND(uhid, usb, 1, 1, 1); +MODULE_VERSION(uhid, 1); Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1894,3 +1894,4 @@ static driver_t ukbd_driver = { DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); MODULE_DEPEND(ukbd, usb, 1, 1, 1); +MODULE_VERSION(ukbd, 1); Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1017,3 +1017,4 @@ static driver_t ums_driver = { DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0); MODULE_DEPEND(ums, usb, 1, 1, 1); +MODULE_VERSION(ums, 1); Modified: stable/8/sys/dev/usb/misc/udbp.c ============================================================================== --- stable/8/sys/dev/usb/misc/udbp.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/misc/udbp.c Fri Nov 19 01:41:28 2010 (r215492) @@ -261,6 +261,7 @@ static driver_t udbp_driver = { DRIVER_MODULE(udbp, uhub, udbp_driver, udbp_devclass, udbp_modload, 0); MODULE_DEPEND(udbp, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION); MODULE_DEPEND(udbp, usb, 1, 1, 1); +MODULE_VERSION(udbp, 1); static int udbp_modload(module_t mod, int event, void *data) Modified: stable/8/sys/dev/usb/misc/ufm.c ============================================================================== --- stable/8/sys/dev/usb/misc/ufm.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/misc/ufm.c Fri Nov 19 01:41:28 2010 (r215492) @@ -117,6 +117,7 @@ static driver_t ufm_driver = { DRIVER_MODULE(ufm, uhub, ufm_driver, ufm_devclass, NULL, 0); MODULE_DEPEND(ufm, usb, 1, 1, 1); +MODULE_VERSION(ufm, 1); static int ufm_probe(device_t dev) Modified: stable/8/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_aue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_aue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -281,6 +281,7 @@ MODULE_DEPEND(aue, uether, 1, 1, 1); MODULE_DEPEND(aue, usb, 1, 1, 1); MODULE_DEPEND(aue, ether, 1, 1, 1); MODULE_DEPEND(aue, miibus, 1, 1, 1); +MODULE_VERSION(aue, 1); static const struct usb_ether_methods aue_ue_methods = { .ue_attach_post = aue_attach_post, Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:41:28 2010 (r215492) @@ -248,6 +248,7 @@ MODULE_DEPEND(axe, uether, 1, 1, 1); MODULE_DEPEND(axe, usb, 1, 1, 1); MODULE_DEPEND(axe, ether, 1, 1, 1); MODULE_DEPEND(axe, miibus, 1, 1, 1); +MODULE_VERSION(axe, 1); static const struct usb_ether_methods axe_ue_methods = { .ue_attach_post = axe_attach_post, Modified: stable/8/sys/dev/usb/net/if_cue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_cue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_cue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -173,6 +173,7 @@ DRIVER_MODULE(cue, uhub, cue_driver, cue MODULE_DEPEND(cue, uether, 1, 1, 1); MODULE_DEPEND(cue, usb, 1, 1, 1); MODULE_DEPEND(cue, ether, 1, 1, 1); +MODULE_VERSION(cue, 1); static const struct usb_ether_methods cue_ue_methods = { .ue_attach_post = cue_attach_post, Modified: stable/8/sys/dev/usb/net/if_kue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_kue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_kue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -215,6 +215,7 @@ DRIVER_MODULE(kue, uhub, kue_driver, kue MODULE_DEPEND(kue, uether, 1, 1, 1); MODULE_DEPEND(kue, usb, 1, 1, 1); MODULE_DEPEND(kue, ether, 1, 1, 1); +MODULE_VERSION(kue, 1); static const struct usb_ether_methods kue_ue_methods = { .ue_attach_post = kue_attach_post, Modified: stable/8/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_rue.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_rue.c Fri Nov 19 01:41:28 2010 (r215492) @@ -213,6 +213,7 @@ MODULE_DEPEND(rue, uether, 1, 1, 1); MODULE_DEPEND(rue, usb, 1, 1, 1); MODULE_DEPEND(rue, ether, 1, 1, 1); MODULE_DEPEND(rue, miibus, 1, 1, 1); +MODULE_VERSION(rue, 1); static const struct usb_ether_methods rue_ue_methods = { .ue_attach_post = rue_attach_post, Modified: stable/8/sys/dev/usb/net/if_udav.c ============================================================================== --- stable/8/sys/dev/usb/net/if_udav.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/net/if_udav.c Fri Nov 19 01:41:28 2010 (r215492) @@ -172,6 +172,7 @@ MODULE_DEPEND(udav, uether, 1, 1, 1); MODULE_DEPEND(udav, usb, 1, 1, 1); MODULE_DEPEND(udav, ether, 1, 1, 1); MODULE_DEPEND(udav, miibus, 1, 1, 1); +MODULE_VERSION(udav, 1); static const struct usb_ether_methods udav_ue_methods = { .ue_attach_post = udav_attach_post, Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:41:28 2010 (r215492) @@ -179,6 +179,7 @@ static driver_t u3g_driver = { DRIVER_MODULE(u3g, uhub, u3g_driver, u3g_devclass, u3g_driver_loaded, 0); MODULE_DEPEND(u3g, ucom, 1, 1, 1); MODULE_DEPEND(u3g, usb, 1, 1, 1); +MODULE_VERSION(u3g, 1); static const struct usb_device_id u3g_devs[] = { #define U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } Modified: stable/8/sys/dev/usb/serial/uark.c ============================================================================== --- stable/8/sys/dev/usb/serial/uark.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uark.c Fri Nov 19 01:41:28 2010 (r215492) @@ -169,6 +169,7 @@ static driver_t uark_driver = { DRIVER_MODULE(uark, uhub, uark_driver, uark_devclass, NULL, 0); MODULE_DEPEND(uark, ucom, 1, 1, 1); MODULE_DEPEND(uark, usb, 1, 1, 1); +MODULE_VERSION(uark, 1); static const struct usb_device_id uark_devs[] = { {USB_VPI(USB_VENDOR_ARKMICRO, USB_PRODUCT_ARKMICRO_ARK3116, 0)}, Modified: stable/8/sys/dev/usb/serial/ubsa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubsa.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ubsa.c Fri Nov 19 01:41:28 2010 (r215492) @@ -277,6 +277,7 @@ static driver_t ubsa_driver = { DRIVER_MODULE(ubsa, uhub, ubsa_driver, ubsa_devclass, NULL, 0); MODULE_DEPEND(ubsa, ucom, 1, 1, 1); MODULE_DEPEND(ubsa, usb, 1, 1, 1); +MODULE_VERSION(ubsa, 1); static int ubsa_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:41:28 2010 (r215492) @@ -215,6 +215,7 @@ static driver_t ubser_driver = { DRIVER_MODULE(ubser, uhub, ubser_driver, ubser_devclass, NULL, 0); MODULE_DEPEND(ubser, ucom, 1, 1, 1); MODULE_DEPEND(ubser, usb, 1, 1, 1); +MODULE_VERSION(ubser, 1); static int ubser_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uchcom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uchcom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -855,3 +855,4 @@ static devclass_t uchcom_devclass; DRIVER_MODULE(uchcom, uhub, uchcom_driver, uchcom_devclass, NULL, 0); MODULE_DEPEND(uchcom, ucom, 1, 1, 1); MODULE_DEPEND(uchcom, usb, 1, 1, 1); +MODULE_VERSION(uchcom, 1); Modified: stable/8/sys/dev/usb/serial/ucycom.c ============================================================================== --- stable/8/sys/dev/usb/serial/ucycom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ucycom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -176,6 +176,7 @@ static driver_t ucycom_driver = { DRIVER_MODULE(ucycom, uhub, ucycom_driver, ucycom_devclass, NULL, 0); MODULE_DEPEND(ucycom, ucom, 1, 1, 1); MODULE_DEPEND(ucycom, usb, 1, 1, 1); +MODULE_VERSION(ucycom, 1); /* * Supported devices Modified: stable/8/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/8/sys/dev/usb/serial/ufoma.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ufoma.c Fri Nov 19 01:41:28 2010 (r215492) @@ -326,6 +326,7 @@ static driver_t ufoma_driver = { DRIVER_MODULE(ufoma, uhub, ufoma_driver, ufoma_devclass, NULL, 0); MODULE_DEPEND(ufoma, ucom, 1, 1, 1); MODULE_DEPEND(ufoma, usb, 1, 1, 1); +MODULE_VERSION(ufoma, 1); static int ufoma_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uftdi.c Fri Nov 19 01:41:28 2010 (r215492) @@ -212,6 +212,7 @@ static driver_t uftdi_driver = { DRIVER_MODULE(uftdi, uhub, uftdi_driver, uftdi_devclass, NULL, 0); MODULE_DEPEND(uftdi, ucom, 1, 1, 1); MODULE_DEPEND(uftdi, usb, 1, 1, 1); +MODULE_VERSION(uftdi, 1); static struct usb_device_id uftdi_devs[] = { #define UFTDI_DEV(v,p,t) \ Modified: stable/8/sys/dev/usb/serial/ugensa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ugensa.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ugensa.c Fri Nov 19 01:41:28 2010 (r215492) @@ -160,6 +160,7 @@ static driver_t ugensa_driver = { DRIVER_MODULE(ugensa, uhub, ugensa_driver, ugensa_devclass, NULL, 0); MODULE_DEPEND(ugensa, ucom, 1, 1, 1); MODULE_DEPEND(ugensa, usb, 1, 1, 1); +MODULE_VERSION(ugensa, 1); static const struct usb_device_id ugensa_devs[] = { {USB_VPI(USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220, 0)}, Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uipaq.c Fri Nov 19 01:41:28 2010 (r215492) @@ -1092,6 +1092,7 @@ static driver_t uipaq_driver = { DRIVER_MODULE(uipaq, uhub, uipaq_driver, uipaq_devclass, NULL, 0); MODULE_DEPEND(uipaq, ucom, 1, 1, 1); MODULE_DEPEND(uipaq, usb, 1, 1, 1); +MODULE_VERSION(uipaq, 1); static int uipaq_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/ulpt.c ============================================================================== --- stable/8/sys/dev/usb/serial/ulpt.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/ulpt.c Fri Nov 19 01:41:28 2010 (r215492) @@ -752,3 +752,4 @@ static driver_t ulpt_driver = { DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass, NULL, 0); MODULE_DEPEND(ulpt, usb, 1, 1, 1); MODULE_DEPEND(ulpt, ucom, 1, 1, 1); +MODULE_VERSION(ulpt, 1); Modified: stable/8/sys/dev/usb/serial/umct.c ============================================================================== --- stable/8/sys/dev/usb/serial/umct.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/umct.c Fri Nov 19 01:41:28 2010 (r215492) @@ -219,6 +219,7 @@ static driver_t umct_driver = { DRIVER_MODULE(umct, uhub, umct_driver, umct_devclass, NULL, 0); MODULE_DEPEND(umct, ucom, 1, 1, 1); MODULE_DEPEND(umct, usb, 1, 1, 1); +MODULE_VERSION(umct, 1); static int umct_probe(device_t dev) Modified: stable/8/sys/dev/usb/serial/umoscom.c ============================================================================== --- stable/8/sys/dev/usb/serial/umoscom.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/umoscom.c Fri Nov 19 01:41:28 2010 (r215492) @@ -279,6 +279,7 @@ static driver_t umoscom_driver = { DRIVER_MODULE(umoscom, uhub, umoscom_driver, umoscom_devclass, NULL, 0); MODULE_DEPEND(umoscom, ucom, 1, 1, 1); MODULE_DEPEND(umoscom, usb, 1, 1, 1); +MODULE_VERSION(umoscom, 1); static const struct usb_device_id umoscom_devs[] = { {USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7703, 0)} Modified: stable/8/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/serial/uvisor.c Fri Nov 19 01:41:28 2010 (r215492) @@ -259,6 +259,7 @@ static driver_t uvisor_driver = { DRIVER_MODULE(uvisor, uhub, uvisor_driver, uvisor_devclass, NULL, 0); MODULE_DEPEND(uvisor, ucom, 1, 1, 1); MODULE_DEPEND(uvisor, usb, 1, 1, 1); +MODULE_VERSION(uvisor, 1); static const struct usb_device_id uvisor_devs[] = { #define UVISOR_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:41:28 2010 (r215492) @@ -715,6 +715,7 @@ static driver_t umass_driver = { DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, NULL, 0); MODULE_DEPEND(umass, usb, 1, 1, 1); MODULE_DEPEND(umass, cam, 1, 1, 1); +MODULE_VERSION(umass, 1); /* * USB device probe/attach/detach Modified: stable/8/sys/dev/usb/storage/urio.c ============================================================================== --- stable/8/sys/dev/usb/storage/urio.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/storage/urio.c Fri Nov 19 01:41:28 2010 (r215492) @@ -197,6 +197,7 @@ static driver_t urio_driver = { DRIVER_MODULE(urio, uhub, urio_driver, urio_devclass, NULL, 0); MODULE_DEPEND(urio, usb, 1, 1, 1); +MODULE_VERSION(urio, 1); static int urio_probe(device_t dev) Modified: stable/8/sys/dev/usb/usb_compat_linux.c ============================================================================== --- stable/8/sys/dev/usb/usb_compat_linux.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/usb_compat_linux.c Fri Nov 19 01:41:28 2010 (r215492) @@ -122,6 +122,7 @@ static driver_t usb_linux_driver = { static devclass_t usb_linux_devclass; DRIVER_MODULE(usb_linux, uhub, usb_linux_driver, usb_linux_devclass, NULL, 0); +MODULE_VERSION(usb_linux, 1); /*------------------------------------------------------------------------* * usb_linux_lookup_id Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:41:28 2010 (r215492) @@ -170,6 +170,7 @@ static driver_t uhub_driver = { DRIVER_MODULE(uhub, usbus, uhub_driver, uhub_devclass, 0, 0); DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, NULL, 0); +MODULE_VERSION(uhub, 1); static void uhub_intr_callback(struct usb_xfer *xfer, usb_error_t error) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:41:28 2010 (r215492) @@ -139,9 +139,6 @@ static const struct usb_device_id rum_de #undef RUM_DEV }; -MODULE_DEPEND(rum, wlan, 1, 1, 1); -MODULE_DEPEND(rum, usb, 1, 1, 1); - static device_probe_t rum_match; static device_attach_t rum_attach; static device_detach_t rum_detach; @@ -2351,3 +2348,6 @@ static driver_t rum_driver = { static devclass_t rum_devclass; DRIVER_MODULE(rum, uhub, rum_driver, rum_devclass, NULL, 0); +MODULE_DEPEND(rum, wlan, 1, 1, 1); +MODULE_DEPEND(rum, usb, 1, 1, 1); +MODULE_VERSION(rum, 1); Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:41:28 2010 (r215492) @@ -294,10 +294,6 @@ static const struct usb_device_id run_de #undef RUN_DEV }; -MODULE_DEPEND(run, wlan, 1, 1, 1); -MODULE_DEPEND(run, usb, 1, 1, 1); -MODULE_DEPEND(run, firmware, 1, 1, 1); - static device_probe_t run_match; static device_attach_t run_attach; static device_detach_t run_detach; @@ -4871,3 +4867,7 @@ static driver_t run_driver = { static devclass_t run_devclass; DRIVER_MODULE(run, uhub, run_driver, run_devclass, NULL, 0); +MODULE_DEPEND(run, wlan, 1, 1, 1); +MODULE_DEPEND(run, usb, 1, 1, 1); +MODULE_DEPEND(run, firmware, 1, 1, 1); +MODULE_VERSION(run, 1); Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2892,3 +2892,4 @@ static devclass_t uath_devclass; DRIVER_MODULE(uath, uhub, uath_driver, uath_devclass, NULL, 0); MODULE_DEPEND(uath, wlan, 1, 1, 1); MODULE_DEPEND(uath, usb, 1, 1, 1); +MODULE_VERSION(uath, 1); Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:41:28 2010 (r215492) @@ -400,6 +400,7 @@ static devclass_t ural_devclass; DRIVER_MODULE(ural, uhub, ural_driver, ural_devclass, NULL, 0); MODULE_DEPEND(ural, usb, 1, 1, 1); MODULE_DEPEND(ural, wlan, 1, 1, 1); +MODULE_VERSION(ural, 1); static int ural_match(device_t self) Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:41:28 2010 (r215492) @@ -4441,3 +4441,4 @@ static devclass_t urtw_devclass; DRIVER_MODULE(urtw, uhub, urtw_driver, urtw_devclass, NULL, 0); MODULE_DEPEND(urtw, wlan, 1, 1, 1); MODULE_DEPEND(urtw, usb, 1, 1, 1); +MODULE_VERSION(urtw, 1); Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:40:34 2010 (r215491) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:41:28 2010 (r215492) @@ -2948,3 +2948,4 @@ static devclass_t zyd_devclass; DRIVER_MODULE(zyd, uhub, zyd_driver, zyd_devclass, NULL, 0); MODULE_DEPEND(zyd, usb, 1, 1, 1); MODULE_DEPEND(zyd, wlan, 1, 1, 1); +MODULE_VERSION(zyd, 1); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:42:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE3831065670; Fri, 19 Nov 2010 01:42:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC1C8FC14; Fri, 19 Nov 2010 01:42: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 oAJ1gDS3052526; Fri, 19 Nov 2010 01:42:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1gDoq052518; Fri, 19 Nov 2010 01:42:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190142.oAJ1gDoq052518@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:42: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: r215493 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:42:14 -0000 Author: thompsa Date: Fri Nov 19 01:42:13 2010 New Revision: 215493 URL: http://svn.freebsd.org/changeset/base/215493 Log: MFC r212127 We need to grab a node reference count to vap->iv_bss before using it as it is possible for the node to be replaced and freed at any time by ieee80211_sta_join1(). Modified: stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:42:13 2010 (r215493) @@ -717,7 +717,7 @@ rum_newstate(struct ieee80211vap *vap, e break; case IEEE80211_S_RUN: - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { rum_update_slot(ic->ic_ifp); @@ -741,6 +741,7 @@ rum_newstate(struct ieee80211vap *vap, e tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) rum_ratectl_start(sc, ni); + ieee80211_free_node(ni); break; default: break; @@ -2214,7 +2215,7 @@ rum_ratectl_task(void *arg, int pending) struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; struct rum_softc *sc = ifp->if_softc; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; int ok, fail; int sum, retrycnt; @@ -2228,8 +2229,10 @@ rum_ratectl_task(void *arg, int pending) sum = ok+fail; retrycnt = (le32toh(sc->sta[5]) & 0xffff) + fail; + ni = ieee80211_ref_node(vap->iv_bss); ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); (void) ieee80211_ratectl_rate(ni, NULL, 0); + ieee80211_free_node(ni); ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_run.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1693,7 +1693,6 @@ run_media_change(struct ifnet *ifp) struct ieee80211com *ic = vap->iv_ic; const struct ieee80211_txparam *tp; struct run_softc *sc = ic->ic_ifp->if_softc; - struct run_node *rn = (void *)vap->iv_bss; uint8_t rate, ridx; int error; @@ -1707,13 +1706,19 @@ run_media_change(struct ifnet *ifp) tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + struct ieee80211_node *ni; + struct run_node *rn; + rate = ic->ic_sup_rates[ic->ic_curmode]. rs_rates[tp->ucastrate] & IEEE80211_RATE_VAL; for (ridx = 0; ridx < RT2860_RIDX_MAX; ridx++) if (rt2860_rates[ridx].rate == rate) break; + ni = ieee80211_ref_node(vap->iv_bss); + rn = (struct run_node *)ni; rn->fix_ridx = ridx; DPRINTF("rate=%d, fix_ridx=%d\n", rate, rn->fix_ridx); + ieee80211_free_node(ni); } #if 0 @@ -1736,7 +1741,6 @@ run_newstate(struct ieee80211vap *vap, e struct run_softc *sc = ic->ic_ifp->if_softc; struct run_vap *rvp = RUN_VAP(vap); enum ieee80211_state ostate; - struct ieee80211_node *ni; uint32_t sta[3]; uint32_t tmp; uint8_t ratectl; @@ -1781,7 +1785,6 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: - ni = vap->iv_bss; if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; @@ -1817,12 +1820,16 @@ run_newstate(struct ieee80211vap *vap, e } if (vap->iv_opmode != IEEE80211_M_MONITOR) { + struct ieee80211_node *ni; + run_updateslot(ic->ic_ifp); run_enable_mrr(sc); run_set_txpreamble(sc); run_set_basicrates(sc); + ni = ieee80211_ref_node(vap->iv_bss); IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); run_set_bssid(sc, ni->ni_bssid); + ieee80211_free_node(ni); run_enable_tsf_sync(sc); /* enable automatic rate adaptation */ Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_uath.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1968,9 +1968,10 @@ uath_create_connection(struct uath_softc const struct ieee80211_rateset *rs; struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct uath_cmd_create_connection create; + ni = ieee80211_ref_node(vap->iv_bss); bzero(&create, sizeof create); create.connid = htobe32(connid); create.bssid = htobe32(0); @@ -1989,6 +1990,7 @@ uath_create_connection(struct uath_softc create.connattr.wlanmode = htobe32(WLAN_MODE_11g); else create.connattr.wlanmode = htobe32(WLAN_MODE_11b); + ieee80211_free_node(ni); return uath_cmd_write(sc, WDCMSG_CREATE_CONNECTION, &create, sizeof create, 0); @@ -2017,14 +2019,16 @@ uath_write_associd(struct uath_softc *sc { struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct uath_cmd_set_associd associd; + ni = ieee80211_ref_node(vap->iv_bss); bzero(&associd, sizeof associd); associd.defaultrateix = htobe32(1); /* XXX */ associd.associd = htobe32(ni->ni_associd); associd.timoffset = htobe32(0x3b); /* XXX */ IEEE80211_ADDR_COPY(associd.bssid, ni->ni_bssid); + ieee80211_free_node(ni); return uath_cmd_write(sc, WDCMSG_WRITE_ASSOCID, &associd, sizeof associd, 0); } @@ -2065,7 +2069,7 @@ uath_newstate(struct ieee80211vap *vap, { enum ieee80211_state ostate = vap->iv_state; int error; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct ieee80211com *ic = vap->iv_ic; struct uath_softc *sc = ic->ic_ifp->if_softc; struct uath_vap *uvp = UATH_VAP(vap); @@ -2078,6 +2082,7 @@ uath_newstate(struct ieee80211vap *vap, UATH_LOCK(sc); callout_stop(&sc->stat_ch); callout_stop(&sc->watchdog_ch); + ni = ieee80211_ref_node(vap->iv_bss); switch (nstate) { case IEEE80211_S_INIT: @@ -2150,6 +2155,7 @@ uath_newstate(struct ieee80211vap *vap, default: break; } + ieee80211_free_node(ni); UATH_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:42:13 2010 (r215493) @@ -652,7 +652,6 @@ upgt_set_macfilter(struct upgt_softc *sc struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = vap->iv_bss; struct upgt_data *data_cmd; struct upgt_lmac_mem *mem; struct upgt_lmac_filter *filter; @@ -707,6 +706,9 @@ upgt_set_macfilter(struct upgt_softc *sc filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); break; case IEEE80211_S_RUN: + struct ieee80211_node *ni; + + ni = ieee80211_ref_node(vap->iv_bss); /* XXX monitor mode isn't tested yet. */ if (vap->iv_opmode == IEEE80211_M_MONITOR) { filter->type = htole16(UPGT_FILTER_TYPE_MONITOR); @@ -730,6 +732,7 @@ upgt_set_macfilter(struct upgt_softc *sc filter->rxhw = htole32(sc->sc_eeprom_hwrx); filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); } + ieee80211_free_node(ni); break; default: device_printf(sc->sc_dev, Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_ural.c Fri Nov 19 01:42:13 2010 (r215493) @@ -711,7 +711,7 @@ ural_newstate(struct ieee80211vap *vap, break; case IEEE80211_S_RUN: - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { ural_update_slot(ic->ic_ifp); @@ -729,6 +729,7 @@ ural_newstate(struct ieee80211vap *vap, "could not allocate beacon\n"); RAL_UNLOCK(sc); IEEE80211_LOCK(ic); + ieee80211_free_node(ni); return (-1); } ieee80211_ref_node(ni); @@ -737,6 +738,7 @@ ural_newstate(struct ieee80211vap *vap, "could not send beacon\n"); RAL_UNLOCK(sc); IEEE80211_LOCK(ic); + ieee80211_free_node(ni); return (-1); } } @@ -754,7 +756,7 @@ ural_newstate(struct ieee80211vap *vap, tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) ural_ratectl_start(sc, ni); - + ieee80211_free_node(ni); break; default: @@ -2237,10 +2239,11 @@ ural_ratectl_task(void *arg, int pending struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; struct ural_softc *sc = ifp->if_softc; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; int ok, fail; int sum, retrycnt; + ni = ieee80211_ref_node(vap->iv_bss); RAL_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta)); @@ -2258,6 +2261,7 @@ ural_ratectl_task(void *arg, int pending usb_callout_reset(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp); RAL_UNLOCK(sc); + ieee80211_free_node(ni); } static int Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:42:13 2010 (r215493) @@ -1830,7 +1830,6 @@ urtw_tx_start(struct urtw_softc *sc, str static int urtw_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct ieee80211_node *ni = vap->iv_bss; struct ieee80211com *ic = vap->iv_ic; struct urtw_softc *sc = ic->ic_ifp->if_softc; struct urtw_vap *uvp = URTW_VAP(vap); @@ -1854,6 +1853,9 @@ urtw_newstate(struct ieee80211vap *vap, case IEEE80211_S_ASSOC: break; case IEEE80211_S_RUN: + struct ieee80211_node *ni; + + ni = ieee80211_ref_node(vap->iv_bss); /* setting bssid. */ urtw_write32_m(sc, URTW_BSSID, ((uint32_t *)ni->ni_bssid)[0]); urtw_write16_m(sc, URTW_BSSID + 4, @@ -1868,6 +1870,7 @@ urtw_newstate(struct ieee80211vap *vap, if (error != 0) device_printf(sc->sc_dev, "could not control LED (%d)\n", error); + ieee80211_free_node(ni); break; default: break; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:41:28 2010 (r215492) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Fri Nov 19 01:42:13 2010 (r215493) @@ -572,7 +572,6 @@ zyd_newstate(struct ieee80211vap *vap, e struct zyd_vap *zvp = ZYD_VAP(vap); struct ieee80211com *ic = vap->iv_ic; struct zyd_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; int error; DPRINTF(sc, ZYD_DEBUG_STATE, "%s: %s -> %s\n", __func__, @@ -586,7 +585,6 @@ zyd_newstate(struct ieee80211vap *vap, e zyd_set_chan(sc, ic->ic_curchan); break; case IEEE80211_S_RUN: - ni = vap->iv_bss; if (vap->iv_opmode == IEEE80211_M_MONITOR) break; @@ -598,7 +596,7 @@ zyd_newstate(struct ieee80211vap *vap, e /* make data LED blink upon Tx */ zyd_write32_m(sc, sc->sc_fwbase + ZYD_FW_LINK_STATUS, 1); - IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); + IEEE80211_ADDR_COPY(sc->sc_bssid, vap->iv_bss->ni_bssid); zyd_set_bssid(sc, sc->sc_bssid); break; default: From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:43:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABAD8106566B; Fri, 19 Nov 2010 01:43:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1128FC14; Fri, 19 Nov 2010 01:43:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1h8m0052594; Fri, 19 Nov 2010 01:43:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1h81s052592; Fri, 19 Nov 2010 01:43:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190143.oAJ1h81s052592@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215494 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:43:08 -0000 Author: thompsa Date: Fri Nov 19 01:43:08 2010 New Revision: 215494 URL: http://svn.freebsd.org/changeset/base/215494 Log: MFC r212128 Silence debug error by default. PR: usb/141212 Modified: stable/8/sys/dev/usb/input/ukbd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:42:13 2010 (r215493) +++ stable/8/sys/dev/usb/input/ukbd.c Fri Nov 19 01:43:08 2010 (r215494) @@ -727,7 +727,7 @@ ukbd_set_leds_callback(struct usb_xfer * break; default: /* Error */ - DPRINTFN(0, "error=%s\n", usbd_errstr(error)); + DPRINTFN(1, "error=%s\n", usbd_errstr(error)); break; } } From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:44:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069DD1065694; Fri, 19 Nov 2010 01:44:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9E628FC08; Fri, 19 Nov 2010 01:44: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 oAJ1iD9S052686; Fri, 19 Nov 2010 01:44:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1iDFT052684; Fri, 19 Nov 2010 01:44:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190144.oAJ1iDFT052684@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:44: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: r215495 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:44:14 -0000 Author: thompsa Date: Fri Nov 19 01:44:13 2010 New Revision: 215495 URL: http://svn.freebsd.org/changeset/base/215495 Log: MFC r212129 Add support for extra buttons on the Kensington Slimblade Trackball. Modified: stable/8/sys/dev/usb/input/ums.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:43:08 2010 (r215494) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:44:13 2010 (r215495) @@ -406,6 +406,7 @@ ums_hid_parse(struct ums_softc *sc, devi struct ums_info *info = &sc->sc_info[index]; uint32_t flags; uint8_t i; + uint8_t j; if (hid_locate(buf, len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, index, &info->sc_loc_x, &flags, &info->sc_iid_x)) { @@ -483,6 +484,17 @@ ums_hid_parse(struct ums_softc *sc, devi break; } } + + /* detect other buttons */ + + for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), + hid_input, index, &info->sc_loc_btn[i], NULL, + &info->sc_iid_btn[i])) { + break; + } + } + info->sc_buttons = i; if (i > sc->sc_buttons) From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:45:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32C9C106566B; Fri, 19 Nov 2010 01:45:35 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 212268FC18; Fri, 19 Nov 2010 01:45: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 oAJ1jZU0052780; Fri, 19 Nov 2010 01:45:35 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1jYIo052777; Fri, 19 Nov 2010 01:45:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190145.oAJ1jYIo052777@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215496 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:45:35 -0000 Author: thompsa Date: Fri Nov 19 01:45:34 2010 New Revision: 215496 URL: http://svn.freebsd.org/changeset/base/215496 Log: MFC r212130 Add GPIO programming for more PHY hardware. Submitted by: yongari Modified: stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_axereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:44:13 2010 (r215495) +++ stable/8/sys/dev/usb/net/if_axe.c Fri Nov 19 01:45:34 2010 (r215496) @@ -507,12 +507,19 @@ axe_get_phyno(struct axe_softc *sc, int return (phyno); } +#define AXE_GPIO_WRITE(x, y) do { \ + axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, (x), NULL); \ + uether_pause(ue, (y)); \ +} while (0) + static void axe_ax88178_init(struct axe_softc *sc) { - int gpio0 = 0, phymode = 0; - uint16_t eeprom; + struct usb_ether *ue; + int gpio0, phymode; + uint16_t eeprom, val; + ue = &sc->sc_ue; axe_cmd(sc, AXE_CMD_SROM_WR_ENABLE, 0, 0, NULL); /* XXX magic */ axe_cmd(sc, AXE_CMD_SROM_READ, 0, 0x0017, &eeprom); @@ -521,46 +528,89 @@ axe_ax88178_init(struct axe_softc *sc) /* if EEPROM is invalid we have to use to GPIO0 */ if (eeprom == 0xffff) { - phymode = 0; + phymode = AXE_PHY_MODE_MARVELL; gpio0 = 1; } else { - phymode = eeprom & 7; + phymode = eeprom & 0x7f; gpio0 = (eeprom & 0x80) ? 0 : 1; } - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x008c, NULL); - uether_pause(&sc->sc_ue, hz / 16); - - if ((eeprom >> 8) != 0x01) { - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); - uether_pause(&sc->sc_ue, hz / 32); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x001c, NULL); - uether_pause(&sc->sc_ue, hz / 3); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x003c, NULL); - uether_pause(&sc->sc_ue, hz / 32); - } else { - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x0004, NULL); - uether_pause(&sc->sc_ue, hz / 32); - - axe_cmd(sc, AXE_CMD_WRITE_GPIO, 0, 0x000c, NULL); - uether_pause(&sc->sc_ue, hz / 32); + if (bootverbose) + device_printf(sc->sc_ue.ue_dev, "EEPROM data : 0x%04x\n", + eeprom); + /* Program GPIOs depending on PHY hardware. */ + switch (phymode) { + case AXE_PHY_MODE_MARVELL: + if (gpio0 == 1) { + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO0_EN, + hz / 32); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2 | AXE_GPIO2_EN, + hz / 32); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(AXE_GPIO0_EN | AXE_GPIO2 | AXE_GPIO2_EN, + hz / 32); + } else + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + break; + case AXE_PHY_MODE_CICADA: + if (gpio0 == 1) + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO0 | + AXE_GPIO0_EN, hz / 32); + else + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + break; + case AXE_PHY_MODE_AGERE: + AXE_GPIO_WRITE(AXE_GPIO_RELOAD_EEPROM | AXE_GPIO1 | + AXE_GPIO1_EN, hz / 32); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2 | + AXE_GPIO2_EN, hz / 32); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(AXE_GPIO1 | AXE_GPIO1_EN | AXE_GPIO2 | + AXE_GPIO2_EN, hz / 32); + break; + case AXE_PHY_MODE_REALTEK_8211CL: + case AXE_PHY_MODE_REALTEK_8211BN: + case AXE_PHY_MODE_REALTEK_8251CL: + val = gpio0 == 1 ? AXE_GPIO0 | AXE_GPIO0_EN : + AXE_GPIO1 | AXE_GPIO1_EN; + AXE_GPIO_WRITE(val, hz / 32); + AXE_GPIO_WRITE(val | AXE_GPIO2 | AXE_GPIO2_EN, hz / 32); + AXE_GPIO_WRITE(val | AXE_GPIO2_EN, hz / 4); + AXE_GPIO_WRITE(val | AXE_GPIO2 | AXE_GPIO2_EN, hz / 32); + if (phymode == AXE_PHY_MODE_REALTEK_8211CL) { + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x1F, 0x0005); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x0C, 0x0000); + val = axe_miibus_readreg(ue->ue_dev, sc->sc_phyno, + 0x0001); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x01, val | 0x0080); + axe_miibus_writereg(ue->ue_dev, sc->sc_phyno, + 0x1F, 0x0000); + } + break; + default: + /* Unknown PHY model or no need to program GPIOs. */ + break; } /* soft reset */ axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_CLEAR, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); axe_cmd(sc, AXE_CMD_SW_RESET_REG, 0, AXE_SW_RESET_PRL | AXE_178_RESET_MAGIC, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); /* Enable MII/GMII/RGMII interface to work with external PHY. */ axe_cmd(sc, AXE_CMD_SW_PHY_SELECT, 0, 0, NULL); - uether_pause(&sc->sc_ue, hz / 4); + uether_pause(ue, hz / 4); axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, 0, NULL); } +#undef AXE_GPIO_WRITE static void axe_ax88772_init(struct axe_softc *sc) @@ -629,10 +679,9 @@ axe_attach_post(struct usb_ether *ue) * Load PHY indexes first. Needed by axe_xxx_init(). */ axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, sc->sc_phyaddrs); -#if 1 - device_printf(sc->sc_ue.ue_dev, "PHYADDR 0x%02x:0x%02x\n", - sc->sc_phyaddrs[0], sc->sc_phyaddrs[1]); -#endif + if (bootverbose) + device_printf(sc->sc_ue.ue_dev, "PHYADDR 0x%02x:0x%02x\n", + sc->sc_phyaddrs[0], sc->sc_phyaddrs[1]); sc->sc_phyno = axe_get_phyno(sc, AXE_PHY_SEL_PRI); if (sc->sc_phyno == -1) sc->sc_phyno = axe_get_phyno(sc, AXE_PHY_SEL_SEC); Modified: stable/8/sys/dev/usb/net/if_axereg.h ============================================================================== --- stable/8/sys/dev/usb/net/if_axereg.h Fri Nov 19 01:44:13 2010 (r215495) +++ stable/8/sys/dev/usb/net/if_axereg.h Fri Nov 19 01:45:34 2010 (r215496) @@ -153,6 +153,25 @@ #define AXE_772_PHY_NO_EPHY 0x10 /* Embedded 10/100 PHY of AX88772 */ +#define AXE_GPIO0_EN 0x01 +#define AXE_GPIO0 0x02 +#define AXE_GPIO1_EN 0x04 +#define AXE_GPIO1 0x08 +#define AXE_GPIO2_EN 0x10 +#define AXE_GPIO2 0x20 +#define AXE_GPIO_RELOAD_EEPROM 0x80 + +#define AXE_PHY_MODE_MARVELL 0x00 +#define AXE_PHY_MODE_CICADA 0x01 +#define AXE_PHY_MODE_AGERE 0x02 +#define AXE_PHY_MODE_CICADA_V2 0x05 +#define AXE_PHY_MODE_AGERE_GMII 0x06 +#define AXE_PHY_MODE_CICADA_V2_ASIX 0x09 +#define AXE_PHY_MODE_REALTEK_8211CL 0x0C +#define AXE_PHY_MODE_REALTEK_8211BN 0x0D +#define AXE_PHY_MODE_REALTEK_8251CL 0x0E +#define AXE_PHY_MODE_ATTANSIC 0x40 + #define AXE_BULK_BUF_SIZE 16384 /* bytes */ #define AXE_CTL_READ 0x01 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:46:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89B9106564A; Fri, 19 Nov 2010 01:46:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD9348FC19; Fri, 19 Nov 2010 01:46: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 oAJ1kXpj052852; Fri, 19 Nov 2010 01:46:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1kXcA052849; Fri, 19 Nov 2010 01:46:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190146.oAJ1kXcA052849@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215497 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:46:34 -0000 Author: thompsa Date: Fri Nov 19 01:46:33 2010 New Revision: 215497 URL: http://svn.freebsd.org/changeset/base/215497 Log: MFC r212131 Fix build breakage from r212127 Modified: stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:45:34 2010 (r215496) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Fri Nov 19 01:46:33 2010 (r215497) @@ -652,6 +652,7 @@ upgt_set_macfilter(struct upgt_softc *sc struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211_node *ni; struct upgt_data *data_cmd; struct upgt_lmac_mem *mem; struct upgt_lmac_filter *filter; @@ -706,8 +707,6 @@ upgt_set_macfilter(struct upgt_softc *sc filter->unknown3 = htole16(UPGT_FILTER_UNKNOWN3); break; case IEEE80211_S_RUN: - struct ieee80211_node *ni; - ni = ieee80211_ref_node(vap->iv_bss); /* XXX monitor mode isn't tested yet. */ if (vap->iv_opmode == IEEE80211_M_MONITOR) { Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:45:34 2010 (r215496) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Fri Nov 19 01:46:33 2010 (r215497) @@ -1833,6 +1833,7 @@ urtw_newstate(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct urtw_softc *sc = ic->ic_ifp->if_softc; struct urtw_vap *uvp = URTW_VAP(vap); + struct ieee80211_node *ni; usb_error_t error = 0; DPRINTF(sc, URTW_DEBUG_STATE, "%s: %s -> %s\n", __func__, @@ -1853,8 +1854,6 @@ urtw_newstate(struct ieee80211vap *vap, case IEEE80211_S_ASSOC: break; case IEEE80211_S_RUN: - struct ieee80211_node *ni; - ni = ieee80211_ref_node(vap->iv_bss); /* setting bssid. */ urtw_write32_m(sc, URTW_BSSID, ((uint32_t *)ni->ni_bssid)[0]); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:47:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BCCA1065674; Fri, 19 Nov 2010 01:47:09 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B37B8FC14; Fri, 19 Nov 2010 01:47: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 oAJ1l9EY052912; Fri, 19 Nov 2010 01:47:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1l9UC052910; Fri, 19 Nov 2010 01:47:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190147.oAJ1l9UC052910@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215498 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:47:09 -0000 Author: thompsa Date: Fri Nov 19 01:47:09 2010 New Revision: 215498 URL: http://svn.freebsd.org/changeset/base/215498 Log: MFC r212132 Fix UMS_BUTTON_MAX define name Modified: stable/8/sys/dev/usb/input/ums.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:46:33 2010 (r215497) +++ stable/8/sys/dev/usb/input/ums.c Fri Nov 19 01:47:09 2010 (r215498) @@ -487,7 +487,7 @@ ums_hid_parse(struct ums_softc *sc, devi /* detect other buttons */ - for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + for (j = 0; (i < UMS_BUTTON_MAX) && (j < 2); i++, j++) { if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), hid_input, index, &info->sc_loc_btn[i], NULL, &info->sc_iid_btn[i])) { From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:47:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213241065672; Fri, 19 Nov 2010 01:47:47 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 108FD8FC13; Fri, 19 Nov 2010 01:47: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 oAJ1lkWV052970; Fri, 19 Nov 2010 01:47:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1lk1n052968; Fri, 19 Nov 2010 01:47:46 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190147.oAJ1lk1n052968@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215499 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:47:47 -0000 Author: thompsa Date: Fri Nov 19 01:47:46 2010 New Revision: 215499 URL: http://svn.freebsd.org/changeset/base/215499 Log: MFC r212133 Fix setting of the rx_max and tx_max variables. If the expected buffer size is greater than 65535 bytes then the CDC driver might not work as expected, which is not likely with the existing USB speeds. Modified: stable/8/sys/dev/usb/net/if_cdce.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_cdce.c ============================================================================== --- stable/8/sys/dev/usb/net/if_cdce.c Fri Nov 19 01:47:09 2010 (r215498) +++ stable/8/sys/dev/usb/net/if_cdce.c Fri Nov 19 01:47:46 2010 (r215499) @@ -312,14 +312,14 @@ cdce_ncm_init(struct cdce_softc *sc) /* Read correct set of parameters according to device mode */ if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { - sc->sc_ncm.rx_max = UGETW(temp.dwNtbInMaxSize); - sc->sc_ncm.tx_max = UGETW(temp.dwNtbOutMaxSize); + sc->sc_ncm.rx_max = UGETDW(temp.dwNtbInMaxSize); + sc->sc_ncm.tx_max = UGETDW(temp.dwNtbOutMaxSize); sc->sc_ncm.tx_remainder = UGETW(temp.wNdpOutPayloadRemainder); sc->sc_ncm.tx_modulus = UGETW(temp.wNdpOutDivisor); sc->sc_ncm.tx_struct_align = UGETW(temp.wNdpOutAlignment); } else { - sc->sc_ncm.rx_max = UGETW(temp.dwNtbOutMaxSize); - sc->sc_ncm.tx_max = UGETW(temp.dwNtbInMaxSize); + sc->sc_ncm.rx_max = UGETDW(temp.dwNtbOutMaxSize); + sc->sc_ncm.tx_max = UGETDW(temp.dwNtbInMaxSize); sc->sc_ncm.tx_remainder = UGETW(temp.wNdpInPayloadRemainder); sc->sc_ncm.tx_modulus = UGETW(temp.wNdpInDivisor); sc->sc_ncm.tx_struct_align = UGETW(temp.wNdpInAlignment); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:48:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5A7106564A; Fri, 19 Nov 2010 01:48:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2C48FC1C; Fri, 19 Nov 2010 01:48: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 oAJ1mlra053049; Fri, 19 Nov 2010 01:48:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1mlBb053041; Fri, 19 Nov 2010 01:48:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190148.oAJ1mlBb053041@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215500 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:48:48 -0000 Author: thompsa Date: Fri Nov 19 01:48:47 2010 New Revision: 215500 URL: http://svn.freebsd.org/changeset/base/215500 Log: MFC r212134 Change argument for usbd_get_dma_delay() from USB bus to USB device, some embedded hardware needs to know exactly which device is in question before it exactly can decide the required delay. Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/usb_controller.h stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/usb_transfer.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/ehci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -3804,7 +3804,7 @@ done: } static void -ehci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +ehci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until the hardware has finished any possible use of Modified: stable/8/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/ohci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -2630,7 +2630,7 @@ ohci_xfer_unsetup(struct usb_xfer *xfer) } static void -ohci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +ohci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until hardware has finished any possible use of the Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/controller/uhci.c Fri Nov 19 01:48:47 2010 (r215500) @@ -3084,7 +3084,7 @@ uhci_xfer_unsetup(struct usb_xfer *xfer) } static void -uhci_get_dma_delay(struct usb_bus *bus, uint32_t *pus) +uhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) { /* * Wait until hardware has finished any possible use of the Modified: stable/8/sys/dev/usb/usb_controller.h ============================================================================== --- stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:48:47 2010 (r215500) @@ -62,7 +62,7 @@ struct usb_bus_methods { struct usb_endpoint_descriptor *, struct usb_endpoint *); void (*xfer_setup) (struct usb_setup_params *); void (*xfer_unsetup) (struct usb_xfer *); - void (*get_dma_delay) (struct usb_bus *, uint32_t *); + void (*get_dma_delay) (struct usb_device *, uint32_t *); void (*device_suspend) (struct usb_device *); void (*device_resume) (struct usb_device *); void (*set_hw_power) (struct usb_bus *); Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:48:47 2010 (r215500) @@ -2105,8 +2105,9 @@ repeat: (udev->bus->methods->device_suspend) (udev); /* do DMA delay */ - temp = usbd_get_dma_delay(udev->bus); - usb_pause_mtx(NULL, USB_MS_TO_TICKS(temp)); + temp = usbd_get_dma_delay(udev); + if (temp != 0) + usb_pause_mtx(NULL, USB_MS_TO_TICKS(temp)); } /* suspend current port */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_transfer.c Fri Nov 19 01:48:47 2010 (r215500) @@ -158,12 +158,16 @@ usbd_update_max_frame_size(struct usb_xf * Else: milliseconds of DMA delay *------------------------------------------------------------------------*/ usb_timeout_t -usbd_get_dma_delay(struct usb_bus *bus) +usbd_get_dma_delay(struct usb_device *udev) { - uint32_t temp = 0; + struct usb_bus_methods *mtod; + uint32_t temp; - if (bus->methods->get_dma_delay) { - (bus->methods->get_dma_delay) (bus, &temp); + mtod = udev->bus->methods; + temp = 0; + + if (mtod->get_dma_delay) { + (mtod->get_dma_delay) (udev, &temp); /* * Round up and convert to milliseconds. Note that we use * 1024 milliseconds per second. to save a division. @@ -1094,9 +1098,11 @@ usbd_transfer_unsetup_sub(struct usb_xfe if (needs_delay) { usb_timeout_t temp; - temp = usbd_get_dma_delay(info->bus); - usb_pause_mtx(&info->bus->bus_mtx, - USB_MS_TO_TICKS(temp)); + temp = usbd_get_dma_delay(info->udev); + if (temp != 0) { + usb_pause_mtx(&info->bus->bus_mtx, + USB_MS_TO_TICKS(temp)); + } } /* make sure that our done messages are not queued anywhere */ @@ -2577,7 +2583,7 @@ usbd_callback_wrapper_sub(struct usb_xfe /* we can not cancel this delay */ xfer->flags_int.can_cancel_immed = 0; - temp = usbd_get_dma_delay(xfer->xroot->bus); + temp = usbd_get_dma_delay(xfer->xroot->udev); DPRINTFN(3, "DMA delay, %u ms, " "on %p\n", temp, xfer); Modified: stable/8/sys/dev/usb/usb_transfer.h ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.h Fri Nov 19 01:47:46 2010 (r215499) +++ stable/8/sys/dev/usb/usb_transfer.h Fri Nov 19 01:48:47 2010 (r215500) @@ -131,7 +131,7 @@ usb_callback_t usb_handle_request_callba usb_callback_t usb_do_clear_stall_callback; void usbd_transfer_timeout_ms(struct usb_xfer *xfer, void (*cb) (void *arg), usb_timeout_t ms); -usb_timeout_t usbd_get_dma_delay(struct usb_bus *bus); +usb_timeout_t usbd_get_dma_delay(struct usb_device *udev); void usbd_transfer_power_ref(struct usb_xfer *xfer, int val); #endif /* _USB_TRANSFER_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:49:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2765F106564A; Fri, 19 Nov 2010 01:49:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 164C68FC1A; Fri, 19 Nov 2010 01:49: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 oAJ1nMbL053114; Fri, 19 Nov 2010 01:49:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1nMZY053108; Fri, 19 Nov 2010 01:49:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190149.oAJ1nMZY053108@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215501 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:49:23 -0000 Author: thompsa Date: Fri Nov 19 01:49:22 2010 New Revision: 215501 URL: http://svn.freebsd.org/changeset/base/215501 Log: MFC r212135 Add support for power mode filtering as some USB hardware does not support power saving. Modified: stable/8/sys/dev/usb/usb_controller.h stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_controller.h ============================================================================== --- stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_controller.h Fri Nov 19 01:49:22 2010 (r215501) @@ -102,6 +102,10 @@ struct usb_bus_methods { /* Optional transfer polling support */ void (*xfer_poll) (struct usb_bus *); + + /* Optional fixed power mode support */ + + void (*get_power_mode) (struct usb_device *udev, int8_t *pmode); }; /* Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:49:22 2010 (r215501) @@ -1524,7 +1524,7 @@ usb_alloc_device(device_t parent_dev, st * of USB devices out there that do not work very well with * automatic suspend and resume! */ - udev->power_mode = USB_POWER_MODE_ON; + udev->power_mode = usbd_filter_power_mode(udev, USB_POWER_MODE_ON); udev->pwr_save.last_xfer_time = ticks; /* we are not ready yet */ udev->refcount = 1; Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:49:22 2010 (r215501) @@ -1791,10 +1791,9 @@ ugen_get_power_mode(struct usb_fifo *f) { struct usb_device *udev = f->udev; - if ((udev == NULL) || - (udev->parent_hub == NULL)) { + if (udev == NULL) return (USB_POWER_MODE_ON); - } + return (udev->power_mode); } Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:49:22 2010 (r215501) @@ -2133,12 +2133,39 @@ usbd_set_power_mode(struct usb_device *u { /* filter input argument */ if ((power_mode != USB_POWER_MODE_ON) && - (power_mode != USB_POWER_MODE_OFF)) { + (power_mode != USB_POWER_MODE_OFF)) power_mode = USB_POWER_MODE_SAVE; - } + + power_mode = usbd_filter_power_mode(udev, power_mode); + udev->power_mode = power_mode; /* update copy of power mode */ #if USB_HAVE_POWERD usb_bus_power_update(udev->bus); #endif } + +/*------------------------------------------------------------------------* + * usbd_filter_power_mode + * + * This function filters the power mode based on hardware requirements. + *------------------------------------------------------------------------*/ +uint8_t +usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode) +{ + struct usb_bus_methods *mtod; + int8_t temp; + + mtod = udev->bus->methods; + temp = -1; + + if (mtod->get_power_mode != NULL) + (mtod->get_power_mode) (udev, &temp); + + /* check if we should not filter */ + if (temp < 0) + return (power_mode); + + /* use fixed power mode given by hardware driver */ + return (temp); +} Modified: stable/8/sys/dev/usb/usbdi.h ============================================================================== --- stable/8/sys/dev/usb/usbdi.h Fri Nov 19 01:48:47 2010 (r215500) +++ stable/8/sys/dev/usb/usbdi.h Fri Nov 19 01:49:22 2010 (r215501) @@ -479,6 +479,7 @@ void usbd_set_parent_iface(struct usb_de uint8_t usbd_get_bus_index(struct usb_device *udev); uint8_t usbd_get_device_index(struct usb_device *udev); void usbd_set_power_mode(struct usb_device *udev, uint8_t power_mode); +uint8_t usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode); uint8_t usbd_device_attached(struct usb_device *udev); void usbd_xfer_status(struct usb_xfer *xfer, int *actlen, int *sumlen, From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:50:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 352FC1065670; Fri, 19 Nov 2010 01:50:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22B798FC17; Fri, 19 Nov 2010 01:50: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 oAJ1oNvC053194; Fri, 19 Nov 2010 01:50:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1oMid053186; Fri, 19 Nov 2010 01:50:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190150.oAJ1oMid053186@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215502 - in stable/8/sys/dev/usb: . net serial storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:50:23 -0000 Author: thompsa Date: Fri Nov 19 01:50:22 2010 New Revision: 215502 URL: http://svn.freebsd.org/changeset/base/215502 Log: MFC r212136 Reduce the need to accesss struct usb_device by providing functions to access the product, manufacturer and serial strings. Modified: stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi_util.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/net/uhso.c Fri Nov 19 01:50:22 2010 (r215502) @@ -62,13 +62,11 @@ __FBSDID("$FreeBSD$"); #define USB_DEBUG_VAR uhso_debug #include #include -#include #include -#include -#include -#include #include +#include + struct uhso_tty { struct uhso_softc *ht_sc; struct usb_xfer *ht_xfer[3]; @@ -513,7 +511,7 @@ uhso_probe(device_t self) return (ENXIO); if (uaa->info.bConfigIndex != 0) return (ENXIO); - if (uaa->device->ddesc.bDeviceClass != 0xff) + if (uaa->info.bDeviceClass != 0xff) return (ENXIO); error = usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa); @@ -603,8 +601,9 @@ uhso_attach(device_t self) /* Announce device */ device_printf(self, "<%s port> at <%s %s> on %s\n", uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)], - uaa->device->manufacturer, uaa->device->product, - device_get_nameunit(uaa->device->bus->bdev)); + usb_get_manufacturer(uaa->device), + usb_get_product(uaa->device), + device_get_nameunit(device_get_parent(self))); if (sc->sc_ttys > 0) { SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", Modified: stable/8/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/serial/ubser.c Fri Nov 19 01:50:22 2010 (r215502) @@ -104,7 +104,6 @@ __FBSDID("$FreeBSD$"); #define USB_DEBUG_VAR ubser_debug #include #include -#include #include @@ -226,7 +225,7 @@ ubser_probe(device_t dev) return (ENXIO); } /* check if this is a BWCT vendor specific ubser interface */ - if ((strcmp(uaa->device->manufacturer, "BWCT") == 0) && + if ((strcmp(usb_get_manufacturer(uaa->device), "BWCT") == 0) && (uaa->info.bInterfaceClass == 0xff) && (uaa->info.bInterfaceSubClass == 0x00)) return (0); Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/storage/umass.c Fri Nov 19 01:50:22 2010 (r215502) @@ -124,7 +124,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "usbdevs.h" #include @@ -2304,23 +2304,24 @@ umass_cam_action(struct cam_sim *sim, un if (umass_std_transform(sc, ccb, cmd, ccb->csio.cdb_len)) { if (sc->sc_transfer.cmd_data[0] == INQUIRY) { + const char *pserial; + + pserial = usb_get_serial(sc->sc_udev); /* * Umass devices don't generally report their serial numbers * in the usual SCSI way. Emulate it here. */ if ((sc->sc_transfer.cmd_data[1] & SI_EVPD) && - sc->sc_transfer.cmd_data[2] == SVPD_UNIT_SERIAL_NUMBER && - sc->sc_udev != NULL && - sc->sc_udev->serial != NULL && - sc->sc_udev->serial[0] != '\0') { + (sc->sc_transfer.cmd_data[2] == SVPD_UNIT_SERIAL_NUMBER) && + (pserial[0] != '\0')) { struct scsi_vpd_unit_serial_number *vpd_serial; vpd_serial = (struct scsi_vpd_unit_serial_number *)ccb->csio.data_ptr; - vpd_serial->length = strlen(sc->sc_udev->serial); + vpd_serial->length = strlen(pserial); if (vpd_serial->length > sizeof(vpd_serial->serial_num)) vpd_serial->length = sizeof(vpd_serial->serial_num); - memcpy(vpd_serial->serial_num, sc->sc_udev->serial, vpd_serial->length); + memcpy(vpd_serial->serial_num, pserial, vpd_serial->length); ccb->csio.scsi_status = SCSI_STATUS_OK; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -2553,9 +2554,7 @@ umass_cam_cb(struct umass_softc *sc, uni sc->sc_transfer.cmd_data[0] == INQUIRY && (sc->sc_transfer.cmd_data[1] & SI_EVPD) && sc->sc_transfer.cmd_data[2] == SVPD_SUPPORTED_PAGE_LIST && - sc->sc_udev != NULL && - sc->sc_udev->serial != NULL && - sc->sc_udev->serial[0] != '\0') { + (usb_get_serial(sc->sc_udev)[0] != '\0')) { struct ccb_scsiio *csio; struct scsi_vpd_supported_page_list *page_list; Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_device.c Fri Nov 19 01:50:22 2010 (r215502) @@ -136,6 +136,24 @@ usb_statestr(enum usb_dev_state state) return ((state < USB_STATE_MAX) ? statestr[state] : "UNKNOWN"); } +const char * +usb_get_manufacturer(struct usb_device *udev) +{ + return (udev->manufacturer ? udev->manufacturer : "Unknown"); +} + +const char * +usb_get_product(struct usb_device *udev) +{ + return (udev->product ? udev->product : ""); +} + +const char * +usb_get_serial(struct usb_device *udev) +{ + return (udev->serial ? udev->serial : ""); +} + /*------------------------------------------------------------------------* * usbd_get_ep_by_addr * @@ -1833,7 +1851,8 @@ config_done: udev->ugen_symlink = usb_alloc_symlink(udev->ugen_name); /* Announce device */ - printf("%s: <%s> at %s\n", udev->ugen_name, udev->manufacturer, + printf("%s: <%s> at %s\n", udev->ugen_name, + usb_get_manufacturer(udev), device_get_nameunit(udev->bus->bdev)); usb_notify_addq("ATTACH", udev); @@ -1985,7 +2004,7 @@ usb_free_device(struct usb_device *udev, usb_notify_addq("DETACH", udev); printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name, - udev->manufacturer, device_get_nameunit(bus->bdev)); + usb_get_manufacturer(udev), device_get_nameunit(bus->bdev)); /* Destroy UGEN symlink, if any */ if (udev->ugen_symlink) { @@ -2150,7 +2169,8 @@ usb_devinfo(struct usb_device *udev, cha if (udd->bDeviceClass != 0xFF) { snprintf(dst_ptr, dst_len, "%s %s, class %d/%d, rev %x.%02x/" "%x.%02x, addr %d", - udev->manufacturer, udev->product, + usb_get_manufacturer(udev), + usb_get_product(udev), udd->bDeviceClass, udd->bDeviceSubClass, (bcdUSB >> 8), bcdUSB & 0xFF, (bcdDevice >> 8), bcdDevice & 0xFF, @@ -2158,7 +2178,8 @@ usb_devinfo(struct usb_device *udev, cha } else { snprintf(dst_ptr, dst_len, "%s %s, rev %x.%02x/" "%x.%02x, addr %d", - udev->manufacturer, udev->product, + usb_get_manufacturer(udev), + usb_get_product(udev), (bcdUSB >> 8), bcdUSB & 0xFF, (bcdDevice >> 8), bcdDevice & 0xFF, udev->address); @@ -2397,7 +2418,7 @@ usb_notify_addq_compat(const char *type, UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), udev->port_no, udev->parent_hub != NULL ? @@ -2437,7 +2458,7 @@ usb_notify_addq(const char *type, struct UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), (udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device", udev->port_no, @@ -2476,7 +2497,7 @@ usb_notify_addq(const char *type, struct UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, - udev->serial, + usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), (udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device", iface->idesc->bInterfaceNumber, Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_generic.c Fri Nov 19 01:50:22 2010 (r215502) @@ -825,9 +825,9 @@ usb_gen_fill_deviceinfo(struct usb_fifo di->udi_bus = device_get_unit(udev->bus->bdev); di->udi_addr = udev->address; di->udi_index = udev->device_index; - strlcpy(di->udi_serial, udev->serial, sizeof(di->udi_serial)); - strlcpy(di->udi_vendor, udev->manufacturer, sizeof(di->udi_vendor)); - strlcpy(di->udi_product, udev->product, sizeof(di->udi_product)); + strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial)); + strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor)); + strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product)); usb_printbcd(di->udi_release, sizeof(di->udi_release), UGETW(udev->ddesc.bcdDevice)); di->udi_vendorNo = UGETW(udev->ddesc.idVendor); Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usb_hub.c Fri Nov 19 01:50:22 2010 (r215502) @@ -53,6 +53,7 @@ #include #include #include +#include #define USB_DEBUG_VAR uhub_debug @@ -1059,7 +1060,7 @@ uhub_child_pnpinfo_string(device_t paren UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, res.udev->ddesc.bDeviceSubClass, - res.udev->serial, + usb_get_serial(res.udev), UGETW(res.udev->ddesc.bcdDevice), iface->idesc->bInterfaceClass, iface->idesc->bInterfaceSubClass); Modified: stable/8/sys/dev/usb/usbdi_util.h ============================================================================== --- stable/8/sys/dev/usb/usbdi_util.h Fri Nov 19 01:49:22 2010 (r215501) +++ stable/8/sys/dev/usb/usbdi_util.h Fri Nov 19 01:50:22 2010 (r215502) @@ -78,4 +78,11 @@ usb_error_t usbd_req_set_protocol(struct usb_error_t usbd_req_set_report(struct usb_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id); + +/* The following functions will not return NULL strings. */ + +const char *usb_get_manufacturer(struct usb_device *); +const char *usb_get_product(struct usb_device *); +const char *usb_get_serial(struct usb_device *); + #endif /* _USB_USBDI_UTIL_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:50:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0010810656AD; Fri, 19 Nov 2010 01:50:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C88D78FC16; Fri, 19 Nov 2010 01:50: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 oAJ1ou1a053249; Fri, 19 Nov 2010 01:50:56 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ouQI053247; Fri, 19 Nov 2010 01:50:56 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190150.oAJ1ouQI053247@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:50: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: r215503 - stable/8/sys/dev/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: Fri, 19 Nov 2010 01:50:57 -0000 Author: thompsa Date: Fri Nov 19 01:50:56 2010 New Revision: 215503 URL: http://svn.freebsd.org/changeset/base/215503 Log: MFC r212830 Cleanup white space and typos. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:22 2010 (r215502) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:56 2010 (r215503) @@ -495,7 +495,7 @@ vendor GEOCAST 0x0a79 Geocast Network S vendor IDQUANTIQUE 0x0aba id Quantique vendor ZYDAS 0x0ace Zydas Technology Corporation vendor NEODIO 0x0aec Neodio -vendor OPTION 0x0af0 Option N.V: +vendor OPTION 0x0af0 Option N.V. vendor ASUS 0x0b05 ASUSTeK Computer vendor TODOS 0x0b0c Todos Data System vendor SIIG2 0x0b39 SIIG @@ -1451,7 +1451,7 @@ product EDIMAX EW7718 0x7718 EW-7718 /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel product EGALAX TPANEL2 0x0002 Touch Panel -product EGALAX2 TPANEL 0x0001 Touch Panel +product EGALAX2 TPANEL 0x0001 Touch Panel /* Eicon Networks */ product EICON DIVA852 0x4905 Diva 852 ISDN TA @@ -2104,7 +2104,7 @@ product MELCO LUATX1 0x0001 LUA-TX Ethe product MELCO LUATX5 0x0005 LUA-TX Ethernet product MELCO LUA2TX5 0x0009 LUA2-TX Ethernet product MELCO LUAKTX 0x0012 LUA-KTX Ethernet -product MELCO DUBPXXG 0x001c USB-IDE Bridge: DUB-PxxG +product MELCO DUBPXXG 0x001c DUB-PxxG product MELCO LUAU2KTX 0x003d LUA-U2-KTX Ethernet product MELCO KG54YB 0x005e WLI-U2-KG54-YB WLAN product MELCO KG54 0x0066 WLI-U2-KG54 WLAN @@ -2465,7 +2465,7 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP /* PARA Industrial products */ product PARA RT3070 0x8888 RT3070 - + /* Pegatron products */ product PEGATRON RT2870 0x0002 RT2870 product PEGATRON RT3070 0x000c RT3070 @@ -2752,7 +2752,7 @@ product SAGEM XG76NA 0x0062 XG-76NA product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player -product SAMSUNG I500 0x6601 I500 Palm USB Phone +product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle product SAMSUNG2 RT2870_1 0x2018 RT2870 @@ -3382,7 +3382,7 @@ product ZOOM 2986L 0x9700 2986L Fax mod product ZORAN EX20DSC 0x4343 Digital Camera EX-20 DSC /* Zydas Technology Corporation products */ -product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg +product ZYDAS ZD1211 0x1211 ZD1211 WLAN abg product ZYDAS ZD1211B 0x1215 ZD1211B /* ZyXEL Communication Co. products */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:51:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07BD21065696; Fri, 19 Nov 2010 01:51:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EADF68FC19; Fri, 19 Nov 2010 01:51: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 oAJ1pp2F053317; Fri, 19 Nov 2010 01:51:51 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1ppmq053314; Fri, 19 Nov 2010 01:51:51 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190151.oAJ1ppmq053314@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:51: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: r215504 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:51:52 -0000 Author: thompsa Date: Fri Nov 19 01:51:51 2010 New Revision: 215504 URL: http://svn.freebsd.org/changeset/base/215504 Log: MFC r215326 Add a special INIT product ID used by some models of the HUAWEI K3765 datacard. After ejecting this device, it reappears using the normal K3765 ID. It does not switch automatically Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:50:56 2010 (r215503) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:51:51 2010 (r215504) @@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:50:56 2010 (r215503) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:51:51 2010 (r215504) @@ -1850,6 +1850,7 @@ product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI E14AC 0x14ac 3G modem +product HUAWEI K3765_INIT 0x1520 HUAWEI Mobile K3765 Initial /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:52:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9478C1065672; Fri, 19 Nov 2010 01:52:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 839E68FC1D; Fri, 19 Nov 2010 01:52: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 oAJ1qY8M053384; Fri, 19 Nov 2010 01:52:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1qYbX053381; Fri, 19 Nov 2010 01:52:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190152.oAJ1qYbX053381@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215505 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:52:34 -0000 Author: thompsa Date: Fri Nov 19 01:52:34 2010 New Revision: 215505 URL: http://svn.freebsd.org/changeset/base/215505 Log: MFC r215330 Add the Sierra MC8700. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:51:51 2010 (r215504) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Nov 19 01:52:34 2010 (r215505) @@ -453,6 +453,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), U3G_DEV(SIERRA, MC8755_3, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:51:51 2010 (r215504) +++ stable/8/sys/dev/usb/usbdevs Fri Nov 19 01:52:34 2010 (r215505) @@ -2895,6 +2895,7 @@ product SIERRA C888 0x6890 C888 product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 +product SIERRA MC8700 0x68A3 MC8700 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 01:58:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F23FC1065670; Fri, 19 Nov 2010 01:58:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E18D68FC20; Fri, 19 Nov 2010 01:58: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 oAJ1wBKq053652; Fri, 19 Nov 2010 01:58:11 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1wBMN053650; Fri, 19 Nov 2010 01:58:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190158.oAJ1wBMN053650@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215506 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:58:12 -0000 Author: thompsa Date: Fri Nov 19 01:58:11 2010 New Revision: 215506 URL: http://svn.freebsd.org/changeset/base/215506 Log: MFC r207768 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console spam. Modified: stable/8/sys/dev/usb/wlan/if_rum.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:52:34 2010 (r215505) +++ stable/8/sys/dev/usb/wlan/if_rum.c Fri Nov 19 01:58:11 2010 (r215506) @@ -194,6 +194,7 @@ static void rum_enable_tsf(struct rum_s static void rum_update_slot(struct ifnet *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); +static void rum_update_mcast(struct ifnet *); static void rum_update_promisc(struct ifnet *); static void rum_setpromisc(struct rum_softc *); static const char *rum_get_rf(int); @@ -512,6 +513,7 @@ rum_attach(device_t self) ic->ic_vap_create = rum_vap_create; ic->ic_vap_delete = rum_vap_delete; + ic->ic_update_mcast = rum_update_mcast; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), @@ -1814,6 +1816,17 @@ rum_update_promisc(struct ifnet *ifp) RUM_UNLOCK(sc); } +static void +rum_update_mcast(struct ifnet *ifp) +{ + static int warning_printed; + + if (warning_printed == 0) { + if_printf(ifp, "need to implement %s\n", __func__); + warning_printed = 1; + } +} + static const char * rum_get_rf(int rev) { From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 03:47:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B48106566B; Fri, 19 Nov 2010 03:47:11 +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 425618FC08; Fri, 19 Nov 2010 03:47: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 oAJ3lBmQ056248; Fri, 19 Nov 2010 03:47:11 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ3lBSx056245; Fri, 19 Nov 2010 03:47:11 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011190347.oAJ3lBSx056245@svn.freebsd.org> From: Ryan Stone Date: Fri, 19 Nov 2010 03:47: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: r215507 - 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: Fri, 19 Nov 2010 03:47:11 -0000 Author: rstone Date: Fri Nov 19 03:47:10 2010 New Revision: 215507 URL: http://svn.freebsd.org/changeset/base/215507 Log: When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard path id for enumerating the available busses. Previously camcontrol was implicitly passing 0 as the first path id, which meant that if bus 0 was not present camcontrol would fail with EINVAL instead of rescanning/resetting any busses that were present. Approved by: emaste (mentor) MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) bzero(&(&matchccb.ccb_h)[1], sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); matchccb.ccb_h.func_code = XPT_DEV_MATCH; + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; matchccb.cdm.match_buf_len = bufsize; matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 04:30:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1284B106566C; Fri, 19 Nov 2010 04:30:34 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 027F88FC08; Fri, 19 Nov 2010 04:30: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 oAJ4UXql057220; Fri, 19 Nov 2010 04:30:33 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ4UXaH057218; Fri, 19 Nov 2010 04:30:33 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201011190430.oAJ4UXaH057218@svn.freebsd.org> From: Max Laier Date: Fri, 19 Nov 2010 04:30: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: r215508 - 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: Fri, 19 Nov 2010 04:30:34 -0000 Author: mlaier Date: Fri Nov 19 04:30:33 2010 New Revision: 215508 URL: http://svn.freebsd.org/changeset/base/215508 Log: Off by one page in vm_reserv_reclaim_contig(): Also reclaim reservations with only a single free page if that satisfies the requested size. MFC after: 3 days Reviewed by: alc Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Nov 19 03:47:10 2010 (r215507) +++ head/sys/vm/vm_reserv.c Fri Nov 19 04:30:33 2010 (r215508) @@ -654,7 +654,8 @@ vm_reserv_reclaim_contig(vm_paddr_t size ((pa ^ (pa + size - 1)) & ~(boundary - 1)) != 0) pa_length = 0; - } else if (pa_length >= size) { + } + if (pa_length >= size) { vm_reserv_reclaim(rv); return (TRUE); } From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:14:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A500A1065672; Fri, 19 Nov 2010 09:14:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92E168FC12; Fri, 19 Nov 2010 09:14: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 oAJ9Er0A065130; Fri, 19 Nov 2010 09:14:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9Er4V065126; Fri, 19 Nov 2010 09:14:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190914.oAJ9Er4V065126@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215509 - in stable/8/sys/dev: ahci ata siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:14:53 -0000 Author: mav Date: Fri Nov 19 09:14:53 2010 New Revision: 215509 URL: http://svn.freebsd.org/changeset/base/215509 Log: MFC r214988: Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual I/O length on underruns, that often happens for some SCSI commands. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/ahci/ahci.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1619,12 +1619,13 @@ ahci_execute_transaction(struct ahci_slo /* Setup the command list entry */ clp = (struct ahci_cmd_list *) (ch->dma.work + AHCI_CL_OFFSET + (AHCI_CL_SIZE * slot->slot)); - clp->prd_length = slot->dma.nsegs; - clp->cmd_flags = (ccb->ccb_h.flags & CAM_DIR_OUT ? AHCI_CMD_WRITE : 0) | - (ccb->ccb_h.func_code == XPT_SCSI_IO ? - (AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH) : 0) | - (fis_size / sizeof(u_int32_t)) | - (port << 12); + clp->cmd_flags = htole16( + (ccb->ccb_h.flags & CAM_DIR_OUT ? AHCI_CMD_WRITE : 0) | + (ccb->ccb_h.func_code == XPT_SCSI_IO ? + (AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH) : 0) | + (fis_size / sizeof(u_int32_t)) | + (port << 12)); + clp->prd_length = htole16(slot->dma.nsegs); /* Special handling for Soft Reset command. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) { @@ -1644,7 +1645,7 @@ ahci_execute_transaction(struct ahci_slo clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot)); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); bus_dmamap_sync(ch->dma.rfis_tag, ch->dma.rfis_map, BUS_DMASYNC_PREREAD); /* Set ACTIVE bit for NCQ commands. */ @@ -1849,10 +1850,13 @@ ahci_end_transaction(struct ahci_slot *s device_t dev = slot->dev; struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; + struct ahci_cmd_list *clp; int lastto; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_POSTWRITE); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + clp = (struct ahci_cmd_list *) + (ch->dma.work + AHCI_CL_OFFSET + (AHCI_CL_SIZE * slot->slot)); /* Read result registers to the result struct * May be incorrect if several commands finished same time, * so read only when sure or have to. @@ -1887,6 +1891,16 @@ ahci_end_transaction(struct ahci_slot *s res->sector_count_exp = fis[13]; } 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->ataio.resid = + ccb->ataio.dxfer_len - le32toh(clp->bytecount); + } + } else { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + ccb->csio.resid = + ccb->csio.dxfer_len - le32toh(clp->bytecount); + } } if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map, Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/ata/ata-all.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1516,6 +1516,15 @@ ata_cam_end_transaction(device_t dev, st res->sector_count = request->u.ata.count; res->sector_count_exp = request->u.ata.count >> 8; } + if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + ccb->ataio.resid = + ccb->ataio.dxfer_len - request->donecount; + } else { + ccb->csio.resid = + ccb->csio.dxfer_len - request->donecount; + } + } ata_free_request(request); xpt_done(ccb); /* Do error recovery if needed. */ Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Fri Nov 19 04:30:33 2010 (r215508) +++ stable/8/sys/dev/siis/siis.c Fri Nov 19 09:14:53 2010 (r215509) @@ -1208,6 +1208,17 @@ siis_end_transaction(struct siis_slot *s res->sector_count_exp = ATA_INB(ch->r_mem, offs + 13); } else bzero(res, sizeof(*res)); + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + ch->numrslots == 1) { + ccb->ataio.resid = ccb->ataio.dxfer_len - + ATA_INL(ch->r_mem, SIIS_P_LRAM_SLOT(slot->slot) + 4); + } + } else { + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN && + ch->numrslots == 1) { + ccb->csio.resid = ccb->csio.dxfer_len - + ATA_INL(ch->r_mem, SIIS_P_LRAM_SLOT(slot->slot) + 4); + } } if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map, From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:21:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3FBF1065670; Fri, 19 Nov 2010 09:21:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2CE08FC08; Fri, 19 Nov 2010 09:21: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 oAJ9LrKg065678; Fri, 19 Nov 2010 09:21:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9Lrq1065676; Fri, 19 Nov 2010 09:21:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190921.oAJ9Lrq1065676@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:21: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: r215510 - 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: Fri, 19 Nov 2010 09:21:53 -0000 Author: mav Date: Fri Nov 19 09:21:53 2010 New Revision: 215510 URL: http://svn.freebsd.org/changeset/base/215510 Log: MFC r209682 by imp: Minor formatting nits. Modified: stable/8/sys/dev/ata/ata-card.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-card.c ============================================================================== --- stable/8/sys/dev/ata/ata-card.c Fri Nov 19 09:14:53 2010 (r215509) +++ stable/8/sys/dev/ata/ata-card.c Fri Nov 19 09:21:53 2010 (r215510) @@ -135,9 +135,9 @@ ata_pccard_attach(device_t dev) ch->unit = 0; ch->flags |= ATA_USE_16BIT; funce = 0; /* Default to sane setting of FUNCE */ - pccard_get_funce_disk(dev, &funce); + pccard_get_funce_disk(dev, &funce); if (!(funce & PFD_I_D)) - ch-> flags |= ATA_NO_SLAVE; + ch-> flags |= ATA_NO_SLAVE; ata_generic_hw(dev); err = ata_probe(dev); if (err) From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:25:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC54106566B; Fri, 19 Nov 2010 09: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 221C78FC0A; Fri, 19 Nov 2010 09: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 oAJ9PDoM065891; Fri, 19 Nov 2010 09: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 oAJ9PDjr065889; Fri, 19 Nov 2010 09:25:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190925.oAJ9PDjr065889@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09: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: r215511 - 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: Fri, 19 Nov 2010 09:25:13 -0000 Author: mav Date: Fri Nov 19 09:25:12 2010 New Revision: 215511 URL: http://svn.freebsd.org/changeset/base/215511 Log: MFC r209683 by imp: Add a safety-belt. If the identified disk has 0 blocks, don't attach it. This can happen in some cases when plugging in SD/SmartCard PC Cards with empty slots. It is better to detect this bogosity, and refuse to attach rather than panic with a division by zero (in one of many places) down stream. Modified: stable/8/sys/dev/ata/ata-disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Fri Nov 19 09:21:53 2010 (r215510) +++ stable/8/sys/dev/ata/ata-disk.c Fri Nov 19 09:25:12 2010 (r215511) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); /* prototypes */ static void ad_init(device_t dev); -static void ad_get_geometry(device_t dev); +static int ad_get_geometry(device_t dev); static void ad_set_geometry(device_t dev); static void ad_done(struct ata_request *request); static void ad_describe(device_t dev); @@ -106,7 +106,8 @@ ad_attach(device_t dev) device_set_ivars(dev, adp); /* get device geometry into internal structs */ - ad_get_geometry(dev); + if (ad_get_geometry(dev)) + return ENXIO; /* set the max size if configured */ if (ata_setmax) @@ -412,7 +413,7 @@ ad_init(device_t dev) atadev->max_iosize = DEV_BSIZE; } -static void +static int ad_get_geometry(device_t dev) { struct ata_device *atadev = device_get_softc(dev); @@ -434,6 +435,9 @@ ad_get_geometry(device_t dev) } lbasize = (u_int32_t)atadev->param.lba_size_1 | ((u_int32_t)atadev->param.lba_size_2 << 16); + /* This device exists, but has no size. Filter out this bogus device. */ + if (!lbasize && !adp->total_secs) + return ENXIO; /* does this device need oldstyle CHS addressing */ if (!ad_version(atadev->param.version_major) || !lbasize) @@ -451,6 +455,7 @@ ad_get_geometry(device_t dev) if ((atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48) && lbasize48 > ATA_MAX_28BIT_LBA) adp->total_secs = lbasize48; + return 0; } static void From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:26:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF1A1065694; Fri, 19 Nov 2010 09:26: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 F1E898FC13; Fri, 19 Nov 2010 09:26: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 oAJ9QdGq065995; Fri, 19 Nov 2010 09:26:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9QdcD065993; Fri, 19 Nov 2010 09:26:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011190926.oAJ9QdcD065993@svn.freebsd.org> From: Alexander Motin Date: Fri, 19 Nov 2010 09:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215512 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:26:40 -0000 Author: mav Date: Fri Nov 19 09:26:39 2010 New Revision: 215512 URL: http://svn.freebsd.org/changeset/base/215512 Log: MFC r214672: Remove stale line, accidentally slipped into r214016. Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Fri Nov 19 09:25:12 2010 (r215511) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Fri Nov 19 09:26:39 2010 (r215512) @@ -315,7 +315,6 @@ ata_intel_ch_attach(device_t dev) map &= 0x03; if (map == 0x00) { ch->flags |= ATA_SATA; - smap[ch->unit] = (ch->unit == 0) ? 0x20 : 0x31; smap[0] = (ch->unit == 0) ? 0 : 1; smap[1] = (ch->unit == 0) ? 2 : 3; } else if (map == 0x02 && ch->unit == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:49:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCC371065673; Fri, 19 Nov 2010 09:49:14 +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 B78558FC25; Fri, 19 Nov 2010 09:49: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 oAJ9nE5N067127; Fri, 19 Nov 2010 09:49:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9nEhM067119; Fri, 19 Nov 2010 09:49:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011190949.oAJ9nEhM067119@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 09:49: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: r215513 - in stable/8/sys: amd64/acpica amd64/amd64 amd64/ia32 amd64/include crypto/via dev/fb dev/random i386/i386 i386/include i386/isa i386/linux kern opencrypto pc98/include pc98/pc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:49:14 -0000 Author: kib Date: Fri Nov 19 09:49:14 2010 New Revision: 215513 URL: http://svn.freebsd.org/changeset/base/215513 Log: Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the amd64 suspend/resume support. Tested by: Mike Tancsa Also tested by: Dewayne Geraghty , Daryl Richards Below is the svn log of the merged revisions. ------------------------------------------------------------------------ r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines Add a backtrace to the "fpudna in kernel mode!" case, to help track down where this comes from. Reviewed by: bde ------------------------------------------------------------------------ r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines Clean up amd64 suspend/resume code. - Allocate memory for wakeup code after ACPI bus is attached. The early memory allocation hack was inherited from i386 but amd64 does not need it. - Exclude real mode IVT and BDA explicitly. Improve comments about memory allocation and reason for the exclusions. It is a no-op in reality, though. - Remove an unnecessary CLD from wakeup code and re-align. ------------------------------------------------------------------------ r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines Tweak memory allocation for amd64 suspend/resume CPU context. ------------------------------------------------------------------------ r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines Simplify a macro not to generate unncessary symbols. ------------------------------------------------------------------------ r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines Merge r197455 from amd64: Add a backtrace to the "fpudna in kernel mode!" case, to help track down where this comes from. Reviewed by: bde ------------------------------------------------------------------------ r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines Introduce the x86 kernel interfaces to allow kernel code to use FPU/SSE hardware. Caller should provide a save area that is chained into the stack of the areas; pcb save_area for usermode FPU state is on top. The pcb now contains a pointer to the current FPU saved area, used during FPUDNA handling and context switches. There is also a facility to allow the kernel thread to use pcb save_area. Change the dreaded warnings "npxdna in kernel mode!" into the panics when FPU usage is not registered. KPI discussed with: fabient Tested by: pho, fabient Hardware provided by: Sentex Communications MFC after: 1 month ------------------------------------------------------------------------ r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines Use the fpu_kern_enter() interface to properly separate usermode FPU context from in-kernel execution of padlock instructions and to handle spurious FPUDNA exceptions that sometime are raised when doing padlock calculations. Globally mark crypto(9) kthread as using FPU. Reviewed by: pjd Hardware provided by: Sentex Communications Tested by: pho PR: amd64/135014 MFC after: 1 month ------------------------------------------------------------------------ r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines Style-compilant order of declarations. Noted by: bde MFC after: 1 month ------------------------------------------------------------------------ r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines Fix ACPI suspend/resume on amd64, which was broken since r208833. We need actual storage for FPU state to save and restore. ------------------------------------------------------------------------ r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines Use critical sections instead of disabling local interrupts to ensure the consistency between PCPU fpcurthread and the state of the FPU. Explicitely assert that the calling conventions for fpudrop() are adhered too. In cpu_thread_exit(), add missed critical section entrance. Reviewed by: bde Tested by: pho MFC after: 1 month ------------------------------------------------------------------------ r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines Rename CRITSECT_ASSERT to CRITICAL_ASSERT. Suggested by: jhb MFC after: 1 month ------------------------------------------------------------------------ r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines Remove two obsoleted comments, add a note about 32bit compatibility. MFC after: 1 month ------------------------------------------------------------------------ r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead of fpu{get,set}regs. Noted by: bde MFC after: 1 month ------------------------------------------------------------------------ r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines Remove unused i586 optimized bcopy/bzero/etc implementations that utilize FPU registers for copying. Remove the switch table and jumps from bcopy/bzero/... to the actual implementation. As a side-effect, i486-optimized bzero is removed. Reviewed by: bde Tested by: pho (previous version) ------------------------------------------------------------------------ r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines Remove the support for int13 FPU exception reporting on i386. It is believed that all 486-class CPUs FreeBSD is capable to run on, either have no FPU and cannot use external coprocessor, or have FPU on the package and can use #MF. Reviewed by: bde Tested by: pho (previous version) ------------------------------------------------------------------------ r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines After the FPU use requires #MF working due to INT13 FPU exception handling removal, MFi386 r209198: Use critical sections instead of disabling local interrupts to ensure the consistency between PCPU fpcurthread and the state of FPU. Reviewed by: bde Tested by: pho ------------------------------------------------------------------------ r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines Re-implement FPU suspend/resume for amd64. This removes superfluous uses of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs(). Also, we do not touch PCB flags any more. MFC after: 1 month ------------------------------------------------------------------------ r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines FNSTSW instruction can use AX register as an operand. Obtained from: fenv.h ------------------------------------------------------------------------ r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines Reduce diff against fenv.h: Mark all inline asms as volatile for safety. No object file change after this commit (verified with md5). ------------------------------------------------------------------------ r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines Remove an unused macro since r189418. ------------------------------------------------------------------------ r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines Add missing ldmxcsr() prototype for lint case. ------------------------------------------------------------------------ r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines Simplify fldcw() macro. There is no reason to use pointer here. No object file change after this commit (verified with md5). ------------------------------------------------------------------------ r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h. ------------------------------------------------------------------------ r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines Fix another fallout from r208833. savectx() is used to save CPU context for crash dump (dumppcb) and kdb (stoppcbs). For both cases, there cannot have a valid pointer in pcb_save. This should restore the previous behaviour. ------------------------------------------------------------------------ r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines - Merge savectx2() with savectx() and struct xpcb with struct pcb. [1] savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs). Thus, saving additional information does not hurt and it may be even beneficial. Unfortunately, struct pcb has grown larger to accommodate more data. Move 512-byte long pcb_user_save to the end of struct pcb while I am here. - savectx() now saves FPU state unconditionally and copy it to the PCB of FPU thread if necessary. This gives panic dump and kdb a chance to take a look at the current FPU state even if the FPU is "supposedly" not used. - Resuming CPU now unconditionally reinitializes FPU. If the saved FPU state was irrelevant, it could be in an unknown state. Suggested by: bde [1] ------------------------------------------------------------------------ r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines savectx() has not been used for fork(2) for about 15 years. [1] Do not clobber FPU thread's PCB as it is more harmful. When we resume CPU, unconditionally reload FPU state. Pointed out by: bde [1] ------------------------------------------------------------------------ r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use these values in the function. ------------------------------------------------------------------------ r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned by intr_disable(). Requested by: bde ------------------------------------------------------------------------ Modified: stable/8/sys/amd64/acpica/acpi_machdep.c stable/8/sys/amd64/acpica/acpi_switch.S stable/8/sys/amd64/acpica/acpi_wakecode.S stable/8/sys/amd64/acpica/acpi_wakeup.c stable/8/sys/amd64/amd64/cpu_switch.S stable/8/sys/amd64/amd64/fpu.c stable/8/sys/amd64/amd64/genassym.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/ia32/ia32_reg.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/amd64/include/fpu.h stable/8/sys/amd64/include/pcb.h stable/8/sys/crypto/via/padlock.c stable/8/sys/crypto/via/padlock.h stable/8/sys/crypto/via/padlock_cipher.c stable/8/sys/crypto/via/padlock_hash.c stable/8/sys/dev/fb/fbreg.h stable/8/sys/dev/random/nehemiah.c stable/8/sys/i386/i386/identcpu.c stable/8/sys/i386/i386/initcpu.c stable/8/sys/i386/i386/machdep.c stable/8/sys/i386/i386/perfmon.c stable/8/sys/i386/i386/ptrace_machdep.c stable/8/sys/i386/i386/support.s stable/8/sys/i386/i386/swtch.s stable/8/sys/i386/i386/trap.c stable/8/sys/i386/i386/vm_machdep.c stable/8/sys/i386/include/md_var.h stable/8/sys/i386/include/npx.h stable/8/sys/i386/include/pcb.h stable/8/sys/i386/isa/npx.c stable/8/sys/i386/linux/linux_ptrace.c stable/8/sys/kern/subr_trap.c stable/8/sys/opencrypto/crypto.c stable/8/sys/pc98/include/npx.h stable/8/sys/pc98/pc98/machdep.c stable/8/sys/x86/x86/local_apic.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- stable/8/sys/amd64/acpica/acpi_machdep.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_machdep.c Fri Nov 19 09:49:14 2010 (r215513) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include #include @@ -71,7 +72,6 @@ acpi_machdep_init(device_t dev) STAILQ_INSERT_TAIL(&sc->apm_cdevs, &acpi_clone, entries); ACPI_UNLOCK(acpi); sc->acpi_clone = &acpi_clone; - acpi_install_wakeup_handler(sc); if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); @@ -363,13 +363,20 @@ nexus_acpi_probe(device_t dev) static int nexus_acpi_attach(device_t dev) { + device_t acpi_dev; + int error; nexus_init_resources(); bus_generic_probe(dev); - if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL) + acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); + if (acpi_dev == NULL) panic("failed to add acpi0 device"); - return (bus_generic_attach(dev)); + error = bus_generic_attach(dev); + if (error == 0) + acpi_install_wakeup_handler(device_get_softc(acpi_dev)); + + return (error); } static device_method_t nexus_acpi_methods[] = { Modified: stable/8/sys/amd64/acpica/acpi_switch.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_switch.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_switch.S Fri Nov 19 09:49:14 2010 (r215513) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,26 +34,11 @@ #include "acpi_wakedata.h" #include "assym.s" -#define WAKEUP_DECL(member) \ - .set WAKEUP_ ## member, wakeup_ ## member - wakeup_ctx - - WAKEUP_DECL(xpcb) - WAKEUP_DECL(gdt) - WAKEUP_DECL(efer) - WAKEUP_DECL(pat) - WAKEUP_DECL(star) - WAKEUP_DECL(lstar) - WAKEUP_DECL(cstar) - WAKEUP_DECL(sfmask) - WAKEUP_DECL(cpu) - -#define WAKEUP_CTX(member) WAKEUP_ ## member (%rdi) -#define WAKEUP_PCB(member) PCB_ ## member(%r11) -#define WAKEUP_XPCB(member) XPCB_ ## member(%r11) +#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rsi) ENTRY(acpi_restorecpu) /* Switch to KPML4phys. */ - movq %rsi, %rax + movq %rdi, %rax movq %rax, %cr3 /* Restore GDT. */ @@ -62,7 +47,7 @@ ENTRY(acpi_restorecpu) 1: /* Fetch PCB. */ - movq WAKEUP_CTX(xpcb), %r11 + movq WAKEUP_CTX(pcb), %rdi /* Force kernel segment registers. */ movl $KDSEL, %eax @@ -75,16 +60,16 @@ ENTRY(acpi_restorecpu) movw %ax, %gs movl $MSR_FSBASE, %ecx - movl WAKEUP_PCB(FSBASE), %eax - movl 4 + WAKEUP_PCB(FSBASE), %edx + movl PCB_FSBASE(%rdi), %eax + movl 4 + PCB_FSBASE(%rdi), %edx wrmsr movl $MSR_GSBASE, %ecx - movl WAKEUP_PCB(GSBASE), %eax - movl 4 + WAKEUP_PCB(GSBASE), %edx + movl PCB_GSBASE(%rdi), %eax + movl 4 + PCB_GSBASE(%rdi), %edx wrmsr movl $MSR_KGSBASE, %ecx - movl WAKEUP_XPCB(KGSBASE), %eax - movl 4 + WAKEUP_XPCB(KGSBASE), %edx + movl PCB_KGSBASE(%rdi), %eax + movl 4 + PCB_KGSBASE(%rdi), %edx wrmsr /* Restore EFER. */ @@ -115,17 +100,21 @@ ENTRY(acpi_restorecpu) movl WAKEUP_CTX(sfmask), %eax wrmsr - /* Restore CR0, CR2 and CR4. */ - movq WAKEUP_XPCB(CR0), %rax + /* Restore CR0 except for FPU mode. */ + movq PCB_CR0(%rdi), %rax + movq %rax, %rcx + andq $~(CR0_EM | CR0_TS), %rax movq %rax, %cr0 - movq WAKEUP_XPCB(CR2), %rax + + /* Restore CR2 and CR4. */ + movq PCB_CR2(%rdi), %rax movq %rax, %cr2 - movq WAKEUP_XPCB(CR4), %rax + movq PCB_CR4(%rdi), %rax movq %rax, %cr4 /* Restore descriptor tables. */ - lidt WAKEUP_XPCB(IDT) - lldt WAKEUP_XPCB(LDT) + lidt PCB_IDT(%rdi) + lldt PCB_LDT(%rdi) #define SDT_SYSTSS 9 #define SDT_SYSBSY 11 @@ -133,37 +122,44 @@ ENTRY(acpi_restorecpu) /* Clear "task busy" bit and reload TR. */ movq PCPU(TSS), %rax andb $(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax) - movw WAKEUP_XPCB(TR), %ax + movw PCB_TR(%rdi), %ax ltr %ax #undef SDT_SYSTSS #undef SDT_SYSBSY /* Restore other callee saved registers. */ - movq WAKEUP_PCB(R15), %r15 - movq WAKEUP_PCB(R14), %r14 - movq WAKEUP_PCB(R13), %r13 - movq WAKEUP_PCB(R12), %r12 - movq WAKEUP_PCB(RBP), %rbp - movq WAKEUP_PCB(RSP), %rsp - movq WAKEUP_PCB(RBX), %rbx + movq PCB_R15(%rdi), %r15 + movq PCB_R14(%rdi), %r14 + movq PCB_R13(%rdi), %r13 + movq PCB_R12(%rdi), %r12 + movq PCB_RBP(%rdi), %rbp + movq PCB_RSP(%rdi), %rsp + movq PCB_RBX(%rdi), %rbx /* Restore debug registers. */ - movq WAKEUP_PCB(DR0), %rax + movq PCB_DR0(%rdi), %rax movq %rax, %dr0 - movq WAKEUP_PCB(DR1), %rax + movq PCB_DR1(%rdi), %rax movq %rax, %dr1 - movq WAKEUP_PCB(DR2), %rax + movq PCB_DR2(%rdi), %rax movq %rax, %dr2 - movq WAKEUP_PCB(DR3), %rax + movq PCB_DR3(%rdi), %rax movq %rax, %dr3 - movq WAKEUP_PCB(DR6), %rax + movq PCB_DR6(%rdi), %rax movq %rax, %dr6 - movq WAKEUP_PCB(DR7), %rax + movq PCB_DR7(%rdi), %rax movq %rax, %dr7 + /* Restore FPU state. */ + fninit + fxrstor PCB_USERFPU(%rdi) + + /* Reload CR0. */ + movq %rcx, %cr0 + /* Restore return address. */ - movq WAKEUP_PCB(RIP), %rax + movq PCB_RIP(%rdi), %rax movq %rax, (%rsp) /* Indicate the CPU is resumed. */ @@ -172,19 +168,3 @@ ENTRY(acpi_restorecpu) ret END(acpi_restorecpu) - -ENTRY(acpi_savecpu) - /* Fetch XPCB and save CPU context. */ - movq %rdi, %r10 - call savectx2 - movq %r10, %r11 - - /* Patch caller's return address and stack pointer. */ - movq (%rsp), %rax - movq %rax, WAKEUP_PCB(RIP) - movq %rsp, %rax - movq %rax, WAKEUP_PCB(RSP) - - movl $1, %eax - ret -END(acpi_savecpu) Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakecode.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_wakecode.S Fri Nov 19 09:49:14 2010 (r215513) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,18 +52,17 @@ .data /* So we can modify it */ ALIGN_TEXT -wakeup_start: .code16 +wakeup_start: /* * Set up segment registers for real mode, a small stack for * any calls we make, and clear any flags. */ cli /* make sure no interrupts */ - cld mov %cs, %ax /* copy %cs to %ds. Remember these */ mov %ax, %ds /* are offsets rather than selectors */ mov %ax, %ss - movw $PAGE_SIZE - 8, %sp + movw $PAGE_SIZE, %sp xorw %ax, %ax pushw %ax popfw @@ -127,6 +126,7 @@ wakeup_sw32: /* * At this point, we are running in 32 bit legacy protected mode. */ + ALIGN_TEXT .code32 wakeup_32: @@ -205,8 +205,8 @@ wakeup_64: mov %ax, %ds /* Restore arguments and return. */ - movq wakeup_ctx - wakeup_start(%rbx), %rdi - movq wakeup_kpml4 - wakeup_start(%rbx), %rsi + movq wakeup_kpml4 - wakeup_start(%rbx), %rdi + movq wakeup_ctx - wakeup_start(%rbx), %rsi movq wakeup_retaddr - wakeup_start(%rbx), %rax jmp *%rax @@ -260,7 +260,7 @@ wakeup_kpml4: wakeup_ctx: .quad 0 -wakeup_xpcb: +wakeup_pcb: .quad 0 wakeup_gdt: .word 0 Modified: stable/8/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakeup.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/acpica/acpi_wakeup.c Fri Nov 19 09:49:14 2010 (r215513) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,11 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include #include #include -#include #include #include @@ -47,11 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef SMP #include #include +#include #endif #include @@ -64,23 +62,18 @@ __FBSDID("$FreeBSD$"); /* Make sure the code is less than a page and leave room for the stack. */ CTASSERT(sizeof(wakecode) < PAGE_SIZE - 1024); -#ifndef _SYS_CDEFS_H_ -#error this file needs sys/cdefs.h as a prerequisite -#endif - extern int acpi_resume_beep; extern int acpi_reset_video; #ifdef SMP -extern struct xpcb *stopxpcbs; +extern struct pcb **susppcbs; #else -static struct xpcb *stopxpcbs; +static struct pcb **susppcbs; #endif -int acpi_restorecpu(struct xpcb *, vm_offset_t); -int acpi_savecpu(struct xpcb *); +int acpi_restorecpu(struct pcb *, vm_offset_t); -static void acpi_alloc_wakeup_handler(void); +static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); #ifdef SMP @@ -111,10 +104,10 @@ acpi_wakeup_ap(struct acpi_softc *sc, in int apic_id = cpu_apic_ids[cpu]; int ms; - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[cpu]); - WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu].xpcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[cpu].xpcb_gdt.rd_base); + susppcbs[cpu]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, cpu); /* do an INIT IPI: assert RESET */ @@ -222,7 +215,6 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { - struct savefpu *stopfpu; #ifdef SMP cpumask_t wakeup_cpus; #endif @@ -252,10 +244,7 @@ acpi_sleep_machdep(struct acpi_softc *sc cr3 = rcr3(); load_cr3(KPML4phys); - stopfpu = &stopxpcbs[0].xpcb_pcb.pcb_save; - if (acpi_savecpu(&stopxpcbs[0])) { - fpugetregs(curthread, stopfpu); - + if (savectx(susppcbs[0])) { #ifdef SMP if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) { device_printf(sc->acpi_dev, @@ -268,11 +257,11 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, &stopxpcbs[0]); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, - stopxpcbs[0].xpcb_gdt.rd_limit); + susppcbs[0]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[0].xpcb_gdt.rd_base); + susppcbs[0]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, 0); /* Call ACPICA to enter the desired sleep state */ @@ -291,7 +280,6 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ia32_pause(); } else { - fpusetregs(curthread, stopfpu); #ifdef SMP if (wakeup_cpus != 0) acpi_wakeup_cpus(sc, wakeup_cpus); @@ -324,49 +312,48 @@ out: return (ret); } -static vm_offset_t acpi_wakeaddr; - -static void +static void * acpi_alloc_wakeup_handler(void) { void *wakeaddr; - - if (!cold) - return; + int i; /* * Specify the region for our wakeup code. We want it in the low 1 MB - * region, excluding video memory and above (0xa0000). We ask for - * it to be page-aligned, just to be safe. + * region, excluding real mode IVT (0-0x3ff), BDA (0x400-0x4ff), EBDA + * (less than 128KB, below 0xa0000, must be excluded by SMAP and DSDT), + * and ROM area (0xa0000 and above). The temporary page tables must be + * page-aligned. */ - wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0, 0x9ffff, - PAGE_SIZE, 0ul); + wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0x500, + 0xa0000, PAGE_SIZE, 0ul); if (wakeaddr == NULL) { printf("%s: can't alloc wake memory\n", __func__); - return; - } - stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_NOWAIT); - if (stopxpcbs == NULL) { - contigfree(wakeaddr, 4 * PAGE_SIZE, M_DEVBUF); - printf("%s: can't alloc CPU state memory\n", __func__); - return; + return (NULL); } - acpi_wakeaddr = (vm_offset_t)wakeaddr; -} + susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); + for (i = 0; i < mp_ncpus; i++) + susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); -SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0); + return (wakeaddr); +} void acpi_install_wakeup_handler(struct acpi_softc *sc) { + static void *wakeaddr = NULL; uint64_t *pt4, *pt3, *pt2; int i; - if (acpi_wakeaddr == 0ul) + if (wakeaddr != NULL) + return; + + wakeaddr = acpi_alloc_wakeup_handler(); + if (wakeaddr == NULL) return; - sc->acpi_wakeaddr = acpi_wakeaddr; - sc->acpi_wakephys = vtophys(acpi_wakeaddr); + sc->acpi_wakeaddr = (vm_offset_t)wakeaddr; + sc->acpi_wakephys = vtophys(wakeaddr); bcopy(wakecode, (void *)WAKECODE_VADDR(sc), sizeof(wakecode)); @@ -392,7 +379,7 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_sfmask, uint64_t, rdmsr(MSR_SF_MASK)); /* Build temporary page tables below realmode code. */ - pt4 = (uint64_t *)acpi_wakeaddr; + pt4 = wakeaddr; pt3 = pt4 + (PAGE_SIZE) / sizeof(uint64_t); pt2 = pt3 + (PAGE_SIZE) / sizeof(uint64_t); Modified: stable/8/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/8/sys/amd64/amd64/cpu_switch.S Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/amd64/cpu_switch.S Fri Nov 19 09:49:14 2010 (r215513) @@ -113,7 +113,7 @@ done_store_dr: /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) jne 1f - addq $PCB_SAVEFPU,%r8 + movq PCB_SAVEFPU(%r8),%r8 clts fxsave (%r8) smsw %ax @@ -302,121 +302,62 @@ END(cpu_switch) * Update pcb, saving current processor state. */ ENTRY(savectx) - /* Fetch PCB. */ - movq %rdi,%rcx - - /* Save caller's return address. */ - movq (%rsp),%rax - movq %rax,PCB_RIP(%rcx) - - movq %cr3,%rax - movq %rax,PCB_CR3(%rcx) - - movq %rbx,PCB_RBX(%rcx) - movq %rsp,PCB_RSP(%rcx) - movq %rbp,PCB_RBP(%rcx) - movq %r12,PCB_R12(%rcx) - movq %r13,PCB_R13(%rcx) - movq %r14,PCB_R14(%rcx) - movq %r15,PCB_R15(%rcx) - - /* - * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the - * state had better already be in the pcb. This is true for forks - * but not for dumps (the old book-keeping with FP flags in the pcb - * always lost for dumps because the dump pcb has 0 flags). - * - * If fpcurthread != NULL, then we have to save the fpu h/w state to - * fpcurthread's pcb and copy it to the requested pcb, or save to the - * requested pcb and reload. Copying is easier because we would - * have to handle h/w bugs for reloading. We used to lose the - * parent's fpu state for forks by forgetting to reload. - */ - pushfq - cli - movq PCPU(FPCURTHREAD),%rax - testq %rax,%rax - je 1f - - movq TD_PCB(%rax),%rdi - leaq PCB_SAVEFPU(%rdi),%rdi - clts - fxsave (%rdi) - smsw %ax - orb $CR0_TS,%al - lmsw %ax - - movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */ - leaq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */ - /* arg 1 (%rdi) already loaded */ - call bcopy -1: - popfq - - ret -END(savectx) - -/* - * savectx2(xpcb) - * Update xpcb, saving current processor state. - */ -ENTRY(savectx2) - /* Fetch XPCB. */ - movq %rdi,%r8 - /* Save caller's return address. */ movq (%rsp),%rax - movq %rax,PCB_RIP(%r8) + movq %rax,PCB_RIP(%rdi) - movq %rbx,PCB_RBX(%r8) - movq %rsp,PCB_RSP(%r8) - movq %rbp,PCB_RBP(%r8) - movq %r12,PCB_R12(%r8) - movq %r13,PCB_R13(%r8) - movq %r14,PCB_R14(%r8) - movq %r15,PCB_R15(%r8) + movq %rbx,PCB_RBX(%rdi) + movq %rsp,PCB_RSP(%rdi) + movq %rbp,PCB_RBP(%rdi) + movq %r12,PCB_R12(%rdi) + movq %r13,PCB_R13(%rdi) + movq %r14,PCB_R14(%rdi) + movq %r15,PCB_R15(%rdi) - movq %cr0,%rax - movq %rax,XPCB_CR0(%r8) + movq %cr0,%rsi + movq %rsi,PCB_CR0(%rdi) movq %cr2,%rax - movq %rax,XPCB_CR2(%r8) + movq %rax,PCB_CR2(%rdi) + movq %cr3,%rax + movq %rax,PCB_CR3(%rdi) movq %cr4,%rax - movq %rax,XPCB_CR4(%r8) + movq %rax,PCB_CR4(%rdi) movq %dr0,%rax - movq %rax,PCB_DR0(%r8) + movq %rax,PCB_DR0(%rdi) movq %dr1,%rax - movq %rax,PCB_DR1(%r8) + movq %rax,PCB_DR1(%rdi) movq %dr2,%rax - movq %rax,PCB_DR2(%r8) + movq %rax,PCB_DR2(%rdi) movq %dr3,%rax - movq %rax,PCB_DR3(%r8) + movq %rax,PCB_DR3(%rdi) movq %dr6,%rax - movq %rax,PCB_DR6(%r8) + movq %rax,PCB_DR6(%rdi) movq %dr7,%rax - movq %rax,PCB_DR7(%r8) - - sgdt XPCB_GDT(%r8) - sidt XPCB_IDT(%r8) - sldt XPCB_LDT(%r8) - str XPCB_TR(%r8) + movq %rax,PCB_DR7(%rdi) movl $MSR_FSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_FSBASE(%r8) + movl %eax,PCB_FSBASE(%rdi) + movl %edx,PCB_FSBASE+4(%rdi) movl $MSR_GSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_GSBASE(%r8) + movl %eax,PCB_GSBASE(%rdi) + movl %edx,PCB_GSBASE+4(%rdi) movl $MSR_KGSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,XPCB_KGSBASE(%r8) + movl %eax,PCB_KGSBASE(%rdi) + movl %edx,PCB_KGSBASE+4(%rdi) + + sgdt PCB_GDT(%rdi) + sidt PCB_IDT(%rdi) + sldt PCB_LDT(%rdi) + str PCB_TR(%rdi) - movl $1, %eax + clts + fxsave PCB_USERFPU(%rdi) + movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */ + + movl $1,%eax ret -END(savectx2) +END(savectx) Modified: stable/8/sys/amd64/amd64/fpu.c ============================================================================== --- stable/8/sys/amd64/amd64/fpu.c Fri Nov 19 09:26:39 2010 (r215512) +++ stable/8/sys/amd64/amd64/fpu.c Fri Nov 19 09:49:14 2010 (r215513) @@ -65,34 +65,36 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) -#define fnclex() __asm("fnclex") -#define fninit() __asm("fninit") +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) +#define fnclex() __asm __volatile("fnclex") +#define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) -#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr))) -#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) +#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) +#define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) -#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm("clts") +#define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) +#define start_emulating() __asm __volatile( \ + "smsw %%ax; orb %0,%%al; lmsw %%ax" \ + : : "n" (CR0_TS) : "ax") +#define stop_emulating() __asm __volatile("clts") #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); +void ldmxcsr(u_int csr); void start_emulating(void); void stop_emulating(void); #endif /* __GNUCLIKE_ASM && !lint */ -#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_cw) -#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_sw) +#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_cw) +#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save->sv_env.en_sw) typedef u_char bool_t; @@ -111,15 +113,18 @@ static struct savefpu fpu_initialstate; void fpuinit(void) { - register_t savecrit; + register_t saveintr; u_int mxcsr; u_short control; - savecrit = intr_disable(); + /* + * It is too early for critical_enter() to work on AP. + */ + saveintr = intr_disable(); stop_emulating(); fninit(); control = __INITIAL_FPUCW__; - fldcw(&control); + fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { @@ -132,7 +137,7 @@ fpuinit(void) bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm)); } start_emulating(); - intr_restore(savecrit); + intr_restore(saveintr); } /* @@ -141,16 +146,15 @@ fpuinit(void) void fpuexit(struct thread *td) { - register_t savecrit; - savecrit = intr_disable(); + critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { stop_emulating(); - fxsave(&PCPU_GET(curpcb)->pcb_save); + fxsave(PCPU_GET(curpcb)->pcb_save); start_emulating(); PCPU_SET(fpcurthread, 0); } - intr_restore(savecrit); + critical_exit(); } int @@ -351,10 +355,9 @@ static char fpetable[128] = { int fputrap() { - register_t savecrit; u_short control, status; - savecrit = intr_disable(); + critical_enter(); /* * Interrupt handling (for another interrupt) may have pushed the @@ -371,7 +374,7 @@ fputrap() if (PCPU_GET(fpcurthread) == curthread) fnclex(); - intr_restore(savecrit); + critical_exit(); return (fpetable[status & ((~control & 0x3f) | 0x40)]); } @@ -389,12 +392,13 @@ void fpudna(void) { struct pcb *pcb; - register_t s; + critical_enter(); if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", ++err_count); stop_emulating(); + critical_exit(); return; } if (PCPU_GET(fpcurthread) != NULL) { @@ -404,7 +408,6 @@ fpudna(void) curthread, curthread->td_proc->p_pid); panic("fpudna"); } - s = intr_disable(); stop_emulating(); /* * Record new context early in case frstor causes a trap. @@ -422,23 +425,23 @@ fpudna(void) */ fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(&pcb->pcb_initial_fpucw); + fldcw(pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_USERFPUINITDONE; } else - fxrstor(&pcb->pcb_save); - intr_restore(s); + fxrstor(pcb->pcb_save); + critical_exit(); } -/* - * This should be called with interrupts disabled and only when the owning - * FPU thread is non-null. - */ void fpudrop() { struct thread *td; td = PCPU_GET(fpcurthread); + KASSERT(td == curthread, ("fpudrop: fpcurthread != curthread")); + CRITICAL_ASSERT(td); PCPU_SET(fpcurthread, NULL); td->td_pcb->pcb_flags &= ~PCB_FPUINITDONE; start_emulating(); @@ -449,23 +452,47 @@ fpudrop() * It returns the FPU ownership status. */ int +fpugetuserregs(struct thread *td, struct savefpu *addr) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { + bcopy(&fpu_initialstate, addr, sizeof(fpu_initialstate)); + addr->sv_env.en_cw = pcb->pcb_initial_fpucw; + return (_MC_FPOWNED_NONE); + } + critical_enter(); + if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { + fxsave(addr); + critical_exit(); + return (_MC_FPOWNED_FPU); + } else { + critical_exit(); + bcopy(&pcb->pcb_user_save, addr, sizeof(*addr)); + return (_MC_FPOWNED_PCB); + } +} + +int fpugetregs(struct thread *td, struct savefpu *addr) { - register_t s; + struct pcb *pcb; - if ((td->td_pcb->pcb_flags & PCB_FPUINITDONE) == 0) { + pcb = td->td_pcb; + if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { bcopy(&fpu_initialstate, addr, sizeof(fpu_initialstate)); - addr->sv_env.en_cw = td->td_pcb->pcb_initial_fpucw; + addr->sv_env.en_cw = pcb->pcb_initial_fpucw; return (_MC_FPOWNED_NONE); } - s = intr_disable(); + critical_enter(); if (td == PCPU_GET(fpcurthread)) { fxsave(addr); - intr_restore(s); + critical_exit(); return (_MC_FPOWNED_FPU); } else { - intr_restore(s); - bcopy(&td->td_pcb->pcb_save, addr, sizeof(*addr)); + critical_exit(); + bcopy(pcb->pcb_save, addr, sizeof(*addr)); return (_MC_FPOWNED_PCB); } } @@ -474,19 +501,42 @@ fpugetregs(struct thread *td, struct sav * Set the state of the FPU. */ void +fpusetuserregs(struct thread *td, struct savefpu *addr) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + critical_enter(); + if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { + fxrstor(addr); + critical_exit(); + pcb->pcb_flags |= PCB_FPUINITDONE | PCB_USERFPUINITDONE; + } else { + critical_exit(); + bcopy(addr, &td->td_pcb->pcb_user_save, sizeof(*addr)); + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_FPUINITDONE; + pcb->pcb_flags |= PCB_USERFPUINITDONE; + } +} + +void fpusetregs(struct thread *td, struct savefpu *addr) { - register_t s; + struct pcb *pcb; - s = intr_disable(); + pcb = td->td_pcb; + critical_enter(); if (td == PCPU_GET(fpcurthread)) { fxrstor(addr); - intr_restore(s); + critical_exit(); } else { - intr_restore(s); - bcopy(addr, &td->td_pcb->pcb_save, sizeof(*addr)); + critical_exit(); + bcopy(addr, td->td_pcb->pcb_save, sizeof(*addr)); } - curthread->td_pcb->pcb_flags |= PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_USERFPUINITDONE; + pcb->pcb_flags |= PCB_FPUINITDONE; } /* @@ -575,3 +625,73 @@ static devclass_t fpupnp_devclass; DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0); #endif /* DEV_ISA */ + +int +fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == &pcb->pcb_user_save, + ("mangled pcb_save")); + ctx->flags = 0; + if ((pcb->pcb_flags & PCB_FPUINITDONE) != 0) + ctx->flags |= FPU_KERN_CTX_FPUINITDONE; + fpuexit(td); + ctx->prev = pcb->pcb_save; + pcb->pcb_save = &ctx->hwstate; + pcb->pcb_flags |= PCB_KERNFPU; + pcb->pcb_flags &= ~PCB_FPUINITDONE; + return (0); +} + +int +fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + critical_enter(); + if (curthread == PCPU_GET(fpcurthread)) + fpudrop(); + critical_exit(); + pcb->pcb_save = ctx->prev; + if (pcb->pcb_save == &pcb->pcb_user_save) { + if ((pcb->pcb_flags & PCB_USERFPUINITDONE) != 0) + pcb->pcb_flags |= PCB_FPUINITDONE; + else + pcb->pcb_flags &= ~PCB_FPUINITDONE; + pcb->pcb_flags &= ~PCB_KERNFPU; + } else { + if ((ctx->flags & FPU_KERN_CTX_FPUINITDONE) != 0) + pcb->pcb_flags |= PCB_FPUINITDONE; + else + pcb->pcb_flags &= ~PCB_FPUINITDONE; + KASSERT(!PCB_USER_FPU(pcb), ("unpaired fpu_kern_leave")); + } + return (0); +} + +int +fpu_kern_thread(u_int flags) +{ + struct pcb *pcb; + + pcb = PCPU_GET(curpcb); + KASSERT((curthread->td_pflags & TDP_KTHREAD) != 0, + ("Only kthread may use fpu_kern_thread")); + KASSERT(pcb->pcb_save == &pcb->pcb_user_save, ("mangled pcb_save")); + KASSERT(PCB_USER_FPU(pcb), ("recursive call")); + + pcb->pcb_flags |= PCB_KERNFPU; + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:59:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37DEC106566B; Fri, 19 Nov 2010 09:59:42 +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 267488FC1A; Fri, 19 Nov 2010 09:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9xglR067686; Fri, 19 Nov 2010 09:59:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9xg8x067684; Fri, 19 Nov 2010 09:59:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011190959.oAJ9xg8x067684@svn.freebsd.org> From: Xin LI Date: Fri, 19 Nov 2010 09:59: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: r215514 - stable/7/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:59:42 -0000 Author: delphij Date: Fri Nov 19 09:59:41 2010 New Revision: 215514 URL: http://svn.freebsd.org/changeset/base/215514 Log: RELENG_7 does not have IP_BINDANY yet so hide it under ifdef. Reported by: tinderbox Modified: stable/7/contrib/netcat/netcat.c Modified: stable/7/contrib/netcat/netcat.c ============================================================================== --- stable/7/contrib/netcat/netcat.c Fri Nov 19 09:49:14 2010 (r215513) +++ stable/7/contrib/netcat/netcat.c Fri Nov 19 09:59:41 2010 (r215514) @@ -569,8 +569,10 @@ remote_connect(const char *host, const c if (sflag || pflag) { struct addrinfo ahints, *ares; +#ifdef IP_BINDANY /* try IP_BINDANY, but don't insist */ setsockopt(s, IPPROTO_IP, IP_BINDANY, &on, sizeof(on)); +#endif memset(&ahints, 0, sizeof(struct addrinfo)); ahints.ai_family = res0->ai_family; ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 09:59:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4891C106566C; Fri, 19 Nov 2010 09:59:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 381B38FC17; Fri, 19 Nov 2010 09: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 oAJ9xuFR067733; Fri, 19 Nov 2010 09:59:56 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9xuDV067731; Fri, 19 Nov 2010 09:59:56 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201011190959.oAJ9xuDV067731@svn.freebsd.org> From: Martin Matuska Date: Fri, 19 Nov 2010 09: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: r215515 - head/lib/liblzma X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:59:56 -0000 Author: mm Date: Fri Nov 19 09:59:55 2010 New Revision: 215515 URL: http://svn.freebsd.org/changeset/base/215515 Log: Remove obsoleted private symbol. Approved by: delphij (mentor) MFC after: together with 5.0.0 update Modified: head/lib/liblzma/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Fri Nov 19 09:59:41 2010 (r215514) +++ head/lib/liblzma/Symbol.map Fri Nov 19 09:59:55 2010 (r215515) @@ -107,7 +107,6 @@ XZprivate_1.0 { lzma_check_finish; lzma_check_init; lzma_check_update; - lzma_chunk_size; lzma_delta_coder_init; lzma_delta_coder_memusage; lzma_delta_decoder_init; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 10:01:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6981C1065695; Fri, 19 Nov 2010 10:01:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57DC48FC24; Fri, 19 Nov 2010 10:01: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 oAJA1ULZ067908; Fri, 19 Nov 2010 10:01:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJA1ULB067906; Fri, 19 Nov 2010 10:01:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191001.oAJA1ULB067906@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 10:01: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: r215516 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:01:30 -0000 Author: avg Date: Fri Nov 19 10:01:30 2010 New Revision: 215516 URL: http://svn.freebsd.org/changeset/base/215516 Log: MFC r215397: fix misspelling in a comment Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Nov 19 09:59:55 2010 (r215515) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Nov 19 10:01:30 2010 (r215516) @@ -1555,7 +1555,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 10:14:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38D5E106564A; Fri, 19 Nov 2010 10:14:08 +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 26E728FC1D; Fri, 19 Nov 2010 10:14: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 oAJAE82V068692; Fri, 19 Nov 2010 10:14:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAE7jD068688; Fri, 19 Nov 2010 10:14:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011191014.oAJAE7jD068688@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 10:14: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: r215517 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:14:08 -0000 Author: kib Date: Fri Nov 19 10:14:07 2010 New Revision: 215517 URL: http://svn.freebsd.org/changeset/base/215517 Log: MFC r209686,r209702: Reimplement vm_object_page_clean(), using the fact that vm object memq is ordered by page index. Reviewed by: alc Modified: stable/8/sys/vm/vm_object.c stable/8/sys/vm/vm_page.h stable/8/sys/vm/vm_pager.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_object.c Fri Nov 19 10:14:07 2010 (r215517) @@ -96,24 +96,17 @@ __FBSDID("$FreeBSD$"); #include #include -#define EASY_SCAN_FACTOR 8 - -#define MSYNC_FLUSH_HARDSEQ 0x01 -#define MSYNC_FLUSH_SOFTSEQ 0x02 - -/* - * msync / VM object flushing optimizations - */ -static int msync_flush_flags = MSYNC_FLUSH_HARDSEQ | MSYNC_FLUSH_SOFTSEQ; +static int msync_flush_flags = 0; SYSCTL_INT(_vm, OID_AUTO, msync_flush_flags, CTLFLAG_RW, &msync_flush_flags, 0, - "Enable sequential iteration optimization"); + "Does nothing; kept for backward compatibility"); static int old_msync; SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0, "Use old (insecure) msync behavior"); +static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, + int pagerflags); static void vm_object_qcollapse(vm_object_t object); -static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags); static void vm_object_vndeallocate(vm_object_t object); /* @@ -763,278 +756,165 @@ vm_object_terminate(vm_object_t object) * The object must be locked. */ void -vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int flags) +vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, + int flags) { - vm_page_t p, np; - vm_pindex_t tstart, tend; - vm_pindex_t pi; - int clearobjflags; - int pagerflags; - int curgeneration; + vm_page_t np, p; + vm_pindex_t pi, tend; + int clearobjflags, curgeneration, n, pagerflags; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if ((object->flags & OBJ_MIGHTBEDIRTY) == 0) - return; KASSERT(object->type == OBJT_VNODE, ("Not a vnode object")); + if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 || + object->resident_page_count == 0) + return; - pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) ? VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; - pagerflags |= (flags & OBJPC_INVAL) ? VM_PAGER_PUT_INVAL : 0; + pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) != 0 ? + VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; + pagerflags |= (flags & OBJPC_INVAL) != 0 ? VM_PAGER_PUT_INVAL : 0; - vm_object_set_flag(object, OBJ_CLEANING); + tend = (end == 0) ? object->size : end; - tstart = start; - if (end == 0) { - tend = object->size; - } else { - tend = end; - } + vm_object_set_flag(object, OBJ_CLEANING); vm_page_lock_queues(); - /* - * If the caller is smart and only msync()s a range he knows is - * dirty, we may be able to avoid an object scan. This results in - * a phenominal improvement in performance. We cannot do this - * as a matter of course because the object may be huge - e.g. - * the size might be in the gigabytes or terrabytes. - */ - if (msync_flush_flags & MSYNC_FLUSH_HARDSEQ) { - vm_pindex_t tscan; - int scanlimit; - int scanreset; - - scanreset = object->resident_page_count / EASY_SCAN_FACTOR; - if (scanreset < 16) - scanreset = 16; - pagerflags |= VM_PAGER_IGNORE_CLEANCHK; - - scanlimit = scanreset; - tscan = tstart; - while (tscan < tend) { - curgeneration = object->generation; - p = vm_page_lookup(object, tscan); - if (p == NULL || p->valid == 0) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - vm_page_test_dirty(p); - if (p->dirty == 0) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - /* - * If we have been asked to skip nosync pages and - * this is a nosync page, we can't continue. - */ - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) { - if (--scanlimit == 0) - break; - ++tscan; - continue; - } - scanlimit = scanreset; - - /* - * This returns 0 if it was unable to busy the first - * page (i.e. had to sleep). - */ - tscan += vm_object_page_collect_flush(object, p, curgeneration, pagerflags); - } - - /* - * If everything was dirty and we flushed it successfully, - * and the requested range is not the entire object, we - * don't have to mess with CLEANCHK or MIGHTBEDIRTY and can - * return immediately. - */ - if (tscan >= tend && (tstart || tend < object->size)) { - vm_page_unlock_queues(); - vm_object_clear_flag(object, OBJ_CLEANING); - return; - } - pagerflags &= ~VM_PAGER_IGNORE_CLEANCHK; - } /* - * Generally set CLEANCHK interlock and make the page read-only so - * we can then clear the object flags. + * Make the page read-only so we can then clear the object flags. * * However, if this is a nosync mmap then the object is likely to * stay dirty so do not mess with the page and do not clear the * object flags. */ clearobjflags = 1; - TAILQ_FOREACH(p, &object->memq, listq) { - p->oflags |= VPO_CLEANCHK; - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) + for (p = vm_page_find_least(object, start); + p != NULL && p->pindex < tend; p = TAILQ_NEXT(p, listq)) { + if ((flags & OBJPC_NOSYNC) != 0 && + (p->oflags & VPO_NOSYNC) != 0) clearobjflags = 0; else pmap_remove_write(p); } - if (clearobjflags && (tstart == 0) && (tend == object->size)) + if (clearobjflags && (start == 0) && (tend == object->size)) vm_object_clear_flag(object, OBJ_MIGHTBEDIRTY); rescan: curgeneration = object->generation; - for (p = TAILQ_FIRST(&object->memq); p; p = np) { - int n; - - np = TAILQ_NEXT(p, listq); - -again: + for (p = vm_page_find_least(object, start); p != NULL; p = np) { pi = p->pindex; - if ((p->oflags & VPO_CLEANCHK) == 0 || - (pi < tstart) || (pi >= tend) || - p->valid == 0) { - p->oflags &= ~VPO_CLEANCHK; + if (pi >= tend) + break; + np = TAILQ_NEXT(p, listq); + if (p->valid == 0) continue; + while (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) { + vm_page_lock_queues(); + if (object->generation != curgeneration) + goto rescan; } - vm_page_test_dirty(p); - if (p->dirty == 0) { - p->oflags &= ~VPO_CLEANCHK; + if (p->dirty == 0) continue; - } /* * If we have been asked to skip nosync pages and this is a * nosync page, skip it. Note that the object flags were * not cleared in this case so we do not have to set them. */ - if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) { - p->oflags &= ~VPO_CLEANCHK; + if ((flags & OBJPC_NOSYNC) != 0 && + (p->oflags & VPO_NOSYNC) != 0) continue; - } - - n = vm_object_page_collect_flush(object, p, - curgeneration, pagerflags); - if (n == 0) - goto rescan; + n = vm_object_page_collect_flush(object, p, pagerflags); + KASSERT(n > 0, ("vm_object_page_collect_flush failed")); if (object->generation != curgeneration) goto rescan; - - /* - * Try to optimize the next page. If we can't we pick up - * our (random) scan where we left off. - */ - if (msync_flush_flags & MSYNC_FLUSH_SOFTSEQ) { - if ((p = vm_page_lookup(object, pi + n)) != NULL) - goto again; - } + np = vm_page_find_least(object, pi + n); } vm_page_unlock_queues(); #if 0 - VOP_FSYNC(vp, (pagerflags & VM_PAGER_PUT_SYNC)?MNT_WAIT:0, curproc); + VOP_FSYNC(vp, (pagerflags & VM_PAGER_PUT_SYNC) ? MNT_WAIT : 0); #endif vm_object_clear_flag(object, OBJ_CLEANING); - return; } static int -vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags) +vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int pagerflags) { int runlen; int maxf; int chkb; int maxb; - int i; + int i, index; vm_pindex_t pi; vm_page_t maf[vm_pageout_page_count]; vm_page_t mab[vm_pageout_page_count]; vm_page_t ma[vm_pageout_page_count]; + vm_page_t tp, p1; mtx_assert(&vm_page_queue_mtx, MA_OWNED); pi = p->pindex; - while (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) { - vm_page_lock_queues(); - if (object->generation != curgeneration) { - return(0); - } - } maxf = 0; - for(i = 1; i < vm_pageout_page_count; i++) { - vm_page_t tp; - - if ((tp = vm_page_lookup(object, pi + i)) != NULL) { - if ((tp->oflags & VPO_BUSY) || - ((pagerflags & VM_PAGER_IGNORE_CLEANCHK) == 0 && - (tp->oflags & VPO_CLEANCHK) == 0) || - (tp->busy != 0)) - break; - vm_page_test_dirty(tp); - if (tp->dirty == 0) { - tp->oflags &= ~VPO_CLEANCHK; - break; - } - maf[ i - 1 ] = tp; - maxf++; - continue; - } - break; + for (i = 1, p1 = p; i < vm_pageout_page_count; i++) { + tp = vm_page_next(p1); + if (tp == NULL || tp->busy != 0 || (tp->oflags & VPO_BUSY) != 0) + break; + vm_page_test_dirty(tp); + if (tp->dirty == 0) + break; + maf[i - 1] = p1 = tp; + maxf++; } maxb = 0; chkb = vm_pageout_page_count - maxf; - if (chkb) { - for(i = 1; i < chkb;i++) { - vm_page_t tp; - - if ((tp = vm_page_lookup(object, pi - i)) != NULL) { - if ((tp->oflags & VPO_BUSY) || - ((pagerflags & VM_PAGER_IGNORE_CLEANCHK) == 0 && - (tp->oflags & VPO_CLEANCHK) == 0) || - (tp->busy != 0)) - break; - vm_page_test_dirty(tp); - if (tp->dirty == 0) { - tp->oflags &= ~VPO_CLEANCHK; - break; - } - mab[ i - 1 ] = tp; - maxb++; - continue; - } + for (i = 1, p1 = p; i < chkb; i++) { + tp = vm_page_prev(p1); + if (tp == NULL || tp->busy != 0 || (tp->oflags & VPO_BUSY) != 0) break; - } + vm_page_test_dirty(tp); + if (tp->dirty == 0) + break; + mab[i - 1] = p1 = tp; + maxb++; } - for(i = 0; i < maxb; i++) { - int index = (maxb - i) - 1; + for (i = 0; i < maxb; i++) { + index = (maxb - i) - 1; ma[index] = mab[i]; - ma[index]->oflags &= ~VPO_CLEANCHK; } - p->oflags &= ~VPO_CLEANCHK; ma[maxb] = p; - for(i = 0; i < maxf; i++) { - int index = (maxb + i) + 1; + for (i = 0; i < maxf; i++) { + index = (maxb + i) + 1; ma[index] = maf[i]; - ma[index]->oflags &= ~VPO_CLEANCHK; } runlen = maxb + maxf + 1; vm_pageout_flush(ma, runlen, pagerflags); for (i = 0; i < runlen; i++) { - if (ma[i]->dirty) { - pmap_remove_write(ma[i]); - ma[i]->oflags |= VPO_CLEANCHK; - + if (ma[i]->dirty != 0) { + KASSERT((ma[i]->flags & PG_WRITEABLE) == 0, + ("vm_object_page_collect_flush: page %p is not write protected", + ma[i])); + } + } + for (i = 0; i < maxf; i++) { + if (ma[i + maxb + 1]->dirty != 0) { /* * maxf will end up being the actual number of pages * we wrote out contiguously, non-inclusive of the * first page. We do not count look-behind pages. */ - if (i >= maxb + 1 && (maxf > i - maxb - 1)) - maxf = i - maxb - 1; + if (maxf > i) { + maxf = i; + break; + } } } - return(maxf + 1); + return (maxf + 1); } /* Modified: stable/8/sys/vm/vm_page.h ============================================================================== --- stable/8/sys/vm/vm_page.h Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_page.h Fri Nov 19 10:14:07 2010 (r215517) @@ -142,7 +142,6 @@ struct vm_page { */ #define VPO_BUSY 0x0001 /* page is in transit */ #define VPO_WANTED 0x0002 /* someone is waiting for page */ -#define VPO_CLEANCHK 0x0100 /* page will be checked for cleaning */ #define VPO_SWAPINPROG 0x0200 /* swap I/O in progress on page */ #define VPO_NOSYNC 0x0400 /* do not collect for syncer */ Modified: stable/8/sys/vm/vm_pager.h ============================================================================== --- stable/8/sys/vm/vm_pager.h Fri Nov 19 10:01:30 2010 (r215516) +++ stable/8/sys/vm/vm_pager.h Fri Nov 19 10:14:07 2010 (r215517) @@ -90,7 +90,6 @@ extern struct pagerops sgpagerops; #define VM_PAGER_PUT_SYNC 0x0001 #define VM_PAGER_PUT_INVAL 0x0002 -#define VM_PAGER_IGNORE_CLEANCHK 0x0004 #define VM_PAGER_CLUSTER_OK 0x0008 #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 10:15:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0F010656A3; Fri, 19 Nov 2010 10:15:29 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBDE8FC12; Fri, 19 Nov 2010 10:15: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 oAJAFTk3068815; Fri, 19 Nov 2010 10:15:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAFTrn068813; Fri, 19 Nov 2010 10:15:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011191015.oAJAFTrn068813@svn.freebsd.org> From: Kevin Lo Date: Fri, 19 Nov 2010 10: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: r215518 - head/usr.bin/at X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:15:29 -0000 Author: kevlo Date: Fri Nov 19 10:15:29 2010 New Revision: 215518 URL: http://svn.freebsd.org/changeset/base/215518 Log: Close file and directory descriptors MFC after: 3 days Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Fri Nov 19 10:14:07 2010 (r215517) +++ head/usr.bin/at/at.c Fri Nov 19 10:15:29 2010 (r215518) @@ -524,6 +524,7 @@ list_jobs(long *joblist, int len) jobno); } PRIV_END + closedir(spool); } static void @@ -594,6 +595,7 @@ process_jobs(int argc, char **argv, int while((ch = getc(fp)) != EOF) { putchar(ch); } + fclose(fp); } break; @@ -604,6 +606,7 @@ process_jobs(int argc, char **argv, int } } } + closedir(spool); } /* delete_jobs */ #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 10:18:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EC53106566B; Fri, 19 Nov 2010 10:18:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1407A8FC16; Fri, 19 Nov 2010 10:18: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 oAJAIwwO069130; Fri, 19 Nov 2010 10:18:58 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAIwtP069128; Fri, 19 Nov 2010 10:18:58 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011191018.oAJAIwtP069128@svn.freebsd.org> From: Kevin Lo Date: Fri, 19 Nov 2010 10:18: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: r215519 - head/usr.bin/chkey X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:18:59 -0000 Author: kevlo Date: Fri Nov 19 10:18:58 2010 New Revision: 215519 URL: http://svn.freebsd.org/changeset/base/215519 Log: Fix fd leak MFC after: 3 days Modified: head/usr.bin/chkey/chkey.c Modified: head/usr.bin/chkey/chkey.c ============================================================================== --- head/usr.bin/chkey/chkey.c Fri Nov 19 10:15:29 2010 (r215518) +++ head/usr.bin/chkey/chkey.c Fri Nov 19 10:18:58 2010 (r215519) @@ -203,6 +203,7 @@ main(int argc, char **argv) write(fd, &newline, sizeof(newline)) < 0) warn("%s: write", ROOTKEY); } + close(fd); } if (key_setsecret(secret) < 0) From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 12:56:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AFE1065672; Fri, 19 Nov 2010 12:56:14 +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 209E68FC19; Fri, 19 Nov 2010 12:56: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 oAJCuEGb074489; Fri, 19 Nov 2010 12:56:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJCuDFH074482; Fri, 19 Nov 2010 12:56:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011191256.oAJCuDFH074482@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 12:56: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: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 12:56:14 -0000 Author: jilles Date: Fri Nov 19 12:56:13 2010 New Revision: 215520 URL: http://svn.freebsd.org/changeset/base/215520 Log: sh: Add printf builtin. This was removed in 2001 but I think it is appropriate to add it back: * I do not want to encourage people to write fragile and non-portable echo commands by making printf much slower than echo. * Recent versions of Autoconf use it a lot. * Almost no software still wants to support systems that do not have printf(1) at all. * In many other shells printf is already a builtin. Side effect: printf is now always the builtin version (which behaves identically to /usr/bin/printf) and cannot be overridden via PATH (except via the undocumented %builtin mechanism). Code size increases about 5K on i386. Embedded folks might want to replace /usr/bin/printf with a hard link to /usr/bin/alias. Modified: head/bin/sh/Makefile head/bin/sh/builtins.def head/bin/sh/sh.1 head/share/man/man1/builtin.1 head/usr.bin/printf/printf.1 head/usr.bin/printf/printf.c Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/Makefile Fri Nov 19 12:56:13 2010 (r215520) @@ -5,7 +5,7 @@ PROG= sh INSTALLFLAGS= -S SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ - mystring.c options.c output.c parser.c redir.c show.c \ + mystring.c options.c output.c parser.c printf.c redir.c show.c \ test.c trap.c var.c GENSRCS= builtins.c init.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h @@ -26,7 +26,8 @@ WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../test + ${.CURDIR}/../test \ + ${.CURDIR}/../../usr.bin/printf CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ mksyntax mksyntax.o Modified: head/bin/sh/builtins.def ============================================================================== --- head/bin/sh/builtins.def Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/builtins.def Fri Nov 19 12:56:13 2010 (r215520) @@ -71,7 +71,7 @@ histcmd -h fc jobidcmd jobid jobscmd jobs localcmd local -#printfcmd printf +printfcmd printf pwdcmd pwd readcmd read returncmd -s return Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/sh.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd November 19, 2010 .Dt SH 1 .Os .Sh NAME @@ -2049,6 +2049,9 @@ line. See the .Sx Functions subsection. +.It Ic printf +A built-in equivalent of +.Xr printf 1 . .It Ic pwd Op Fl L | P Print the path of the current directory. The built-in command may @@ -2470,6 +2473,7 @@ will return the argument. .Xr echo 1 , .Xr ed 1 , .Xr emacs 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr test 1 , .Xr vi 1 , Modified: head/share/man/man1/builtin.1 ============================================================================== --- head/share/man/man1/builtin.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/share/man/man1/builtin.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2010 +.Dd November 19, 2010 .Dt BUILTIN 1 .Os .Sh NAME @@ -99,6 +99,7 @@ .Nm onintr , .Nm popd , .Nm printenv , +.Nm printf , .Nm pushd , .Nm pwd , .Nm read , @@ -263,6 +264,7 @@ but are implemented as scripts using a b .It Ic onintr Ta \&No Ta Yes Ta \&No .It Ic popd Ta \&No Ta Yes Ta \&No .It Ic printenv Ta Yes Ta Yes Ta \&No +.It Ic printf Ta Yes Ta \&No Ta Yes .It Ic pushd Ta \&No Ta Yes Ta \&No .It Ic pwd Ta Yes Ta \&No Ta Yes .It Ic read Ta No** Ta \&No Ta Yes @@ -313,6 +315,7 @@ but are implemented as scripts using a b .Xr nice 1 , .Xr nohup 1 , .Xr printenv 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr sh 1 , .Xr test 1 , Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/usr.bin/printf/printf.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -35,7 +35,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd November 19, 2010 .Dt PRINTF 1 .Os .Sh NAME @@ -306,6 +306,13 @@ character is defined in the program's lo In no case does a non-existent or small field width cause truncation of a field; padding takes place only if the specified field width exceeds the actual width. +.Pp +Some shells may provide a builtin +.Nm +command which is similar or identical to this utility. +Consult the +.Xr builtin 1 +manual page. .Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY @@ -316,7 +323,9 @@ with a digit to the .Tn ASCII code of the first character is not supported. .Sh SEE ALSO +.Xr builtin 1 , .Xr echo 1 , +.Xr sh 1 , .Xr printf 3 .Sh STANDARDS The Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Fri Nov 19 10:18:58 2010 (r215519) +++ head/usr.bin/printf/printf.c Fri Nov 19 12:56:13 2010 (r215520) @@ -62,6 +62,7 @@ static const char rcsid[] = #define main printfcmd #include "bltin/bltin.h" #include "memalloc.h" +#include "error.h" #else #define warnx1(a, b, c) warnx(a) #define warnx2(a, b, c) warnx(a, b) @@ -90,7 +91,7 @@ static const char rcsid[] = } while (0) static int asciicode(void); -static char *doformat(char *, int *); +static char *printf_doformat(char *, int *); static int escape(char *, int, size_t *); static int getchr(void); static int getfloating(long double *, int); @@ -114,9 +115,12 @@ main(int argc, char *argv[]) int ch, chopped, end, rval; char *format, *fmt, *start; -#ifndef BUILTIN +#if !defined(BUILTIN) && !defined(SHELL) (void) setlocale(LC_NUMERIC, ""); #endif +#ifdef SHELL + optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ +#endif while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': @@ -132,6 +136,9 @@ main(int argc, char *argv[]) return (1); } +#ifdef SHELL + INTOFF; +#endif /* * Basic algorithm is to scan the format string for conversion * specifications -- once one is found, find out if the field @@ -154,9 +161,13 @@ main(int argc, char *argv[]) putchar('%'); fmt += 2; } else { - fmt = doformat(fmt, &rval); - if (fmt == NULL) + fmt = printf_doformat(fmt, &rval); + if (fmt == NULL) { +#ifdef SHELL + INTON; +#endif return (1); + } end = 0; } start = fmt; @@ -166,11 +177,18 @@ main(int argc, char *argv[]) if (end == 1) { warnx1("missing format character", NULL, NULL); +#ifdef SHELL + INTON; +#endif return (1); } fwrite(start, 1, fmt - start, stdout); - if (chopped || !*gargv) + if (chopped || !*gargv) { +#ifdef SHELL + INTON; +#endif return (rval); + } /* Restart at the beginning of the format string. */ fmt = format; end = 1; @@ -180,7 +198,7 @@ main(int argc, char *argv[]) static char * -doformat(char *start, int *rval) +printf_doformat(char *start, int *rval) { static const char skip1[] = "#'-+ 0"; static const char skip2[] = "0123456789"; From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 14:26:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796411065672; Fri, 19 Nov 2010 14:26:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 638B58FC17; Fri, 19 Nov 2010 14:26: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 oAJEQkCJ076790; Fri, 19 Nov 2010 14:26:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJEQk0I076779; Fri, 19 Nov 2010 14:26:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191426.oAJEQk0I076779@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 14:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215521 - in stable/8: share/man/man4 sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpic... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 14:26:46 -0000 Author: avg Date: Fri Nov 19 14:26:45 2010 New Revision: 215521 URL: http://svn.freebsd.org/changeset/base/215521 Log: MFC imports of ACPICA revisions 20100428 through 20101013 Plus related changes and ehancements. Full list of revisions: o----------------------------------------------------------------------- r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines Merge ACPICA 20100428. o----------------------------------------------------------------------- r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines Simplify a function for getting brightness levels. o----------------------------------------------------------------------- r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines Merge ACPICA 20100702. o----------------------------------------------------------------------- r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines Fix mis-merges in the previous commit. o----------------------------------------------------------------------- r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines If there is any pending sleep request, disallow entering S5 state. Otherwise, bad things may happen. ;-) o----------------------------------------------------------------------- r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines Merge ACPICA 20100806. o----------------------------------------------------------------------- r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines When ACPI reports current battery consumption rate in mAmps, print it also in mWatts. Values in mAmps are not always suitable, because they depend on battery voltage, which depends on battery type and charge level. o----------------------------------------------------------------------- r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines Merge ACPICA 20100915. o----------------------------------------------------------------------- r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines Mark acpi_bus_number() as __unused. This allows clang to this file without any warnings. o----------------------------------------------------------------------- r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines Remove acpi_bus_number() completely. It had to be removed in r212761. Pointed out by: jhb o----------------------------------------------------------------------- r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines Clean up unused headers. o----------------------------------------------------------------------- r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines Merge ACPICA 20101013. o----------------------------------------------------------------------- r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines Add two new loader tunables 'hw.acpi.install_interface' and 'hw.acpi.remove_interface'. hw.acpi.install_interface lets you install new interfaces. Conversely, hw.acpi.remove_interface lets you remove OS interfaces from the pre-defined list in ACPICA. For example, hw.acpi.install_interface="FreeBSD" lets _OSI("FreeBSD") method to return 0xffffffff (or success) and hw.acpi.remove_interface="Windows 2009" lets _OSI("Windows 2009") method to return zero (or failure). Both are comma-separated lists and leading white spaces are ignored. For example, the following examples are valid: hw.acpi.install_interface="Linux, FreeBSD" hw.acpi.remove_interface="Windows 2006, Windows 2006.1" o----------------------------------------------------------------------- r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines Document newly added loader tunables "hw.acpi.install_interface" and "hw.acpi.remove_interface". o----------------------------------------------------------------------- r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type in ACPICA. Reshuffle the code a bit to make sure this kludge only applies to these two specical cases and to make it cleaner. o----------------------------------------------------------------------- r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines Fix a use-after-free bug for extended IRQ resource[1]. When _PRS buffer is copied as a template for _SRS, a string pointer for descriptor name is also copied and it becomes stale as soon as it gets de-allocated[2]. Now _CRS is used as a template for _SRS as ACPI specification suggests if it is usable. The template from _PRS is still utilized but only when _CRS is not available or broken. To avoid use-after-free the problem in this case, however, only mandatory fields are copied, optional data is removed, and structure length is adjusted accordingly. Reported by: hps[1] Analyzed by: avg[2] Tested by: hps o----------------------------------------------------------------------- r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines Add a forgotten change from the previous commit. o----------------------------------------------------------------------- r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines Consistently use padding `_' in the comment. o----------------------------------------------------------------------- Reviewed by: jkim Tested by: Alexandre "Sunny" Kovalenko On behalf of: jkim Added: stable/8/sys/contrib/dev/acpica/compiler/aslmessages.h - copied unchanged from r213806, head/sys/contrib/dev/acpica/compiler/aslmessages.h stable/8/sys/contrib/dev/acpica/compiler/aslrestype1i.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype1i.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2d.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2d.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2e.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2e.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2q.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2q.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2w.c - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2w.c stable/8/sys/contrib/dev/acpica/compiler/dtcompile.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtcompile.c stable/8/sys/contrib/dev/acpica/compiler/dtcompiler.h - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/8/sys/contrib/dev/acpica/compiler/dtfield.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtfield.c stable/8/sys/contrib/dev/acpica/compiler/dtio.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtio.c stable/8/sys/contrib/dev/acpica/compiler/dtsubtable.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtsubtable.c stable/8/sys/contrib/dev/acpica/compiler/dttable.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttable.c stable/8/sys/contrib/dev/acpica/compiler/dttemplate.c - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.c stable/8/sys/contrib/dev/acpica/compiler/dttemplate.h - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.h stable/8/sys/contrib/dev/acpica/compiler/dtutils.c - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtutils.c stable/8/sys/contrib/dev/acpica/events/evgpeinit.c - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeinit.c stable/8/sys/contrib/dev/acpica/events/evgpeutil.c - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeutil.c stable/8/sys/contrib/dev/acpica/hardware/hwpci.c - copied unchanged from r212761, head/sys/contrib/dev/acpica/hardware/hwpci.c stable/8/sys/contrib/dev/acpica/utilities/utosi.c - copied, changed from r210976, head/sys/contrib/dev/acpica/utilities/utosi.c stable/8/sys/contrib/dev/acpica/utilities/utxferror.c - copied unchanged from r212761, head/sys/contrib/dev/acpica/utilities/utxferror.c Modified: stable/8/share/man/man4/acpi.4 stable/8/sys/conf/files stable/8/sys/contrib/dev/acpica/acpica_prep.sh stable/8/sys/contrib/dev/acpica/changes.txt stable/8/sys/contrib/dev/acpica/common/adfile.c stable/8/sys/contrib/dev/acpica/common/adisasm.c stable/8/sys/contrib/dev/acpica/common/adwalk.c stable/8/sys/contrib/dev/acpica/common/dmextern.c stable/8/sys/contrib/dev/acpica/common/dmrestag.c stable/8/sys/contrib/dev/acpica/common/dmtable.c stable/8/sys/contrib/dev/acpica/common/dmtbdump.c stable/8/sys/contrib/dev/acpica/common/dmtbinfo.c stable/8/sys/contrib/dev/acpica/common/getopt.c stable/8/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/8/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/8/sys/contrib/dev/acpica/compiler/aslcompile.c stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.y stable/8/sys/contrib/dev/acpica/compiler/asldefine.h stable/8/sys/contrib/dev/acpica/compiler/aslerror.c stable/8/sys/contrib/dev/acpica/compiler/aslfiles.c stable/8/sys/contrib/dev/acpica/compiler/aslglobal.h stable/8/sys/contrib/dev/acpica/compiler/asllisting.c stable/8/sys/contrib/dev/acpica/compiler/asllookup.c stable/8/sys/contrib/dev/acpica/compiler/aslmain.c stable/8/sys/contrib/dev/acpica/compiler/aslopcodes.c stable/8/sys/contrib/dev/acpica/compiler/aslopt.c stable/8/sys/contrib/dev/acpica/compiler/aslpredef.c stable/8/sys/contrib/dev/acpica/compiler/aslresource.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype1.c stable/8/sys/contrib/dev/acpica/compiler/aslrestype2.c stable/8/sys/contrib/dev/acpica/compiler/aslstartup.c stable/8/sys/contrib/dev/acpica/compiler/asltransform.c stable/8/sys/contrib/dev/acpica/compiler/asltree.c stable/8/sys/contrib/dev/acpica/compiler/asltypes.h stable/8/sys/contrib/dev/acpica/compiler/aslutils.c stable/8/sys/contrib/dev/acpica/debugger/dbcmds.c stable/8/sys/contrib/dev/acpica/debugger/dbdisply.c stable/8/sys/contrib/dev/acpica/debugger/dbexec.c stable/8/sys/contrib/dev/acpica/debugger/dbfileio.c stable/8/sys/contrib/dev/acpica/debugger/dbhistry.c stable/8/sys/contrib/dev/acpica/debugger/dbinput.c stable/8/sys/contrib/dev/acpica/debugger/dbutils.c stable/8/sys/contrib/dev/acpica/disassembler/dmobject.c stable/8/sys/contrib/dev/acpica/disassembler/dmopcode.c stable/8/sys/contrib/dev/acpica/disassembler/dmresrc.c stable/8/sys/contrib/dev/acpica/dispatcher/dsinit.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmethod.c stable/8/sys/contrib/dev/acpica/dispatcher/dsmthdat.c stable/8/sys/contrib/dev/acpica/dispatcher/dsobject.c stable/8/sys/contrib/dev/acpica/dispatcher/dsopcode.c stable/8/sys/contrib/dev/acpica/dispatcher/dsutils.c stable/8/sys/contrib/dev/acpica/events/evgpe.c stable/8/sys/contrib/dev/acpica/events/evgpeblk.c stable/8/sys/contrib/dev/acpica/events/evrgnini.c stable/8/sys/contrib/dev/acpica/events/evxface.c stable/8/sys/contrib/dev/acpica/events/evxfevnt.c stable/8/sys/contrib/dev/acpica/events/evxfregn.c stable/8/sys/contrib/dev/acpica/executer/exconfig.c stable/8/sys/contrib/dev/acpica/executer/exdump.c stable/8/sys/contrib/dev/acpica/executer/exfldio.c stable/8/sys/contrib/dev/acpica/executer/exmutex.c stable/8/sys/contrib/dev/acpica/executer/exoparg1.c stable/8/sys/contrib/dev/acpica/executer/exprep.c stable/8/sys/contrib/dev/acpica/executer/exregion.c stable/8/sys/contrib/dev/acpica/executer/exsystem.c stable/8/sys/contrib/dev/acpica/hardware/hwgpe.c stable/8/sys/contrib/dev/acpica/hardware/hwsleep.c stable/8/sys/contrib/dev/acpica/hardware/hwvalid.c stable/8/sys/contrib/dev/acpica/include/acapps.h stable/8/sys/contrib/dev/acpica/include/acconfig.h stable/8/sys/contrib/dev/acpica/include/acdebug.h stable/8/sys/contrib/dev/acpica/include/acdisasm.h stable/8/sys/contrib/dev/acpica/include/acevents.h stable/8/sys/contrib/dev/acpica/include/acexcep.h stable/8/sys/contrib/dev/acpica/include/acglobal.h stable/8/sys/contrib/dev/acpica/include/achware.h stable/8/sys/contrib/dev/acpica/include/acinterp.h stable/8/sys/contrib/dev/acpica/include/aclocal.h stable/8/sys/contrib/dev/acpica/include/acmacros.h stable/8/sys/contrib/dev/acpica/include/acnamesp.h stable/8/sys/contrib/dev/acpica/include/acobject.h stable/8/sys/contrib/dev/acpica/include/acoutput.h stable/8/sys/contrib/dev/acpica/include/acpiosxf.h stable/8/sys/contrib/dev/acpica/include/acpixf.h stable/8/sys/contrib/dev/acpica/include/acpredef.h stable/8/sys/contrib/dev/acpica/include/acstruct.h stable/8/sys/contrib/dev/acpica/include/actbl.h stable/8/sys/contrib/dev/acpica/include/actbl2.h stable/8/sys/contrib/dev/acpica/include/actypes.h stable/8/sys/contrib/dev/acpica/include/acutils.h stable/8/sys/contrib/dev/acpica/include/amlresrc.h stable/8/sys/contrib/dev/acpica/include/platform/acenv.h stable/8/sys/contrib/dev/acpica/include/platform/acfreebsd.h stable/8/sys/contrib/dev/acpica/include/platform/acgcc.h stable/8/sys/contrib/dev/acpica/namespace/nsaccess.c stable/8/sys/contrib/dev/acpica/namespace/nsalloc.c stable/8/sys/contrib/dev/acpica/namespace/nsdump.c stable/8/sys/contrib/dev/acpica/namespace/nsinit.c stable/8/sys/contrib/dev/acpica/namespace/nsnames.c stable/8/sys/contrib/dev/acpica/namespace/nsparse.c stable/8/sys/contrib/dev/acpica/namespace/nsrepair.c stable/8/sys/contrib/dev/acpica/namespace/nsrepair2.c stable/8/sys/contrib/dev/acpica/namespace/nssearch.c stable/8/sys/contrib/dev/acpica/namespace/nsutils.c stable/8/sys/contrib/dev/acpica/namespace/nswalk.c stable/8/sys/contrib/dev/acpica/namespace/nsxfobj.c stable/8/sys/contrib/dev/acpica/osunixxf.c stable/8/sys/contrib/dev/acpica/tables/tbfadt.c stable/8/sys/contrib/dev/acpica/tables/tbfind.c stable/8/sys/contrib/dev/acpica/tables/tbinstal.c stable/8/sys/contrib/dev/acpica/tables/tbutils.c stable/8/sys/contrib/dev/acpica/tables/tbxface.c stable/8/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h stable/8/sys/contrib/dev/acpica/utilities/utcopy.c stable/8/sys/contrib/dev/acpica/utilities/utdebug.c stable/8/sys/contrib/dev/acpica/utilities/uteval.c stable/8/sys/contrib/dev/acpica/utilities/utglobal.c stable/8/sys/contrib/dev/acpica/utilities/utids.c stable/8/sys/contrib/dev/acpica/utilities/utinit.c stable/8/sys/contrib/dev/acpica/utilities/utmath.c stable/8/sys/contrib/dev/acpica/utilities/utmisc.c stable/8/sys/contrib/dev/acpica/utilities/utmutex.c stable/8/sys/contrib/dev/acpica/utilities/uttrack.c stable/8/sys/contrib/dev/acpica/utilities/utxface.c stable/8/sys/dev/acpica/Osd/OsdHardware.c stable/8/sys/dev/acpica/Osd/OsdMemory.c stable/8/sys/dev/acpica/acpi.c stable/8/sys/dev/acpica/acpi_button.c stable/8/sys/dev/acpica/acpi_ec.c stable/8/sys/dev/acpica/acpi_lid.c stable/8/sys/dev/acpica/acpi_pci_link.c stable/8/sys/dev/acpica/acpi_video.c stable/8/sys/modules/acpi/acpi/Makefile stable/8/usr.sbin/acpi/acpiconf/acpiconf.c stable/8/usr.sbin/acpi/acpidb/Makefile stable/8/usr.sbin/acpi/acpidump/acpi_user.c stable/8/usr.sbin/acpi/iasl/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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/acpi/ (props changed) Modified: stable/8/share/man/man4/acpi.4 ============================================================================== --- stable/8/share/man/man4/acpi.4 Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/share/man/man4/acpi.4 Fri Nov 19 14:26:45 2010 (r215521) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2010 +.Dd October 26, 2010 .Dt ACPI 4 .Os .Sh NAME @@ -224,6 +224,26 @@ Try increasing this number if you get th .Qq Li AE_NO_HARDWARE_RESPONSE . .It Va hw.acpi.host_mem_start Override the assumed memory starting address for PCI host bridges. +.It Va hw.acpi.install_interface , hw.acpi.remove_interface +Install or remove OS interface(s) to control return value of +.Ql _OSI +query method. When an OS interface is specified in +.Va hw.acpi.install_interface , +.Li _OSI +query for the interface returns it is +.Em supported . +Conversely, when an OS interface is specified in +.Va hw.acpi.remove_interface , +.Li _OSI +query returns it is +.Em not supported . +Multiple interfaces can be specified in a comma-separated list and +any leading white spaces will be ignored. For example, +.Qq Li FreeBSD, Linux +is a valid list of two interfaces +.Qq Li FreeBSD +and +.Qq Li Linux . .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. This can fix some graphics cards that have problems such as LCD white-out Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/conf/files Fri Nov 19 14:26:45 2010 (r215521) @@ -174,6 +174,8 @@ contrib/dev/acpica/dispatcher/dswstate.c contrib/dev/acpica/events/evevent.c optional acpi contrib/dev/acpica/events/evgpe.c optional acpi contrib/dev/acpica/events/evgpeblk.c optional acpi +contrib/dev/acpica/events/evgpeinit.c optional acpi +contrib/dev/acpica/events/evgpeutil.c optional acpi contrib/dev/acpica/events/evmisc.c optional acpi contrib/dev/acpica/events/evregion.c optional acpi contrib/dev/acpica/events/evrgnini.c optional acpi @@ -207,6 +209,7 @@ contrib/dev/acpica/executer/exsystem.c contrib/dev/acpica/executer/exutils.c optional acpi contrib/dev/acpica/hardware/hwacpi.c optional acpi contrib/dev/acpica/hardware/hwgpe.c optional acpi +contrib/dev/acpica/hardware/hwpci.c optional acpi contrib/dev/acpica/hardware/hwregs.c optional acpi contrib/dev/acpica/hardware/hwsleep.c optional acpi contrib/dev/acpica/hardware/hwtimer.c optional acpi @@ -271,9 +274,11 @@ contrib/dev/acpica/utilities/utmath.c o contrib/dev/acpica/utilities/utmisc.c optional acpi contrib/dev/acpica/utilities/utmutex.c optional acpi contrib/dev/acpica/utilities/utobject.c optional acpi +contrib/dev/acpica/utilities/utosi.c optional acpi contrib/dev/acpica/utilities/utresrc.c optional acpi contrib/dev/acpica/utilities/utstate.c optional acpi contrib/dev/acpica/utilities/utxface.c optional acpi +contrib/dev/acpica/utilities/utxferror.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: stable/8/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- stable/8/sys/contrib/dev/acpica/acpica_prep.sh Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/acpica_prep.sh Fri Nov 19 14:26:45 2010 (r215521) @@ -19,11 +19,11 @@ fulldirs="common compiler debugger disas tools utilities" # files to remove -stripdirs="acpisrc acpixtract examples generate os_specific" +stripdirs="acpisrc acpixtract examples generate os_specific tests" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ - aehandlers.c aemain.c aetables.c osunixdir.c readme.txt \ - utclib.c" + aehandlers.c aemain.c aetables.c aetables.h osunixdir.c \ + readme.txt utclib.c" # include files to canonify src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h \ @@ -33,7 +33,8 @@ src_headers="acapps.h accommon.h acconfi acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" -comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h" +comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ + asltypes.h dtcompiler.h dttemplate.h" platform_headers="acfreebsd.h acgcc.h" # pre-clean @@ -49,7 +50,7 @@ tar -x -z -f ${src} -C ${wrk} # strip files echo strip for i in ${stripdirs}; do - find ${wrk} -name ${i} -type d | xargs rm -r + find ${wrk} -name ${i} -type d -print | xargs rm -r done for i in ${stripfiles}; do find ${wrk} -name ${i} -type f -delete @@ -58,22 +59,22 @@ done # copy files echo copying full dirs for i in ${fulldirs}; do - find ${wrk} -name ${i} -type d | xargs -J % mv % ${dst} + find ${wrk} -name ${i} -type d -print | xargs -J % mv % ${dst} done echo copying remaining files -find ${wrk} -type f | xargs -J % mv % ${dst} +find ${wrk} -type f -print | xargs -J % mv % ${dst} # canonify include paths for H in ${src_headers}; do - find ${dst} -name "*.[chy]" -type f | \ + find ${dst} -name "*.[chy]" -type f -print | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done for H in ${comp_headers}; do - find ${dst}/compiler -name "*.[chly]" -type f | \ + find ${dst}/common ${dst}/compiler -name "*.[chly]" -type f | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done for H in ${platform_headers}; do - find ${dst}/include/platform -name "*.h" -type f | \ + find ${dst}/include/platform -name "*.h" -type f -print | \ xargs sed -i "" -e "s|[\"<]$H[\">]|\|g" done Modified: stable/8/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/8/sys/contrib/dev/acpica/changes.txt Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/changes.txt Fri Nov 19 14:26:45 2010 (r215521) @@ -1,4 +1,416 @@ ---------------------------------------- +13 October 2010. Summary of changes for version 20101013: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Added support to clear the PCIEXP_WAKE event. When clearing ACPI events, now +clear the PCIEXP_WAKE_STS bit in the ACPI PM1 Status Register, via +HwClearAcpiStatus. Original change from Colin King. ACPICA BZ 880. + +Changed the type of the predefined namespace object _TZ from ThermalZone to +Device. This was found to be confusing to the host software that processes +the various thermal zones, since _TZ is not really a ThermalZone. However, a +Notify() can still be performed on it. ACPICA BZ 876. Suggestion from Rui +Zhang. + +Added Windows Vista SP2 to the list of supported _OSI strings. The actual +string is "Windows 2006 SP2". + +Eliminated duplicate code in AcpiUtExecute* functions. Now that the nsrepair +code automatically repairs _HID-related strings, this type of code is no +longer needed in Execute_HID, Execute_CID, and Execute_UID. ACPICA BZ 878. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented additional compile-time validation for _HID strings. The +non-hex prefix (such as "PNP" or "ACPI") must be uppercase, and the length of +the string must be exactly seven or eight characters. For both _HID and _CID +strings, all characters must be alphanumeric. ACPICA BZ 874. + +iASL: Allow certain "null" resource descriptors. Some BIOS code creates +descriptors that are mostly or all zeros, with the expectation that they will +be filled in at runtime. iASL now allows this as long as there is a "resource +tag" (name) associated with the descriptor, which gives the ASL a handle +needed to modify the descriptor. ACPICA BZ 873. + +Added single-thread support to the generic Unix application OSL. Primarily +for iASL support, this change removes the use of semaphores in the single- +threaded ACPICA tools/applications - increasing performance. The +_MULTI_THREADED option was replaced by the (reverse) ACPI_SINGLE_THREADED +option. ACPICA BZ 879. + +AcpiExec: several fixes for the 64-bit version. Adds XSDT support and support +for 64-bit DSDT/FACS addresses in the FADT. Lin Ming. + +iASL: Moved all compiler messages to a new file, aslmessages.h. + +---------------------------------------- +15 September 2010. Summary of changes for version 20100915: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Removed the AcpiOsDerivePciId OSL interface. The various host implementations +of this function were not OS-dependent and are now obsolete and can be +removed from all host OSLs. This function has been replaced by +AcpiHwDerivePciId, which is now part of the ACPICA core code. +AcpiHwDerivePciId has been implemented without recursion. Adds one new +module, hwpci.c. ACPICA BZ 857. + +Implemented a dynamic repair for _HID and _CID strings. The following +problems are now repaired at runtime: 1) Remove a leading asterisk in the +string, and 2) the entire string is uppercased. Both repairs are in +accordance with the ACPI specification and will simplify host driver code. +ACPICA BZ 871. + +The ACPI_THREAD_ID type is no longer configurable, internally it is now +always UINT64. This simplifies the ACPICA code, especially any printf output. +UINT64 is the only common data type for all thread_id types across all +operating systems. It is now up to the host OSL to cast the native thread_id +type to UINT64 before returning the value to ACPICA (via AcpiOsGetThreadId). +Lin Ming, Bob Moore. + +Added the ACPI_INLINE type to enhance the ACPICA configuration. The "inline" +keyword is not standard across compilers, and this type allows inline to be +configured on a per-compiler basis. Lin Ming. + +Made the system global AcpiGbl_SystemAwakeAndRunning publically available. +Added an extern for this boolean in acpixf.h. Some hosts utilize this value +during suspend/restore operations. ACPICA BZ 869. + +All code that implements error/warning messages with the "ACPI:" prefix has +been moved to a new module, utxferror.c. + +The UINT64_OVERLAY was moved to utmath.c, which is the only module where it +is used. ACPICA BZ 829. Lin Ming, Bob Moore. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Write ACPI errors to stderr instead of the output file. +This keeps the output files free of random error messages that may originate +from within the namespace/interpreter code. Used this opportunity to merge +all ACPI:-style messages into a single new module, utxferror.c. ACPICA BZ +866. Lin Ming, Bob Moore. + +Tools: update some printfs for ansi warnings on size_t. Handle width change +of size_t on 32-bit versus 64-bit generations. Lin Ming. + +---------------------------------------- +06 August 2010. Summary of changes for version 20100806: + +1) ACPI CA Core Subsystem: + +Designed and implemented a new host interface to the _OSI support code. This +will allow the host to dynamically add or remove multiple _OSI strings, as +well as install an optional handler that is called for each _OSI invocation. +Also added a new AML debugger command, 'osi' to display and modify the global +_OSI string table, and test support in the AcpiExec utility. See the ACPICA +reference manual for full details. Lin Ming, Bob Moore. ACPICA BZ 836. +New Functions: + AcpiInstallInterface - Add an _OSI string. + AcpiRemoveInterface - Delete an _OSI string. + AcpiInstallInterfaceHandler - Install optional _OSI handler. +Obsolete Functions: + AcpiOsValidateInterface - no longer used. +New Files: + source/components/utilities/utosi.c + +Re-introduced the support to enable multi-byte transfers for Embedded +Controller (EC) operation regions. A reported problem was found to be a bug +in the host OS, not in the multi-byte support. Previously, the maximum data +size passed to the EC operation region handler was a single byte. There are +often EC Fields larger than one byte that need to be transferred, and it is +useful for the EC driver to lock these as a single transaction. This change +enables single transfers larger than 8 bits. This effectively changes the +access to the EC space from ByteAcc to AnyAcc, and will probably require +changes to the host OS Embedded Controller driver to enable 16/32/64/256-bit +transfers in addition to 8-bit transfers. Alexey Starikovskiy, Lin Ming. + +Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The +prototype in acpiosxf.h had the output value pointer as a (void *). +It should be a (UINT64 *). This may affect some host OSL code. + +Fixed a couple problems with the recently modified Linux makefiles for iASL +and AcpiExec. These new makefiles place the generated object files in the +local directory so that there can be no collisions between the files that are +shared between them that are compiled with different options. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.0K Code, 51.5K Data, 215.5K Total + Current Release: + Non-Debug Version: 89.1K Code, 19.0K Data, 108.1K Total + Debug Version: 165.1K Code, 51.9K Data, 217.0K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Added a new option (-da, "disassemble all") to load the +namespace from and disassemble an entire group of AML files. Useful for +loading all of the AML tables for a given machine (DSDT, SSDT1...SSDTn) and +disassembling with one simple command. ACPICA BZ 865. Lin Ming. + +iASL: Allow multiple invocations of -e option. This change allows multiple +uses of -e on the command line: "-e ssdt1.dat -e ssdt2.dat". ACPICA BZ 834. +Lin Ming. + +---------------------------------------- +02 July 2010. Summary of changes for version 20100702: + +1) ACPI CA Core Subsystem: + +Implemented several updates to the recently added GPE reference count +support. The model for "wake" GPEs is changing to give the host OS complete +control of these GPEs. Eventually, the ACPICA core will not execute any _PRW +methods, since the host already must execute them. Also, additional changes +were made to help ensure that the reference counts are kept in proper +synchronization with reality. Rafael J. Wysocki. + +1) Ensure that GPEs are not enabled twice during initialization. +2) Ensure that GPE enable masks stay in sync with the reference count. +3) Do not inadvertently enable GPEs when writing GPE registers. +4) Remove the internal wake reference counter and add new AcpiGpeWakeup +interface. This interface will set or clear individual GPEs for wakeup. +5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces +are now used for "runtime" GPEs only. + +Changed the behavior of the GPE install/remove handler interfaces. The GPE is +no longer disabled during this process, as it was found to cause problems on +some machines. Rafael J. Wysocki. + +Reverted a change introduced in version 20100528 to enable Embedded +Controller multi-byte transfers. This change was found to cause problems with +Index Fields and possibly Bank Fields. It will be reintroduced when these +problems have been resolved. + +Fixed a problem with references to Alias objects within Package Objects. A +reference to an Alias within the definition of a Package was not always +resolved properly. Aliases to objects like Processors, Thermal zones, etc. +were resolved to the actual object instead of a reference to the object as it +should be. Package objects are only allowed to contain integer, string, +buffer, package, and reference objects. Redhat bugzilla 608648. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.1K Code, 51.5K Data, 215.6K Total + Current Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.0K Code, 51.5K Data, 215.5K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new compiler subsystem to allow definition and +compilation of the non-AML ACPI tables such as FADT, MADT, SRAT, etc. These +are called "ACPI Data Tables", and the new compiler is the "Data Table +Compiler". This compiler is intended to simplify the existing error-prone +process of creating these tables for the BIOS, as well as allowing the +disassembly, modification, recompilation, and override of existing ACPI data +tables. See the iASL User Guide for detailed information. + +iASL: Implemented a new Template Generator option in support of the new Data +Table Compiler. This option will create examples of all known ACPI tables +that can be used as the basis for table development. See the iASL +documentation and the -T option. + +Disassembler and headers: Added support for the WDDT ACPI table (Watchdog +Descriptor Table). + +Updated the Linux makefiles for iASL and AcpiExec to place the generated +object files in the local directory so that there can be no collisions +between the shared files between them that are generated with different +options. + +Added support for Mac OS X in the Unix OSL used for iASL and AcpiExec. Use +the #define __APPLE__ to enable this support. + +---------------------------------------- +28 May 2010. Summary of changes for version 20100528: + +Note: The ACPI 4.0a specification was released on April 5, 2010 and is +available at www.acpi.info. This is primarily an errata release. + +1) ACPI CA Core Subsystem: + +Undefined ACPI tables: We are looking for the definitions for the following +ACPI tables that have been seen in the field: ATKG, IEIT, GSCI. + +Implemented support to enable multi-byte transfers for Embedded Controller +(EC) operation regions. Previously, the maximum data size passed to the EC +operation region handler was a single byte. There are often EC Fields larger +than one byte that need to be transferred, and it is useful for the EC driver +to lock these as a single transaction. This change enables single transfers +larger than 8 bits. This effectively changes the access to the EC space from +ByteAcc to AnyAcc, and will probably require changes to the host OS Embedded +Controller driver to enable 16/32/64/256-bit transfers in addition to 8-bit +transfers. Alexey Starikovskiy, Lin Ming + +Implemented a performance enhancement for namespace search and access. This +change enhances the performance of namespace searches and walks by adding a +backpointer to the parent in each namespace node. On large namespaces, this +change can improve overall ACPI performance by up to 9X. Adding a pointer to +each namespace node increases the overall size of the internal namespace by +about 5%, since each namespace entry usually consists of both a namespace +node and an ACPI operand object. However, this is the first growth of the +namespace in ten years. ACPICA bugzilla 817. Alexey Starikovskiy. + +Implemented a performance optimization that reduces the number of namespace +walks. On control method exit, only walk the namespace if the method is known +to have created namespace objects outside of its local scope. Previously, the +entire namespace was traversed on each control method exit. This change can +improve overall ACPI performance by up to 3X. Alexey Starikovskiy, Bob Moore. + +Added support to truncate I/O addresses to 16 bits for Windows compatibility. +Some ASL code has been seen in the field that inadvertently has bits set +above bit 15. This feature is optional and is enabled if the BIOS requests +any Windows OSI strings. It can also be enabled by the host OS. Matthew +Garrett, Bob Moore. + +Added support to limit the maximum time for the ASL Sleep() operator. To +prevent accidental deep sleeps, limit the maximum time that Sleep() will +actually sleep. Configurable, the default maximum is two seconds. ACPICA +bugzilla 854. + +Added run-time validation support for the _WDG and_WED Microsoft predefined +methods. These objects are defined by "Windows Instrumentation", and are not +part of the ACPI spec. ACPICA BZ 860. + +Expanded all statistic counters used during namespace and device +initialization from 16 to 32 bits in order to support very large namespaces. + +Replaced all instances of %d in printf format specifiers with %u since nearly +all integers in ACPICA are unsigned. + +Fixed the exception namestring for AE_WAKE_ONLY_GPE. Was incorrectly returned +as AE_NO_HANDLER. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 88.4K Code, 18.8K Data, 107.2K Total + Debug Version: 164.2K Code, 51.5K Data, 215.7K Total + Current Release: + Non-Debug Version: 88.3K Code, 18.8K Data, 107.1K Total + Debug Version: 164.1K Code, 51.5K Data, 215.6K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Added compiler support for the _WDG and_WED Microsoft predefined +methods. These objects are defined by "Windows Instrumentation", and are not +part of the ACPI spec. ACPICA BZ 860. + +AcpiExec: added option to disable the memory tracking mechanism. The -dt +option will disable the tracking mechanism, which improves performance +considerably. + +AcpiExec: Restructured the command line options into -d (disable) and -e +(enable) options. + +---------------------------------------- +28 April 2010. Summary of changes for version 20100428: + +1) ACPI CA Core Subsystem: + +Implemented GPE support for dynamically loaded ACPI tables. For all GPEs, +including FADT-based and GPE Block Devices, execute any _PRW methods in the +new table, and process any _Lxx/_Exx GPE methods in the new table. Any +runtime GPE that is referenced by an _Lxx/_Exx method in the new table is +immediately enabled. Handles the FADT-defined GPEs as well as GPE Block +Devices. Provides compatibility with other ACPI implementations. Two new +files added, evgpeinit.c and evgpeutil.c. ACPICA BZ 833. Lin Ming, Bob Moore. + +Fixed a regression introduced in version 20100331 within the table manager +where initial table loading could fail. This was introduced in the fix for +AcpiReallocateRootTable. Also, renamed some of fields in the table manager +data structures to clarify their meaning and use. + +Fixed a possible allocation overrun during internal object copy in +AcpiUtCopySimpleObject. The original code did not correctly handle the case +where the object to be copied was a namespace node. Lin Ming. ACPICA BZ 847. + +Updated the allocation dump routine, AcpiUtDumpAllocation and fixed a +possible access beyond end-of-allocation. Also, now fully validate descriptor +(size and type) before output. Lin Ming, Bob Moore. ACPICA BZ 847 + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.9K Code, 18.6K Data, 106.5K Total + Debug Version: 163.5K Code, 51.3K Data, 214.8K Total + Current Release: + Non-Debug Version: 88.4K Code, 18.8K Data, 107.2K Total + Debug Version: 164.2K Code, 51.5K Data, 215.7K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented Min/Max/Len/Gran validation for address resource +descriptors. This change implements validation for the address fields that +are common to all address-type resource descriptors. These checks are +implemented: Checks for valid Min/Max, length within the Min/Max window, +valid granularity, Min/Max a multiple of granularity, and _MIF/_MAF as per +table 6-40 in the ACPI 4.0a specification. Also split the large aslrestype1.c +and aslrestype2.c files into five new files. ACPICA BZ 840. + +iASL: Added support for the _Wxx predefined names. This support was missing +and these names were not recognized by the compiler as valid predefined +names. ACPICA BZ 851. + +iASL: Added an error for all predefined names that are defined to return no +value and thus must be implemented as Control Methods. These include all of +the _Lxx, _Exx, _Wxx, and _Qxx names, as well as some other miscellaneous +names such as _DIS, _INI, _IRC, _OFF, _ON, and _PSx. ACPICA BZ 850, 856. + +iASL: Implemented the -ts option to emit hex AML data in ASL format, as an +ASL Buffer. Allows ACPI tables to be easily included within ASL files, to be +dynamically loaded via the Load() operator. Also cleaned up output for the - +ta and -tc options. ACPICA BZ 853. + +Tests: Added a new file with examples of extended iASL error checking. +Demonstrates the advanced error checking ability of the iASL compiler. +Available at tests/misc/badcode.asl. + +---------------------------------------- 31 March 2010. Summary of changes for version 20100331: 1) ACPI CA Core Subsystem: Modified: stable/8/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adfile.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adfile.c Fri Nov 19 14:26:45 2010 (r215521) @@ -126,13 +126,13 @@ /* Local prototypes */ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, UINT32 Length); -char FilenameBuf[20]; +static char FilenameBuf[20]; /****************************************************************************** @@ -190,7 +190,7 @@ AdGenerateFilename ( * ******************************************************************************/ -INT32 +static INT32 AdWriteBuffer ( char *Filename, char *Buffer, Modified: stable/8/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adisasm.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adisasm.c Fri Nov 19 14:26:45 2010 (r215521) @@ -134,7 +134,6 @@ extern int AslCompilerdebug; -extern char *Gbl_ExternalFilename; ACPI_STATUS @@ -148,22 +147,18 @@ LsSetupNsList ( /* Local prototypes */ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table); -void -AdDisassemblerHeader ( - char *Filename); - -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, UINT32 AmlLength); -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root); @@ -282,8 +277,8 @@ AdInitialize ( /* Setup the Table Manager (cheat - there is no RSDT) */ - AcpiGbl_RootTableList.Size = 1; - AcpiGbl_RootTableList.Count = 0; + AcpiGbl_RootTableList.MaxTableCount = 1; + AcpiGbl_RootTableList.CurrentTableCount = 0; AcpiGbl_RootTableList.Tables = LocalTables; return (Status); @@ -317,6 +312,7 @@ AdAmlDisassemble ( ACPI_STATUS Status; char *DisasmFilename = NULL; char *ExternalFilename; + ACPI_EXTERNAL_FILE *ExternalFileList = AcpiGbl_ExternalFileList; FILE *File = NULL; ACPI_TABLE_HEADER *Table = NULL; ACPI_TABLE_HEADER *ExternalTable; @@ -339,46 +335,54 @@ AdAmlDisassemble ( * External filenames separated by commas * Example: iasl -e file1,file2,file3 -d xxx.aml */ - if (Gbl_ExternalFilename) + while (ExternalFileList) { - ExternalFilename = strtok (Gbl_ExternalFilename, ","); + ExternalFilename = ExternalFileList->Path; + if (!ACPI_STRCMP (ExternalFilename, Filename)) + { + /* Next external file */ + + ExternalFileList = ExternalFileList->Next; + + continue; + } + + Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable); + if (ACPI_FAILURE (Status)) + { + return Status; + } - while (ExternalFilename) + /* Load external table for symbol resolution */ + + if (ExternalTable) { - Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable); + Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE); if (ACPI_FAILURE (Status)) { + AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", + AcpiFormatException (Status)); return Status; } - /* Load external table for symbol resolution */ - - if (ExternalTable) - { - Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", - AcpiFormatException (Status)); - return Status; - } - - /* - * Load namespace from names created within control methods - * Set owner id of nodes in external table - */ - AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); - } + /* + * Load namespace from names created within control methods + * Set owner id of nodes in external table + */ + AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, + AcpiGbl_RootNode, OwnerId); + AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); + } - /* Next external file name */ + /* Next external file */ - ExternalFilename = strtok (NULL, ","); - } + ExternalFileList = ExternalFileList->Next; + } - /* Clear external list generated by Scope in external tables */ + /* Clear external list generated by Scope in external tables */ + if (AcpiGbl_ExternalFileList) + { AcpiDmClearExternalList (); } } @@ -502,7 +506,7 @@ AdAmlDisassemble ( if (AcpiDmGetExternalMethodCount ()) { fprintf (stderr, - "\nFound %d external control methods, reparsing with new information\n", + "\nFound %u external control methods, reparsing with new information\n", AcpiDmGetExternalMethodCount ()); /* @@ -515,10 +519,11 @@ AdAmlDisassemble ( AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE; + AcpiGbl_RootNodeStruct.Parent = NULL; AcpiGbl_RootNodeStruct.Child = NULL; AcpiGbl_RootNodeStruct.Peer = NULL; AcpiGbl_RootNodeStruct.Object = NULL; - AcpiGbl_RootNodeStruct.Flags = ANOBJ_END_OF_PEER_LIST; + AcpiGbl_RootNodeStruct.Flags = 0; Status = AcpiNsRootInitialize (); AcpiDmAddExternalsToNamespace (); @@ -607,10 +612,10 @@ AdDisassemblerHeader ( /* Header and input table info */ - AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n"); - AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION); + AcpiOsPrintf ("/*\n"); + AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * ")); - AcpiOsPrintf (" *\n * Disassembly of %s, %s", Filename, ctime (&Timer)); + AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer)); AcpiOsPrintf (" *\n"); } @@ -629,7 +634,7 @@ AdDisassemblerHeader ( * *****************************************************************************/ -void +static void AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table) @@ -643,7 +648,7 @@ AdCreateTableHeader ( */ AdDisassemblerHeader (Filename); - AcpiOsPrintf (" *\n * Original Table Header:\n"); + AcpiOsPrintf (" * Original Table Header:\n"); AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature); AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length); @@ -688,7 +693,7 @@ AdCreateTableHeader ( AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision); AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId); AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision); - AcpiOsPrintf (" */\n"); + AcpiOsPrintf (" */\n\n"); /* Create AML output filename based on input filename */ @@ -706,7 +711,7 @@ AdCreateTableHeader ( /* Open the ASL definition block */ AcpiOsPrintf ( - "DefinitionBlock (\"%s\", \"%4.4s\", %hd, \"%.6s\", \"%.8s\", 0x%8.8X)\n", + "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n", NewFilename, Table->Signature, Table->Revision, Table->OemId, Table->OemTableId, Table->OemRevision); @@ -776,7 +781,7 @@ AdDisplayTables ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdDeferredParse ( ACPI_PARSE_OBJECT *Op, UINT8 *Aml, @@ -899,7 +904,7 @@ AdDeferredParse ( * *****************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AdParseDeferredOps ( ACPI_PARSE_OBJECT *Root) { @@ -1018,7 +1023,7 @@ AdGetLocalTables ( * is architecture-dependent. */ NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize; - AcpiOsPrintf ("There are %d tables defined in the %4.4s\n\n", + AcpiOsPrintf ("There are %u tables defined in the %4.4s\n\n", NumTables, NewTable->Signature); /* Get the FADT */ @@ -1156,7 +1161,7 @@ AdParseTable ( /* If LoadTable is FALSE, we are parsing the last loaded table */ - TableIndex = AcpiGbl_RootTableList.Count - 1; + TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1; /* Pass 2 */ Modified: stable/8/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/adwalk.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/adwalk.c Fri Nov 19 14:26:45 2010 (r215521) @@ -537,7 +537,7 @@ AcpiDmFindOrphanDescending ( } ArgCount = AcpiDmInspectPossibleArgs (3, 1, NextOp); - AcpiOsPrintf ("/* A-CHILDREN: %d Actual %d */\n", ArgCount, AcpiDmCountChildren (Op)); + AcpiOsPrintf ("/* A-CHILDREN: %u Actual %u */\n", ArgCount, AcpiDmCountChildren (Op)); if (ArgCount < 1) { @@ -792,6 +792,7 @@ AcpiDmXrefDescendingOp ( ACPI_PARSE_OBJECT *NextOp; ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *Object; + UINT32 ParamCount = 0; WalkState = Info->WalkState; @@ -880,18 +881,13 @@ AcpiDmXrefDescendingOp ( if (Object) { ObjectType2 = Object->Common.Type; + if (ObjectType2 == ACPI_TYPE_METHOD) + { + ParamCount = Object->Method.ParamCount; + } } - if (ObjectType2 == ACPI_TYPE_METHOD) - { - AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_METHOD, - Object->Method.ParamCount); - } - else - { - AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, 0); - } - + AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount); Op->Common.Node = Node; } else Modified: stable/8/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/dmextern.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/dmextern.c Fri Nov 19 14:26:45 2010 (r215521) @@ -252,7 +252,7 @@ AcpiDmNormalizeParentPrefix ( Node = Op->Common.Node; while (Node && (*Path == (UINT8) AML_PARENT_PREFIX)) { - Node = AcpiNsGetParentNode (Node); + Node = Node->Parent; Path++; } @@ -312,6 +312,95 @@ Cleanup: /******************************************************************************* * + * FUNCTION: AcpiDmAddToExternalFileList + * + * PARAMETERS: PathList - Single path or list separated by comma + * + * RETURN: None + * + * DESCRIPTION: Add external files to global list + * + ******************************************************************************/ + +ACPI_STATUS +AcpiDmAddToExternalFileList ( + char *PathList) +{ + ACPI_EXTERNAL_FILE *ExternalFile; + char *Path; + char *TmpPath; + + + if (!PathList) + { + return (AE_OK); + } + + Path = strtok (PathList, ","); + + while (Path) + { + TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1); + if (!TmpPath) + { + return (AE_NO_MEMORY); + } + + ACPI_STRCPY (TmpPath, Path); + + ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE)); + if (!ExternalFile) + { + ACPI_FREE (TmpPath); + return (AE_NO_MEMORY); + } + + ExternalFile->Path = TmpPath; + + if (AcpiGbl_ExternalFileList) + { + ExternalFile->Next = AcpiGbl_ExternalFileList; + } + + AcpiGbl_ExternalFileList = ExternalFile; + Path = strtok (NULL, ","); + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmClearExternalFileList + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Clear the external file list + * + ******************************************************************************/ + +void +AcpiDmClearExternalFileList ( + void) +{ + ACPI_EXTERNAL_FILE *NextExternal; + + + while (AcpiGbl_ExternalFileList) + { + NextExternal = AcpiGbl_ExternalFileList->Next; + ACPI_FREE (AcpiGbl_ExternalFileList->Path); + ACPI_FREE (AcpiGbl_ExternalFileList); + AcpiGbl_ExternalFileList = NextExternal; + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmAddToExternalList * * PARAMETERS: Op - Current parser Op @@ -629,7 +718,7 @@ AcpiDmEmitExternals ( if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) { - AcpiOsPrintf (") // %d Arguments\n", + AcpiOsPrintf (") // %u Arguments\n", AcpiGbl_ExternalList->Value); } else Modified: stable/8/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- stable/8/sys/contrib/dev/acpica/common/dmrestag.c Fri Nov 19 12:56:13 2010 (r215520) +++ stable/8/sys/contrib/dev/acpica/common/dmrestag.c Fri Nov 19 14:26:45 2010 (r215521) @@ -549,13 +549,6 @@ AcpiDmGetResourceNode ( return (Node); } - /* List is circular, this flag marks the end */ - - if (Node->Flags & ANOBJ_END_OF_PEER_LIST) - { - return (NULL); - } - Node = Node->Peer; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 14:46:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28ABC106567A; Fri, 19 Nov 2010 14:46:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 184DF8FC16; Fri, 19 Nov 2010 14:46: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 oAJEkHxk077332; Fri, 19 Nov 2010 14:46:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJEkHSi077329; Fri, 19 Nov 2010 14:46:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191446.oAJEkHSi077329@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 14:46: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: r215522 - in head/sys: amd64/include 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: Fri, 19 Nov 2010 14:46:18 -0000 Author: avg Date: Fri Nov 19 14:46:17 2010 New Revision: 215522 URL: http://svn.freebsd.org/changeset/base/215522 Log: specialreg.h: add definition for AMD Core Performance Boost bit This bit indicates availability of the feature. MFC after: 4 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 14:26:45 2010 (r215521) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) @@ -206,6 +206,7 @@ #define AMDPM_100MHZ_STEPS 0x00000040 #define AMDPM_HW_PSTATE 0x00000080 #define AMDPM_TSC_INVARIANT 0x00000100 +#define AMDPM_CPB 0x00000200 /* * AMD extended function 8000_0008h ecx info Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 14:26:45 2010 (r215521) +++ head/sys/i386/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) @@ -205,6 +205,7 @@ #define AMDPM_100MHZ_STEPS 0x00000040 #define AMDPM_HW_PSTATE 0x00000080 #define AMDPM_TSC_INVARIANT 0x00000100 +#define AMDPM_CPB 0x00000200 /* * AMD extended function 8000_0008h ecx info From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:00:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB34106564A; Fri, 19 Nov 2010 15:00:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4199E8FC12; Fri, 19 Nov 2010 15:00:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJF0LQ5077796; Fri, 19 Nov 2010 15:00:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJF0L7w077792; Fri, 19 Nov 2010 15:00:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191500.oAJF0L7w077792@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 15:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215523 - in head/sys: 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: Fri, 19 Nov 2010 15:00:21 -0000 Author: avg Date: Fri Nov 19 15:00:20 2010 New Revision: 215523 URL: http://svn.freebsd.org/changeset/base/215523 Log: specialreg.h: add AMD-specific "Hardware Configuration Register" MSR It seems that this MSR has been available in a range of AMD processors families for quite a while now. Note1: not all AMD MSRs that are found in amd64 specialreg.h are also in the i386 version. Note2: perhaps some additional name component is needed to distinguish AMD-specific MSRs. MFC after: 5 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/i386/initcpu.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) @@ -504,6 +504,7 @@ #define MSR_PERFCTR2 0xc0010006 #define MSR_PERFCTR3 0xc0010007 #define MSR_SYSCFG 0xc0010010 +#define MSR_HWCR 0xc0010015 #define MSR_IORRBASE0 0xc0010016 #define MSR_IORRMASK0 0xc0010017 #define MSR_IORRBASE1 0xc0010018 Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/i386/i386/initcpu.c Fri Nov 19 15:00:20 2010 (r215523) @@ -672,7 +672,7 @@ initializecpu(void) (cpu_id & ~0xf) == 0x670 || (cpu_id & ~0xf) == 0x680)) { u_int regs[4]; - wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000); + wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) & ~0x08000); do_cpuid(1, regs); cpu_feature = regs[3]; } Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/i386/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) @@ -554,7 +554,8 @@ #define AMD_WT_ALLOC_FRE 0x10000 /* fixed (A0000-FFFFF) range enable */ /* AMD64 MSR's */ -#define MSR_EFER 0xc0000080 /* extended features */ +#define MSR_EFER 0xc0000080 /* extended features */ +#define MSR_HWCR 0xc0010015 #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ #define MSR_MC0_CTL_MASK 0xc0010044 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:07:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C673C106566C; Fri, 19 Nov 2010 15:07:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B609B8FC18; Fri, 19 Nov 2010 15:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJF7agK077996; Fri, 19 Nov 2010 15:07:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJF7ai1077993; Fri, 19 Nov 2010 15:07:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191507.oAJF7ai1077993@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 15:07: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: r215524 - in head/sys: amd64/include 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: Fri, 19 Nov 2010 15:07:36 -0000 Author: avg Date: Fri Nov 19 15:07:36 2010 New Revision: 215524 URL: http://svn.freebsd.org/changeset/base/215524 Log: specialreg.h: add definitions for MPERF/APERF pair of MSRs These MSRs can be used to determine actual (average) performance as compared to a maximum defined performance. Availability of these MSRs is indicated by bit0 in CPUID.6.ECX on both Intel and AMD processors. MFC after: 5 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 15:07:36 2010 (r215524) @@ -240,6 +240,8 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_MPERF 0x0e7 +#define MSR_APERF 0x0e8 #define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) +++ head/sys/i386/include/specialreg.h Fri Nov 19 15:07:36 2010 (r215524) @@ -246,6 +246,8 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_MPERF 0x0e7 +#define MSR_APERF 0x0e8 #define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:12:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82062106564A; Fri, 19 Nov 2010 15:12:19 +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 7199A8FC13; Fri, 19 Nov 2010 15:12: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 oAJFCJbO078204; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJFCJQm078202; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011191512.oAJFCJQm078202@svn.freebsd.org> From: Colin Percival Date: Fri, 19 Nov 2010 15:12: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: r215525 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:12:19 -0000 Author: cperciva Date: Fri Nov 19 15:12:19 2010 New Revision: 215525 URL: http://svn.freebsd.org/changeset/base/215525 Log: Make pmap_release consistent with pmap_pinit with respect to unpinning pages. The pinning of NPGPTD pages is #if 0ed out in pmap_pinit (I'm not quite sure why...) and this commit adds a corresponding #if 0 in pmap_release to avoid unpinning those pages. Some versions of Xen seem to silently ignore requests to unpin pages which were never pinned in the first place, but some return an error (causing FreeBSD to panic) prior to this commit. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Nov 19 15:07:36 2010 (r215524) +++ head/sys/i386/xen/pmap.c Fri Nov 19 15:12:19 2010 (r215525) @@ -1875,7 +1875,12 @@ pmap_release(pmap_t pmap) m = ptdpg[i]; ma = xpmap_ptom(VM_PAGE_TO_PHYS(m)); /* unpinning L1 and L2 treated the same */ +#if 0 xen_pgd_unpin(ma); +#else + if (i == NPGPTD) + xen_pgd_unpin(ma); +#endif #ifdef PAE if (i < NPGPTD) KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:21:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BFA371065670; Fri, 19 Nov 2010 15:21:27 +0000 (UTC) Date: Fri, 19 Nov 2010 15:21:27 +0000 From: Alexey Dokuchaev To: Jilles Tjoelker Message-ID: <20101119152127.GA29131@FreeBSD.org> References: <201011191256.oAJCuDFH074482@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201011191256.oAJCuDFH074482@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:21:27 -0000 On Fri, Nov 19, 2010 at 12:56:13PM +0000, Jilles Tjoelker wrote: > I do not want to encourage people to write fragile and non-portable echo > commands by making printf much slower than echo. True. > Side effect: printf is now always the builtin version (which behaves > identically to /usr/bin/printf) and cannot be overridden via PATH (except > via the undocumented %builtin mechanism). Are there any plans to document it? ./danfe From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:21:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1199A106566C; Fri, 19 Nov 2010 15:21:53 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id A235F8FC23; Fri, 19 Nov 2010 15:21:52 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 59FF01DD651; Fri, 19 Nov 2010 16:21:51 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 4D9DC17042; Fri, 19 Nov 2010 16:21:51 +0100 (CET) Date: Fri, 19 Nov 2010 16:21:51 +0100 From: Jilles Tjoelker To: Andrew Thompson Message-ID: <20101119152151.GC7614@stack.nl> References: <201011190117.oAJ1HnOT051021@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011190117.oAJ1HnOT051021@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:21:53 -0000 On Fri, Nov 19, 2010 at 01:17:49AM +0000, Andrew Thompson wrote: > Author: thompsa > Date: Fri Nov 19 01:17:49 2010 > New Revision: 215475 > URL: http://svn.freebsd.org/changeset/base/215475 > Log: > MFC r203774 > Use more standard way for setting nonblocking flag for a filedescriptor. > This makes libusb porting a bit easier. > Modified: > stable/8/lib/libusb/libusb10.c > Directory Properties: > stable/8/lib/libusb/ (props changed) > stable/8/lib/libusb/usb.h (props changed) > > Modified: stable/8/lib/libusb/libusb10.c > ============================================================================== > --- stable/8/lib/libusb/libusb10.c Thu Nov 18 23:46:55 2010 (r215474) > +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 01:17:49 2010 (r215475) [...] > @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) > return (LIBUSB_ERROR_OTHER); > } > /* set non-blocking mode on the control pipe to avoid deadlock */ > - ret = 1; > - ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); > - ret = 1; > - ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); > + flag = 1; > + ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); > + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); > + flag = 1; > + ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); > + assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); > > libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); This is not the correct way to use fcntl() to turn on non-blocking mode. The correct way is flag = fcntl(ctx->ctrl_pipe[0], F_GETFL, 0); if (flag != -1) { ret = fcntl(ctx->ctrl_pipe[0], F_SETFL, flag | O_NONBLOCK); if (ret == -1) handle_error(); } else handle_error(); substituting some sort of error handling for handle_error(). This has been fixed in head in r213853, but that commit also makes other changes. It turns out that on FreeBSD both F_SETFL and O_NONBLOCK have the value 4, so there is some chance the desired result is achieved and fcntl() will not fail. It may also set other flags for the open file description, which could lead to unexpected results. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 15:40:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E87461065673; Fri, 19 Nov 2010 15:39:59 +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 D80408FC08; Fri, 19 Nov 2010 15:39: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 oAJFdxQV078853; Fri, 19 Nov 2010 15:39:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJFdxrZ078849; Fri, 19 Nov 2010 15:39:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191539.oAJFdxrZ078849@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 15:39: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: r215526 - head/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:40:00 -0000 Author: jhb Date: Fri Nov 19 15:39:59 2010 New Revision: 215526 URL: http://svn.freebsd.org/changeset/base/215526 Log: Handle malloc() failures more gracefully by error'ing out rather than segfaulting. Submitted by: gcooper MFC after: 1 week Modified: head/usr.sbin/mfiutil/mfi_config.c head/usr.sbin/mfiutil/mfi_evt.c head/usr.sbin/mfiutil/mfi_flash.c Modified: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_config.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_config.c Fri Nov 19 15:39:59 2010 (r215526) @@ -328,6 +328,10 @@ parse_array(int fd, int raid_type, char /* Validate each drive. */ info->drives = calloc(count, sizeof(struct mfi_pd_info)); + if (info->drives == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } info->drive_count = count; for (pinfo = info->drives; (cp = strsep(&array_str, ",")) != NULL; pinfo++) { @@ -638,6 +642,10 @@ create_volume(int ac, char **av) break; } arrays = calloc(narrays, sizeof(*arrays)); + if (arrays == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < narrays; i++) { error = parse_array(fd, raid_type, av[i], &arrays[i]); if (error) @@ -673,6 +681,10 @@ create_volume(int ac, char **av) state.array_count = config->array_count; if (config->array_count > 0) { state.arrays = calloc(config->array_count, sizeof(int)); + if (state.arrays == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < config->array_count; i++) { ar = (struct mfi_array *)p; state.arrays[i] = ar->array_ref; @@ -685,6 +697,10 @@ create_volume(int ac, char **av) state.log_drv_count = config->log_drv_count; if (config->log_drv_count) { state.volumes = calloc(config->log_drv_count, sizeof(int)); + if (state.volumes == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < config->log_drv_count; i++) { ld = (struct mfi_ld_config *)p; state.volumes[i] = ld->properties.ld.v.target_id; @@ -721,6 +737,10 @@ create_volume(int ac, char **av) config_size = sizeof(struct mfi_config_data) + sizeof(struct mfi_ld_config) * nvolumes + MFI_ARRAY_SIZE * narrays; config = calloc(1, config_size); + if (config == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } config->size = config_size; config->array_count = narrays; config->array_size = MFI_ARRAY_SIZE; /* XXX: Firmware hardcode */ @@ -902,6 +922,10 @@ add_spare(int ac, char **av) spare = malloc(sizeof(struct mfi_spare) + sizeof(uint16_t) * config->array_count); + if (spare == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } bzero(spare, sizeof(struct mfi_spare)); spare->ref = info.ref; @@ -1170,6 +1194,10 @@ dump(int ac, char **av) } config = malloc(len); + if (config == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } if (sysctlbyname(buf, config, &len, NULL, 0) < 0) { error = errno; warn("Failed to read debug command"); Modified: head/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_evt.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_evt.c Fri Nov 19 15:39:59 2010 (r215526) @@ -624,6 +624,10 @@ show_events(int ac, char **av) } list = malloc(size); + if (list == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (seq = start;;) { if (mfi_get_events(fd, list, num_events, filter, seq, &status) < 0) { Modified: head/usr.sbin/mfiutil/mfi_flash.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_flash.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_flash.c Fri Nov 19 15:39:59 2010 (r215526) @@ -163,6 +163,10 @@ flash_adapter(int ac, char **av) /* Upload the file 64k at a time. */ buf = malloc(FLASH_BUF_SIZE); + if (buf == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } offset = 0; while (sb.st_size > 0) { nread = read(flash, buf, FLASH_BUF_SIZE); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 16:24:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B8E91065673; Fri, 19 Nov 2010 16:24:12 +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 5ADFB8FC15; Fri, 19 Nov 2010 16:24: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 oAJGOCEp080202; Fri, 19 Nov 2010 16:24:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJGOCTM080200; Fri, 19 Nov 2010 16:24:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191624.oAJGOCTM080200@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 16:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215527 - stable/8/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:24:12 -0000 Author: jhb Date: Fri Nov 19 16:24:12 2010 New Revision: 215527 URL: http://svn.freebsd.org/changeset/base/215527 Log: MFC 215001: Only dump the values of the PMC and CMCI local vector table entries on a local APIC if those LVT entries are valid. This quiets spurious illegal register local APIC errors during boot on a CPU that doesn't support those vectors. Modified: stable/8/sys/x86/x86/local_apic.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/x86/x86/local_apic.c ============================================================================== --- stable/8/sys/x86/x86/local_apic.c Fri Nov 19 15:39:59 2010 (r215526) +++ stable/8/sys/x86/x86/local_apic.c Fri Nov 19 16:24:12 2010 (r215527) @@ -290,16 +290,21 @@ lapic_create(u_int apic_id, int boot_cpu void lapic_dump(const char* str) { + uint32_t maxlvt; + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; printf("cpu%d %s:\n", PCPU_GET(cpuid), str); printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n", lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", - lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, - lapic->lvt_pcint); - printf(" cmci: 0x%08x\n", lapic->lvt_cmci); + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", + lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); + if (maxlvt >= LVT_PMC) + printf(" pmc: 0x%08x", lapic->lvt_pcint); + printf("\n"); + if (maxlvt >= LVT_CMCI) + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 16:24:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F9871065674; Fri, 19 Nov 2010 16:24:31 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id A1CBD8FC1D; Fri, 19 Nov 2010 16:24:30 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 12B6F35A86E; Fri, 19 Nov 2010 17:24:30 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 05A5317042; Fri, 19 Nov 2010 17:24:29 +0100 (CET) Date: Fri, 19 Nov 2010 17:24:29 +0100 From: Jilles Tjoelker To: Alexey Dokuchaev Message-ID: <20101119162429.GD7614@stack.nl> References: <201011191256.oAJCuDFH074482@svn.freebsd.org> <20101119152127.GA29131@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101119152127.GA29131@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: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:24:31 -0000 On Fri, Nov 19, 2010 at 03:21:27PM +0000, Alexey Dokuchaev wrote: > On Fri, Nov 19, 2010 at 12:56:13PM +0000, Jilles Tjoelker wrote: > > Side effect: printf is now always the builtin version (which behaves > > identically to /usr/bin/printf) and cannot be overridden via PATH (except > > via the undocumented %builtin mechanism). > Are there any plans to document it? It would have to be fixed first so it has sensible behaviour. Right now all builtins, including ones that must execute as a builtin for full functionality, can be overridden via %builtin, which does not seem to make a lot of sense. POSIX (XCU 2.9.1.1 Command Search and Execution) requires that special builtins and some other builtins such as bg, cd and command be found without a PATH search. For consistency with execvp(3) and perhaps also for POSIX compliance, the special cases with % are not really good. Another way to allow overriding builtins would be to make each overridable builtin pretend to be in a directory (e.g. /usr/bin) and be found at that point in the PATH search. For example, printf could pretend to be /usr/bin/printf, which would mean PATH=/usr/bin printf would find the builtin, but PATH=/elsewhere:/usr/bin printf would find /elsewhere/printf if it exists. Command names containing slashes would not participate in this and always invoke the external program. For example, /usr/bin/printf would continue to use the external program. Some builtins in ksh93 (but not printf) work this way. If the echo builtin pretends to be /bin/echo, it is a bit strange because the two utilities are rather incompatible. If I take POSIX's list and add other utilities that must execute as a builtin for full functionality, only very few utilities remain. Many of these are non-standard and are not present in the filesystem. In the specific case of printf, note that the bash, ksh93 and zsh versions of the printf builtin support %n, writing the result into a specified shell variable, which can only work if it is a builtin. Although our printf does not support this and I do not plan on adding it, it means that various shell authors think printf should always be a builtin. The general issue is that I do not know how exactly %builtin is or can be used in practice. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 16:26:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B690F1065672; Fri, 19 Nov 2010 16:26:51 +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 9C0BD8FC19; Fri, 19 Nov 2010 16:26: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 oAJGQpGq080294; Fri, 19 Nov 2010 16:26:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJGQpUI080291; Fri, 19 Nov 2010 16:26:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191626.oAJGQpUI080291@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 16:26:51 +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: r215528 - in stable/7/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:26:51 -0000 Author: jhb Date: Fri Nov 19 16:26:51 2010 New Revision: 215528 URL: http://svn.freebsd.org/changeset/base/215528 Log: MFC 215001: Only dump the values of the PMC and CMCI local vector table entries on a local APIC if those LVT entries are valid. This quiets spurious illegal register local APIC errors during boot on a CPU that doesn't support those vectors. Modified: stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/i386/i386/local_apic.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/local_apic.c ============================================================================== --- stable/7/sys/amd64/amd64/local_apic.c Fri Nov 19 16:24:12 2010 (r215527) +++ stable/7/sys/amd64/amd64/local_apic.c Fri Nov 19 16:26:51 2010 (r215528) @@ -272,16 +272,21 @@ lapic_create(u_int apic_id, int boot_cpu void lapic_dump(const char* str) { + uint32_t maxlvt; + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; printf("cpu%d %s:\n", PCPU_GET(cpuid), str); printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n", lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", - lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, - lapic->lvt_pcint); - printf(" cmci: 0x%08x\n", lapic->lvt_cmci); + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", + lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); + if (maxlvt >= LVT_PMC) + printf(" pmc: 0x%08x", lapic->lvt_pcint); + printf("\n"); + if (maxlvt >= LVT_CMCI) + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void Modified: stable/7/sys/i386/i386/local_apic.c ============================================================================== --- stable/7/sys/i386/i386/local_apic.c Fri Nov 19 16:24:12 2010 (r215527) +++ stable/7/sys/i386/i386/local_apic.c Fri Nov 19 16:26:51 2010 (r215528) @@ -276,16 +276,21 @@ lapic_create(u_int apic_id, int boot_cpu void lapic_dump(const char* str) { + uint32_t maxlvt; + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; printf("cpu%d %s:\n", PCPU_GET(cpuid), str); printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n", lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", - lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, - lapic->lvt_pcint); - printf(" cmci: 0x%08x\n", lapic->lvt_cmci); + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x", + lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error); + if (maxlvt >= LVT_PMC) + printf(" pmc: 0x%08x", lapic->lvt_pcint); + printf("\n"); + if (maxlvt >= LVT_CMCI) + printf(" cmci: 0x%08x\n", lapic->lvt_cmci); } void From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 16:52:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BAB11065670; Fri, 19 Nov 2010 16:52:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF358FC0A; Fri, 19 Nov 2010 16:52: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 oAJGqI3q081081; Fri, 19 Nov 2010 16:52:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJGqINX081079; Fri, 19 Nov 2010 16:52:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191652.oAJGqINX081079@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 16:52: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: r215529 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:52:18 -0000 Author: jhb Date: Fri Nov 19 16:52:18 2010 New Revision: 215529 URL: http://svn.freebsd.org/changeset/base/215529 Log: MFC 214782: Update startup_alloc() to support multi-page allocations and allow internal zones whose objects are larger than a page to use startup_alloc(). This allows allocation of zone objects during early boot on machines with a large number of CPUs since the resulting zone objects are larger than a page. Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Fri Nov 19 16:26:51 2010 (r215528) +++ stable/8/sys/vm/uma_core.c Fri Nov 19 16:52:18 2010 (r215529) @@ -932,15 +932,32 @@ startup_alloc(uma_zone_t zone, int bytes { uma_keg_t keg; uma_slab_t tmps; + int pages, check_pages; keg = zone_first_keg(zone); + pages = howmany(bytes, PAGE_SIZE); + check_pages = pages - 1; + KASSERT(pages > 0, ("startup_alloc can't reserve 0 pages\n")); /* * Check our small startup cache to see if it has pages remaining. */ mtx_lock(&uma_boot_pages_mtx); - if ((tmps = LIST_FIRST(&uma_boot_pages)) != NULL) { - LIST_REMOVE(tmps, us_link); + + /* First check if we have enough room. */ + tmps = LIST_FIRST(&uma_boot_pages); + while (tmps != NULL && check_pages-- > 0) + tmps = LIST_NEXT(tmps, us_link); + if (tmps != NULL) { + /* + * It's ok to lose tmps references. The last one will + * have tmps->us_data pointing to the start address of + * "pages" contiguous pages of memory. + */ + while (pages-- > 0) { + tmps = LIST_FIRST(&uma_boot_pages); + LIST_REMOVE(tmps, us_link); + } mtx_unlock(&uma_boot_pages_mtx); *pflag = tmps->us_flags; return (tmps->us_data); @@ -952,7 +969,7 @@ startup_alloc(uma_zone_t zone, int bytes * Now that we've booted reset these users to their real allocator. */ #ifdef UMA_MD_SMALL_ALLOC - keg->uk_allocf = uma_small_alloc; + keg->uk_allocf = (keg->uk_ppera > 1) ? page_alloc : uma_small_alloc; #else keg->uk_allocf = page_alloc; #endif @@ -1181,12 +1198,15 @@ keg_large_init(uma_keg_t keg) keg->uk_ppera = pages; keg->uk_ipers = 1; + keg->uk_rsize = keg->uk_size; + + /* We can't do OFFPAGE if we're internal, bail out here. */ + if (keg->uk_flags & UMA_ZFLAG_INTERNAL) + return; keg->uk_flags |= UMA_ZONE_OFFPAGE; if ((keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) keg->uk_flags |= UMA_ZONE_HASH; - - keg->uk_rsize = keg->uk_size; } static void @@ -1305,7 +1325,8 @@ keg_ctor(void *mem, int size, void *udat #endif if (booted == 0) keg->uk_allocf = startup_alloc; - } + } else if (booted == 0 && (keg->uk_flags & UMA_ZFLAG_INTERNAL)) + keg->uk_allocf = startup_alloc; /* * Initialize keg's lock (shared among zones). @@ -1334,7 +1355,7 @@ keg_ctor(void *mem, int size, void *udat if (totsize & UMA_ALIGN_PTR) totsize = (totsize & ~UMA_ALIGN_PTR) + (UMA_ALIGN_PTR + 1); - keg->uk_pgoff = UMA_SLAB_SIZE - totsize; + keg->uk_pgoff = (UMA_SLAB_SIZE * keg->uk_ppera) - totsize; if (keg->uk_flags & UMA_ZONE_REFCNT) totsize = keg->uk_pgoff + sizeof(struct uma_slab_refcnt) @@ -1350,7 +1371,7 @@ keg_ctor(void *mem, int size, void *udat * mathematically possible for all cases, so we make * sure here anyway. */ - if (totsize > UMA_SLAB_SIZE) { + if (totsize > UMA_SLAB_SIZE * keg->uk_ppera) { printf("zone %s ipers %d rsize %d size %d\n", zone->uz_name, keg->uk_ipers, keg->uk_rsize, keg->uk_size); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 16:56:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30877106566C; Fri, 19 Nov 2010 16:56:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B5D968FC0C; Fri, 19 Nov 2010 16:56:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAJGuKR9031054; Fri, 19 Nov 2010 17:56:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAJGuKPa031053; Fri, 19 Nov 2010 17:56:20 +0100 (CET) (envelope-from marius) Date: Fri, 19 Nov 2010 17:56:20 +0100 From: Marius Strobl To: Ryan Stone Message-ID: <20101119165620.GB9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011190347.oAJ3lBSx056245@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, emaste@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org Subject: Re: svn commit: r215507 - 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: Fri, 19 Nov 2010 16:56:22 -0000 On Fri, Nov 19, 2010 at 03:47:11AM +0000, Ryan Stone wrote: > Author: rstone > Date: Fri Nov 19 03:47:10 2010 > New Revision: 215507 > URL: http://svn.freebsd.org/changeset/base/215507 > > Log: > When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard > path id for enumerating the available busses. Previously camcontrol was > implicitly passing 0 as the first path id, which meant that if bus 0 was not > present camcontrol would fail with EINVAL instead of rescanning/resetting any > busses that were present. > > Approved by: emaste (mentor) > MFC after: 1 week > > Modified: > head/sbin/camcontrol/camcontrol.c > > Modified: head/sbin/camcontrol/camcontrol.c > ============================================================================== > --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) > +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) > @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) > bzero(&(&matchccb.ccb_h)[1], > sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); > matchccb.ccb_h.func_code = XPT_DEV_MATCH; > + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; > bufsize = sizeof(struct dev_match_result) * 20; > matchccb.cdm.match_buf_len = bufsize; > matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); Hrm, shouldn't that use CAM_XPT_PATH_ID instead of CAM_BUS_WILDCARD as XPT_DEV_MATCH is marked XPT_FC_XPT_ONLY and supply a complete Connect ID (i.e. the triple of Path ID, Target ID and LUN)? At least that's what ken@ changed a similar patch of mine to in r126514: http://svn.freebsd.org/viewvc/base/head/sbin/camcontrol/camcontrol.c?r1=126514&r2=126513&pathrev=126514&diff_format=u In any case it's unfortunate that both CAM_BUS_WILDCARD and CAM_XPT_PATH_ID are defined as ~0. According to the last CAM draft [1] the XPT Path ID should be 0xff. Marius 1: http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:04:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22CF1106564A; Fri, 19 Nov 2010 17:04:56 +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 10D798FC26; Fri, 19 Nov 2010 17:04: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 oAJH4tvu081607; Fri, 19 Nov 2010 17:04:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH4tAH081605; Fri, 19 Nov 2010 17:04:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191704.oAJH4tAH081605@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:04: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: r215530 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:04:56 -0000 Author: marius Date: Fri Nov 19 17:04:55 2010 New Revision: 215530 URL: http://svn.freebsd.org/changeset/base/215530 Log: MFC: r214879 Implement pmap_is_prefaultable(). Reviewed by: alc (with bugfix) Modified: stable/8/sys/sparc64/sparc64/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Fri Nov 19 16:52:18 2010 (r215529) +++ stable/8/sys/sparc64/sparc64/pmap.c Fri Nov 19 17:04:55 2010 (r215530) @@ -1928,8 +1928,12 @@ pmap_is_modified(vm_page_t m) boolean_t pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr) { + boolean_t rv; - return (FALSE); + PMAP_LOCK(pmap); + rv = tsb_tte_lookup(pmap, addr) == NULL; + PMAP_UNLOCK(pmap); + return (rv); } void From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:04:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980141065747; Fri, 19 Nov 2010 17:04:58 +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 07B6E8FC16; Fri, 19 Nov 2010 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 oAJH4vIT081640; Fri, 19 Nov 2010 17:04:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH4v30081638; Fri, 19 Nov 2010 17:04:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191704.oAJH4v30081638@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:04:57 +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: r215531 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:04:59 -0000 Author: marius Date: Fri Nov 19 17:04:57 2010 New Revision: 215531 URL: http://svn.freebsd.org/changeset/base/215531 Log: MFC: r214879 Implement pmap_is_prefaultable(). Reviewed by: alc (with bugfix) Modified: stable/7/sys/sparc64/sparc64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/pmap.c Fri Nov 19 17:04:55 2010 (r215530) +++ stable/7/sys/sparc64/sparc64/pmap.c Fri Nov 19 17:04:57 2010 (r215531) @@ -1903,8 +1903,12 @@ pmap_is_modified(vm_page_t m) boolean_t pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr) { + boolean_t rv; - return (FALSE); + PMAP_LOCK(pmap); + rv = tsb_tte_lookup(pmap, addr) == NULL; + PMAP_UNLOCK(pmap); + return (rv); } void From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:07:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BD1106564A; Fri, 19 Nov 2010 17:07:33 +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 33D158FC18; Fri, 19 Nov 2010 17:07: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 oAJH7X67081802; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH7XLL081800; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191707.oAJH7XLL081800@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215532 - stable/8/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, 19 Nov 2010 17:07:33 -0000 Author: marius Date: Fri Nov 19 17:07:32 2010 New Revision: 215532 URL: http://svn.freebsd.org/changeset/base/215532 Log: MFC: r215300 Remove redundant cases and a style(9) bug. Modified: stable/8/sys/dev/mii/xmphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/xmphy.c ============================================================================== --- stable/8/sys/dev/mii/xmphy.c Fri Nov 19 17:04:57 2010 (r215531) +++ stable/8/sys/dev/mii/xmphy.c Fri Nov 19 17:07:32 2010 (r215532) @@ -167,7 +167,7 @@ xmphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN) return (0); #endif - (void) xmphy_mii_phy_auto(sc); + (void)xmphy_mii_phy_auto(sc); break; case IFM_1000_SX: mii_phy_reset(sc); @@ -179,9 +179,6 @@ xmphy_service(struct mii_softc *sc, stru PHY_WRITE(sc, XMPHY_MII_BMCR, 0); } break; - case IFM_100_T4: - case IFM_100_TX: - case IFM_10_T: default: return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:07:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B32B81065670; Fri, 19 Nov 2010 17:07:33 +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 A25CC8FC1A; Fri, 19 Nov 2010 17:07: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 oAJH7XqA081823; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH7XpS081821; Fri, 19 Nov 2010 17:07:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191707.oAJH7XpS081821@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:07:33 +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: r215533 - stable/7/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, 19 Nov 2010 17:07:33 -0000 Author: marius Date: Fri Nov 19 17:07:33 2010 New Revision: 215533 URL: http://svn.freebsd.org/changeset/base/215533 Log: MFC: r215300 Remove redundant cases and a style(9) bug. Modified: stable/7/sys/dev/mii/xmphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/xmphy.c ============================================================================== --- stable/7/sys/dev/mii/xmphy.c Fri Nov 19 17:07:32 2010 (r215532) +++ stable/7/sys/dev/mii/xmphy.c Fri Nov 19 17:07:33 2010 (r215533) @@ -167,7 +167,7 @@ xmphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN) return (0); #endif - (void) xmphy_mii_phy_auto(sc); + (void)xmphy_mii_phy_auto(sc); break; case IFM_1000_SX: mii_phy_reset(sc); @@ -179,9 +179,6 @@ xmphy_service(struct mii_softc *sc, stru PHY_WRITE(sc, XMPHY_MII_BMCR, 0); } break; - case IFM_100_T4: - case IFM_100_TX: - case IFM_10_T: default: return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:08:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E521065672; Fri, 19 Nov 2010 17:08:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87E8F8FC14; Fri, 19 Nov 2010 17:08:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJH8FdL081885; Fri, 19 Nov 2010 17:08:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH8FXg081877; Fri, 19 Nov 2010 17:08:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191708.oAJH8FXg081877@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215534 - stable/8/usr.sbin/mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:08:15 -0000 Author: jhb Date: Fri Nov 19 17:08:15 2010 New Revision: 215534 URL: http://svn.freebsd.org/changeset/base/215534 Log: MFC 204352, 208028, 209266, 209399, 210723, 213672, 215046: - Fixed static linkage. - Document that mptutil/mpt do not support RAID volumes in excess of 2TB. - Report subcommand handler errors so that tools that invoke mptutil can robustly report errors. - Save errno values before calling warn(3) so that errors are correctly reported. - Check for malloc() failures. Modified: stable/8/usr.sbin/mptutil/Makefile stable/8/usr.sbin/mptutil/mpt_cam.c stable/8/usr.sbin/mptutil/mpt_cmd.c stable/8/usr.sbin/mptutil/mpt_config.c stable/8/usr.sbin/mptutil/mpt_drive.c stable/8/usr.sbin/mptutil/mpt_evt.c stable/8/usr.sbin/mptutil/mpt_show.c stable/8/usr.sbin/mptutil/mpt_volume.c stable/8/usr.sbin/mptutil/mptutil.8 stable/8/usr.sbin/mptutil/mptutil.c Directory Properties: stable/8/usr.sbin/mptutil/ (props changed) Modified: stable/8/usr.sbin/mptutil/Makefile ============================================================================== --- stable/8/usr.sbin/mptutil/Makefile Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/Makefile Fri Nov 19 17:08:15 2010 (r215534) @@ -8,8 +8,8 @@ MAN= mptutil.8 WARNS?= 3 -DPADD+= ${LIBCAM} ${LIBUTIL} -LDADD+= -lcam -lutil +DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} +LDADD= -lcam -lsbuf -lutil # Here be dragons .ifdef DEBUG Modified: stable/8/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:08:15 2010 (r215534) @@ -63,6 +63,7 @@ fetch_path_id(path_id_t *path_id) struct bus_match_pattern *b; union ccb ccb; size_t bufsize; + int error; if (xpt_open() < 0) return (ENXIO); @@ -91,9 +92,10 @@ fetch_path_id(path_id_t *path_id) b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (errno); + return (error); } free(ccb.cdm.patterns); @@ -124,7 +126,7 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID union ccb ccb; path_id_t path_id; size_t bufsize; - int error, i; + int error; /* mpt(4) only handles devices on bus 0. */ if (VolumeBus != 0) @@ -164,10 +166,10 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -397,8 +399,8 @@ mpt_fetch_disks(int fd, int *ndisks, str union ccb ccb; path_id_t path_id; size_t bufsize; - u_int i; int count, error; + uint32_t i; if (xpt_open() < 0) return (ENXIO); @@ -431,10 +433,10 @@ mpt_fetch_disks(int fd, int *ndisks, str p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -481,6 +483,8 @@ mpt_fetch_disks(int fd, int *ndisks, str * exclude them from the list. */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); + if (ioc2 == NULL) + return (errno); disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); count = 0; for (i = 0; i < ccb.cdm.num_matches; i++) { Modified: stable/8/usr.sbin/mptutil/mpt_cmd.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:08:15 2010 (r215534) @@ -310,18 +310,15 @@ mpt_lookup_volume(int fd, const char *na id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } *VolumeBus = bus; *VolumeID = id; return (0); } } else if (*cp == '\0') { - if (bus < 0 || bus > 0xff) { - errno = EINVAL; - return (-1); - } + if (bus < 0 || bus > 0xff) + return (EINVAL); *VolumeBus = 0; *VolumeID = bus; return (0); @@ -329,7 +326,7 @@ mpt_lookup_volume(int fd, const char *na ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) - return (-1); + return (errno); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { @@ -343,8 +340,7 @@ mpt_lookup_volume(int fd, const char *na } } free(ioc2); - errno = EINVAL; - return (-1); + return (EINVAL); } int @@ -360,15 +356,14 @@ mpt_read_config_page_header(int fd, U8 P req.header.PageNumber = PageNumber; req.page_address = PageAddress; if (ioctl(fd, MPTIO_READ_CFG_HEADER, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; else warnx("Reading config page header failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } *header = req.header; return (0); @@ -380,7 +375,7 @@ mpt_read_config_page(int fd, U8 PageType { struct mpt_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -404,9 +399,9 @@ mpt_read_config_page(int fd, U8 PageType req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -428,7 +423,7 @@ mpt_read_extended_config_page(int fd, U8 { struct mpt_ext_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -453,9 +448,9 @@ mpt_read_extended_config_page(int fd, U8 req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_EXT_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -484,7 +479,7 @@ mpt_write_config_page(int fd, void *buf, hdr = buf; req.len = hdr->PageLength * 4; if (ioctl(fd, MPTIO_WRITE_CFG_PAGE, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) { *IOCStatus = req.ioc_status; @@ -492,8 +487,7 @@ mpt_write_config_page(int fd, void *buf, } warnx("Writing config page failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } return (0); } @@ -507,10 +501,8 @@ mpt_raid_action(int fd, U8 Action, U8 Vo if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; - if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) { - errno = EINVAL; - return (-1); - } + if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) + return (EINVAL); bzero(&raid_act, sizeof(raid_act)); raid_act.action = Action; raid_act.volume_bus = VolumeBus; @@ -524,7 +516,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } if (ioctl(fd, MPTIO_RAID_ACTION, &raid_act) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(raid_act.ioc_status)) { if (IOCStatus != NULL) { @@ -533,8 +525,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } warnx("RAID action failed: %s", mpt_ioc_status(raid_act.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } if (ActionStatus != NULL) @@ -544,8 +535,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo return (0); warnx("RAID action failed: %s", mpt_raid_status(raid_act.action_status)); - errno = EIO; - return (-1); + return (EIO); } if (VolumeStatus != NULL) Modified: stable/8/usr.sbin/mptutil/mpt_config.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:08:15 2010 (r215534) @@ -102,15 +102,15 @@ mpt_lock_volume(U8 VolumeBus, U8 VolumeI */ return (0); if (error) { - errno = error; - warn("Unable to lookup volume device name"); - return (-1); + warnc(error, "Unable to lookup volume device name"); + return (error); } snprintf(path, sizeof(path), "%s%s", _PATH_DEV, qd.devname); vfd = open(path, O_RDWR); if (vfd < 0) { + error = errno; warn("Unable to lock volume %s", qd.devname); - return (-1); + return (error); } return (0); } @@ -119,13 +119,14 @@ static int mpt_lock_physdisk(struct mpt_standalone_disk *disk) { char path[MAXPATHLEN]; - int dfd; + int dfd, error; snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk->devname); dfd = open(path, O_RDWR); if (dfd < 0) { + error = errno; warn("Unable to lock disk %s", disk->devname); - return (-1); + return (error); } return (0); } @@ -144,8 +145,7 @@ mpt_lookup_standalone_disk(const char *n id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } for (i = 0; i < ndisks; i++) { if (disks[i].bus == (U8)bus && @@ -154,8 +154,7 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } } @@ -166,12 +165,10 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } - errno = EINVAL; - return (-1); + return (EINVAL); } /* @@ -182,16 +179,17 @@ mpt_create_physdisk(int fd, struct mpt_s { CONFIG_PAGE_HEADER header; CONFIG_PAGE_RAID_PHYS_DISK_0 *config_page; + int error; U32 ActionData; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, - 0, 0, &header, NULL) < 0) - return (-1); + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, + 0, 0, &header, NULL); + if (error) + return (error); if (header.PageVersion > MPI_RAIDPHYSDISKPAGE0_PAGEVERSION) { warnx("Unsupported RAID physdisk page 0 version %d", header.PageVersion); - errno = EOPNOTSUPP; - return (-1); + return (EOPNOTSUPP); } config_page = calloc(1, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0)); config_page->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; @@ -203,10 +201,11 @@ mpt_create_physdisk(int fd, struct mpt_s config_page->PhysDiskID = disk->target; /* XXX: Enclosure info for PhysDiskSettings? */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, config_page, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0), NULL, - &ActionData, sizeof(ActionData), NULL, NULL, 1) < 0) - return (-1); + &ActionData, sizeof(ActionData), NULL, NULL, 1); + if (error) + return (error); *PhysDiskNum = ActionData & 0xff; return (0); } @@ -232,18 +231,20 @@ clear_config(int ac, char **av) IOC_3_PHYS_DISK *disk; CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; - int ch, fd, i; + int ch, error, fd, i; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (errno); + return (error); } /* Lock all the volumes first. */ @@ -267,14 +268,16 @@ clear_config(int ac, char **av) /* Delete all the volumes. */ vol = ioc2->RaidVolume; - for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, + for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, - NULL, NULL, 0) < 0) - warn("Failed to delete volume %s", + NULL, NULL, 0); + if (error) + warnc(error, "Failed to delete volume %s", mpt_volume_name(vol->VolumeBus, vol->VolumeID)); + } free(ioc2); /* Delete all the spares. */ @@ -411,8 +414,9 @@ parse_volume(int fd, int raid_type, stru /* See if it is a standalone disk. */ if (mpt_lookup_standalone_disk(cp, state->sdisks, state->nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", cp); - return (errno); + return (error); } dinfo->sdisk = &state->sdisks[i]; @@ -433,17 +437,18 @@ add_drives(int fd, struct volume_info *i { struct drive_info *dinfo; U8 PhysDiskNum; - int i; + int error, i; for (i = 0, dinfo = info->drives; i < info->drive_count; i++, dinfo++) { if (dinfo->info == NULL) { if (mpt_create_physdisk(fd, dinfo->sdisk, &PhysDiskNum) < 0) { + error = errno; warn( "Failed to create physical disk page for %s", dinfo->sdisk->devname); - return (errno); + return (error); } if (verbose) printf("Added drive %s with PhysDiskNum %u\n", @@ -500,11 +505,14 @@ build_volume(int fd, struct volume_info U32 MinLBA; uint64_t MaxLBA; size_t page_size; - int i; + int error, i; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, - 0, 0, &header, NULL) < 0) + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, + 0, 0, &header, NULL); + if (error) { + errno = error; return (NULL); + } if (header.PageVersion > MPI_RAIDVOLPAGE0_PAGEVERSION) { warnx("Unsupported RAID volume page 0 version %d", header.PageVersion); @@ -514,6 +522,8 @@ build_volume(int fd, struct volume_info page_size = sizeof(CONFIG_PAGE_RAID_VOL_0) + sizeof(RAID_VOL0_PHYS_DISK) * (info->drive_count - 1); vol = calloc(1, page_size); + if (vol == NULL) + return (NULL); /* Header */ vol->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; @@ -607,8 +617,8 @@ create_volume(int ac, char **av) CONFIG_PAGE_RAID_VOL_0 *vol; struct config_id_state state; struct volume_info *info; - int ch, error, fd, i, raid_type, verbose, quick; long stripe_size; + int ch, error, fd, i, quick, raid_type, verbose; #ifdef DEBUG int dump; #endif @@ -620,8 +630,9 @@ create_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } /* Lookup the RAID type first. */ @@ -677,8 +688,9 @@ create_volume(int ac, char **av) /* Fetch existing config data. */ state.ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (state.ioc2 == NULL) { + error = errno; warn("Failed to read volume list"); - return (errno); + return (error); } state.list = mpt_pd_list(fd); if (state.list == NULL) @@ -696,6 +708,8 @@ create_volume(int ac, char **av) return (EINVAL); } info = calloc(1, sizeof(*info)); + if (info == NULL) + return (ENOMEM); error = parse_volume(fd, raid_type, &state, av[0], info); if (error) return (error); @@ -707,6 +721,8 @@ create_volume(int ac, char **av) /* Build the volume. */ vol = build_volume(fd, info, raid_type, stripe_size, &state, verbose); + if (vol == NULL) + return (errno); #ifdef DEBUG if (dump) { @@ -716,12 +732,13 @@ create_volume(int ac, char **av) #endif /* Send the new volume to the controller. */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, quick ? MPI_RAID_ACTION_ADATA_DO_NOT_SYNC : 0, - vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1) < - 0) { + vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1); + if (error) { + errno = error; warn("Failed to add volume"); - return (errno); + return (error); } #ifdef DEBUG @@ -745,7 +762,7 @@ static int delete_volume(int ac, char **av) { U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("delete: volume required"); @@ -754,24 +771,27 @@ delete_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", av[1]); + return (error); } if (mpt_lock_volume(VolumeBus, VolumeID) < 0) return (errno); - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, NULL, - NULL, 0) < 0) { - warn("Failed to delete volume"); - return (errno); + NULL, 0); + if (error) { + warnc(error, "Failed to delete volume"); + return (error); } mpt_rescan_bus(-1, -1); @@ -788,16 +808,17 @@ find_volume_spare_pool(int fd, const cha CONFIG_PAGE_IOC_2 *ioc2; CONFIG_PAGE_IOC_2_RAID_VOL *vol; U8 VolumeBus, VolumeID; - int i, j, new_pool, pool_count[7]; + int error, i, j, new_pool, pool_count[7]; - if (mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", name); - return (-1); + error = mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", name); + return (error); } info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); /* * Check for an existing pool other than pool 0 (used for @@ -817,15 +838,16 @@ find_volume_spare_pool(int fd, const cha */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (-1); + return (error); } bzero(pool_count, sizeof(pool_count)); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { info = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); for (j = 0; j < 7; j++) if (info->VolumeSettings.HotSparePool & (1 << (j + 1))) pool_count[j]++; @@ -843,14 +865,15 @@ find_volume_spare_pool(int fd, const cha /* Add this pool to the volume. */ info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (error); info->VolumeSettings.HotSparePool |= (1 << new_pool); - if (mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, VolumeBus, VolumeID, 0, *(U32 *)&info->VolumeSettings, NULL, 0, - NULL, NULL, 0, NULL, NULL, 0) < 0) { + NULL, NULL, 0, NULL, NULL, 0); + if (error) { warnx("Failed to add spare pool %d to %s", new_pool, mpt_volume_name(VolumeBus, VolumeID)); - return (-1); + return (error); } free(info); @@ -878,13 +901,15 @@ add_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } if (ac == 3) { - if (find_volume_spare_pool(fd, av[2], &pool) < 0) - return (errno); + error = find_volume_spare_pool(fd, av[2], &pool); + if (error) + return (error); } else pool = MPI_RAID_HOT_SPARE_POOL_0; @@ -902,16 +927,18 @@ add_spare(int ac, char **av) if (mpt_lookup_standalone_disk(av[1], sdisks, nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", av[1]); - return (errno); + return (error); } if (mpt_lock_physdisk(&sdisks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &sdisks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(sdisks); } @@ -919,8 +946,9 @@ add_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } info->PhysDiskSettings.HotSparePool = pool; @@ -928,8 +956,8 @@ add_spare(int ac, char **av) 0, PhysDiskNum, *(U32 *)&info->PhysDiskSettings, NULL, 0, NULL, NULL, 0, NULL, NULL, 0); if (error) { - warn("Failed to assign spare"); - return (errno); + warnc(error, "Failed to assign spare"); + return (error); } free(info); @@ -954,8 +982,9 @@ remove_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -972,8 +1001,9 @@ remove_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (info->PhysDiskSettings.HotSparePool == 0) { @@ -982,8 +1012,9 @@ remove_spare(int ac, char **av) } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1011,8 +1042,9 @@ pd_create(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } error = mpt_fetch_disks(fd, &ndisks, &disks); @@ -1022,16 +1054,18 @@ pd_create(int ac, char **av) } if (mpt_lookup_standalone_disk(av[1], disks, ndisks, &i) < 0) { + error = errno; warn("Unable to lookup drive"); - return (errno); + return (error); } if (mpt_lock_physdisk(&disks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &disks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(disks); @@ -1048,7 +1082,7 @@ pd_delete(int ac, char **av) { CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; - int fd; + int error, fd; U8 PhysDiskNum; if (ac != 2) { @@ -1058,8 +1092,9 @@ pd_delete(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -1067,20 +1102,23 @@ pd_delete(int ac, char **av) return (errno); if (mpt_lookup_drive(list, av[1], &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", av[1]); - return (errno); + return (error); } mpt_free_pd_list(list); info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1126,7 +1164,7 @@ debug_config(int ac, char **av) { CONFIG_PAGE_RAID_VOL_0 *vol; U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("debug: volume required"); @@ -1135,19 +1173,22 @@ debug_config(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume: %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume: %s", av[1]); + return (error); } vol = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (vol == NULL) { + error = errno; warn("Failed to get volume info"); - return (errno); + return (error); } dump_config(vol); Modified: stable/8/usr.sbin/mptutil/mpt_drive.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:08:15 2010 (r215534) @@ -129,7 +129,7 @@ mpt_pd_insert(int fd, struct mpt_drive_l list->drives[j + 1] = list->drives[j]; list->drives[i] = mpt_pd_info(fd, PhysDiskNum, NULL); if (list->drives[i] == NULL) - return (-1); + return (errno); list->ndrives++; return (0); } @@ -146,26 +146,32 @@ mpt_pd_list(int fd) CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; struct mpt_drive_list *list; - int count, i, j; + int count, error, i, j; ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); + errno = error; return (NULL); } ioc3 = mpt_read_ioc_page(fd, 3, NULL); if (ioc3 == NULL) { + error = errno; warn("Failed to fetch drive list"); free(ioc2); + errno = error; return (NULL); } ioc5 = mpt_read_ioc_page(fd, 5, NULL); if (ioc5 == NULL) { + error = errno; warn("Failed to fetch spare list"); free(ioc3); free(ioc2); + errno = error; return (NULL); } @@ -180,7 +186,9 @@ mpt_pd_list(int fd) volumes[i] = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (volumes[i] == NULL) { + error = errno; warn("Failed to read volume info"); + errno = error; return (NULL); } count += volumes[i]->NumPhysDisks; @@ -264,13 +272,11 @@ mpt_lookup_drive(struct mpt_drive_list * return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } bad: - errno = EINVAL; - return (-1); + return (EINVAL); } /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ @@ -306,12 +312,13 @@ drive_set_state(char *drive, U8 Action, CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; U8 PhysDiskNum; - int fd; + int error, fd; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -319,16 +326,18 @@ drive_set_state(char *drive, U8 Action, return (errno); if (mpt_lookup_drive(list, drive, &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", drive); - return (errno); + return (error); } mpt_free_pd_list(list); /* Get the info for this drive. */ info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch info for drive %u", PhysDiskNum); - return (errno); + return (error); } /* Try to change the state. */ @@ -337,10 +346,11 @@ drive_set_state(char *drive, U8 Action, return (EINVAL); } - if (mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, - NULL, 0, NULL, NULL, 0) < 0) { - warn("Failed to set drive %u to %s", PhysDiskNum, name); - return (errno); + error = mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, + NULL, 0, NULL, NULL, 0); + if (error) { + warnc(error, "Failed to set drive %u to %s", PhysDiskNum, name); + return (error); } free(info); Modified: stable/8/usr.sbin/mptutil/mpt_evt.c ============================================================================== --- stable/8/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:07:33 2010 (r215533) +++ stable/8/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:08:15 2010 (r215534) @@ -94,18 +94,20 @@ show_events(int ac, char **av) { CONFIG_PAGE_LOG_0 *log; MPI_LOG_0_ENTRY **entries; - int ch, fd, i, num_events, verbose; + int ch, error, fd, i, num_events, verbose; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } log = mpt_get_events(fd, NULL); if (log == NULL) { + error = errno; warn("Failed to get event log info"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:08:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D50E106566B; Fri, 19 Nov 2010 17:08:29 +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 4B1788FC1D; Fri, 19 Nov 2010 17:08: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 oAJH8THF081942; Fri, 19 Nov 2010 17:08:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJH8TYS081934; Fri, 19 Nov 2010 17:08:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191708.oAJH8TYS081934@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:08:29 +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: r215535 - stable/7/usr.sbin/mptutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:08:29 -0000 Author: jhb Date: Fri Nov 19 17:08:29 2010 New Revision: 215535 URL: http://svn.freebsd.org/changeset/base/215535 Log: MFC 204352, 208028, 209266, 209399, 210723, 213672, 215046: - Fixed static linkage. - Document that mptutil/mpt do not support RAID volumes in excess of 2TB. - Report subcommand handler errors so that tools that invoke mptutil can robustly report errors. - Save errno values before calling warn(3) so that errors are correctly reported. - Check for malloc() failures. Modified: stable/7/usr.sbin/mptutil/Makefile stable/7/usr.sbin/mptutil/mpt_cam.c stable/7/usr.sbin/mptutil/mpt_cmd.c stable/7/usr.sbin/mptutil/mpt_config.c stable/7/usr.sbin/mptutil/mpt_drive.c stable/7/usr.sbin/mptutil/mpt_evt.c stable/7/usr.sbin/mptutil/mpt_show.c stable/7/usr.sbin/mptutil/mpt_volume.c stable/7/usr.sbin/mptutil/mptutil.8 stable/7/usr.sbin/mptutil/mptutil.c Directory Properties: stable/7/usr.sbin/mptutil/ (props changed) Modified: stable/7/usr.sbin/mptutil/Makefile ============================================================================== --- stable/7/usr.sbin/mptutil/Makefile Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/Makefile Fri Nov 19 17:08:29 2010 (r215535) @@ -8,8 +8,8 @@ MAN= mptutil.8 WARNS?= 3 -DPADD+= ${LIBCAM} ${LIBUTIL} -LDADD+= -lcam -lutil +DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} +LDADD= -lcam -lsbuf -lutil # Here be dragons .ifdef DEBUG Modified: stable/7/usr.sbin/mptutil/mpt_cam.c ============================================================================== --- stable/7/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/mpt_cam.c Fri Nov 19 17:08:29 2010 (r215535) @@ -63,6 +63,7 @@ fetch_path_id(path_id_t *path_id) struct bus_match_pattern *b; union ccb ccb; size_t bufsize; + int error; if (xpt_open() < 0) return (ENXIO); @@ -91,9 +92,10 @@ fetch_path_id(path_id_t *path_id) b->flags = BUS_MATCH_NAME | BUS_MATCH_UNIT | BUS_MATCH_BUS_ID; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (errno); + return (error); } free(ccb.cdm.patterns); @@ -124,7 +126,7 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID union ccb ccb; path_id_t path_id; size_t bufsize; - int error, i; + int error; /* mpt(4) only handles devices on bus 0. */ if (VolumeBus != 0) @@ -164,10 +166,10 @@ mpt_query_disk(U8 VolumeBus, U8 VolumeID p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME | PERIPH_MATCH_TARGET; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -397,8 +399,8 @@ mpt_fetch_disks(int fd, int *ndisks, str union ccb ccb; path_id_t path_id; size_t bufsize; - u_int i; int count, error; + uint32_t i; if (xpt_open() < 0) return (ENXIO); @@ -431,10 +433,10 @@ mpt_fetch_disks(int fd, int *ndisks, str p->flags = PERIPH_MATCH_PATH | PERIPH_MATCH_NAME; if (ioctl(xptfd, CAMIOCOMMAND, &ccb) < 0) { - i = errno; + error = errno; free(ccb.cdm.matches); free(ccb.cdm.patterns); - return (i); + return (error); } free(ccb.cdm.patterns); @@ -481,6 +483,8 @@ mpt_fetch_disks(int fd, int *ndisks, str * exclude them from the list. */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); + if (ioc2 == NULL) + return (errno); disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); count = 0; for (i = 0; i < ccb.cdm.num_matches; i++) { Modified: stable/7/usr.sbin/mptutil/mpt_cmd.c ============================================================================== --- stable/7/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/mpt_cmd.c Fri Nov 19 17:08:29 2010 (r215535) @@ -310,18 +310,15 @@ mpt_lookup_volume(int fd, const char *na id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } *VolumeBus = bus; *VolumeID = id; return (0); } } else if (*cp == '\0') { - if (bus < 0 || bus > 0xff) { - errno = EINVAL; - return (-1); - } + if (bus < 0 || bus > 0xff) + return (EINVAL); *VolumeBus = 0; *VolumeID = bus; return (0); @@ -329,7 +326,7 @@ mpt_lookup_volume(int fd, const char *na ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) - return (-1); + return (errno); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { @@ -343,8 +340,7 @@ mpt_lookup_volume(int fd, const char *na } } free(ioc2); - errno = EINVAL; - return (-1); + return (EINVAL); } int @@ -360,15 +356,14 @@ mpt_read_config_page_header(int fd, U8 P req.header.PageNumber = PageNumber; req.page_address = PageAddress; if (ioctl(fd, MPTIO_READ_CFG_HEADER, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; else warnx("Reading config page header failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } *header = req.header; return (0); @@ -380,7 +375,7 @@ mpt_read_config_page(int fd, U8 PageType { struct mpt_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -404,9 +399,9 @@ mpt_read_config_page(int fd, U8 PageType req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -428,7 +423,7 @@ mpt_read_extended_config_page(int fd, U8 { struct mpt_ext_cfg_page_req req; void *buf; - int save_errno; + int error; if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; @@ -453,9 +448,9 @@ mpt_read_extended_config_page(int fd, U8 req.buf = buf; bcopy(&req.header, buf, sizeof(req.header)); if (ioctl(fd, MPTIO_READ_EXT_CFG_PAGE, &req) < 0) { - save_errno = errno; + error = errno; free(buf); - errno = save_errno; + errno = error; return (NULL); } if (!IOC_STATUS_SUCCESS(req.ioc_status)) { @@ -484,7 +479,7 @@ mpt_write_config_page(int fd, void *buf, hdr = buf; req.len = hdr->PageLength * 4; if (ioctl(fd, MPTIO_WRITE_CFG_PAGE, &req) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) { *IOCStatus = req.ioc_status; @@ -492,8 +487,7 @@ mpt_write_config_page(int fd, void *buf, } warnx("Writing config page failed: %s", mpt_ioc_status(req.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } return (0); } @@ -507,10 +501,8 @@ mpt_raid_action(int fd, U8 Action, U8 Vo if (IOCStatus != NULL) *IOCStatus = MPI_IOCSTATUS_SUCCESS; - if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) { - errno = EINVAL; - return (-1); - } + if (datalen < 0 || (unsigned)datalen > sizeof(raid_act.action_data)) + return (EINVAL); bzero(&raid_act, sizeof(raid_act)); raid_act.action = Action; raid_act.volume_bus = VolumeBus; @@ -524,7 +516,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } if (ioctl(fd, MPTIO_RAID_ACTION, &raid_act) < 0) - return (-1); + return (errno); if (!IOC_STATUS_SUCCESS(raid_act.ioc_status)) { if (IOCStatus != NULL) { @@ -533,8 +525,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo } warnx("RAID action failed: %s", mpt_ioc_status(raid_act.ioc_status)); - errno = EIO; - return (-1); + return (EIO); } if (ActionStatus != NULL) @@ -544,8 +535,7 @@ mpt_raid_action(int fd, U8 Action, U8 Vo return (0); warnx("RAID action failed: %s", mpt_raid_status(raid_act.action_status)); - errno = EIO; - return (-1); + return (EIO); } if (VolumeStatus != NULL) Modified: stable/7/usr.sbin/mptutil/mpt_config.c ============================================================================== --- stable/7/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/mpt_config.c Fri Nov 19 17:08:29 2010 (r215535) @@ -102,15 +102,15 @@ mpt_lock_volume(U8 VolumeBus, U8 VolumeI */ return (0); if (error) { - errno = error; - warn("Unable to lookup volume device name"); - return (-1); + warnc(error, "Unable to lookup volume device name"); + return (error); } snprintf(path, sizeof(path), "%s%s", _PATH_DEV, qd.devname); vfd = open(path, O_RDWR); if (vfd < 0) { + error = errno; warn("Unable to lock volume %s", qd.devname); - return (-1); + return (error); } return (0); } @@ -119,13 +119,14 @@ static int mpt_lock_physdisk(struct mpt_standalone_disk *disk) { char path[MAXPATHLEN]; - int dfd; + int dfd, error; snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk->devname); dfd = open(path, O_RDWR); if (dfd < 0) { + error = errno; warn("Unable to lock disk %s", disk->devname); - return (-1); + return (error); } return (0); } @@ -144,8 +145,7 @@ mpt_lookup_standalone_disk(const char *n id = strtol(cp + 1, &cp, 0); if (*cp == '\0') { if (bus < 0 || bus > 0xff || id < 0 || id > 0xff) { - errno = EINVAL; - return (-1); + return (EINVAL); } for (i = 0; i < ndisks; i++) { if (disks[i].bus == (U8)bus && @@ -154,8 +154,7 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } } @@ -166,12 +165,10 @@ mpt_lookup_standalone_disk(const char *n return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } - errno = EINVAL; - return (-1); + return (EINVAL); } /* @@ -182,16 +179,17 @@ mpt_create_physdisk(int fd, struct mpt_s { CONFIG_PAGE_HEADER header; CONFIG_PAGE_RAID_PHYS_DISK_0 *config_page; + int error; U32 ActionData; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, - 0, 0, &header, NULL) < 0) - return (-1); + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, + 0, 0, &header, NULL); + if (error) + return (error); if (header.PageVersion > MPI_RAIDPHYSDISKPAGE0_PAGEVERSION) { warnx("Unsupported RAID physdisk page 0 version %d", header.PageVersion); - errno = EOPNOTSUPP; - return (-1); + return (EOPNOTSUPP); } config_page = calloc(1, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0)); config_page->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK; @@ -203,10 +201,11 @@ mpt_create_physdisk(int fd, struct mpt_s config_page->PhysDiskID = disk->target; /* XXX: Enclosure info for PhysDiskSettings? */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, config_page, sizeof(CONFIG_PAGE_RAID_PHYS_DISK_0), NULL, - &ActionData, sizeof(ActionData), NULL, NULL, 1) < 0) - return (-1); + &ActionData, sizeof(ActionData), NULL, NULL, 1); + if (error) + return (error); *PhysDiskNum = ActionData & 0xff; return (0); } @@ -232,18 +231,20 @@ clear_config(int ac, char **av) IOC_3_PHYS_DISK *disk; CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; - int ch, fd, i; + int ch, error, fd, i; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (errno); + return (error); } /* Lock all the volumes first. */ @@ -267,14 +268,16 @@ clear_config(int ac, char **av) /* Delete all the volumes. */ vol = ioc2->RaidVolume; - for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, + for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, - NULL, NULL, 0) < 0) - warn("Failed to delete volume %s", + NULL, NULL, 0); + if (error) + warnc(error, "Failed to delete volume %s", mpt_volume_name(vol->VolumeBus, vol->VolumeID)); + } free(ioc2); /* Delete all the spares. */ @@ -411,8 +414,9 @@ parse_volume(int fd, int raid_type, stru /* See if it is a standalone disk. */ if (mpt_lookup_standalone_disk(cp, state->sdisks, state->nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", cp); - return (errno); + return (error); } dinfo->sdisk = &state->sdisks[i]; @@ -433,17 +437,18 @@ add_drives(int fd, struct volume_info *i { struct drive_info *dinfo; U8 PhysDiskNum; - int i; + int error, i; for (i = 0, dinfo = info->drives; i < info->drive_count; i++, dinfo++) { if (dinfo->info == NULL) { if (mpt_create_physdisk(fd, dinfo->sdisk, &PhysDiskNum) < 0) { + error = errno; warn( "Failed to create physical disk page for %s", dinfo->sdisk->devname); - return (errno); + return (error); } if (verbose) printf("Added drive %s with PhysDiskNum %u\n", @@ -500,11 +505,14 @@ build_volume(int fd, struct volume_info U32 MinLBA; uint64_t MaxLBA; size_t page_size; - int i; + int error, i; - if (mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, - 0, 0, &header, NULL) < 0) + error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_VOLUME, + 0, 0, &header, NULL); + if (error) { + errno = error; return (NULL); + } if (header.PageVersion > MPI_RAIDVOLPAGE0_PAGEVERSION) { warnx("Unsupported RAID volume page 0 version %d", header.PageVersion); @@ -514,6 +522,8 @@ build_volume(int fd, struct volume_info page_size = sizeof(CONFIG_PAGE_RAID_VOL_0) + sizeof(RAID_VOL0_PHYS_DISK) * (info->drive_count - 1); vol = calloc(1, page_size); + if (vol == NULL) + return (NULL); /* Header */ vol->Header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME; @@ -607,8 +617,8 @@ create_volume(int ac, char **av) CONFIG_PAGE_RAID_VOL_0 *vol; struct config_id_state state; struct volume_info *info; - int ch, error, fd, i, raid_type, verbose, quick; long stripe_size; + int ch, error, fd, i, quick, raid_type, verbose; #ifdef DEBUG int dump; #endif @@ -620,8 +630,9 @@ create_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } /* Lookup the RAID type first. */ @@ -677,8 +688,9 @@ create_volume(int ac, char **av) /* Fetch existing config data. */ state.ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (state.ioc2 == NULL) { + error = errno; warn("Failed to read volume list"); - return (errno); + return (error); } state.list = mpt_pd_list(fd); if (state.list == NULL) @@ -696,6 +708,8 @@ create_volume(int ac, char **av) return (EINVAL); } info = calloc(1, sizeof(*info)); + if (info == NULL) + return (ENOMEM); error = parse_volume(fd, raid_type, &state, av[0], info); if (error) return (error); @@ -707,6 +721,8 @@ create_volume(int ac, char **av) /* Build the volume. */ vol = build_volume(fd, info, raid_type, stripe_size, &state, verbose); + if (vol == NULL) + return (errno); #ifdef DEBUG if (dump) { @@ -716,12 +732,13 @@ create_volume(int ac, char **av) #endif /* Send the new volume to the controller. */ - if (mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_VOLUME, vol->VolumeBus, vol->VolumeID, 0, quick ? MPI_RAID_ACTION_ADATA_DO_NOT_SYNC : 0, - vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1) < - 0) { + vol, vol->Header.PageLength * 4, NULL, NULL, 0, NULL, NULL, 1); + if (error) { + errno = error; warn("Failed to add volume"); - return (errno); + return (error); } #ifdef DEBUG @@ -745,7 +762,7 @@ static int delete_volume(int ac, char **av) { U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("delete: volume required"); @@ -754,24 +771,27 @@ delete_volume(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", av[1]); + return (error); } if (mpt_lock_volume(VolumeBus, VolumeID) < 0) return (errno); - if (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, + error = mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_VOLUME, VolumeBus, VolumeID, 0, MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS | MPI_RAID_ACTION_ADATA_ZERO_LBA0, NULL, 0, NULL, NULL, 0, NULL, - NULL, 0) < 0) { - warn("Failed to delete volume"); - return (errno); + NULL, 0); + if (error) { + warnc(error, "Failed to delete volume"); + return (error); } mpt_rescan_bus(-1, -1); @@ -788,16 +808,17 @@ find_volume_spare_pool(int fd, const cha CONFIG_PAGE_IOC_2 *ioc2; CONFIG_PAGE_IOC_2_RAID_VOL *vol; U8 VolumeBus, VolumeID; - int i, j, new_pool, pool_count[7]; + int error, i, j, new_pool, pool_count[7]; - if (mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume %s", name); - return (-1); + error = mpt_lookup_volume(fd, name, &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume %s", name); + return (error); } info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); /* * Check for an existing pool other than pool 0 (used for @@ -817,15 +838,16 @@ find_volume_spare_pool(int fd, const cha */ ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); - return (-1); + return (error); } bzero(pool_count, sizeof(pool_count)); vol = ioc2->RaidVolume; for (i = 0; i < ioc2->NumActiveVolumes; vol++, i++) { info = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (info == NULL) - return (-1); + return (errno); for (j = 0; j < 7; j++) if (info->VolumeSettings.HotSparePool & (1 << (j + 1))) pool_count[j]++; @@ -843,14 +865,15 @@ find_volume_spare_pool(int fd, const cha /* Add this pool to the volume. */ info = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (info == NULL) - return (-1); + return (error); info->VolumeSettings.HotSparePool |= (1 << new_pool); - if (mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, + error = mpt_raid_action(fd, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, VolumeBus, VolumeID, 0, *(U32 *)&info->VolumeSettings, NULL, 0, - NULL, NULL, 0, NULL, NULL, 0) < 0) { + NULL, NULL, 0, NULL, NULL, 0); + if (error) { warnx("Failed to add spare pool %d to %s", new_pool, mpt_volume_name(VolumeBus, VolumeID)); - return (-1); + return (error); } free(info); @@ -878,13 +901,15 @@ add_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } if (ac == 3) { - if (find_volume_spare_pool(fd, av[2], &pool) < 0) - return (errno); + error = find_volume_spare_pool(fd, av[2], &pool); + if (error) + return (error); } else pool = MPI_RAID_HOT_SPARE_POOL_0; @@ -902,16 +927,18 @@ add_spare(int ac, char **av) if (mpt_lookup_standalone_disk(av[1], sdisks, nsdisks, &i) < 0) { + error = errno; warn("Unable to lookup drive %s", av[1]); - return (errno); + return (error); } if (mpt_lock_physdisk(&sdisks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &sdisks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(sdisks); } @@ -919,8 +946,9 @@ add_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } info->PhysDiskSettings.HotSparePool = pool; @@ -928,8 +956,8 @@ add_spare(int ac, char **av) 0, PhysDiskNum, *(U32 *)&info->PhysDiskSettings, NULL, 0, NULL, NULL, 0, NULL, NULL, 0); if (error) { - warn("Failed to assign spare"); - return (errno); + warnc(error, "Failed to assign spare"); + return (error); } free(info); @@ -954,8 +982,9 @@ remove_spare(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -972,8 +1001,9 @@ remove_spare(int ac, char **av) info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (info->PhysDiskSettings.HotSparePool == 0) { @@ -982,8 +1012,9 @@ remove_spare(int ac, char **av) } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1011,8 +1042,9 @@ pd_create(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } error = mpt_fetch_disks(fd, &ndisks, &disks); @@ -1022,16 +1054,18 @@ pd_create(int ac, char **av) } if (mpt_lookup_standalone_disk(av[1], disks, ndisks, &i) < 0) { + error = errno; warn("Unable to lookup drive"); - return (errno); + return (error); } if (mpt_lock_physdisk(&disks[i]) < 0) return (errno); if (mpt_create_physdisk(fd, &disks[i], &PhysDiskNum) < 0) { + error = errno; warn("Failed to create physical disk page"); - return (errno); + return (error); } free(disks); @@ -1048,7 +1082,7 @@ pd_delete(int ac, char **av) { CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; - int fd; + int error, fd; U8 PhysDiskNum; if (ac != 2) { @@ -1058,8 +1092,9 @@ pd_delete(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -1067,20 +1102,23 @@ pd_delete(int ac, char **av) return (errno); if (mpt_lookup_drive(list, av[1], &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", av[1]); - return (errno); + return (error); } mpt_free_pd_list(list); info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch drive info"); - return (errno); + return (error); } if (mpt_delete_physdisk(fd, PhysDiskNum) < 0) { + error = errno; warn("Failed to delete physical disk page"); - return (errno); + return (error); } mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID); @@ -1126,7 +1164,7 @@ debug_config(int ac, char **av) { CONFIG_PAGE_RAID_VOL_0 *vol; U8 VolumeBus, VolumeID; - int fd; + int error, fd; if (ac != 2) { warnx("debug: volume required"); @@ -1135,19 +1173,22 @@ debug_config(int ac, char **av) fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } - if (mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID) < 0) { - warn("Invalid volume: %s", av[1]); - return (errno); + error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); + if (error) { + warnc(error, "Invalid volume: %s", av[1]); + return (error); } vol = mpt_vol_info(fd, VolumeBus, VolumeID, NULL); if (vol == NULL) { + error = errno; warn("Failed to get volume info"); - return (errno); + return (error); } dump_config(vol); Modified: stable/7/usr.sbin/mptutil/mpt_drive.c ============================================================================== --- stable/7/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/mpt_drive.c Fri Nov 19 17:08:29 2010 (r215535) @@ -129,7 +129,7 @@ mpt_pd_insert(int fd, struct mpt_drive_l list->drives[j + 1] = list->drives[j]; list->drives[i] = mpt_pd_info(fd, PhysDiskNum, NULL); if (list->drives[i] == NULL) - return (-1); + return (errno); list->ndrives++; return (0); } @@ -146,26 +146,32 @@ mpt_pd_list(int fd) CONFIG_PAGE_IOC_5 *ioc5; IOC_5_HOT_SPARE *spare; struct mpt_drive_list *list; - int count, i, j; + int count, error, i, j; ioc2 = mpt_read_ioc_page(fd, 2, NULL); if (ioc2 == NULL) { + error = errno; warn("Failed to fetch volume list"); + errno = error; return (NULL); } ioc3 = mpt_read_ioc_page(fd, 3, NULL); if (ioc3 == NULL) { + error = errno; warn("Failed to fetch drive list"); free(ioc2); + errno = error; return (NULL); } ioc5 = mpt_read_ioc_page(fd, 5, NULL); if (ioc5 == NULL) { + error = errno; warn("Failed to fetch spare list"); free(ioc3); free(ioc2); + errno = error; return (NULL); } @@ -180,7 +186,9 @@ mpt_pd_list(int fd) volumes[i] = mpt_vol_info(fd, vol->VolumeBus, vol->VolumeID, NULL); if (volumes[i] == NULL) { + error = errno; warn("Failed to read volume info"); + errno = error; return (NULL); } count += volumes[i]->NumPhysDisks; @@ -264,13 +272,11 @@ mpt_lookup_drive(struct mpt_drive_list * return (0); } } - errno = ENOENT; - return (-1); + return (ENOENT); } bad: - errno = EINVAL; - return (-1); + return (EINVAL); } /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ @@ -306,12 +312,13 @@ drive_set_state(char *drive, U8 Action, CONFIG_PAGE_RAID_PHYS_DISK_0 *info; struct mpt_drive_list *list; U8 PhysDiskNum; - int fd; + int error, fd; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } list = mpt_pd_list(fd); @@ -319,16 +326,18 @@ drive_set_state(char *drive, U8 Action, return (errno); if (mpt_lookup_drive(list, drive, &PhysDiskNum) < 0) { + error = errno; warn("Failed to find drive %s", drive); - return (errno); + return (error); } mpt_free_pd_list(list); /* Get the info for this drive. */ info = mpt_pd_info(fd, PhysDiskNum, NULL); if (info == NULL) { + error = errno; warn("Failed to fetch info for drive %u", PhysDiskNum); - return (errno); + return (error); } /* Try to change the state. */ @@ -337,10 +346,11 @@ drive_set_state(char *drive, U8 Action, return (EINVAL); } - if (mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, - NULL, 0, NULL, NULL, 0) < 0) { - warn("Failed to set drive %u to %s", PhysDiskNum, name); - return (errno); + error = mpt_raid_action(fd, Action, 0, 0, PhysDiskNum, 0, NULL, 0, NULL, + NULL, 0, NULL, NULL, 0); + if (error) { + warnc(error, "Failed to set drive %u to %s", PhysDiskNum, name); + return (error); } free(info); Modified: stable/7/usr.sbin/mptutil/mpt_evt.c ============================================================================== --- stable/7/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:08:15 2010 (r215534) +++ stable/7/usr.sbin/mptutil/mpt_evt.c Fri Nov 19 17:08:29 2010 (r215535) @@ -94,18 +94,20 @@ show_events(int ac, char **av) { CONFIG_PAGE_LOG_0 *log; MPI_LOG_0_ENTRY **entries; - int ch, fd, i, num_events, verbose; + int ch, error, fd, i, num_events, verbose; fd = mpt_open(mpt_unit); if (fd < 0) { + error = errno; warn("mpt_open"); - return (errno); + return (error); } log = mpt_get_events(fd, NULL); if (log == NULL) { + error = errno; warn("Failed to get event log info"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:11:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36ADB1065670; Fri, 19 Nov 2010 17:11:13 +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 258FC8FC08; Fri, 19 Nov 2010 17:11: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 oAJHBD8J082080; Fri, 19 Nov 2010 17:11:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHBDTq082077; Fri, 19 Nov 2010 17:11:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191711.oAJHBDTq082077@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:11: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: r215536 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:11:13 -0000 Author: marius Date: Fri Nov 19 17:11:12 2010 New Revision: 215536 URL: http://svn.freebsd.org/changeset/base/215536 Log: MFC: r200874 Convert drivers somehow missed in r200874 (merged to stable/8 in r202225) to multipass probing. Modified: stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Fri Nov 19 17:08:29 2010 (r215535) +++ stable/8/sys/sparc64/pci/psycho.c Fri Nov 19 17:11:12 2010 (r215536) @@ -159,7 +159,8 @@ static devclass_t psycho_devclass; DEFINE_CLASS_0(pcib, psycho_driver, psycho_methods, sizeof(struct psycho_softc)); -DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0); +EARLY_DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, psycho_softc) psycho_softcs = SLIST_HEAD_INITIALIZER(psycho_softcs); Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Fri Nov 19 17:08:29 2010 (r215535) +++ stable/8/sys/sparc64/pci/schizo.c Fri Nov 19 17:11:12 2010 (r215536) @@ -158,7 +158,8 @@ static devclass_t schizo_devclass; DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods, sizeof(struct schizo_softc)); -DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0); +EARLY_DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, schizo_softc) schizo_softcs = SLIST_HEAD_INITIALIZER(schizo_softcs); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08CB2106566B; Fri, 19 Nov 2010 17:24:04 +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 D16C48FC15; Fri, 19 Nov 2010 17:24: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 oAJHO3Dd082516; Fri, 19 Nov 2010 17:24:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHO3C4082513; Fri, 19 Nov 2010 17:24:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011191724.oAJHO3C4082513@svn.freebsd.org> From: Marius Strobl Date: Fri, 19 Nov 2010 17:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215537 - 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: Fri, 19 Nov 2010 17:24:04 -0000 Author: marius Date: Fri Nov 19 17:24:03 2010 New Revision: 215537 URL: http://svn.freebsd.org/changeset/base/215537 Log: MFC: r176965 Any driver that relies on its parent to set the devclass has no way to know if has siblings that need an actual probe. Introduce a specail return value called BUS_PROBE_NOOWILDCARD. If the driver returns this, the probe is only successful for devices that have had a specific devclass set for them. Reviewed by: current@, jhb@, grehan@ Modified: stable/7/sys/kern/subr_bus.c stable/7/sys/sys/bus.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/subr_bus.c ============================================================================== --- stable/7/sys/kern/subr_bus.c Fri Nov 19 17:11:12 2010 (r215536) +++ stable/7/sys/kern/subr_bus.c Fri Nov 19 17:24:03 2010 (r215537) @@ -1788,6 +1788,14 @@ device_probe_child(device_t dev, device_ * of pri for the first match. */ if (best == NULL || result > pri) { + /* + * Probes that return BUS_PROBE_NOWILDCARD + * or lower only match when they are set + * in stone by the parent bus. + */ + if (result <= BUS_PROBE_NOWILDCARD && + child->flags & DF_WILDCARD) + continue; best = dl; pri = result; continue; Modified: stable/7/sys/sys/bus.h ============================================================================== --- stable/7/sys/sys/bus.h Fri Nov 19 17:11:12 2010 (r215536) +++ stable/7/sys/sys/bus.h Fri Nov 19 17:24:03 2010 (r215537) @@ -503,7 +503,10 @@ void bus_data_generation_update(void); * is for drivers that wish to have a generic form and a specialized form, * like is done with the pci bus and the acpi pci bus. BUS_PROBE_HOOVER is * for those busses that implement a generic device place-holder for devices on - * the bus that have no more specific driver for them (aka ugen). + * the bus that have no more specific river for them (aka ugen). + * BUS_PROBE_NOWILDCARD or lower means that the device isn't really bidding + * for a device node, but accepts only devices that its parent has told it + * use this driver. */ #define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */ #define BUS_PROBE_VENDOR (-10) /* Vendor supplied driver */ @@ -511,6 +514,7 @@ void bus_data_generation_update(void); #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ #define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ +#define BUS_PROBE_NOWILDCARD (-2000000000) /* No wildcard device matches */ /** * Shorthand for constructing method tables. From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:49:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA005106566B; Fri, 19 Nov 2010 17:49:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA14E8FC18; Fri, 19 Nov 2010 17:49: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 oAJHn8A2083450; Fri, 19 Nov 2010 17:49:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHn8e1083448; Fri, 19 Nov 2010 17:49:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011191749.oAJHn8e1083448@svn.freebsd.org> From: Alan Cox Date: Fri, 19 Nov 2010 17:49: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: r215538 - 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: Fri, 19 Nov 2010 17:49:08 -0000 Author: alc Date: Fri Nov 19 17:49:08 2010 New Revision: 215538 URL: http://svn.freebsd.org/changeset/base/215538 Log: Reduce the amount of detail printed by vm_page_free_toq() when it panics. Reviewed by: kib Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Nov 19 17:24:03 2010 (r215537) +++ head/sys/vm/vm_page.c Fri Nov 19 17:49:08 2010 (r215538) @@ -1663,16 +1663,10 @@ vm_page_free_toq(vm_page_t m) } PCPU_INC(cnt.v_tfree); - if (m->busy || VM_PAGE_IS_FREE(m)) { - printf( - "vm_page_free: pindex(%lu), busy(%d), VPO_BUSY(%d), hold(%d)\n", - (u_long)m->pindex, m->busy, (m->oflags & VPO_BUSY) ? 1 : 0, - m->hold_count); - if (VM_PAGE_IS_FREE(m)) - panic("vm_page_free: freeing free page"); - else - panic("vm_page_free: freeing busy page"); - } + if (VM_PAGE_IS_FREE(m)) + panic("vm_page_free: freeing free page %p", m); + else if (m->busy != 0) + panic("vm_page_free: freeing busy page %p", m); /* * unqueue, then remove page. Note that we cannot destroy @@ -1695,13 +1689,8 @@ vm_page_free_toq(vm_page_t m) m->valid = 0; vm_page_undirty(m); - if (m->wire_count != 0) { - if (m->wire_count > 1) { - panic("vm_page_free: invalid wire count (%d), pindex: 0x%lx", - m->wire_count, (long)m->pindex); - } - panic("vm_page_free: freeing wired page"); - } + if (m->wire_count != 0) + panic("vm_page_free: freeing wired page %p", m); if (m->hold_count != 0) { m->flags &= ~PG_ZERO; vm_page_lock_queues(); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:49:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119FA106564A; Fri, 19 Nov 2010 17:49:17 +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 F32668FC1D; Fri, 19 Nov 2010 17:49: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 oAJHnG8T083496; Fri, 19 Nov 2010 17:49:16 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHnGl1083487; Fri, 19 Nov 2010 17:49:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011191749.oAJHnGl1083487@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 17:49: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: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:49:17 -0000 Author: attilio Date: Fri Nov 19 17:49:16 2010 New Revision: 215539 URL: http://svn.freebsd.org/changeset/base/215539 Log: MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: Move nexus in x86 and cleaning it up. Sponsored by: Sandvine Incorporated Added: stable/8/sys/x86/x86/nexus.c - copied, changed from r214457, head/sys/x86/x86/nexus.c Deleted: stable/8/sys/amd64/amd64/nexus.c stable/8/sys/i386/i386/nexus.c Modified: stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/conf/files.pc98 stable/8/sys/i386/i386/machdep.c stable/8/sys/pc98/include/bus.h stable/8/sys/pc98/pc98/busiosubr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.amd64 Fri Nov 19 17:49:16 2010 (r215539) @@ -123,7 +123,6 @@ amd64/amd64/minidump_machdep.c standard amd64/amd64/mp_machdep.c optional smp amd64/amd64/mp_watchdog.c optional mp_watchdog smp amd64/amd64/mpboot.S optional smp -amd64/amd64/nexus.c standard amd64/amd64/pmap.c standard amd64/amd64/prof_machdep.c optional profiling-routine amd64/amd64/sigtramp.S standard @@ -319,3 +318,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional mptable x86/x86/mptable_pci.c optional mptable pci x86/x86/msi.c optional pci +x86/x86/nexus.c standard Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.i386 Fri Nov 19 17:49:16 2010 (r215539) @@ -289,7 +289,6 @@ i386/xen/mp_machdep.c optional xen smp i386/i386/mp_watchdog.c optional mp_watchdog smp i386/i386/mpboot.s optional smp native i386/xen/mptable.c optional apic xen -i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c optional native i386/xen/pmap.c optional xen @@ -394,3 +393,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional apic native x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci +x86/x86/nexus.c standard Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/conf/files.pc98 Fri Nov 19 17:49:16 2010 (r215539) @@ -158,7 +158,6 @@ i386/i386/mp_clock.c optional smp i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp i386/i386/mpboot.s optional smp -i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard i386/i386/ptrace_machdep.c standard @@ -258,3 +257,4 @@ x86/x86/mca.c standard x86/x86/mptable.c optional apic x86/x86/mptable_pci.c optional apic pci x86/x86/msi.c optional apic pci +x86/x86/nexus.c standard Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/i386/i386/machdep.c Fri Nov 19 17:49:16 2010 (r215539) @@ -1957,7 +1957,7 @@ add_smap_entry(struct bios_smap *smap, v return (1); #ifndef PAE - if (smap->base >= 0xffffffff) { + if (smap->base > 0xffffffff) { printf("%uK of memory above 4GB ignored\n", (u_int)(smap->length / 1024)); return (1); Modified: stable/8/sys/pc98/include/bus.h ============================================================================== --- stable/8/sys/pc98/include/bus.h Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/pc98/include/bus.h Fri Nov 19 17:49:16 2010 (r215539) @@ -158,8 +158,8 @@ struct bus_space_access_methods { * Access methods for bus resources and address space. */ struct bus_space_tag { -#define BUS_SPACE_IO 0 -#define BUS_SPACE_MEM 1 +#define BUS_SPACE_TAG_IO 0 +#define BUS_SPACE_TAG_MEM 1 u_int bs_tag; /* bus space flags */ struct bus_space_access_methods bs_da; /* direct access */ Modified: stable/8/sys/pc98/pc98/busiosubr.c ============================================================================== --- stable/8/sys/pc98/pc98/busiosubr.c Fri Nov 19 17:49:08 2010 (r215538) +++ stable/8/sys/pc98/pc98/busiosubr.c Fri Nov 19 17:49:16 2010 (r215539) @@ -63,7 +63,7 @@ _BUS_SPACE_CALL_FUNCS_PROTO(SBUS_RA_mem, _BUS_SPACE_CALL_FUNCS_PROTO(SBUS_RA_mem,u_int32_t,4) struct bus_space_tag SBUS_io_space_tag = { - BUS_SPACE_IO, + BUS_SPACE_TAG_IO, /* direct bus access methods */ { @@ -81,7 +81,7 @@ struct bus_space_tag SBUS_io_space_tag = }; struct bus_space_tag SBUS_mem_space_tag = { - BUS_SPACE_MEM, + BUS_SPACE_TAG_MEM, /* direct bus access methods */ { @@ -109,7 +109,7 @@ _BUS_SPACE_CALL_FUNCS_PROTO(NEPC_RA_io,u _BUS_SPACE_CALL_FUNCS_PROTO(NEPC_RA_io,u_int32_t,4) struct bus_space_tag NEPC_io_space_tag = { - BUS_SPACE_IO, + BUS_SPACE_TAG_IO, /* direct bus access methods */ { @@ -127,7 +127,7 @@ struct bus_space_tag NEPC_io_space_tag = }; struct bus_space_tag NEPC_mem_space_tag = { - BUS_SPACE_MEM, + BUS_SPACE_TAG_MEM, /* direct bus access methods */ { @@ -256,7 +256,7 @@ i386_memio_subregion(bus_space_tag_t t, pbase = pbsh->bsh_base + offset; switch (t->bs_tag) { - case BUS_SPACE_IO: + case BUS_SPACE_TAG_IO: if (pbsh->bsh_iatsz > 0) { if (offset >= pbsh->bsh_iatsz || offset + size > pbsh->bsh_iatsz) @@ -265,7 +265,7 @@ i386_memio_subregion(bus_space_tag_t t, } break; - case BUS_SPACE_MEM: + case BUS_SPACE_TAG_MEM: if (pbsh->bsh_iatsz > 0) return EINVAL; if (offset > pbsh->bsh_sz || offset + size > pbsh->bsh_sz) @@ -282,7 +282,7 @@ i386_memio_subregion(bus_space_tag_t t, return error; switch (t->bs_tag) { - case BUS_SPACE_IO: + case BUS_SPACE_TAG_IO: if (pbsh->bsh_iatsz > 0) { for (i = 0; i < size; i ++) bsh->bsh_iat[i] = pbsh->bsh_iat[i + offset]; @@ -295,7 +295,7 @@ i386_memio_subregion(bus_space_tag_t t, } break; - case BUS_SPACE_MEM: + case BUS_SPACE_TAG_MEM: break; } Copied and modified: stable/8/sys/x86/x86/nexus.c (from r214457, head/sys/x86/x86/nexus.c) ============================================================================== --- head/sys/x86/x86/nexus.c Thu Oct 28 16:31:39 2010 (r214457, copy source) +++ stable/8/sys/x86/x86/nexus.c Fri Nov 19 17:49:16 2010 (r215539) @@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __amd64__ #include -#endif #include #include #include @@ -67,12 +65,10 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __amd64__ #include -#include -#endif #include #include +#include #ifdef DEV_APIC #include "pcib_if.h" @@ -89,13 +85,15 @@ __FBSDID("$FreeBSD$"); #include #ifdef __amd64__ -#define RMAN_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define RMAN_BUS_SPACE_MEM AMD64_BUS_SPACE_MEM +#define BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define BUS_SPACE_MEM AMD64_BUS_SPACE_MEM #else -#define RMAN_BUS_SPACE_IO I386_BUS_SPACE_IO -#define RMAN_BUS_SPACE_MEM I386_BUS_SPACE_MEM +#define BUS_SPACE_IO I386_BUS_SPACE_IO +#define BUS_SPACE_MEM I386_BUS_SPACE_MEM #endif +#define ELF_KERN_STR ("elf"__XSTRING(__ELF_WORD_SIZE)" kernel") + static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) @@ -435,7 +433,7 @@ nexus_activate_resource(device_t bus, de #else rman_set_bushandle(r, rman_get_start(r)); #endif - rman_set_bustag(r, RMAN_BUS_SPACE_IO); + rman_set_bustag(r, BUS_SPACE_IO); break; case SYS_RES_MEMORY: #ifdef PC98 @@ -446,7 +444,7 @@ nexus_activate_resource(device_t bus, de #endif vaddr = pmap_mapdev(rman_get_start(r), rman_get_size(r)); rman_set_virtual(r, vaddr); - rman_set_bustag(r, RMAN_BUS_SPACE_MEM); + rman_set_bustag(r, BUS_SPACE_MEM); #ifdef PC98 /* PC-98: the type of bus_space_handle_t is the structure. */ bh->bsh_base = (bus_addr_t) vaddr; @@ -668,12 +666,12 @@ ram_probe(device_t dev) return (0); } -#ifdef __amd64__ static int ram_attach(device_t dev) { struct bios_smap *smapbase, *smap, *smapend; struct resource *res; + vm_paddr_t *p; caddr_t kmdp; uint32_t smapsize; int error, rid; @@ -681,69 +679,74 @@ ram_attach(device_t dev) /* Retrieve the system memory map from the loader. */ kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) - kmdp = preload_search_by_type("elf64 kernel"); - smapbase = (struct bios_smap *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_SMAP); - smapsize = *((u_int32_t *)smapbase - 1); - smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); - - rid = 0; - for (smap = smapbase; smap < smapend; smap++) { - if (smap->type != SMAP_TYPE_MEMORY || smap->length == 0) - continue; - error = bus_set_resource(dev, SYS_RES_MEMORY, rid, smap->base, - smap->length); - if (error) - panic("ram_attach: resource %d failed set with %d", rid, - error); - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); - if (res == NULL) - panic("ram_attach: resource %d failed to attach", rid); - rid++; + kmdp = preload_search_by_type(ELF_KERN_STR); + if (kmdp != NULL) + smapbase = (struct bios_smap *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP); + else + smapbase = NULL; + if (smapbase != NULL) { + smapsize = *((u_int32_t *)smapbase - 1); + smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); + + rid = 0; + for (smap = smapbase; smap < smapend; smap++) { + if (smap->type != SMAP_TYPE_MEMORY || + smap->length == 0) + continue; +#ifdef __i386__ + /* + * Resources use long's to track resources, so + * we can't include memory regions above 4GB. + */ + if (smap->base > ~0ul) + continue; +#endif + error = bus_set_resource(dev, SYS_RES_MEMORY, rid, + smap->base, smap->length); + if (error) + panic( + "ram_attach: resource %d failed set with %d", + rid, error); + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + 0); + if (res == NULL) + panic("ram_attach: resource %d failed to attach", + rid); + rid++; + } + return (0); } - return (0); -} -#else -static int -ram_attach(device_t dev) -{ - struct resource *res; - vm_paddr_t *p; - int error, i, rid; /* - * We use the dump_avail[] array rather than phys_avail[] for - * the memory map as phys_avail[] contains holes for kernel - * memory, page 0, the message buffer, and the dcons buffer. - * We test the end address in the loop instead of the start - * since the start address for the first segment is 0. - * - * XXX: It would be preferable to use the SMAP if it exists - * instead since if the SMAP is very fragmented we may not - * include some memory regions in dump_avail[] and phys_avail[]. + * If the system map is not available, fall back to using + * dump_avail[]. We use the dump_avail[] array rather than + * phys_avail[] for the memory map as phys_avail[] contains + * holes for kernel memory, page 0, the message buffer, and + * the dcons buffer. We test the end address in the loop + * instead of the start since the start address for the first + * segment is 0. */ - for (i = 0, p = dump_avail; p[1] != 0; i++, p += 2) { - rid = i; + for (rid = 0, p = dump_avail; p[1] != 0; rid++, p += 2) { #ifdef PAE /* * Resources use long's to track resources, so we can't * include memory regions above 4GB. */ - if (p[0] >= ~0ul) + if (p[0] > ~0ul) break; #endif error = bus_set_resource(dev, SYS_RES_MEMORY, rid, p[0], p[1] - p[0]); if (error) - panic("ram_attach: resource %d failed set with %d", i, + panic("ram_attach: resource %d failed set with %d", rid, error); res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); if (res == NULL) - panic("ram_attach: resource %d failed to attach", i); + panic("ram_attach: resource %d failed to attach", rid); } return (0); } -#endif static device_method_t ram_methods[] = { /* Device interface */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:56:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F11871065670; Fri, 19 Nov 2010 17:56: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 E15738FC18; Fri, 19 Nov 2010 17:56: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 oAJHuGYL083784; Fri, 19 Nov 2010 17:56:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHuGIg083781; Fri, 19 Nov 2010 17:56:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191756.oAJHuGIg083781@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:56: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: r215540 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:56:17 -0000 Author: jhb Date: Fri Nov 19 17:56:16 2010 New Revision: 215540 URL: http://svn.freebsd.org/changeset/base/215540 Log: Set various POSIX capability sysctls to the version of the API that is supported rather than 1. They are supposed to return a suitable value for sysconf(3). While here, make the fsync sysctl match . MFC after: 1 week Modified: head/sys/kern/p1003_1b.c head/sys/kern/posix4_mib.c Modified: head/sys/kern/p1003_1b.c ============================================================================== --- head/sys/kern/p1003_1b.c Fri Nov 19 17:49:16 2010 (r215539) +++ head/sys/kern/p1003_1b.c Fri Nov 19 17:56:16 2010 (r215540) @@ -102,7 +102,7 @@ sched_attach(void) int ret = ksched_attach(&ksched); if (ret == 0) - p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 1); + p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 200112L); return ret; } Modified: head/sys/kern/posix4_mib.c ============================================================================== --- head/sys/kern/posix4_mib.c Fri Nov 19 17:49:16 2010 (r215539) +++ head/sys/kern/posix4_mib.c Fri Nov 19 17:56:16 2010 (r215540) @@ -164,9 +164,10 @@ p31b_iscfg(int num) static void p31b_set_standard(void *dummy) { - /* ??? p31b_setcfg(CTL_P1003_1B_FSYNC, 1); */ - p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 1); - p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 1); + + p31b_setcfg(CTL_P1003_1B_FSYNC, 200112L); + p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 200112L); + p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 200112L); p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE); if (!p31b_iscfg(CTL_P1003_1B_AIO_LISTIO_MAX)) p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, -1); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 17:57:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31D6E106564A; Fri, 19 Nov 2010 17:57:51 +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 221538FC12; Fri, 19 Nov 2010 17:57: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 oAJHvp0O083886; Fri, 19 Nov 2010 17:57:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHvpvH083884; Fri, 19 Nov 2010 17:57:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191757.oAJHvpvH083884@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:57: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: r215541 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:57:51 -0000 Author: jhb Date: Fri Nov 19 17:57:50 2010 New Revision: 215541 URL: http://svn.freebsd.org/changeset/base/215541 Log: Set the POSIX semaphore capability when the semaphore module is enabled. This is ignored in HEAD where semaphores are marked as always enabled in . MFC after: 1 week Modified: head/sys/kern/uipc_sem.c Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Fri Nov 19 17:56:16 2010 (r215540) +++ head/sys/kern/uipc_sem.c Fri Nov 19 17:57:50 2010 (r215541) @@ -949,6 +949,7 @@ ksem_module_init(void) mtx_init(&ksem_count_lock, "ksem count", NULL, MTX_DEF); sx_init(&ksem_dict_lock, "ksem dictionary"); ksem_dictionary = hashinit(1024, M_KSEM, &ksem_hash); + p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 200112L); p31b_setcfg(CTL_P1003_1B_SEM_NSEMS_MAX, SEM_MAX); p31b_setcfg(CTL_P1003_1B_SEM_VALUE_MAX, SEM_VALUE_MAX); @@ -972,6 +973,7 @@ ksem_module_destroy(void) #endif syscall_helper_unregister(ksem_syscalls); + p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 0); hashdestroy(ksem_dictionary, M_KSEM, ksem_hash); sx_destroy(&ksem_dict_lock); mtx_destroy(&ksem_count_lock); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 18:36:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA831065675; Fri, 19 Nov 2010 18:36:51 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B143F8FC1A; Fri, 19 Nov 2010 18:36:50 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAJIan4T031632; Fri, 19 Nov 2010 19:36:49 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAJIam7T031631; Fri, 19 Nov 2010 19:36:48 +0100 (CET) (envelope-from marius) Date: Fri, 19 Nov 2010 19:36:48 +0100 From: Marius Strobl To: Ryan Stone Message-ID: <20101119183648.GC9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> <20101119165620.GB9966@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101119165620.GB9966@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, ken@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r215507 - 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: Fri, 19 Nov 2010 18:36:51 -0000 On Fri, Nov 19, 2010 at 05:56:20PM +0100, Marius Strobl wrote: > On Fri, Nov 19, 2010 at 03:47:11AM +0000, Ryan Stone wrote: > > Author: rstone > > Date: Fri Nov 19 03:47:10 2010 > > New Revision: 215507 > > URL: http://svn.freebsd.org/changeset/base/215507 > > > > Log: > > When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard > > path id for enumerating the available busses. Previously camcontrol was > > implicitly passing 0 as the first path id, which meant that if bus 0 was not > > present camcontrol would fail with EINVAL instead of rescanning/resetting any > > busses that were present. > > > > Approved by: emaste (mentor) > > MFC after: 1 week > > > > Modified: > > head/sbin/camcontrol/camcontrol.c > > > > Modified: head/sbin/camcontrol/camcontrol.c > > ============================================================================== > > --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) > > +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) > > @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) > > bzero(&(&matchccb.ccb_h)[1], > > sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); > > matchccb.ccb_h.func_code = XPT_DEV_MATCH; > > + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; > > bufsize = sizeof(struct dev_match_result) * 20; > > matchccb.cdm.match_buf_len = bufsize; > > matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); > > Hrm, shouldn't that use CAM_XPT_PATH_ID instead of CAM_BUS_WILDCARD > as XPT_DEV_MATCH is marked XPT_FC_XPT_ONLY and supply a complete > Connect ID (i.e. the triple of Path ID, Target ID and LUN)? At least > that's what ken@ changed a similar patch of mine to in r126514: > http://svn.freebsd.org/viewvc/base/head/sbin/camcontrol/camcontrol.c?r1=126514&r2=126513&pathrev=126514&diff_format=u > > In any case it's unfortunate that both CAM_BUS_WILDCARD and > CAM_XPT_PATH_ID are defined as ~0. According to the last CAM draft [1] With a 32-bit ~0 that is ... > the XPT Path ID should be 0xff. > > Marius > > 1: http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf > Marius From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 18:59:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F144B1065670; Fri, 19 Nov 2010 18:59:35 +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 E067A8FC13; Fri, 19 Nov 2010 18:59: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 oAJIxZPb086050; Fri, 19 Nov 2010 18:59:35 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJIxZ18086048; Fri, 19 Nov 2010 18:59:35 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011191859.oAJIxZ18086048@svn.freebsd.org> From: Bernhard Schmidt Date: Fri, 19 Nov 2010 18:59:35 +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: r215543 - stable/7/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, 19 Nov 2010 18:59:36 -0000 Author: bschmidt Date: Fri Nov 19 18:59:35 2010 New Revision: 215543 URL: http://svn.freebsd.org/changeset/base/215543 Log: MFC r203673: Ensure that tkip_mixing_phase1() is called after a rekeying event when using plain s/w crypto. Modified: stable/7/sys/net80211/ieee80211_crypto_tkip.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/net80211/ieee80211_crypto_tkip.c ============================================================================== --- stable/7/sys/net80211/ieee80211_crypto_tkip.c Fri Nov 19 18:32:08 2010 (r215542) +++ stable/7/sys/net80211/ieee80211_crypto_tkip.c Fri Nov 19 18:59:35 2010 (r215543) @@ -143,6 +143,7 @@ tkip_setkey(struct ieee80211_key *k) return 0; } k->wk_keytsc = 1; /* TSC starts at 1 */ + ctx->rx_phase1_done = 0; return 1; } From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 19:29:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A0E106566C; Fri, 19 Nov 2010 19:29:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 42F098FC15; Fri, 19 Nov 2010 19:29:41 +0000 (UTC) Received: by ewy3 with SMTP id 3so2938121ewy.13 for ; Fri, 19 Nov 2010 11:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=TfLdx3IF/x41rKLOyuzjC+uSq1lh30ExCp4P6d/a3z0=; b=Nd03Jc4ble2KKqaPL45DZihPLSouFYC694kRYnz/7vD0o6OuI34x/nhxgdnELE9PBn P3rECeA7ZgZM8kUbqj5usVMFQ/KtaJb3nyr+KQNqmgKZAS7sgcmAlMGIGiw3cdvJ2FOd 1iQUIv64ouR6ZZfEBFM2W7s5V7daOB24cf7w8= 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=kSieYD0X97t2fl8nAZTYVwRlSd5gpiE2pmkbs+eEzdX81xoMyML0/ldktm1UGUI25p tHC7iRTMZAWmkpNVxsu57IttGFcnfS86DGj5ViDWff8gNZ8gysCqGoRuhb3pG843+cCV mMZDGAY51E+ID+6975vjnkAs9bCfXFi27DgzE= MIME-Version: 1.0 Received: by 10.213.114.75 with SMTP id d11mr2028150ebq.74.1290193528735; Fri, 19 Nov 2010 11:05:28 -0800 (PST) Received: by 10.213.14.138 with HTTP; Fri, 19 Nov 2010 11:05:28 -0800 (PST) In-Reply-To: <20101119165620.GB9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> <20101119165620.GB9966@alchemy.franken.de> Date: Fri, 19 Nov 2010 14:05:28 -0500 Message-ID: From: Ryan Stone To: Marius Strobl Content-Type: text/plain; charset=ISO-8859-1 Cc: scottl@samsco.org, src-committers@freebsd.org, emaste@freebsd.org, Ryan Stone , ken@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215507 - 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: Fri, 19 Nov 2010 19:29:42 -0000 I asked about this on freebsd-scsi and CAM_BUS_WILDCARD was what was suggested to me. I'm happy to make the change if the other way is correct. From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 19:43:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7C7106564A; Fri, 19 Nov 2010 19:43:57 +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 3E6FA8FC0C; Fri, 19 Nov 2010 19:43: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 oAJJhvlp087207; Fri, 19 Nov 2010 19:43:57 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJJhv3i087205; Fri, 19 Nov 2010 19:43:57 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011191943.oAJJhv3i087205@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 19:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:43:57 -0000 Author: attilio Date: Fri Nov 19 19:43:56 2010 New Revision: 215544 URL: http://svn.freebsd.org/changeset/base/215544 Log: Scan the list in reverse order for the shutdown handlers of loaded modules. This way, when there is a dependency between two modules, the handler of the latter probed runs first. This is a similar approach as the modules are unloaded in the same linkerfile. Sponsored by: Sandvine Incorporated Submitted by: Nima Misaghian MFC after: 1 week Modified: head/sys/kern/kern_module.c Modified: head/sys/kern/kern_module.c ============================================================================== --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); -typedef TAILQ_HEAD(, module) modulelist_t; +typedef TAILQ_HEAD(modulelst, module) modulelist_t; struct module { TAILQ_ENTRY(module) link; /* chain together all modules */ TAILQ_ENTRY(module) flink; /* all modules in a file */ @@ -101,7 +101,7 @@ module_shutdown(void *arg1, int arg2) return; mtx_lock(&Giant); MOD_SLOCK; - TAILQ_FOREACH(mod, &modules, link) + TAILQ_FOREACH_REVERSE(mod, &modules, modulelst, link) MOD_EVENT(mod, MOD_SHUTDOWN); MOD_SUNLOCK; mtx_unlock(&Giant); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 19:47:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4574D106564A; Fri, 19 Nov 2010 19:47:11 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id C40BE8FC0A; Fri, 19 Nov 2010 19:47:10 +0000 (UTC) Received: by qwi4 with SMTP id 4so214113qwi.13 for ; Fri, 19 Nov 2010 11:47:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=RLPKHxPkpYBifkLOZT89hOClfEaNHYo/Y62cBO8NWrg=; b=OHDAaqPomAqiCxA42nxf4DFdkcgfWxvSwPB+u14ssiFY2pWPxg2Nk1UmIiPVBcgWbq gXBbTTfD/kL6YoAHC891MOPxIE5LIFLR85Lu427+JUxS3qz2er/9VMARq3l2p2XhWG+a IpilfVDyTWQSERDLqoE+me7A4BJQ6lJNuZ56A= 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:content-type :content-transfer-encoding; b=DblK4wLO74RMm35Md6IQqR+zjK1F08Xupvr0T4noB31ElLGlse1ahO81U+jJFIwdv9 gX3u7V2T19PTcq3r+d3jsEQSwLWCHxt/T+/hqRqmHvbLJ/+FiVZNZ6/EuRmJIAgtIivc 7he1tSyQlp8mWbJ/16lCLVnmrmP4Qxp7dcONQ= MIME-Version: 1.0 Received: by 10.229.191.130 with SMTP id dm2mr2076358qcb.256.1290196029826; Fri, 19 Nov 2010 11:47:09 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 11:47:09 -0800 (PST) In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> Date: Fri, 19 Nov 2010 14:47:09 -0500 X-Google-Sender-Auth: Top57HeJKSFfj_xJ-RFT9DIvcak Message-ID: From: Attilio Rao To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:47:11 -0000 2010/11/19 Attilio Rao : > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > =C2=A0Scan the list in reverse order for the shutdown handlers of loaded = modules. > =C2=A0This way, when there is a dependency between two modules, the handl= er of the > =C2=A0latter probed runs first. > > =C2=A0This is a similar approach as the modules are unloaded in the same > =C2=A0linkerfile. > > =C2=A0Sponsored by: Sandvine Incorporated > =C2=A0Submitted by: Nima Misaghian > =C2=A0MFC after: =C2=A0 =C2=A01 week Forgot to mention: PR kern/135485. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 19:47:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 392AA10657A4; Fri, 19 Nov 2010 19:47:17 +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 A34C98FC0C; Fri, 19 Nov 2010 19:47:16 +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 oAJJlCKl082512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Nov 2010 21:47:12 +0200 (EET) (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 oAJJlCmW035144; Fri, 19 Nov 2010 21:47:12 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAJJlCUb035143; Fri, 19 Nov 2010 21:47:12 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Nov 2010 21:47:12 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20101119194712.GS2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="49CZtb4AZ7eASE2/" Content-Disposition: inline In-Reply-To: <201011191749.oAJHnGl1083487@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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:47:17 -0000 --49CZtb4AZ7eASE2/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 17:49:16 2010 > New Revision: 215539 > URL: http://svn.freebsd.org/changeset/base/215539 >=20 > Log: > MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: > Move nexus in x86 and cleaning it up. > =20 > Sponsored by: Sandvine Incorporated >=20 > Added: > stable/8/sys/x86/x86/nexus.c > - copied, changed from r214457, head/sys/x86/x86/nexus.c > Deleted: > stable/8/sys/amd64/amd64/nexus.c > stable/8/sys/i386/i386/nexus.c > Modified: > stable/8/sys/conf/files.amd64 > stable/8/sys/conf/files.i386 > stable/8/sys/conf/files.pc98 > stable/8/sys/i386/i386/machdep.c > stable/8/sys/pc98/include/bus.h > stable/8/sys/pc98/pc98/busiosubr.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) During the make depend stage, I get /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such file = or directory mkdep: compile failed --49CZtb4AZ7eASE2/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzm1EAACgkQC3+MBN1Mb4hkQACfbFOUS0nJt/nfg6t79JQ5vK/W zNwAn2K/8edlESThxhMnSdNBjWkRd9YI =hHAL -----END PGP SIGNATURE----- --49CZtb4AZ7eASE2/-- From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 20:23:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2A5A1065674; Fri, 19 Nov 2010 20:23:01 +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 91EA18FC13; Fri, 19 Nov 2010 20:23: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 oAJKN1Qf088271; Fri, 19 Nov 2010 20:23:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJKN1LZ088269; Fri, 19 Nov 2010 20:23:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011192023.oAJKN1LZ088269@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 20:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215545 - stable/8/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:23:01 -0000 Author: attilio Date: Fri Nov 19 20:23:01 2010 New Revision: 215545 URL: http://svn.freebsd.org/changeset/base/215545 Log: Fix-up r215539 by specifying correctly the ISA headers are they are not shared on STABLE_8. Reported by: kib Modified: stable/8/sys/x86/x86/nexus.c Modified: stable/8/sys/x86/x86/nexus.c ============================================================================== --- stable/8/sys/x86/x86/nexus.c Fri Nov 19 19:43:56 2010 (r215544) +++ stable/8/sys/x86/x86/nexus.c Fri Nov 19 20:23:01 2010 (r215545) @@ -76,10 +76,12 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ISA #include -#ifdef PC98 -#include +#ifdef __amd64__ +#include +#elif defined(__i386__) +#include #else -#include +#include #endif #endif #include From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 20:24:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFC2106566B; Fri, 19 Nov 2010 20:24:07 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id E810B8FC12; Fri, 19 Nov 2010 20:24:06 +0000 (UTC) Received: by qyk9 with SMTP id 9so172495qyk.13 for ; Fri, 19 Nov 2010 12:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=HKrym278qgibWpj7WjCca/fj2CHagnn3RwLoc6n5Pmc=; b=co2QQnDSs6ksiNWuKIevZm8H+1IRWDaboEFHM+BHIXHIQdJ5GyyEwZ+FQfclhV7852 1qjzUTZnm7p3QmDqdwCD46qVu9+blke5q3KiS9rsYiir8lyIm6Xsq7jPnornYLozrB3J e7zh75eE1nBLOorC3Xpgf87KcKT81ANpZ+iBE= 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=S6GzsK7bDVbNuxIo+9PwpcUAkbQ6G+cKvaAV0tTAz0fhszakbY7b3v+oJ4CDbEgkx5 P9NZap11fvT6SkV1crNL33JM1kh7SioWPHWuV+GDsQoqoZoyGVMi9cN7G1nhfyASK/sd uIwd5gXcGP8TWYu8c9AvQDJix+p3jYb30I/O4= MIME-Version: 1.0 Received: by 10.229.236.83 with SMTP id kj19mr2124242qcb.218.1290198245639; Fri, 19 Nov 2010 12:24:05 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 12:24:05 -0800 (PST) In-Reply-To: <20101119194712.GS2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> Date: Fri, 19 Nov 2010 15:24:05 -0500 X-Google-Sender-Auth: Yxg0osXOBI5DDFQd1Te1pIxKl4w Message-ID: From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:24:07 -0000 2010/11/19 Kostik Belousov : > On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Fri Nov 19 17:49:16 2010 >> New Revision: 215539 >> URL: http://svn.freebsd.org/changeset/base/215539 >> >> Log: >> =C2=A0 MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and m= e: >> =C2=A0 Move nexus in x86 and cleaning it up. >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> >> Added: >> =C2=A0 stable/8/sys/x86/x86/nexus.c >> =C2=A0 =C2=A0 =C2=A0- copied, changed from r214457, head/sys/x86/x86/nex= us.c >> Deleted: >> =C2=A0 stable/8/sys/amd64/amd64/nexus.c >> =C2=A0 stable/8/sys/i386/i386/nexus.c >> Modified: >> =C2=A0 stable/8/sys/conf/files.amd64 >> =C2=A0 stable/8/sys/conf/files.i386 >> =C2=A0 stable/8/sys/conf/files.pc98 >> =C2=A0 stable/8/sys/i386/i386/machdep.c >> =C2=A0 stable/8/sys/pc98/include/bus.h >> =C2=A0 stable/8/sys/pc98/pc98/busiosubr.c >> Directory Properties: >> =C2=A0 stable/8/sys/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/amd64/include/xen/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/cddl/contrib/opensolaris/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/contrib/dev/acpica/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/contrib/pf/ =C2=A0 (props changed) >> =C2=A0 stable/8/sys/dev/xen/xenpci/ =C2=A0 (props changed) > During the make depend stage, I get > /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such fil= e or directory > mkdep: compile failed r215545 might fix this, thanks a lot for reporting promptly. Jeeeeeez, I usually made the svn mv by hand rather than relying on merging for STBALE_8, I would have kept to do that :/. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 20:33:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B68C1065675; Fri, 19 Nov 2010 20:33: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 AC13B8FC15; Fri, 19 Nov 2010 20:33: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 oAJKX8WA085051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Nov 2010 22:33:08 +0200 (EET) (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 oAJKX8bc035478; Fri, 19 Nov 2010 22:33:08 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAJKX85A035477; Fri, 19 Nov 2010 22:33:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Nov 2010 22:33:08 +0200 From: Kostik Belousov To: Attilio Rao Message-ID: <20101119203308.GU2392@deviant.kiev.zoral.com.ua> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YQEFGVUvDf3HQAmF" 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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 20:33:16 -0000 --YQEFGVUvDf3HQAmF Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 19, 2010 at 03:24:05PM -0500, Attilio Rao wrote: > 2010/11/19 Kostik Belousov : > > On Fri, Nov 19, 2010 at 05:49:16PM +0000, Attilio Rao wrote: > >> Author: attilio > >> Date: Fri Nov 19 17:49:16 2010 > >> New Revision: 215539 > >> URL: http://svn.freebsd.org/changeset/base/215539 > >> > >> Log: > >> =9A MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me: > >> =9A Move nexus in x86 and cleaning it up. > >> > >> =9A Sponsored by: =9A =9A =9A Sandvine Incorporated > >> > >> Added: > >> =9A stable/8/sys/x86/x86/nexus.c > >> =9A =9A =9A- copied, changed from r214457, head/sys/x86/x86/nexus.c > >> Deleted: > >> =9A stable/8/sys/amd64/amd64/nexus.c > >> =9A stable/8/sys/i386/i386/nexus.c > >> Modified: > >> =9A stable/8/sys/conf/files.amd64 > >> =9A stable/8/sys/conf/files.i386 > >> =9A stable/8/sys/conf/files.pc98 > >> =9A stable/8/sys/i386/i386/machdep.c > >> =9A stable/8/sys/pc98/include/bus.h > >> =9A stable/8/sys/pc98/pc98/busiosubr.c > >> Directory Properties: > >> =9A stable/8/sys/ =9A (props changed) > >> =9A stable/8/sys/amd64/include/xen/ =9A (props changed) > >> =9A stable/8/sys/cddl/contrib/opensolaris/ =9A (props changed) > >> =9A stable/8/sys/contrib/dev/acpica/ =9A (props changed) > >> =9A stable/8/sys/contrib/pf/ =9A (props changed) > >> =9A stable/8/sys/dev/xen/xenpci/ =9A (props changed) > > During the make depend stage, I get > > /usr/bsd/src/sys/x86/x86/nexus.c:82:25: error: x86/isa/isa.h: No such f= ile or directory > > mkdep: compile failed >=20 > r215545 might fix this, thanks a lot for reporting promptly. >=20 > Jeeeeeez, I usually made the svn mv by hand rather than relying on > merging for STBALE_8, I would have kept to do that :/. >=20 > Attilio Thanks, r215545 allowed the build to finish. --YQEFGVUvDf3HQAmF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzm3wMACgkQC3+MBN1Mb4i1kACfVMcufP/WciWCzOQPU3EqtGjK Ze0AoKxwzaLEXz+5D2ZkvLHK2Q7EoCO7 =RYq6 -----END PGP SIGNATURE----- --YQEFGVUvDf3HQAmF-- From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:04:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59811065670; Fri, 19 Nov 2010 21:04:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 934868FC0A; Fri, 19 Nov 2010 21:04: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 oAJL4IlC089448; Fri, 19 Nov 2010 21:04:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJL4ILw089443; Fri, 19 Nov 2010 21:04:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011192104.oAJL4ILw089443@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 21:04: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: r215546 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:04:18 -0000 Author: thompsa Date: Fri Nov 19 21:04:18 2010 New Revision: 215546 URL: http://svn.freebsd.org/changeset/base/215546 Log: MFC r213853 - Add missing LibUSB API functions: * libusb_strerror() * libusb_get_driver[_np]() * libusb_detach_kernel_driver[_np]() - Factor out setting of non-blocking flag inside libusb. - Add missing NULL check after libusb_get_device() call. - Correct some wrong error codes due to copy and paste error. PR: usb/150546 Submitted by: Robert Jenssen, Alexander Leidinger Modified: stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb20.3 Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb.3 Fri Nov 19 21:04:18 2010 (r215546) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2009 +.Dd October 14, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -72,6 +72,15 @@ Deinitialise libusb. Must be called at t . .Pp . +.Ft const char * +.Fn libusb_strerror "int code" +Get ASCII representation of the error given by the +.Fa code +argument. +. +. +.Pp +. .Ft void .Fn libusb_set_debug "libusb_context *ctx" "int level" Set debug to the @@ -239,12 +248,37 @@ if the device has been disconnected and .Pp . .Ft int +.Fn libusb_get_driver "libusb_device_handle *devh" "int interface" "char *name" "int namelen" +or +.Ft int +.Fn libusb_get_driver_np "libusb_device_handle *devh" "int interface" "char *name" "int namelen" +Gets the name of the driver attached to the given +.Fa device +and +.Fa interface +into the buffer given by +.Fa name +and +.Fa namelen . +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver is attached +to the given interface and LIBUSB_ERROR_INVALID_PARAM if the interface does +not exist. +This function is non-portable. +The buffer pointed to by +.Fa name +is only zero terminated on success. +. +.Pp +. +.Ft int .Fn libusb_detach_kernel_driver "libusb_device_handle *devh" "int interface" -Detach a kernel driver from an interface. This is needed to claim an interface -required by a kernel driver. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if -no kernel driver was active, LIBUSB_ERROR_INVALID_PARAM if the interface does not -exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a -LIBUSB_ERROR code on failure. +or +.Ft int +.Fn libusb_detach_kernel_driver_np "libusb_device_handle *devh" "int interface" +Detach a kernel driver from an interface. +This is needed to claim an interface required by a kernel driver. +Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if no kernel driver was active, +LIBUSB_ERROR_INVALID_PARAM if the interface does not exist, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on failure. This function is non-portable. . .Pp . @@ -271,7 +305,7 @@ failure. . .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "libusb_device_descriptor **config" +.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state and return another LIBUSB_ERROR code on error. @@ -337,7 +371,7 @@ LIBUSB_ERROR code on failure. . .Pp .Ft int -.Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" +.Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb.h Fri Nov 19 21:04:18 2010 (r215546) @@ -294,6 +294,7 @@ typedef struct libusb_transfer { /* Library initialisation */ void libusb_set_debug(libusb_context * ctx, int level); +const char *libusb_strerror(int code); int libusb_init(libusb_context ** context); void libusb_exit(struct libusb_context *ctx); @@ -317,6 +318,9 @@ int libusb_claim_interface(libusb_device int libusb_release_interface(libusb_device_handle * devh, int interface_number); int libusb_reset_device(libusb_device_handle * devh); int libusb_kernel_driver_active(libusb_device_handle * devh, int interface); +int libusb_get_driver_np(libusb_device_handle * devh, int interface, char *name, int namelen); +int libusb_get_driver(libusb_device_handle * devh, int interface, char *name, int namelen); +int libusb_detach_kernel_driver_np(libusb_device_handle * devh, int interface); int libusb_detach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_attach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_set_interface_alt_setting(libusb_device_handle * devh, int interface_number, int alternate_setting); Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb10.c Fri Nov 19 21:04:18 2010 (r215546) @@ -70,12 +70,30 @@ libusb_set_debug(libusb_context *ctx, in ctx->debug = level; } +static void +libusb_set_nonblocking(int f) +{ + int flags; + + /* + * We ignore any failures in this function, hence the + * non-blocking flag is not critical to the operation of + * libUSB. We use F_GETFL and F_SETFL to be compatible with + * Linux. + */ + + flags = fcntl(f, F_GETFL, NULL); + if (flags == -1) + return; + flags |= O_NONBLOCK; + fcntl(f, F_SETFL, flags); +} + int libusb_init(libusb_context **context) { struct libusb_context *ctx; char *debug; - int flag; int ret; ctx = malloc(sizeof(*ctx)); @@ -106,12 +124,8 @@ libusb_init(libusb_context **context) return (LIBUSB_ERROR_OTHER); } /* set non-blocking mode on the control pipe to avoid deadlock */ - flag = 1; - ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); - assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]"); - flag = 1; - ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); - assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]"); + libusb_set_nonblocking(ctx->ctrl_pipe[0]); + libusb_set_nonblocking(ctx->ctrl_pipe[1]); libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN); @@ -356,7 +370,7 @@ libusb_open(libusb_device *dev, libusb_d /* make sure our event loop detects the new device */ dummy = 0; err = write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); - if (err < sizeof(dummy)) { + if (err < (int)sizeof(dummy)) { /* ignore error, if any */ DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open write failed!"); } @@ -431,7 +445,7 @@ libusb_close(struct libusb20_device *pde /* make sure our event loop detects the closed device */ dummy = 0; err = write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); - if (err < sizeof(dummy)) { + if (err < (int)sizeof(dummy)) { /* ignore error, if any */ DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_close write failed!"); } @@ -473,7 +487,6 @@ libusb_set_configuration(struct libusb20 uint8_t i; dev = libusb_get_device(pdev); - if (dev == NULL) return (LIBUSB_ERROR_INVALID_PARAM); @@ -620,6 +633,8 @@ libusb_clear_halt(struct libusb20_device return (LIBUSB_ERROR_INVALID_PARAM); dev = libusb_get_device(pdev); + if (dev == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); CTX_LOCK(dev->ctx); err = libusb20_tr_open(xfer, 0, 0, endpoint); @@ -647,7 +662,7 @@ libusb_reset_device(struct libusb20_devi dev = libusb_get_device(pdev); if (dev == NULL) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); libusb10_cancel_all_transfer(dev); @@ -673,6 +688,45 @@ libusb_kernel_driver_active(struct libus } int +libusb_get_driver_np(struct libusb20_device *pdev, int interface, + char *name, int namelen) +{ + return (libusb_get_driver(pdev, interface, name, namelen)); +} + +int +libusb_get_driver(struct libusb20_device *pdev, int interface, + char *name, int namelen) +{ + char *ptr; + int err; + + if (pdev == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); + if (namelen < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + err = libusb20_dev_get_iface_desc( + pdev, interface, name, namelen); + + if (err != 0) + return (LIBUSB_ERROR_OTHER); + + /* we only want the driver name */ + ptr = strstr(name, ":"); + if (ptr != NULL) + *ptr = 0; + + return (0); +} + +int +libusb_detach_kernel_driver_np(struct libusb20_device *pdev, int interface) +{ + return (libusb_detach_kernel_driver(pdev, interface)); +} + +int libusb_detach_kernel_driver(struct libusb20_device *pdev, int interface) { int err; @@ -683,7 +737,7 @@ libusb_detach_kernel_driver(struct libus err = libusb20_dev_detach_kernel_driver( pdev, interface); - return (err ? LIBUSB20_ERROR_OTHER : 0); + return (err ? LIBUSB_ERROR_OTHER : 0); } int @@ -1362,3 +1416,9 @@ libusb_le16_to_cpu(uint16_t x) return (le16toh(x)); } +const char * +libusb_strerror(int code) +{ + /* TODO */ + return ("Unknown error"); +} Modified: stable/8/lib/libusb/libusb20.3 ============================================================================== --- stable/8/lib/libusb/libusb20.3 Fri Nov 19 20:23:01 2010 (r215545) +++ stable/8/lib/libusb/libusb20.3 Fri Nov 19 21:04:18 2010 (r215546) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2009 +.Dd October 14, 2010 .Dt LIBUSB20 3 .Os .Sh NAME @@ -177,7 +177,7 @@ USB access library (libusb -lusb) .Ft int .Fn libusb20_be_set_template "struct libusb20_backend *pbe" "int temp" .Ft int -.Fn libusb20_be_get_dev_quirk "struct libusb20_backend *pber", "uint16_t index" "struct libusb20_quirk *pq" +.Fn libusb20_be_get_dev_quirk "struct libusb20_backend *pber" "uint16_t index" "struct libusb20_quirk *pq" .Ft int .Fn libusb20_be_get_quirk_name "struct libusb20_backend *pbe" "uint16_t index" "struct libusb20_quirk *pq" .Ft int From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:09:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 75EE01065672; Fri, 19 Nov 2010 21:09:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Fri, 19 Nov 2010 16:09:28 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Leu5M/2XJcMyOAp" Message-Id: <201011191609.31308.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:09:42 -0000 --Boundary-00=_Leu5M/2XJcMyOAp Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > Scan the list in reverse order for the shutdown handlers of > loaded modules. This way, when there is a dependency between two > modules, the handler of the latter probed runs first. > > This is a similar approach as the modules are unloaded in the > same linkerfile. > > Sponsored by: Sandvine Incorporated > Submitted by: Nima Misaghian > MFC after: 1 week Hmm... It is not directly related but I was thinking about doing similar things for sys/kern/subr_bus.c. What do you think about the attached patch? Jung-uk Kim --Boundary-00=_Leu5M/2XJcMyOAp Content-Type: text/plain; charset="iso-8859-1"; name="subr_bus.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="subr_bus.diff" Index: sys/kern/subr_bus.c =================================================================== --- sys/kern/subr_bus.c (revision 215542) +++ sys/kern/subr_bus.c (working copy) @@ -1847,7 +1847,7 @@ device_delete_child(device_t dev, device_t child) PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); /* remove children first */ - while ( (grandchild = TAILQ_FIRST(&child->children)) ) { + while ( (grandchild = TAILQ_LAST(&child->children, device_list)) ) { error = device_delete_child(child, grandchild); if (error) return (error); @@ -3381,7 +3381,7 @@ bus_generic_detach(device_t dev) if (dev->state != DS_ATTACHED) return (EBUSY); - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { if ((error = device_detach(child)) != 0) return (error); } @@ -3401,7 +3401,7 @@ bus_generic_shutdown(device_t dev) { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { device_shutdown(child); } @@ -3423,7 +3423,7 @@ bus_generic_suspend(device_t dev) int error; device_t child, child2; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { error = DEVICE_SUSPEND(child); if (error) { for (child2 = TAILQ_FIRST(&dev->children); --Boundary-00=_Leu5M/2XJcMyOAp-- From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:15:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6235C1065672; Fri, 19 Nov 2010 21:15:07 +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 51C278FC1C; Fri, 19 Nov 2010 21:15: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 oAJLF6aF089745; Fri, 19 Nov 2010 21:15:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJLF6d1089743; Fri, 19 Nov 2010 21:15:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011192115.oAJLF6d1089743@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 21:15: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: r215547 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:15:07 -0000 Author: jilles Date: Fri Nov 19 21:15:06 2010 New Revision: 215547 URL: http://svn.freebsd.org/changeset/base/215547 Log: sh: Add another simple test for the wait builtin. Added: head/tools/regression/bin/sh/builtins/wait3.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/wait3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/wait3.0 Fri Nov 19 21:15:06 2010 (r215547) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures= +failure() { + echo "Error at line $1" >&2 + failures=x$failures +} + +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +for i in 1 2 3 4 5 6 7 8 9 10; do + exit $i 4fifo1 +wait || failure $LINENO +(echo >&3) 2>/dev/null && failure $LINENO +wait || failure $LINENO + +test -z "$failures" From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:17:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DC2C106566C; Fri, 19 Nov 2010 21:17:34 +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 8AD428FC0C; Fri, 19 Nov 2010 21:17: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 oAJLHYCi089871; Fri, 19 Nov 2010 21:17:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJLHYEP089858; Fri, 19 Nov 2010 21:17:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011192117.oAJLHYEP089858@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 21:17: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: r215548 - in head/sys: fs/cd9660 fs/coda fs/ext2fs fs/hpfs fs/msdosfs fs/nfsclient fs/ntfs gnu/fs/reiserfs kern nfsclient sys ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:17:34 -0000 Author: kib Date: Fri Nov 19 21:17:34 2010 New Revision: 215548 URL: http://svn.freebsd.org/changeset/base/215548 Log: Remove prtactive variable and related printf()s in the vop_inactive and vop_reclaim() methods. They seems to be unused, and the reported situation is normal for the forced unmount. MFC after: 1 week X-MFC-note: keep prtactive symbol in vfs_subr.c Modified: head/sys/fs/cd9660/cd9660_node.c head/sys/fs/coda/coda_vnops.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/ntfs/ntfs_vnops.c head/sys/gnu/fs/reiserfs/reiserfs_inode.c head/sys/kern/vfs_subr.c head/sys/nfsclient/nfs_node.c head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/cd9660/cd9660_node.c Fri Nov 19 21:17:34 2010 (r215548) @@ -69,9 +69,6 @@ cd9660_inactive(ap) struct iso_node *ip = VTOI(vp); int error = 0; - if (prtactive && vrefcnt(vp) != 0) - vprint("cd9660_inactive: pushing active", vp); - /* * If we are done with the inode, reclaim it * so that it can be reused immediately. @@ -93,8 +90,6 @@ cd9660_reclaim(ap) { struct vnode *vp = ap->a_vp; - if (prtactive && vrefcnt(vp) != 0) - vprint("cd9660_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ Modified: head/sys/fs/coda/coda_vnops.c ============================================================================== --- head/sys/fs/coda/coda_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/coda/coda_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -1549,9 +1549,6 @@ coda_reclaim(struct vop_reclaim_args *ap "%p, cp %p\n", vp, cp); } #endif - } else { - if (prtactive && vp->v_usecount != 0) - vprint("coda_reclaim: pushing active", vp); } cache_purge(vp); coda_free(VTOC(vp)); Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/ext2fs/ext2_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -481,9 +481,6 @@ ext2_inactive(ap) struct thread *td = ap->a_td; int mode, error = 0; - if (prtactive && vrefcnt(vp) != 0) - vprint("ext2_inactive: pushing active", vp); - /* * Ignore inodes related to stale file handles. */ @@ -522,8 +519,6 @@ ext2_reclaim(ap) struct inode *ip; struct vnode *vp = ap->a_vp; - if (prtactive && vrefcnt(vp) != 0) - vprint("ufs_reclaim: pushing active", vp); ip = VTOI(vp); if (ip->i_flag & IN_LAZYMOD) { ip->i_flag |= IN_MODIFIED; Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/hpfs/hpfs_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -575,9 +575,6 @@ hpfs_inactive(ap) return (error); } - if (prtactive && vrefcnt(vp) != 0) - vprint("hpfs_inactive: pushing active", vp); - if (hp->h_flag & H_INVAL) { vrecycle(vp, ap->a_td); return (0); Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/msdosfs/msdosfs_denode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -548,8 +548,6 @@ msdosfs_reclaim(ap) dep, dep->de_Name, dep->de_refcnt); #endif - if (prtactive && vrefcnt(vp) != 0) - vprint("msdosfs_reclaim(): pushing active", vp); /* * Destroy the vm object and flush associated pages. */ @@ -586,9 +584,6 @@ msdosfs_inactive(ap) printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); #endif - if (prtactive && vrefcnt(vp) != 0) - vprint("msdosfs_inactive(): pushing active", vp); - /* * Ignore denodes related to stale file handles. */ Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/nfsclient/nfs_clnode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -190,8 +190,6 @@ ncl_inactive(struct vop_inactive_args *a struct vnode *vp = ap->a_vp; np = VTONFS(vp); - if (prtactive && vrefcnt(vp) != 0) - vprint("ncl_inactive: pushing active", vp); if (NFS_ISV4(vp) && vp->v_type == VREG) { /* @@ -233,9 +231,6 @@ ncl_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (prtactive && vrefcnt(vp) != 0) - vprint("ncl_reclaim: pushing active", vp); - if (NFS_ISV4(vp) && vp->v_type == VREG) /* * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4 Modified: head/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/ntfs/ntfs_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -82,8 +82,6 @@ static vop_fsync_t ntfs_fsync; static vop_pathconf_t ntfs_pathconf; static vop_vptofh_t ntfs_vptofh; -int ntfs_prtactive = 1; /* 1 => print out reclaim of active vnodes */ - /* * This is a noop, simply returning what one has been given. */ @@ -214,15 +212,12 @@ ntfs_inactive(ap) struct vnode *a_vp; } */ *ap; { - register struct vnode *vp = ap->a_vp; #ifdef NTFS_DEBUG - register struct ntnode *ip = VTONT(vp); + register struct ntnode *ip = VTONT(ap->a_vp); #endif - dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - - if (ntfs_prtactive && vrefcnt(vp) != 0) - vprint("ntfs_inactive: pushing active", vp); + dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", ap->a_vp, + ip->i_number)); /* XXX since we don't support any filesystem changes * right now, nothing more needs to be done @@ -246,9 +241,6 @@ ntfs_reclaim(ap) dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - if (ntfs_prtactive && vrefcnt(vp) != 0) - vprint("ntfs_reclaim: pushing active", vp); - /* * Destroy the vm object and flush associated pages. */ Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -114,8 +114,6 @@ reiserfs_inactive(struct vop_inactive_ar reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) != 0) - vprint("ReiserFS/reclaim: pushing active", vp); #if 0 /* Ignore inodes related to stale file handles. */ @@ -147,8 +145,6 @@ reiserfs_reclaim(struct vop_reclaim_args reiserfs_log(LOG_DEBUG, "reclaiming inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) != 0) - vprint("ReiserFS/reclaim: pushing active", vp); ip = VTOI(vp); /* XXX Update this node (write to the disk) */ Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/kern/vfs_subr.c Fri Nov 19 21:17:34 2010 (r215548) @@ -191,9 +191,6 @@ struct nfs_public nfs_pub; static uma_zone_t vnode_zone; static uma_zone_t vnodepoll_zone; -/* Set to 1 to print out reclaim of active vnodes */ -int prtactive; - /* * The workitem queue. * Modified: head/sys/nfsclient/nfs_node.c ============================================================================== --- head/sys/nfsclient/nfs_node.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/nfsclient/nfs_node.c Fri Nov 19 21:17:34 2010 (r215548) @@ -193,8 +193,6 @@ nfs_inactive(struct vop_inactive_args *a struct thread *td = curthread; /* XXX */ np = VTONFS(ap->a_vp); - if (prtactive && vrefcnt(ap->a_vp) != 0) - vprint("nfs_inactive: pushing active", ap->a_vp); mtx_lock(&np->n_mtx); if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; @@ -228,9 +226,6 @@ nfs_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (prtactive && vrefcnt(vp) != 0) - vprint("nfs_reclaim: pushing active", vp); - /* * If the NLM is running, give it a chance to abort pending * locks. Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/sys/vnode.h Fri Nov 19 21:17:34 2010 (r215548) @@ -410,7 +410,6 @@ extern struct vnode *rootvnode; /* root extern int async_io_version; /* 0 or POSIX version of AIO i'face */ extern int desiredvnodes; /* number of vnodes desired */ extern struct uma_zone *namei_zone; -extern int prtactive; /* nonzero to call vprint() */ extern struct vattr va_null; /* predefined null vattr structure */ #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/ufs/ufs/ufs_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -80,8 +80,6 @@ ufs_inactive(ap) struct mount *mp; mp = NULL; - if (prtactive && vp->v_usecount != 0) - vprint("ufs_inactive: pushing active", vp); /* * Ignore inodes related to stale file handles. */ @@ -191,8 +189,6 @@ ufs_reclaim(ap) int i; #endif - if (prtactive && vp->v_usecount != 0) - vprint("ufs_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:21:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15261065672; Fri, 19 Nov 2010 21:21:27 +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 7395B8FC17; Fri, 19 Nov 2010 21:21:27 +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 1132046B0C; Fri, 19 Nov 2010 16:21:27 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 175F98A009; Fri, 19 Nov 2010 16:21:26 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:17:51 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191617.51552.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:21:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:21:27 -0000 On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > Scan the list in reverse order for the shutdown handlers of loaded modules. > This way, when there is a dependency between two modules, the handler of the > latter probed runs first. > > This is a similar approach as the modules are unloaded in the same > linkerfile. > > Sponsored by: Sandvine Incorporated > Submitted by: Nima Misaghian > MFC after: 1 week > > Modified: > head/sys/kern/kern_module.c > > Modified: head/sys/kern/kern_module.c > ============================================================================== > --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) > +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); > > -typedef TAILQ_HEAD(, module) modulelist_t; > +typedef TAILQ_HEAD(modulelst, module) modulelist_t; Is modulelist already taken? If not, we should probably just retire 'modulelist_t' and replace it with 'struct modulelist'. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:21:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B82A106564A; Fri, 19 Nov 2010 21:21:29 +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 E333C8FC18; Fri, 19 Nov 2010 21:21:28 +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 9FC2546B03; Fri, 19 Nov 2010 16:21:28 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AFA5A8A01D; Fri, 19 Nov 2010 16:21:27 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Fri, 19 Nov 2010 16:21:25 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191609.31308.jkim@FreeBSD.org> In-Reply-To: <201011191609.31308.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011191621.25520.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:21:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:21:29 -0000 On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > Author: attilio > > Date: Fri Nov 19 19:43:56 2010 > > New Revision: 215544 > > URL: http://svn.freebsd.org/changeset/base/215544 > > > > Log: > > Scan the list in reverse order for the shutdown handlers of > > loaded modules. This way, when there is a dependency between two > > modules, the handler of the latter probed runs first. > > > > This is a similar approach as the modules are unloaded in the > > same linkerfile. > > > > Sponsored by: Sandvine Incorporated > > Submitted by: Nima Misaghian > > MFC after: 1 week > > Hmm... It is not directly related but I was thinking about doing > similar things for sys/kern/subr_bus.c. What do you think about the > attached patch? Hmm, the patches for suspend and resume that I had for this took the opposite order, they did suspend in forward order, but resume in backwards order. Like so: --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c 2010-11-17 22:30:24.000000000 0000 +++ //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ TAILQ_FOREACH(child, &dev->children, link) { error = DEVICE_SUSPEND(child); if (error) { - for (child2 = TAILQ_FIRST(&dev->children); - child2 && child2 != child; - child2 = TAILQ_NEXT(child2, link)) + for (child2 = TAILQ_PREV(child, device_list, link); + child2 != NULL; + child2 = TAILQ_PREV(child2, device_list, link)) DEVICE_RESUME(child2); return (error); } @@ -3447,7 +3450,7 @@ { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { DEVICE_RESUME(child); /* if resume fails, there's nothing we can usefully do... */ } (Likely mangled whitespace.) I couldn't convince myself which order was "more" correct for suspend and resume. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:27:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39266106567A; Fri, 19 Nov 2010 21:27:29 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id A780E8FC0C; Fri, 19 Nov 2010 21:27:28 +0000 (UTC) Received: by qyk8 with SMTP id 8so105274qyk.13 for ; Fri, 19 Nov 2010 13:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Kvqa2XbWDw+KpaxEUfkEsjSIT5vOCa4s/CSS9arBWME=; b=ccWyTnaI5wAsoYSS8wRC14DygqBkNDZz7O8oJXp42sbCYKrEPBpRSRhyQiO9oLI/ku x/xswi98hOTIGoImwrn+tN/e9Jvn6sD7KHGQUDUwIeHjaUfsEw1iLEBpBINSvG9tPpXp RFvtgbk2vhBWmn0qmsmuFwqGIq7p80IXBqBuw= 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=FTG6IWh1Yw44EEWjyviSktfybMAqiZfssr5n5SrEJhutCEJS9hohpx5v8fGWWHqis+ 3O67yC/U5JP01wJaHag7B4OTwvw4E1ldzg+V20etA1PqgV6Jj3nmmSn0Hi6VZnVHTUwC ORXL09eR6GddG/dBOeI5Cd5oO5vrR9qPvpoC4= MIME-Version: 1.0 Received: by 10.229.190.204 with SMTP id dj12mr2208872qcb.66.1290202047858; Fri, 19 Nov 2010 13:27:27 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 13:27:27 -0800 (PST) In-Reply-To: <201011191617.51552.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> Date: Fri, 19 Nov 2010 16:27:27 -0500 X-Google-Sender-Auth: 6JuuWjj4sgvpEHr-MRlc53qx_Uc Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:27:29 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: >> Author: attilio >> Date: Fri Nov 19 19:43:56 2010 >> New Revision: 215544 >> URL: http://svn.freebsd.org/changeset/base/215544 >> >> Log: >> =C2=A0 Scan the list in reverse order for the shutdown handlers of loade= d modules. >> =C2=A0 This way, when there is a dependency between two modules, the han= dler of the >> =C2=A0 latter probed runs first. >> >> =C2=A0 This is a similar approach as the modules are unloaded in the sam= e >> =C2=A0 linkerfile. >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> =C2=A0 Submitted by: =C2=A0 =C2=A0 =C2=A0 Nima Misaghian >> =C2=A0 MFC after: =C2=A01 week >> >> Modified: >> =C2=A0 head/sys/kern/kern_module.c >> >> Modified: head/sys/kern/kern_module.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/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 18:59:35= 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215543) >> +++ head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 19:43:56= 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215544) >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); >> >> =C2=A0static MALLOC_DEFINE(M_MODULE, "module", "module data structures")= ; >> >> -typedef TAILQ_HEAD(, module) modulelist_t; >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; > > Is modulelist already taken? =C2=A0If not, we should probably just retire > 'modulelist_t' and replace it with 'struct modulelist'. Note that I used modulelst, not modulelist. Probabilly, if you think the name may be still confusing, we can pickup one another further. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:31:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E870D106564A; Fri, 19 Nov 2010 21:31:45 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 464058FC1E; Fri, 19 Nov 2010 21:31:45 +0000 (UTC) Received: by qyk8 with SMTP id 8so109538qyk.13 for ; Fri, 19 Nov 2010 13:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=AawVLT4gA3C2EeFSPOCNPoVcrvbrQ3owNHXTqjpeQ28=; b=KAM7SSSPqJrOCNRYQI7+0FUXX2UeHjT4HAjG5k/e/J3XCyExNOVHKr6dUMmJ+D8aRJ dw0Onvp5fDgImXTw/XG+CHnRcutiyPPwAxNCaYsysNgbytJupOdhTf+MLjzcSq7V9Bd1 GS3iCjkkM0f1/Dwmt5b67fk25OzveAehIr6iY= 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=NccZ8bI0iJdpBR6HvBUYgBsOSnNcm/q/PaLc10rFATEbGPHUUvXfwslw0FDasaT1bB pBhlcmqdDahpWM3khCU65nYy9rW6hucW42sCBLzN/YHGDEtzk9wXS2jUxzKgNqY0AIQe s/HxO1O5e7WCDZksm0d6BI0tNGdfydTs9znvU= MIME-Version: 1.0 Received: by 10.229.215.9 with SMTP id hc9mr2203820qcb.142.1290202304619; Fri, 19 Nov 2010 13:31:44 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 13:31:44 -0800 (PST) In-Reply-To: <201011191621.25520.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191609.31308.jkim@FreeBSD.org> <201011191621.25520.jhb@freebsd.org> Date: Fri, 19 Nov 2010 16:31:44 -0500 X-Google-Sender-Auth: 9Lf37lIBX17Z3pTtvtItK7o6vFQ Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:31:46 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: >> > Author: attilio >> > Date: Fri Nov 19 19:43:56 2010 >> > New Revision: 215544 >> > URL: http://svn.freebsd.org/changeset/base/215544 >> > >> > Log: >> > =C2=A0 Scan the list in reverse order for the shutdown handlers of >> > loaded modules. This way, when there is a dependency between two >> > modules, the handler of the latter probed runs first. >> > >> > =C2=A0 This is a similar approach as the modules are unloaded in the >> > same linkerfile. >> > >> > =C2=A0 Sponsored by: =C2=A0 =C2=A0 Sandvine Incorporated >> > =C2=A0 Submitted by: =C2=A0 =C2=A0 Nima Misaghian >> > =C2=A0 MFC after: =C2=A0 =C2=A0 =C2=A0 =C2=A01 week >> >> Hmm... =C2=A0It is not directly related but I was thinking about doing >> similar things for sys/kern/subr_bus.c. =C2=A0What do you think about th= e >> attached patch? > > Hmm, the patches for suspend and resume that I had for this took the oppo= site > order, they did suspend in forward order, but resume in backwards order. > Like so: > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c =C2=A0 =C2=A0 =C2=A020= 10-11-17 22:30:24.000000000 0000 > +++ //depot/user/jhb/acpipci/kern/subr_bus.c =C2=A0 =C2=A02010-11-19 17:1= 9:02.000000000 00 > @@ -3426,9 +3429,9 @@ > =C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_FOREACH(child, &dev->children, link) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D DEVICE_S= USPEND(child); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 for (child2 =3D TAILQ_FIRST(&dev->children); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 && child2 !=3D child; > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_NEXT(child2, link)) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 for (child2 =3D TAILQ_PREV(child, device_list, link); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 !=3D NULL; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_PREV(child2, device_list, link)= ) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEVICE_RESUME(child2); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return (error); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > @@ -3447,7 +3450,7 @@ > =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0device_t =C2=A0 =C2=A0 =C2=A0 =C2=A0child; > > - =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH(child, &dev->children, link) { > + =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH_REVERSE(child, &dev->children, devic= e_list, link) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEVICE_RESUME(chil= d); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* if resume fails= , there's nothing we can usefully do... */ > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > (Likely mangled whitespace.) > > I couldn't convince myself which order was "more" correct for suspend and= resume. Considering loading in starting point, I think suspend should go in reverse logic and resume in the same module load logic. So that dependent modules are suspended first and resumed after. Don't you agree? Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:46:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3379C106564A; Fri, 19 Nov 2010 21:46:14 +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 048388FC08; Fri, 19 Nov 2010 21:46:14 +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 AEC1A46B23; Fri, 19 Nov 2010 16:46:13 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B405B8A01D; Fri, 19 Nov 2010 16:46:12 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:42:00 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191642.00761.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:46:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:14 -0000 On Friday, November 19, 2010 4:27:27 pm Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: > >> Author: attilio > >> Date: Fri Nov 19 19:43:56 2010 > >> New Revision: 215544 > >> URL: http://svn.freebsd.org/changeset/base/215544 > >> > >> Log: > >> Scan the list in reverse order for the shutdown handlers of loaded modules. > >> This way, when there is a dependency between two modules, the handler of the > >> latter probed runs first. > >> > >> This is a similar approach as the modules are unloaded in the same > >> linkerfile. > >> > >> Sponsored by: Sandvine Incorporated > >> Submitted by: Nima Misaghian > >> MFC after: 1 week > >> > >> Modified: > >> head/sys/kern/kern_module.c > >> > >> Modified: head/sys/kern/kern_module.c > >> ============================================================================== > >> --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) > >> +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) > >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > >> > >> static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); > >> > >> -typedef TAILQ_HEAD(, module) modulelist_t; > >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; > > > > Is modulelist already taken? If not, we should probably just retire > > 'modulelist_t' and replace it with 'struct modulelist'. > > Note that I used modulelst, not modulelist. > Probabilly, if you think the name may be still confusing, we can > pickup one another further. Yes, I'd much prefer 'modulelist' with the extra 'i' as it is more readable. If you go that route, I think you can drop modulelist_t since style(9) discourages foo_t types unless they are required by a standard. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:46:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35B861065672; Fri, 19 Nov 2010 21:46:15 +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 E83DB8FC0C; Fri, 19 Nov 2010 21:46:14 +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 84F6B46B2E; Fri, 19 Nov 2010 16:46:14 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A79658A027; Fri, 19 Nov 2010 16:46:13 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:46:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191621.25520.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191646.12106.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:46:13 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:15 -0000 On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > >> > Author: attilio > >> > Date: Fri Nov 19 19:43:56 2010 > >> > New Revision: 215544 > >> > URL: http://svn.freebsd.org/changeset/base/215544 > >> > > >> > Log: > >> > Scan the list in reverse order for the shutdown handlers of > >> > loaded modules. This way, when there is a dependency between two > >> > modules, the handler of the latter probed runs first. > >> > > >> > This is a similar approach as the modules are unloaded in the > >> > same linkerfile. > >> > > >> > Sponsored by: Sandvine Incorporated > >> > Submitted by: Nima Misaghian > >> > MFC after: 1 week > >> > >> Hmm... It is not directly related but I was thinking about doing > >> similar things for sys/kern/subr_bus.c. What do you think about the > >> attached patch? > > > > Hmm, the patches for suspend and resume that I had for this took the opposite > > order, they did suspend in forward order, but resume in backwards order. > > Like so: > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c 2010-11-17 22:30:24.000000000 0000 > > +++ //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 17:19:02.000000000 00 > > @@ -3426,9 +3429,9 @@ > > TAILQ_FOREACH(child, &dev->children, link) { > > error = DEVICE_SUSPEND(child); > > if (error) { > > - for (child2 = TAILQ_FIRST(&dev->children); > > - child2 && child2 != child; > > - child2 = TAILQ_NEXT(child2, link)) > > + for (child2 = TAILQ_PREV(child, device_list, link); > > + child2 != NULL; > > + child2 = TAILQ_PREV(child2, device_list, link)) > > DEVICE_RESUME(child2); > > return (error); > > } > > @@ -3447,7 +3450,7 @@ > > { > > device_t child; > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { > > DEVICE_RESUME(child); > > /* if resume fails, there's nothing we can usefully do... */ > > } > > > > (Likely mangled whitespace.) > > > > I couldn't convince myself which order was "more" correct for suspend and resume. > > Considering loading in starting point, I think suspend should go in > reverse logic and resume in the same module load logic. > So that dependent modules are suspended first and resumed after. > Don't you agree? These are devices, and the ordering here is the order of sibling devices on a given bus. That is, if you have a PCI bus with two em interfaces, does it really matter if em0 suspends before em1 vs after em1? I think it actually doesn't matter. The passes from the multipass boot probe might make some sense to order on. However, I don't think the order of siblings on a bus is meaningful for suspend and resume (which is why I've never committed the above patches). Specifically, there is no dependency relationship between siblings on a bus. Certain buses may in fact have a dependency order of sorts (vgapci0 comes to mind), but those buses should manage that. There is no generic dependency between siblings that should be encoded into subr_bus.c -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:46:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 1AF1B1065907; Fri, 19 Nov 2010 21:46:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Attilio Rao Date: Fri, 19 Nov 2010 16:46:17 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191621.25520.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <201011191646.20048.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:42 -0000 On Friday 19 November 2010 04:31 pm, Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > >> > Author: attilio > >> > Date: Fri Nov 19 19:43:56 2010 > >> > New Revision: 215544 > >> > URL: http://svn.freebsd.org/changeset/base/215544 > >> > > >> > Log: > >> >   Scan the list in reverse order for the shutdown handlers of > >> > loaded modules. This way, when there is a dependency between > >> > two modules, the handler of the latter probed runs first. > >> > > >> >   This is a similar approach as the modules are unloaded in > >> > the same linkerfile. > >> > > >> >   Sponsored by:     Sandvine Incorporated > >> >   Submitted by:     Nima Misaghian >> > com> MFC after:        1 week > >> > >> Hmm...  It is not directly related but I was thinking about > >> doing similar things for sys/kern/subr_bus.c.  What do you think > >> about the attached patch? > > > > Hmm, the patches for suspend and resume that I had for this took > > the opposite order, they did suspend in forward order, but resume > > in backwards order. Like so: > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c     > >  2010-11-17 22:30:24.000000000 0000 +++ > > //depot/user/jhb/acpipci/kern/subr_bus.c    2010-11-19 > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > >        TAILQ_FOREACH(child, &dev->children, link) { > >                error = DEVICE_SUSPEND(child); > >                if (error) { > > -                       for (child2 = > > TAILQ_FIRST(&dev->children); -                            child2 > > && child2 != child; > > -                            child2 = TAILQ_NEXT(child2, link)) > > +                       for (child2 = TAILQ_PREV(child, > > device_list, link); +                            child2 != NULL; > > +                            child2 = TAILQ_PREV(child2, > > device_list, link)) DEVICE_RESUME(child2); > >                        return (error); > >                } > > @@ -3447,7 +3450,7 @@ > >  { > >        device_t        child; > > > > -       TAILQ_FOREACH(child, &dev->children, link) { > > +       TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, > > link) { DEVICE_RESUME(child); > >                /* if resume fails, there's nothing we can > > usefully do... */ } > > > > (Likely mangled whitespace.) > > > > I couldn't convince myself which order was "more" correct for > > suspend and resume. > > Considering loading in starting point, I think suspend should go in > reverse logic and resume in the same module load logic. > So that dependent modules are suspended first and resumed after. > Don't you agree? That's exactly what I was thinking. :-) Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 21:49:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDB7106564A; Fri, 19 Nov 2010 21:49:06 +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 44B658FC18; Fri, 19 Nov 2010 21:49: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 oAJLn6VS090530; Fri, 19 Nov 2010 21:49:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJLn6lL090528; Fri, 19 Nov 2010 21:49:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011192149.oAJLn6lL090528@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 21:49:06 +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: r215549 - 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: Fri, 19 Nov 2010 21:49:06 -0000 Author: kib Date: Fri Nov 19 21:49:04 2010 New Revision: 215549 URL: http://svn.freebsd.org/changeset/base/215549 Log: Change the delivery address for Stephan commit mail. Requested by: ups Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Nov 19 21:17:34 2010 (r215548) +++ svnadmin/conf/access Fri Nov 19 21:49:04 2010 (r215549) @@ -229,7 +229,7 @@ trhodes truckman tuexen ume -ups +ups ups_old@stups.com uqs vanhu versus From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 22:03:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id C25311065679; Fri, 19 Nov 2010 22:03:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Fri, 19 Nov 2010 17:03:25 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> In-Reply-To: <201011191646.12106.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191703.26742.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:03:35 -0000 On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > 2010/11/19 John Baldwin : > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > >> > Author: attilio > > >> > Date: Fri Nov 19 19:43:56 2010 > > >> > New Revision: 215544 > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > >> > > > >> > Log: > > >> > Scan the list in reverse order for the shutdown handlers > > >> > of loaded modules. This way, when there is a dependency > > >> > between two modules, the handler of the latter probed runs > > >> > first. > > >> > > > >> > This is a similar approach as the modules are unloaded in > > >> > the same linkerfile. > > >> > > > >> > Sponsored by: Sandvine Incorporated > > >> > Submitted by: Nima Misaghian > >> > dot com> MFC after: 1 week > > >> > > >> Hmm... It is not directly related but I was thinking about > > >> doing similar things for sys/kern/subr_bus.c. What do you > > >> think about the attached patch? > > > > > > Hmm, the patches for suspend and resume that I had for this > > > took the opposite order, they did suspend in forward order, but > > > resume in backwards order. Like so: > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > TAILQ_FOREACH(child, &dev->children, link) { > > > error = DEVICE_SUSPEND(child); > > > if (error) { > > > - for (child2 = > > > TAILQ_FIRST(&dev->children); - > > > child2 && child2 != child; - child2 > > > = TAILQ_NEXT(child2, link)) + for (child2 > > > = TAILQ_PREV(child, device_list, link); + > > > child2 != NULL; > > > + child2 = TAILQ_PREV(child2, > > > device_list, link)) DEVICE_RESUME(child2); > > > return (error); > > > } > > > @@ -3447,7 +3450,7 @@ > > > { > > > device_t child; > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > device_list, link) { DEVICE_RESUME(child); > > > /* if resume fails, there's nothing we can > > > usefully do... */ } > > > > > > (Likely mangled whitespace.) > > > > > > I couldn't convince myself which order was "more" correct for > > > suspend and resume. > > > > Considering loading in starting point, I think suspend should go > > in reverse logic and resume in the same module load logic. > > So that dependent modules are suspended first and resumed after. > > Don't you agree? > > These are devices, and the ordering here is the order of sibling > devices on a given bus. That is, if you have a PCI bus with two em > interfaces, does it really matter if em0 suspends before em1 vs > after em1? I think it actually doesn't matter. The passes from > the multipass boot probe might make some sense to order on. > However, I don't think the order of siblings on a bus is meaningful > for suspend and resume (which is why I've never committed the above > patches). > > Specifically, there is no dependency relationship between siblings > on a bus. Certain buses may in fact have a dependency order of > sorts (vgapci0 comes to mind), but those buses should manage that. > There is no generic dependency between siblings that should be > encoded into subr_bus.c Generally siblings don't interact with each other directly, no. However, some modern chipsets *do* have strong relationship. For example, some chipsets reference SMB controller to get current configuration, e.g., function A depends on function B on the same chip. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 22:25:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC17C106564A; Fri, 19 Nov 2010 22:25:32 +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 BB3768FC17; Fri, 19 Nov 2010 22:25: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 oAJMPWXr091370; Fri, 19 Nov 2010 22:25:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJMPWLW091369; Fri, 19 Nov 2010 22:25:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011192225.oAJMPWLW091369@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 22:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215550 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:25:32 -0000 Author: jilles Date: Fri Nov 19 22:25:32 2010 New Revision: 215550 URL: http://svn.freebsd.org/changeset/base/215550 Log: sh: Add a test that manipulates various long strings. It is quite effective at detecting mistakes in memalloc.c and code using it. It is somewhat slow, but some of the patches in my queue improve it. Added: head/tools/regression/bin/sh/expansion/arith6.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith6.0 Fri Nov 19 22:25:32 2010 (r215550) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +v1=1\ +\ 1 +v2=D +v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +f() { v4="$*"; } + +while [ ${#v2} -lt 1250 ]; do + eval $v2=$((3+${#v2})) $v3=$((4-${#v2})) + eval f $(($v2+ $v1 +$v3)) + if [ $v4 -ne 9 ]; then + echo bad: $v4 -ne 9 at ${#v2} + fi + v2=x$v2 + v3=y$v3 +done From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 22:26:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6466C1065697; Fri, 19 Nov 2010 22:26:10 +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 321B48FC22; Fri, 19 Nov 2010 22:26:10 +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 B9CFF46B29; Fri, 19 Nov 2010 17:26:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A5A8E8A009; Fri, 19 Nov 2010 17:25:48 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Fri, 19 Nov 2010 17:16:03 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> <201011191703.26742.jkim@FreeBSD.org> In-Reply-To: <201011191703.26742.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191716.03279.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 17:25:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:26:10 -0000 On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: > On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > > 2010/11/19 John Baldwin : > > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > > >> > Author: attilio > > > >> > Date: Fri Nov 19 19:43:56 2010 > > > >> > New Revision: 215544 > > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > > >> > > > > >> > Log: > > > >> > Scan the list in reverse order for the shutdown handlers > > > >> > of loaded modules. This way, when there is a dependency > > > >> > between two modules, the handler of the latter probed runs > > > >> > first. > > > >> > > > > >> > This is a similar approach as the modules are unloaded in > > > >> > the same linkerfile. > > > >> > > > > >> > Sponsored by: Sandvine Incorporated > > > >> > Submitted by: Nima Misaghian > > >> > dot com> MFC after: 1 week > > > >> > > > >> Hmm... It is not directly related but I was thinking about > > > >> doing similar things for sys/kern/subr_bus.c. What do you > > > >> think about the attached patch? > > > > > > > > Hmm, the patches for suspend and resume that I had for this > > > > took the opposite order, they did suspend in forward order, but > > > > resume in backwards order. Like so: > > > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > > TAILQ_FOREACH(child, &dev->children, link) { > > > > error = DEVICE_SUSPEND(child); > > > > if (error) { > > > > - for (child2 = > > > > TAILQ_FIRST(&dev->children); - > > > > child2 && child2 != child; - child2 > > > > = TAILQ_NEXT(child2, link)) + for (child2 > > > > = TAILQ_PREV(child, device_list, link); + > > > > child2 != NULL; > > > > + child2 = TAILQ_PREV(child2, > > > > device_list, link)) DEVICE_RESUME(child2); > > > > return (error); > > > > } > > > > @@ -3447,7 +3450,7 @@ > > > > { > > > > device_t child; > > > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > > device_list, link) { DEVICE_RESUME(child); > > > > /* if resume fails, there's nothing we can > > > > usefully do... */ } > > > > > > > > (Likely mangled whitespace.) > > > > > > > > I couldn't convince myself which order was "more" correct for > > > > suspend and resume. > > > > > > Considering loading in starting point, I think suspend should go > > > in reverse logic and resume in the same module load logic. > > > So that dependent modules are suspended first and resumed after. > > > Don't you agree? > > > > These are devices, and the ordering here is the order of sibling > > devices on a given bus. That is, if you have a PCI bus with two em > > interfaces, does it really matter if em0 suspends before em1 vs > > after em1? I think it actually doesn't matter. The passes from > > the multipass boot probe might make some sense to order on. > > However, I don't think the order of siblings on a bus is meaningful > > for suspend and resume (which is why I've never committed the above > > patches). > > > > Specifically, there is no dependency relationship between siblings > > on a bus. Certain buses may in fact have a dependency order of > > sorts (vgapci0 comes to mind), but those buses should manage that. > > There is no generic dependency between siblings that should be > > encoded into subr_bus.c > > Generally siblings don't interact with each other directly, no. > However, some modern chipsets *do* have strong relationship. For > example, some chipsets reference SMB controller to get current > configuration, e.g., function A depends on function B on the same > chip. That may be true, but that is not generic to all buses and devices. That isn't even really generic to PCI. If there are specific instances where there are dependencies, the drivers for that hardware should manage that. If specific buses have specific orders, then they can manage that order explicitly in their own suspend and resume routines. However, I don't see a valid reason for enforcing a particular order among siblings for all devices. We certainly do enforce some orders with respect to children and parents (parents attach first and resume first, children detach first and suspend first, PCI even mandates this for powering down a bus), but the same is not true for siblings. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 22:32:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D10DC106564A; Fri, 19 Nov 2010 22:32:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 379B18FC14; Fri, 19 Nov 2010 22:32:00 +0000 (UTC) Received: by qwi4 with SMTP id 4so377431qwi.13 for ; Fri, 19 Nov 2010 14:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=7frISmsVwNx+6Esee14fFwDlzDu3keEmd5+vgN74SWQ=; b=ZJlq5REm+S+mP+XIOIKy8LvnUBx4e78VqqMsBoWlSubPEvYF/RDGKmrig/FvV4VJXM 6LKJDNZHtPIYek/Np8l7cQxzdoJ4szzKGE12ERnUDR82Iaj6gg6wWyNr0UjybxJkrmNW wJ4WF9MisTOnfNdR13E0yNWFwB1dUnK2i85uU= 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=j6zOpb1tGAfOup/Dxcfhlay7LEMOpJrBDhb7NYjUXWZqV7djQcxE3Z6wJiTM1CtctX GxDIdHqPlxRNFtUjXmZfO2UWkvjG+eruYA7Q4NELQzTWWbqxa7sLF9Xt1/utf9A2E6iJ bWWkCUo7a2kzmfH2FvWW++3KVr9qVVr5kTmws= MIME-Version: 1.0 Received: by 10.229.191.130 with SMTP id dm2mr2216021qcb.256.1290205920263; Fri, 19 Nov 2010 14:32:00 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 14:32:00 -0800 (PST) In-Reply-To: <201011191642.00761.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> <201011191642.00761.jhb@freebsd.org> Date: Fri, 19 Nov 2010 23:32:00 +0100 X-Google-Sender-Auth: upgcOOZLbIrz_zJ1UxOksVtobMk Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:32:01 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 4:27:27 pm Attilio Rao wrote: >> 2010/11/19 John Baldwin : >> > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: >> >> Author: attilio >> >> Date: Fri Nov 19 19:43:56 2010 >> >> New Revision: 215544 >> >> URL: http://svn.freebsd.org/changeset/base/215544 >> >> >> >> Log: >> >> =C2=A0 Scan the list in reverse order for the shutdown handlers of lo= aded modules. >> >> =C2=A0 This way, when there is a dependency between two modules, the = handler of the >> >> =C2=A0 latter probed runs first. >> >> >> >> =C2=A0 This is a similar approach as the modules are unloaded in the = same >> >> =C2=A0 linkerfile. >> >> >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> >> =C2=A0 Submitted by: =C2=A0 =C2=A0 =C2=A0 Nima Misaghian >> >> =C2=A0 MFC after: =C2=A01 week >> >> >> >> Modified: >> >> =C2=A0 head/sys/kern/kern_module.c >> >> >> >> Modified: head/sys/kern/kern_module.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/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 18:59= :35 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215543) >> >> +++ head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 19:43= :56 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215544) >> >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); >> >> >> >> =C2=A0static MALLOC_DEFINE(M_MODULE, "module", "module data structure= s"); >> >> >> >> -typedef TAILQ_HEAD(, module) modulelist_t; >> >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; >> > >> > Is modulelist already taken? =C2=A0If not, we should probably just ret= ire >> > 'modulelist_t' and replace it with 'struct modulelist'. >> >> Note that I used modulelst, not modulelist. >> Probabilly, if you think the name may be still confusing, we can >> pickup one another further. > > Yes, I'd much prefer 'modulelist' with the extra 'i' as it is more readab= le. > If you go that route, I think you can drop modulelist_t since style(9) > discourages foo_t types unless they are required by a standard. I think that this patch should make it? Thanks, Attilio Index: sys/kern/kern_module.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 --- sys/kern/kern_module.c (revision 215544) +++ sys/kern/kern_module.c (working copy) @@ -46,7 +46,6 @@ static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); -typedef TAILQ_HEAD(modulelst, module) modulelist_t; struct module { TAILQ_ENTRY(module) link; /* chain together all modules */ TAILQ_ENTRY(module) flink; /* all modules in a file */ @@ -61,7 +60,7 @@ #define MOD_EVENT(mod, type) (mod)->handler((mod), (type), (mod)->arg) -static modulelist_t modules; +static TAILQ_HEAD(modulelist, module) modules; struct sx modules_sx; static int nextid =3D 1; static void module_shutdown(void *, int); @@ -101,7 +100,7 @@ return; mtx_lock(&Giant); MOD_SLOCK; - TAILQ_FOREACH_REVERSE(mod, &modules, modulelst, link) + TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link) MOD_EVENT(mod, MOD_SHUTDOWN); MOD_SUNLOCK; mtx_unlock(&Giant); From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 22:41:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74A9106566C; Fri, 19 Nov 2010 22:41:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 261208FC15; Fri, 19 Nov 2010 22:41:00 +0000 (UTC) Received: by qyk35 with SMTP id 35so12602qyk.13 for ; Fri, 19 Nov 2010 14:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=RGXYciazipDUEA69GUP6fG7Kk+BdHjnyOA3kgYQDOM4=; b=u0kYukxQm2XA9J8ugKUIuKGE6hUirnd9KmMsjkyZOkzJVT1nPro+j6o8ww+0lIFJty TmAVYRmRJuzfsI5DuDa46stl1RebyWSqpYKpF2vjOLH7cajSeeo78+CCSvrgqWWkos01 7+MqoeKBDtwnH08fR7xhi2cGg5Eo/mbAf9+KM= 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=DDaHHxzRw3rpFLk7tKKw8SWTrAXSkEE9UgDZl3Fl34r0VKkBxOKppZ6Qor/bDKKt84 +tp7M340RECJL6OlSapizpMcZfRa/YdpAQlaa0DDj2wl6eW5OLGHvwMZ9jrw9TvP1UKt aQcFS2EFuA5D7aOraTnQG11yfyTNqYuLBfBsg= MIME-Version: 1.0 Received: by 10.229.96.70 with SMTP id g6mr2218473qcn.294.1290206460425; Fri, 19 Nov 2010 14:41:00 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 14:41:00 -0800 (PST) In-Reply-To: <201011191716.03279.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> <201011191703.26742.jkim@FreeBSD.org> <201011191716.03279.jhb@freebsd.org> Date: Fri, 19 Nov 2010 23:41:00 +0100 X-Google-Sender-Auth: Qx-kNwqzYAIOMJlx81w_dJYXPco Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:41:02 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: >> On Friday 19 November 2010 04:46 pm, John Baldwin wrote: >> > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: >> > > 2010/11/19 John Baldwin : >> > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: >> > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: >> > > >> > Author: attilio >> > > >> > Date: Fri Nov 19 19:43:56 2010 >> > > >> > New Revision: 215544 >> > > >> > URL: http://svn.freebsd.org/changeset/base/215544 >> > > >> > >> > > >> > Log: >> > > >> > =C2=A0 Scan the list in reverse order for the shutdown handlers >> > > >> > of loaded modules. This way, when there is a dependency >> > > >> > between two modules, the handler of the latter probed runs >> > > >> > first. >> > > >> > >> > > >> > =C2=A0 This is a similar approach as the modules are unloaded i= n >> > > >> > the same linkerfile. >> > > >> > >> > > >> > =C2=A0 Sponsored by: =C2=A0 =C2=A0 Sandvine Incorporated >> > > >> > =C2=A0 Submitted by: =C2=A0 =C2=A0 Nima Misaghian > > > >> > dot com> MFC after: =C2=A0 =C2=A0 =C2=A0 =C2=A01 week >> > > >> >> > > >> Hmm... =C2=A0It is not directly related but I was thinking about >> > > >> doing similar things for sys/kern/subr_bus.c. =C2=A0What do you >> > > >> think about the attached patch? >> > > > >> > > > Hmm, the patches for suspend and resume that I had for this >> > > > took the opposite order, they did suspend in forward order, but >> > > > resume in backwards order. Like so: >> > > > >> > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c >> > > > 2010-11-17 22:30:24.000000000 0000 +++ >> > > > //depot/user/jhb/acpipci/kern/subr_bus.c =C2=A0 =C2=A02010-11-19 >> > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_FOREACH(child, &dev->children, li= nk) { >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D D= EVICE_SUSPEND(child); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) = { >> > > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 for (child2 =3D >> > > > TAILQ_FIRST(&dev->children); - >> > > > child2 && child2 !=3D child; - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 >> > > > =3D TAILQ_NEXT(child2, link)) + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (child2 >> > > > =3D TAILQ_PREV(child, device_list, link); + >> > > > =C2=A0 =C2=A0 =C2=A0child2 !=3D NULL; >> > > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_PREV(child2, >> > > > device_list, link)) DEVICE_RESUME(child2); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return (error); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> > > > @@ -3447,7 +3450,7 @@ >> > > > =C2=A0{ >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0device_t =C2=A0 =C2=A0 =C2=A0 =C2=A0chi= ld; >> > > > >> > > > - =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH(child, &dev->children, link) = { >> > > > + =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH_REVERSE(child, &dev->children= , >> > > > device_list, link) { DEVICE_RESUME(child); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* if resum= e fails, there's nothing we can >> > > > usefully do... */ } >> > > > >> > > > (Likely mangled whitespace.) >> > > > >> > > > I couldn't convince myself which order was "more" correct for >> > > > suspend and resume. >> > > >> > > Considering loading in starting point, I think suspend should go >> > > in reverse logic and resume in the same module load logic. >> > > So that dependent modules are suspended first and resumed after. >> > > Don't you agree? >> > >> > These are devices, and the ordering here is the order of sibling >> > devices on a given bus. =C2=A0That is, if you have a PCI bus with two = em >> > interfaces, does it really matter if em0 suspends before em1 vs >> > after em1? =C2=A0I think it actually doesn't matter. =C2=A0The passes = from >> > the multipass boot probe might make some sense to order on. >> > However, I don't think the order of siblings on a bus is meaningful >> > for suspend and resume (which is why I've never committed the above >> > patches). >> > >> > Specifically, there is no dependency relationship between siblings >> > on a bus. Certain buses may in fact have a dependency order of >> > sorts (vgapci0 comes to mind), but those buses should manage that. >> > There is no generic dependency between siblings that should be >> > encoded into subr_bus.c >> >> Generally siblings don't interact with each other directly, no. >> However, some modern chipsets *do* have strong relationship. =C2=A0For >> example, some chipsets reference SMB controller to get current >> configuration, e.g., function A depends on function B on the same >> chip. > > That may be true, but that is not generic to all buses and devices. > That isn't even really generic to PCI. =C2=A0If there are specific instan= ces > where there are dependencies, the drivers for that hardware should > manage that. =C2=A0If specific buses have specific orders, then they can > manage that order explicitly in their own suspend and resume routines. > However, I don't see a valid reason for enforcing a particular order > among siblings for all devices. =C2=A0We certainly do enforce some orders > with respect to children and parents (parents attach first and resume > first, children detach first and suspend first, PCI even mandates this > for powering down a bus), but the same is not true for siblings. However, it would be good if any ordering is maintained between devices linked via MODDEPEND stuff. It happens they may also be sibillings, and not havign parent-child relationship in some cases, but I'm also wondering if maybe they should ensure consistency in their code itself rather than relying strongly on ordering by the PCi/whatever subsystem? Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Nov 19 23:12:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D30EC1065670; Fri, 19 Nov 2010 23:12:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Fri, 19 Nov 2010 18:12:30 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191703.26742.jkim@FreeBSD.org> <201011191716.03279.jhb@freebsd.org> In-Reply-To: <201011191716.03279.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191812.43712.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 23:12:52 -0000 On Friday 19 November 2010 05:16 pm, John Baldwin wrote: > On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: > > On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > > > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > > > 2010/11/19 John Baldwin : > > > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > > > >> > Author: attilio > > > > >> > Date: Fri Nov 19 19:43:56 2010 > > > > >> > New Revision: 215544 > > > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > > > >> > > > > > >> > Log: > > > > >> > Scan the list in reverse order for the shutdown > > > > >> > handlers of loaded modules. This way, when there is a > > > > >> > dependency between two modules, the handler of the > > > > >> > latter probed runs first. > > > > >> > > > > > >> > This is a similar approach as the modules are unloaded > > > > >> > in the same linkerfile. > > > > >> > > > > > >> > Sponsored by: Sandvine Incorporated > > > > >> > Submitted by: Nima Misaghian > > > >> > sandvine dot com> MFC after: 1 week > > > > >> > > > > >> Hmm... It is not directly related but I was thinking > > > > >> about doing similar things for sys/kern/subr_bus.c. What > > > > >> do you think about the attached patch? > > > > > > > > > > Hmm, the patches for suspend and resume that I had for this > > > > > took the opposite order, they did suspend in forward order, > > > > > but resume in backwards order. Like so: > > > > > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > > > TAILQ_FOREACH(child, &dev->children, link) { > > > > > error = DEVICE_SUSPEND(child); > > > > > if (error) { > > > > > - for (child2 = > > > > > TAILQ_FIRST(&dev->children); - > > > > > child2 && child2 != child; - > > > > > child2 = TAILQ_NEXT(child2, link)) + > > > > > for (child2 = TAILQ_PREV(child, device_list, link); + > > > > > child2 != NULL; > > > > > + child2 = TAILQ_PREV(child2, > > > > > device_list, link)) DEVICE_RESUME(child2); > > > > > return (error); > > > > > } > > > > > @@ -3447,7 +3450,7 @@ > > > > > { > > > > > device_t child; > > > > > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > > > device_list, link) { DEVICE_RESUME(child); > > > > > /* if resume fails, there's nothing we can > > > > > usefully do... */ } > > > > > > > > > > (Likely mangled whitespace.) > > > > > > > > > > I couldn't convince myself which order was "more" correct > > > > > for suspend and resume. > > > > > > > > Considering loading in starting point, I think suspend should > > > > go in reverse logic and resume in the same module load logic. > > > > So that dependent modules are suspended first and resumed > > > > after. Don't you agree? > > > > > > These are devices, and the ordering here is the order of > > > sibling devices on a given bus. That is, if you have a PCI bus > > > with two em interfaces, does it really matter if em0 suspends > > > before em1 vs after em1? I think it actually doesn't matter. > > > The passes from the multipass boot probe might make some sense > > > to order on. However, I don't think the order of siblings on a > > > bus is meaningful for suspend and resume (which is why I've > > > never committed the above patches). > > > > > > Specifically, there is no dependency relationship between > > > siblings on a bus. Certain buses may in fact have a dependency > > > order of sorts (vgapci0 comes to mind), but those buses should > > > manage that. There is no generic dependency between siblings > > > that should be encoded into subr_bus.c > > > > Generally siblings don't interact with each other directly, no. > > However, some modern chipsets *do* have strong relationship. For > > example, some chipsets reference SMB controller to get current > > configuration, e.g., function A depends on function B on the same > > chip. > > That may be true, but that is not generic to all buses and devices. > That isn't even really generic to PCI. If there are specific > instances where there are dependencies, the drivers for that > hardware should manage that. If specific buses have specific > orders, then they can manage that order explicitly in their own > suspend and resume routines. However, I don't see a valid reason > for enforcing a particular order among siblings for all devices. > We certainly do enforce some orders with respect to children and > parents (parents attach first and resume first, children detach > first and suspend first, PCI even mandates this for powering down a > bus), but the same is not true for siblings. It may be unnecessary but I like consistency. ;-) Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 04:54:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39BF4106564A; Sat, 20 Nov 2010 04:54:59 +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 0E30A8FC08; Sat, 20 Nov 2010 04:54: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 oAK4swfI000419; Sat, 20 Nov 2010 04:54:58 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK4swPc000417; Sat, 20 Nov 2010 04:54:58 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011200454.oAK4swPc000417@svn.freebsd.org> From: Ryan Stone Date: Sat, 20 Nov 2010 04:54: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: r215551 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 04:54:59 -0000 Author: rstone Date: Sat Nov 20 04:54:58 2010 New Revision: 215551 URL: http://svn.freebsd.org/changeset/base/215551 Log: MFC r212281 and 212282 In munmap() downgrade the vm_map_lock to a read lock before taking a read lock on the pmc-sx lock. This prevents a deadlock with pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries to get a read lock on a vm_map. Downgrading the vm_map_lock in munmap allows pmc_log_process_mappings to continue, preventing the deadlock. Without this change I could cause a deadlock on a multicore 8.1-RELEASE system by having one thread constantly mmap'ing and then munmap'ing a PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat in system-wide sampling mode. Approved by: emaste (mentor) Modified: stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Fri Nov 19 22:25:32 2010 (r215550) +++ stable/8/sys/vm/vm_mmap.c Sat Nov 20 04:54:58 2010 (r215551) @@ -577,6 +577,7 @@ munmap(td, uap) * Inform hwpmc if the address range being unmapped contains * an executable region. */ + pkm.pm_address = (uintptr_t) NULL; if (vm_map_lookup_entry(map, addr, &entry)) { for (; entry != &map->header && entry->start < addr + size; @@ -585,16 +586,23 @@ munmap(td, uap) entry->end, VM_PROT_EXECUTE) == TRUE) { pkm.pm_address = (uintptr_t) addr; pkm.pm_size = (size_t) size; - PMC_CALL_HOOK(td, PMC_FN_MUNMAP, - (void *) &pkm); break; } } } #endif - /* returns nothing but KERN_SUCCESS anyway */ vm_map_delete(map, addr, addr + size); + +#ifdef HWPMC_HOOKS + /* downgrade the lock to prevent a LOR with the pmc-sx lock */ + vm_map_lock_downgrade(map); + if (pkm.pm_address != (uintptr_t) NULL) + PMC_CALL_HOOK(td, PMC_FN_MUNMAP, (void *) &pkm); + vm_map_unlock_read(map); +#else vm_map_unlock(map); +#endif + /* vm_map_delete returns nothing but KERN_SUCCESS anyway */ return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 06:13:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB4E4106564A; Sat, 20 Nov 2010 06:13:07 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 565F28FC16; Sat, 20 Nov 2010 06:13:06 +0000 (UTC) Received: by wwd20 with SMTP id 20so5285554wwd.31 for ; Fri, 19 Nov 2010 22:13:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.129.71 with SMTP id n7mr3255313wbs.128.1290233585483; Fri, 19 Nov 2010 22:13:05 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.146.67 with HTTP; Fri, 19 Nov 2010 22:13:05 -0800 (PST) In-Reply-To: <20101119152151.GC7614@stack.nl> References: <201011190117.oAJ1HnOT051021@svn.freebsd.org> <20101119152151.GC7614@stack.nl> Date: Sat, 20 Nov 2010 19:13:05 +1300 X-Google-Sender-Auth: urTkqmot5R46UVbPwDDLBrd15Sw Message-ID: From: Andrew Thompson To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: r215475 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 06:13:08 -0000 On 20 November 2010 04:21, Jilles Tjoelker wrote: > On Fri, Nov 19, 2010 at 01:17:49AM +0000, Andrew Thompson wrote: >> Author: thompsa >> Date: Fri Nov 19 01:17:49 2010 >> New Revision: 215475 >> URL: http://svn.freebsd.org/changeset/base/215475 > >> Log: >> =A0 MFC r203774 > >> =A0 =A0Use more standard way for setting nonblocking flag for a filedesc= riptor. >> =A0 =A0This makes libusb porting a bit easier. > >> Modified: >> =A0 stable/8/lib/libusb/libusb10.c >> Directory Properties: >> =A0 stable/8/lib/libusb/ =A0 (props changed) >> =A0 stable/8/lib/libusb/usb.h =A0 (props changed) >> >> Modified: stable/8/lib/libusb/libusb10.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- stable/8/lib/libusb/libusb10.c =A0 =A0Thu Nov 18 23:46:55 2010 =A0 = =A0 =A0 =A0(r215474) >> +++ stable/8/lib/libusb/libusb10.c =A0 =A0Fri Nov 19 01:17:49 2010 =A0 = =A0 =A0 =A0(r215475) > [...] >> @@ -105,10 +105,12 @@ libusb_init(libusb_context **context) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (LIBUSB_ERROR_OTHER); >> =A0 =A0 =A0 } >> =A0 =A0 =A0 /* set non-blocking mode on the control pipe to avoid deadlo= ck */ >> - =A0 =A0 ret =3D 1; >> - =A0 =A0 ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret); >> - =A0 =A0 ret =3D 1; >> - =A0 =A0 ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret); >> + =A0 =A0 flag =3D 1; >> + =A0 =A0 ret =3D fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag); >> + =A0 =A0 assert(ret !=3D -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_p= ipe[0]"); >> + =A0 =A0 flag =3D 1; >> + =A0 =A0 ret =3D fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag); >> + =A0 =A0 assert(ret !=3D -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_p= ipe[1]"); >> >> =A0 =A0 =A0 libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pip= e[0], POLLIN); > > This is not the correct way to use fcntl() to turn on non-blocking mode. > The correct way is > > =A0 =A0 =A0 =A0flag =3D fcntl(ctx->ctrl_pipe[0], F_GETFL, 0); > =A0 =A0 =A0 =A0if (flag !=3D -1) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ret =3D fcntl(ctx->ctrl_pipe[0], F_SETFL, = flag | O_NONBLOCK); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ret =3D=3D -1) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0handle_error(); > =A0 =A0 =A0 =A0} else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0handle_error(); > > substituting some sort of error handling for handle_error(). > > This has been fixed in head in r213853, but that commit also makes other > changes. > > It turns out that on FreeBSD both F_SETFL and O_NONBLOCK have the value > 4, so there is some chance the desired result is achieved and fcntl() > will not fail. It may also set other flags for the open file > description, which could lead to unexpected results. I have merged r213853 now. From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 07:36:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48A63106564A; Sat, 20 Nov 2010 07:36:44 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFA788FC13; Sat, 20 Nov 2010 07:36: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 oAK7ahQ8003800; Sat, 20 Nov 2010 07:36:43 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK7ahWK003798; Sat, 20 Nov 2010 07:36:43 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011200736.oAK7ahWK003798@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 20 Nov 2010 07:36: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: r215552 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 07:36:44 -0000 Author: lstewart Date: Sat Nov 20 07:36:43 2010 New Revision: 215552 URL: http://svn.freebsd.org/changeset/base/215552 Log: When enabling or disabling SIFTR with a VIMAGE kernel, ensure we add or remove the SIFTR pfil(9) hook functions to or from all network stacks. This patch allows packets inbound or outbound from a vnet to be "seen" by SIFTR. Additional work is required to allow SIFTR to actually generate log messages for all vnet related packets because the siftr_findinpcb() function does not yet search for inpcbs across all vnets. This issue will be fixed separately. Reported and tested by: David Hayes MFC after: 3 days Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sat Nov 20 04:54:58 2010 (r215551) +++ head/sys/netinet/siftr.c Sat Nov 20 07:36:43 2010 (r215552) @@ -1109,26 +1109,38 @@ ret6: static int siftr_pfil(int action) { - struct pfil_head *pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); + struct pfil_head *pfh_inet; #ifdef SIFTR_IPV6 - struct pfil_head *pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); + struct pfil_head *pfh_inet6; #endif + VNET_ITERATOR_DECL(vnet_iter); - if (action == HOOK) { - pfil_add_hook(siftr_chkpkt, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); #ifdef SIFTR_IPV6 - pfil_add_hook(siftr_chkpkt6, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); + pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); #endif - } else if (action == UNHOOK) { - pfil_remove_hook(siftr_chkpkt, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); + + if (action == HOOK) { + pfil_add_hook(siftr_chkpkt, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); +#ifdef SIFTR_IPV6 + pfil_add_hook(siftr_chkpkt6, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); +#endif + } else if (action == UNHOOK) { + pfil_remove_hook(siftr_chkpkt, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); #ifdef SIFTR_IPV6 - pfil_remove_hook(siftr_chkpkt6, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); + pfil_remove_hook(siftr_chkpkt6, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); #endif + } + CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 08:40:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A46F1065674; Sat, 20 Nov 2010 08:40:37 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A49D8FC18; Sat, 20 Nov 2010 08:40: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 oAK8ebut005086; Sat, 20 Nov 2010 08:40:37 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK8ebJd005084; Sat, 20 Nov 2010 08:40:37 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011200840.oAK8ebJd005084@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 20 Nov 2010 08:40: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: r215553 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 08:40:37 -0000 Author: lstewart Date: Sat Nov 20 08:40:37 2010 New Revision: 215553 URL: http://svn.freebsd.org/changeset/base/215553 Log: Fix a minor code redundancy nit. MFC after: 3 days Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sat Nov 20 07:36:43 2010 (r215552) +++ head/sys/netinet/siftr.c Sat Nov 20 08:40:37 2010 (r215553) @@ -736,14 +736,12 @@ siftr_findinpcb(int ipver, struct ip *ip ss->nskip_in_inpcb++; else ss->nskip_out_inpcb++; - - INP_INFO_RUNLOCK(&V_tcbinfo); } else { /* Acquire the inpcb lock. */ INP_UNLOCK_ASSERT(inp); INP_RLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); } + INP_INFO_RUNLOCK(&V_tcbinfo); return (inp); } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 10:12:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 532C210656C0; Sat, 20 Nov 2010 10:12:21 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 277BF8FC1C; Sat, 20 Nov 2010 10:12: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 oAKACLQp008257; Sat, 20 Nov 2010 10:12:21 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKACL7O008255; Sat, 20 Nov 2010 10:12:21 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201011201012.oAKACL7O008255@svn.freebsd.org> From: Martin Matuska Date: Sat, 20 Nov 2010 10:12: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: r215554 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 10:12:21 -0000 Author: mm Date: Sat Nov 20 10:12:20 2010 New Revision: 215554 URL: http://svn.freebsd.org/changeset/base/215554 Log: MFC r215260: Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot and VFS_RELE on a non-existing hold on snapshot parent's z_vfs. This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4 (bug IDs: 6792139, 6794830) - not applicable to FreeBSD. This fixes the process hang if umounting a manually mounted snapshot. Reported by: Alexander Zagrebin Approved by: delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 20 08:40:37 2010 (r215553) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 20 10:12:20 2010 (r215554) @@ -1218,12 +1218,14 @@ zfs_mount(vfs_t *vfsp) error = zfs_domount(vfsp, osname); PICKUP_GIANT(); +#ifdef sun /* * Add an extra VFS_HOLD on our parent vfs so that it can't * disappear due to a forced unmount. */ if (error == 0 && ((zfsvfs_t *)vfsp->vfs_data)->z_issnap) VFS_HOLD(mvp->v_vfsp); +#endif /* sun */ out: return (error); @@ -1768,12 +1770,14 @@ zfs_freevfs(vfs_t *vfsp) { zfsvfs_t *zfsvfs = vfsp->vfs_data; +#ifdef sun /* * If this is a snapshot, we have an extra VFS_HOLD on our parent * from zfs_mount(). Release it here. */ if (zfsvfs->z_issnap) VFS_RELE(zfsvfs->z_parent->z_vfs); +#endif /* sun */ zfsvfs_free(zfsvfs); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 11:14:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0A1A1065674; Sat, 20 Nov 2010 11:14:06 +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 8F38C8FC16; Sat, 20 Nov 2010 11:14: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 oAKBE6Dm009786; Sat, 20 Nov 2010 11:14:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKBE6Bk009784; Sat, 20 Nov 2010 11:14:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011201114.oAKBE6Bk009784@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Nov 2010 11:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215555 - stable/8/sbin/kldstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 11:14:06 -0000 Author: kib Date: Sat Nov 20 11:14:06 2010 New Revision: 215555 URL: http://svn.freebsd.org/changeset/base/215555 Log: MFC r215248: In printfile(), exit the process instead of only printing the warning. Adjust style. Modified: stable/8/sbin/kldstat/kldstat.c Directory Properties: stable/8/sbin/kldstat/ (props changed) Modified: stable/8/sbin/kldstat/kldstat.c ============================================================================== --- stable/8/sbin/kldstat/kldstat.c Sat Nov 20 10:12:20 2010 (r215554) +++ stable/8/sbin/kldstat/kldstat.c Sat Nov 20 11:14:06 2010 (r215555) @@ -50,14 +50,15 @@ printmod(int modid) printf("\t\t%2d %s\n", stat.id, stat.name); } -static void printfile(int fileid, int verbose) +static void +printfile(int fileid, int verbose) { struct kld_file_stat stat; int modid; stat.version = sizeof(struct kld_file_stat); if (kldstat(fileid, &stat) < 0) - warn("can't stat file id %d", fileid); + err(1, "can't stat file id %d", fileid); else printf("%2d %4d %p %-8zx %s", stat.id, stat.refs, stat.address, stat.size, From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:22:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B03C3106564A; Sat, 20 Nov 2010 12:22:02 +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 83FE68FC0A; Sat, 20 Nov 2010 12:22:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCM2vX011434; Sat, 20 Nov 2010 12:22:02 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCM2gp011431; Sat, 20 Nov 2010 12:22:02 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201222.oAKCM2gp011431@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:22: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: r215556 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:22:02 -0000 Author: bschmidt Date: Sat Nov 20 12:22:02 2010 New Revision: 215556 URL: http://svn.freebsd.org/changeset/base/215556 Log: MFC r207323: When in the RUN -> AUTH -> RUN FSM transition happens, we'll call the ratectl_node_init() functions and since ni_rtctls was already malloc'ed() we will panic. Fix this by using the already malloc'ed pointer. Modified: stable/8/sys/net80211/ieee80211_amrr.c stable/8/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/8/sys/net80211/ieee80211_amrr.c Sat Nov 20 11:14:06 2010 (r215555) +++ stable/8/sys/net80211/ieee80211_amrr.c Sat Nov 20 12:22:02 2010 (r215556) @@ -136,16 +136,16 @@ amrr_node_init(struct ieee80211_node *ni struct ieee80211_amrr *amrr = vap->iv_rs; struct ieee80211_amrr_node *amn; - KASSERT(ni->ni_rctls == NULL, ("%s: ni_rctls already initialized", - __func__)); - - ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), - M_80211_RATECTL, M_NOWAIT|M_ZERO); - if (amn == NULL) { - if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " - "structure\n"); - return; - } + if (ni->ni_rctls == NULL) { + ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (amn == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } + } else + amn = ni->ni_rctls; amn->amn_amrr = amrr; amn->amn_success = 0; amn->amn_recovery = 0; Modified: stable/8/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 11:14:06 2010 (r215555) +++ stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 12:22:02 2010 (r215556) @@ -169,13 +169,17 @@ rssadapt_node_init(struct ieee80211_node struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; - ni->ni_rctls = ra = malloc(sizeof(struct ieee80211_rssadapt_node), - M_80211_RATECTL, M_NOWAIT|M_ZERO); - if (ra == NULL) { - if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " - "structure\n"); - return; - } + if (ni->ni_rctls == NULL) { + ni->ni_rctls = ra = + malloc(sizeof(struct ieee80211_rssadapt_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (ra == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } + } else + ra = ni->ni_rctls; ra->ra_rs = rsa; ra->ra_rates = *rs; rssadapt_updatestats(ra); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:24:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FA5F1065672; Sat, 20 Nov 2010 12:24: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 2C3698FC08; Sat, 20 Nov 2010 12:24: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 oAKCORAd011556; Sat, 20 Nov 2010 12:24:27 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCOQOp011539; Sat, 20 Nov 2010 12:24:26 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201224.oAKCOQOp011539@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:24: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: r215557 - in stable/8/sys: dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:24:27 -0000 Author: bschmidt Date: Sat Nov 20 12:24:26 2010 New Revision: 215557 URL: http://svn.freebsd.org/changeset/base/215557 Log: MFC r214894: Instead of using the AMRR ratectl algo as default for drivers which have the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if a driver calls ieee80211_ratectl_init() check if the NONE algo is still selected and try to use AMRR in that case. Drivers are still free to use any other algo by calling ieee80211_ratectl_set() prior to the ieee80211_ratectl_init() call. After this change it is now safe to assume that a ratectl algo is always available and selected, which renders the IEEE80211_C_RATECTL flag pretty much useless. Therefore revert r211314 and 211546. Modified: stable/8/sys/dev/bwi/if_bwi.c stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/ral/rt2560.c stable/8/sys/dev/ral/rt2661.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/dev/wpi/if_wpi.c stable/8/sys/net80211/ieee80211.c stable/8/sys/net80211/ieee80211_node.c stable/8/sys/net80211/ieee80211_ratectl.c stable/8/sys/net80211/ieee80211_ratectl.h stable/8/sys/net80211/ieee80211_sta.c stable/8/sys/net80211/ieee80211_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/8/sys/dev/bwi/if_bwi.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/bwi/if_bwi.c Sat Nov 20 12:24:26 2010 (r215557) @@ -511,8 +511,7 @@ bwi_attach(struct bwi_softc *sc) IEEE80211_C_SHPREAMBLE | IEEE80211_C_WPA | IEEE80211_C_BGSCAN | - IEEE80211_C_MONITOR | - IEEE80211_C_RATECTL; + IEEE80211_C_MONITOR; ic->ic_opmode = IEEE80211_M_STA; ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/bwn/if_bwn.c Sat Nov 20 12:24:26 2010 (r215557) @@ -1070,7 +1070,6 @@ bwn_attach_post(struct bwn_softc *sc) | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_TXPMGT /* capable of txpow mgt */ - | IEEE80211_C_RATECTL /* use ratectl */ ; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:24:26 2010 (r215557) @@ -580,7 +580,6 @@ iwn_attach(device_t dev) | IEEE80211_C_IBSS /* ibss/adhoc mode */ #endif | IEEE80211_C_WME /* WME */ - | IEEE80211_C_RATECTL /* use ratectl */ ; #if 0 /* HT */ /* XXX disable until HT channel setup works */ Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/ral/rt2560.c Sat Nov 20 12:24:26 2010 (r215557) @@ -291,7 +291,6 @@ rt2560_attach(device_t dev, int id) #ifdef notyet | IEEE80211_C_TXFRAG /* handle tx frags */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/ral/rt2661.c ============================================================================== --- stable/8/sys/dev/ral/rt2661.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/ral/rt2661.c Sat Nov 20 12:24:26 2010 (r215557) @@ -294,7 +294,6 @@ rt2661_attach(device_t dev, int id) | IEEE80211_C_TXFRAG /* handle tx frags */ | IEEE80211_C_WME /* 802.11e */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_rum.c Sat Nov 20 12:24:26 2010 (r215557) @@ -494,7 +494,6 @@ rum_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_run.c Sat Nov 20 12:24:26 2010 (r215557) @@ -632,8 +632,7 @@ run_attach(device_t self) IEEE80211_C_SHPREAMBLE | /* short preamble supported */ IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_WME | /* WME */ - IEEE80211_C_WPA | /* WPA1|WPA2(RSN) */ - IEEE80211_C_RATECTL; /* use ratectl */ + IEEE80211_C_WPA; /* WPA1|WPA2(RSN) */ ic->ic_cryptocaps = IEEE80211_CRYPTO_WEP | Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_ural.c Sat Nov 20 12:24:26 2010 (r215557) @@ -486,7 +486,6 @@ ural_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Sat Nov 20 12:24:26 2010 (r215557) @@ -397,7 +397,6 @@ zyd_attach(device_t dev) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_WPA /* 802.11i */ - | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:24:26 2010 (r215557) @@ -634,7 +634,6 @@ wpi_attach(device_t dev) | IEEE80211_C_WME /* 802.11e */ | IEEE80211_C_HOSTAP /* Host access point mode */ #endif - | IEEE80211_C_RATECTL /* use ratectl */ ; /* Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211.c Sat Nov 20 12:24:26 2010 (r215557) @@ -485,9 +485,7 @@ ieee80211_vap_setup(struct ieee80211com ieee80211_scan_vattach(vap); ieee80211_regdomain_vattach(vap); ieee80211_radiotap_vattach(vap); - - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); + ieee80211_ratectl_set(vap, IEEE80211_RATECTL_NONE); return 0; } Modified: stable/8/sys/net80211/ieee80211_node.c ============================================================================== --- stable/8/sys/net80211/ieee80211_node.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_node.c Sat Nov 20 12:24:26 2010 (r215557) @@ -817,8 +817,7 @@ ieee80211_sta_join(struct ieee80211vap * if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1038,8 +1037,7 @@ node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; - if (ni->ni_vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_deinit(ni); + ieee80211_ratectl_node_deinit(ni); ic->ic_node_cleanup(ni); ieee80211_ies_cleanup(&ni->ni_ies); ieee80211_psq_cleanup(&ni->ni_psq); @@ -1404,8 +1402,7 @@ ieee80211_fakeup_adhoc_node(struct ieee8 #endif } ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -1475,8 +1472,7 @@ ieee80211_add_neighbor(struct ieee80211v if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -2345,8 +2341,7 @@ ieee80211_node_join(struct ieee80211_nod ); ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, newassoc); Modified: stable/8/sys/net80211/ieee80211_ratectl.c ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_ratectl.c Sat Nov 20 12:24:26 2010 (r215557) @@ -66,6 +66,14 @@ ieee80211_ratectl_unregister(int type) } void +ieee80211_ratectl_init(struct ieee80211vap *vap) +{ + if (vap->iv_rate == ratectls[IEEE80211_RATECTL_NONE]) + ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); + vap->iv_rate->ir_init(vap); +} + +void ieee80211_ratectl_set(struct ieee80211vap *vap, int type) { if (type >= IEEE80211_RATECTL_MAX) Modified: stable/8/sys/net80211/ieee80211_ratectl.h ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:24:26 2010 (r215557) @@ -57,17 +57,12 @@ struct ieee80211_ratectl { void ieee80211_ratectl_register(int, const struct ieee80211_ratectl *); void ieee80211_ratectl_unregister(int); +void ieee80211_ratectl_init(struct ieee80211vap *); void ieee80211_ratectl_set(struct ieee80211vap *, int); MALLOC_DECLARE(M_80211_RATECTL); static void __inline -ieee80211_ratectl_init(struct ieee80211vap *vap) -{ - vap->iv_rate->ir_init(vap); -} - -static void __inline ieee80211_ratectl_deinit(struct ieee80211vap *vap) { vap->iv_rate->ir_deinit(vap); Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_sta.c Sat Nov 20 12:24:26 2010 (r215557) @@ -1598,8 +1598,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, htinfo); ieee80211_node_setuptxparms(ni); - if (vap->iv_caps & IEEE80211_C_RATECTL) - ieee80211_ratectl_node_init(ni); + ieee80211_ratectl_node_init(ni); } else { #ifdef IEEE80211_SUPPORT_SUPERG if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH)) Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 12:22:02 2010 (r215556) +++ stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 12:24:26 2010 (r215557) @@ -597,8 +597,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */ #define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/ #define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */ -#define IEEE80211_C_RATECTL 0x00080000 /* CAPABILITY: use ratectl */ -/* 0x700000 available */ +/* 0x7c0000 available */ #define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */ #define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ #define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:26:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80400106564A; Sat, 20 Nov 2010 12:26:31 +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 6E98F8FC12; Sat, 20 Nov 2010 12: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 oAKCQVI9011659; Sat, 20 Nov 2010 12:26:31 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCQVB3011657; Sat, 20 Nov 2010 12:26:31 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201226.oAKCQVB3011657@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215558 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:26:31 -0000 Author: bschmidt Date: Sat Nov 20 12:26:31 2010 New Revision: 215558 URL: http://svn.freebsd.org/changeset/base/215558 Log: MFC r215244: Some device drivers calculate various timing related things based on the currently selected rate. The calculations of course need a valid rate. To make that possible before any call to node_rate() is done, initialize ni_txrate on none_node_init() calls. Modified: stable/8/sys/net80211/ieee80211_ratectl_none.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_ratectl_none.c ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl_none.c Sat Nov 20 12:24:26 2010 (r215557) +++ stable/8/sys/net80211/ieee80211_ratectl_none.c Sat Nov 20 12:26:31 2010 (r215558) @@ -59,6 +59,7 @@ none_deinit(struct ieee80211vap *vap) static void none_node_init(struct ieee80211_node *ni) { + ni->ni_txrate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL; } static void From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:27:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AFC710656A3; Sat, 20 Nov 2010 12:27:40 +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 6AA008FC41; Sat, 20 Nov 2010 12:27: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 oAKCRe3f011732; Sat, 20 Nov 2010 12:27:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCRemT011730; Sat, 20 Nov 2010 12:27:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011201227.oAKCRemT011730@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Nov 2010 12:27: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: r215559 - 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: Sat, 20 Nov 2010 12:27:40 -0000 Author: bz Date: Sat Nov 20 12:27:40 2010 New Revision: 215559 URL: http://svn.freebsd.org/changeset/base/215559 Log: In case of an early return from the function there is no need to zero the route upfront, so defer as long as we can. MFC after: 3 days Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Nov 20 12:26:31 2010 (r215558) +++ head/sys/netinet6/nd6_nbr.c Sat Nov 20 12:27:40 2010 (r215559) @@ -390,8 +390,6 @@ nd6_ns_output(struct ifnet *ifp, const s caddr_t mac; struct route_in6 ro; - bzero(&ro, sizeof(ro)); - if (IN6_IS_ADDR_MULTICAST(taddr6)) return; @@ -418,6 +416,8 @@ nd6_ns_output(struct ifnet *ifp, const s return; m->m_pkthdr.rcvif = NULL; + bzero(&ro, sizeof(ro)); + if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) { m->m_flags |= M_MCAST; im6o.im6o_multicast_ifp = ifp; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:28:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAC9010656A7; Sat, 20 Nov 2010 12:28:24 +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 7EE378FC39; Sat, 20 Nov 2010 12:28: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 oAKCSO2n011789; Sat, 20 Nov 2010 12:28:24 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCSOEG011787; Sat, 20 Nov 2010 12:28:24 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201228.oAKCSOEG011787@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215560 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:28:24 -0000 Author: bschmidt Date: Sat Nov 20 12:28:24 2010 New Revision: 215560 URL: http://svn.freebsd.org/changeset/base/215560 Log: MFC r215289: The ni_rctls checks are used to verify that a ratectl algo has set up its internal data. This has been used to bypass missing calls in drivers which do not use the ratectl framework correctly. Issue is, not all algos use that variable, or even have internal data, therefore valid calls are not done. Fix this by removing the checks, all driver issues should be resolved. Modified: stable/8/sys/net80211/ieee80211_ratectl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_ratectl.h ============================================================================== --- stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:27:40 2010 (r215559) +++ stable/8/sys/net80211/ieee80211_ratectl.h Sat Nov 20 12:28:24 2010 (r215560) @@ -81,8 +81,6 @@ ieee80211_ratectl_node_deinit(struct iee { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_node_deinit(ni); } @@ -91,8 +89,6 @@ ieee80211_ratectl_rate(struct ieee80211_ { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return 0; return vap->iv_rate->ir_rate(ni, arg, iarg); } @@ -100,8 +96,6 @@ static void __inline ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } @@ -111,8 +105,6 @@ ieee80211_ratectl_tx_update(const struct { if (vap->iv_rate->ir_tx_update == NULL) return; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 12:59:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35B31065672; Sat, 20 Nov 2010 12:59:01 +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 A1BC88FC19; Sat, 20 Nov 2010 12:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCx1hM012576; Sat, 20 Nov 2010 12:59:01 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCx1sp012574; Sat, 20 Nov 2010 12:59:01 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201259.oAKCx1sp012574@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 12:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215561 - stable/8/sys/dev/wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:59:01 -0000 Author: bschmidt Date: Sat Nov 20 12:59:01 2010 New Revision: 215561 URL: http://svn.freebsd.org/changeset/base/215561 Log: MFC r199018 & r199037: Turn off debug output by default. Committed by: dougb Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:28:24 2010 (r215560) +++ stable/8/sys/dev/wpi/if_wpi.c Sat Nov 20 12:59:01 2010 (r215561) @@ -127,7 +127,7 @@ enum { WPI_DEBUG_ANY = 0xffffffff }; -static int wpi_debug = 1; +static int wpi_debug = 0; SYSCTL_INT(_debug, OID_AUTO, wpi, CTLFLAG_RW, &wpi_debug, 0, "wpi debug level"); TUNABLE_INT("debug.wpi", &wpi_debug); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:13:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16F86106566C; Sat, 20 Nov 2010 13:13:00 +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 047258FC18; Sat, 20 Nov 2010 13:13: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 oAKDD06m012945; Sat, 20 Nov 2010 13:13:00 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDCxvF012942; Sat, 20 Nov 2010 13:12:59 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201312.oAKDCxvF012942@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:12: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: r215562 - stable/8/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: Sat, 20 Nov 2010 13:13:00 -0000 Author: bschmidt Date: Sat Nov 20 13:12:59 2010 New Revision: 215562 URL: http://svn.freebsd.org/changeset/base/215562 Log: MFC r212853-212855: Rewrite parts of the calibration code which is run while bringing up the device: - Group functions used for initial calibration. - Unobscure some of the code by moving it into its own functions. - Get rid of some magic numbers. - Create similar structure as the reference driver has, this should make further syncs easier. Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 12:59:01 2010 (r215561) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Nov 20 13:12:59 2010 (r215562) @@ -135,8 +135,6 @@ static void iwn_rx_done(struct iwn_softc static void iwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); #endif -static void iwn5000_rx_calib_results(struct iwn_softc *, - struct iwn_rx_desc *, struct iwn_rx_data *); static void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); static void iwn4965_tx_done(struct iwn_softc *, struct iwn_rx_desc *, @@ -220,8 +218,14 @@ static void iwn5000_ampdu_tx_start(struc struct ieee80211_node *, uint8_t, uint16_t); static void iwn5000_ampdu_tx_stop(struct iwn_softc *, uint8_t, uint16_t); #endif -static int iwn5000_query_calibration(struct iwn_softc *); -static int iwn5000_send_calibration(struct iwn_softc *); +static int iwn5000_send_calib_results(struct iwn_softc *); +static int iwn5000_save_calib_result(struct iwn_softc *, + struct iwn_phy_calib *, int, int); +static void iwn5000_free_calib_results(struct iwn_softc *); +static int iwn5000_chrystal_calib(struct iwn_softc *); +static int iwn5000_send_calib_query(struct iwn_softc *); +static int iwn5000_rx_calib_result(struct iwn_softc *, + struct iwn_rx_desc *, struct iwn_rx_data *); static int iwn5000_send_wimax_coex(struct iwn_softc *); static int iwn4965_post_alive(struct iwn_softc *); static int iwn5000_post_alive(struct iwn_softc *); @@ -704,6 +708,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5000fw"; sc->txchainmask = IWN_ANT_B; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_5150: sc->sc_hal = &iwn5000_hal; @@ -711,6 +718,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5150fw"; sc->txchainmask = IWN_ANT_A; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_DC | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_5300: case IWN_HW_REV_TYPE_5350: @@ -719,6 +728,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn5000fw"; sc->txchainmask = IWN_ANT_ABC; sc->rxchainmask = IWN_ANT_ABC; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_1000: sc->sc_hal = &iwn5000_hal; @@ -726,6 +738,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn1000fw"; sc->txchainmask = IWN_ANT_A; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_TX_IQ_PERIODIC | + IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6000: sc->sc_hal = &iwn5000_hal; @@ -743,6 +758,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->rxchainmask = IWN_ANT_ABC; break; } + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6050: sc->sc_hal = &iwn5000_hal; @@ -750,6 +767,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn6050fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_DC | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; case IWN_HW_REV_TYPE_6005: sc->sc_hal = &iwn5000_hal; @@ -757,6 +776,8 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn6005fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | + IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; break; default: device_printf(sc->sc_dev, "adapter type %d not supported\n", @@ -841,6 +862,8 @@ iwn_cleanup(device_t dev) ieee80211_ifdetach(ic); } + iwn5000_free_calib_results(sc); + /* Free DMA resources. */ iwn_free_rx_ring(sc, &sc->rxq); if (sc->sc_hal != NULL) @@ -1696,12 +1719,6 @@ iwn5000_read_eeprom(struct iwn_softc *sc sc->temp_off = temp - (volt / -5); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "temp=%d volt=%d offset=%dK\n", temp, volt, sc->temp_off); - } else { - /* Read crystal calibration. */ - iwn_read_prom_data(sc, base + IWN5000_EEPROM_CRYSTAL, - &sc->eeprom_crystal, sizeof (uint32_t)); - DPRINTF(sc, IWN_DEBUG_CALIBRATE, "crystal calibration 0x%08x\n", - le32toh(sc->eeprom_crystal)); } } @@ -2195,64 +2212,6 @@ iwn_rx_compressed_ba(struct iwn_softc *s #endif /* - * Process a CALIBRATION_RESULT notification sent by the initialization - * firmware on response to a CMD_CALIB_CONFIG command (5000 only.) - */ -static void -iwn5000_rx_calib_results(struct iwn_softc *sc, struct iwn_rx_desc *desc, - struct iwn_rx_data *data) -{ - struct iwn_phy_calib *calib = (struct iwn_phy_calib *)(desc + 1); - int len, idx = -1; - - /* Runtime firmware should not send such a notification. */ - if (sc->sc_flags & IWN_FLAG_CALIB_DONE) - return; - - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); - len = (le32toh(desc->len) & 0x3fff) - 4; - - switch (calib->code) { - case IWN5000_PHY_CALIB_DC: - if (sc->hw_type == IWN_HW_REV_TYPE_5150 || - sc->hw_type == IWN_HW_REV_TYPE_6050) - idx = 0; - break; - case IWN5000_PHY_CALIB_LO: - idx = 1; - break; - case IWN5000_PHY_CALIB_TX_IQ: - idx = 2; - break; - case IWN5000_PHY_CALIB_TX_IQ_PERIODIC: - if (sc->hw_type < IWN_HW_REV_TYPE_6000 && - sc->hw_type != IWN_HW_REV_TYPE_5150) - idx = 3; - break; - case IWN5000_PHY_CALIB_BASE_BAND: - idx = 4; - break; - } - if (idx == -1) /* Ignore other results. */ - return; - - /* Save calibration result. */ - if (sc->calibcmd[idx].buf != NULL) - free(sc->calibcmd[idx].buf, M_DEVBUF); - sc->calibcmd[idx].buf = malloc(len, M_DEVBUF, M_NOWAIT); - if (sc->calibcmd[idx].buf == NULL) { - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "not enough memory for calibration result %d\n", - calib->code); - return; - } - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "saving calibration result code=%d len=%d\n", calib->code, len); - sc->calibcmd[idx].len = len; - memcpy(sc->calibcmd[idx].buf, calib, len); -} - -/* * Process an RX_STATISTICS or BEACON_STATISTICS firmware notification. * The latter is sent by the firmware after each received beacon. */ @@ -2607,7 +2566,7 @@ iwn_notif_intr(struct iwn_softc *sc) break; } case IWN5000_CALIBRATION_RESULT: - iwn5000_rx_calib_results(sc, desc, data); + iwn5000_rx_calib_result(sc, desc, data); break; case IWN5000_CALIBRATION_DONE: @@ -5238,22 +5197,140 @@ iwn5000_ampdu_tx_stop(struct iwn_softc * #endif /* - * Query calibration tables from the initialization firmware. We do this - * only once at first boot. Called from a process context. + * Send calibration results to the runtime firmware. These results were + * obtained on first boot from the initialization firmware, or by reading + * the EEPROM for crystal calibration. */ static int -iwn5000_query_calibration(struct iwn_softc *sc) +iwn5000_send_calib_results(struct iwn_softc *sc) { + struct iwn_calib_info *calib_result; + int idx, error; + + for (idx = 0; idx < IWN_CALIB_NUM; idx++) { + calib_result = &sc->calib_results[idx]; + + /* No support for this type of calibration. */ + if ((sc->calib_init & (1 << idx)) == 0) + continue; + + /* No calibration result available. */ + if (calib_result->buf == NULL) + continue; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: send calibration result idx=%d, len=%d\n", + __func__, idx, calib_result->len); + + error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, calib_result->buf, + calib_result->len, 0); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not send calibration result " + "idx=%d, error=%d\n", + __func__, idx, error); + return error; + } + } + return 0; +} + +/* + * Save calibration result at the given index. The index determines + * in which order the results are sent to the runtime firmware. + */ +static int +iwn5000_save_calib_result(struct iwn_softc *sc, struct iwn_phy_calib *calib, + int len, int idx) +{ + struct iwn_calib_info *calib_result = &sc->calib_results[idx]; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: saving calibration result code=%d, idx=%d, len=%d\n", + __func__, calib->code, idx, len); + + if (calib_result->buf != NULL) + free(calib_result->buf, M_DEVBUF); + + calib_result->buf = malloc(len, M_DEVBUF, M_NOWAIT); + if (calib_result->buf == NULL) { + device_printf(sc->sc_dev, + "%s: not enough memory for calibration result " + "code=%d, len=%d\n", __func__, calib->code, len); + return ENOMEM; + } + + calib_result->len = len; + memcpy(calib_result->buf, calib, len); + return 0; +} + +static void +iwn5000_free_calib_results(struct iwn_softc *sc) +{ + struct iwn_calib_info *calib_result; + int idx; + + for (idx = 0; idx < IWN_CALIB_NUM; idx++) { + calib_result = &sc->calib_results[idx]; + + if (calib_result->buf != NULL) + free(calib_result->buf, M_DEVBUF); + + calib_result->buf = NULL; + calib_result->len = 0; + } +} + +/* + * Obtain the crystal calibration result from the EEPROM. + */ +static int +iwn5000_chrystal_calib(struct iwn_softc *sc) +{ + struct iwn5000_phy_calib_crystal cmd; + uint32_t base, crystal; + uint16_t val; + + /* Read crystal calibration. */ + iwn_read_prom_data(sc, IWN5000_EEPROM_CAL, &val, 2); + base = le16toh(val); + iwn_read_prom_data(sc, base + IWN5000_EEPROM_CRYSTAL, &crystal, + sizeof(uint32_t)); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: crystal calibration=0x%08x\n", + __func__, le32toh(crystal)); + + memset(&cmd, 0, sizeof cmd); + cmd.code = IWN5000_PHY_CALIB_CRYSTAL; + cmd.ngroups = 1; + cmd.isvalid = 1; + cmd.cap_pin[0] = le32toh(crystal) & 0xff; + cmd.cap_pin[1] = (le32toh(crystal) >> 16) & 0xff; + + return iwn5000_save_calib_result(sc, (struct iwn_phy_calib *)&cmd, + sizeof cmd, IWN_CALIB_IDX_XTAL); +} + +/* + * Query calibration results from the initialization firmware. We do this + * only once at first boot. + */ +static int +iwn5000_send_calib_query(struct iwn_softc *sc) +{ +#define CALIB_INIT_CFG 0xffffffff; struct iwn5000_calib_config cmd; int error; memset(&cmd, 0, sizeof cmd); - cmd.ucode.once.enable = 0xffffffff; - cmd.ucode.once.start = 0xffffffff; - cmd.ucode.once.send = 0xffffffff; - cmd.ucode.flags = 0xffffffff; - DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: sending calibration query\n", + cmd.ucode.once.enable = CALIB_INIT_CFG; + cmd.ucode.once.start = CALIB_INIT_CFG; + cmd.ucode.once.send = CALIB_INIT_CFG; + cmd.ucode.flags = CALIB_INIT_CFG; + + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: query calibration results\n", __func__); + error = iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof cmd, 0); if (error != 0) return error; @@ -5261,34 +5338,56 @@ iwn5000_query_calibration(struct iwn_sof /* Wait at most two seconds for calibration to complete. */ if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) error = msleep(sc, &sc->sc_mtx, PCATCH, "iwninit", 2 * hz); + return error; +#undef CALIB_INIT_CFG } /* - * Send calibration results to the runtime firmware. These results were - * obtained on first boot from the initialization firmware. + * Process a CALIBRATION_RESULT notification sent by the initialization + * firmware on response to a CMD_CALIB_CONFIG command. */ static int -iwn5000_send_calibration(struct iwn_softc *sc) +iwn5000_rx_calib_result(struct iwn_softc *sc, struct iwn_rx_desc *desc, + struct iwn_rx_data *data) { - int idx, error; +#define FRAME_SIZE_MASK 0x3fff + struct iwn_phy_calib *calib = (struct iwn_phy_calib *)(desc + 1); + int len, idx; - for (idx = 0; idx < 5; idx++) { - if (sc->calibcmd[idx].buf == NULL) - continue; /* No results available. */ + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); + len = (le32toh(desc->len) & FRAME_SIZE_MASK); + + /* Remove length field itself. */ + len -= 4; + + /* + * Determine the order in which the results will be send to the + * runtime firmware. + */ + switch (calib->code) { + case IWN5000_PHY_CALIB_DC: + idx = IWN_CALIB_IDX_DC; + break; + case IWN5000_PHY_CALIB_LO: + idx = IWN_CALIB_IDX_LO; + break; + case IWN5000_PHY_CALIB_TX_IQ: + idx = IWN_CALIB_IDX_TX_IQ; + break; + case IWN5000_PHY_CALIB_TX_IQ_PERIODIC: + idx = IWN_CALIB_IDX_TX_IQ_PERIODIC; + break; + case IWN5000_PHY_CALIB_BASE_BAND: + idx = IWN_CALIB_IDX_BASE_BAND; + break; + default: DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "send calibration result idx=%d len=%d\n", - idx, sc->calibcmd[idx].len); - error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, sc->calibcmd[idx].buf, - sc->calibcmd[idx].len, 0); - if (error != 0) { - device_printf(sc->sc_dev, - "%s: could not send calibration result, error %d\n", - __func__, error); - return error; - } + "%s: unknown calibration code=%d\n", __func__, calib->code); + return EINVAL; } - return 0; + return iwn5000_save_calib_result(sc, calib, len, idx); +#undef FRAME_SIZE_MASK } static int @@ -5434,36 +5533,40 @@ iwn5000_post_alive(struct iwn_softc *sc) __func__, error); return error; } - if (sc->hw_type != IWN_HW_REV_TYPE_5150) { - struct iwn5000_phy_calib_crystal cmd; - /* Perform crystal calibration. */ - memset(&cmd, 0, sizeof cmd); - cmd.code = IWN5000_PHY_CALIB_CRYSTAL; - cmd.ngroups = 1; - cmd.isvalid = 1; - cmd.cap_pin[0] = le32toh(sc->eeprom_crystal) & 0xff; - cmd.cap_pin[1] = (le32toh(sc->eeprom_crystal) >> 16) & 0xff; - DPRINTF(sc, IWN_DEBUG_CALIBRATE, - "sending crystal calibration %d, %d\n", - cmd.cap_pin[0], cmd.cap_pin[1]); - error = iwn_cmd(sc, IWN_CMD_PHY_CALIB, &cmd, sizeof cmd, 0); + if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) { + /* + * Start calibration by setting and sending the chrystal + * calibration first, this must be done before we are able + * to query the other calibration results. + */ + error = iwn5000_chrystal_calib(sc); if (error != 0) { device_printf(sc->sc_dev, - "%s: crystal calibration failed, error %d\n", - __func__, error); + "%s: could not set chrystal calibration, " + "error=%d\n", __func__, error); return error; } - } - if (!(sc->sc_flags & IWN_FLAG_CALIB_DONE)) { - /* Query calibration from the initialization firmware. */ - error = iwn5000_query_calibration(sc); + error = iwn5000_send_calib_results(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not send chrystal calibration, " + "error=%d\n", __func__, error); + return error; + } + + /* + * Query other calibration results from the initialization + * firmware. + */ + error = iwn5000_send_calib_query(sc); if (error != 0) { device_printf(sc->sc_dev, - "%s: could not query calibration, error %d\n", + "%s: could not query calibration, error=%d\n", __func__, error); return error; } + /* * We have the calibration results now, reboot with the * runtime firmware (call ourselves recursively!) @@ -5471,8 +5574,11 @@ iwn5000_post_alive(struct iwn_softc *sc) iwn_hw_stop(sc); error = iwn_hw_init(sc); } else { - /* Send calibration results to runtime firmware. */ - error = iwn5000_send_calibration(sc); + /* + * Send calibration results obtained from the initialization + * firmware to the runtime firmware. + */ + error = iwn5000_send_calib_results(sc); } return error; } Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sat Nov 20 12:59:01 2010 (r215561) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sat Nov 20 13:12:59 2010 (r215562) @@ -263,9 +263,23 @@ struct iwn_softc { int calib_cnt; struct iwn_calib_state calib; + u_int calib_init; +#define IWN_CALIB_XTAL (1 << IWN_CALIB_IDX_XTAL) +#define IWN_CALIB_DC (1 << IWN_CALIB_IDX_DC) +#define IWN_CALIB_LO (1 << IWN_CALIB_IDX_LO) +#define IWN_CALIB_TX_IQ (1 << IWN_CALIB_IDX_TX_IQ) +#define IWN_CALIB_TX_IQ_PERIODIC (1 << IWN_CALIB_IDX_TX_IQ_PERIODIC) +#define IWN_CALIB_BASE_BAND (1 << IWN_CALIB_IDX_BASE_BAND) +#define IWN_CALIB_NUM 6 + struct iwn_calib_info calib_results[IWN_CALIB_NUM]; +#define IWN_CALIB_IDX_XTAL 0 +#define IWN_CALIB_IDX_DC 1 +#define IWN_CALIB_IDX_LO 2 +#define IWN_CALIB_IDX_TX_IQ 3 +#define IWN_CALIB_IDX_TX_IQ_PERIODIC 4 +#define IWN_CALIB_IDX_BASE_BAND 5 struct iwn_fw_info fw; - struct iwn_calib_info calibcmd[5]; uint32_t errptr; struct iwn_rx_stat last_rx_stat; @@ -284,7 +298,6 @@ struct iwn_softc { uint16_t rfcfg; uint8_t calib_ver; char eeprom_domain[4]; - uint32_t eeprom_crystal; int16_t eeprom_voltage; int8_t maxpwr2GHz; int8_t maxpwr5GHz; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:24:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BADC0106564A; Sat, 20 Nov 2010 13:24: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 A93078FC16; Sat, 20 Nov 2010 13:24: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 oAKDO5v0013290; Sat, 20 Nov 2010 13:24:05 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDO5mB013288; Sat, 20 Nov 2010 13:24:05 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201324.oAKDO5mB013288@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:24: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: r215563 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:24:05 -0000 Author: bschmidt Date: Sat Nov 20 13:24:05 2010 New Revision: 215563 URL: http://svn.freebsd.org/changeset/base/215563 Log: MFC r209092: Remove GNU-style struct initialization. Committed by: ed Modified: stable/8/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 13:12:59 2010 (r215562) +++ stable/8/sys/net80211/ieee80211_rssadapt.c Sat Nov 20 13:24:05 2010 (r215563) @@ -58,12 +58,12 @@ struct rssadapt_expavgctl { }; static struct rssadapt_expavgctl master_expavgctl = { - rc_decay_denom : 16, - rc_decay_old : 15, - rc_thresh_denom : 8, - rc_thresh_old : 4, - rc_avgrssi_denom : 8, - rc_avgrssi_old : 4 + .rc_decay_denom = 16, + .rc_decay_old = 15, + .rc_thresh_denom = 8, + .rc_thresh_old = 4, + .rc_avgrssi_denom = 8, + .rc_avgrssi_old = 4 }; #ifdef interpolate From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:26:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89EFA106564A; Sat, 20 Nov 2010 13:26: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 782328FC0A; Sat, 20 Nov 2010 13:26: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 oAKDQ9gs013388; Sat, 20 Nov 2010 13:26:09 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDQ9C7013386; Sat, 20 Nov 2010 13:26:09 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201326.oAKDQ9C7013386@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215564 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:26:09 -0000 Author: bschmidt Date: Sat Nov 20 13:26:09 2010 New Revision: 215564 URL: http://svn.freebsd.org/changeset/base/215564 Log: MFC r213321: Fix background roaming to actually work in AUTO roaming mode. IEEE80211_F_BGSCAN is a vap flag, not a channel flag. So although bgscan occured, sta_roam_check() would never be called. Committed by: adrian Modified: stable/8/sys/net80211/ieee80211_scan_sta.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_scan_sta.c Sat Nov 20 13:24:05 2010 (r215563) +++ stable/8/sys/net80211/ieee80211_scan_sta.c Sat Nov 20 13:26:09 2010 (r215564) @@ -1361,7 +1361,7 @@ sta_age(struct ieee80211_scan_state *ss) KASSERT(vap->iv_opmode == IEEE80211_M_STA, ("wrong mode %u", vap->iv_opmode)); if (vap->iv_roaming == IEEE80211_ROAMING_AUTO && - (vap->iv_ic->ic_flags & IEEE80211_F_BGSCAN) && + (vap->iv_flags & IEEE80211_F_BGSCAN) && vap->iv_state >= IEEE80211_S_RUN) /* XXX vap is implicit */ sta_roam_check(ss, vap); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:28:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07790106564A; Sat, 20 Nov 2010 13:28:15 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id 685278FC08; Sat, 20 Nov 2010 13:28:14 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id oAKDS8cF068295; Sat, 20 Nov 2010 22:28:10 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sat, 20 Nov 2010 22:28:08 +0900 (JST) Message-Id: <20101120.222808.162088883.nyan@FreeBSD.org> To: attilio@freebsd.org From: TAKAHASHI Yoshihiro In-Reply-To: References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:28:15 -0000 In article Attilio Rao writes: > r215545 might fix this, thanks a lot for reporting promptly. > > Jeeeeeez, I usually made the svn mv by hand rather than relying on > merging for STBALE_8, I would have kept to do that :/. It is still broken on pc98. Because __i386__ is also defined on pc98. --- TAKAHASHI Yoshihiro From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:28:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A56106567A; Sat, 20 Nov 2010 13:28:32 +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 A34268FC21; Sat, 20 Nov 2010 13:28: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 oAKDSWGo013501; Sat, 20 Nov 2010 13:28:32 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDSWf1013499; Sat, 20 Nov 2010 13:28:32 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201328.oAKDSWf1013499@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215565 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:28:32 -0000 Author: bschmidt Date: Sat Nov 20 13:28:32 2010 New Revision: 215565 URL: http://svn.freebsd.org/changeset/base/215565 Log: MFC r201793: Fix #ifdefs so that GCC 4.4 doesn't complain about it. Committed by: trasz Modified: stable/8/sys/net80211/ieee80211_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 13:26:09 2010 (r215564) +++ stable/8/sys/net80211/ieee80211_var.h Sat Nov 20 13:28:32 2010 (r215565) @@ -32,11 +32,11 @@ * Definitions for IEEE 802.11 drivers. */ /* NB: portability glue must go first */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) #include -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #include -#elif __linux__ +#elif defined(__linux__) #include #else #error "No support for your operating system!" From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 13:30:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796A9106564A; Sat, 20 Nov 2010 13:30:48 +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 67B988FC16; Sat, 20 Nov 2010 13:30: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 oAKDUm5T013593; Sat, 20 Nov 2010 13:30:48 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKDUmHX013591; Sat, 20 Nov 2010 13:30:48 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011201330.oAKDUmHX013591@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 20 Nov 2010 13:30: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: r215566 - stable/7/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 13:30:48 -0000 Author: bschmidt Date: Sat Nov 20 13:30:48 2010 New Revision: 215566 URL: http://svn.freebsd.org/changeset/base/215566 Log: MFC r201793: Fix #ifdefs so that GCC 4.4 doesn't complain about it. Committed by: trasz Modified: stable/7/sys/net80211/ieee80211_var.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/net80211/ieee80211_var.h ============================================================================== --- stable/7/sys/net80211/ieee80211_var.h Sat Nov 20 13:28:32 2010 (r215565) +++ stable/7/sys/net80211/ieee80211_var.h Sat Nov 20 13:30:48 2010 (r215566) @@ -35,11 +35,11 @@ #undef IEEE80211_DEBUG_REFCNT /* node refcnt stuff */ /* NB: portability glue must go first */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) #include -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #include -#elif __linux__ +#elif defined(__linux__) #include #else #error "No support for your operating system!" From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 14:14:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 963351065696; Sat, 20 Nov 2010 14:14:52 +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 84A7C8FC0A; Sat, 20 Nov 2010 14:14:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKEEqHF014687; Sat, 20 Nov 2010 14:14:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKEEqEE014679; Sat, 20 Nov 2010 14:14:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201414.oAKEEqEE014679@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 14:14: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: r215567 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 14:14:52 -0000 Author: jilles Date: Sat Nov 20 14:14:52 2010 New Revision: 215567 URL: http://svn.freebsd.org/changeset/base/215567 Log: sh: Code size optimizations to buffered output. This is mainly less use of the outc macro. No functional change is intended, but code size is about 2K less on i386. Modified: head/bin/sh/eval.c head/bin/sh/expand.c head/bin/sh/main.c head/bin/sh/options.c head/bin/sh/output.c head/bin/sh/output.h head/bin/sh/var.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/eval.c Sat Nov 20 14:14:52 2010 (r215567) @@ -699,13 +699,13 @@ evalcommand(union node *cmd, int flags, for (sp = varlist.list ; sp ; sp = sp->next) { if (sep != 0) out2c(' '); - p = sp->text; - while (*p != '=' && *p != '\0') - out2c(*p++); - if (*p != '\0') { - out2c(*p++); + p = strchr(sp->text, '='); + if (p != NULL) { + p++; + outbin(sp->text, p - sp->text, out2); out2qstr(p); - } + } else + out2qstr(sp->text); sep = ' '; } for (sp = arglist.list ; sp ; sp = sp->next) { Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/expand.c Sat Nov 20 14:14:52 2010 (r215567) @@ -1592,9 +1592,7 @@ wordexpcmd(int argc, char **argv) for (i = 1, len = 0; i < argc; i++) len += strlen(argv[i]); out1fmt("%08x", (int)len); - for (i = 1; i < argc; i++) { - out1str(argv[i]); - out1c('\0'); - } + for (i = 1; i < argc; i++) + outbin(argv[i], strlen(argv[i]) + 1, out1); return (0); } Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/main.c Sat Nov 20 14:14:52 2010 (r215567) @@ -128,10 +128,8 @@ main(int argc, char *argv[]) exitshell(exitstatus); } reset(); - if (exception == EXINT) { - out2c('\n'); - flushout(&errout); - } + if (exception == EXINT) + out2fmt_flush("\n"); popstackmark(&smark); FORCEINTON; /* enable interrupts */ if (state == 1) Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/options.c Sat Nov 20 14:14:52 2010 (r215567) @@ -261,13 +261,12 @@ minus_o(char *name, int val) optlist[i].val ? "on" : "off"); } else { /* Output suitable for re-input to shell. */ - for (i = 0; i < NOPTS; i++) { - if (i % 6 == 0) - out1str(i == 0 ? "set" : "\nset"); - out1fmt(" %co %s", optlist[i].val ? '-' : '+', - optlist[i].name); - } - out1c('\n'); + for (i = 0; i < NOPTS; i++) + out1fmt("%s %co %s%s", + i % 6 == 0 ? "set" : "", + optlist[i].val ? '-' : '+', + optlist[i].name, + i % 6 == 5 || i == NOPTS - 1 ? "\n" : ""); } } else { for (i = 0; i < NOPTS; i++) Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/output.c Sat Nov 20 14:14:52 2010 (r215567) @@ -96,6 +96,12 @@ RESET { void +outcslow(int c, struct output *file) +{ + outc(c, file); +} + +void out1str(const char *p) { outstr(p, out1); @@ -149,19 +155,19 @@ outqstr(const char *p, struct output *fi case '\'': /* Can't quote single quotes inside single quotes. */ if (inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 0; outstr("\\'", file); break; default: if (!inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 1; outc(ch, file); } } if (inquotes) - outc('\'', file); + outcslow('\'', file); } void Modified: head/bin/sh/output.h ============================================================================== --- head/bin/sh/output.h Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/output.h Sat Nov 20 14:14:52 2010 (r215567) @@ -54,6 +54,7 @@ extern struct output *out1; /* &memout i extern struct output *out2; /* &memout if backquote with 2>&1, otherwise &errout */ +void outcslow(int, struct output *); void out1str(const char *); void out1qstr(const char *); void out2str(const char *); @@ -74,7 +75,7 @@ int xwrite(int, const char *, int); #define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) #define out1c(c) outc(c, out1); -#define out2c(c) outc(c, out2); +#define out2c(c) outcslow(c, out2); #define OUTPUT_INCL #endif Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/var.c Sat Nov 20 14:14:52 2010 (r215567) @@ -633,10 +633,10 @@ showvarscmd(int argc __unused, char **ar qsort(vars, n, sizeof(*vars), var_compare); for (i = 0; i < n; i++) { - for (s = vars[i]; *s != '='; s++) - out1c(*s); - out1c('='); - out1qstr(s + 1); + s = strchr(vars[i], '='); + s++; + outbin(vars[i], s - vars[i], out1); + out1qstr(s); out1c('\n'); } ckfree(vars); @@ -710,12 +710,15 @@ found:; out1str(cmdname); out1c(' '); } - for (p = vp->text ; *p != '=' ; p++) - out1c(*p); + p = strchr(vp->text, '='); if (values && !(vp->flags & VUNSET)) { - out1c('='); - out1qstr(p + 1); - } + p++; + outbin(vp->text, p - vp->text, + out1); + out1qstr(p); + } else + outbin(vp->text, p - vp->text, + out1); out1c('\n'); } } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 14:30:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2467E106564A; Sat, 20 Nov 2010 14:30: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 137D98FC12; Sat, 20 Nov 2010 14: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 oAKEUS37015177; Sat, 20 Nov 2010 14:30:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKEUSDh015175; Sat, 20 Nov 2010 14:30:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201430.oAKEUSDh015175@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 14:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215568 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 14:30:29 -0000 Author: jilles Date: Sat Nov 20 14:30:28 2010 New Revision: 215568 URL: http://svn.freebsd.org/changeset/base/215568 Log: sh: Remove the check that alpha/name/in_name chars are not CTL* bytes. Since is_alpha/is_name/is_in_name were made ASCII-only, this can no longer happen. Additionally, the check was wrong because it did not include the new CTLQUOTEEND. Modified: head/bin/sh/mksyntax.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Sat Nov 20 14:14:52 2010 (r215567) +++ head/bin/sh/mksyntax.c Sat Nov 20 14:30:28 2010 (r215568) @@ -342,9 +342,9 @@ print(const char *name) static const char *macro[] = { "#define is_digit(c)\t((is_type+SYNBASE)[(int)c] & ISDIGIT)", "#define is_eof(c)\t((c) == PEOF)", - "#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))", - "#define is_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))", - "#define is_in_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))", + "#define is_alpha(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))", + "#define is_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))", + "#define is_in_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))", "#define is_special(c)\t((is_type+SYNBASE)[(int)c] & (ISSPECL|ISDIGIT))", NULL }; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 15:22:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070B8106564A; Sat, 20 Nov 2010 15:22:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFD878FC19; Sat, 20 Nov 2010 15:22: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 oAKFMGGh016692; Sat, 20 Nov 2010 15:22:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKFMGTD016690; Sat, 20 Nov 2010 15:22:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011201522.oAKFMGTD016690@svn.freebsd.org> From: Kevin Lo Date: Sat, 20 Nov 2010 15:22: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: r215569 - head/usr.bin/vmstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 15:22:17 -0000 Author: kevlo Date: Sat Nov 20 15:22:16 2010 New Revision: 215569 URL: http://svn.freebsd.org/changeset/base/215569 Log: Remove unused variable Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Sat Nov 20 14:30:28 2010 (r215568) +++ head/usr.bin/vmstat/vmstat.c Sat Nov 20 15:22:16 2010 (r215569) @@ -428,7 +428,7 @@ fill_pcpu(struct pcpu ***pcpup, int* max { struct pcpu **pcpu; - int maxcpu, size, i; + int maxcpu, i; *pcpup = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 16:03:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6C2106566C; Sat, 20 Nov 2010 16:03:53 +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 7815A8FC12; Sat, 20 Nov 2010 16:03: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 oAKG3rSi017859; Sat, 20 Nov 2010 16:03:53 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKG3rED017856; Sat, 20 Nov 2010 16:03:53 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201011201603.oAKG3rED017856@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sat, 20 Nov 2010 16:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215570 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:03:53 -0000 Author: ae Date: Sat Nov 20 16:03:53 2010 New Revision: 215570 URL: http://svn.freebsd.org/changeset/base/215570 Log: Add to gpart(8) an ability to backup partition table and restore it from given backup. Discussed with: geom@ Approved by: kib (mentor) MFC after: 1 week Modified: head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Sat Nov 20 15:22:16 2010 (r215569) +++ head/sbin/geom/class/part/geom_part.c Sat Nov 20 16:03:53 2010 (r215570) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -85,6 +86,8 @@ static int gpart_show_hasopt(struct gctl static void gpart_write_partcode(struct ggeom *, int, void *, ssize_t); static void gpart_write_partcode_vtoc8(struct ggeom *, int, void *); static void gpart_print_error(const char *); +static void gpart_backup(struct gctl_req *, unsigned int); +static void gpart_restore(struct gctl_req *, unsigned int); struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { @@ -97,6 +100,11 @@ struct g_command PUBSYM(class_commands)[ G_OPT_SENTINEL }, "[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom" }, + { "backup", 0, gpart_backup, { + { 'l', "backup_labels", NULL, G_TYPE_BOOL}, + G_OPT_SENTINEL }, + "[-l] geom" + }, { "bootcode", 0, gpart_bootcode, { { 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, { 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, @@ -165,6 +173,12 @@ struct g_command PUBSYM(class_commands)[ G_OPT_SENTINEL }, "[-s size] -i index [-f flags] geom" }, + { "restore", 0, gpart_restore, { + { 'F', "force", NULL, G_TYPE_BOOL }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, + G_OPT_SENTINEL }, + "[-F] [-f flags] provider [...]" + }, { "recover", 0, gpart_issue, { { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -654,6 +668,295 @@ gpart_show(struct gctl_req *req, unsigne geom_deletetree(&mesh); } +static void +gpart_backup(struct gctl_req *req, unsigned int fl __unused) +{ + struct gmesh mesh; + struct gclass *classp; + struct gprovider *pp; + struct ggeom *gp; + const char *s, *scheme; + off_t sector, end; + off_t length, secsz; + int error, labels, i, windex, wblocks, wtype; + + if (gctl_get_int(req, "nargs") != 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + s = gctl_get_ascii(req, "arg0"); + if (s == NULL) + abort(); + labels = gctl_get_int(req, "backup_labels"); + gp = find_geom(classp, s); + if (gp == NULL) + errx(EXIT_FAILURE, "No such geom: %s.", s); + scheme = find_geomcfg(gp, "scheme"); + if (scheme == NULL) + abort(); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + secsz = pp->lg_sectorsize; + s = find_geomcfg(gp, "last"); + wblocks = strlen(s); + wtype = 0; + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + s = find_provcfg(pp, "type"); + i = strlen(s); + if (i > wtype) + wtype = i; + } + s = find_geomcfg(gp, "entries"); + windex = strlen(s); + printf("%s %s\n", scheme, s); + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + s = find_provcfg(pp, "start"); + if (s == NULL) { + s = find_provcfg(pp, "offset"); + sector = (off_t)strtoimax(s, NULL, 0) / secsz; + } else + sector = (off_t)strtoimax(s, NULL, 0); + + s = find_provcfg(pp, "end"); + if (s == NULL) { + s = find_provcfg(pp, "length"); + length = (off_t)strtoimax(s, NULL, 0) / secsz; + } else { + end = (off_t)strtoimax(s, NULL, 0); + length = end - sector + 1; + } + s = find_provcfg(pp, "label"); + printf("%-*s %*s %*jd %*jd", + windex, find_provcfg(pp, "index"), + wtype, find_provcfg(pp, "type"), + wblocks, (intmax_t)sector, + wblocks, (intmax_t)length); + if (labels && s != NULL) + printf(" %s", s); + printf(" %s\n", fmtattrib(pp)); + } + geom_deletetree(&mesh); +} + +static int +skip_line(const char *p) +{ + + while (*p != '\0') { + if (*p == '#') + return (1); + if (isspace(*p) == 0) + return (0); + p++; + } + return (1); +} + +static void +gpart_restore(struct gctl_req *req, unsigned int fl __unused) +{ + struct gmesh mesh; + struct gclass *classp; + struct gctl_req *r; + struct ggeom *gp; + const char *s, *flags, *errstr, *label; + char **ap, *argv[6], line[BUFSIZ], *pline; + int error, forced, i, l, nargs, created; + intmax_t n; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); + + forced = gctl_get_int(req, "force"); + flags = gctl_get_ascii(req, "flags"); + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + if (forced) { + /* destroy existent partition table before restore */ + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + gp = find_geom(classp, s); + if (gp != NULL) { + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, + classp->lg_name); + gctl_ro_param(r, "verb", -1, "destroy"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, "force", sizeof(forced), + &forced); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + } + created = 0; + while (fgets(line, sizeof(line) - 1, stdin)) { + /* Format of backup entries: + * + * [label] ['['attrib[,attrib]']'] + */ + pline = (char *)line; + pline[strlen(line) - 1] = 0; + if (skip_line(pline)) + continue; + for (ap = argv; + (*ap = strsep(&pline, " \t")) != NULL;) + if (**ap != '\0' && ++ap >= &argv[6]) + break; + l = ap - &argv[0]; + label = pline = NULL; + if (l == 2) { /* create table */ + if (created) + errx(EXIT_FAILURE, "Incorrect backup format."); + n = atoi(argv[1]); + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + n = strtoimax(argv[1], NULL, 0); + gctl_ro_param(r, "class", -1, + classp->lg_name); + gctl_ro_param(r, "verb", -1, "create"); + gctl_ro_param(r, "scheme", -1, argv[0]); + gctl_ro_param(r, "entries", sizeof(n), &n); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + created = 1; + continue; + } else if (l < 4 || created == 0) + errx(EXIT_FAILURE, "Incorrect backup format."); + else if (l == 5) { + if (strchr(argv[4], '[') == NULL) + label = argv[4]; + else + pline = argv[4]; + } else if (l == 6) { + label = argv[4]; + pline = argv[5]; + } + /* Add partitions to each table */ + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + n = strtoimax(argv[0], NULL, 0); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "add"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, GPART_PARAM_INDEX, sizeof(n), &n); + gctl_ro_param(r, "type", -1, argv[1]); + gctl_ro_param(r, "start", -1, argv[2]); + gctl_ro_param(r, "size", -1, argv[3]); + if (label != NULL) + gctl_ro_param(r, "label", -1, argv[4]); + gctl_ro_param(r, "arg0", -1, s); + error = gpart_autofill(r); + if (error != 0) + errc(EXIT_FAILURE, error, "autofill"); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + if (pline == NULL || *pline != '[') + continue; + /* set attributes */ + pline++; + for (ap = argv; + (*ap = strsep(&pline, ",]")) != NULL;) + if (**ap != '\0' && ++ap >= &argv[6]) + break; + for (i = 0; i < nargs; i++) { + l = ap - &argv[0]; + s = gctl_get_ascii(req, "arg%d", i); + while (l > 0) { + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "set"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, GPART_PARAM_INDEX, + sizeof(n), &n); + gctl_ro_param(r, "attrib", -1, argv[--l]); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + } + /* commit changes if needed */ + if (strchr(flags, 'C') != NULL) { + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "commit"); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + gctl_free(req); + geom_deletetree(&mesh); + exit(EXIT_SUCCESS); + +backout: + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "undo"); + gctl_ro_param(r, "arg0", -1, s); + gctl_issue(r); + gctl_free(r); + } + gctl_free(req); + geom_deletetree(&mesh); + exit(EXIT_FAILURE); +} + static void * gpart_bootfile_read(const char *bootfile, ssize_t *size) { Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Sat Nov 20 15:22:16 2010 (r215569) +++ head/sbin/geom/class/part/gpart.8 Sat Nov 20 16:03:53 2010 (r215570) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2010 +.Dd November 20, 2010 .Dt GPART 8 .Os .Sh NAME @@ -91,6 +91,11 @@ utility: .Op Fl l Ar label .Op Fl f Ar flags .Ar geom +.\" ==== BACKUP ==== +.Nm +.Cm backup +.Op Fl l +.Ar geom .\" ==== BOOTCODE ==== .Nm .Cm bootcode @@ -141,6 +146,13 @@ utility: .Op Fl s Ar size .Op Fl f Ar flags .Ar geom +.\" ==== RESTORE ==== +.Nm +.Cm restore +.Op Fl F +.Op Fl f Ar flags +.Ar provider +.Op Ar ... .\" ==== SET ==== .Nm .Cm set @@ -208,6 +220,17 @@ See the section entitled below for a discussion about its use. .El +.\" ==== BACKUP ==== +.It Cm backup +Dump a partition table to standard output in special format used by +.Cm restore +action. +.Pp +Additional options include: +.Bl -tag -width 10n +.It Fl l +Dump partition labels for partitioning schemes that support them. +.El .\" ==== BOOTCODE ==== .It Cm bootcode Embed bootstrap code into the partitioning scheme's metadata on the @@ -401,6 +424,28 @@ See the section entitled below for a discussion about its use. .El +.\" ==== RESTORE ==== +.It Cm restore +Restore the partition table from backup previously created by +.Cm backup +action and given from standard input. Only partition table +may be restored. This action does not affect content of partitions. +This mean that you should copy your data from backup after restoring +partition table and write bootcode again if it is needed. +.Pp +Additional options include: +.Bl -tag -width 10n +.It Fl F +Destroy partition table on the given +.Ar provider +before doing restore. +.It Fl f Ar flags +Additional operational flags. +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion +about its use. +.El .\" ==== SET ==== .It Cm set Set the named attribute on the partition entry. @@ -770,6 +815,28 @@ After having created all required partit .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 .Ed +.Pp +Create backup of partition table from +.Pa da0 +.Bd -literal -offset indent +/sbin/gpart backup -l da0 > da0.backup +.Ed +.Pp +Restore partition table from backup to +.Pa da0 +.Bd -literal -offset indent +/sbin/gpart restore da0 < /mnt/da0.backup +.Ed +.Pp +Clone partition table from +.Pa ada0 +to +.Pa ada1 +and +.Pa ada2 +.Bd -literal -offset indent +/sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2 +.Ed .Sh SEE ALSO .Xr dd 1 , .Xr geom 4 , From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 16:42:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C237D1065670; Sat, 20 Nov 2010 16:42:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0B238FC08; Sat, 20 Nov 2010 16:42: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 oAKGgJao018900; Sat, 20 Nov 2010 16:42:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKGgJ7L018898; Sat, 20 Nov 2010 16:42:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011201642.oAKGgJ7L018898@svn.freebsd.org> From: Andriy Gapon Date: Sat, 20 Nov 2010 16:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215571 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:42:19 -0000 Author: avg Date: Sat Nov 20 16:42:19 2010 New Revision: 215571 URL: http://svn.freebsd.org/changeset/base/215571 Log: fix a mismerge in r215521: MFC imports of ACPICA revisions 20100428 through 20101013 The mismerge resulted in ia64 build breakage. This is a direct commit. Pointyhat to: avg Modified: stable/8/sys/dev/acpica/acpi.c Modified: stable/8/sys/dev/acpica/acpi.c ============================================================================== --- stable/8/sys/dev/acpica/acpi.c Sat Nov 20 16:03:53 2010 (r215570) +++ stable/8/sys/dev/acpica/acpi.c Sat Nov 20 16:42:19 2010 (r215571) @@ -2314,6 +2314,7 @@ acpi_sleep_force(void *arg) int acpi_ReqSleepState(struct acpi_softc *sc, int state) { +#if defined(__amd64__) || defined(__i386__) #if defined(__i386__) struct apm_clone_data *clone; #endif @@ -2326,7 +2327,6 @@ acpi_ReqSleepState(struct acpi_softc *sc ACPI_LOCK(acpi); -#if defined(__amd64__) || defined(__i386__) /* If a suspend request is already in progress, just return. */ if (sc->acpi_next_sstate != 0) { ACPI_UNLOCK(acpi); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 16:46:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2466106566B; Sat, 20 Nov 2010 16:46:16 +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 A0E988FC14; Sat, 20 Nov 2010 16:46: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 oAKGkGTG019087; Sat, 20 Nov 2010 16:46:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKGkGW7019085; Sat, 20 Nov 2010 16:46:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201646.oAKGkGW7019085@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 16:46: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: r215572 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:46:16 -0000 Author: jilles Date: Sat Nov 20 16:46:16 2010 New Revision: 215572 URL: http://svn.freebsd.org/changeset/base/215572 Log: MFC r215183: Make POLL_ERR and POLL_HUP different. The kernel currently does not generate any of the POLL_* constants, but some applications use them and break if they are not all distinct. PR: kern/126076 Modified: stable/8/sys/sys/signal.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/signal.h ============================================================================== --- stable/8/sys/sys/signal.h Sat Nov 20 16:42:19 2010 (r215571) +++ stable/8/sys/sys/signal.h Sat Nov 20 16:46:16 2010 (r215572) @@ -283,7 +283,7 @@ typedef struct __siginfo { #define POLL_MSG 3 /* Input message available */ #define POLL_ERR 4 /* I/O Error */ #define POLL_PRI 5 /* High priority input available */ -#define POLL_HUP 4 /* Device disconnected */ +#define POLL_HUP 6 /* Device disconnected */ #endif From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 16:56:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB8E106566C; Sat, 20 Nov 2010 16:56: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 B975C8FC16; Sat, 20 Nov 2010 16:56: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 oAKGud1m019441; Sat, 20 Nov 2010 16:56:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKGudSQ019439; Sat, 20 Nov 2010 16:56:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201656.oAKGudSQ019439@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 16:56:39 +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: r215573 - in stable/7: bin/test tools/regression/bin tools/regression/bin/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:56:39 -0000 Author: jilles Date: Sat Nov 20 16:56:39 2010 New Revision: 215573 URL: http://svn.freebsd.org/changeset/base/215573 Log: MFC r215022: test: Move tests to tools/regression/bin/test. Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh). Added: stable/7/tools/regression/bin/test/ - copied from r215022, head/tools/regression/bin/test/ Deleted: stable/7/bin/test/TEST.README stable/7/bin/test/TEST.csh stable/7/bin/test/TEST.sh Modified: stable/7/tools/regression/bin/Makefile Directory Properties: stable/7/bin/test/ (props changed) stable/7/tools/regression/bin/ (props changed) stable/7/tools/regression/bin/sh/ (props changed) Modified: stable/7/tools/regression/bin/Makefile ============================================================================== --- stable/7/tools/regression/bin/Makefile Sat Nov 20 16:46:16 2010 (r215572) +++ stable/7/tools/regression/bin/Makefile Sat Nov 20 16:56:39 2010 (r215573) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= date mv pax sh +SUBDIR= date mv pax sh test .include From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 17:27:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD87E106566C; Sat, 20 Nov 2010 17:27:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACE2F8FC12; Sat, 20 Nov 2010 17:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKHRcD5020182; Sat, 20 Nov 2010 17:27:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKHRcCi020180; Sat, 20 Nov 2010 17:27:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011201727.oAKHRcCi020180@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Nov 2010 17:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215574 - 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, 20 Nov 2010 17:27:38 -0000 Author: kib Date: Sat Nov 20 17:27:38 2010 New Revision: 215574 URL: http://svn.freebsd.org/changeset/base/215574 Log: The runlen returned from vm_pageout_flush() might be zero legitimately, when mreq page has status VM_PAGER_AGAIN. MFC after: 5 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Nov 20 16:56:39 2010 (r215573) +++ head/sys/vm/vm_object.c Sat Nov 20 17:27:38 2010 (r215574) @@ -820,7 +820,6 @@ rescan: continue; n = vm_object_page_collect_flush(object, p, pagerflags); - KASSERT(n > 0, ("vm_object_page_collect_flush failed")); if (object->generation != curgeneration) goto rescan; np = vm_page_find_least(object, pi + n); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 18:24:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6C21065673; Sat, 20 Nov 2010 18:24:09 +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 BAE798FC13; Sat, 20 Nov 2010 18:24: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 oAKIO9g0021443; Sat, 20 Nov 2010 18:24:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKIO95j021441; Sat, 20 Nov 2010 18:24:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011201824.oAKIO95j021441@svn.freebsd.org> From: Attilio Rao Date: Sat, 20 Nov 2010 18:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215575 - stable/8/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:24:09 -0000 Author: attilio Date: Sat Nov 20 18:24:09 2010 New Revision: 215575 URL: http://svn.freebsd.org/changeset/base/215575 Log: Add a second fix-up for the PC98 case. PC98 cases might be explicit in presence of a difference with i386 because both are defined, leading to mishandling of code in circumstances like this. Reported by: nyan Modified: stable/8/sys/x86/x86/nexus.c Modified: stable/8/sys/x86/x86/nexus.c ============================================================================== --- stable/8/sys/x86/x86/nexus.c Sat Nov 20 17:27:38 2010 (r215574) +++ stable/8/sys/x86/x86/nexus.c Sat Nov 20 18:24:09 2010 (r215575) @@ -76,12 +76,12 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ISA #include -#ifdef __amd64__ +#ifdef PC98 +#include +#elif defined(__amd64__) #include -#elif defined(__i386__) -#include #else -#include +#include #endif #endif #include From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 18:24:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E517F106564A; Sat, 20 Nov 2010 18:24:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6CB8FC1D; Sat, 20 Nov 2010 18:24:54 +0000 (UTC) Received: by qwf6 with SMTP id 6so128583qwf.13 for ; Sat, 20 Nov 2010 10:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=K0Vjp5UtiZA/SLjDHQmAK/bc09F4hdKD2tYGaXN5FlI=; b=UuRMeFv5DrIw01EoY98Kb6R+0no4jcP+8upu/uaIXDUlhERQ0+dDjaGVvA30OUSPni bhh39X9owzTebk+xOSSRZ1icUjJEheA9U/KWOXxyt7BKLvDfOyjCRuAXRtpHPot5vs4T IIdoyq2iiVtBJXCbWAxLco3pkMu3FkIfGsRMs= 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=NyvUupnnscYrMnMHOEYeGDKk2ibjFZJ3hDTRbEzvV/izdRT5YqBillTcR+LpP1wZ8a 7i+3XU+9a5B+6uEipPT71l7OEi1uVoVS0vLxQGg6aWe/Gy8TX8fGb8OX2BqjLg0qhzwb Lz2MSe1yIHysHq2eSzEih/VmsBbFfDId6EAdo= MIME-Version: 1.0 Received: by 10.229.236.83 with SMTP id kj19mr3198278qcb.218.1290277494435; Sat, 20 Nov 2010 10:24:54 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Sat, 20 Nov 2010 10:24:54 -0800 (PST) In-Reply-To: <20101120.222808.162088883.nyan@FreeBSD.org> References: <201011191749.oAJHnGl1083487@svn.freebsd.org> <20101119194712.GS2392@deviant.kiev.zoral.com.ua> <20101120.222808.162088883.nyan@FreeBSD.org> Date: Sat, 20 Nov 2010 13:24:54 -0500 X-Google-Sender-Auth: GPRQ75CkdfvQ3Qe83aX7oBlZjf0 Message-ID: From: Attilio Rao To: TAKAHASHI Yoshihiro Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: kostikbel@gmail.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r215539 - in stable/8/sys: amd64/amd64 conf i386/i386 pc98/include pc98/pc98 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:24:56 -0000 2010/11/20 TAKAHASHI Yoshihiro : > In article > Attilio Rao writes: > >> r215545 might fix this, thanks a lot for reporting promptly. >> >> Jeeeeeez, I usually made the svn mv by hand rather than relying on >> merging for STBALE_8, I would have kept to do that :/. > > It is still broken on pc98. =C2=A0Because __i386__ is also defined on pc9= 8. > Sigh. Hopefully r215575 may fix this. Sorry for the mis-service. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 18:40:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1B98106566B; Sat, 20 Nov 2010 18:40:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0B5D8FC1D; Sat, 20 Nov 2010 18:40: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 oAKIeoXH021855; Sat, 20 Nov 2010 18:40:50 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKIeoOH021853; Sat, 20 Nov 2010 18:40:50 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201011201840.oAKIeoOH021853@svn.freebsd.org> From: Kirk McKusick Date: Sat, 20 Nov 2010 18:40: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: r215576 - in head: sbin/mount sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:40:51 -0000 Author: mckusick Date: Sat Nov 20 18:40:50 2010 New Revision: 215576 URL: http://svn.freebsd.org/changeset/base/215576 Log: Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant. Drop reference to it in mount(8). MFC: 3 days Deleted: head/sys/ufs/ffs/README.snapshot Modified: head/sbin/mount/mount.8 Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Sat Nov 20 18:24:09 2010 (r215575) +++ head/sbin/mount/mount.8 Sat Nov 20 18:40:50 2010 (r215576) @@ -305,9 +305,6 @@ When you are done with the mounted snaps umount /mnt mdconfig -d -u 4 .Ed -.Pp -Further details can be found in the file at -.Pa /usr/src/sys/ufs/ffs/README.snapshot . .El .It Cm suiddir A directory on the mounted file system will respond to the SUID bit From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:23:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75544106566B; Sat, 20 Nov 2010 19:23:16 +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 6420A8FC15; Sat, 20 Nov 2010 19: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 oAKJNGkw022984; Sat, 20 Nov 2010 19:23:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJNG2t022982; Sat, 20 Nov 2010 19:23:16 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011201923.oAKJNG2t022982@svn.freebsd.org> From: Andreas Tobler Date: Sat, 20 Nov 2010 19:23: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: r215577 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:23:16 -0000 Author: andreast Date: Sat Nov 20 19:23:16 2010 New Revision: 215577 URL: http://svn.freebsd.org/changeset/base/215577 Log: Check the OF_getprop() return value before proceeding. Allocate only as much space as needed for the mode buffer. Use strcmp, relying on OF giving back NULL terminated strings. Submitted by: marius Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/openfirm.c Modified: head/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.c Sat Nov 20 18:40:50 2010 (r215576) +++ head/sys/boot/ofw/libofw/openfirm.c Sat Nov 20 19:23:16 2010 (r215577) @@ -77,7 +77,7 @@ void OF_init(int (*openfirm)(void *)) { phandle_t options; - char mode[8]; + char mode[sizeof("true")]; openfirmware = openfirm; @@ -93,13 +93,13 @@ OF_init(int (*openfirm)(void *)) if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); - /* + /* * Check if we run in real mode. If so, we do not need to map * memory later on. */ options = OF_finddevice("/options"); - OF_getprop(options, "real-mode?", mode, sizeof(mode)); - if (strncmp(mode, "true", 4) == 0) + if (OF_getprop(options, "real-mode?", mode, sizeof(mode)) > 0 && + strcmp(mode, "true") == 0) real_mode = 1; } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:26:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3BF31065693; Sat, 20 Nov 2010 19:26:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 919B88FC19; Sat, 20 Nov 2010 19:26: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 oAKJQZvE023102; Sat, 20 Nov 2010 19:26:35 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJQZWr023100; Sat, 20 Nov 2010 19:26:35 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201926.oAKJQZWr023100@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215578 - 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: Sat, 20 Nov 2010 19:26:35 -0000 Author: tuexen Date: Sat Nov 20 19:26:35 2010 New Revision: 215578 URL: http://svn.freebsd.org/changeset/base/215578 Log: MFC r214876 * Fix an accounting bug regarding SACK/NR-SACK chunks. * Fix the generation of the SACK/NR-SACK gap lists. Modified: stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 19:23:16 2010 (r215577) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 19:26:35 2010 (r215578) @@ -9927,7 +9927,7 @@ sctp_send_sack(struct sctp_tcb *stcb) caddr_t limit; uint32_t *dup; int limit_reached = 0; - unsigned int i, sel_start, siz, j, starting_index; + unsigned int i, sel_start, siz, j; unsigned int num_gap_blocks = 0, num_nr_gap_blocks = 0, space; int num_dups = 0; int space_req; @@ -9954,7 +9954,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (chk->rec.chunk_id.id == type) { /* Hmm, found a sack already on queue, remove it */ TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); - asoc->ctrl_queue_cnt++; + asoc->ctrl_queue_cnt--; a_chk = chk; if (a_chk->data) { sctp_m_freem(a_chk->data); @@ -9993,15 +9993,13 @@ sctp_send_sack(struct sctp_tcb *stcb) a_chk->whoTo = NULL; if ((asoc->numduptsns) || - (asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE) - ) { + (asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE)) { /*- * Ok, we have some duplicates or the destination for the * sack is unreachable, lets see if we can select an * alternate than asoc->last_data_chunk_from */ - if ((!(asoc->last_data_chunk_from->dest_state & - SCTP_ADDR_NOT_REACHABLE)) && + if ((!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_NOT_REACHABLE)) && (asoc->used_alt_onsack > asoc->numnets)) { /* We used an alt last time, don't this time */ a_chk->whoTo = NULL; @@ -10120,53 +10118,25 @@ sctp_send_sack(struct sctp_tcb *stcb) } } - if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { - offset = 1; - /*- - * The base TSN is intialized to be the first TSN the peer - * will send us. If the cum-ack is behind this then when they - * send us the next in sequence it will mark the base_tsn bit. - * Thus we need to use the very first selector and the offset - * is 1. Our table is built for this case. - */ - starting_index = 0; + if (((type == SCTP_SELECTIVE_ACK) && + (((asoc->mapping_array[0] | asoc->nr_mapping_array[0]) & 0x01) == 0x00)) || + ((type == SCTP_NR_SELECTIVE_ACK) && + ((asoc->mapping_array[0] & 0x01) == 0x00))) { sel_start = 0; } else { - /*- - * we skip the first selector when the cum-ack is at or above the - * mapping array base. This is because the bits at the base or above - * are turned on and our first selector in the table assumes they are - * off. We thus will use the second selector (first is 0). We use - * the reverse of our macro to fix the offset, in bits, that our - * table is at. Note that this method assumes that the cum-tsn is - * within the first bit, i.e. its value is 0-7 which means the - * result to our offset will be either a 0 - -7. If the cumack - * is NOT in the first byte (0) (which it should be since we did - * a mapping array slide above) then we need to calculate the starting - * index i.e. which byte of the mapping array we should start at. We - * do this by dividing by 8 and pushing the remainder (mod) into offset. - * then we multiply the offset to be negative, since we need a negative - * offset into the selector table. - */ - SCTP_CALC_TSN_TO_GAP(offset, asoc->cumulative_tsn, asoc->mapping_array_base_tsn); - if (offset > 7) { - starting_index = offset / 8; - offset = offset % 8; - printf("Strange starting index is %d offset:%d (not 0/x)\n", - starting_index, offset); - } else { - starting_index = 0; - } - /* We need a negative offset in our table */ - offset *= -1; sel_start = 1; } + if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { + offset = 1; + } else { + offset = asoc->mapping_array_base_tsn - asoc->cumulative_tsn; + } if (((type == SCTP_SELECTIVE_ACK) && compare_with_wrap(highest_tsn, asoc->cumulative_tsn, MAX_TSN)) || ((type == SCTP_NR_SELECTIVE_ACK) && compare_with_wrap(asoc->highest_tsn_inside_map, asoc->cumulative_tsn, MAX_TSN))) { /* we have a gap .. maybe */ - for (i = starting_index; i < siz; i++) { + for (i = 0; i < siz; i++) { if (type == SCTP_SELECTIVE_ACK) { selector = &sack_array[asoc->mapping_array[i] | asoc->nr_mapping_array[i]]; } else { @@ -10224,25 +10194,21 @@ sctp_send_sack(struct sctp_tcb *stcb) mergeable = 0; - if (asoc->highest_tsn_inside_nr_map > asoc->mapping_array_base_tsn) + if (asoc->highest_tsn_inside_nr_map > asoc->mapping_array_base_tsn) { siz = (((asoc->highest_tsn_inside_nr_map - asoc->mapping_array_base_tsn) + 1) + 7) / 8; - else + } else { siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + asoc->highest_tsn_inside_nr_map + 7) / 8; + } + if ((asoc->nr_mapping_array[0] & 0x01) == 0x00) { + sel_start = 0; + } else { + sel_start = 1; + } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; - /*- - * cum-ack behind the mapping array, so we start and use all - * entries. - */ - sel_start = 0; } else { offset = asoc->mapping_array_base_tsn - asoc->cumulative_tsn; - /*- - * we skip the first one when the cum-ack is at or above the - * mapping array base. Note this only works if - */ - sel_start = 1; } if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->cumulative_tsn, MAX_TSN)) { /* we have a gap .. maybe */ From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:29:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 531B21065670; Sat, 20 Nov 2010 19:29:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41AB68FC08; Sat, 20 Nov 2010 19:29: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 oAKJTJH5023236; Sat, 20 Nov 2010 19:29:19 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJTJcn023234; Sat, 20 Nov 2010 19:29:19 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201929.oAKJTJcn023234@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215579 - 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: Sat, 20 Nov 2010 19:29:19 -0000 Author: tuexen Date: Sat Nov 20 19:29:18 2010 New Revision: 215579 URL: http://svn.freebsd.org/changeset/base/215579 Log: MFC r214877: Do not resend DATA chunks without delay when dropped by the peer and the CRC was correct. Modified: stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:26:35 2010 (r215578) +++ stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:29:18 2010 (r215579) @@ -3115,6 +3115,10 @@ process_chunk_drop(struct sctp_tcb *stcb if ((tp1) && (tp1->sent < SCTP_DATAGRAM_ACKED)) { uint8_t *ddp; + if (((flg & SCTP_BADCRC) == 0) && + ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { + return (0); + } if ((stcb->asoc.peers_rwnd == 0) && ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { SCTP_STAT_INCR(sctps_pdrpdiwnp); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:31:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2738106566B; Sat, 20 Nov 2010 19:31:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C09DE8FC12; Sat, 20 Nov 2010 19:31:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJVV6U023338; Sat, 20 Nov 2010 19:31:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJVVSm023334; Sat, 20 Nov 2010 19:31:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201931.oAKJVVSm023334@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215580 - 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: Sat, 20 Nov 2010 19:31:32 -0000 Author: tuexen Date: Sat Nov 20 19:31:31 2010 New Revision: 215580 URL: http://svn.freebsd.org/changeset/base/215580 Log: MFC r214918: Not only stop all timers when entering the SHUTDOWN_SENT state, but also when entering the SHUTDOWN_ACK_SENT state. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctp_indata.c Sat Nov 20 19:31:31 2010 (r215580) @@ -4369,7 +4369,7 @@ again: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, asoc->primary_destination); } @@ -5081,7 +5081,7 @@ done_with_it: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, asoc->primary_destination); return; Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctp_input.c Sat Nov 20 19:31:31 2010 (r215580) @@ -908,9 +908,7 @@ sctp_handle_shutdown(struct sctp_shutdow } SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT); SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); - /* start SHUTDOWN timer */ + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net); } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:29:18 2010 (r215579) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:31:31 2010 (r215580) @@ -725,6 +725,31 @@ sctp_audit_log(uint8_t ev, uint8_t fd) #endif /* + * sctp_stop_timers_for_shutdown() should be called + * when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT + * state to make sure that all timers are stopped. + */ +void +sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) +{ + struct sctp_association *asoc; + struct sctp_nets *net; + + asoc = &stcb->asoc; + + (void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); + (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); + TAILQ_FOREACH(net, &asoc->nets, sctp_next) { + (void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer); + (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); + } +} + +/* * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ @@ -749,26 +774,6 @@ static int sctp_mtu_sizes[] = { 65535 }; -void -sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) -{ - struct sctp_association *asoc; - struct sctp_nets *net; - - asoc = &stcb->asoc; - - (void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - } -} - int find_next_best_mtu(int totsz) { From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:33:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7745106564A; Sat, 20 Nov 2010 19:33:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C58568FC1D; Sat, 20 Nov 2010 19:33: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 oAKJXgOO023440; Sat, 20 Nov 2010 19:33:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJXgi9023438; Sat, 20 Nov 2010 19:33:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201933.oAKJXgi9023438@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215581 - 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: Sat, 20 Nov 2010 19:33:43 -0000 Author: tuexen Date: Sat Nov 20 19:33:42 2010 New Revision: 215581 URL: http://svn.freebsd.org/changeset/base/215581 Log: MFC r214928: * Use exponential backoff for retransmission of SHUTDOWN and SHUTDOWN-ACK chunks. * While there, do some cleanups. Modified: stable/8/sys/netinet/sctp_timer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:31:31 2010 (r215580) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:33:42 2010 (r215581) @@ -291,6 +291,10 @@ sctp_threshold_management(struct sctp_in return (0); } +/* + * sctp_find_alternate_net() returns a non-NULL pointer as long + * the argument net is non-NULL. + */ struct sctp_nets * sctp_find_alternate_net(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -440,8 +444,7 @@ sctp_find_alternate_net(struct sctp_tcb else if (mode == 1) { TAILQ_FOREACH(mnet, &stcb->asoc.nets, sctp_next) { if (((mnet->dest_state & SCTP_ADDR_REACHABLE) != SCTP_ADDR_REACHABLE) || - (mnet->dest_state & SCTP_ADDR_UNCONFIRMED) - ) { + (mnet->dest_state & SCTP_ADDR_UNCONFIRMED)) { /* * will skip ones that are not-reachable or * unconfirmed @@ -505,12 +508,10 @@ sctp_find_alternate_net(struct sctp_tcb } alt->src_addr_selected = 0; } - if ( - ((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && - (alt->ro.ro_rt != NULL) && /* sa_ignore NO_NULL_CHK */ - (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED)) - ) { + if (((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && + (alt->ro.ro_rt != NULL) && + (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED))) { /* Found a reachable address */ break; } @@ -549,8 +550,6 @@ sctp_find_alternate_net(struct sctp_tcb return (alt); } - - static void sctp_backoff_on_timeout(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -1021,8 +1020,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, * used, then pick dest with largest ssthresh for any * retransmission. */ - alt = net; - alt = sctp_find_alternate_net(stcb, alt, 1); + alt = sctp_find_alternate_net(stcb, net, 1); /* * CUCv2: If a different dest is picked for the * retransmission, then new (rtx-)pseudo_cumack needs to be @@ -1213,7 +1211,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp struct sctp_nets *alt; alt = sctp_find_alternate_net(stcb, stcb->asoc.primary_destination, 0); - if ((alt != NULL) && (alt != stcb->asoc.primary_destination)) { + if (alt != stcb->asoc.primary_destination) { sctp_move_chunks_from_net(stcb, stcb->asoc.primary_destination); stcb->asoc.primary_destination = alt; } @@ -1480,6 +1478,7 @@ sctp_delete_prim_timer(struct sctp_inpcb * For the shutdown and shutdown-ack, we do not keep one around on the * control queue. This means we must generate a new one and call the general * chunk output routine, AFTER having done threshold management. + * It is assumed that net is non-NULL. */ int sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1492,18 +1491,13 @@ sctp_shutdown_timer(struct sctp_inpcb *i /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); /* third generate a shutdown into the queue for out net */ - if (alt) { - sctp_send_shutdown(stcb, alt); - } else { - /* - * if alt is NULL, there is no dest to send to?? - */ - return (0); - } + sctp_send_shutdown(stcb, alt); + /* fourth restart timer */ sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, alt); return (0); @@ -1520,6 +1514,7 @@ sctp_shutdownack_timer(struct sctp_inpcb /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:35:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A73DF106566C; Sat, 20 Nov 2010 19:35:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8648FC22; Sat, 20 Nov 2010 19:35: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 oAKJZDT5023520; Sat, 20 Nov 2010 19:35:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJZDGO023517; Sat, 20 Nov 2010 19:35:13 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201935.oAKJZDGO023517@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:35: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: r215582 - 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: Sat, 20 Nov 2010 19:35:13 -0000 Author: tuexen Date: Sat Nov 20 19:35:13 2010 New Revision: 215582 URL: http://svn.freebsd.org/changeset/base/215582 Log: MFC r214933: Remove two functions which are not used. Modified: stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctp_timer.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:33:42 2010 (r215581) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:35:13 2010 (r215582) @@ -1670,30 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -int -sctp_is_hb_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.hb_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - -int -sctp_is_sack_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - #define SCTP_NUMBER_OF_MTU_SIZES 18 static uint32_t mtu_sizes[] = { 68, Modified: stable/8/sys/netinet/sctp_timer.h ============================================================================== --- stable/8/sys/netinet/sctp_timer.h Sat Nov 20 19:33:42 2010 (r215581) +++ stable/8/sys/netinet/sctp_timer.h Sat Nov 20 19:35:13 2010 (r215582) @@ -65,9 +65,6 @@ int sctp_heartbeat_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, int); -int sctp_is_hb_timer_running(struct sctp_tcb *stcb); -int sctp_is_sack_timer_running(struct sctp_tcb *stcb); - int sctp_cookie_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:37:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BDBE106566C; Sat, 20 Nov 2010 19:37:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69F918FC13; Sat, 20 Nov 2010 19:37: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 oAKJb0nH023623; Sat, 20 Nov 2010 19:37:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJb0PW023618; Sat, 20 Nov 2010 19:37:00 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201937.oAKJb0PW023618@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:37: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: r215583 - 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: Sat, 20 Nov 2010 19:37:00 -0000 Author: tuexen Date: Sat Nov 20 19:37:00 2010 New Revision: 215583 URL: http://svn.freebsd.org/changeset/base/215583 Log: MFC r214939: Do not have the MTU table twice in the code. Therefore move the function from the timer code to util, rename it appropriately and also fix a bug in sctp_get_prev_mtu(), where calling it with a value existing in the MTU table did not return a smaller one. Modified: stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctp_timer.c Sat Nov 20 19:37:00 2010 (r215583) @@ -1670,46 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -#define SCTP_NUMBER_OF_MTU_SIZES 18 -static uint32_t mtu_sizes[] = { - 68, - 296, - 508, - 512, - 544, - 576, - 1006, - 1492, - 1500, - 1536, - 2002, - 2048, - 4352, - 4464, - 8166, - 17914, - 32000, - 65535 -}; - - -static uint32_t -sctp_getnext_mtu(struct sctp_inpcb *inp, uint32_t cur_mtu) -{ - /* select another MTU that is just bigger than this one */ - int i; - - for (i = 0; i < SCTP_NUMBER_OF_MTU_SIZES; i++) { - if (cur_mtu < mtu_sizes[i]) { - /* no max_mtu is bigger than this one */ - return (mtu_sizes[i]); - } - } - /* here return the highest allowable */ - return (cur_mtu); -} - - void sctp_pathmtu_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1717,7 +1677,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *in { uint32_t next_mtu, mtu; - next_mtu = sctp_getnext_mtu(inp, net->mtu); + next_mtu = sctp_get_next_mtu(inp, net->mtu); if ((next_mtu > net->mtu) && (net->port == 0)) { if ((net->src_addr_selected == 0) || Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 19:37:00 2010 (r215583) @@ -194,7 +194,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, * mtu is. Rats we will have to guess (in a educated fashion * of course) */ - nxtsz = find_next_best_mtu(totsz); + nxtsz = sctp_get_prev_mtu(totsz); } /* Stop any PMTU timer */ if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:37:00 2010 (r215583) @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define NUMBER_OF_MTU_SIZES 18 - #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS @@ -753,7 +751,7 @@ sctp_stop_timers_for_shutdown(struct sct * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ -static int sctp_mtu_sizes[] = { +static uint32_t sctp_mtu_sizes[] = { 68, 296, 508, @@ -774,25 +772,42 @@ static int sctp_mtu_sizes[] = { 65535 }; -int -find_next_best_mtu(int totsz) +/* + * Return the largest MTU smaller than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_prev_mtu(uint32_t val) { - int i, perfer; + uint32_t i; - /* - * if we are in here we must find the next best fit based on the - * size of the dg that failed to be sent. - */ - perfer = 0; - for (i = 0; i < NUMBER_OF_MTU_SIZES; i++) { - if (totsz < sctp_mtu_sizes[i]) { - perfer = i - 1; - if (perfer < 0) - perfer = 0; + if (val <= sctp_mtu_sizes[0]) { + return (val); + } + for (i = 1; i < (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val <= sctp_mtu_sizes[i]) { break; } } - return (sctp_mtu_sizes[perfer]); + return (sctp_mtu_sizes[i - 1]); +} + +/* + * Return the smallest MTU larger than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_next_mtu(struct sctp_inpcb *inp, uint32_t val) +{ + /* select another MTU that is just bigger than this one */ + uint32_t i; + + for (i = 0; i < (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val < sctp_mtu_sizes[i]) { + return (sctp_mtu_sizes[i]); + } + } + return (val); } void Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Nov 20 19:35:13 2010 (r215582) +++ stable/8/sys/netinet/sctputil.h Sat Nov 20 19:37:00 2010 (r215583) @@ -124,7 +124,8 @@ sctp_append_to_readq(struct sctp_inpcb * void sctp_iterator_worker(void); -int find_next_best_mtu(int); +uint32_t sctp_get_prev_mtu(uint32_t); +uint32_t sctp_get_next_mtu(struct sctp_inpcb *, uint32_t); void sctp_timeout_handler(void *); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:37:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61B3C106566C; Sat, 20 Nov 2010 19:37:34 +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 361CD8FC15; Sat, 20 Nov 2010 19:37: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 oAKJbYI6023695; Sat, 20 Nov 2010 19:37:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJbYJA023694; Sat, 20 Nov 2010 19:37:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201937.oAKJbYJA023694@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 19:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215584 - stable/8/bin/sh/bltin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:37:34 -0000 Author: jilles Date: Sat Nov 20 19:37:33 2010 New Revision: 215584 URL: http://svn.freebsd.org/changeset/base/215584 Log: MFC r215184: sh: Remove unused man page for echo builtin. The information in sh(1) about the echo builtin is equivalent, though less extensive. The echo(1) man page (bin/echo/echo.1) is different. Unfortunately, sh's echo builtin and /bin/echo have gone out of sync and this probably cannot be fixed any more. Deleted: stable/8/bin/sh/bltin/echo.1 Modified: Directory Properties: stable/8/bin/sh/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:39:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A19A106566B; Sat, 20 Nov 2010 19:39:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B368FC15; Sat, 20 Nov 2010 19:39: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 oAKJd2tu023779; Sat, 20 Nov 2010 19:39:02 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJd2Iq023777; Sat, 20 Nov 2010 19:39:02 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011201939.oAKJd2Iq023777@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 19:39: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: r215585 - 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: Sat, 20 Nov 2010 19:39:02 -0000 Author: tuexen Date: Sat Nov 20 19:39:02 2010 New Revision: 215585 URL: http://svn.freebsd.org/changeset/base/215585 Log: MFC r215035: Fix a bug which resulted in kevent() reporting an event twice on 1-to-1 style sockets when an ABORT was received. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 19:37:33 2010 (r215584) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 19:39:02 2010 (r215585) @@ -2826,6 +2826,7 @@ sctp_notify_assoc_change(uint32_t event, } } #endif + socantrcvmore(stcb->sctp_socket); sorwakeup(stcb->sctp_socket); sowwakeup(stcb->sctp_socket); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 19:39:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489931065789; Sat, 20 Nov 2010 19:39:13 +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 36DD78FC17; Sat, 20 Nov 2010 19:39: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 oAKJdDmv023818; Sat, 20 Nov 2010 19:39:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJdD0U023816; Sat, 20 Nov 2010 19:39:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201939.oAKJdD0U023816@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 19:39: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: r215586 - stable/8/bin/echo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:39:13 -0000 Author: jilles Date: Sat Nov 20 19:39:12 2010 New Revision: 215586 URL: http://svn.freebsd.org/changeset/base/215586 Log: MFC r215211: echo(1): Clarify portability and mention literal "--" handling. Modified: stable/8/bin/echo/echo.1 Directory Properties: stable/8/bin/echo/ (props changed) Modified: stable/8/bin/echo/echo.1 ============================================================================== --- stable/8/bin/echo/echo.1 Sat Nov 20 19:39:02 2010 (r215585) +++ stable/8/bin/echo/echo.1 Sat Nov 20 19:39:12 2010 (r215586) @@ -32,7 +32,7 @@ .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd November 12, 2010 .Dt ECHO 1 .Os .Sh NAME @@ -56,24 +56,37 @@ The following option is available: .Bl -tag -width flag .It Fl n Do not print the trailing newline character. -This may also be achieved by appending +.El +.Pp +The end-of-options marker +.Fl Fl +is not recognized and written literally. +.Pp +The newline may also be suppressed by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. -Note that this option as well as the effect of +Note that the +.Fl n +option as well as the effect of .Ql \ec are implementation-defined in .St -p1003.1-2001 as amended by Cor.\& 1-2002. -Applications aiming for maximum -portability are strongly encouraged to use +For portability, +.Nm +should only be used if the first argument does not start with a hyphen +.Pq Ql "-" +and does not contain any backslashes +.Pq Ql "\e" . +If this is not sufficient, .Xr printf 1 -to suppress the newline character. -.El +should be used. .Pp -Some shells may provide a builtin +Most shells provide a builtin .Nm -command which is similar or identical to this utility. +command which tends to differ from this utility +in the treatment of options and backslashes. Consult the .Xr builtin 1 manual page. From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 20:04:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB9D106566C; Sat, 20 Nov 2010 20:04:29 +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 C969F8FC13; Sat, 20 Nov 2010 20:04: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 oAKK4TFd024373; Sat, 20 Nov 2010 20:04:29 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKK4Tik024368; Sat, 20 Nov 2010 20:04:29 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011202004.oAKK4Tik024368@svn.freebsd.org> From: Colin Percival Date: Sat, 20 Nov 2010 20:04: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: r215587 - in head/sys/i386: include xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 20:04:30 -0000 Author: cperciva Date: Sat Nov 20 20:04:29 2010 New Revision: 215587 URL: http://svn.freebsd.org/changeset/base/215587 Log: Add VTOM(va) macro as xpmap_ptom(VTOP(va)) to convert to machine addresses. Clean up the code by converting xpmap_ptom(VTOP(...)) to VTOM(...) and converting xpmap_ptom(VM_PAGE_TO_PHYS(...)) to VM_PAGE_TO_MACH(...). In a few places we take advantage of the fact that xpmap_ptom can commute with setting PG_* flags. This commit should have no net effect save to improve the readability of this code. Modified: head/sys/i386/include/pmap.h head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/i386/xen/xen_machdep.c Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/include/pmap.h Sat Nov 20 20:04:29 2010 (r215587) @@ -221,6 +221,8 @@ extern pt_entry_t pg_nx; #define MACH_TO_VM_PAGE(ma) PHYS_TO_VM_PAGE(xpmap_mtop((ma))) #define VM_PAGE_TO_MACH(m) xpmap_ptom(VM_PAGE_TO_PHYS((m))) +#define VTOM(va) xpmap_ptom(VTOP(va)) + static __inline vm_paddr_t pmap_kextract_ma(vm_offset_t va) { Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/mp_machdep.c Sat Nov 20 20:04:29 2010 (r215587) @@ -749,7 +749,7 @@ start_all_aps(void) gdt_segs[GPRIV_SEL].ssd_base = (int) pc; gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss; - PT_SET_MA(bootAPgdt, xpmap_ptom(VTOP(bootAPgdt)) | PG_V | PG_RW); + PT_SET_MA(bootAPgdt, VTOM(bootAPgdt) | PG_V | PG_RW); bzero(bootAPgdt, PAGE_SIZE); for (x = 0; x < NGDT; x++) ssdtosd(&gdt_segs[x], &bootAPgdt[x].sd); @@ -833,14 +833,13 @@ cpu_initialize_context(unsigned int cpu) } boot_stack = kmem_alloc_nofault(kernel_map, 1); newPTD = kmem_alloc_nofault(kernel_map, NPGPTD); - ma[0] = xpmap_ptom(VM_PAGE_TO_PHYS(m[0]))|PG_V; + ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V; #ifdef PAE pmap_kenter(boot_stack, VM_PAGE_TO_PHYS(m[NPGPTD + 1])); for (i = 0; i < NPGPTD; i++) { ((vm_paddr_t *)boot_stack)[i] = - ma[i] = - xpmap_ptom(VM_PAGE_TO_PHYS(m[i]))|PG_V; + ma[i] = VM_PAGE_TO_MACH(m[i])|PG_V; } #endif @@ -862,7 +861,7 @@ cpu_initialize_context(unsigned int cpu) pmap_kenter(boot_stack, VM_PAGE_TO_PHYS(m[NPGPTD])); - xen_pgdpt_pin(xpmap_ptom(VM_PAGE_TO_PHYS(m[NPGPTD + 1]))); + xen_pgdpt_pin(VM_PAGE_TO_MACH(m[NPGPTD + 1])); vm_page_lock_queues(); for (i = 0; i < 4; i++) { int pdir = (PTDPTDI + i) / NPDEPG; @@ -905,7 +904,7 @@ cpu_initialize_context(unsigned int cpu) ctxt.failsafe_callback_cs = GSEL(GCODE_SEL, SEL_KPL); ctxt.failsafe_callback_eip = (unsigned long)failsafe_callback; - ctxt.ctrlreg[3] = xpmap_ptom(VM_PAGE_TO_PHYS(m[NPGPTD + 1])); + ctxt.ctrlreg[3] = VM_PAGE_TO_MACH(m[NPGPTD + 1]); #else /* __x86_64__ */ ctxt.user_regs.esp = idle->thread.rsp0 - sizeof(struct pt_regs); ctxt.kernel_ss = GSEL(GDATA_SEL, SEL_KPL); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/pmap.c Sat Nov 20 20:04:29 2010 (r215587) @@ -1355,7 +1355,7 @@ pmap_qenter(vm_offset_t sva, vm_page_t * pte = vtopte(sva); endpte = pte + count; while (pte < endpte) { - pa = xpmap_ptom(VM_PAGE_TO_PHYS(*ma)) | pgeflag | PG_RW | PG_V | PG_M | PG_A; + pa = VM_PAGE_TO_MACH(*ma) | pgeflag | PG_RW | PG_V | PG_M | PG_A; mclp->op = __HYPERVISOR_update_va_mapping; mclp->args[0] = va; @@ -1589,7 +1589,7 @@ pmap_pinit(pmap_t pmap) for (i = 0; i < NPGPTD; i++) { vm_paddr_t ma; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + ma = VM_PAGE_TO_MACH(ptdpg[i]); pmap->pm_pdpt[i] = ma | PG_V; } @@ -1599,7 +1599,7 @@ pmap_pinit(pmap_t pmap) pt_entry_t *pd; vm_paddr_t ma; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + ma = VM_PAGE_TO_MACH(ptdpg[i]); pd = pmap->pm_pdir + (i * NPDEPG); PT_SET_MA(pd, *vtopte((vm_offset_t)pd) & ~(PG_M|PG_A|PG_U|PG_RW)); #if 0 @@ -1612,9 +1612,9 @@ pmap_pinit(pmap_t pmap) #endif vm_page_lock_queues(); xen_flush_queue(); - xen_pgdpt_pin(xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[NPGPTD]))); + xen_pgdpt_pin(VM_PAGE_TO_MACH(ptdpg[NPGPTD])); for (i = 0; i < NPGPTD; i++) { - vm_paddr_t ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + vm_paddr_t ma = VM_PAGE_TO_MACH(ptdpg[i]); PT_SET_VA_MA(&pmap->pm_pdir[PTDPTDI + i], ma | PG_V | PG_A, FALSE); } xen_flush_queue(); @@ -1669,7 +1669,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int */ pmap->pm_stats.resident_count++; - ptema = xpmap_ptom(VM_PAGE_TO_PHYS(m)); + ptema = VM_PAGE_TO_MACH(m); xen_pt_pin(ptema); PT_SET_VA_MA(&pmap->pm_pdir[ptepindex], (ptema | PG_U | PG_RW | PG_V | PG_A | PG_M), TRUE); @@ -1873,7 +1873,7 @@ pmap_release(pmap_t pmap) for (i = 0; i < npgptd; i++) { m = ptdpg[i]; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(m)); + ma = VM_PAGE_TO_MACH(m); /* unpinning L1 and L2 treated the same */ #if 0 xen_pgd_unpin(ma); @@ -1883,7 +1883,7 @@ pmap_release(pmap_t pmap) #endif #ifdef PAE if (i < NPGPTD) - KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), + KASSERT(VM_PAGE_TO_MACH(m) == (pmap->pm_pdpt[i] & PG_FRAME), ("pmap_release: got wrong ptd page")); #endif m->wire_count--; @@ -2673,7 +2673,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, boolean_t invlva; CTR6(KTR_PMAP, "pmap_enter: pmap=%08p va=0x%08x access=0x%x ma=0x%08x prot=0x%x wired=%d", - pmap, va, access, xpmap_ptom(VM_PAGE_TO_PHYS(m)), prot, wired); + pmap, va, access, VM_PAGE_TO_MACH(m), prot, wired); va = trunc_page(va); KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, @@ -3364,7 +3364,7 @@ pmap_zero_page(vm_page_t m) if (*sysmaps->CMAP2) panic("pmap_zero_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); pagezero(sysmaps->CADDR2); PT_SET_MA(sysmaps->CADDR2, 0); sched_unpin(); @@ -3387,7 +3387,7 @@ pmap_zero_page_area(vm_page_t m, int off if (*sysmaps->CMAP2) panic("pmap_zero_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); @@ -3411,7 +3411,7 @@ pmap_zero_page_idle(vm_page_t m) if (*CMAP3) panic("pmap_zero_page: CMAP3 busy"); sched_pin(); - PT_SET_MA(CADDR3, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(CADDR3, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); pagezero(CADDR3); PT_SET_MA(CADDR3, 0); sched_unpin(); @@ -3435,8 +3435,8 @@ pmap_copy_page(vm_page_t src, vm_page_t if (*sysmaps->CMAP2) panic("pmap_copy_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR1, PG_V | xpmap_ptom(VM_PAGE_TO_PHYS(src)) | PG_A); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(dst)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR1, PG_V | VM_PAGE_TO_MACH(src) | PG_A); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(dst) | PG_A | PG_M); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); PT_SET_MA(sysmaps->CADDR1, 0); PT_SET_MA(sysmaps->CADDR2, 0); @@ -4063,7 +4063,7 @@ pmap_page_set_memattr(vm_page_t m, vm_me panic("pmap_page_set_memattr: CMAP2 busy"); sched_pin(); PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | - xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M | + VM_PAGE_TO_MACH(m) | PG_A | PG_M | pmap_cache_bits(m->md.pat_mode, 0)); invlcaddr(sysmaps->CADDR2); sva = (vm_offset_t)sysmaps->CADDR2; Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/xen_machdep.c Sat Nov 20 20:04:29 2010 (r215587) @@ -917,7 +917,7 @@ initvalues(start_info_t *startinfo) l3_pages = 1; l2_pages = 0; IdlePDPT = (pd_entry_t *)startinfo->pt_base; - IdlePDPTma = xpmap_ptom(VTOP(startinfo->pt_base)); + IdlePDPTma = VTOM(startinfo->pt_base); for (i = (KERNBASE >> 30); (i < 4) && (IdlePDPT[i] != 0); i++) l2_pages++; @@ -926,7 +926,7 @@ initvalues(start_info_t *startinfo) * Thus, if KERNBASE */ for (i = 0; i < l2_pages; i++) - IdlePTDma[i] = xpmap_ptom(VTOP(IdlePTD + i*PAGE_SIZE)); + IdlePTDma[i] = VTOM(IdlePTD + i*PAGE_SIZE); l2_pages = (l2_pages == 0) ? 1 : l2_pages; #else @@ -966,13 +966,12 @@ initvalues(start_info_t *startinfo) IdlePDPTnew = (pd_entry_t *)cur_space; cur_space += PAGE_SIZE; bzero(IdlePDPTnew, PAGE_SIZE); - IdlePDPTnewma = xpmap_ptom(VTOP(IdlePDPTnew)); + IdlePDPTnewma = VTOM(IdlePDPTnew); IdlePTDnew = (pd_entry_t *)cur_space; cur_space += 4*PAGE_SIZE; bzero(IdlePTDnew, 4*PAGE_SIZE); for (i = 0; i < 4; i++) - IdlePTDnewma[i] = - xpmap_ptom(VTOP((uint8_t *)IdlePTDnew + i*PAGE_SIZE)); + IdlePTDnewma[i] = VTOM((uint8_t *)IdlePTDnew + i*PAGE_SIZE); /* * L3 * @@ -1040,7 +1039,7 @@ initvalues(start_info_t *startinfo) IdlePTDnewma[i] | PG_V); } xen_load_cr3(VTOP(IdlePDPTnew)); - xen_pgdpt_pin(xpmap_ptom(VTOP(IdlePDPTnew))); + xen_pgdpt_pin(VTOM(IdlePDPTnew)); /* allocate remainder of nkpt pages */ cur_space_pt = cur_space; @@ -1055,14 +1054,13 @@ initvalues(start_info_t *startinfo) * make sure that all the initial page table pages * have been zeroed */ - PT_SET_MA(cur_space, - xpmap_ptom(VTOP(cur_space)) | PG_V | PG_RW); + PT_SET_MA(cur_space, VTOM(cur_space) | PG_V | PG_RW); bzero((char *)cur_space, PAGE_SIZE); PT_SET_MA(cur_space, (vm_paddr_t)0); - xen_pt_pin(xpmap_ptom(VTOP(cur_space))); + xen_pt_pin(VTOM(cur_space)); xen_queue_pt_update((vm_paddr_t)(IdlePTDnewma[pdir] + curoffset*sizeof(vm_paddr_t)), - xpmap_ptom(VTOP(cur_space)) | PG_KERNEL); + VTOM(cur_space) | PG_KERNEL); PT_UPDATES_FLUSH(); } @@ -1113,14 +1111,14 @@ initvalues(start_info_t *startinfo) #if 0 /* add page table for KERNBASE */ xen_queue_pt_update(IdlePTDma + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_KERNEL)); + VTOM(cur_space) | PG_KERNEL); xen_flush_queue(); #ifdef PAE xen_queue_pt_update(pdir_shadow_ma[3] + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_V | PG_A)); + VTOM(cur_space) | PG_V | PG_A); #else xen_queue_pt_update(pdir_shadow_ma + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_V | PG_A)); + VTOM(cur_space) | PG_V | PG_A); #endif xen_flush_queue(); cur_space += PAGE_SIZE; @@ -1140,7 +1138,7 @@ initvalues(start_info_t *startinfo) */ for (i = (((vm_offset_t)&btext) & ~PAGE_MASK); i < (((vm_offset_t)&etext) & ~PAGE_MASK); i += PAGE_SIZE) - PT_SET_MA(i, xpmap_ptom(VTOP(i)) | PG_V | PG_A); + PT_SET_MA(i, VTOM(i) | PG_V | PG_A); printk("#7\n"); physfree = VTOP(cur_space); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 20:34:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB211065672; Sat, 20 Nov 2010 20:34:13 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C830B8FC18; Sat, 20 Nov 2010 20:34: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 oAKKYDqS025130; Sat, 20 Nov 2010 20:34:13 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKKYDhY025109; Sat, 20 Nov 2010 20:34:13 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011202034.oAKKYDhY025109@svn.freebsd.org> From: Bruce Cran Date: Sat, 20 Nov 2010 20:34: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: r215588 - in stable/8: libexec/tftpd sys/arm/xscale/ixp425 sys/boot/arm/ixp425/boot2 sys/dev/ata sys/dev/drm sys/dev/isp sys/dev/ixgbe sys/dev/msk sys/dev/pccard sys/dev/sound/sbus sys/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 20:34:14 -0000 Author: brucec Date: Sat Nov 20 20:34:13 2010 New Revision: 215588 URL: http://svn.freebsd.org/changeset/base/215588 Log: MFC r215034: Fix typos. PR: bin/148894 Submitted by: olgeni Modified: stable/8/libexec/tftpd/tftp-utils.c stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c stable/8/sys/dev/ata/ata-disk.c stable/8/sys/dev/drm/r300_reg.h stable/8/sys/dev/isp/isp_freebsd.c stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/pccard/pccardvar.h stable/8/sys/dev/sound/sbus/cs4231.c stable/8/sys/dev/syscons/schistory.c stable/8/sys/dev/uart/uart_subr.c stable/8/sys/kern/subr_lock.c stable/8/sys/mips/mips/vm_machdep.c stable/8/sys/netinet/sctp.h stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_uio.h stable/8/sys/security/mac_portacl/mac_portacl.c stable/8/usr.sbin/config/configvers.h Directory Properties: stable/8/libexec/tftpd/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/config/ (props changed) Modified: stable/8/libexec/tftpd/tftp-utils.c ============================================================================== --- stable/8/libexec/tftpd/tftp-utils.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/libexec/tftpd/tftp-utils.c Sat Nov 20 20:34:13 2010 (r215588) @@ -100,7 +100,7 @@ unmappedaddr(struct sockaddr_in6 *sin6) sin4->sin_len = sizeof(struct sockaddr_in); } -/* Get a field from a \0 seperated string */ +/* Get a field from a \0 separated string */ ssize_t get_field(int peer, char *buffer, ssize_t size) { Modified: stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c ============================================================================== --- stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/arm/xscale/ixp425/ixp425_qmgr.c Sat Nov 20 20:34:13 2010 (r215588) @@ -317,7 +317,7 @@ ixpqmgr_attach(device_t dev) sc->aqmFreeSramAddress = 0x100; /* Q buffer space starts at 0x2100 */ - ixpqmgr_rebuild(sc); /* build inital priority table */ + ixpqmgr_rebuild(sc); /* build initial priority table */ aqm_reset(sc); /* reset h/w */ return (0); } @@ -775,7 +775,7 @@ ixpqmgr_intr(void *arg) * * The search will end when all the bits of the interrupt * register are cleared. There is no need to maintain - * a seperate value and test it at each iteration. + * a separate value and test it at each iteration. */ if (intRegVal & sc->lowPriorityTableFirstHalfMask) { priorityTableIndex = 0; Modified: stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c ============================================================================== --- stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/boot/arm/ixp425/boot2/ixp425_board.c Sat Nov 20 20:34:13 2010 (r215588) @@ -88,7 +88,7 @@ board_init(void) /* * This should be called just before starting the kernel. This is so - * that one can undo incompatable hardware settings. + * that one can undo incompatible hardware settings. */ void clr_board(void) @@ -504,7 +504,7 @@ cfaltwait(u_int8_t mask) while (tout <= 5000000) { status = cfaltread8(CF_ALT_STATUS); if (status == 0xff) { - printf("cfaltwait: master: no status, reselectin\n"); + printf("cfaltwait: master: no status, reselecting\n"); cfwrite8(CF_DRV_HEAD, CF_D_IBM); DELAY(1); status = cfread8(CF_STATUS); Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/ata/ata-disk.c Sat Nov 20 20:34:13 2010 (r215588) @@ -175,13 +175,13 @@ ad_detach(device_t dev) free(children, M_TEMP); } - /* detroy disk from the system so we dont get any further requests */ + /* destroy disk from the system so we don't get any further requests */ disk_destroy(adp->disk); - /* fail requests on the queue and any thats "in flight" for this device */ + /* fail requests on the queue and any that's "in flight" for this device */ ata_fail_requests(dev); - /* dont leave anything behind */ + /* don't leave anything behind */ device_set_ivars(dev, NULL); free(adp, M_AD); return 0; @@ -523,7 +523,7 @@ ad_describe(device_t dev) struct ad_softc *adp = device_get_ivars(dev); u_int8_t *marker, vendor[64], product[64]; - /* try to seperate the ATA model string into vendor and model parts */ + /* try to separate the ATA model string into vendor and model parts */ if ((marker = index(atadev->param.model, ' ')) || (marker = index(atadev->param.model, '-'))) { int len = (marker - atadev->param.model); Modified: stable/8/sys/dev/drm/r300_reg.h ============================================================================== --- stable/8/sys/dev/drm/r300_reg.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/drm/r300_reg.h Sat Nov 20 20:34:13 2010 (r215588) @@ -345,7 +345,7 @@ __FBSDID("$FreeBSD$"); * position takes place. * * Most likely this is used to ignore rest of the program in cases - * where group of verts arent visible. For some reason this "section" + * where group of verts aren't visible. For some reason this "section" * is sometimes accepted other instruction that have no relationship with * position calculations. */ @@ -590,7 +590,7 @@ __FBSDID("$FreeBSD$"); #define R300_RE_FOG_START 0x4298 /* Not sure why there are duplicate of factor and constant values. - * My best guess so far is that there are seperate zbiases for test and write. + * My best guess so far is that there are separate zbiases for test and write. * Ordering might be wrong. * Some of the tests indicate that fgl has a fallback implementation of zbias * via pixel shaders. @@ -608,7 +608,7 @@ __FBSDID("$FreeBSD$"); * My guess is that there are two bits for each zbias primitive * (FILL, LINE, POINT). * One to enable depth test and one for depth write. - * Yet this doesnt explain why depth writes work ... + * Yet this doesn't explain why depth writes work ... */ #define R300_RE_OCCLUSION_CNTL 0x42B4 # define R300_OCCLUSION_ON (1<<1) @@ -693,7 +693,7 @@ __FBSDID("$FreeBSD$"); * the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the * color register index. * - * Apperently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any + * Apparently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any * R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state. * See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly * correct or not. - Oliver. @@ -817,8 +817,8 @@ __FBSDID("$FreeBSD$"); # define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) # define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) -/* NOTE: NEAREST doesnt seem to exist. - * Im not seting MAG_FILTER_MASK and (3 << 11) on for all +/* NOTE: NEAREST doesn't seem to exist. + * I'm not setting MAG_FILTER_MASK and (3 << 11) on for all * anisotropy modes because that would void selected mag filter */ # define R300_TX_MIN_FILTER_ANISO_NEAREST (0 << 13) Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/isp/isp_freebsd.c Sat Nov 20 20:34:13 2010 (r215588) @@ -1790,7 +1790,7 @@ isp_handle_platform_atio(ispsoftc_t *isp * The firmware status (except for the QLTM_SVALID bit) * indicates why this ATIO was sent to us. * - * If QLTM_SVALID is set, the firware has recommended Sense Data. + * If QLTM_SVALID is set, the firmware has recommended Sense Data. * * If the DISCONNECTS DISABLED bit is set in the flags field, * we're still connected on the SCSI bus. @@ -1917,7 +1917,7 @@ isp_handle_platform_atio2(ispsoftc_t *is * The firmware status (except for the QLTM_SVALID bit) * indicates why this ATIO was sent to us. * - * If QLTM_SVALID is set, the firware has recommended Sense Data. + * If QLTM_SVALID is set, the firmware has recommended Sense Data. */ if ((aep->at_status & ~QLTM_SVALID) != AT_CDB) { isp_prt(isp, ISP_LOGWARN, "bogus atio (0x%x) leaked to platform", aep->at_status); @@ -2581,7 +2581,7 @@ isp_handle_platform_notify_24xx(ispsoftc /* * Note that we're just getting notification that an ELS was received - * (possibly with some associcated information sent upstream). This is + * (possibly with some associated information sent upstream). This is * *not* the same as being given the ELS frame to accept or reject. */ switch (inot->in_status_subcode) { @@ -2780,7 +2780,7 @@ isp_handle_platform_target_notify_ack(is } /* - * Handle task managment functions. + * Handle task management functions. * * We show up here with a notify structure filled out. * @@ -2890,7 +2890,7 @@ bad: } /* - * Find the associated private data and makr it as dead so + * Find the associated private data and mark it as dead so * we don't try to work on it any further. */ static void @@ -5361,7 +5361,7 @@ isp_default_wwn(ispsoftc_t * isp, int ch /* - * For channel zero just return what we have. For either ACIIVE or + * For channel zero just return what we have. For either ACTIVE or * DEFAULT cases, we depend on default override of NVRAM values for * channel zero. */ @@ -5397,7 +5397,7 @@ isp_default_wwn(ispsoftc_t * isp, int ch * physical port on dual-port chips (23XX/24XX) * * This is somewhat nutty, particularly since bit 48 is - * irrelevant as they assign seperate serial numbers to + * irrelevant as they assign separate serial numbers to * different physical ports anyway. * * We'll stick our channel number plus one first into bits Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/ixgbe/ixgbe.c Sat Nov 20 20:34:13 2010 (r215588) @@ -256,7 +256,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg /* * Header split: this causes the hardware to DMA - * the header into a seperate mbuf from the payload, + * the header into a separate mbuf from the payload, * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ @@ -3655,7 +3655,7 @@ ixgbe_setup_receive_ring(struct rx_ring rxbuf = &rxr->rx_buffers[j]; /* - ** Dont allocate mbufs if not + ** Don't allocate mbufs if not ** doing header split, its wasteful */ if (rxr->hdr_split == FALSE) @@ -4123,7 +4123,7 @@ ixgbe_rxeof(struct ix_queue *que, int co ** not be fragmented across sequential ** descriptors, rather the next descriptor ** is indicated in bits of the descriptor. - ** This also means that we might proceses + ** This also means that we might process ** more than one packet at a time, something ** that has never been true before, it ** required eliminating global chain pointers @@ -4472,14 +4472,14 @@ ixgbe_enable_intr(struct adapter *adapte /* With RSS we use auto clear */ if (adapter->msix_mem) { mask = IXGBE_EIMS_ENABLE_MASK; - /* Dont autoclear Link */ + /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); } /* - ** Now enable all queues, this is done seperately to + ** Now enable all queues, this is done separately to ** allow for handling the extended (beyond 32) MSIX ** vectors that can be used by 82599 */ Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/msk/if_msk.c Sat Nov 20 20:34:13 2010 (r215588) @@ -1070,7 +1070,7 @@ mskc_setup_rambuffer(struct msk_softc *s sc->msk_pflags |= MSK_FLAG_RAMBUF; /* * Give receiver 2/3 of memory and round down to the multiple - * of 1024. Tx/Rx RAM buffer size of Yukon II shoud be multiple + * of 1024. Tx/Rx RAM buffer size of Yukon II should be multiple * of 1024. */ sc->msk_rxqsize = rounddown((sc->msk_ramsize * 1024 * 2) / 3, 1024); @@ -1545,7 +1545,7 @@ msk_attach(device_t dev) */ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO; /* - * Enable Rx checksum offloading for VLAN taggedd frames + * Enable Rx checksum offloading for VLAN tagged frames * if controller support new descriptor format. */ if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0 && @@ -1733,7 +1733,7 @@ mskc_attach(device_t dev) * does not rely on status word of received frame * in msk_rxeof() which in turn disables all * hardware assistance bits reported by the status - * word as well as validity of the recevied frame. + * word as well as validity of the received frame. * Just pass received frames to upper stack with * minimal test and let upper stack handle them. */ @@ -2067,10 +2067,10 @@ msk_txrx_dma_alloc(struct msk_if_softc * * what DMA address is used and chain another descriptor for the * 64bits DMA operation. This also means descriptor ring size is * variable. Limiting DMA address to be in 32bit address space greatly - * simplyfies descriptor handling and possibly would increase + * simplifies descriptor handling and possibly would increase * performance a bit due to efficient handling of descriptors. * Apart from harassing checksum offloading mechanisms, it seems - * it's really bad idea to use a seperate descriptor for 64bit + * it's really bad idea to use a separate descriptor for 64bit * DMA operation to save small descriptor memory. Anyway, I've * never seen these exotic scheme on ethernet interface hardware. */ @@ -2567,7 +2567,7 @@ msk_encap(struct msk_if_softc *sc_if, st * Short UDP packets appear to be handled correctly by * Yukon II. Also I assume this bug does not happen on * controllers that use newer descriptor format or - * automatic Tx checksum calaulcation. + * automatic Tx checksum calculation. */ m = m_pullup(m, offset + sizeof(struct tcphdr)); if (m == NULL) { @@ -2704,7 +2704,7 @@ msk_encap(struct msk_if_softc *sc_if, st /* Update producer index. */ sc_if->msk_cdata.msk_tx_prod = prod; - /* Set EOP on the last desciptor. */ + /* Set EOP on the last descriptor. */ prod = (prod + MSK_TX_RING_CNT - 1) % MSK_TX_RING_CNT; tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; tx_le->msk_control |= htole32(EOP); @@ -3175,7 +3175,7 @@ msk_intr_gmac(struct msk_if_softc *sc_if * XXX * In case of Tx underrun, we may need to flush/reset * Tx MAC but that would also require resynchronization - * with status LEs. Reintializing status LEs would + * with status LEs. Reinitializing status LEs would * affect other port in dual MAC configuration so it * should be avoided as possible as we can. * Due to lack of documentation it's all vague guess but @@ -3684,7 +3684,7 @@ msk_init_locked(struct msk_if_softc *sc_ msk_setvlan(sc_if, ifp); if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { - /* Set Rx Pause threshould. */ + /* Set Rx Pause threshold. */ CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), Modified: stable/8/sys/dev/pccard/pccardvar.h ============================================================================== --- stable/8/sys/dev/pccard/pccardvar.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/pccard/pccardvar.h Sat Nov 20 20:34:13 2010 (r215588) @@ -31,7 +31,7 @@ */ /* - * PCCARD_API_LEVEL. When set to 5, we provide a 5.x compatable API + * PCCARD_API_LEVEL. When set to 5, we provide a 5.x compatible API * for driver writers that have to share their code between 5.x and 6.x. * The 5.x compatibility interfaces will be unsupported in 7.0, at which * point we'll only support 6 and newer, etc. @@ -191,7 +191,7 @@ enum { PCCARD_IVAR_PRODEXT, PCCARD_IVAR_FUNCTION_NUMBER, PCCARD_IVAR_VENDOR_STR, /* CIS string for "Manufacturer" */ - PCCARD_IVAR_PRODUCT_STR,/* CIS strnig for "Product" */ + PCCARD_IVAR_PRODUCT_STR,/* CIS string for "Product" */ PCCARD_IVAR_CIS3_STR, PCCARD_IVAR_CIS4_STR, PCCARD_IVAR_FUNCTION, @@ -254,7 +254,7 @@ enum { #endif /* - * Defines to decoe the get_funce_disk return value. See the PCMCIA standard + * Defines to decode the get_funce_disk return value. See the PCMCIA standard * for all the details of what these bits mean. */ #define PFD_I_V_MASK 0x3 Modified: stable/8/sys/dev/sound/sbus/cs4231.c ============================================================================== --- stable/8/sys/dev/sound/sbus/cs4231.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/sound/sbus/cs4231.c Sat Nov 20 20:34:13 2010 (r215588) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); * for playback/capture. * Since I couldn't find any documentation for APCDMA programming * information, I guessed the usage of APCDMA from that of OpenBSD's - * driver. The EBDMA infomation of PCIO can be obtained from + * driver. The EBDMA information of PCIO can be obtained from * http://solutions.sun.com/embedded/databook/web/microprocessors/pcio.html * And CS4231A datasheet can also be obtained from * ftp://ftp.alsa-project.org/pub/manuals/cirrus/4231a.pdf @@ -1198,7 +1198,7 @@ cs4231_chan_fs(struct cs4231_softc *sc, /* * capture channel - * cs4231 doesn't allow seperate fs setup for playback/capture. + * cs4231 doesn't allow separate fs setup for playback/capture. * I believe this will break full-duplex operation. */ if (dir == PCMDIR_REC) { Modified: stable/8/sys/dev/syscons/schistory.c ============================================================================== --- stable/8/sys/dev/syscons/schistory.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/syscons/schistory.c Sat Nov 20 20:34:13 2010 (r215588) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); /* * XXX Placeholder. - * This calculations should be dynamically scaled by number of seperate sc + * This calculations should be dynamically scaled by number of separate sc * devices. A base value of 'extra_history_size' should be defined for * each syscons unit, and added and subtracted from the dynamic * 'extra_history_size' as units are added and removed. This way, each time @@ -86,7 +86,7 @@ int sc_alloc_history_buffer(scr_stat *scp, int lines, int prev_ysize, int wait) { /* - * syscons unconditionally allocates buffers upto + * syscons unconditionally allocates buffers up to * SC_HISTORY_SIZE lines or scp->ysize lines, whichever * is larger. A value greater than that is allowed, * subject to extra_history_size. @@ -116,7 +116,7 @@ sc_alloc_history_buffer(scr_stat *scp, i delta = cur_lines - min_lines; } - /* lines upto min_lines are always allowed. */ + /* lines up to min_lines are always allowed. */ min_lines = imax(SC_HISTORY_SIZE, scp->ysize); if (lines > min_lines) { if (lines - min_lines > extra_history_size + delta) { Modified: stable/8/sys/dev/uart/uart_subr.c ============================================================================== --- stable/8/sys/dev/uart/uart_subr.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/dev/uart/uart_subr.c Sat Nov 20 20:34:13 2010 (r215588) @@ -172,8 +172,8 @@ out: /* * Parse a device specification. The specification is a list of attributes - * seperated by commas. Each attribute is a tag-value pair with the tag and - * value seperated by a colon. Supported tags are: + * separated by commas. Each attribute is a tag-value pair with the tag and + * value separated by a colon. Supported tags are: * * br = Baudrate * ch = Channel Modified: stable/8/sys/kern/subr_lock.c ============================================================================== --- stable/8/sys/kern/subr_lock.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/kern/subr_lock.c Sat Nov 20 20:34:13 2010 (r215588) @@ -170,7 +170,7 @@ SLIST_HEAD(lphead, lock_prof); /* * Array of objects and profs for each type of object for each cpu. Spinlocks - * are handled seperately because a thread may be preempted and acquire a + * are handled separately because a thread may be preempted and acquire a * spinlock while in the lock profiling code of a non-spinlock. In this way * we only need a critical section to protect the per-cpu lists. */ Modified: stable/8/sys/mips/mips/vm_machdep.c ============================================================================== --- stable/8/sys/mips/mips/vm_machdep.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/mips/mips/vm_machdep.c Sat Nov 20 20:34:13 2010 (r215588) @@ -122,8 +122,8 @@ cpu_fork(register struct thread *td1,reg /* Copy p1's pcb, note that in this case * our pcb also includes the td_frame being copied * too. The older mips2 code did an additional copy - * of the td_frame, for us thats not needed any - * longer (this copy does them both + * of the td_frame, for us that's not needed any + * longer (this copy does them both) */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); @@ -317,7 +317,7 @@ cpu_set_syscall_retval(struct thread *td * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources + * Address and stack, along with those from upcalls that are from other sources * such as those generated in thread_userret() itself. */ void @@ -339,7 +339,7 @@ cpu_set_upcall(struct thread *td, struct * at this time (see the matching comment below for * more analysis) (need a good safe default). * In MIPS, the trapframe is the first element of the PCB - * and gets copied when we copy the PCB. No seperate copy + * and gets copied when we copy the PCB. No separate copy * is needed. */ bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); Modified: stable/8/sys/netinet/sctp.h ============================================================================== --- stable/8/sys/netinet/sctp.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp.h Sat Nov 20 20:34:13 2010 (r215588) @@ -108,7 +108,7 @@ struct sctp_paramhdr { #define SCTP_MAX_BURST 0x00000019 /* rw */ /* assoc level context */ #define SCTP_CONTEXT 0x0000001a /* rw */ -/* explict EOR signalling */ +/* explicit EOR signalling */ #define SCTP_EXPLICIT_EOR 0x0000001b #define SCTP_REUSE_PORT 0x0000001c /* rw */ #define SCTP_AUTH_DEACTIVATE_KEY 0x0000001d @@ -131,9 +131,9 @@ struct sctp_paramhdr { * Blocking I/O is enabled on any TCP type socket by default. For the UDP * model if this is turned on then the socket buffer is shared for send * resources amongst all associations. The default for the UDP model is that - * is SS_NBIO is set. Which means all associations have a seperate send + * is SS_NBIO is set. Which means all associations have a separate send * limit BUT they will NOT ever BLOCK instead you will get an error back - * EAGAIN if you try to send to much. If you want the blocking symantics you + * EAGAIN if you try to send too much. If you want the blocking semantics you * set this option at the cost of sharing one socket send buffer size amongst * all associations. Peeled off sockets turn this option off and block. But * since both TCP and peeled off sockets have only one assoc per socket this @@ -141,7 +141,7 @@ struct sctp_paramhdr { * model OR peeled off UDP model, but we do allow you to do so. You just use * the normal syscall to toggle SS_NBIO the way you want. * - * Blocking I/O is controled by the SS_NBIO flag on the socket state so_state + * Blocking I/O is controlled by the SS_NBIO flag on the socket state so_state * field. */ @@ -166,7 +166,7 @@ struct sctp_paramhdr { /* Special hook for dynamically setting primary for all assoc's, - * this is a write only option that requires root privledge. + * this is a write only option that requires root privilege. */ #define SCTP_SET_DYNAMIC_PRIMARY 0x00002001 @@ -181,7 +181,7 @@ struct sctp_paramhdr { * to. The endpoint, before binding, may select * the "default" VRF it is in by using a set socket * option with SCTP_VRF_ID. This will also - * get propegated to the default VRF. Once the + * get propagated to the default VRF. Once the * endpoint binds an address then it CANNOT add * additional VRF's to become a Multi-VRF endpoint. * @@ -308,7 +308,7 @@ struct sctp_paramhdr { #define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105 /* - * error cause parameters (user visisble) + * error cause parameters (user visible) */ struct sctp_error_cause { uint16_t code; Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_os_bsd.h Sat Nov 20 20:34:13 2010 (r215588) @@ -316,7 +316,7 @@ typedef struct callout sctp_os_timer_t; } /* We make it so if you have up to 4 threads - * writting based on the default size of + * writing based on the default size of * the packet log 65 k, that would be * 4 16k packets before we would hit * a problem. @@ -353,7 +353,7 @@ typedef struct callout sctp_os_timer_t; /* For BSD this just accesses the M_PKTHDR length * so it operates on an mbuf with hdr flag. Other - * O/S's may have seperate packet header and mbuf + * O/S's may have separate packet header and mbuf * chain pointers.. thus the macro. */ #define SCTP_HEADER_TO_CHAIN(m) (m) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:34:13 2010 (r215588) @@ -107,7 +107,7 @@ sctp_fill_pcbinfo(struct sctp_pcbinfo *s * ... +--ifa-> ifa -> ifa * vrf * - * We keep these seperate lists since the SCTP subsystem will + * We keep these separate lists since the SCTP subsystem will * point to these from its source address selection nets structure. * When an address is deleted it does not happen right away on * the SCTP side, it gets scheduled. What we do when a @@ -191,7 +191,7 @@ sctp_find_ifn(void *ifn, uint32_t ifn_in struct sctp_ifnlist *hash_ifn_head; /* - * We assume the lock is held for the addresses if thats wrong + * We assume the lock is held for the addresses if that's wrong * problems could occur :-) */ hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; @@ -327,7 +327,7 @@ sctp_mark_ifa_addr_down(uint32_t vrf_id, len1 = strlen(if_name); len2 = strlen(sctp_ifap->ifn_p->ifn_name); if (len1 != len2) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different lenght %d vs %d - ignored\n", + SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different length %d vs %d - ignored\n", len1, len2); goto out; } @@ -380,7 +380,7 @@ sctp_mark_ifa_addr_up(uint32_t vrf_id, s len1 = strlen(if_name); len2 = strlen(sctp_ifap->ifn_p->ifn_name); if (len1 != len2) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different lenght %d vs %d - ignored\n", + SCTPDBG(SCTP_DEBUG_PCB4, "IFN of ifa names different length %d vs %d - ignored\n", len1, len2); goto out; } @@ -567,7 +567,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo } else { if (sctp_ifap->ifn_p) { /* - * The last IFN gets the address, removee + * The last IFN gets the address, remove * the old one */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", @@ -1515,7 +1515,7 @@ sctp_endpoint_probe(struct sockaddr *nam int fnd; /* - * Endpoing probe expects that the INP_INFO is locked. + * Endpoint probe expects that the INP_INFO is locked. */ sin = NULL; #ifdef INET6 @@ -1800,7 +1800,7 @@ sctp_pcb_findep(struct sockaddr *nam, in * endpoint is gone but there exists a connected socket for this guy * yet. If so we can return the first one that we find. This may NOT * be the correct one so the caller should be wary on the return - * INP. Currently the onlyc caller that sets this flag is in bindx + * INP. Currently the only caller that sets this flag is in bindx * where we are verifying that a user CAN bind the address. He * either has bound it already, or someone else has, or its open to * bind, so this is good enough. @@ -2005,7 +2005,7 @@ sctp_findassoc_by_vtag(struct sockaddr * } if (remote_tag) { /* - * If we have both vtags thats all we match + * If we have both vtags that's all we match * on */ if (stcb->asoc.peer_vtag == remote_tag) { @@ -2183,7 +2183,7 @@ sctp_findassociation_addr(struct mbuf *m * association that is linked to an existing * association that is under the TCP pool (i.e. no * listener exists). The endpoint finding routine - * will always find a listner before examining the + * will always find a listener before examining the * TCP pool. */ if (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) { @@ -3554,7 +3554,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, SCTP_INP_INFO_WUNLOCK(); /* * Now we release all locks. Since this INP cannot be found anymore - * except possbily by the kill timer that might be running. We call + * except possibly by the kill timer that might be running. We call * the drain function here. It should hit the case were it sees the * ACTIVE flag cleared and exit out freeing us to proceed and * destroy everything. @@ -3716,7 +3716,7 @@ sctp_add_remote_addr(struct sctp_tcb *st { /* * The following is redundant to the same lines in the - * sctp_aloc_assoc() but is needed since other's call the add + * sctp_aloc_assoc() but is needed since others call the add * address function */ struct sctp_nets *net, *netfirst; @@ -4034,7 +4034,7 @@ sctp_add_remote_addr(struct sctp_tcb *st (stcb->asoc.primary_destination)) { /* * first one on the list is NOT the primary sctp_cmpaddr() - * is much more efficent if the primary is the first on the + * is much more efficient if the primary is the first on the * list, make it so. */ TAILQ_REMOVE(&stcb->asoc.nets, @@ -4176,7 +4176,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, if (inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) { /* * If you have not performed a bind, then we need to do the - * ephemerial bind for you. + * ephemeral bind for you. */ if ((err = sctp_inpcb_bind(inp->sctp_socket, (struct sockaddr *)NULL, @@ -5159,7 +5159,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_INP_RUNLOCK(inp); /* * This will start the kill timer (if we are the - * lastone) since we hold an increment yet. But this + * last one) since we hold an increment yet. But this * is the only safe way to do this since otherwise * if the socket closes at the same time we are here * we might collide in the cleanup. @@ -6461,7 +6461,7 @@ sctp_set_primary_addr(struct sctp_tcb *s if (net != stcb->asoc.primary_destination) { /* * first one on the list is NOT the primary - * sctp_cmpaddr() is much more efficent if the + * sctp_cmpaddr() is much more efficient if the * primary is the first on the list, make it so. */ TAILQ_REMOVE(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next); @@ -6676,7 +6676,7 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, } /* * Another issue, in un-setting the TSN's in the mapping array we - * DID NOT adjust the higest_tsn marker. This will cause one of two + * DID NOT adjust the highest_tsn marker. This will cause one of two * things to occur. It may cause us to do extra work in checking for * our mapping array movement. More importantly it may cause us to * SACK every datagram. This may not be a bad thing though since we Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/netinet/sctp_uio.h Sat Nov 20 20:34:13 2010 (r215588) @@ -80,7 +80,7 @@ struct sctp_initmsg { /* We add 96 bytes to the size of sctp_sndrcvinfo. * This makes the current structure 128 bytes long * which is nicely 64 bit aligned but also has room - * for us to add more and keep ABI compatability. + * for us to add more and keep ABI compatibility. * For example, already we have the sctp_extrcvinfo * when enabled which is 48 bytes. */ @@ -304,7 +304,7 @@ struct sctp_setadaptation { uint32_t ssb_adaptation_ind; }; -/* compatable old spelling */ +/* compatible old spelling */ struct sctp_adaption_event { uint16_t sai_type; uint16_t sai_flags; @@ -396,7 +396,7 @@ union sctp_notification { struct sctp_send_failed sn_send_failed; struct sctp_shutdown_event sn_shutdown_event; struct sctp_adaptation_event sn_adaptation_event; - /* compatability same as above */ + /* compatibility same as above */ struct sctp_adaption_event sn_adaption_event; struct sctp_pdapi_event sn_pdapi_event; struct sctp_authkey_event sn_auth_event; @@ -417,7 +417,7 @@ union sctp_notification { #define SCTP_AUTHENTICATION_EVENT 0x0008 #define SCTP_STREAM_RESET_EVENT 0x0009 #define SCTP_SENDER_DRY_EVENT 0x000a -#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we don't send this */ /* * socket option structs */ @@ -893,7 +893,7 @@ struct sctpstat { uint32_t sctps_earlyfrstrid; uint32_t sctps_earlyfrstrout; uint32_t sctps_earlyfrstrtmr; - /* otheres */ + /* others */ uint32_t sctps_hdrops; /* packet shorter than header */ uint32_t sctps_badsum; /* checksum error */ uint32_t sctps_noport; /* no endpoint for port */ @@ -904,8 +904,8 @@ struct sctpstat { * RTT window */ uint32_t sctps_markedretrans; uint32_t sctps_naglesent; /* nagle allowed sending */ - uint32_t sctps_naglequeued; /* nagle does't allow sending */ - uint32_t sctps_maxburstqueued; /* max burst dosn't allow sending */ + uint32_t sctps_naglequeued; /* nagle doesn't allow sending */ + uint32_t sctps_maxburstqueued; /* max burst doesn't allow sending */ uint32_t sctps_ifnomemqueued; /* look ahead tells us no memory in * interface ring buffer OR we had a * send error and are queuing one @@ -931,7 +931,7 @@ struct sctpstat { uint32_t sctps_wu_sacks_sent; /* Window Update only sacks sent */ uint32_t sctps_sends_with_flags; /* number of sends with * sinfo_flags !=0 */ - uint32_t sctps_sends_with_unord /* number of undordered sends */ ; + uint32_t sctps_sends_with_unord; /* number of unordered sends */ uint32_t sctps_sends_with_eof; /* number of sends with EOF flag set */ uint32_t sctps_sends_with_abort; /* number of sends with ABORT * flag set */ @@ -943,7 +943,7 @@ struct sctpstat { * with peek */ uint32_t sctps_cached_chk; /* Number of cached chunks used */ uint32_t sctps_cached_strmoq; /* Number of cached stream oq's used */ - uint32_t sctps_left_abandon; /* Number of unread message abandonded + uint32_t sctps_left_abandon; /* Number of unread messages abandoned * by close */ uint32_t sctps_send_burst_avoid; /* Unused */ uint32_t sctps_send_cwnd_avoid; /* Send cwnd full avoidance, already Modified: stable/8/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- stable/8/sys/security/mac_portacl/mac_portacl.c Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/sys/security/mac_portacl/mac_portacl.c Sat Nov 20 20:34:13 2010 (r215588) @@ -133,7 +133,7 @@ struct rule { /* * Text format for the rule string is that a rule consists of a - * comma-seperated list of elements. Each element is in the form + * comma-separated list of elements. Each element is in the form * idtype:id:protocol:portnumber, and constitutes granting of permission * for the specified binding. */ Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Sat Nov 20 20:04:29 2010 (r215587) +++ stable/8/usr.sbin/config/configvers.h Sat Nov 20 20:34:13 2010 (r215588) @@ -26,7 +26,7 @@ * was a huge problem for 'make buildkernel' which was run with the installed * /usr/sbin/config, not a cross built one. We started bumping the version * number as a way to trap cases where the previous installworld was not - * compatable with the new buildkernel. The buildtools phase and much more + * compatible with the new buildkernel. The buildtools phase and much more * comprehensive error code returns solved this original problem. * * Most end-users will use buildkernel and the build tools from buildworld. From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:15:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751111065670; Sat, 20 Nov 2010 21:15:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62BCE8FC14; Sat, 20 Nov 2010 21: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 oAKLFi76026165; Sat, 20 Nov 2010 21:15:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLFiN1026163; Sat, 20 Nov 2010 21:15:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202115.oAKLFiN1026163@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:15: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: r215589 - 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: Sat, 20 Nov 2010 21:15:44 -0000 Author: tuexen Date: Sat Nov 20 21:15:44 2010 New Revision: 215589 URL: http://svn.freebsd.org/changeset/base/215589 Log: MFC r215039: Improve the scalability by using the local and remote port when putting inps in the tcpephash. Modified: stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 20:34:13 2010 (r215588) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:15:44 2010 (r215589) @@ -567,8 +567,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo } else { if (sctp_ifap->ifn_p) { /* - * The last IFN gets the address, remove - * the old one + * The last IFN gets the address, remove the + * old one */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", sctp_ifap, sctp_ifap->ifn_p->ifn_name, @@ -849,7 +849,7 @@ sctp_tcb_special_locate(struct sctp_inpc } else { return NULL; } - ephead = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), SCTP_BASE_INFO(hashtcpmark))]; + ephead = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport | rport), SCTP_BASE_INFO(hashtcpmark))]; /* * Ok now for each of the guys in this bucket we must look and see: * - Does the remote port match. - Does there single association's @@ -1771,6 +1771,7 @@ sctp_pcb_findep(struct sockaddr *nam, in struct sockaddr_in *sin; struct sockaddr_in6 *sin6; int lport; + unsigned int i; if (nam->sa_family == AF_INET) { sin = (struct sockaddr_in *)nam; @@ -1797,17 +1798,22 @@ sctp_pcb_findep(struct sockaddr *nam, in /* * If the TCP model exists it could be that the main listening - * endpoint is gone but there exists a connected socket for this guy - * yet. If so we can return the first one that we find. This may NOT - * be the correct one so the caller should be wary on the return - * INP. Currently the only caller that sets this flag is in bindx - * where we are verifying that a user CAN bind the address. He - * either has bound it already, or someone else has, or its open to - * bind, so this is good enough. + * endpoint is gone but there still exists a connected socket for + * this guy. If so we can return the first one that we find. This + * may NOT be the correct one so the caller should be wary on the + * returned INP. Currently the only caller that sets find_tcp_pool + * is in bindx where we are verifying that a user CAN bind the + * address. He either has bound it already, or someone else has, or + * its open to bind, so this is good enough. */ if (inp == NULL && find_tcp_pool) { - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashtcpmark))]; - inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + for (i = 0; i < SCTP_BASE_INFO(hashtcpmark) + 1; i++) { + head = &SCTP_BASE_INFO(sctp_tcpephash)[i]; + inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + if (inp) { + break; + } + } } if (inp) { SCTP_INP_INCR_REF(inp); @@ -2603,8 +2609,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpc LIST_REMOVE(stcb, sctp_tcbasocidhash); } /* Now insert the new_inp into the TCP connected hash */ - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), - SCTP_BASE_INFO(hashtcpmark))]; + head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport | rport), SCTP_BASE_INFO(hashtcpmark))]; LIST_INSERT_HEAD(head, new_inp, sctp_hash); /* Its safe to access */ @@ -3089,12 +3094,10 @@ continue_anyway: /* find the bucket */ if (port_reuse_active) { /* Put it into tcp 1-2-1 hash */ - head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), - SCTP_BASE_INFO(hashtcpmark))]; + head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashtcpmark))]; inp->sctp_flags |= SCTP_PCB_FLAGS_IN_TCPPOOL; } else { - head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(lport, - SCTP_BASE_INFO(hashmark))]; + head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashmark))]; } /* put it in the bucket */ LIST_INSERT_HEAD(head, inp, sctp_hash); @@ -3716,8 +3719,8 @@ sctp_add_remote_addr(struct sctp_tcb *st { /* * The following is redundant to the same lines in the - * sctp_aloc_assoc() but is needed since others call the add - * address function + * sctp_aloc_assoc() but is needed since others call the add address + * function */ struct sctp_nets *net, *netfirst; int addr_inscope; @@ -5159,10 +5162,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_INP_RUNLOCK(inp); /* * This will start the kill timer (if we are the - * last one) since we hold an increment yet. But this - * is the only safe way to do this since otherwise - * if the socket closes at the same time we are here - * we might collide in the cleanup. + * last one) since we hold an increment yet. But + * this is the only safe way to do this since + * otherwise if the socket closes at the same time + * we are here we might collide in the cleanup. */ sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, @@ -6676,12 +6679,12 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, } /* * Another issue, in un-setting the TSN's in the mapping array we - * DID NOT adjust the highest_tsn marker. This will cause one of two - * things to occur. It may cause us to do extra work in checking for - * our mapping array movement. More importantly it may cause us to - * SACK every datagram. This may not be a bad thing though since we - * will recover once we get our cum-ack above and all this stuff we - * dumped recovered. + * DID NOT adjust the highest_tsn marker. This will cause one of + * two things to occur. It may cause us to do extra work in checking + * for our mapping array movement. More importantly it may cause us + * to SACK every datagram. This may not be a bad thing though since + * we will recover once we get our cum-ack above and all this stuff + * we dumped recovered. */ } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:20:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A56E1065675; Sat, 20 Nov 2010 21:20:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78AE78FC1E; Sat, 20 Nov 2010 21:20: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 oAKLKd5C026315; Sat, 20 Nov 2010 21:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLKdXD026313; Sat, 20 Nov 2010 21:20:39 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202120.oAKLKdXD026313@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215590 - 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: Sat, 20 Nov 2010 21:20:39 -0000 Author: tuexen Date: Sat Nov 20 21:20:39 2010 New Revision: 215590 URL: http://svn.freebsd.org/changeset/base/215590 Log: MFC r215134,r215198: Fix issues with the SACK/NR-SACK generation code. Modified: stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:15:44 2010 (r215589) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:20:39 2010 (r215590) @@ -9927,13 +9927,14 @@ sctp_send_sack(struct sctp_tcb *stcb) caddr_t limit; uint32_t *dup; int limit_reached = 0; - unsigned int i, sel_start, siz, j; + unsigned int i, siz, j; unsigned int num_gap_blocks = 0, num_nr_gap_blocks = 0, space; int num_dups = 0; int space_req; uint32_t highest_tsn; uint8_t flags; uint8_t type; + uint8_t tsn_map; if ((stcb->asoc.sctp_nr_sack_on_off == 1) && (stcb->asoc.peer_supports_nr_sack == 1)) { @@ -10118,14 +10119,6 @@ sctp_send_sack(struct sctp_tcb *stcb) } } - if (((type == SCTP_SELECTIVE_ACK) && - (((asoc->mapping_array[0] | asoc->nr_mapping_array[0]) & 0x01) == 0x00)) || - ((type == SCTP_NR_SELECTIVE_ACK) && - ((asoc->mapping_array[0] & 0x01) == 0x00))) { - sel_start = 0; - } else { - sel_start = 1; - } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; } else { @@ -10137,11 +10130,18 @@ sctp_send_sack(struct sctp_tcb *stcb) compare_with_wrap(asoc->highest_tsn_inside_map, asoc->cumulative_tsn, MAX_TSN))) { /* we have a gap .. maybe */ for (i = 0; i < siz; i++) { + tsn_map = asoc->mapping_array[i]; if (type == SCTP_SELECTIVE_ACK) { - selector = &sack_array[asoc->mapping_array[i] | asoc->nr_mapping_array[i]]; - } else { - selector = &sack_array[asoc->mapping_array[i]]; + tsn_map |= asoc->nr_mapping_array[i]; } + if (i == 0) { + /* + * Clear all bits corresponding to TSNs + * smaller or equal to the cumulative TSN. + */ + tsn_map &= (~0 << (1 - offset)); + } + selector = &sack_array[tsn_map]; if (mergeable && selector->right_edge) { /* * Backup, left and right edges were ok to @@ -10153,7 +10153,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (selector->num_entries == 0) mergeable = 0; else { - for (j = sel_start; j < selector->num_entries; j++) { + for (j = 0; j < selector->num_entries; j++) { if (mergeable && selector->right_edge) { /* * do a merge by NOT setting @@ -10185,7 +10185,6 @@ sctp_send_sack(struct sctp_tcb *stcb) /* Reached the limit stop */ break; } - sel_start = 0; offset += 8; } } @@ -10200,11 +10199,6 @@ sctp_send_sack(struct sctp_tcb *stcb) siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + asoc->highest_tsn_inside_nr_map + 7) / 8; } - if ((asoc->nr_mapping_array[0] & 0x01) == 0x00) { - sel_start = 0; - } else { - sel_start = 1; - } if (compare_with_wrap(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, MAX_TSN)) { offset = 1; } else { @@ -10213,7 +10207,16 @@ sctp_send_sack(struct sctp_tcb *stcb) if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->cumulative_tsn, MAX_TSN)) { /* we have a gap .. maybe */ for (i = 0; i < siz; i++) { - selector = &sack_array[asoc->nr_mapping_array[i]]; + tsn_map = asoc->nr_mapping_array[i]; + if (i == 0) { + /* + * Clear all bits corresponding to + * TSNs smaller or equal to the + * cumulative TSN. + */ + tsn_map &= (~0 << (1 - offset)); + } + selector = &sack_array[tsn_map]; if (mergeable && selector->right_edge) { /* * Backup, left and right edges were @@ -10225,7 +10228,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (selector->num_entries == 0) mergeable = 0; else { - for (j = sel_start; j < selector->num_entries; j++) { + for (j = 0; j < selector->num_entries; j++) { if (mergeable && selector->right_edge) { /* * do a merge by NOT @@ -10258,7 +10261,6 @@ sctp_send_sack(struct sctp_tcb *stcb) /* Reached the limit stop */ break; } - sel_start = 0; offset += 8; } } From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:22:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C675106564A; Sat, 20 Nov 2010 21:22:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0518FC15; Sat, 20 Nov 2010 21:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLMKtH026405; Sat, 20 Nov 2010 21:22:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLMK1n026403; Sat, 20 Nov 2010 21:22:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202122.oAKLMK1n026403@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:22: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: r215591 - 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: Sat, 20 Nov 2010 21:22:21 -0000 Author: tuexen Date: Sat Nov 20 21:22:20 2010 New Revision: 215591 URL: http://svn.freebsd.org/changeset/base/215591 Log: MFC r215199: Don't print an empty line when printing mapping arrays. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Nov 20 21:20:39 2010 (r215590) +++ stable/8/sys/netinet/sctputil.c Sat Nov 20 21:22:20 2010 (r215591) @@ -1212,8 +1212,6 @@ sctp_print_mapping_array(struct sctp_ass printf("Renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); - if (((i + 1) % 16) == 0) - printf("\n"); } if (limit % 16) printf("\n"); From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:24:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041311065696; Sat, 20 Nov 2010 21:24:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6EB08FC13; Sat, 20 Nov 2010 21:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLOHaL026500; Sat, 20 Nov 2010 21:24:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLOHdv026498; Sat, 20 Nov 2010 21:24:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202124.oAKLOHdv026498@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:24: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: r215592 - 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: Sat, 20 Nov 2010 21:24:18 -0000 Author: tuexen Date: Sat Nov 20 21:24:17 2010 New Revision: 215592 URL: http://svn.freebsd.org/changeset/base/215592 Log: MFC r215241: Fix a locking issue reported by brucec@ affecting 1-to-1 style sockets which have not yet been accepted. Modified: stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:22:20 2010 (r215591) +++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:24:17 2010 (r215592) @@ -3464,6 +3464,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, cnt = 0; for ((asoc = LIST_FIRST(&inp->sctp_asoc_list)); asoc != NULL; asoc = nasoc) { + SCTP_TCB_LOCK(asoc); nasoc = LIST_NEXT(asoc, sctp_tcblist); if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { if (asoc->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) { @@ -3471,10 +3472,10 @@ sctp_inpcb_free(struct sctp_inpcb *inp, sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, asoc, NULL); } cnt++; + SCTP_TCB_UNLOCK(asoc); continue; } /* Free associations that are NOT killing us */ - SCTP_TCB_LOCK(asoc); if ((SCTP_GET_STATE(&asoc->asoc) != SCTP_STATE_COOKIE_WAIT) && ((asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0)) { struct mbuf *op_err; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:36:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3573C1065672; Sat, 20 Nov 2010 21:36:13 +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 23FF08FC13; Sat, 20 Nov 2010 21:36: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 oAKLaDC0027137; Sat, 20 Nov 2010 21:36:13 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLaDn4027135; Sat, 20 Nov 2010 21:36:13 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011202136.oAKLaDn4027135@svn.freebsd.org> From: Colin Percival Date: Sat, 20 Nov 2010 21:36: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: r215593 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:36:13 -0000 Author: cperciva Date: Sat Nov 20 21:36:12 2010 New Revision: 215593 URL: http://svn.freebsd.org/changeset/base/215593 Log: Unifdef XEN. This file is only compiled with the XEN kernel option set, and the !XEN bits get in the way of understanding the code. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat Nov 20 21:24:17 2010 (r215592) +++ head/sys/i386/xen/pmap.c Sat Nov 20 21:36:12 2010 (r215593) @@ -218,9 +218,6 @@ extern u_int32_t KERNend; #ifdef PAE pt_entry_t pg_nx; -#if !defined(XEN) -static uma_zone_t pdptzone; -#endif #endif static int pat_works; /* Is page attribute table sane? */ @@ -322,13 +319,6 @@ static void pmap_kenter_attr(vm_offset_t static __inline void pagezero(void *page); -#if defined(PAE) && !defined(XEN) -static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); -#endif -#ifndef XEN -static void pmap_set_pg(void); -#endif - CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -559,47 +549,6 @@ pmap_init_pat(void) wrmsr(MSR_PAT, pat_msr); } -#ifndef XEN -/* - * Set PG_G on kernel pages. Only the BSP calls this when SMP is turned on. - */ -static void -pmap_set_pg(void) -{ - pd_entry_t pdir; - pt_entry_t *pte; - vm_offset_t va, endva; - int i; - - if (pgeflag == 0) - return; - - i = KERNLOAD/NBPDR; - endva = KERNBASE + KERNend; - - if (pseflag) { - va = KERNBASE + KERNLOAD; - while (va < endva) { - pdir = kernel_pmap->pm_pdir[KPTDI+i]; - pdir |= pgeflag; - kernel_pmap->pm_pdir[KPTDI+i] = PTD[KPTDI+i] = pdir; - invltlb(); /* Play it safe, invltlb() every time */ - i++; - va += NBPDR; - } - } else { - va = (vm_offset_t)btext; - while (va < endva) { - pte = vtopte(va); - if (*pte & PG_V) - *pte |= pgeflag; - invltlb(); /* Play it safe, invltlb() every time */ - va += PAGE_SIZE; - } - } -} -#endif - /* * Initialize a vm_page's machine-dependent fields. */ @@ -611,18 +560,6 @@ pmap_page_init(vm_page_t m) m->md.pat_mode = PAT_WRITE_BACK; } -#if defined(PAE) && !defined(XEN) -static void * -pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - - /* Inform UMA that this allocator uses kernel_map/object. */ - *flags = UMA_SLAB_KERNEL; - return ((void *)kmem_alloc_contig(kernel_map, bytes, wait, 0x0ULL, - 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); -} -#endif - /* * ABuse the pte nodes for unmapped kva to thread a kva freelist through. * Requirements: @@ -745,12 +682,6 @@ pmap_init(void) if (pv_chunkbase == NULL) panic("pmap_init: not enough kvm for pv chunks"); pmap_ptelist_init(&pv_vafree, pv_chunkbase, pv_maxchunks); -#if defined(PAE) && !defined(XEN) - pdptzone = uma_zcreate("PDPT", NPGPTD * sizeof(pdpt_entry_t), NULL, - NULL, NULL, NULL, (NPGPTD * sizeof(pdpt_entry_t)) - 1, - UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_zone_set_allocf(pdptzone, pmap_pdpt_allocf); -#endif } @@ -1541,18 +1472,9 @@ pmap_pinit(pmap_t pmap) PMAP_LOCK_DESTROY(pmap); return (0); } -#if defined(XEN) && defined(PAE) +#ifdef PAE pmap->pm_pdpt = (pd_entry_t *)kmem_alloc_nofault(kernel_map, 1); #endif - -#if defined(PAE) && !defined(XEN) - pmap->pm_pdpt = uma_zalloc(pdptzone, M_WAITOK | M_ZERO); - KASSERT(((vm_offset_t)pmap->pm_pdpt & - ((NPGPTD * sizeof(pdpt_entry_t)) - 1)) == 0, - ("pmap_pinit: pdpt misaligned")); - KASSERT(pmap_kextract((vm_offset_t)pmap->pm_pdpt) < (4ULL<<30), - ("pmap_pinit: pdpt above 4g")); -#endif } /* @@ -1581,11 +1503,9 @@ pmap_pinit(pmap_t pmap) bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); #ifdef PAE -#ifdef XEN pmap_qenter((vm_offset_t)pmap->pm_pdpt, &ptdpg[NPGPTD], 1); if ((ptdpg[NPGPTD]->flags & PG_ZERO) == 0) bzero(pmap->pm_pdpt, PAGE_SIZE); -#endif for (i = 0; i < NPGPTD; i++) { vm_paddr_t ma; @@ -1594,7 +1514,6 @@ pmap_pinit(pmap_t pmap) } #endif -#ifdef XEN for (i = 0; i < NPGPTD; i++) { pt_entry_t *pd; vm_paddr_t ma; @@ -1619,7 +1538,6 @@ pmap_pinit(pmap_t pmap) } xen_flush_queue(); vm_page_unlock_queues(); -#endif pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -1845,15 +1763,11 @@ pmap_release(pmap_t pmap) vm_page_t m, ptdpg[2*NPGPTD+1]; vm_paddr_t ma; int i; -#ifdef XEN #ifdef PAE int npgptd = NPGPTD + 1; #else int npgptd = NPGPTD; #endif -#else - int npgptd = NPGPTD; -#endif KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1867,7 +1781,7 @@ pmap_release(pmap_t pmap) for (i = 0; i < NPGPTD; i++) ptdpg[i] = PHYS_TO_VM_PAGE(vtophys(pmap->pm_pdir + (i*NPDEPG)) & PG_FRAME); pmap_qremove((vm_offset_t)pmap->pm_pdir, NPGPTD); -#if defined(PAE) && defined(XEN) +#ifdef PAE ptdpg[NPGPTD] = PHYS_TO_VM_PAGE(vtophys(pmap->pm_pdpt)); #endif @@ -2616,21 +2530,10 @@ retry: #endif if (pbits != obits) { -#ifdef XEN obits = *pte; PT_SET_VA_MA(pte, pbits, TRUE); if (*pte != pbits) goto retry; -#else -#ifdef PAE - if (!atomic_cmpset_64(pte, obits, pbits)) - goto retry; -#else - if (!atomic_cmpset_int((u_int *)pte, obits, - pbits)) - goto retry; -#endif -#endif if (obits & PG_G) pmap_invalidate_page(pmap, sva); else @@ -4242,8 +4145,6 @@ pmap_align_superpage(vm_object_t object, *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } -#ifdef XEN - void pmap_suspend() { @@ -4306,8 +4207,6 @@ pmap_resume() } } -#endif - #if defined(PMAP_DEBUG) pmap_pid_dump(int pid) { From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:39:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB261065694; Sat, 20 Nov 2010 21:39:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3168FC15; Sat, 20 Nov 2010 21:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLd8cA027232; Sat, 20 Nov 2010 21:39:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLd8i7027230; Sat, 20 Nov 2010 21:39:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202139.oAKLd8i7027230@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:39: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: r215594 - 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: Sat, 20 Nov 2010 21:39:08 -0000 Author: tuexen Date: Sat Nov 20 21:39:08 2010 New Revision: 215594 URL: http://svn.freebsd.org/changeset/base/215594 Log: MFC r215301: Simplify sctp_delayed_cksum() a bit. Modified: stable/8/sys/netinet/sctp_crc32.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_crc32.c ============================================================================== --- stable/8/sys/netinet/sctp_crc32.c Sat Nov 20 21:36:12 2010 (r215593) +++ stable/8/sys/netinet/sctp_crc32.c Sat Nov 20 21:39:08 2010 (r215594) @@ -124,18 +124,16 @@ sctp_delayed_cksum(struct mbuf *m, uint3 #if defined(SCTP_WITH_NO_CSUM) panic("sctp_delayed_cksum() called when using no SCTP CRC."); #else - struct ip *ip; uint32_t checksum; - ip = mtod(m, struct ip *); checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - (uint32_t) m->m_len, offset, ip->ip_p); + printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + (uint32_t) m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:41:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E77D1065670; Sat, 20 Nov 2010 21:41:07 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1748FC0A; Sat, 20 Nov 2010 21:41: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 oAKLf7JF027322; Sat, 20 Nov 2010 21:41:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLf7sG027320; Sat, 20 Nov 2010 21:41:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202141.oAKLf7sG027320@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:41: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: r215595 - 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: Sat, 20 Nov 2010 21:41:07 -0000 Author: tuexen Date: Sat Nov 20 21:41:07 2010 New Revision: 215595 URL: http://svn.freebsd.org/changeset/base/215595 Log: MFC r215305: Take out special code for disable CRC computations on the loopback interface for IPv6. It will be handled by the loopback interface. Modified: stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:39:08 2010 (r215594) +++ stable/8/sys/netinet/sctp_output.c Sat Nov 20 21:41:07 2010 (r215595) @@ -4069,15 +4069,9 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && - (stcb) && - (stcb->asoc.loopback_scope))) { - m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; - SCTP_STAT_INCR(sctps_sendhwcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); #endif } /* send it out. table id is taken from stcb */ From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 21:44:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922D11065675; Sat, 20 Nov 2010 21:44:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 759F98FC1A; Sat, 20 Nov 2010 21:44: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 oAKLiIEh027433; Sat, 20 Nov 2010 21:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLiIJt027429; Sat, 20 Nov 2010 21:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011202144.oAKLiIJt027429@svn.freebsd.org> From: Michael Tuexen Date: Sat, 20 Nov 2010 21:44: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: r215596 - 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: Sat, 20 Nov 2010 21:44:18 -0000 Author: tuexen Date: Sat Nov 20 21:44:18 2010 New Revision: 215596 URL: http://svn.freebsd.org/changeset/base/215596 Log: MFC r215410: Add an SCTP socket option to retrieve the number of timeouts of an association. Modified: stable/8/sys/netinet/sctp.h stable/8/sys/netinet/sctp_uio.h stable/8/sys/netinet/sctp_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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp.h ============================================================================== --- stable/8/sys/netinet/sctp.h Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp.h Sat Nov 20 21:44:18 2010 (r215596) @@ -123,6 +123,7 @@ struct sctp_paramhdr { #define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ +#define SCTP_TIMEOUTS 0x00000106 /* * user socket options: BSD implementation specific Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp_uio.h Sat Nov 20 21:44:18 2010 (r215596) @@ -563,6 +563,17 @@ struct sctp_sack_info { uint32_t sack_freq; }; +struct sctp_timeouts { + sctp_assoc_t stimo_assoc_id; + uint32_t stimo_init; + uint32_t stimo_data; + uint32_t stimo_sack; + uint32_t stimo_shutdown; + uint32_t stimo_heartbeat; + uint32_t stimo_cookie; + uint32_t stimo_shutdownack; +}; + struct sctp_cwnd_args { struct sctp_nets *net; /* network to *//* FIXME: LP64 issue */ uint32_t cwnd_new_value;/* cwnd in k */ Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 21:41:07 2010 (r215595) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Nov 20 21:44:18 2010 (r215596) @@ -2441,6 +2441,29 @@ flags_out: *optsize = sizeof(*srto); } break; + case SCTP_TIMEOUTS: + { + struct sctp_timeouts *stimo; + + SCTP_CHECK_AND_CAST(stimo, optval, struct sctp_timeouts, *optsize); + SCTP_FIND_STCB(inp, stcb, stimo->stimo_assoc_id); + + if (stcb) { + stimo->stimo_init = stcb->asoc.timoinit; + stimo->stimo_data = stcb->asoc.timodata; + stimo->stimo_sack = stcb->asoc.timosack; + stimo->stimo_shutdown = stcb->asoc.timoshutdown; + stimo->stimo_heartbeat = stcb->asoc.timoheartbeat; + stimo->stimo_cookie = stcb->asoc.timocookie; + stimo->stimo_shutdownack = stcb->asoc.timoshutdownack; + SCTP_TCB_UNLOCK(stcb); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); + error = EINVAL; + } + *optsize = sizeof(*stimo); + } + break; case SCTP_ASSOCINFO: { struct sctp_assocparams *sasoc; From owner-svn-src-all@FreeBSD.ORG Sat Nov 20 22:30:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F8A6106566B; Sat, 20 Nov 2010 22:30:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B968FC08; Sat, 20 Nov 2010 22:30: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 oAKMUAhd028485; Sat, 20 Nov 2010 22:30:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKMUA5s028483; Sat, 20 Nov 2010 22:30:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011202230.oAKMUA5s028483@svn.freebsd.org> From: Alan Cox Date: Sat, 20 Nov 2010 22:30: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: r215597 - 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, 20 Nov 2010 22:30:10 -0000 Author: alc Date: Sat Nov 20 22:30:09 2010 New Revision: 215597 URL: http://svn.freebsd.org/changeset/base/215597 Log: Optimize vm_object_terminate(). Reviewed by: kib MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Nov 20 21:44:18 2010 (r215596) +++ head/sys/vm/vm_object.c Sat Nov 20 22:30:09 2010 (r215597) @@ -661,7 +661,7 @@ vm_object_destroy(vm_object_t object) void vm_object_terminate(vm_object_t object) { - vm_page_t p; + vm_page_t p, p_next; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -701,22 +701,41 @@ vm_object_terminate(vm_object_t object) object->ref_count)); /* - * Now free any remaining pages. For internal objects, this also - * removes them from paging queues. Don't free wired pages, just - * remove them from the object. + * Free any remaining pageable pages. This also removes them from the + * paging queues. However, don't free wired pages, just remove them + * from the object. Rather than incrementally removing each page from + * the object, the page and object are reset to any empty state. */ - while ((p = TAILQ_FIRST(&object->memq)) != NULL) { + TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, - ("vm_object_terminate: freeing busy page %p " - "p->busy = %d, p->oflags %x\n", p, p->busy, p->oflags)); + ("vm_object_terminate: freeing busy page %p", p)); vm_page_lock(p); + /* + * Optimize the page's removal from the object by resetting + * its "object" field. Specifically, if the page is not + * wired, then the effect of this assignment is that + * vm_page_free()'s call to vm_page_remove() will return + * immediately without modifying the page or the object. + */ + p->object = NULL; if (p->wire_count == 0) { vm_page_free(p); PCPU_INC(cnt.v_pfree); - } else - vm_page_remove(p); + } vm_page_unlock(p); } + /* + * If the object contained any pages, then reset it to an empty state. + * None of the object's fields, including "resident_page_count", were + * modified by the preceding loop. + */ + if (object->resident_page_count != 0) { + object->root = NULL; + TAILQ_INIT(&object->memq); + object->resident_page_count = 0; + if (object->type == OBJT_VNODE) + vdrop(object->handle); + } #if VM_NRESERVLEVEL > 0 if (__predict_false(!LIST_EMPTY(&object->rvq)))