From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 04:26:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AEA71065670; Sun, 7 Mar 2010 04:26:22 +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 1A3B88FC0C; Sun, 7 Mar 2010 04:26: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 o274QL3q035948; Sun, 7 Mar 2010 04:26:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o274QL7k035946; Sun, 7 Mar 2010 04:26:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003070426.o274QL7k035946@svn.freebsd.org> From: Doug Barton Date: Sun, 7 Mar 2010 04:26: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: r204818 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 04:26:22 -0000 Author: dougb Date: Sun Mar 7 04:26:21 2010 New Revision: 204818 URL: http://svn.freebsd.org/changeset/base/204818 Log: Implement the idea of parallel-only-at-start-time in a cleaner, more rc.d'ish way. Not objected to by: netchild Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Sun Mar 7 02:04:59 2010 (r204817) +++ head/etc/rc.d/jail Sun Mar 7 04:26:21 2010 (r204818) @@ -18,6 +18,8 @@ name="jail" rcvar=`set_rcvar` + +start_precmd="jail_prestart" start_cmd="jail_start" stop_cmd="jail_stop" @@ -545,6 +547,13 @@ jail_ips() done } +jail_prestart() +{ + if checkyesno jail_parallel_start; then + command_args='&' + fi +} + jail_start() { echo -n 'Configuring jails:' @@ -730,18 +739,4 @@ if [ -n "$*" ]; then jail_list="$*" fi -# Only allow the parallel start of jails, other commands are not -# safe to execute in parallel. -case "${cmd}" in -*start) - ;; -*) - jail_parallel_start=NO -esac - -if checkyesno jail_parallel_start; then - run_rc_command "${cmd}" & -else - run_rc_command "${cmd}" -fi - +run_rc_command "${cmd}" From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 07:59:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81822106564A; Sun, 7 Mar 2010 07:59:05 +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 6EF4A8FC17; Sun, 7 Mar 2010 07:59: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 o277x5Yd085828; Sun, 7 Mar 2010 07:59:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o277x5Pc085818; Sun, 7 Mar 2010 07:59:05 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003070759.o277x5Pc085818@svn.freebsd.org> From: Joel Dahl Date: Sun, 7 Mar 2010 07:59: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: r204819 - in head: bin/setfacl lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 07:59:05 -0000 Author: joel (doc committer) Date: Sun Mar 7 07:59:05 2010 New Revision: 204819 URL: http://svn.freebsd.org/changeset/base/204819 Log: Switch to our preferred license text. Approved by: jedgar Modified: head/bin/setfacl/file.c head/bin/setfacl/mask.c head/bin/setfacl/merge.c head/bin/setfacl/remove.c head/bin/setfacl/setfacl.1 head/bin/setfacl/setfacl.c head/bin/setfacl/setfacl.h head/bin/setfacl/util.c head/lib/libc/posix1e/acl_strip.c Modified: head/bin/setfacl/file.c ============================================================================== --- head/bin/setfacl/file.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/file.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/bin/setfacl/mask.c ============================================================================== --- head/bin/setfacl/mask.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/mask.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/bin/setfacl/merge.c ============================================================================== --- head/bin/setfacl/merge.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/merge.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/bin/setfacl/remove.c ============================================================================== --- head/bin/setfacl/remove.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/remove.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/bin/setfacl/setfacl.1 ============================================================================== --- head/bin/setfacl/setfacl.1 Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/setfacl.1 Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE -.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -.\" POSSIBILITY OF SUCH DAMAGE. +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" Modified: head/bin/setfacl/setfacl.c ============================================================================== --- head/bin/setfacl/setfacl.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/setfacl.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/bin/setfacl/setfacl.h ============================================================================== --- head/bin/setfacl/setfacl.h Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/setfacl.h Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * $FreeBSD$ */ Modified: head/bin/setfacl/util.c ============================================================================== --- head/bin/setfacl/util.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/bin/setfacl/util.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: head/lib/libc/posix1e/acl_strip.c ============================================================================== --- head/lib/libc/posix1e/acl_strip.c Sun Mar 7 04:26:21 2010 (r204818) +++ head/lib/libc/posix1e/acl_strip.c Sun Mar 7 07:59:05 2010 (r204819) @@ -14,14 +14,14 @@ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 08:30:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEF98106566B; Sun, 7 Mar 2010 08:30:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AED278FC0C; Sun, 7 Mar 2010 08:30: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 o278ULBw092830; Sun, 7 Mar 2010 08:30:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o278ULFZ092828; Sun, 7 Mar 2010 08:30:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003070830.o278ULFZ092828@svn.freebsd.org> From: Ed Schouten Date: Sun, 7 Mar 2010 08:30: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: r204820 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 08:30:21 -0000 Author: ed Date: Sun Mar 7 08:30:21 2010 New Revision: 204820 URL: http://svn.freebsd.org/changeset/base/204820 Log: Install termcap.small. Right now we have a termcap.small in the tree, but we don't install it. If we do install this file by default, it is more likely for applications to work in single user mode. I am not entirely happy with the contents of this file. In my opinion we should remove the `dosansi', `pc' and `pc3' entries and replace them with `vt100' in case someone uses a serial console. The file does already have entries for `cons25' and `xterm', which is used most often. Requested by: brucec Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sun Mar 7 07:59:05 2010 (r204819) +++ head/etc/Makefile Sun Mar 7 08:30:21 2010 (r204820) @@ -18,7 +18,7 @@ BIN1= auth.conf \ rc rc.bsdextended rc.firewall rc.initdiskless \ rc.sendmail rc.shutdown \ rc.subr remote rpc services shells \ - sysctl.conf syslog.conf + sysctl.conf syslog.conf termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 08:54:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77AB91065672; Sun, 7 Mar 2010 08:54:06 +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 671D48FC25; Sun, 7 Mar 2010 08:54: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 o278s6QS098000; Sun, 7 Mar 2010 08:54:06 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o278s60e097998; Sun, 7 Mar 2010 08:54:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003070854.o278s60e097998@svn.freebsd.org> From: Ed Schouten Date: Sun, 7 Mar 2010 08:54: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: r204821 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 08:54:06 -0000 Author: ed Date: Sun Mar 7 08:54:06 2010 New Revision: 204821 URL: http://svn.freebsd.org/changeset/base/204821 Log: Improve the contents of termcap.small. - Remove dosansi, pc and pc3. I suspect nobody ever needs these. - Add vt100, screen and xterm-color. This file is now probably more than sufficient in most cases, even for common use outside single user mode, where people just use the console driver, a graphical terminal emulator and a terminal multiplexer. Modified: head/etc/termcap.small Modified: head/etc/termcap.small ============================================================================== --- head/etc/termcap.small Sun Mar 7 08:30:21 2010 (r204820) +++ head/etc/termcap.small Sun Mar 7 08:54:06 2010 (r204821) @@ -203,93 +203,46 @@ cons60l7|cons60-iso8859-7:\ :li#60:tc=cons25l7: cons60l7-m|cons60-iso8859-7-mono:\ :li#60:tc=cons25l7-m: -# -dosansi|ANSI.SYS standard crt:\ - :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\ - :do=\E[B:li#25:mi:nd=\E[C:\ - :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\ - :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ - :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\ - :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\ - :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED: -# The following is a version of the ibm-pc entry distributed with PC/IX, -# (Interactive Systems' System 3 for the Big Blue), modified by Richard -# McIntosh at UCB/CSM. The :pt: and :uc: have been removed from the original, -# (the former is untrue, and the latter failed under UCB/man); standout and -# underline modes have been added. Note: this entry describes the "native" -# capabilities of the PC monochrome display, without ANY emulation; most -# communications packages (but NOT PC/IX connect) do some kind of emulation. -pc|ibmpc|ibm pc PC/IX:\ - :li#24:co#80:am:bs:bw:eo:\ - :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\ - :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m: -pc3|ibmpc3|IBM PC 386BSD Console:\ - :Co#8:\ - :DO=\E[%dB:\ - :F1=\E[W:\ - :F2=\E[X:\ - :K1=\E[H:\ - :K2=\E[I:\ - :K3=\E[E:\ - :K4=\E[F:\ - :K5=\E[G:\ - :LE=\E[%dD:\ - :RI=\E[%dC:\ - :AB=\E[1;%dx:\ - :AF=\E[2;%dx:\ - :UP=\E[%dA:\ - :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\ - :am:\ - :bl=^G:\ - :bs:\ - :cb=\E[1K:\ - :cd=\E[J:\ - :ce=\E[K:\ - :cl=\E[H\E[J:\ - :cm=\E[%i%d;%dH:\ - :co#80:\ - :cr=^M:\ - :do=\E[B:\ - :ho=\E[H:\ - :is=\E[m:\ - :it#8:\ - :k;=\E[V:\ - :k1=\E[M:\ - :k2=\E[N:\ - :k3=\E[O:\ - :k4=\E[P:\ - :k5=\E[Q:\ - :k6=\E[R:\ - :k7=\E[S:\ - :k8=\E[T:\ - :k9=\E[U:\ - :kD=\177:\ - :@7=\E[F:\ - :kN=\E[G:\ - :kP=\E[I:\ - :kb=\177:\ - :kd=\E[B:\ - :kh=\E[H:\ - :kl=\E[D:\ - :kr=\E[C:\ - :ku=\E[A:\ - :le=^H:\ - :li#25:\ - :ms:\ - :nd=\E[C:\ - :op=\E[x:\ - :pa#64:\ - :rs=\E[m:\ - :se=\E[m:\ - :sf=\E[S:\ - :so=\E[7;1r\E[7m:\ - :sr=\E[T:\ - :ta=^I:\ - :te=\E[m:\ - :ti=\E[m:\ - :up=\E[A:\ - :ut: +SC|screen|VT 100/ANSI X3.64 virtual terminal:\ + :am:xn:ms:mi:G0:km:\ + :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ + :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ + :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ + :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ + :li#24:co#80:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\ + :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:sr=\EM:al=\E[L:\ + :AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\ + :DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\ + :ks=\E[?1h\E=:ke=\E[?1l\E>:vb=\Eg:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\ + :F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:\ + :F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\ + :kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\ + :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\ + :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ + :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ + :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00: + +vt100|dec-vt100|vt100-am|vt100am|dec vt100:\ + :do=2\E[B:co#80:li#24:cl=50\E[H\E[J:sf=2*\ED:\ + :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\ + :is=\E>\E[?1;3;4;5l\E[?7;8h\E[1;24r\E[24;1H:\ + :if=/usr/share/tabset/vt100:nw=2\EE:ho=\E[H:\ + :as=2\E(0:ae=2\E(B:\ + :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||:\ + :rs=\E>\E[?1;3;4;5l\E[?7;8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=\177:\ + :k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOt:\ + :k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:@8=\EOM:\ + :K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:pt:sr=2*\EM:xn:\ + :sc=2\E7:rc=2\E8:cs=5\E[%i%d;%dr:UP=2\E[%dA:DO=2\E[%dB:RI=2\E[%dC:\ + :LE=2\E[%dD:ct=2\E[3g:st=2\EH:ta=^I:ms:bl=^G:cr=^M:eo:it#8:\ + :RA=\E[?7l:SA=\E[?7h:po=\E[5i:pf=\E[4i: # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $ # @@ -325,3 +278,38 @@ xterm|X11 terminal emulator:\ xterm-clear:\ :te=\E[?1049l:ti=\E[?1049h:\ :tc=xterm-new: +# +# This should work for the commonly used "color xterm" variations (XFree86 +# xterm, color_xterm, nxterm, rxvt). Note that it does not set 'bce', so for +# XFree86 and rxvt, some applications that use colors will be less efficient, +# and in a few special cases (with "smart" optimization) the wrong color will +# be painted in spots. +xterm-color|generic "ANSI" color xterm:\ + :Co#8:NC@:pa#64:\ + :AB=\E[4%dm:AF=\E[3%dm:ac=:op=\E[m:tc=xterm-r6: +# +# Compatible with the X11R6.3 xterm +xterm-r6|xterm-old|X11R6 xterm:\ + :am:bs:km:mi:ms:pt:xn:\ + :co#80:kn#20:li#24:\ + :*6=\E[4~:@0=\E[1~:@7=\E[4~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\ + :DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:\ + :F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:\ + :FA=\E[34~:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:\ + :as=^N:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:\ + :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:eA=\E)0:ei=\E[4l:\ + :ho=\E[H:im=\E[4h:\ + :is=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ + :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\ + :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\ + :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\EOB:\ + :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ + :ku=\EOA:md=\E[1m:me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:\ + :rc=\E8:rs=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8:\ + :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:\ + :ue=\E[m:up=\E[A:us=\E[4m: +# +# Add the capability to "clear the screen" after exiting vi, more/less, etc. +xterm-r6-clear:\ + :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[m:\ + :tc=xterm-r6: From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 10:08:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0F01065675; Sun, 7 Mar 2010 10:08:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B8B98FC21; Sun, 7 Mar 2010 10:08: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 o27A80Vi014601; Sun, 7 Mar 2010 10:08:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27A80wC014578; Sun, 7 Mar 2010 10:08:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201003071008.o27A80wC014578@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 7 Mar 2010 10:08: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: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:08:01 -0000 Author: obrien Date: Sun Mar 7 10:08:00 2010 New Revision: 204824 URL: http://svn.freebsd.org/changeset/base/204824 Log: Look for "compile" to decide if this is run as part of the kernel build. The assumption of "${ARCH}/compile/FOO" is much harder to change in our build (so assume one hasn't), then assuming every kernel is rooted at "sys/". Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Mar 7 09:52:35 2010 (r204823) +++ head/sys/conf/newvers.sh Sun Mar 7 10:08:00 2010 (r204824) @@ -88,15 +88,15 @@ v=`cat version` u=${USER:-root} d=`pwd` i=`${MAKE:-make} -V KERN_IDENT` case "$d" in -*/sys/*) +*/compile/*) SRCDIR=${d##*obj} if [ -n "$MACHINE" ]; then SRCDIR=${SRCDIR##/$MACHINE} fi - SRCDIR=${SRCDIR%%/sys/*} + SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) for dir in /bin /usr/bin /usr/local/bin; do - if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then + if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion break fi @@ -107,7 +107,7 @@ case "$d" in done if [ -n "$svnversion" ] ; then - svn=" r`cd ${SRCDIR}/sys && $svnversion`" + svn=" r`cd ${SRCDIR} && $svnversion`" fi if [ -n "$git_cmd" ] ; then git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 10:43:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0685106566C; Sun, 7 Mar 2010 10:43:03 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6688FC15; Sun, 7 Mar 2010 10:43:03 +0000 (UTC) Received: from outgoing.leidinger.net (pD954FC7A.dip.t-dialin.net [217.84.252.122]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 9589C844956; Sun, 7 Mar 2010 11:42:58 +0100 (CET) Received: from unknown (unknown [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id D72E850F1; Sun, 7 Mar 2010 11:42:55 +0100 (CET) Date: Sun, 7 Mar 2010 11:42:54 +0100 From: Alexander Leidinger To: Doug Barton Message-ID: <20100307114254.00004897@unknown> In-Reply-To: <4B92AFE7.4040200@FreeBSD.org> References: <201003051434.o25EYXBR024375@svn.freebsd.org> <20100306162535.000078b8@unknown> <4B92AFE7.4040200@FreeBSD.org> X-Mailer: Claws Mail 3.7.2cvs15 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 9589C844956.00CAC X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1268563379.55125@O6ZbCxYqziMp1vdolnfrRw X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:43:03 -0000 On Sat, 06 Mar 2010 11:41:27 -0800 Doug Barton wrote: > On 3/6/2010 7:25 AM, Alexander Leidinger wrote: > > The trick with command_args is neat, but it is a pitfall in case > > someone wants to use it in the future. Wouldn't it be better to add > > the ampersand to it instead of letting the ampersand replace the > > value? > > Yes, obviously if someone wants to use command_args for an additional > purpose down the road changes will have to be made. It's not in use > atm however, so IMO simpler is better. In general I agree to KISS, but the change now would be command_args="${command_args}&" which is not complex at all and is safer for the future. Bye, Alexander. From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 10:43:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD9A1106566C; Sun, 7 Mar 2010 10:43:45 +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 CD18F8FC12; Sun, 7 Mar 2010 10: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 o27AhjZp023637; Sun, 7 Mar 2010 10:43:45 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27Ahjtn023635; Sun, 7 Mar 2010 10:43:45 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003071043.o27Ahjtn023635@svn.freebsd.org> From: Ed Schouten Date: Sun, 7 Mar 2010 10: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: r204825 - head/sys/compat/linprocfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:43:46 -0000 Author: ed Date: Sun Mar 7 10:43:45 2010 New Revision: 204825 URL: http://svn.freebsd.org/changeset/base/204825 Log: Make /proc/self/fd `work'. On Linux, /proc//fd is comparable to fdescfs, where it allows you to inspect the file descriptors used by each process. Glibc's ttyname() works by performing a readlink() on these nodes, since all nodes in this directory are symlinks. It is a bit hard to implement this in linprocfs right now, so I am not going to bother. Add a way to make ttyname(3) work, by adding a /proc//fd symlink, which points to /dev/fd only if the calling process matches. When fdescfs is mounted, this will cause the readlink() in ttyname() to fail, causing it to fall back on manually finding a matching node in /dev. Discussed on: emulation@ Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sun Mar 7 10:08:00 2010 (r204824) +++ head/sys/compat/linprocfs/linprocfs.c Sun Mar 7 10:43:45 2010 (r204825) @@ -1245,6 +1245,20 @@ linprocfs_domodules(PFS_FILL_ARGS) #endif /* + * Filler function for proc/pid/fd + */ +static int +linprocfs_dofdescfs(PFS_FILL_ARGS) +{ + + if (p == curproc) + sbuf_printf(sb, "/dev/fd"); + else + sbuf_printf(sb, "unknown"); + return (0); +} + +/* * Constructor */ static int @@ -1312,6 +1326,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "status", &linprocfs_doprocstatus, NULL, NULL, NULL, PFS_RD); + pfs_create_link(dir, "fd", &linprocfs_dofdescfs, + NULL, NULL, NULL, 0); /* /proc/scsi/... */ dir = pfs_create_dir(root, "scsi", NULL, NULL, NULL, 0); From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 10:46:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF524106566C; Sun, 7 Mar 2010 10:46:32 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7278FC0A; Sun, 7 Mar 2010 10:46:32 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 612F41396DB; Sun, 7 Mar 2010 12:46:27 +0200 (EET) Date: Sun, 7 Mar 2010 12:46:27 +0200 From: Jaakko Heinonen To: "Andrey A. Chernov" Message-ID: <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> References: <201003061921.o26JLv36014114@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003061921.o26JLv36014114@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:46:32 -0000 On 2010-03-06, Andrey A. Chernov wrote: > > 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" > and POSIX uniq(1) description). Although a file with lines longer than LINE_MAX isn't a text file by POSIX definition I don't think that POSIX requires uniq(1) to reject non-POSIX text files. Thus I would like to keep the support for longer lines. -- Jaakko From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 10:47:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31EAC106566C; Sun, 7 Mar 2010 10:47:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 218178FC15; Sun, 7 Mar 2010 10:47: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 o27AlmSe024576; Sun, 7 Mar 2010 10:47:48 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27AlmYu024574; Sun, 7 Mar 2010 10:47:48 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003071047.o27AlmYu024574@svn.freebsd.org> From: Robert Watson Date: Sun, 7 Mar 2010 10:47: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: r204826 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:47:48 -0000 Author: rwatson Date: Sun Mar 7 10:47:47 2010 New Revision: 204826 URL: http://svn.freebsd.org/changeset/base/204826 Log: Make udp_set_kernel_tunneling() less forgiving when its invariants are violated: so_pcb can never be NULL for a valid UDP socket, and it is always SOCK_DGRAM. Use sotoinpcb() as the rest of the UDP code does. MFC after: 1 week Reviewed by: bz Sponsored by: Juniper Networks Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Mar 7 10:43:45 2010 (r204825) +++ head/sys/netinet/udp_usrreq.c Sun Mar 7 10:47:47 2010 (r204826) @@ -1430,7 +1430,7 @@ udp_attach(struct socket *so, int proto, return (error); } - inp = (struct inpcb *)so->so_pcb; + inp = sotoinpcb(so); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = V_ip_defttl; @@ -1453,17 +1453,10 @@ udp_set_kernel_tunneling(struct socket * struct inpcb *inp; struct udpcb *up; - KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: !dgram")); - KASSERT(so->so_pcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); - if (so->so_type != SOCK_DGRAM) { - /* Not UDP socket... sorry! */ - return (ENOTSUP); - } - inp = (struct inpcb *)so->so_pcb; - if (inp == NULL) { - /* NULL INP? */ - return (EINVAL); - } + KASSERT(so->so_type == SOCK_DGRAM, + ("udp_set_kernel_tunneling: !dgram")); + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("udp_set_kernel_tunneling: inp == NULL")); INP_WLOCK(inp); up = intoudpcb(inp); if (up->u_tun_func != NULL) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 11:52:18 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E07E3106566B; Sun, 7 Mar 2010 11:52:18 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id E512B8FC0C; Sun, 7 Mar 2010 11:52:15 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o27BqCuT045997; Sun, 7 Mar 2010 14:52:12 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1267962733; bh=3Zz9A0iLsv7ZYTr18tsVK52vf23sUxbWqz+3rsQ08f8=; l=1139; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=TqD7tRlRLqoWRZXDRKhOs1Nj+2vIj2BHakxZ6ZSgF4Mwk6XzxrBjer1EU6lMENZHa gmeciR+8Dzha9ksk1nP+EKAN9VlgLIv5QnGktLrPQAlOwEXNTsoLJwAjGfOXL8qWfw HGiqcs4kffXIaOBBU2PVTAe7JjheQs8TBiQufubQ= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o27BqC6L045996; Sun, 7 Mar 2010 14:52:12 +0300 (MSK) (envelope-from ache) Date: Sun, 7 Mar 2010 14:52:11 +0300 From: Andrey Chernov To: Jaakko Heinonen Message-ID: <20100307115210.GA45796@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 11:52:19 -0000 On Sun, Mar 07, 2010 at 12:46:27PM +0200, Jaakko Heinonen wrote: > On 2010-03-06, Andrey A. Chernov wrote: > > 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" > > and POSIX uniq(1) description). > > Although a file with lines longer than LINE_MAX isn't a text file by > POSIX definition I don't think that POSIX requires uniq(1) to reject > non-POSIX text files. Thus I would like to keep the support for longer > lines. Strictly speaking, POSIX says that uniq(1) (among others) supposed to work with text files. Keeping it working with non-text ones too will be an _extension_, not covered by POSIX. But thinking about your suggestion the question immediately arises: how much "longer lines"? say, up to 6x times? up part of memory avaliable? up to size_t max? etc. Any sort of limit still will remains the limit, but we already have POSIX limit for that. I don't see much sense to replace one limit with the same kind of it, but, say, 2x bigger. Moreover, very big limits will cause security risk easily producing lack of resources (memory). -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 12:04:19 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6979F10656B4; Sun, 7 Mar 2010 12:04:19 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 812FB8FC0C; Sun, 7 Mar 2010 12:04:18 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o27C4GmQ046280; Sun, 7 Mar 2010 15:04:16 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1267963456; bh=AoahMvbh2DP4GpPc7E2aLKUTccTYgIltP9Jm0jJ6Dn0=; l=1479; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=c7VfOj9n4JWckOODL9e3/g3XkQM8sg2Tkxdpge/gSqehc5+DfFlwSph6gou94acAL ar71i+9/f55yvWc42seq9GsPqZDOKmlPzmZDDavub6hp5atmv/uBl1P3lKigrbEmjR DDQdmMiTU7gW/gOLZx1KPP/40gzJTnxup3hJC2U0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o27C4FCm046279; Sun, 7 Mar 2010 15:04:16 +0300 (MSK) (envelope-from ache) Date: Sun, 7 Mar 2010 15:04:14 +0300 From: Andrey Chernov To: Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100307120414.GB45796@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100307115210.GA45796@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307115210.GA45796@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Additionally (was Re: svn commit: r204803 - head/usr.bin/uniq) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 12:04:19 -0000 On Sun, Mar 07, 2010 at 02:52:11PM +0300, Andrey Chernov wrote: > On Sun, Mar 07, 2010 at 12:46:27PM +0200, Jaakko Heinonen wrote: > > On 2010-03-06, Andrey A. Chernov wrote: > > > 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" > > > and POSIX uniq(1) description). > > > > Although a file with lines longer than LINE_MAX isn't a text file by > > POSIX definition I don't think that POSIX requires uniq(1) to reject > > non-POSIX text files. Thus I would like to keep the support for longer > > lines. > > Strictly speaking, POSIX says that uniq(1) (among others) supposed to work > with text files. Keeping it working with non-text ones too will be an > _extension_, not covered by POSIX. > > But thinking about your suggestion the question immediately arises: how > much "longer lines"? say, up to 6x times? up part of memory avaliable? up > to size_t max? etc. > > Any sort of limit still will remains the limit, but we already have POSIX > limit for that. I don't see much sense to replace one limit with the same > kind of it, but, say, 2x bigger. > > Moreover, very big limits will cause security risk easily producing lack > of resources (memory). If you feel that current LINE_MAX 2048 is too low limit, the proper fix will be to bump it, but allowing uncontrollable grown lines leads to denial-of-service attacks (not exhausted memory only but infinite swap too). -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 14:13:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 626621065672; Sun, 7 Mar 2010 14:13:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 519AE8FC1A; Sun, 7 Mar 2010 14:13: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 o27EDxk4070243; Sun, 7 Mar 2010 14:13:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27EDxXX070241; Sun, 7 Mar 2010 14:13:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003071413.o27EDxXX070241@svn.freebsd.org> From: Robert Watson Date: Sun, 7 Mar 2010 14:13: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: r204829 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 14:13:59 -0000 Author: rwatson Date: Sun Mar 7 14:13:59 2010 New Revision: 204829 URL: http://svn.freebsd.org/changeset/base/204829 Log: Add comment in tcp_discardcb() talking about how we don't, but should, address TCP races relating to not calling tcp_drain() on stopped callouts. Discussed with: bz Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Mar 7 12:41:42 2010 (r204828) +++ head/sys/netinet/tcp_subr.c Sun Mar 7 14:13:59 2010 (r204829) @@ -835,8 +835,19 @@ tcp_discardcb(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); /* - * Make sure that all of our timers are stopped before we - * delete the PCB. + * Make sure that all of our timers are stopped before we delete the + * PCB. + * + * XXXRW: Really, we would like to use callout_drain() here in order + * to avoid races experienced in tcp_timer.c where a timer is already + * executing at this point. However, we can't, both because we're + * running in a context where we can't sleep, and also because we + * hold locks required by the timers. What we instead need to do is + * test to see if callout_drain() is required, and if so, defer some + * portion of the remainder of tcp_discardcb() to an asynchronous + * context that can callout_drain() and then continue. Some care + * will be required to ensure that no further processing takes place + * on the tcpcb, even though it hasn't been freed (a flag?). */ callout_stop(&tp->t_timers->tt_rexmt); callout_stop(&tp->t_timers->tt_persist); From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 14:23:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF6EC106566C; Sun, 7 Mar 2010 14:23:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEB5D8FC17; Sun, 7 Mar 2010 14:23: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 o27ENiwT072430; Sun, 7 Mar 2010 14:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27ENihe072428; Sun, 7 Mar 2010 14:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003071423.o27ENihe072428@svn.freebsd.org> From: Robert Watson Date: Sun, 7 Mar 2010 14:23: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: r204830 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 14:23:45 -0000 Author: rwatson Date: Sun Mar 7 14:23:44 2010 New Revision: 204830 URL: http://svn.freebsd.org/changeset/base/204830 Log: Locking the tcbinfo structure should not be necessary in tcp_timer_delack(), so don't. MFC after: 1 week Reviewed by: bz Sponsored by: Juniper Networks Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Sun Mar 7 14:13:59 2010 (r204829) +++ head/sys/netinet/tcp_timer.c Sun Mar 7 14:23:44 2010 (r204830) @@ -162,7 +162,6 @@ tcp_timer_delack(void *xtp) struct inpcb *inp; CURVNET_SET(tp->t_vnet); - INP_INFO_RLOCK(&V_tcbinfo); inp = tp->t_inpcb; /* * XXXRW: While this assert is in fact correct, bugs in the tcpcb @@ -173,12 +172,10 @@ tcp_timer_delack(void *xtp) */ if (inp == NULL) { tcp_timer_race++; - INP_INFO_RUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); return; } INP_WLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_delack) || !callout_active(&tp->t_timers->tt_delack)) { INP_WUNLOCK(inp); From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 14:55:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D69A91065797; Sun, 7 Mar 2010 14:55:43 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5D658FC1E; Sun, 7 Mar 2010 14:55: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 o27EtheI079463; Sun, 7 Mar 2010 14:55:43 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27EthaA079461; Sun, 7 Mar 2010 14:55:43 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201003071455.o27EthaA079461@svn.freebsd.org> From: Antoine Brodin Date: Sun, 7 Mar 2010 14:55: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: r204833 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 14:55:43 -0000 Author: antoine Date: Sun Mar 7 14:55:43 2010 New Revision: 204833 URL: http://svn.freebsd.org/changeset/base/204833 Log: Remove old documents when they are not compressed. (NO_INFOCOMPRESS, NO_DOCCOMPRESS or NO_MANCOMPRESS) MFC after: 1 month Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 7 14:31:57 2010 (r204832) +++ head/Makefile.inc1 Sun Mar 7 14:55:43 2010 (r204833) @@ -1259,7 +1259,7 @@ delete-old-files: @echo ">>> Removing old files (only deletes safe to delete libs)" # Ask for every old file if the user really wants to remove it. # It's annoying, but better safe than sorry. - @for file in ${OLD_FILES}; do \ + @for file in ${OLD_FILES} ${OLD_FILES:Musr/share/*.gz:R}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}"; \ @@ -1279,7 +1279,7 @@ delete-old-files: check-old-files: @echo ">>> Checking for old files" - @for file in ${OLD_FILES}; do \ + @for file in ${OLD_FILES} ${OLD_FILES:Musr/share/*.gz:R}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:08:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C555106566C; Sun, 7 Mar 2010 15:08:43 +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 0B5D58FC1A; Sun, 7 Mar 2010 15:08: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 o27F8gRR082549; Sun, 7 Mar 2010 15:08:42 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27F8gTg082547; Sun, 7 Mar 2010 15:08:42 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003071508.o27F8gTg082547@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 7 Mar 2010 15:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204836 - head/tools/regression/bin/sh/parser X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:08:43 -0000 Author: jilles Date: Sun Mar 7 15:08:42 2010 New Revision: 204836 URL: http://svn.freebsd.org/changeset/base/204836 Log: sh: Add various testcases for here documents. They are mainly about expansions in here documents but because all the testcases are in $() command substitution, we also test that $() command substitution is recursively parsed (or very close to it). Added: head/tools/regression/bin/sh/parser/heredoc1.0 (contents, props changed) Added: head/tools/regression/bin/sh/parser/heredoc1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/heredoc1.0 Sun Mar 7 15:08:42 2010 (r204836) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$(cat < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32211065673; Sun, 7 Mar 2010 15:09:00 +0000 (UTC) (envelope-from brucec@muon.cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2808FC15; Sun, 7 Mar 2010 15:09:00 +0000 (UTC) Received: by muon.cran.org.uk (Postfix, from userid 1000) id 8B80E9222; Sun, 7 Mar 2010 15:09:10 +0000 (UTC) Date: Sun, 7 Mar 2010 15:09:10 +0000 From: Bruce Cran To: "Bjoern A. Zeeb" Message-ID: <20100307150909.GA6554@muon.cran.org.uk> References: <201003062127.o26LRQ6J042057@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003062127.o26LRQ6J042057@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204808 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:09:00 -0000 On Sat, Mar 06, 2010 at 09:27:26PM +0000, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Mar 6 21:27:26 2010 > New Revision: 204808 > URL: http://svn.freebsd.org/changeset/base/204808 > > Log: > Introduce a function rn_detachhead() that will free the > radix table root nodes. This is only needed (and available) > in the virtualization case to free the resources when tearing > down a virtual network stack. > > Sponsored by: ISPsystem > Reviewed by: julian, zec > MFC after: 5 days > > Modified: > head/sys/net/radix.c > head/sys/net/radix.h > > Modified: head/sys/net/radix.c > ============================================================================== > --- head/sys/net/radix.c Sat Mar 6 21:24:32 2010 (r204807) > +++ head/sys/net/radix.c Sat Mar 6 21:27:26 2010 (r204808) > @@ -1161,6 +1161,24 @@ rn_inithead(head, off) > return (1); > } > > +#ifdef VIMAGE > +int > +rn_detachhead(void **head) > +{ > + struct radix_node_head *rnh; > + > + KASSERT((head != NULL && *head != NULL), > + ("%s: head already freed", __func__)); > + rnh = *head; > + > + /* Free nodes. */ > + Free(rnh); > + > + *head = NULL; > + return (1); > +} > +#endif Is this sufficient to free all the memory? From what I can see, 'Free' is just freeing the pointer and not walking the tree to free the nodes too. I don't know if the memory allocation is being done differently, but I fixed the same issue on Windows by introducing a 'rn_free_subtree' function - I don't know if it's entirely correct but the code can be seen at http://www.bluestop.org/viewvc/repos/sctpDrv/net/radix.c?r1=24&r2=23&pathrev=24 I also found that rn_zeros wasn't being freed when the driver got unloaded. -- Bruce Cran From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:17:45 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18CCF106564A; Sun, 7 Mar 2010 15:17:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 866118FC1D; Sun, 7 Mar 2010 15:17:44 +0000 (UTC) Received: from c122-106-145-171.carlnfd1.nsw.optusnet.com.au (c122-106-145-171.carlnfd1.nsw.optusnet.com.au [122.106.145.171]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o27FHfDs013475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Mar 2010 02:17:42 +1100 Date: Mon, 8 Mar 2010 02:17:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jaakko Heinonen In-Reply-To: <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> Message-ID: <20100308015926.O11669@delplex.bde.org> References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> 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, "Andrey A. Chernov" Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:17:45 -0000 On Sun, 7 Mar 2010, Jaakko Heinonen wrote: > On 2010-03-06, Andrey A. Chernov wrote: >> >> 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" >> and POSIX uniq(1) description). This seems to enforce a limit of LINE_MAX - 1, since space for the NUL terminator is no longer provided. Hopfully there is no buffer overrun from this. > Although a file with lines longer than LINE_MAX isn't a text file by > POSIX definition I don't think that POSIX requires uniq(1) to reject > non-POSIX text files. Thus I would like to keep the support for longer > lines. There was a long discussion about this in the Opengroup list recently. An example in POSIX has an off-by-2 error instead of the above off-by-1 error, since its buffer size is only LINE_MAX and it loses an extra 1 by putting the terminating newline in the buffer. The example is also bad in using LINE_MAX, since {LINE_MAX} is not necessarily constant. Dynamic allocation is required to use sysconf(__SC_LINE_MAX) and once you do that it is almost as easy to support arbitrary line lengths like FreeBSD used to. Old versions of FreeBSD didn't have any of the dynamic allocation, or the off-by-1 error, or the new (as I remember) error handling of aborting for long lines; they silently discarded characters after the LINE_MAX'th one. Bruce. From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:20:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5FEE10656B1; Sun, 7 Mar 2010 15:20:08 +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 7AB638FC1E; Sun, 7 Mar 2010 15:20:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id DC12F41C64A; Sun, 7 Mar 2010 16:20:06 +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 x1HQWp7TLYXC; Sun, 7 Mar 2010 16:20:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 0DBB741C667; Sun, 7 Mar 2010 16:20: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 9E4A64448EC; Sun, 7 Mar 2010 15:15:28 +0000 (UTC) Date: Sun, 7 Mar 2010 15:15:28 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Bruce Cran In-Reply-To: <20100307150909.GA6554@muon.cran.org.uk> Message-ID: <20100307151125.P33454@maildrop.int.zabbadoz.net> References: <201003062127.o26LRQ6J042057@svn.freebsd.org> <20100307150909.GA6554@muon.cran.org.uk> 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: r204808 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:20:09 -0000 On Sun, 7 Mar 2010, Bruce Cran wrote: > On Sat, Mar 06, 2010 at 09:27:26PM +0000, Bjoern A. Zeeb wrote: >> Author: bz >> Date: Sat Mar 6 21:27:26 2010 >> New Revision: 204808 >> URL: http://svn.freebsd.org/changeset/base/204808 >> >> Log: >> Introduce a function rn_detachhead() that will free the >> radix table root nodes. This is only needed (and available) >> in the virtualization case to free the resources when tearing >> down a virtual network stack. >> >> Sponsored by: ISPsystem >> Reviewed by: julian, zec >> MFC after: 5 days >> >> Modified: >> head/sys/net/radix.c >> head/sys/net/radix.h >> >> Modified: head/sys/net/radix.c >> ============================================================================== >> --- head/sys/net/radix.c Sat Mar 6 21:24:32 2010 (r204807) >> +++ head/sys/net/radix.c Sat Mar 6 21:27:26 2010 (r204808) >> @@ -1161,6 +1161,24 @@ rn_inithead(head, off) >> return (1); >> } >> >> +#ifdef VIMAGE >> +int >> +rn_detachhead(void **head) >> +{ >> + struct radix_node_head *rnh; >> + >> + KASSERT((head != NULL && *head != NULL), >> + ("%s: head already freed", __func__)); >> + rnh = *head; >> + >> + /* Free nodes. */ >> + Free(rnh); >> + >> + *head = NULL; >> + return (1); >> +} >> +#endif > > Is this sufficient to free all the memory? From what I can see, 'Free' is > just freeing the pointer and not walking the tree to free the nodes too. > > I don't know if the memory allocation is being done differently, but I > fixed the same issue on Windows by introducing a 'rn_free_subtree' > function - I don't know if it's entirely correct but the code can be > seen at http://www.bluestop.org/viewvc/repos/sctpDrv/net/radix.c?r1=24&r2=23&pathrev=24 > > I also found that rn_zeros wasn't being freed when the driver got > unloaded. You will notice that it's not called from anywhere yet;) I have another dozen of patches to fix various places and free things. Freeing of the tree is (will be) done from route.c (from my memory). I am just flushing the "easy" ones from my patch queue while slowly reaching timeout for the others that I had sent out for review. In case you want to have a look at the complete set send me a mail to bz@ and I'll forward you the remaining set. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:33:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE20D106566C; Sun, 7 Mar 2010 15:33:51 +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 60F638FC0C; Sun, 7 Mar 2010 15:33:50 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 682E6730A1; Sun, 7 Mar 2010 16:43:20 +0100 (CET) Date: Sun, 7 Mar 2010 16:43:20 +0100 From: Luigi Rizzo To: "Bjoern A. Zeeb" Message-ID: <20100307154320.GA17292@onelab2.iet.unipi.it> References: <201003062127.o26LRQ6J042057@svn.freebsd.org> <20100307150909.GA6554@muon.cran.org.uk> <20100307151125.P33454@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307151125.P33454@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: Bruce Cran , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204808 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:33:51 -0000 On Sun, Mar 07, 2010 at 03:15:28PM +0000, Bjoern A. Zeeb wrote: > On Sun, 7 Mar 2010, Bruce Cran wrote: > > >On Sat, Mar 06, 2010 at 09:27:26PM +0000, Bjoern A. Zeeb wrote: > >>Author: bz > >>Date: Sat Mar 6 21:27:26 2010 > >>New Revision: 204808 > >>URL: http://svn.freebsd.org/changeset/base/204808 > >> > >>Log: > >> Introduce a function rn_detachhead() that will free the > >> radix table root nodes. This is only needed (and available) > >> in the virtualization case to free the resources when tearing > >> down a virtual network stack. > >> > >> Sponsored by: ISPsystem > >> Reviewed by: julian, zec > >> MFC after: 5 days > >> > >>Modified: > >> head/sys/net/radix.c > >> head/sys/net/radix.h > >> > >>Modified: head/sys/net/radix.c > >>============================================================================== > >>--- head/sys/net/radix.c Sat Mar 6 21:24:32 2010 (r204807) > >>+++ head/sys/net/radix.c Sat Mar 6 21:27:26 2010 (r204808) > >>@@ -1161,6 +1161,24 @@ rn_inithead(head, off) > >> return (1); > >> } > >> > >>+#ifdef VIMAGE > >>+int > >>+rn_detachhead(void **head) > >>+{ > >>+ struct radix_node_head *rnh; > >>+ > >>+ KASSERT((head != NULL && *head != NULL), > >>+ ("%s: head already freed", __func__)); > >>+ rnh = *head; > >>+ > >>+ /* Free nodes. */ > >>+ Free(rnh); > >>+ > >>+ *head = NULL; > >>+ return (1); > >>+} > >>+#endif > > > >Is this sufficient to free all the memory? From what I can see, 'Free' is > >just freeing the pointer and not walking the tree to free the nodes too. > > > >I don't know if the memory allocation is being done differently, but I > >fixed the same issue on Windows by introducing a 'rn_free_subtree' > >function - I don't know if it's entirely correct but the code can be > >seen at > >http://www.bluestop.org/viewvc/repos/sctpDrv/net/radix.c?r1=24&r2=23&pathrev=24 > > > >I also found that rn_zeros wasn't being freed when the driver got > >unloaded. > > You will notice that it's not called from anywhere yet;) > > I have another dozen of patches to fix various places and free things. > Freeing of the tree is (will be) done from route.c (from my memory). > > I am just flushing the "easy" ones from my patch queue while slowly > reaching timeout for the others that I had sent out for review. > In case you want to have a look at the complete set send me a mail to > bz@ and I'll forward you the remaining set. given that you are looking at the radix.c code, here is one thing to figure out and either document or fix: the code uses a number of static variables: static int max_keylen; static struct radix_mask *rn_mkfreelist; static struct radix_node_head *mask_rnhead; static char *rn_zeros, *rn_ones, *addmask_key; and I am not quite sure of how many of them are subject to races. I managed to understand (and document) that max_keylen, rn_zeros and rn_ones are safe because they are effectively readonly. But the remaining two look a bit dangerous to me, and i have no idea where and how they get used in our code. The radix code is used for ipfw "tables", which are not protected by the same lock as the routing code. Also what about different vimages, do they run multiple instances of the routing code ? cheers luigi From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:37:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB49106566B; Sun, 7 Mar 2010 15:37:59 +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 3FA468FC0C; Sun, 7 Mar 2010 15:37: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 o27Fbxur089050; Sun, 7 Mar 2010 15:37:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27Fbx19089044; Sun, 7 Mar 2010 15:37:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003071537.o27Fbx19089044@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 7 Mar 2010 15:37: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: r204837 - in head/sys: net netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:37:59 -0000 Author: bz Date: Sun Mar 7 15:37:58 2010 New Revision: 204837 URL: http://svn.freebsd.org/changeset/base/204837 Log: Not only flush the ipfw tables when unloading ipfw or tearing down a virtual netowrk stack, but also free the Radix Node Head. Sponsored by: ISPsystem Reviewed by: julian MFC after: 5 days Modified: head/sys/net/radix.c head/sys/net/radix.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_private.h head/sys/netinet/ipfw/ip_fw_table.c Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Sun Mar 7 15:08:42 2010 (r204836) +++ head/sys/net/radix.c Sun Mar 7 15:37:58 2010 (r204837) @@ -1161,7 +1161,6 @@ rn_inithead(head, off) return (1); } -#ifdef VIMAGE int rn_detachhead(void **head) { @@ -1177,7 +1176,6 @@ rn_detachhead(void **head) *head = NULL; return (1); } -#endif void rn_init(int maxk) Modified: head/sys/net/radix.h ============================================================================== --- head/sys/net/radix.h Sun Mar 7 15:08:42 2010 (r204836) +++ head/sys/net/radix.h Sun Mar 7 15:37:58 2010 (r204837) @@ -162,9 +162,7 @@ struct radix_node_head { void rn_init(int); int rn_inithead(void **, int); -#ifdef VIMAGE int rn_detachhead(void **); -#endif int rn_refines(void *, void *); struct radix_node *rn_addmask(void *, int, int), Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Mar 7 15:08:42 2010 (r204836) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Mar 7 15:37:58 2010 (r204837) @@ -2392,7 +2392,7 @@ vnet_ipfw_uninit(const void *unused) IPFW_WLOCK(chain); ipfw_dyn_uninit(0); /* run the callout_drain */ - ipfw_flush_tables(chain); + ipfw_destroy_tables(chain); reap = NULL; for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Sun Mar 7 15:08:42 2010 (r204836) +++ head/sys/netinet/ipfw/ip_fw_private.h Sun Mar 7 15:37:58 2010 (r204837) @@ -272,6 +272,7 @@ struct radix_node; int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val); int ipfw_init_tables(struct ip_fw_chain *ch); +void ipfw_destroy_tables(struct ip_fw_chain *ch); int ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl); void ipfw_flush_tables(struct ip_fw_chain *ch); int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, Modified: head/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_table.c Sun Mar 7 15:08:42 2010 (r204836) +++ head/sys/netinet/ipfw/ip_fw_table.c Sun Mar 7 15:37:58 2010 (r204837) @@ -203,6 +203,21 @@ ipfw_init_tables(struct ip_fw_chain *ch) return (0); } +void +ipfw_destroy_tables(struct ip_fw_chain *ch) +{ + int tbl; + struct radix_node_head *rnh; + + IPFW_WLOCK_ASSERT(ch); + + ipfw_flush_tables(ch); + for (tbl = 0; tbl < IPFW_TABLES_MAX; tbl++) { + rnh = ch->tables[tbl]; + rn_detachhead((void **)&rnh); + } +} + int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val) From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 15:58:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B19C106566B; Sun, 7 Mar 2010 15:58:45 +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 3FDC88FC0C; Sun, 7 Mar 2010 15:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o27FwjsZ093632; Sun, 7 Mar 2010 15:58:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27Fwjxq093626; Sun, 7 Mar 2010 15:58:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003071558.o27Fwjxq093626@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 7 Mar 2010 15:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204838 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 15:58:45 -0000 Author: bz Date: Sun Mar 7 15:58:44 2010 New Revision: 204838 URL: http://svn.freebsd.org/changeset/base/204838 Log: Destroy TCP UMA zones (empty or not) upon network stack teardown to not leak them, otherwise making UMA/vmstat unhappy with every stoped vnet. We will still leak pages (especially for zones marked NOFREE). Reshuffle cleanup order in tcp_destroy() to get rid of what we can easily free first. Sponsored by: ISPsystem Reviewed by: rwatson MFC after: 5 days Modified: head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Sun Mar 7 15:37:58 2010 (r204837) +++ head/sys/netinet/tcp_reass.c Sun Mar 7 15:58:44 2010 (r204838) @@ -132,6 +132,15 @@ tcp_reass_init(void) tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY); } +#ifdef VIMAGE +void +tcp_reass_destroy(void) +{ + + uma_zdestroy(V_tcp_reass_zone); +} +#endif + int tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m) { Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Mar 7 15:37:58 2010 (r204837) +++ head/sys/netinet/tcp_subr.c Sun Mar 7 15:58:44 2010 (r204838) @@ -459,15 +459,21 @@ void tcp_destroy(void) { - tcp_tw_destroy(); + tcp_reass_destroy(); tcp_hc_destroy(); syncache_destroy(); + tcp_tw_destroy(); /* XXX check that hashes are empty! */ hashdestroy(V_tcbinfo.ipi_hashbase, M_PCB, V_tcbinfo.ipi_hashmask); hashdestroy(V_tcbinfo.ipi_porthashbase, M_PCB, V_tcbinfo.ipi_porthashmask); + + uma_zdestroy(V_sack_hole_zone); + uma_zdestroy(V_tcpcb_zone); + uma_zdestroy(V_tcbinfo.ipi_zone); + INP_INFO_LOCK_DESTROY(&V_tcbinfo); } #endif Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Sun Mar 7 15:37:58 2010 (r204837) +++ head/sys/netinet/tcp_timewait.c Sun Mar 7 15:58:44 2010 (r204838) @@ -185,6 +185,8 @@ tcp_tw_destroy(void) while((tw = TAILQ_FIRST(&V_twq_2msl)) != NULL) tcp_twclose(tw, 0); INP_INFO_WUNLOCK(&V_tcbinfo); + + uma_zdestroy(V_tcptw_zone); } #endif Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Mar 7 15:37:58 2010 (r204837) +++ head/sys/netinet/tcp_var.h Sun Mar 7 15:58:44 2010 (r204838) @@ -657,6 +657,9 @@ char *tcp_log_addrs(struct in_conninfo const void *); int tcp_reass(struct tcpcb *, struct tcphdr *, int *, struct mbuf *); void tcp_reass_init(void); +#ifdef VIMAGE +void tcp_reass_destroy(void); +#endif void tcp_input(struct mbuf *, int); u_long tcp_maxmtu(struct in_conninfo *, int *); u_long tcp_maxmtu6(struct in_conninfo *, int *); From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 16:45:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D22C1065670; Sun, 7 Mar 2010 16:45:19 +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 2CB968FC0C; Sun, 7 Mar 2010 16:45: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 o27GjIdh004173; Sun, 7 Mar 2010 16:45:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27GjIYs004171; Sun, 7 Mar 2010 16:45:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003071645.o27GjIYs004171@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 7 Mar 2010 16:45: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: r204840 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 16:45:19 -0000 Author: bz Date: Sun Mar 7 16:45:18 2010 New Revision: 204840 URL: http://svn.freebsd.org/changeset/base/204840 Log: As statfs.f_flags are uint64_t the local variables should be as well. We'll start noticing this with the next flag introduced as the lower 32bit are all used. As this is old code we might need to do a full tree sweep one day, unless changing our strategy to use a different `API' for getting/setting flags along with the rest of the statfs data. While here compare to 0 explicitly [1]. Suggested by: kib [1] Reviewed by: kib MFC after: 5 days Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Sun Mar 7 16:24:33 2010 (r204839) +++ head/sbin/mount/mount.c Sun Mar 7 16:45:18 2010 (r204840) @@ -91,7 +91,7 @@ char *flags2opts(int); /* Map from mount options to printable formats. */ static struct opt { - int o_opt; + uint64_t o_opt; const char *o_name; } optnames[] = { { MNT_ASYNC, "asynchronous" }, @@ -612,7 +612,7 @@ mountfs(const char *vfstype, const char void prmount(struct statfs *sfp) { - int flags; + uint64_t flags; unsigned int i; struct opt *o; struct passwd *pw; @@ -621,7 +621,7 @@ prmount(struct statfs *sfp) sfp->f_fstypename); flags = sfp->f_flags & MNT_VISFLAGMASK; - for (o = optnames; flags && o->o_opt; o++) + for (o = optnames; flags != 0 && o->o_opt != 0; o++) if (flags & o->o_opt) { (void)printf(", %s", o->o_name); flags &= ~o->o_opt; From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 18:31:45 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8034106567C; Sun, 7 Mar 2010 18:31:45 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 123B68FC1D; Sun, 7 Mar 2010 18:31:44 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o27IVgS8050632; Sun, 7 Mar 2010 21:31:42 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1267986702; bh=1bYN/Z3kFayxyNLqnziXZyxJWyMEHwfZhJ3sJXt68cc=; l=1704; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=o9ZpNRttrWll7yZOl602UP1IrnQ/yPhvegmvCUNU0+SpAemCjA1yPRVs//lmT7DPG /pbN0+Hq3kdRZ0dnkYFfMcJZARyOB4x364KddpFkoT92iVpntNVUb9UsyHC/CNYUxP 5IOgCPnJA9rFevv9ri6YMoBn4DVukWUwV+x9DkGI= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o27IVeO7050631; Sun, 7 Mar 2010 21:31:42 +0300 (MSK) (envelope-from ache) Date: Sun, 7 Mar 2010 21:31:39 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100307183139.GA50243@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100308015926.O11669@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100308015926.O11669@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, Jaakko Heinonen , svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 18:31:46 -0000 On Mon, Mar 08, 2010 at 02:17:41AM +1100, Bruce Evans wrote: > >> 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" > >> and POSIX uniq(1) description). > > This seems to enforce a limit of LINE_MAX - 1, since space for the NUL > terminator is no longer provided. Hopfully there is no buffer overrun > from this. {LINE_MAX} _includes_ trailing \n separator according to POSIX, so real characters count is {LINE_MAX} - 1. Since we strip \n on read in uniq(1), there is a room for placing \0 appears, so no off-by-1 error. > by putting the terminating newline in the buffer. The example is also > bad in using LINE_MAX, since {LINE_MAX} is not necessarily constant. > Dynamic allocation is required to use sysconf(__SC_LINE_MAX) and once > you do that it is almost as easy to support arbitrary line lengths > like FreeBSD used to. It is right idea. I'll use sysconf(__SC_LINE_MAX) there. But currently it does the same (sysconf.c): case _SC_LINE_MAX: return (LINE_MAX); > Old versions of FreeBSD didn't have any of the dynamic allocation, or > the off-by-1 error, or the new (as I remember) error handling of > aborting for long lines; they silently discarded characters after the > LINE_MAX'th one. To add more: NetBSD uniq grows (contrary, NetBSD comm silently discarding everything afterwards). OpenBSD uniq just use fgets with 8192. GNU uniq grows. Unrestricted growing can provide problems I already mention in previous replies. Silent discarding allows some trick with input and silent wrong handling of them. What is more dangerous - very depends on situation. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 18:43:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6241065670; Sun, 7 Mar 2010 18:43:30 +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 1DF418FC15; Sun, 7 Mar 2010 18:43: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 o27IhUpT030270; Sun, 7 Mar 2010 18:43:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27IhUc8030267; Sun, 7 Mar 2010 18:43:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003071843.o27IhUc8030267@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 7 Mar 2010 18:43: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: r204842 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 18:43:30 -0000 Author: jilles Date: Sun Mar 7 18:43:29 2010 New Revision: 204842 URL: http://svn.freebsd.org/changeset/base/204842 Log: sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}. These expansions, which were already in the Bourne shell, work correctly for the most part. The testcases are only about the parts that already work correctly. Added: head/tools/regression/bin/sh/expansion/assign1.0 (contents, props changed) head/tools/regression/bin/sh/expansion/plus-minus1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/assign1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/assign1.0 Sun Mar 7 18:43:29 2010 (r204842) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'v=; set -- ${v=a b} $v' '0|' +testcase 'unset v; set -- ${v=a b} $v' '4|a|b|a|b' +testcase 'v=; set -- ${v:=a b} $v' '4|a|b|a|b' +testcase 'v=; set -- "${v:=a b}" "$v"' '2|a b|a b' +# expect sensible behaviour, although it disagrees with POSIX +testcase 'v=; set -- ${v:=a\ b} $v' '4|a|b|a|b' +testcase 'v=; set -- ${v:=$p} $v' '2|/etc/|/etc/' +testcase 'v=; set -- "${v:=$p}" "$v"' '2|/et[c]/|/et[c]/' +testcase 'v=; set -- "${v:=a\ b}" "$v"' '2|a\ b|a\ b' +testcase 'v=; set -- ${v:="$p"} $v' '2|/etc/|/etc/' +# whether $p is quoted or not shouldn't really matter +testcase 'v=; set -- "${v:="$p"}" "$v"' '2|/et[c]/|/et[c]/' + +test "x$failures" = x Added: head/tools/regression/bin/sh/expansion/plus-minus1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/plus-minus1.0 Sun Mar 7 18:43:29 2010 (r204842) @@ -0,0 +1,81 @@ +# $FreeBSD$ + +e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' +h='##' +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- a b' '2|a|b' +testcase 'set --' '0|' +testcase 'set -- ${e}' '0|' +testcase 'set -- "${e}"' '1|' + +testcase 'set -- $p' '1|/etc/' +testcase 'set -- "$p"' '1|/et[c]/' +testcase 'set -- ${s+$p}' '1|/etc/' +testcase 'set -- "${s+$p}"' '1|/et[c]/' +testcase 'set -- ${s+"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${s+"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:-$p}' '1|/etc/' +testcase 'set -- "${e:-$p}"' '1|/et[c]/' +testcase 'set -- ${e:-"$p"}' '1|/et[c]/' +# Dquotes in dquotes is undefined for Bourne shell operators +#testcase 'set -- "${e:-"$p"}"' '1|/et[c]/' +testcase 'set -- ${e:+"$e"}' '0|' +testcase 'set -- ${e:+$w"$e"}' '0|' +testcase 'set -- ${w:+"$w"}' '1|a b c' +testcase 'set -- ${w:+$w"$w"}' '3|a|b|ca b c' + +# These two are known broken in FreeBSD /bin/sh +#testcase 'set -- ${s+a b}' '2|a|b' +#testcase 'set -- ${e:-a b}' '2|a|b' +testcase 'set -- "${s+a b}"' '1|a b' +testcase 'set -- "${e:-a b}"' '1|a b' +testcase 'set -- ${e:-\}}' '1|}' +# Currently broken in FreeBSD /bin/sh +#testcase 'set -- "${e:-\}}"' '1|}' +testcase 'set -- ${e:+{}}' '1|}' +testcase 'set -- "${e:+{}}"' '1|}' + +testcase 'set -- ${e+x}${e+x}' '1|xx' +testcase 'set -- "${e+x}"${e+x}' '1|xx' +testcase 'set -- ${e+x}"${e+x}"' '1|xx' +testcase 'set -- "${e+x}${e+x}"' '1|xx' +testcase 'set -- "${e+x}""${e+x}"' '1|xx' + +testcase 'set -- ${e:-${e:-$p}}' '1|/etc/' +testcase 'set -- "${e:-${e:-$p}}"' '1|/et[c]/' +testcase 'set -- ${e:-"${e:-$p}"}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-"$p"}}' '1|/et[c]/' +testcase 'set -- ${e:-${e:-${e:-$w}}}' '3|a|b|c' +testcase 'set -- ${e:-${e:-${e:-"$w"}}}' '1|a b c' +testcase 'set -- ${e:-${e:-"${e:-$w}"}}' '1|a b c' +testcase 'set -- ${e:-"${e:-${e:-$w}}"}' '1|a b c' +testcase 'set -- "${e:-${e:-${e:-$w}}}"' '1|a b c' + +testcase 'shift $#; set -- ${1+"$@"}' '0|' +testcase 'set -- ""; set -- ${1+"$@"}' '1|' +testcase 'set -- "" a; set -- ${1+"$@"}' '2||a' +testcase 'set -- a ""; set -- ${1+"$@"}' '2|a|' +testcase 'set -- a b; set -- ${1+"$@"}' '2|a|b' +testcase 'set -- a\ b; set -- ${1+"$@"}' '1|a b' +testcase 'set -- " " ""; set -- ${1+"$@"}' '2| |' + +test "x$failures" = x From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 20:10:34 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BCCF1065673; Sun, 7 Mar 2010 20:10:34 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id A12B58FC17; Sun, 7 Mar 2010 20:10:33 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o27KATLE051761; Sun, 7 Mar 2010 23:10:29 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1267992630; bh=dcQkSswHT9yWEkPVrJ2lZ9mPNhw8KKorT5NtKKkHH3E=; l=728; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Lgr8hIuJ3TO7+QOFA3ZddRenjybCV1z40cK68ZgCLdSSJKM0dQDiAq27OdD3MY6RB A3Qor63FhX4gSY8xIW0iGhlR/6eqKpaKX8/ElYVKL4dU32b30W5njbZToed254ZrkH geSuP7fYtenpQTNCInTkmnPN97u9qrBvmzls7+U0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o27KASwW051760; Sun, 7 Mar 2010 23:10:29 +0300 (MSK) (envelope-from ache) Date: Sun, 7 Mar 2010 23:10:27 +0300 From: Andrey Chernov To: Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100307201027.GA51623@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100308015926.O11669@delplex.bde.org> <20100307183139.GA50243@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307183139.GA50243@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 20:10:34 -0000 On Sun, Mar 07, 2010 at 09:31:39PM +0300, Andrey Chernov wrote: > It is right idea. I'll use sysconf(__SC_LINE_MAX) there. > But currently it does the same (sysconf.c): > case _SC_LINE_MAX: > return (LINE_MAX); ... > To add more: > NetBSD uniq grows (contrary, NetBSD comm silently discarding everything > afterwards). > OpenBSD uniq just use fgets with 8192. > GNU uniq grows. After thinking a bit more I consider to reimplement unlimited lines here instead because enforcing POSIX limit was not the main goal of my commit (it was to remove getwc() which is evil). Someone may deal with the limit on his own way afterwards. Will be in the next commit. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 21:44:32 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20BFE106566B; Sun, 7 Mar 2010 21:44:32 +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 8B8578FC13; Sun, 7 Mar 2010 21:44:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o27LZuUl063951; Sun, 7 Mar 2010 14:35:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 07 Mar 2010 14:36:19 -0700 (MST) Message-Id: <20100307.143619.510313205755027975.imp@bsdimp.com> To: obrien@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201003071008.o27A80wC014578@svn.freebsd.org> References: <201003071008.o27A80wC014578@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 21:44:32 -0000 In message: <201003071008.o27A80wC014578@svn.freebsd.org> "David E. O'Brien" writes: : Author: obrien : Date: Sun Mar 7 10:08:00 2010 : New Revision: 204824 : URL: http://svn.freebsd.org/changeset/base/204824 : : Log: : Look for "compile" to decide if this is run as part of the kernel build. : The assumption of "${ARCH}/compile/FOO" is much harder to change in our : build (so assume one hasn't), then assuming every kernel is rooted at "sys/". Except buildkernel builds the kernel into $MAKEOBJDIRPREFIX/$ARCH/$PATH_TO_TOP/sys/FOO ($ARCH/ is omitted when building natively). Please back out this change. It is unwise, I think. Warner : Modified: : head/sys/conf/newvers.sh : : Modified: head/sys/conf/newvers.sh : ============================================================================== : --- head/sys/conf/newvers.sh Sun Mar 7 09:52:35 2010 (r204823) : +++ head/sys/conf/newvers.sh Sun Mar 7 10:08:00 2010 (r204824) : @@ -88,15 +88,15 @@ v=`cat version` u=${USER:-root} d=`pwd` : i=`${MAKE:-make} -V KERN_IDENT` : : case "$d" in : -*/sys/*) : +*/compile/*) : SRCDIR=${d##*obj} : if [ -n "$MACHINE" ]; then : SRCDIR=${SRCDIR##/$MACHINE} : fi : - SRCDIR=${SRCDIR%%/sys/*} : + SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) : : for dir in /bin /usr/bin /usr/local/bin; do : - if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then : + if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then : svnversion=${dir}/svnversion : break : fi : @@ -107,7 +107,7 @@ case "$d" in : done : : if [ -n "$svnversion" ] ; then : - svn=" r`cd ${SRCDIR}/sys && $svnversion`" : + svn=" r`cd ${SRCDIR} && $svnversion`" : fi : if [ -n "$git_cmd" ] ; then : git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` : From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 21:54:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A89C1065670; Sun, 7 Mar 2010 21:54:29 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0840D8FC19; Sun, 7 Mar 2010 21:54: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 o27LsSMM075634; Sun, 7 Mar 2010 21:54:28 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27LsSAU075631; Sun, 7 Mar 2010 21:54:28 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003072154.o27LsSAU075631@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 7 Mar 2010 21:54: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: r204849 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 21:54:29 -0000 Author: edwin Date: Sun Mar 7 21:54:28 2010 New Revision: 204849 URL: http://svn.freebsd.org/changeset/base/204849 Log: - document the -3, -A and -B properly in Synopsis. - add highlight of current date for non-terminals. - fix -J option. - code cleanup. MFC after: 2 weeks Modified: head/usr.bin/ncal/ncal.1 head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.1 ============================================================================== --- head/usr.bin/ncal/ncal.1 Sun Mar 7 21:50:40 2010 (r204848) +++ head/usr.bin/ncal/ncal.1 Sun Mar 7 21:54:28 2010 (r204849) @@ -33,24 +33,32 @@ .Nd displays a calendar and the date of Easter .Sh SYNOPSIS .Nm -.Op Fl hjy +.Op Fl 3hjy +.Op Fl A Ar number +.Op Fl B Ar number .Oo .Op Ar month .Ar year .Oc .Nm -.Op Fl hj +.Op Fl 3hj +.Op Fl A Ar number +.Op Fl B Ar number .Fl m Ar month .Op Ar year .Nm ncal -.Op Fl hjJpwy +.Op Fl 3hjJpwy +.Op Fl A Ar number +.Op Fl B Ar number .Op Fl s Ar country_code .Oo .Op Ar month .Ar year .Oc .Nm ncal -.Op Fl hJeo +.Op Fl 3hJeo +.Op Fl A Ar number +.Op Fl B Ar number .Op Ar year .Sh DESCRIPTION The Modified: head/usr.bin/ncal/ncal.c ============================================================================== --- head/usr.bin/ncal/ncal.c Sun Mar 7 21:50:40 2010 (r204848) +++ head/usr.bin/ncal/ncal.c Sun Mar 7 21:54:28 2010 (r204849) @@ -159,10 +159,10 @@ char jdaystr[] = " 1 2 3 4 " 350 351 352 353 354 355 356 357 358 359" " 360 361 362 363 364 365 366"; +int flag_nohighlight; /* user doesn't want a highlighted today */ int flag_weeks; /* user wants number of week */ int nswitch; /* user defined switch date */ int nswitchb; /* switch date for backward compatibility */ -const char *term_so, *term_se; int today; char *center(char *s, char *t, int w); @@ -181,6 +181,7 @@ int sndaysb(struct date * d); static void usage(void); void monthranger(int year, int jd_flag, int m, int before, int after); void monthrangeb(int year, int jd_flag, int m, int before, int after); +void highlight(char *dst, char *src, int len, int *extraletters); int main(int argc, char *argv[]) @@ -204,15 +205,9 @@ main(int argc, char *argv[]) char *flag_highlightdate = NULL; int before, after; const char *locale; /* locale to get country code */ - char tbuf[1024], cbuf[512], *b; - /* On how to highlight on this terminal */ - term_se = term_so = NULL; - if (isatty(STDOUT_FILENO) && tgetent(tbuf, NULL) == 1) { - b = cbuf; - term_so = tgetstr("so", &b); - term_se = tgetstr("se", &b); - } + flag_nohighlight = 0; + flag_weeks = 0; /* * Use locale to determine the country code, @@ -283,7 +278,7 @@ main(int argc, char *argv[]) flag_highlightdate = optarg; break; case 'h': - term_so = term_se = NULL; + flag_nohighlight = 1; break; case 'e': if (flag_backward) @@ -369,6 +364,12 @@ main(int argc, char *argv[]) usage(); } + if (flag_hole_year) { + m = 1; + before = 0; + after = 11; + } + if (flag_month != NULL) { if (parsemonth(flag_month, &m, &y)) { errx(EX_USAGE, @@ -717,33 +718,17 @@ mkmonthr(int y, int m, int jd_flag, stru for (i = 0; i != 7; i++) { l = 0; for (j = firstm + i, k = 0; j < last; j += 7, k += dw) { - if (j == today && - (term_so != NULL && term_se != NULL)) { - l = strlen(term_so); - if (jd_flag) - dt.d = j - jan1 + 1; - else - sdateb(j, &dt); - /* separator */ - mlines->lines[i][k] = ' '; - /* the actual text */ - memcpy(mlines->lines[i] + k + l, - ds + dt.d * dw, dw); - /* highlight on */ - memcpy(mlines->lines[i] + k + 1, term_so, l); - /* highlight off */ - memcpy(mlines->lines[i] + k + l + dw, term_se, - strlen(term_se)); - l = strlen(term_se) + strlen(term_so); - continue; - } if (j >= first) { if (jd_flag) dt.d = j - jan1 + 1; else sdater(j, &dt); - memcpy(mlines->lines[i] + k + l, - ds + dt.d * dw, dw); + if (j == today && !flag_nohighlight) + highlight(mlines->lines[i] + k, + ds + dt.d * dw, dw, &l); + else + memcpy(mlines->lines[i] + k + l, + ds + dt.d * dw, dw); } else memcpy(mlines->lines[i] + k + l, " ", dw); } @@ -837,33 +822,17 @@ mkmonthb(int y, int m, int jd_flag, stru l = 0; for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; j++, k += dw) { - if (j == today && - (term_so != NULL && term_se != NULL)) { - l = strlen(term_so); - if (jd_flag) - dt.d = j - jan1 + 1; - else - sdateb(j, &dt); - /* separator */ - mlines->lines[i][k] = ' '; - /* the actual text */ - memcpy(mlines->lines[i] + k + l, - ds + dt.d * dw, dw); - /* highlight on */ - memcpy(mlines->lines[i] + k + 1, term_so, l); - /* highlight off */ - memcpy(mlines->lines[i] + k + l + dw, term_se, - strlen(term_se)); - l = strlen(term_se) + strlen(term_so); - continue; - } if (j >= first) { if (jd_flag) dt.d = j - jan1 + 1; else sdateb(j, &dt); - memcpy(mlines->lines[i] + k + l, - ds + dt.d * dw, dw); + if (j == today && !flag_nohighlight) + highlight(mlines->lines[i] + k, + ds + dt.d * dw, dw, &l); + else + memcpy(mlines->lines[i] + k + l, + ds + dt.d * dw, dw); } else memcpy(mlines->lines[i] + k + l, " ", dw); } @@ -1031,3 +1000,73 @@ parsemonth(const char *s, int *m, int *y } return (1); } + +void +highlight(char *dst, char *src, int len, int *extralen) +{ + static int first = 1; + static const char *term_so, *term_se; + + if (first) { + char tbuf[1024], cbuf[512], *b; + + term_se = term_so = NULL; + + /* On how to highlight on this type of terminal (if any) */ + if (isatty(STDOUT_FILENO) && tgetent(tbuf, NULL) == 1) { + b = cbuf; + term_so = tgetstr("so", &b); + term_se = tgetstr("se", &b); + } + + first = 0; + } + + /* + * This check is not necessary, should have been handled before calling + * this function. + */ + if (flag_nohighlight) { + memcpy(dst, src, len); + return; + } + + /* If it is a real terminal, use the data from the termcap database. */ + if (term_so != NULL && term_se != NULL) { + /* separator */ + dst[0] = ' '; + dst++; + /* highlight on */ + memcpy(dst, term_so, strlen(term_so)); + dst += strlen(term_so); + /* the actual text (minus leading space) */ + len--; + src++; + memcpy(dst, src, len); + dst += len; + /* highlight off */ + memcpy(dst, term_se, strlen(term_se)); + *extralen = strlen(term_so) + strlen(term_se); + return; + } + + /* + * Otherwise, print a _, backspace and the letter + */ + *extralen = 0; + /* skip leading space */ + src++; + len--; + /* separator */ + dst[0] = ' '; + dst++; + while (len > 0) { + /* _ and backspace */ + memcpy(dst, "_\010", 2); + dst += 2; + *extralen += 2; + /* the character */ + *dst++ = *src++; + len--; + } +} From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 22:37:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F259F106566B; Sun, 7 Mar 2010 22:37:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E11578FC12; Sun, 7 Mar 2010 22:37: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 o27MbZ2A088288; Sun, 7 Mar 2010 22:37:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o27MbZnh088286; Sun, 7 Mar 2010 22:37:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003072237.o27MbZnh088286@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Mar 2010 22:37: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: r204850 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 22:37:36 -0000 Author: imp Date: Sun Mar 7 22:37:35 2010 New Revision: 204850 URL: http://svn.freebsd.org/changeset/base/204850 Log: Bump up the firmware_table from 30 to 50. bwn needs more than 30, it seems. Modified: head/sys/kern/subr_firmware.c Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Sun Mar 7 21:54:28 2010 (r204849) +++ head/sys/kern/subr_firmware.c Sun Mar 7 22:37:35 2010 (r204850) @@ -121,7 +121,7 @@ struct priv_fw { * reallocate the array because pointers are held externally. * A list may work, though. */ -#define FIRMWARE_MAX 30 +#define FIRMWARE_MAX 50 static struct priv_fw firmware_table[FIRMWARE_MAX]; /* From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 23:16:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEC71065673; Sun, 7 Mar 2010 23:16:14 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 3A4CC8FC17; Sun, 7 Mar 2010 23:16:12 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,599,1262559600"; d="txt'?scan'208";a="298507496" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 08 Mar 2010 00:16:11 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 8969C1B0750; Mon, 8 Mar 2010 00:16:11 +0100 (CET) Date: Mon, 08 Mar 2010 00:16:04 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Edwin Groothuis Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-201003072316041e86ffa8000073e1-a_best01+ Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204849 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 23:16:14 -0000 This is a MIME encoded multipart message. --+permail-201003072316041e86ffa8000073e1-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit could you have another look at the -J option? it seems highlighting still isn't enabled in combination with it. also i'm wondering what the purpose of the -b switch is. running `cal` and `ncal -b` seems to be doing the very same thing (setting flag_backward = 1). you might want to consider the following patch. cheers. alex --+permail-201003072316041e86ffa8000073e1-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="ncal.patch.txt" SW5kZXg6IG5jYWwuMQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBuY2FsLjEJKHJldmlzaW9uIDIwNDg1MCkKKysr IG5jYWwuMQkod29ya2luZyBjb3B5KQpAQCAtMTE3LDggKzExNyw2IEBACiBQcmludCB0aGUgbnVt YmVyIG9mIHRoZSB3ZWVrIGJlbG93IGVhY2ggd2VlayBjb2x1bW4uCiAuSXQgRmwgeQogRGlzcGxh eSBhIGNhbGVuZGFyIGZvciB0aGUgc3BlY2lmaWVkIHllYXIuCi0uSXQgRmwgYgotU3dpdGNoIHRv IGJhY2t3YXJkcyBjb21wYXRpYmlsaXR5IG1vZGUgKGZvciBkZWJ1Z2dpbmcpLgogLkl0IEZsIGQg QXIgeXl5eS1tbS1kZAogVXNlCiAuQXIgeXl5eS1tbS1kZApJbmRleDogbmNhbC5jCj09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT0KLS0tIG5jYWwuYwkocmV2aXNpb24gMjA0ODUwKQorKysgbmNhbC5jCSh3b3JraW5nIGNvcHkp CkBAIC0yNzEsOSArMjcxLDYgQEAKIAkJCW5zd2l0Y2ggPSBuZGF5c2ooJm5ldmVyKTsKIAkJCWZs YWdfanVsaWFuX2NhbCA9IDE7CiAJCQlicmVhazsKLQkJY2FzZSAnYic6Ci0JCQlmbGFnX2JhY2t3 YXJkID0gMTsKLQkJCWJyZWFrOwogCQljYXNlICdkJzoKIAkJCWZsYWdfaGlnaGxpZ2h0ZGF0ZSA9 IG9wdGFyZzsKIAkJCWJyZWFrOwpAQCAtNDEyLDggKzQwOSw3IEBACiAJICAgICJ1c2FnZTogY2Fs IFstaGp5XSBbW21vbnRoXSB5ZWFyXVxuIgogCSAgICAiICAgICAgIGNhbCBbLWhqXSBbLW0gbW9u dGhdIFt5ZWFyXVxuIgogCSAgICAiICAgICAgIG5jYWwgWy1oSmpwd3ldIFstcyBjb3VudHJ5X2Nv ZGVdIFtbbW9udGhdIHllYXJdXG4iCi0JICAgICIgICAgICAgbmNhbCBbLWhKZW9dIFt5ZWFyXVxu IgotCSAgICAiZm9yIGRlYnVnIHRoZSBoaWdobGlnaHRpbmc6IFstYl0gWy1kIHl5eXktbW0tZGRd XG4iLAorCSAgICAiICAgICAgIG5jYWwgWy1oSmVvXSBbeWVhcl1cbiIsCiAJICAgIHN0ZGVycik7 CiAJZXhpdChFWF9VU0FHRSk7CiB9Cg== --+permail-201003072316041e86ffa8000073e1-a_best01+-- From owner-svn-src-head@FreeBSD.ORG Sun Mar 7 23:35:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62AD8106566C; Sun, 7 Mar 2010 23:35:28 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from k7.mavetju.org (ppp113-58.static.internode.on.net [150.101.113.58]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5DA8FC12; Sun, 7 Mar 2010 23:35:27 +0000 (UTC) Received: by k7.mavetju.org (Postfix, from userid 1001) id AEF6A451C5; Mon, 8 Mar 2010 10:34:09 +1100 (EST) Date: Mon, 8 Mar 2010 10:34:09 +1100 From: Edwin Groothuis To: Alexander Best Message-ID: <20100307233409.GF2682@mavetju.org> References: 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 Subject: Re: svn commit: r204849 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 23:35:28 -0000 On Mon, Mar 08, 2010 at 12:16:04AM +0100, Alexander Best wrote: > could you have another look at the -J option? it seems highlighting still Aha, only -J in "month only" view is still not working. Will take care of it later. Also add a bunch of regression tests to it, because of all of this. > isn't enabled in combination with it. also i'm wondering what the purpose of > the -b switch is. running `cal` and `ncal -b` seems to be doing the very same > thing (setting flag_backward = 1). You can't run "cal" until you have installed it, while being able to run "ncal -b" and coming into "cal" mode is kind of nice. Edwin -- Edwin Groothuis Website: http://www.mavetju.org/ edwin@mavetju.org Weblog: http://www.mavetju.org/weblog/ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 00:39:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C290106564A; Mon, 8 Mar 2010 00:39:32 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id C279C8FC0A; Mon, 8 Mar 2010 00:39:31 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,599,1262559600"; d="scan'208";a="27851575" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 08 Mar 2010 01:39:30 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 0EDD61B0750; Mon, 8 Mar 2010 01:39:29 +0100 (CET) Date: Mon, 08 Mar 2010 01:39:28 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Edwin Groothuis Message-ID: In-Reply-To: <20100307233409.GF2682@mavetju.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r204849 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 00:39:32 -0000 Edwin Groothuis schrieb am 2010-03-08: > On Mon, Mar 08, 2010 at 12:16:04AM +0100, Alexander Best wrote: > > could you have another look at the -J option? it seems highlighting > > still > Aha, only -J in "month only" view is still not working. Will take > care of it later. Also add a bunch of regression tests to it, because > of all of this. > > isn't enabled in combination with it. also i'm wondering what the > > purpose of > > the -b switch is. running `cal` and `ncal -b` seems to be doing the > > very same > > thing (setting flag_backward = 1). > You can't run "cal" until you have installed it, while being able > to run "ncal -b" and coming into "cal" mode is kind of nice. thanks for the hint. the -b switch definitely comes in handy when `cal` isn't available, because one is running ncal from /usr/src/usr.bin. will the -b switch disappear once you ncal/cal works properly with highlighting? what confused me a little is the output of something like `ncal 10 2011`. judging from ncal(1) i guessed the output to be October of 2011, yet the output is all months from October 2011 to September 2012. i tried `ncal -m 10 2011` instead and the output was just the same. so what's the right way to see the entry for lets say October 2011? another issue i'm having is the -m switch in combination with f and p. judging from ncal(1) `ncal -m 3p` should output February 2010 and `ncal -m 3f` April 2010. however instead of printing the previous and next month the previous and next year gets printed. running `ncal -m 10f` on the other hand behaves even weirder because it prints the same as `ncal -m 10`. alex > Edwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 01:21:32 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2721065670 for ; Mon, 8 Mar 2010 01:21:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 110448FC0C for ; Mon, 8 Mar 2010 01:21:31 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2811PCn006576; Sun, 7 Mar 2010 17:01:25 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2811Pwo006575; Sun, 7 Mar 2010 17:01:25 -0800 (PST) (envelope-from obrien) Date: Sun, 7 Mar 2010 17:01:25 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20100308010125.GA6387@dragon.NUXI.org> References: <201003071008.o27A80wC014578@svn.freebsd.org> <20100307.143619.510313205755027975.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307.143619.510313205755027975.imp@bsdimp.com> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 01:21:32 -0000 On Sun, Mar 07, 2010 at 02:36:19PM -0700, M. Warner Losh wrote: > Please back out this change. It is unwise, I think. Instead I'd rather fix it for the use case you mention. ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- Index: newvers.sh =================================================================== --- newvers.sh (revision 204851) +++ newvers.sh (working copy) @@ -87,13 +87,11 @@ touch version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` +# Are we doing a kernel build? Look for "/sys/" in pwd for 'make kernel', +# and "/compile/" for tradiational within-tree kernel build. case "$d" in -*/compile/*) - SRCDIR=${d##*obj} - if [ -n "$MACHINE" ]; then - SRCDIR=${SRCDIR##/$MACHINE} - fi - SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) +*/sys/*|*/compile/*) + SRCDIR=$(realpath $(dirname $0)/..) for dir in /bin /usr/bin /usr/local/bin; do if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- Do you get the subversion revision in your vers.c file with this patch? -- -- David From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 02:10:54 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A78811065677 for ; Mon, 8 Mar 2010 02:10:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 369BF8FC0C for ; Mon, 8 Mar 2010 02:10:53 +0000 (UTC) Received: (qmail 10953 invoked by uid 399); 8 Mar 2010 02:10:53 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 8 Mar 2010 02:10:53 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B945CAC.9020706@FreeBSD.org> Date: Sun, 07 Mar 2010 18:10:52 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: obrien@FreeBSD.org References: <201003071008.o27A80wC014578@svn.freebsd.org> <20100307.143619.510313205755027975.imp@bsdimp.com> <20100308010125.GA6387@dragon.NUXI.org> In-Reply-To: <20100308010125.GA6387@dragon.NUXI.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 02:10:54 -0000 On 03/07/10 17:01, David O'Brien wrote: > +*/sys/*|*/compile/*) Please revert your previous change, and feel free to add this one instead. I'm a little aggravated because this question of "what if the directory isn't named */sys/*?" was already addressed when I made the change, and the general agreement was that !sys was an edge case that wasn't worth worrying about. I'm even more aggravated that your change doesn't work for the common case. I'm even more aggravated that something so simple continues to be the source of drama. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 11:22:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A28F51065673; Mon, 8 Mar 2010 11:22:47 +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 917EA8FC14; Mon, 8 Mar 2010 11:22: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 o28BMlR7076935; Mon, 8 Mar 2010 11:22:47 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28BMlCo076933; Mon, 8 Mar 2010 11:22:47 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003081122.o28BMlCo076933@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 8 Mar 2010 11:22: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: r204862 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 11:22:47 -0000 Author: luigi Date: Mon Mar 8 11:22:47 2010 New Revision: 204862 URL: http://svn.freebsd.org/changeset/base/204862 Log: do not report an error unnecessarily Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 8 11:19:52 2010 (r204861) +++ head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 8 11:22:47 2010 (r204862) @@ -1485,6 +1485,7 @@ next: /* sched config shouldn't modify the FIFO scheduler */ if (dn_ht_find(dn_cfg.schedhash, i, 0, &a) != NULL) { /* FIFO already exist, don't touch it */ + err = 0; /* and this is not an error */ goto error; } } From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 11:27:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5207C106567D; Mon, 8 Mar 2010 11:27:09 +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 40CF48FC12; Mon, 8 Mar 2010 11:27: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 o28BR99r077993; Mon, 8 Mar 2010 11:27:09 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28BR9f7077990; Mon, 8 Mar 2010 11:27:09 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003081127.o28BR9f7077990@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 8 Mar 2010 11:27: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: r204865 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 11:27:09 -0000 Author: luigi Date: Mon Mar 8 11:27:08 2010 New Revision: 204865 URL: http://svn.freebsd.org/changeset/base/204865 Log: don't use C++ keywords as variable names Modified: head/sys/netinet/ipfw/dn_heap.c head/sys/netinet/ipfw/dn_heap.h Modified: head/sys/netinet/ipfw/dn_heap.c ============================================================================== --- head/sys/netinet/ipfw/dn_heap.c Mon Mar 8 11:25:45 2010 (r204864) +++ head/sys/netinet/ipfw/dn_heap.c Mon Mar 8 11:27:08 2010 (r204865) @@ -323,20 +323,20 @@ struct dn_ht { int ofs; /* offset of link field */ uint32_t (*hash)(uintptr_t, int, void *arg); int (*match)(void *_el, uintptr_t key, int, void *); - void *(*new)(uintptr_t, int, void *); + void *(*newh)(uintptr_t, int, void *); void **ht; /* bucket heads */ }; /* * Initialize, allocating bucket pointers inline. * Recycle previous record if possible. - * If the 'new' function is not supplied, we assume that the + * If the 'newh' function is not supplied, we assume that the * key passed to ht_find is the same object to be stored in. */ struct dn_ht * dn_ht_init(struct dn_ht *ht, int buckets, int ofs, uint32_t (*h)(uintptr_t, int, void *), int (*match)(void *, uintptr_t, int, void *), - void *(*new)(uintptr_t, int, void *)) + void *(*newh)(uintptr_t, int, void *)) { int l; @@ -410,7 +410,7 @@ dn_ht_init(struct dn_ht *ht, int buckets ht->ofs = ofs; ht->hash = h; ht->match = match; - ht->new = new; + ht->newh = newh; } return ht; } @@ -471,8 +471,8 @@ dn_ht_find(struct dn_ht *ht, uintptr_t k } else if (flags & DNHT_INSERT) { // printf("%s before calling new, bucket %d ofs %d\n", // __FUNCTION__, i, ht->ofs); - p = ht->new ? ht->new(key, flags, arg) : (void *)key; - // printf("%s new returns %p\n", __FUNCTION__, p); + p = ht->newh ? ht->newh(key, flags, arg) : (void *)key; + // printf("%s newh returns %p\n", __FUNCTION__, p); if (p) { ht->entries++; *(void **)((char *)p + ht->ofs) = ht->ht[i]; Modified: head/sys/netinet/ipfw/dn_heap.h ============================================================================== --- head/sys/netinet/ipfw/dn_heap.h Mon Mar 8 11:25:45 2010 (r204864) +++ head/sys/netinet/ipfw/dn_heap.h Mon Mar 8 11:27:08 2010 (r204865) @@ -119,7 +119,7 @@ int heap_scan(struct dn_heap *, int (*)( * hash(key, flags, arg) called to return a bucket index. * match(obj, key, flags, arg) called to determine if key * matches the current 'obj' in the heap - * new(key, flags, arg) optional, used to allocate a new + * newh(key, flags, arg) optional, used to allocate a new * object during insertions. * * dn_ht_free() frees the heap or unlink elements. @@ -167,7 +167,7 @@ struct dn_ht; /* should be opaque */ struct dn_ht *dn_ht_init(struct dn_ht *, int buckets, int ofs, uint32_t (*hash)(uintptr_t, int, void *), int (*match)(void *, uintptr_t, int, void *), - void *(*new)(uintptr_t, int, void *)); + void *(*newh)(uintptr_t, int, void *)); void dn_ht_free(struct dn_ht *, int flags); void *dn_ht_find(struct dn_ht *, uintptr_t, int, void *); From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 11:27:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D403A1065670; Mon, 8 Mar 2010 11:27:39 +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 C30FE8FC19; Mon, 8 Mar 2010 11:27: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 o28BRd79078155; Mon, 8 Mar 2010 11:27:39 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28BRdRH078153; Mon, 8 Mar 2010 11:27:39 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003081127.o28BRdRH078153@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 8 Mar 2010 11:27: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: r204866 - head/sys/netinet/ipfw/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 11:27:39 -0000 Author: luigi Date: Mon Mar 8 11:27:39 2010 New Revision: 204866 URL: http://svn.freebsd.org/changeset/base/204866 Log: cosmetic changes and C++ compatibility Modified: head/sys/netinet/ipfw/test/dn_test.h Modified: head/sys/netinet/ipfw/test/dn_test.h ============================================================================== --- head/sys/netinet/ipfw/test/dn_test.h Mon Mar 8 11:27:08 2010 (r204865) +++ head/sys/netinet/ipfw/test/dn_test.h Mon Mar 8 11:27:39 2010 (r204866) @@ -6,6 +6,11 @@ #ifndef _DN_TEST_H #define _DN_TEST_H + +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -24,7 +29,9 @@ extern int debug; if (debug > lev) D(fmt, ## args); } while (0) +#ifndef offsetof #define offsetof(t,m) (int)((&((t *)0L)->m)) +#endif #include @@ -45,6 +52,7 @@ enum { struct dn_id { int type, subtype, len, id; }; + struct dn_fs { int par[4]; /* flowset parameters */ @@ -65,8 +73,10 @@ struct dn_fs { */ int cur; }; + struct dn_sch { }; + struct dn_flow { struct dn_id oid; int length; @@ -76,6 +86,7 @@ struct dn_flow { uint32_t flow_id; struct list_head h; /* used by the generator */ }; + struct dn_link { }; @@ -98,12 +109,15 @@ struct ipfw_flow_id { }; typedef void * module_t; + struct _md_t { const char *name; int (*f)(module_t, int, void *); void *p; }; + typedef struct _md_t moduledata_t; + #define DECLARE_MODULE(name, b, c, d) \ moduledata_t *_g_##name = & b #define MODULE_DEPEND(a, b, c, d, e) @@ -154,4 +168,8 @@ mq_append(struct mq *q, struct mbuf *m) m->m_nextpkt = NULL; } +#ifdef __cplusplus +} +#endif + #endif /* _DN_TEST_H */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 14:43:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80CCE106566C; Mon, 8 Mar 2010 14:43:55 +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 55D198FC17; Mon, 8 Mar 2010 14:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o28EhtjS021548; Mon, 8 Mar 2010 14:43:55 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28Eht60021546; Mon, 8 Mar 2010 14:43:55 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003081443.o28Eht60021546@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 8 Mar 2010 14:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204869 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 14:43:55 -0000 Author: luigi Date: Mon Mar 8 14:43:55 2010 New Revision: 204869 URL: http://svn.freebsd.org/changeset/base/204869 Log: add back DPADD (removed by mistake in a previous commit) Modified: head/sbin/ipfw/Makefile Modified: head/sbin/ipfw/Makefile ============================================================================== --- head/sbin/ipfw/Makefile Mon Mar 8 13:37:14 2010 (r204868) +++ head/sbin/ipfw/Makefile Mon Mar 8 14:43:55 2010 (r204869) @@ -3,6 +3,7 @@ PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c WARNS?= 2 +DPADD= ${LIBUTIL} LDADD= -lutil MAN= ipfw.8 From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 15:01:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F2A106566B; Mon, 8 Mar 2010 15:01:08 +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 756A78FC14; Mon, 8 Mar 2010 15:01: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 o28F18RA025361; Mon, 8 Mar 2010 15:01:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28F18Lg025359; Mon, 8 Mar 2010 15:01:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003081501.o28F18Lg025359@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 8 Mar 2010 15:01: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: r204870 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 15:01:08 -0000 Author: nwhitehorn Date: Mon Mar 8 15:01:08 2010 New Revision: 204870 URL: http://svn.freebsd.org/changeset/base/204870 Log: Enable tmpfs unconditionally on all platforms. No one I spoke to could remember why it was x86 only, and it works just as well on at least powerpc as on x86. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 8 14:43:55 2010 (r204869) +++ head/sys/modules/Makefile Mon Mar 8 15:01:08 2010 (r204870) @@ -273,7 +273,7 @@ SUBDIR= ${_3dfx} \ sysvipc \ ti \ tl \ - ${_tmpfs} \ + tmpfs \ trm \ ${_twa} \ twe \ @@ -416,7 +416,6 @@ _sppp= sppp _stg= stg _streams= streams _svr4= svr4 -_tmpfs= tmpfs _wi= wi _xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) @@ -554,7 +553,6 @@ _sound= sound _speaker= speaker _splash= splash _sppp= sppp -_tmpfs= tmpfs _twa= twa _vesa= vesa _x86bios= x86bios From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 15:34:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95AF2106566B; Mon, 8 Mar 2010 15:34:25 +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 6713C8FC12; Mon, 8 Mar 2010 15:34:25 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 194BE46B51; Mon, 8 Mar 2010 10:34:25 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 6271B8A025; Mon, 8 Mar 2010 10:34:24 -0500 (EST) From: John Baldwin To: Warner Losh Date: Mon, 8 Mar 2010 09:21:34 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003072237.o27MbZnh088286@svn.freebsd.org> In-Reply-To: <201003072237.o27MbZnh088286@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003080921.34274.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Mar 2010 10:34:24 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204850 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 15:34:25 -0000 On Sunday 07 March 2010 5:37:35 pm Warner Losh wrote: > Author: imp > Date: Sun Mar 7 22:37:35 2010 > New Revision: 204850 > URL: http://svn.freebsd.org/changeset/base/204850 > > Log: > Bump up the firmware_table from 30 to 50. bwn needs more than 30, it > seems. Are you sure? The error report I saw was from having firmwares for both bwi(4) and bwn(4) loaded. Both of them use a lot of firmware images, but I don't think either one in isolation uses more than 30. I really think that FIRMWARE_MAX should at the least become a loader tunable and have the array malloc'd either on-demand or via a SYSINIT(). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 16:07:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6E06106566C; Mon, 8 Mar 2010 16:07:20 +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 93D5F8FC16; Mon, 8 Mar 2010 16:07:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o28G0vGh082341; Mon, 8 Mar 2010 09:00:57 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 08 Mar 2010 09:01:21 -0700 (MST) Message-Id: <20100308.090121.4959786962434624.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <201003080921.34274.jhb@freebsd.org> References: <201003072237.o27MbZnh088286@svn.freebsd.org> <201003080921.34274.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204850 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:07:20 -0000 In message: <201003080921.34274.jhb@freebsd.org> John Baldwin writes: : On Sunday 07 March 2010 5:37:35 pm Warner Losh wrote: : > Author: imp : > Date: Sun Mar 7 22:37:35 2010 : > New Revision: 204850 : > URL: http://svn.freebsd.org/changeset/base/204850 : > : > Log: : > Bump up the firmware_table from 30 to 50. bwn needs more than 30, it : > seems. : : Are you sure? The error report I saw was from having firmwares for both : bwi(4) and bwn(4) loaded. Both of them use a lot of firmware images, but I : don't think either one in isolation uses more than 30. You're likely right about that. I know I had been experimenting with both and I had to bump the limit so I could do some A/B testing with bwi/bwn on my cards before the import. : I really think that FIRMWARE_MAX should at the least become a loader tunable : and have the array malloc'd either on-demand or via a SYSINIT(). Completely agreed. Bumping the limit was easy, and the cost to the system is relatively low. If anybody wants to make this more dynamic and/or controllable, go for it. Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 16:07:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB0B106564A; Mon, 8 Mar 2010 16:07:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 20BC98FC17; Mon, 8 Mar 2010 16:07:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o28G6ZA1082403; Mon, 8 Mar 2010 09:06:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 08 Mar 2010 09:06:59 -0700 (MST) Message-Id: <20100308.090659.460114267457255328.imp@bsdimp.com> To: obrien@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100308010125.GA6387@dragon.NUXI.org> References: <201003071008.o27A80wC014578@svn.freebsd.org> <20100307.143619.510313205755027975.imp@bsdimp.com> <20100308010125.GA6387@dragon.NUXI.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:07:21 -0000 In message: <20100308010125.GA6387@dragon.NUXI.org> "David O'Brien" writes: : On Sun, Mar 07, 2010 at 02:36:19PM -0700, M. Warner Losh wrote: : > Please back out this change. It is unwise, I think. : : Instead I'd rather fix it for the use case you mention. I'd still rather you back it out because it introduces a significant regression in speed, see below... : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- : Index: newvers.sh : =================================================================== : --- newvers.sh (revision 204851) : +++ newvers.sh (working copy) : @@ -87,13 +87,11 @@ touch version : v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` : i=`${MAKE:-make} -V KERN_IDENT` : : +# Are we doing a kernel build? Look for "/sys/" in pwd for 'make kernel', : +# and "/compile/" for tradiational within-tree kernel build. : case "$d" in : -*/compile/*) : - SRCDIR=${d##*obj} : - if [ -n "$MACHINE" ]; then : - SRCDIR=${SRCDIR##/$MACHINE} : - fi : - SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) : +*/sys/*|*/compile/*) : + SRCDIR=$(realpath $(dirname $0)/..) : : for dir in /bin /usr/bin /usr/local/bin; do : if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- : : : Do you get the subversion revision in your vers.c file with this patch? Well, except that you get the revision for the whole tree, instead of just for the kernel. And this takes a *LOT* longer to compute. The whole reason we did the sys hack was to make build times not suck... for dir in /bin /usr/bin /usr/local/bin; do - if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then + if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion break fi @@ -107,7 +107,7 @@ case "$d" in done if [ -n "$svnversion" ] ; then - svn=" r`cd ${SRCDIR}/sys && $svnversion`" + svn=" r`cd ${SRCDIR} && $svnversion`" fi if [ -n "$git_cmd" ] ; then git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` Again, like Doug said: "my kernel doesn't live in sys" isn't a problem that is worth solving at the cost of "I have to run svnversion over all of /usr/src every time I build a kernel." Please, back this out. If you *MUST* support != sys, then do so in a way that doesn't screw everybody else with long build times. And *PLEASE* talk to people before doing a drive-by commit? This bit of code has way too much loaded history behind it for just random tweaking. Warner From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 16:17:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF2A0106566B; Mon, 8 Mar 2010 16:17:37 +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 9F53A8FC16; Mon, 8 Mar 2010 16:17:37 +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 F2FA446B1A; Mon, 8 Mar 2010 11:17:36 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 54AE48A01F; Mon, 8 Mar 2010 11:17:36 -0500 (EST) From: John Baldwin To: obrien@freebsd.org, src-committers@freebsd.org Date: Mon, 8 Mar 2010 11:17:35 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003071008.o27A80wC014578@svn.freebsd.org> <20100308010125.GA6387@dragon.NUXI.org> <20100308.090659.460114267457255328.imp@bsdimp.com> In-Reply-To: <20100308.090659.460114267457255328.imp@bsdimp.com> MIME-Version: 1.0 Message-Id: <201003081117.35787.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Mar 2010 11:17:36 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:17:37 -0000 On Monday 08 March 2010 11:06:59 am M. Warner Losh wrote: > In message: <20100308010125.GA6387@dragon.NUXI.org> > "David O'Brien" writes: > : On Sun, Mar 07, 2010 at 02:36:19PM -0700, M. Warner Losh wrote: > : > Please back out this change. It is unwise, I think. > : > : Instead I'd rather fix it for the use case you mention. > > I'd still rather you back it out because it introduces a significant > regression in speed, see below... > > : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- >%---- > : Index: newvers.sh > : =================================================================== > : --- newvers.sh (revision 204851) > : +++ newvers.sh (working copy) > : @@ -87,13 +87,11 @@ touch version > : v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` > : i=`${MAKE:-make} -V KERN_IDENT` > : > : +# Are we doing a kernel build? Look for "/sys/" in pwd for 'make kernel', > : +# and "/compile/" for tradiational within-tree kernel build. > : case "$d" in > : -*/compile/*) > : - SRCDIR=${d##*obj} > : - if [ -n "$MACHINE" ]; then > : - SRCDIR=${SRCDIR##/$MACHINE} > : - fi > : - SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) > : +*/sys/*|*/compile/*) > : + SRCDIR=$(realpath $(dirname $0)/..) > : > : for dir in /bin /usr/bin /usr/local/bin; do > : if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then > : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- >%---- > : > : > : Do you get the subversion revision in your vers.c file with this patch? > > Well, except that you get the revision for the whole tree, instead of > just for the kernel. And this takes a *LOT* longer to compute. The > whole reason we did the sys hack was to make build times not suck... Egads! This part I definitely care about. Fix it or revert it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 16:23:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B81B31065670; Mon, 8 Mar 2010 16:23:32 +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 A7A2A8FC20; Mon, 8 Mar 2010 16:23: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 o28GNW6o043635; Mon, 8 Mar 2010 16:23:32 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28GNWKf043633; Mon, 8 Mar 2010 16:23:32 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003081623.o28GNWKf043633@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 8 Mar 2010 16:23: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: r204872 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:23:32 -0000 Author: jh Date: Mon Mar 8 16:23:32 2010 New Revision: 204872 URL: http://svn.freebsd.org/changeset/base/204872 Log: Pass the correct size to memset(). PR: bin/128094 Submitted by: Henning Petersen MFC after: 1 week Modified: head/usr.bin/xlint/lint1/scan.l Modified: head/usr.bin/xlint/lint1/scan.l ============================================================================== --- head/usr.bin/xlint/lint1/scan.l Mon Mar 8 15:56:18 2010 (r204871) +++ head/usr.bin/xlint/lint1/scan.l Mon Mar 8 16:23:32 2010 (r204872) @@ -319,7 +319,7 @@ allocsb(void) if ((sb = malloc(sizeof (sbuf_t))) == NULL) nomem(); } - (void)memset(sb, 0, sizeof (sb)); + (void)memset(sb, 0, sizeof (*sb)); return (sb); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 16:54:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECCBB1065675; Mon, 8 Mar 2010 16:54:16 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id B45118FC14; Mon, 8 Mar 2010 16:54:16 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id B014EE4A84; Mon, 8 Mar 2010 11:54:15 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 08 Mar 2010 11:54:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=7bjVTWlJ51GoZ+oQdXc4dVwuxZ8=; b=PXeHdTGbFDuCRUjrbctJ9TWoqK7Nf4b+hxMwUWbMuPUQEnuEPpPbCFOUJPFPK/j4WvsFdWtZu4V1b5bI8SslDGRp1zfTlwN7YABC/Il0xInm3BNT53rSYBHPlVZ1d1dOd+l5oXx1kwwgcE7ZDBhiCjZ+ZhPnavfORy4tSMwd2sA= X-Sasl-enc: VXQCTsIwAfZ6JeLnrxLhRHRw2Vt3+FjTmwcMXnhHgH1D 1268067255 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0F8591DE4; Mon, 8 Mar 2010 11:54:14 -0500 (EST) Message-ID: <4B952BB4.4080609@incunabulum.net> Date: Mon, 08 Mar 2010 16:54:12 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100302 Thunderbird/3.0.3 MIME-Version: 1.0 To: Nathan Whitehorn References: <201003081501.o28F18Lg025359@svn.freebsd.org> In-Reply-To: <201003081501.o28F18Lg025359@svn.freebsd.org> 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: r204870 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:54:17 -0000 On 03/08/10 15:01, Nathan Whitehorn wrote: > Log: > Enable tmpfs unconditionally on all platforms. No one I spoke to could > remember why it was x86 only, and it works just as well on at least powerpc > as on x86. > Thanks, What with 7.3 coming up and all, this would make for a nice MFC. :-) From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:14:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86AE71065677; Mon, 8 Mar 2010 18:14:58 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3B48FC1D; Mon, 8 Mar 2010 18:14:57 +0000 (UTC) Received: by wwb17 with SMTP id 17so3596383wwb.13 for ; Mon, 08 Mar 2010 10:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=NiPVWoDqFcLyzjG0o1t7jcu8HM2etV5q8/aNBFocMAg=; b=c/O6VuG1HBPYIJYg8l2PeQNaHo7Rq/NRt13IKePxTtdxFDd87YmBBZEB/nu48AoxWu 4hyPn01FEWR2bzx9byw53H3v2lb9THGkWlRJPX3J6v8x8/VLTORyq7fQXfVUBrnAiYfC DyfZQlGZ+S1TJPgtSqGcrikHTjf4RpKPN1pHE= 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=FVDAxU3ceiwkoNO3UQsltgWCt7UIz5yB536N9UrFLXWg/lJcpvhEmF3f/Qd2FDmiH9 BMT8YE+f3mQt+yQh3KRmWmluiFy9tUXiRTnATfRwGLRlHThMuYDZvxn41/To4QbdhgMG +aivvc+UikDkhj5vJ0h4V/aNxUShNtYtCZfHo= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.89.138 with SMTP id c10mr2869492wef.47.1268072096262; Mon, 08 Mar 2010 10:14:56 -0800 (PST) In-Reply-To: <201003081501.o28F18Lg025359@svn.freebsd.org> References: <201003081501.o28F18Lg025359@svn.freebsd.org> From: Ivan Voras Date: Mon, 8 Mar 2010 19:14:36 +0100 X-Google-Sender-Auth: d0c64eeac1af6a4c Message-ID: <9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com> To: Nathan Whitehorn 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: r204870 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:14:58 -0000 On 8 March 2010 16:01, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Mon Mar =C2=A08 15:01:08 2010 > New Revision: 204870 > URL: http://svn.freebsd.org/changeset/base/204870 > > Log: > =C2=A0Enable tmpfs unconditionally on all platforms. No one I spoke to co= uld > =C2=A0remember why it was x86 only, and it works just as well on at least= powerpc > =C2=A0as on x86. And it still has the Big Ugly "run away! run away!" banner displayed on loa= d :( It's riddled by "XXX" comments, but so far it's been more stable for me than e.g. ZFS... From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:28:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B7B9D1065670; Mon, 8 Mar 2010 18:28:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Andriy Gapon Date: Mon, 8 Mar 2010 13:27:58 -0500 User-Agent: KMail/1.6.2 References: <201003052139.o25LdGgc019587@svn.freebsd.org> <20100306195944.GA2344@frankie.nitro.dk> <4B92C125.2040001@freebsd.org> In-Reply-To: <4B92C125.2040001@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003081328.14614.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r204773 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/dispatcher sys/contrib/dev/acpica/events sys/cont... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:28:27 -0000 On Saturday 06 March 2010 03:55 pm, Andriy Gapon wrote: > on 06/03/2010 21:59 Simon L. Nielsen said the following: > > On 2010.03.05 21:39:16 +0000, Jung-uk Kim wrote: > >> Author: jkim > >> Date: Fri Mar 5 21:39:16 2010 > >> New Revision: 204773 > >> URL: http://svn.freebsd.org/changeset/base/204773 > >> > >> Log: > >> Merge ACPICA 20100304. > > > > I get a lot of messages like the following on the console at > > boot: > > > > [ACPI Debug] String [0xA] "COMB _STA " > > [ACPI Debug] String [0x6] "LDN: " > > [ACPI Debug] Integer 0x 5 > > [ACPI Debug] Integer 0x F > > > > I'm not sure if it's related to this import as the system in > > question was just upgraded from 8. > > > > You can see more details by logging into ref9-i386.freebsd.org. > > It looks like AcpiGbl_EnableAmlDebugObject = TRUE line in > sys/dev/acpica/acpi.c was leaked into the commit by accident. Well, actually it was sort of intentional, i.e., enabling object debugging when ACPI_DEBUG is defined. I will just add a separate knob for it instead. Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:30:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F60C106566B; Mon, 8 Mar 2010 18:30:04 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 66E6B8FC1A; Mon, 8 Mar 2010 18:30:03 +0000 (UTC) Received: by wwb17 with SMTP id 17so3607514wwb.13 for ; Mon, 08 Mar 2010 10:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=oOAgxMlHDhfsYp8S7jyTbPw4br9xm7GZDD0BFSSyTn4=; b=JltGiUS6gKbIubZ5XsC+dr5Px86yVtNUhvsw+PV60ryZM1HkYv9xfFXzdOjmX9SFrC xK8qIHutIpi9k77cpWD/y1PaIMtoDtknM6tRL9LSBJoPfLbEvGmse6gsLSMQoRmQpskv sYNKuvXkZUzDiUjZ7C0TlgITYs5KK+CA08j3k= 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=Wb+GZfOwZpic9p3kevBmIKzewa6A+u8EgGBYku/9mDD0yCq30bEHr42wduIC/BYZFg dwJcOXM0lQbb3YIi+z0UN89fhGgOByCnfrLgH1w5uEl7RovvIbktyOVj2oDsM5P2kB6n f3On/Ka7td6mnm8dPgOenm5W+MXjyCbt3gwAs= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.88.208 with SMTP id a58mr781627wef.35.1268073002282; Mon, 08 Mar 2010 10:30:02 -0800 (PST) In-Reply-To: <9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com> References: <201003081501.o28F18Lg025359@svn.freebsd.org> <9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com> From: Ivan Voras Date: Mon, 8 Mar 2010 19:29:42 +0100 X-Google-Sender-Auth: 48dc9586b0a4dee1 Message-ID: <9bbcef731003081029h3e3c1eeak1ad6bf11e449458e@mail.gmail.com> To: Nathan Whitehorn 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: r204870 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:30:04 -0000 On 8 March 2010 19:14, Ivan Voras wrote: > On 8 March 2010 16:01, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Mon Mar =C2=A08 15:01:08 2010 >> New Revision: 204870 >> URL: http://svn.freebsd.org/changeset/base/204870 >> >> Log: >> =C2=A0Enable tmpfs unconditionally on all platforms. No one I spoke to c= ould >> =C2=A0remember why it was x86 only, and it works just as well on at leas= t powerpc >> =C2=A0as on x86. > > And it still has the Big Ugly "run away! run away!" banner displayed on l= oad :( I've just run it through the tools/regression/fstest suite and it passes all tests except the NFSv4-style permissions related ones (tests/granular/*): Failed 6/192 test scripts. 181/3473 subtests failed. Files=3D192, Tests=3D3473, 90 wallclock secs ( 7.58 cusr + 30.63 csys =3D 3= 8.21 CPU) Failed 6/192 test programs. 181/3473 subtests failed. From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:40:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBAC51065673; Mon, 8 Mar 2010 18:40:22 +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 A2BEA8FC20; Mon, 8 Mar 2010 18:40: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 o28IeMVn074691; Mon, 8 Mar 2010 18:40:22 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28IeMwm074689; Mon, 8 Mar 2010 18:40:22 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003081840.o28IeMwm074689@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Mar 2010 18:40: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: r204874 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:40:23 -0000 Author: jkim Date: Mon Mar 8 18:40:22 2010 New Revision: 204874 URL: http://svn.freebsd.org/changeset/base/204874 Log: Update module Makefile for ACPICA 20100304. Submitted by: Paul B Mahol (onemda at gmail dot com) Modified: head/sys/modules/acpi/acpi/Makefile Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Mon Mar 8 16:53:58 2010 (r204873) +++ head/sys/modules/acpi/acpi/Makefile Mon Mar 8 18:40:22 2010 (r204874) @@ -35,10 +35,10 @@ SRCS+= dsfield.c dsinit.c dsmethod.c dsm SRCS+= dsutils.c dswexec.c dswload.c dswscope.c dswstate.c SRCS+= evevent.c evgpe.c evgpeblk.c evmisc.c evregion.c evrgnini.c evsci.c SRCS+= evxface.c evxfevnt.c evxfregn.c -SRCS+= exconfig.c exconvrt.c excreate.c exdump.c exfield.c exfldio.c exmisc.c -SRCS+= exmutex.c exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c -SRCS+= exprep.c exregion.c exresnte.c exresolv.c exresop.c exstore.c -SRCS+= exstoren.c exstorob.c exsystem.c exutils.c +SRCS+= exconfig.c exconvrt.c excreate.c exdebug.c exdump.c exfield.c +SRCS+= exfldio.c exmisc.c exmutex.c exnames.c exoparg1.c exoparg2.c +SRCS+= exoparg3.c exoparg6.c exprep.c exregion.c exresnte.c exresolv.c +SRCS+= exresop.c exstore.c exstoren.c exstorob.c exsystem.c exutils.c SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c hwvalid.c hwxface.c SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c nsload.c nsnames.c SRCS+= nsobject.c nsparse.c nspredef.c nsrepair.c nsrepair2.c nssearch.c From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:51:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C577106566C; Mon, 8 Mar 2010 18:51:29 +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 2B4DA8FC08; Mon, 8 Mar 2010 18:51: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 o28IpTv2077206; Mon, 8 Mar 2010 18:51:29 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28IpT7p077204; Mon, 8 Mar 2010 18:51:29 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003081851.o28IpT7p077204@svn.freebsd.org> From: Joel Dahl Date: Mon, 8 Mar 2010 18:51: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: r204875 - head/sys/dev/sound/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:51:29 -0000 Author: joel (doc committer) Date: Mon Mar 8 18:51:28 2010 New Revision: 204875 URL: http://svn.freebsd.org/changeset/base/204875 Log: Looks like I forgot to add half of the copyright text when we switched to our preferred license. Modified: head/sys/dev/sound/pci/es137x.h Modified: head/sys/dev/sound/pci/es137x.h ============================================================================== --- head/sys/dev/sound/pci/es137x.h Mon Mar 8 18:40:22 2010 (r204874) +++ head/sys/dev/sound/pci/es137x.h Mon Mar 8 18:51:28 2010 (r204875) @@ -11,6 +11,18 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $FreeBSD$ */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 18:54:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E7A106566B; Mon, 8 Mar 2010 18:54:31 +0000 (UTC) (envelope-from ivoras@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 EDA948FC0C; Mon, 8 Mar 2010 18:54:30 +0000 (UTC) Received: by wyb32 with SMTP id 32so3581610wyb.13 for ; Mon, 08 Mar 2010 10:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=VJBidhQKehFoWR+LKBWimSx8XyF0JUW5cWWrvToythg=; b=Fq/c9TyNrMZR3pbnH8AyopIuNLFxkZsOpYYqfol54ELwaOWiKIXWodHOI/ZzqfNcfo lqxR9TqJ6bbF05Q1ZK+jVhO60lkxMNxb08RP2BbvAQz7yWQZl6+vu9YAl1l2PZuTpmHn U8mvljPuOFCFg84akGGwnuxzqWz/r9tJFXl0g= 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=eU+gAxAC9/JsUspNEsu0nltbU5VG0M8ixyu02KRSlFMsayM/kZ0rUn3OCXCaSCZH25 EK/z6tMDFqnfkpa2dfBFLIzClCWOifY4K4BpzNZp1FXysGPUOuu9AENll3/u4N7/QupS zRlrt1V5zO/rWQ5X6ZA3xWzY4610DBK2USCoE= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.88.208 with SMTP id a58mr800513wef.35.1268074469318; Mon, 08 Mar 2010 10:54:29 -0800 (PST) In-Reply-To: <9bbcef731003081029h3e3c1eeak1ad6bf11e449458e@mail.gmail.com> References: <201003081501.o28F18Lg025359@svn.freebsd.org> <9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com> <9bbcef731003081029h3e3c1eeak1ad6bf11e449458e@mail.gmail.com> From: Ivan Voras Date: Mon, 8 Mar 2010 19:54:09 +0100 X-Google-Sender-Auth: 1353fc7f5a94be09 Message-ID: <9bbcef731003081054w5662a3bcy102e92e3b899979e@mail.gmail.com> To: Nathan Whitehorn 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: r204870 - head/sys/modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 18:54:31 -0000 On 8 March 2010 19:29, Ivan Voras wrote: > On 8 March 2010 19:14, Ivan Voras wrote: >> On 8 March 2010 16:01, Nathan Whitehorn wrote: >>> Author: nwhitehorn >>> Date: Mon Mar =C2=A08 15:01:08 2010 >>> New Revision: 204870 >>> URL: http://svn.freebsd.org/changeset/base/204870 >>> >>> Log: >>> =C2=A0Enable tmpfs unconditionally on all platforms. No one I spoke to = could >>> =C2=A0remember why it was x86 only, and it works just as well on at lea= st powerpc >>> =C2=A0as on x86. >> >> And it still has the Big Ugly "run away! run away!" banner displayed on = load :( > > I've just run it through the tools/regression/fstest suite and it > passes all tests except the NFSv4-style permissions related ones > (tests/granular/*): > > Failed 6/192 test scripts. 181/3473 subtests failed. > Files=3D192, Tests=3D3473, 90 wallclock secs ( 7.58 cusr + 30.63 csys =3D= 38.21 CPU) > Failed 6/192 test programs. 181/3473 subtests failed. Well nevermind, I spoke too soon - it fails the regression/fsx tests immediately :( From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 19:40:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D76A106566C; Mon, 8 Mar 2010 19:40:23 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BADF8FC18; Mon, 8 Mar 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 o28JeNqe088003; Mon, 8 Mar 2010 19:40:23 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28JeNka088001; Mon, 8 Mar 2010 19:40:23 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201003081940.o28JeNka088001@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 8 Mar 2010 19:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204876 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:40:23 -0000 Author: ache Date: Mon Mar 8 19:40:22 2010 New Revision: 204876 URL: http://svn.freebsd.org/changeset/base/204876 Log: 1) Reimplement (differently) unlimited line length restricted in prev. commit. 2) Honor missing the very last \n (if absent) on output. Modified: head/usr.bin/uniq/uniq.c Modified: head/usr.bin/uniq/uniq.c ============================================================================== --- head/usr.bin/uniq/uniq.c Mon Mar 8 18:51:28 2010 (r204875) +++ head/usr.bin/uniq/uniq.c Mon Mar 8 19:40:22 2010 (r204876) @@ -53,6 +53,7 @@ static const char rcsid[] = #include #include #include +#define _WITH_GETLINE #include #include #include @@ -64,8 +65,8 @@ int cflag, dflag, uflag, iflag; int numchars, numfields, repeats; FILE *file(const char *, const char *); -wchar_t *convert(wchar_t *, const char *); -char *getlinemax(char *, FILE *); +wchar_t *convert(const char *); +int inlcmp(const char *, const char *); void show(FILE *, const char *); wchar_t *skip(wchar_t *); void obsolete(char *[]); @@ -74,9 +75,10 @@ static void usage(void); int main (int argc, char *argv[]) { - wchar_t *tprev, *tthis, *wprev, *wthis, *wp; + wchar_t *tprev, *tthis; FILE *ifp, *ofp; int ch, comp; + size_t prevbuflen, thisbuflen, b1; char *prevline, *thisline, *p; const char *ifn; @@ -133,29 +135,27 @@ main (int argc, char *argv[]) if (argc > 1) ofp = file(argv[1], "w"); - prevline = malloc(LINE_MAX); - thisline = malloc(LINE_MAX); - wprev = malloc(LINE_MAX * sizeof(*wprev)); - wthis = malloc(LINE_MAX * sizeof(*wthis)); - if (prevline == NULL || thisline == NULL || - wprev == NULL || wthis == NULL) - err(1, "malloc"); + prevbuflen = thisbuflen = 0; + prevline = thisline = NULL; - if ((prevline = getlinemax(prevline, ifp)) == NULL) { + if (getline(&prevline, &prevbuflen, ifp) < 0) { if (ferror(ifp)) err(1, "%s", ifn); exit(0); } - tprev = convert(wprev, prevline); + tprev = convert(prevline); if (!cflag && uflag && dflag) show(ofp, prevline); - while ((thisline = getlinemax(thisline, ifp)) != NULL) { - tthis = convert(wthis, thisline); + tthis = NULL; + while (getline(&thisline, &thisbuflen, ifp) >= 0) { + if (tthis != NULL) + free(tthis); + tthis = convert(thisline); if (tthis == NULL && tprev == NULL) - comp = strcmp(thisline, prevline); + comp = inlcmp(thisline, prevline); else if (tthis == NULL || tprev == NULL) comp = 1; else @@ -166,14 +166,17 @@ main (int argc, char *argv[]) if (cflag || !dflag || !uflag) show(ofp, prevline); p = prevline; - wp = wprev; + b1 = prevbuflen; prevline = thisline; - wprev = wthis; + prevbuflen = thisbuflen; + if (tprev != NULL) + free(tprev); tprev = tthis; if (!cflag && uflag && dflag) show(ofp, prevline); thisline = p; - wthis = wp; + thisbuflen = b1; + tthis = NULL; repeats = 0; } else ++repeats; @@ -185,46 +188,54 @@ main (int argc, char *argv[]) exit(0); } -char * -getlinemax(char *buf, FILE *fp) +wchar_t * +convert(const char *str) { - size_t bufpos; - int ch; + size_t n; + wchar_t *buf, *ret, *p; + + if ((n = mbstowcs(NULL, str, 0)) == (size_t)-1) + return (NULL); + if ((buf = malloc((n + 1) * sizeof(*buf))) == NULL) + err(1, "malloc"); + if (mbstowcs(buf, str, n + 1) != n) + errx(1, "internal mbstowcs() error"); + /* The last line may not end with \n. */ + if (n > 0 && buf[n - 1] == L'\n') + buf[n - 1] = L'\0'; + + /* If requested get the chosen fields + character offsets. */ + if (numfields || numchars) { + if ((ret = wcsdup(skip(buf))) == NULL) + err(1, "wcsdup"); + free(buf); + } else + ret = buf; - bufpos = 0; - while ((ch = getc(fp)) != EOF && ch != '\n') { - buf[bufpos++] = ch; - if (bufpos >= LINE_MAX) - errx(1, "Maximum line length (%d) exceeded", - LINE_MAX); + if (iflag) { + for (p = ret; *p != L'\0'; p++) + *p = towlower(*p); } - buf[bufpos] = '\0'; - return (bufpos != 0 || ch == '\n' ? buf : NULL); + return (ret); } -wchar_t * -convert(wchar_t *buf, const char *str) +int +inlcmp(const char *s1, const char *s2) { - size_t n; - wchar_t *p, *ret; + int c1, c2; - if ((n = mbstowcs(buf, str, LINE_MAX)) == LINE_MAX) - errx(1, "Maximum line length (%d) exceeded", LINE_MAX); - else if (n != (size_t)-1) { - /* If requested get the chosen fields + character offsets. */ - if (numfields || numchars) - ret = skip(buf); - else - ret = buf; - if (iflag) { - for (p = ret; *p != L'\0'; p++) - *p = towlower(*p); - } - } else - ret = NULL; - - return (ret); + while (*s1 == *s2++) + if (*s1++ == '\0') + return (0); + c1 = (unsigned char)*s1; + c2 = (unsigned char)*(s2 - 1); + /* The last line may not end with \n. */ + if (c1 == '\n') + c1 = '\0'; + if (c2 == '\n') + c2 = '\0'; + return (c1 - c2); } /* @@ -237,9 +248,9 @@ show(FILE *ofp, const char *str) { if (cflag) - (void)fprintf(ofp, "%4d %s\n", repeats + 1, str); + (void)fprintf(ofp, "%4d %s", repeats + 1, str); if ((dflag && repeats) || (uflag && !repeats)) - (void)fprintf(ofp, "%s\n", str); + (void)fprintf(ofp, "%s", str); } wchar_t * From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 19:40:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A821C106566B; Mon, 8 Mar 2010 19:40:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96E488FC1D; Mon, 8 Mar 2010 19:40: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 o28JeVe3088076; Mon, 8 Mar 2010 19:40:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28JeVG1088074; Mon, 8 Mar 2010 19:40:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003081940.o28JeVG1088074@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Mar 2010 19:40: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: r204877 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:40:31 -0000 Author: jkim Date: Mon Mar 8 19:40:31 2010 New Revision: 204877 URL: http://svn.freebsd.org/changeset/base/204877 Log: Enable ACPI module build on amd64. Although we strongly recommend building it into kernel, there is no need to prevent it from building at all. Modified: head/sys/modules/acpi/acpi/Makefile Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Mon Mar 8 19:40:22 2010 (r204876) +++ head/sys/modules/acpi/acpi/Makefile Mon Mar 8 19:40:31 2010 (r204877) @@ -1,11 +1,11 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" -.error "ACPI can only be compiled into the kernel on the amd64 and ia64 platforms" +.if ${MACHINE_ARCH} == "ia64" +.error "ACPI can only be compiled into the kernel on the ia64 platform" .endif -.if ${MACHINE} != "i386" -.error "The ACPI module is only for i386" +.if ${MACHINE} != "amd64" && ${MACHINE} != "i386" +.error "The ACPI module is only for amd64 and i386" .endif .PATH: ${.CURDIR}/../../../contrib/dev/acpica/debugger \ @@ -97,9 +97,13 @@ opt_ddb.h: Makefile SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o + .if ${MACHINE_ARCH} == "amd64" -SRCS+= opt_global.h +SRCS+= acpi_switch.S opt_global.h CLEANFILES+= acpi_wakedata.h +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} +acpi_switch.o: acpi_switch.S + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} .endif acpi_wakecode.h: acpi_wakecode.S assym.s From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 19:51:25 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CFE1065676; Mon, 8 Mar 2010 19:51:25 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC208FC13; Mon, 8 Mar 2010 19:51:24 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o28JpOwI010775; Mon, 8 Mar 2010 14:51:24 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o28JpN3a010774; Mon, 8 Mar 2010 14:51:23 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 8 Mar 2010 14:51:23 -0500 From: David Schultz To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100308195123.GA10624@zim.MIT.EDU> Mail-Followup-To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100308015926.O11669@delplex.bde.org> <20100307183139.GA50243@nagual.pp.ru> <20100307201027.GA51623@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100307201027.GA51623@nagual.pp.ru> Cc: Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:51:25 -0000 On Sun, Mar 07, 2010, Andrey Chernov wrote: > On Sun, Mar 07, 2010 at 09:31:39PM +0300, Andrey Chernov wrote: > > It is right idea. I'll use sysconf(__SC_LINE_MAX) there. > > But currently it does the same (sysconf.c): > > case _SC_LINE_MAX: > > return (LINE_MAX); > ... > > To add more: > > NetBSD uniq grows (contrary, NetBSD comm silently discarding everything > > afterwards). > > OpenBSD uniq just use fgets with 8192. > > GNU uniq grows. > > After thinking a bit more I consider to reimplement unlimited lines here > instead because enforcing POSIX limit was not the main goal of my commit > (it was to remove getwc() which is evil). Someone may deal with the limit > on his own way afterwards. Good. I think it's better for usability if we avoid artificial limits like this. You can actually just call getline() rather than reinventing the wheel. I've had a wide character version of getline() ready to commit for some time (I just need to find the time to do it), so you won't need to call mbstowcs() as a separate step. From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 19:58:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA5ED1065687; Mon, 8 Mar 2010 19:58:00 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984668FC20; Mon, 8 Mar 2010 19:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o28Jw0j5092058; Mon, 8 Mar 2010 19:58:00 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28Jw0uu092054; Mon, 8 Mar 2010 19:58:00 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003081958.o28Jw0uu092054@svn.freebsd.org> From: Fabien Thomas Date: Mon, 8 Mar 2010 19:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204878 - in head: sys/dev/hwpmc sys/sys usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:58:00 -0000 Author: fabient Date: Mon Mar 8 19:58:00 2010 New Revision: 204878 URL: http://svn.freebsd.org/changeset/base/204878 Log: Change the way shutdown is handled for log file. pmc_flush_logfile is now non-blocking and just ask the kernel to shutdown the file. From that point, no more data is accepted by the log thread and when the last buffer is flushed the file is closed. This will remove a deadlock between pmcstat asking for flush while it cannot flush the pipe itself. MFC after: 3 days Modified: head/sys/dev/hwpmc/hwpmc_logging.c head/sys/sys/pmc.h head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 8 19:40:31 2010 (r204877) +++ head/sys/dev/hwpmc/hwpmc_logging.c Mon Mar 8 19:58:00 2010 (r204878) @@ -237,7 +237,7 @@ pmclog_get_buffer(struct pmc_owner *po) static void pmclog_loop(void *arg) { - int error; + int error, last_buffer; struct pmc_owner *po; struct pmclog_buffer *lb; struct proc *p; @@ -252,6 +252,7 @@ pmclog_loop(void *arg) p = po->po_owner; td = curthread; mycred = td->td_ucred; + last_buffer = 0; PROC_LOCK(p); ownercred = crhold(p->p_ucred); @@ -284,27 +285,20 @@ pmclog_loop(void *arg) if ((lb = TAILQ_FIRST(&po->po_logbuffers)) == NULL) { mtx_unlock_spin(&po->po_mtx); - /* - * Wakeup the thread waiting for the - * PMC_OP_FLUSHLOG request to - * complete. - */ - if (po->po_flags & PMC_PO_IN_FLUSH) { - po->po_flags &= ~PMC_PO_IN_FLUSH; - wakeup_one(po->po_kthread); - } - (void) msleep(po, &pmc_kthread_mtx, PWAIT, "pmcloop", 0); continue; } TAILQ_REMOVE(&po->po_logbuffers, lb, plb_next); + if (po->po_flags & PMC_PO_SHUTDOWN) + last_buffer = TAILQ_EMPTY(&po->po_logbuffers); mtx_unlock_spin(&po->po_mtx); } mtx_unlock(&pmc_kthread_mtx); +sigpipe_retry: /* process the request */ PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); @@ -328,7 +322,8 @@ pmclog_loop(void *arg) if (error) { /* XXX some errors are recoverable */ - /* XXX also check for SIGPIPE if a socket */ + if (error == EPIPE) + goto sigpipe_retry; /* send a SIGIO to the owner and exit */ PROC_LOCK(p); @@ -344,6 +339,14 @@ pmclog_loop(void *arg) break; } + if (last_buffer) { + /* + * Close the file to get PMCLOG_EOF error + * in pmclog(3). + */ + fo_close(po->po_file, curthread); + } + mtx_lock(&pmc_kthread_mtx); /* put the used buffer back into the global pool */ @@ -425,6 +428,12 @@ pmclog_reserve(struct pmc_owner *po, int mtx_lock_spin(&po->po_mtx); + /* No more data when shutdown in progress. */ + if (po->po_flags & PMC_PO_SHUTDOWN) { + mtx_unlock_spin(&po->po_mtx); + return (NULL); + } + if (po->po_curbuf == NULL) if (pmclog_get_buffer(po) != 0) { mtx_unlock_spin(&po->po_mtx); @@ -686,7 +695,7 @@ pmclog_deconfigure_log(struct pmc_owner int pmclog_flush(struct pmc_owner *po) { - int error, has_pending_buffers; + int error; PMCDBG(LOG,FLS,1, "po=%p", po); @@ -714,16 +723,13 @@ pmclog_flush(struct pmc_owner *po) mtx_lock_spin(&po->po_mtx); if (po->po_curbuf) pmclog_schedule_io(po); - has_pending_buffers = !TAILQ_EMPTY(&po->po_logbuffers); mtx_unlock_spin(&po->po_mtx); - if (has_pending_buffers) { - po->po_flags |= PMC_PO_IN_FLUSH; /* ask for a wakeup */ - error = msleep(po->po_kthread, &pmc_kthread_mtx, PWAIT, - "pmcflush", 0); - if (error == 0) - error = po->po_error; - } + /* + * Initiate shutdown: no new data queued, + * thread will close file on last block. + */ + po->po_flags |= PMC_PO_SHUTDOWN; error: mtx_unlock(&pmc_kthread_mtx); Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Mon Mar 8 19:40:31 2010 (r204877) +++ head/sys/sys/pmc.h Mon Mar 8 19:58:00 2010 (r204878) @@ -759,7 +759,7 @@ struct pmc_owner { }; #define PMC_PO_OWNS_LOGFILE 0x00000001 /* has a log file */ -#define PMC_PO_IN_FLUSH 0x00000010 /* in the middle of a flush */ +#define PMC_PO_SHUTDOWN 0x00000010 /* in the process of shutdown */ #define PMC_PO_INITIAL_MAPPINGS_DONE 0x00000020 /* Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Mon Mar 8 19:40:31 2010 (r204877) +++ head/usr.sbin/pmcstat/pmcstat_log.c Mon Mar 8 19:58:00 2010 (r204878) @@ -1670,10 +1670,8 @@ pmcstat_print_log(void) int pmcstat_close_log(void) { - if (pmc_flush_logfile() < 0 || - pmc_configure_logfile(-1) < 0) + if (pmc_flush_logfile() < 0) err(EX_OSERR, "ERROR: logging failed"); - args.pa_flags &= ~(FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE); return (args.pa_flags & FLAG_HAS_PIPE ? PMCSTAT_EXITING : PMCSTAT_FINISHED); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 20:11:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 987E3106566C; Mon, 8 Mar 2010 20:11:51 +0000 (UTC) Date: Mon, 8 Mar 2010 20:11:51 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Message-ID: <20100308201151.GA21962@FreeBSD.org> References: <201003081940.o28JeVG1088074@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201003081940.o28JeVG1088074@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: r204877 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 20:11:51 -0000 On Mon, Mar 08, 2010 at 07:40:31PM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Mon Mar 8 19:40:31 2010 > New Revision: 204877 > URL: http://svn.freebsd.org/changeset/base/204877 > > Log: > Enable ACPI module build on amd64. Although we strongly recommend building > it into kernel, there is no need to prevent it from building at all. FWIW, is there any difference between loading acpi.ko from loader.conf with "device acpi"-less kernel, and having ACPI compiled in? (I am interested in both i386 and amd64 cases.) I normally offload everything possible to modules (including `mem' and `io') and wonder it is safe thing to do for `acpi' as well. Thanks. ./danfe From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 20:29:24 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DA26106566C; Mon, 8 Mar 2010 20:29:24 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id ED8668FC15; Mon, 8 Mar 2010 20:29:23 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o28KTKm3068066; Mon, 8 Mar 2010 23:29:20 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1268080161; bh=79gT5UUhGKWQG5kgKRcMmz17CjKO2/m9xAk8sTJyFCw=; l=692; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=WM3Nkge4LNxOMNecIK7hiH+QDlrwhlP262AYZ9Zc1xl5+KmFGzuEL8ErUSj36ELjh aKHDmAQQLTs0qZUfpo5yB49+lsXq7FfrYpmwPrZVDkHlPfO4hir0l/PXfFERJKozrW yZWLWL91ZZQYaNY8orL1g6HFTx+U94KcWIpsWv9s= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o28KTKlC068065; Mon, 8 Mar 2010 23:29:20 +0300 (MSK) (envelope-from ache) Date: Mon, 8 Mar 2010 23:29:19 +0300 From: Andrey Chernov To: Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100308202919.GA67990@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Jaakko Heinonen , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201003061921.o26JLv36014114@svn.freebsd.org> <20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi> <20100308015926.O11669@delplex.bde.org> <20100307183139.GA50243@nagual.pp.ru> <20100307201027.GA51623@nagual.pp.ru> <20100308195123.GA10624@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100308195123.GA10624@zim.MIT.EDU> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r204803 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 20:29:24 -0000 On Mon, Mar 08, 2010 at 02:51:23PM -0500, David Schultz wrote: > You can actually just call getline() rather than reinventing the > wheel. See just committed version. I use getline(3) (POSIX one). > I've had a wide character version of getline() ready to > commit for some time (I just need to find the time to do it), so > you won't need to call mbstowcs() as a separate step. It does not help, since wide version will fail on EILSEQ with sync lost, as getwc() does. Initially I was thinking about ftell+fseek back, but not all files are seekable. BTW, I plan to made similar changes to comm(1) too, it suffer from the same EILSEQ problem. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 20:44:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11A791065673; Mon, 8 Mar 2010 20:44:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9EEA8FC0C; Mon, 8 Mar 2010 20:44: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 o28KiMgc002561; Mon, 8 Mar 2010 20:44:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28KiMcb002556; Mon, 8 Mar 2010 20:44:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003082044.o28KiMcb002556@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Mar 2010 20:44: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: r204879 - head/usr.bin/procstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 20:44:23 -0000 Author: kib Date: Mon Mar 8 20:44:22 2010 New Revision: 204879 URL: http://svn.freebsd.org/changeset/base/204879 Log: Teach procstat(1) to display some information about signal disposition and pending/blocked status for signals. Reviewed by: rwatson MFC after: 2 weeks Modified: head/usr.bin/procstat/Makefile head/usr.bin/procstat/procstat.1 head/usr.bin/procstat/procstat.c head/usr.bin/procstat/procstat.h Modified: head/usr.bin/procstat/Makefile ============================================================================== --- head/usr.bin/procstat/Makefile Mon Mar 8 19:58:00 2010 (r204878) +++ head/usr.bin/procstat/Makefile Mon Mar 8 20:44:22 2010 (r204879) @@ -9,6 +9,7 @@ SRCS= procstat.c \ procstat_cred.c \ procstat_files.c \ procstat_kstack.c \ + procstat_sigs.c \ procstat_threads.c \ procstat_vm.c Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Mon Mar 8 19:58:00 2010 (r204878) +++ head/usr.bin/procstat/procstat.1 Mon Mar 8 20:44:22 2010 (r204879) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2008 +.Dd March 7, 2010 .Dt PROCSTAT 1 .Os .Sh NAME @@ -34,8 +34,9 @@ .Sh SYNOPSIS .Nm .Op Fl h +.Op Fl n .Op Fl w Ar interval -.Op Fl b | c | f | k | s | t | v +.Op Fl b | c | f | i | j | k | s | t | v .Op Fl a | Ar pid ... .Sh DESCRIPTION The @@ -56,6 +57,10 @@ Display binary information for the proce Display command line arguments for the process. .It Fl f Display file descriptor information for the process. +.It Fl i +Display signal pending and disposition information for the process. +.It Fl j +Display signal pending and blocked information for the process threads. .It Fl k Display the stacks of kernel threads in the process, excluding stacks of threads currently running on a CPU and threads with stacks swapped to disk. @@ -204,6 +209,58 @@ direct I/O .It l lock held .El +.Ss Signal Disposition Information +Display signal pending and disposition for a process: +.Pp +.Bl -tag -width ident -compact +.It PID +process ID +.It COMM +command +.It SIG +signal name +.It FLAGS +process signal disposition details, three symbols +.Bl -tag -width X -compact +.It P +if signal is pending in the global process queue, - otherwise +.It I +if signal delivery disposition is SIGIGN, - otherwise +.It C +if signal delivery is to catch it, - otherwise +.El +.El +.Pp +If +.Fl n +switch is given, the signal numbers are shown instead of signal names. +.Ss Thread Signal Information +Display signal pending and blocked for a process threads: +.Pp +.Bl -tag -width ident -compact +.It PID +process ID +.It COMM +command +.It TID +thread ID +.It SIG +signal name +.It FLAGS +thread signal delivery status, two symbols +.Bl -tag -width X -compact +.It P +if signal is pending for the thread, - otherwise +.It B +if signal is blocked in the thread signal mask, - if not blocked +.El +.El +.Pp +The +.Fl n +switch has the same effect as for the +.Fl i +switch, the signals numbers are shown instead of signal names. .Ss Kernel Thread Stacks Display kernel thread stacks for a process, allowing further interpretation of thread wait channels. Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Mon Mar 8 19:58:00 2010 (r204878) +++ head/usr.bin/procstat/procstat.c Mon Mar 8 20:44:22 2010 (r204879) @@ -38,15 +38,15 @@ #include "procstat.h" -static int aflag, bflag, cflag, fflag, kflag, sflag, tflag, vflag; -int hflag; +static int aflag, bflag, cflag, fflag, iflag, jflag, kflag, sflag, tflag, vflag; +int hflag, nflag; static void usage(void) { - fprintf(stderr, "usage: procstat [-h] [-w interval] [-b | -c | -f | " - "-k | -s | -t | -v]\n"); + fprintf(stderr, "usage: procstat [-h] [-n] [-w interval] [-b | -c | -f | " + "-i | -j | -k | -s | -t | -v]\n"); fprintf(stderr, " [-a | pid ...]\n"); exit(EX_USAGE); } @@ -61,6 +61,10 @@ procstat(pid_t pid, struct kinfo_proc *k procstat_args(pid, kipp); else if (fflag) procstat_files(pid, kipp); + else if (iflag) + procstat_sigs(pid, kipp); + else if (jflag) + procstat_threads_sigs(pid, kipp); else if (kflag) procstat_kstack(pid, kipp, kflag); else if (sflag) @@ -109,7 +113,7 @@ main(int argc, char *argv[]) char *dummy; interval = 0; - while ((ch = getopt(argc, argv, "abcfkhstvw:")) != -1) { + while ((ch = getopt(argc, argv, "abcfijknhstvw:")) != -1) { switch (ch) { case 'a': aflag++; @@ -127,10 +131,22 @@ main(int argc, char *argv[]) fflag++; break; + case 'i': + iflag++; + break; + + case 'j': + jflag++; + break; + case 'k': kflag++; break; + case 'n': + nflag++; + break; + case 'h': hflag++; break; Modified: head/usr.bin/procstat/procstat.h ============================================================================== --- head/usr.bin/procstat/procstat.h Mon Mar 8 19:58:00 2010 (r204878) +++ head/usr.bin/procstat/procstat.h Mon Mar 8 20:44:22 2010 (r204879) @@ -29,7 +29,7 @@ #ifndef PROCSTAT_H #define PROCSTAT_H -extern int hflag; +extern int hflag, nflag; struct kinfo_proc; void kinfo_proc_sort(struct kinfo_proc *kipp, int count); @@ -40,7 +40,9 @@ void procstat_bin(pid_t pid, struct kinf void procstat_cred(pid_t pid, struct kinfo_proc *kipp); void procstat_files(pid_t pid, struct kinfo_proc *kipp); void procstat_kstack(pid_t pid, struct kinfo_proc *kipp, int kflag); +void procstat_sigs(pid_t pid, struct kinfo_proc *kipp); void procstat_threads(pid_t pid, struct kinfo_proc *kipp); +void procstat_threads_sigs(pid_t pid, struct kinfo_proc *kipp); void procstat_vm(pid_t pid, struct kinfo_proc *kipp); #endif /* !PROCSTAT_H */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 20:45:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B09DC1065670; Mon, 8 Mar 2010 20:45: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 9F0738FC26; Mon, 8 Mar 2010 20:45: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 o28KjqLR002940; Mon, 8 Mar 2010 20:45:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28KjqJi002939; Mon, 8 Mar 2010 20:45:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003082045.o28KjqJi002939@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Mar 2010 20:45: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: r204880 - head/usr.bin/procstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 20:45:52 -0000 Author: kib Date: Mon Mar 8 20:45:52 2010 New Revision: 204880 URL: http://svn.freebsd.org/changeset/base/204880 Log: Add file forgotten in r204879. Added: head/usr.bin/procstat/procstat_sigs.c (contents, props changed) Added: head/usr.bin/procstat/procstat_sigs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/procstat/procstat_sigs.c Mon Mar 8 20:45:52 2010 (r204880) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2010 Konstantin Belousov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +static void +procstat_print_signame(int sig) +{ + char name[12]; + int i; + + if (!nflag && sig < sys_nsig) { + strlcpy(name, sys_signame[sig], sizeof(name)); + for (i = 0; name[i] != 0; i++) + name[i] = toupper(name[i]); + printf("%-7s ", name); + } else + printf("%-7d ", sig); +} + +static void +procstat_print_sig(const sigset_t *set, int sig, char flag) +{ + + printf("%c", sigismember(set, sig) ? flag : '-'); +} + +void +procstat_sigs(pid_t pid, struct kinfo_proc *kipp) +{ + int j; + + if (!hflag) + printf("%5s %-16s %-7s %4s\n", "PID", "COMM", "SIG", "FLAGS"); + + for (j = 1; j <= _SIG_MAXSIG; j++) { + printf("%5d ", pid); + printf("%-16s ", kipp->ki_comm); + procstat_print_signame(j); + printf(" "); + procstat_print_sig(&kipp->ki_siglist, j, 'P'); + procstat_print_sig(&kipp->ki_sigignore, j, 'I'); + procstat_print_sig(&kipp->ki_sigcatch, j, 'C'); + printf("\n"); + } +} + +void +procstat_threads_sigs(pid_t pid, struct kinfo_proc *kipp) +{ + struct kinfo_proc *kip; + int error, name[4], j; + unsigned int i; + size_t len; + + if (!hflag) + printf("%5s %6s %-16s %-7s %4s\n", "PID", "TID", "COMM", + "SIG", "FLAGS"); + + /* + * We need to re-query for thread information, so don't use *kipp. + */ + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_PID | KERN_PROC_INC_THREAD; + name[3] = pid; + + len = 0; + error = sysctl(name, 4, NULL, &len, NULL, 0); + if (error < 0 && errno != ESRCH) { + warn("sysctl: kern.proc.pid: %d", pid); + return; + } + if (error < 0) + return; + + kip = malloc(len); + if (kip == NULL) + err(-1, "malloc"); + + if (sysctl(name, 4, kip, &len, NULL, 0) < 0) { + warn("sysctl: kern.proc.pid: %d", pid); + free(kip); + return; + } + + kinfo_proc_sort(kip, len / sizeof(*kipp)); + for (i = 0; i < len / sizeof(*kipp); i++) { + kipp = &kip[i]; + for (j = 1; j <= _SIG_MAXSIG; j++) { + printf("%5d ", pid); + printf("%6d ", kipp->ki_tid); + printf("%-16s ", kipp->ki_comm); + procstat_print_signame(j); + printf(" "); + procstat_print_sig(&kipp->ki_siglist, j, 'P'); + procstat_print_sig(&kipp->ki_sigmask, j, 'B'); + printf("\n"); + } + } + free(kip); +} From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 21:09:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF391106564A; Mon, 8 Mar 2010 21:09:28 +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 AFC168FC1B; Mon, 8 Mar 2010 21:09: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 639C646B37; Mon, 8 Mar 2010 16:09:28 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 30C768A021; Mon, 8 Mar 2010 16:09:27 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Mon, 8 Mar 2010 16:09:25 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003081940.o28JeVG1088074@svn.freebsd.org> In-Reply-To: <201003081940.o28JeVG1088074@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003081609.25643.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Mar 2010 16:09:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:09:29 -0000 On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote: > Author: jkim > Date: Mon Mar 8 19:40:31 2010 > New Revision: 204877 > URL: http://svn.freebsd.org/changeset/base/204877 > > Log: > Enable ACPI module build on amd64. Although we strongly recommend building > it into kernel, there is no need to prevent it from building at all. > > Modified: > head/sys/modules/acpi/acpi/Makefile > > Modified: head/sys/modules/acpi/acpi/Makefile > ============================================================================== > --- head/sys/modules/acpi/acpi/Makefile Mon Mar 8 19:40:22 2010 (r204876) > +++ head/sys/modules/acpi/acpi/Makefile Mon Mar 8 19:40:31 2010 (r204877) > @@ -1,11 +1,11 @@ > # $FreeBSD$ > > -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" > -.error "ACPI can only be compiled into the kernel on the amd64 and ia64 platforms" > +.if ${MACHINE_ARCH} == "ia64" > +.error "ACPI can only be compiled into the kernel on the ia64 platform" > .endif > > -.if ${MACHINE} != "i386" > -.error "The ACPI module is only for i386" > +.if ${MACHINE} != "amd64" && ${MACHINE} != "i386" > +.error "The ACPI module is only for amd64 and i386" > .endif > > .PATH: ${.CURDIR}/../../../contrib/dev/acpica/debugger \ > @@ -97,9 +97,13 @@ opt_ddb.h: Makefile > SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c > SRCS+= assym.s madt.c > CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o > + > .if ${MACHINE_ARCH} == "amd64" > -SRCS+= opt_global.h > +SRCS+= acpi_switch.S opt_global.h > CLEANFILES+= acpi_wakedata.h > +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} > +acpi_switch.o: acpi_switch.S > + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} > .endif > > acpi_wakecode.h: acpi_wakecode.S assym.s > -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 21:12:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFBE7106566B; Mon, 8 Mar 2010 21:12:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 80F178FC13; Mon, 8 Mar 2010 21:12:45 +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 348AE46B03; Mon, 8 Mar 2010 16:12:45 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 248388A01F; Mon, 8 Mar 2010 16:12:44 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Mon, 8 Mar 2010 16:11:42 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003081940.o28JeVG1088074@svn.freebsd.org> In-Reply-To: <201003081940.o28JeVG1088074@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003081611.42854.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Mar 2010 16:12:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:12:45 -0000 On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote: > Author: jkim > Date: Mon Mar 8 19:40:31 2010 > New Revision: 204877 > URL: http://svn.freebsd.org/changeset/base/204877 > > Log: > Enable ACPI module build on amd64. Although we strongly recommend building > it into kernel, there is no need to prevent it from building at all. (Oops, ignore previous spurious reply). Please revert this. The MADT parser on amd64 is slightly different from i386 and will not work when acpi is loaded as a module. If anything, I would prefer we make acpi not be a module on i386. There are several things that would be far less invasive to implement via #ifdef DEV_ACPI than by defining runtime kobj interfaces to the ACPI driver. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 21:16:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E1001065670; Mon, 8 Mar 2010 21:16:30 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2088FC12; Mon, 8 Mar 2010 21:16: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 o28LGSdm009979; Mon, 8 Mar 2010 21:16:28 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28LGSMZ009977; Mon, 8 Mar 2010 21:16:28 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201003082116.o28LGSMZ009977@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 8 Mar 2010 21:16: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: r204886 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:16:30 -0000 Author: lulf Date: Mon Mar 8 21:16:28 2010 New Revision: 204886 URL: http://svn.freebsd.org/changeset/base/204886 Log: - Set missing flag when initiating a plex rebuild with the rebuildparity command. - Check if plex is already syncing or rebuilding before initiating a parity rebuild or check. Modified: head/sys/geom/vinum/geom_vinum.c Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Mon Mar 8 21:14:21 2010 (r204885) +++ head/sys/geom/vinum/geom_vinum.c Mon Mar 8 21:16:28 2010 (r204886) @@ -788,7 +788,15 @@ gv_worker(void *arg) "completely accessible", p->name); break; } + if (p->flags & GV_PLEX_SYNCING || + p->flags & GV_PLEX_REBUILDING || + p->flags & GV_PLEX_GROWING) { + G_VINUM_DEBUG(0, "plex %s is busy with " + "syncing or parity build", p->name); + break; + } p->synced = 0; + p->flags |= GV_PLEX_REBUILDING; g_topology_assert_not(); g_topology_lock(); err = gv_access(p->vol_sc->provider, 1, 1, 0); @@ -811,6 +819,13 @@ gv_worker(void *arg) "completely accessible", p->name); break; } + if (p->flags & GV_PLEX_SYNCING || + p->flags & GV_PLEX_REBUILDING || + p->flags & GV_PLEX_GROWING) { + G_VINUM_DEBUG(0, "plex %s is busy with " + "syncing or parity build", p->name); + break; + } p->synced = 0; g_topology_assert_not(); g_topology_lock(); From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 21:17:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC87106566C; Mon, 8 Mar 2010 21:17:11 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC58A8FC21; Mon, 8 Mar 2010 21:17: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 o28LHA7Z010183; Mon, 8 Mar 2010 21:17:10 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28LHAW0010179; Mon, 8 Mar 2010 21:17:10 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003082117.o28LHAW0010179@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 8 Mar 2010 21:17: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: r204887 - head/contrib/tzdata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:17:11 -0000 Author: edwin Date: Mon Mar 8 21:17:10 2010 New Revision: 204887 URL: http://svn.freebsd.org/changeset/base/204887 Log: MFV of tzdata2010e: - Adjust beginning / end of DST in Bangladesh (minimal impact) - Fiji ends DST one month earlier to last Sunday of March - Samoa changes - Chile extends DST until 3 April this year. Modified: head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Mon Mar 8 21:16:28 2010 (r204886) +++ head/contrib/tzdata/asia Mon Mar 8 21:17:10 2010 (r204887) @@ -1,4 +1,4 @@ -# @(#)asia 8.51 +# @(#)asia 8.55 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -225,11 +225,31 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # until further notice." I take that last sentence as the # establishment of a rule. +# From Nobutomo Nakano (2010-02-19): +# We received a report from Bangladesh saying that the start/end of +# Bangladesh DST is incorrect. Currently we have only the Bengali version +# of the official mail from BTRC which describes the following: +# +# "From 2010 each year when local standard time is about to reach +# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) +# and when local daylight time is about to October 31 at 11:59:00 PM +# clocks are turned backward 1 hour (10:59:00 PM)." +# +# So, DST will start/end 1 minute earlier. + +# From Arthur David Olson (2010-03-03): +# The file +# +# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# +# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" +# which is consistent with the information provided by Nobutomo Nakano. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S -Rule Dhaka 2010 only - Jan 1 0:00 0 - -Rule Dhaka 2010 max - Mar 31 23:00 1:00 S -Rule Dhaka 2010 max - Nov 1 0:00 0 - +Rule Dhaka 2009 only - Dec 31 23:59 0 - +Rule Dhaka 2010 max - Mar 31 22:59 1:00 S +Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Mon Mar 8 21:16:28 2010 (r204886) +++ head/contrib/tzdata/australasia Mon Mar 8 21:17:10 2010 (r204887) @@ -1,5 +1,5 @@ #
-# @(#)australasia	8.15
+# @(#)australasia	8.16
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -267,11 +267,30 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # 
 # http://www.fiji.gov.fj/publish/page_16198.shtml
 # 
+
+# From Steffen Thorsen (2010-03-03):
+# The Cabinet in Fiji has decided to end DST about a month early, on
+# 2010-03-28 at 03:00.
+# The plan is to observe DST again, from 2010-10-24 to sometime in March
+# 2011 (last Sunday a good guess?).
+#
+# Official source:
+# 
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166
+# 
+#
+# A bit more background info here:
+# 
+# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
-Rule	Fiji	2010	only	-	Apr	25	3:00	0	-
+Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
+Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
+Rule	Fiji	2011	only	-	Mar	lastSun 3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -449,70 +468,30 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 
 # Samoa
 
-# From Alexander Krivenyshev (2008-12-06):
-# The Samoa government (Western Samoa) may implement DST on the first Sunday of 
-# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28, 
-# 2010). 
-# 
-# "Selected Committee reports to Cabinet on Daylight Saving Time",
-# Government of Samoa:
-# 
-# http://www.govt.ws/pr_article.cfm?pr_id=560
-# 
-# or
-# 
-# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
-# 
-
-# From Steffen Thorsen (2009-08-27):
-# Samoa's parliament passed the Daylight Saving Bill 2009, and will start 
-# daylight saving time on the first Sunday of October 2009 and end on the 
-# last Sunday of March 2010. We hope that the full text will be published 
-# soon, but we believe that the bill is only valid for 2009-2010. Samoa's 
-# Daylight Saving Act 2009 will be enforced as soon as the Head of State 
-# executes a proclamation publicizing this Act.
+# From Steffen Thorsen (2009-10-16):
+# We have been in contact with the government of Samoa again, and received
+# the following info:
+#
+# "Cabinet has now approved Daylight Saving to be effected next year
+# commencing from the last Sunday of September 2010 and conclude first
+# Sunday of April 2011."
 #
-# Some background information here, which will be updated once we have 
-# more details:
+# Background info:
 # 
 # http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
 # 
-
-# From Alexander Krivenyshev (2009-10-03):
-# First, my deepest condolences to people of Samoa islands and all families and
-# loved ones around the world who lost their lives in the earthquake and tsunami.
-#
-# Considering the recent devastation on Samoa by earthquake and tsunami and that
-# many government offices/ ministers are closed- not sure if "Daylight Saving
-# Bill 2009" will be implemented in next few days- on October 4, 2009.
-#
-# Here is reply from Consulate-General of Samoa in New Zealand
-# ---------------------------
-# Consul General
-# consulgeneral@samoaconsulate.org.nz
-#
-# Talofa Alexander,
-#
-# Thank you for your sympathy for our country but at this time we have not
-# been informed about the Daylight Savings Time Change.  Most Ministries in
-# Apia are closed or relocating due to weather concerns.
-#
-# When we do find out if they are still proceeding with the time change we
-# will advise you soonest.
-#
-# Kind Regards,
-# Lana
-# for: Consul General
-
-# From Steffen Thorsen (2009-10-05):
-# We have called a hotel in Samoa and asked about local time there - they 
-# are still on standard time.
+#
+# Samoa's Daylight Saving Time Act 2009 is available here, but does not
+# contain any dates:
+# 
+# http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
+# 
 
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
-			-11:00	-	WST	2009 Oct 4
-			-11:00	1:00	WSDT	2010 Mar 28
+			-11:00	-	WST	2010 Oct 24
+			-11:00	1:00	WSDT	2011 Apr 3
 			-11:00	-	WST
 
 # Solomon Is

Modified: head/contrib/tzdata/southamerica
==============================================================================
--- head/contrib/tzdata/southamerica	Mon Mar  8 21:16:28 2010	(r204886)
+++ head/contrib/tzdata/southamerica	Mon Mar  8 21:17:10 2010	(r204887)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.41
+# @(#)southamerica	8.43
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1121,6 +1121,18 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 # http://www.shoa.cl/noticias/2008/04hora/hora.htm
 # .
 
+# From Angel Chiang (2010-03-04):
+# Subject: DST in Chile exceptionally extended to 3 April due to earthquake
+# 
+# http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098
+# 
+# (in Spanish, last paragraph).
+#
+# This is breaking news. There should be more information available later.
+
+# From Arthur Daivd Olson (2010-03-06):
+# Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1932	-	Sep	 1	0:00	1:00	S
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1155,7 +1167,9 @@ Rule	Chile	2000	2007	-	Mar	Sun>=9	3:00u	
 # N.B.: the end of March 29 in Chile is March 30 in Universal time,
 # which is used below in specifying the transition.
 Rule	Chile	2008	only	-	Mar	30	3:00u	0	-
-Rule	Chile	2009	max	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2009	only	-	Mar	Sun>=9	3:00u	0	-
+Rule	Chile	2010	only	-	Apr	 4	3:00u	0	-
+Rule	Chile	2011	max	-	Mar	Sun>=9	3:00u	0	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1380,7 +1394,7 @@ Rule	Para	2005	2009	-	Mar	Sun>=8	0:00	0	
 # and that on the first Sunday of the month of October, it is to be set
 # forward 60 minutes, in all the territory of the Paraguayan Republic.
 # ...
-Rule	Para	2010	max	-	Oct	Sun<=7	0:00	1:00	S
+Rule	Para	2010	max	-	Oct	Sun>=1	0:00	1:00	S
 Rule	Para	2010	max	-	Apr	Sun>=8	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-head@FreeBSD.ORG  Mon Mar  8 22:12:17 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 2653F1065673;
	Mon,  8 Mar 2010 22:12:17 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: John Baldwin 
Date: Mon, 8 Mar 2010 17:11:42 -0500
User-Agent: KMail/1.6.2
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003081611.42854.jhb@freebsd.org>
In-Reply-To: <201003081611.42854.jhb@freebsd.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003081712.00635.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 08 Mar 2010 22:12:17 -0000

On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > Author: jkim
> > Date: Mon Mar  8 19:40:31 2010
> > New Revision: 204877
> > URL: http://svn.freebsd.org/changeset/base/204877
> >
> > Log:
> >   Enable ACPI module build on amd64.  Although we strongly
> > recommend building it into kernel, there is no need to prevent it
> > from building at all.
>
> (Oops, ignore previous spurious reply).
>
> Please revert this.  The MADT parser on amd64 is slightly different
> from i386 and will not work when acpi is loaded as a module.  If
> anything, I would prefer we make acpi not be a module on i386. 
> There are several things that would be far less invasive to
> implement via #ifdef DEV_ACPI than by defining runtime kobj
> interfaces to the ACPI driver.

madt.c itself is not very different but I understand what you are 
trying to explain here.  In fact, I tested it before committing and 
the trick was adding mptable in place of acpi.  It worked fine 
although it may not be ideal.  I can back out 
sys/modules/acpi/Makefile change if you agree, however.

Jung-uk Kim

From owner-svn-src-head@FreeBSD.ORG  Mon Mar  8 22:26:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 839E81065675;
	Mon,  8 Mar 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 53CBD8FC1E;
	Mon,  8 Mar 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 0684A46B09;
	Mon,  8 Mar 2010 17:26:10 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 4DB7E8A025;
	Mon,  8 Mar 2010 17:26:09 -0500 (EST)
From: John Baldwin 
To: "Jung-uk Kim" 
Date: Mon, 8 Mar 2010 17:25:59 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003081611.42854.jhb@freebsd.org>
	<201003081712.00635.jkim@FreeBSD.org>
In-Reply-To: <201003081712.00635.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003081725.59267.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Mon, 08 Mar 2010 17:26:09 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 08 Mar 2010 22:26:10 -0000

On Monday 08 March 2010 5:11:42 pm Jung-uk Kim wrote:
> On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> > On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > > Author: jkim
> > > Date: Mon Mar  8 19:40:31 2010
> > > New Revision: 204877
> > > URL: http://svn.freebsd.org/changeset/base/204877
> > >
> > > Log:
> > >   Enable ACPI module build on amd64.  Although we strongly
> > > recommend building it into kernel, there is no need to prevent it
> > > from building at all.
> >
> > (Oops, ignore previous spurious reply).
> >
> > Please revert this.  The MADT parser on amd64 is slightly different
> > from i386 and will not work when acpi is loaded as a module.  If
> > anything, I would prefer we make acpi not be a module on i386. 
> > There are several things that would be far less invasive to
> > implement via #ifdef DEV_ACPI than by defining runtime kobj
> > interfaces to the ACPI driver.
> 
> madt.c itself is not very different but I understand what you are 
> trying to explain here.  In fact, I tested it before committing and 
> the trick was adding mptable in place of acpi.  It worked fine 
> although it may not be ideal.  I can back out 
> sys/modules/acpi/Makefile change if you agree, however.

It is different enough.  Specifically, the amd64 one sets a "better" value for 
mp_maxid than i386, but it can only do this because it can run before 
SI_SUB_KLD since it is never invoked as a module.  I still think that we 
should probably be moving away from acpi.ko rather than towards for other 
reasons.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Mon Mar  8 22:27:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C251E1065675;
	Mon,  8 Mar 2010 22:27:46 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B0CFF8FC1E;
	Mon,  8 Mar 2010 22:27: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 o28MRkf9026210;
	Mon, 8 Mar 2010 22:27:46 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28MRkKT026208;
	Mon, 8 Mar 2010 22:27:46 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201003082227.o28MRkKT026208@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Mon, 8 Mar 2010 22:27: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: r204896 - head/usr.bin/comm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 08 Mar 2010 22:27:46 -0000

Author: ache
Date: Mon Mar  8 22:27:46 2010
New Revision: 204896
URL: http://svn.freebsd.org/changeset/base/204896

Log:
  Rewrite input processing to not exit with error on the first EILSEQ found
  in the input data but fallback to "binary comparison" instead.
  
  POSIX says: "The input files shall be text files", nothing more,
  so the text file with illegal sequence is valid input.
  BTW, GNU sort does not fails on EILSEQ too.

Modified:
  head/usr.bin/comm/comm.c

Modified: head/usr.bin/comm/comm.c
==============================================================================
--- head/usr.bin/comm/comm.c	Mon Mar  8 21:42:19 2010	(r204895)
+++ head/usr.bin/comm/comm.c	Mon Mar  8 22:27:46 2010	(r204896)
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#define _WITH_GETLINE
 #include 
 #include 
 #include 
@@ -60,40 +61,31 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#define	INITLINELEN	(LINE_MAX + 1)
-#define	MAXLINELEN	((SIZE_MAX / sizeof(wchar_t)) / 2)
-
-const wchar_t *tabs[] = { L"", L"\t", L"\t\t" };
+int iflag;
+const char *tabs[] = { "", "\t", "\t\t" };
 
 FILE   *file(const char *);
-wchar_t	*getline(wchar_t *, size_t *, FILE *);
-void	show(FILE *, const char *, const wchar_t *, wchar_t *, size_t *);
-int     wcsicoll(const wchar_t *, const wchar_t *);
+wchar_t	*convert(const char *);
+void	show(FILE *, const char *, const char *, char **, size_t *);
 static void	usage(void);
 
 int
 main(int argc, char *argv[])
 {
 	int comp, read1, read2;
-	int ch, flag1, flag2, flag3, iflag;
+	int ch, flag1, flag2, flag3;
 	FILE *fp1, *fp2;
-	const wchar_t *col1, *col2, *col3;
+	const char *col1, *col2, *col3;
 	size_t line1len, line2len;
-	wchar_t *line1, *line2;
-	const wchar_t **p;
-
-	flag1 = flag2 = flag3 = 1;
-	iflag = 0;
-
- 	line1len = INITLINELEN;
- 	line2len = INITLINELEN;
- 	line1 = malloc(line1len * sizeof(*line1));
- 	line2 = malloc(line2len * sizeof(*line2));
-	if (line1 == NULL || line2 == NULL)
-		err(1, "malloc");
+	char *line1, *line2;
+	ssize_t n1, n2;
+	wchar_t *tline1, *tline2;
+	const char **p;
 
 	(void) setlocale(LC_ALL, "");
 
+	flag1 = flag2 = flag3 = 1;
+
 	while ((ch = getopt(argc, argv, "123i")) != -1)
 		switch(ch) {
 		case '1':
@@ -131,41 +123,57 @@ main(int argc, char *argv[])
 	if (flag3)
 		col3 = *p;
 
+	line1len = line2len = 0;
+	line1 = line2 = NULL;
+	n1 = n2 = -1;
+
 	for (read1 = read2 = 1;;) {
 		/* read next line, check for EOF */
 		if (read1) {
-			line1 = getline(line1, &line1len, fp1);
-			if (line1 == NULL && ferror(fp1))
+			n1 = getline(&line1, &line1len, fp1);
+			if (n1 < 0 && ferror(fp1))
 				err(1, "%s", argv[0]);
+			if (n1 > 0 && line1[n1 - 1] == '\n')
+				line1[n1 - 1] = '\0';
+
 		}
 		if (read2) {
-			line2 = getline(line2, &line2len, fp2);
-			if (line2 == NULL && ferror(fp2))
+			n2 = getline(&line2, &line2len, fp2);
+			if (n2 < 0 && ferror(fp2))
 				err(1, "%s", argv[1]);
+			if (n2 > 0 && line2[n2 - 1] == '\n')
+				line2[n2 - 1] = '\0';
 		}
 
 		/* if one file done, display the rest of the other file */
-		if (line1 == NULL) {
-			if (line2 != NULL && col2 != NULL)
-				show(fp2, argv[1], col2, line2, &line2len);
+		if (n1 < 0) {
+			if (n2 >= 0 && col2 != NULL)
+				show(fp2, argv[1], col2, &line2, &line2len);
 			break;
 		}
-		if (line2 == NULL) {
-			if (line1 != NULL && col1 != NULL)
-				show(fp1, argv[0], col1, line1, &line1len);
+		if (n2 < 0) {
+			if (n1 >= 0 && col1 != NULL)
+				show(fp1, argv[0], col1, &line1, &line1len);
 			break;
 		}
 
-		/* lines are the same */
-		if(iflag)
-			comp = wcsicoll(line1, line2);
+		tline2 = NULL;
+		if ((tline1 = convert(line1)) != NULL)
+			tline2 = convert(line2);
+		if (tline1 == NULL || tline2 == NULL)
+			comp = strcmp(line1, line2);
 		else
-			comp = wcscoll(line1, line2);
+			comp = wcscoll(tline1, tline2);
+		if (tline1 != NULL)
+			free(tline1);
+		if (tline2 != NULL)
+			free(tline2);
 
+		/* lines are the same */
 		if (!comp) {
 			read1 = read2 = 1;
 			if (col3 != NULL)
-				(void)printf("%ls%ls\n", col3, line1);
+				(void)printf("%s%s\n", col3, line1);
 			continue;
 		}
 
@@ -174,49 +182,50 @@ main(int argc, char *argv[])
 			read1 = 1;
 			read2 = 0;
 			if (col1 != NULL)
-				(void)printf("%ls%ls\n", col1, line1);
+				(void)printf("%s%s\n", col1, line1);
 		} else {
 			read1 = 0;
 			read2 = 1;
 			if (col2 != NULL)
-				(void)printf("%ls%ls\n", col2, line2);
+				(void)printf("%s%s\n", col2, line2);
 		}
 	}
 	exit(0);
 }
 
 wchar_t *
-getline(wchar_t *buf, size_t *buflen, FILE *fp)
+convert(const char *str)
 {
-	size_t bufpos;
-	wint_t ch;
+	size_t n;
+	wchar_t *buf, *p;
 
-	bufpos = 0;
-	while ((ch = getwc(fp)) != WEOF && ch != '\n') {
-		if (bufpos + 1 >= *buflen) {
-			*buflen = *buflen * 2;
-			if (*buflen > MAXLINELEN)
-				errx(1,
-				    "Maximum line buffer length (%zu) exceeded",
-				    MAXLINELEN);
-			buf = reallocf(buf, *buflen * sizeof(*buf));
-			if (buf == NULL)
-				err(1, "reallocf");
-		}
-		buf[bufpos++] = ch;
+	if ((n = mbstowcs(NULL, str, 0)) == (size_t)-1)
+		return (NULL);
+	if ((buf = malloc((n + 1) * sizeof(*buf))) == NULL)
+		err(1, "malloc");
+	if (mbstowcs(buf, str, n + 1) != n)
+		errx(1, "internal mbstowcs() error");
+
+	if (iflag) {
+		for (p = buf; *p != L'\0'; p++)
+			*p = towlower(*p);
 	}
-	buf[bufpos] = '\0';
 
-	return (bufpos != 0 || ch == '\n' ? buf : NULL);
+	return (buf);
 }
 
 void
-show(FILE *fp, const char *fn, const wchar_t *offset, wchar_t *buf, size_t *buflen)
+show(FILE *fp, const char *fn, const char *offset, char **bufp, size_t *buflenp)
 {
+	ssize_t n;
 
 	do {
-		(void)printf("%ls%ls\n", offset, buf);
-	} while ((buf = getline(buf, buflen, fp)) != NULL);
+		(void)printf("%s%s\n", offset, *bufp);
+		if ((n = getline(bufp, buflenp, fp)) < 0)
+			break;
+		if (n > 0 && (*bufp)[n - 1] == '\n')
+			(*bufp)[n - 1] = '\0';
+	} while (1);
 	if (ferror(fp))
 		err(1, "%s", fn);
 }
@@ -240,52 +249,3 @@ usage(void)
 	(void)fprintf(stderr, "usage: comm [-123i] file1 file2\n");
 	exit(1);
 }
-
-static size_t wcsicoll_l1_buflen = 0, wcsicoll_l2_buflen = 0;
-static wchar_t *wcsicoll_l1_buf = NULL, *wcsicoll_l2_buf = NULL;
-
-int
-wcsicoll(const wchar_t *s1, const wchar_t *s2)
-{
-	wchar_t *p;
-	size_t l1, l2;
-	size_t new_l1_buflen, new_l2_buflen;
-
-	l1 = wcslen(s1) + 1;
-	l2 = wcslen(s2) + 1;
-	new_l1_buflen = wcsicoll_l1_buflen;
-	new_l2_buflen = wcsicoll_l2_buflen;
-	while (new_l1_buflen < l1) {
-		if (new_l1_buflen == 0)
-			new_l1_buflen = INITLINELEN;
-		else
-			new_l1_buflen *= 2;
-	}
-	while (new_l2_buflen < l2) {
-		if (new_l2_buflen == 0)
-			new_l2_buflen = INITLINELEN;
-		else
-			new_l2_buflen *= 2;
-	}
-	if (new_l1_buflen > wcsicoll_l1_buflen) {
-		wcsicoll_l1_buf = reallocf(wcsicoll_l1_buf, new_l1_buflen * sizeof(*wcsicoll_l1_buf));
-		if (wcsicoll_l1_buf == NULL)
-                	err(1, "reallocf");
-		wcsicoll_l1_buflen = new_l1_buflen;
-	}
-	if (new_l2_buflen > wcsicoll_l2_buflen) {
-		wcsicoll_l2_buf = reallocf(wcsicoll_l2_buf, new_l2_buflen * sizeof(*wcsicoll_l2_buf));
-		if (wcsicoll_l2_buf == NULL)
-                	err(1, "reallocf");
-		wcsicoll_l2_buflen = new_l2_buflen;
-	}
-
-	for (p = wcsicoll_l1_buf; *s1; s1++)
-		*p++ = towlower(*s1);
-	*p = '\0';
-	for (p = wcsicoll_l2_buf; *s2; s2++)
-		*p++ = towlower(*s2);
-	*p = '\0';
-
-	return (wcscoll(wcsicoll_l1_buf, wcsicoll_l2_buf));
-}

From owner-svn-src-head@FreeBSD.ORG  Mon Mar  8 22:52:37 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 7688A1065672;
	Mon,  8 Mar 2010 22:52:36 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: John Baldwin 
Date: Mon, 8 Mar 2010 17:52:16 -0500
User-Agent: KMail/1.6.2
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003081712.00635.jkim@FreeBSD.org>
	<201003081725.59267.jhb@freebsd.org>
In-Reply-To: <201003081725.59267.jhb@freebsd.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003081752.20087.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 08 Mar 2010 22:52:37 -0000

On Monday 08 March 2010 05:25 pm, John Baldwin wrote:
> On Monday 08 March 2010 5:11:42 pm Jung-uk Kim wrote:
> > On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> > > On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > > > Author: jkim
> > > > Date: Mon Mar  8 19:40:31 2010
> > > > New Revision: 204877
> > > > URL: http://svn.freebsd.org/changeset/base/204877
> > > >
> > > > Log:
> > > >   Enable ACPI module build on amd64.  Although we strongly
> > > > recommend building it into kernel, there is no need to
> > > > prevent it from building at all.
> > >
> > > (Oops, ignore previous spurious reply).
> > >
> > > Please revert this.  The MADT parser on amd64 is slightly
> > > different from i386 and will not work when acpi is loaded as a
> > > module.  If anything, I would prefer we make acpi not be a
> > > module on i386. There are several things that would be far less
> > > invasive to implement via #ifdef DEV_ACPI than by defining
> > > runtime kobj interfaces to the ACPI driver.
> >
> > madt.c itself is not very different but I understand what you are
> > trying to explain here.  In fact, I tested it before committing
> > and the trick was adding mptable in place of acpi.  It worked
> > fine although it may not be ideal.  I can back out
> > sys/modules/acpi/Makefile change if you agree, however.
>
> It is different enough.  Specifically, the amd64 one sets a
> "better" value for mp_maxid than i386, but it can only do this
> because it can run before SI_SUB_KLD since it is never invoked as a
> module.  I still think that we should probably be moving away from
> acpi.ko rather than towards for other reasons.

I noticed that and I used mptable instead, which seems to do well 
enough for the job.  Please keep in mind that I am not trying to 
promote acpi.ko at all.  I just want to make sure acpi.ko can be 
built and loaded without builing and installing the whole 
world/kernel for i386 to test new ACPICA. :-(

Any way, I will just revert sys/modules/acpi/Makefile change, then.  
It should be a reasonable compromise, deal?

Jung-uk Kim

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 00:48:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8608F106566C;
	Tue,  9 Mar 2010 00:48:07 +0000 (UTC)
	(envelope-from ticso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7590B8FC12;
	Tue,  9 Mar 2010 00:48: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 o290m7Gb057140;
	Tue, 9 Mar 2010 00:48:07 GMT (envelope-from ticso@svn.freebsd.org)
Received: (from ticso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o290m7sU057138;
	Tue, 9 Mar 2010 00:48:07 GMT (envelope-from ticso@svn.freebsd.org)
Message-Id: <201003090048.o290m7sU057138@svn.freebsd.org>
From: Bernd Walter 
Date: Tue, 9 Mar 2010 00:48: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: r204899 - head/sys/boot/arm/at91/boot2
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 00:48:07 -0000

Author: ticso
Date: Tue Mar  9 00:48:06 2010
New Revision: 204899
URL: http://svn.freebsd.org/changeset/base/204899

Log:
  fix signed warning

Modified:
  head/sys/boot/arm/at91/boot2/bwct_board.c

Modified: head/sys/boot/arm/at91/boot2/bwct_board.c
==============================================================================
--- head/sys/boot/arm/at91/boot2/bwct_board.c	Mon Mar  8 23:06:09 2010	(r204898)
+++ head/sys/boot/arm/at91/boot2/bwct_board.c	Tue Mar  9 00:48:06 2010	(r204899)
@@ -21,7 +21,7 @@ static void DS1672_Init();
 
 static void
 DS1672_Init() {
-	uint8_t buf[] = {0x00, 0xa9};
+	char buf[] = {0x00, 0xa9};
 
 	EEWrite(0xd0, buf, sizeof(buf));
 }

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 00:50:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 311071065674;
	Tue,  9 Mar 2010 00:50:59 +0000 (UTC)
	(envelope-from ticso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D8078FC1B;
	Tue,  9 Mar 2010 00:50: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 o290owMb057811;
	Tue, 9 Mar 2010 00:50:58 GMT (envelope-from ticso@svn.freebsd.org)
Received: (from ticso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o290ow9I057808;
	Tue, 9 Mar 2010 00:50:58 GMT (envelope-from ticso@svn.freebsd.org)
Message-Id: <201003090050.o290ow9I057808@svn.freebsd.org>
From: Bernd Walter 
Date: Tue, 9 Mar 2010 00:50: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: r204900 - in head/sys/boot/arm/at91: boot2 libat91
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 00:51:00 -0000

Author: ticso
Date: Tue Mar  9 00:50:58 2010
New Revision: 204900
URL: http://svn.freebsd.org/changeset/base/204900

Log:
  BWCT boards can have 128MB SDRAM.

Modified:
  head/sys/boot/arm/at91/boot2/bwct_board.c
  head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c

Modified: head/sys/boot/arm/at91/boot2/bwct_board.c
==============================================================================
--- head/sys/boot/arm/at91/boot2/bwct_board.c	Tue Mar  9 00:48:06 2010	(r204899)
+++ head/sys/boot/arm/at91/boot2/bwct_board.c	Tue Mar  9 00:50:58 2010	(r204900)
@@ -90,7 +90,11 @@ board_init(void)
 	printf("BWCT FSB-A920-1\n");
 	printf("http://www.bwct.de\n");
 	printf("\n");
-	printf("AT92RM9200 180MHz\n");
+#if defined(SDRAM_128M)
+	printf("AT92RM9200 180MHz 128MB\n");
+#else
+	printf("AT92RM9200 180MHz 64MB\n");
+#endif
 	printf("Initialising USART0\n");
 	USART0_Init();
 	printf("Initialising USART1\n");

Modified: head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c
==============================================================================
--- head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c	Tue Mar  9 00:48:06 2010	(r204899)
+++ head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c	Tue Mar  9 00:50:58 2010	(r204900)
@@ -136,7 +136,7 @@ _init(void)
 	AT91C_BASE_EBI->EBI_CSA = value;
 
 	AT91C_BASE_SDRC->SDRC_CR =
-#ifdef KB9202_B
+#if defined(KB9202_B) || defined(SDRAM_128M)
 	    AT91C_SDRC_NC_10 |
 #else
 	    AT91C_SDRC_NC_9 |

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 00:52:16 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7EC12106564A;
	Tue,  9 Mar 2010 00:52:16 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6ED388FC21;
	Tue,  9 Mar 2010 00:52: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 o290qG8j058114;
	Tue, 9 Mar 2010 00:52:16 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o290qGVn058112;
	Tue, 9 Mar 2010 00:52:16 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201003090052.o290qGVn058112@svn.freebsd.org>
From: Xin LI 
Date: Tue, 9 Mar 2010 00:52: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: r204901 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 00:52:16 -0000

Author: delphij
Date: Tue Mar  9 00:52:16 2010
New Revision: 204901
URL: http://svn.freebsd.org/changeset/base/204901

Log:
  Remove the check for IFF_DRV_OACTIVE right before adding a port into lagg
  interface.  The check itself seems to be coming from OpenBSD but does not
  seem to be useful for our code.
  
  Discussed with:	thomasa
  MFC after:	1 month

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Tue Mar  9 00:50:58 2010	(r204900)
+++ head/sys/net/if_lagg.c	Tue Mar  9 00:52:16 2010	(r204901)
@@ -484,10 +484,6 @@ lagg_port_create(struct lagg_softc *sc, 
 	if (sc->sc_count >= LAGG_MAX_PORTS)
 		return (ENOSPC);
 
-	/* New lagg port has to be in an idle state */
-	if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
-		return (EBUSY);
-
 	/* Check if port has already been associated to a lagg */
 	if (ifp->if_lagg != NULL)
 		return (EBUSY);

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 01:11:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B1F13106564A;
	Tue,  9 Mar 2010 01:11:45 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A0C7C8FC0A;
	Tue,  9 Mar 2010 01:11: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 o291Bj0i062511;
	Tue, 9 Mar 2010 01:11:45 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o291Bj79062503;
	Tue, 9 Mar 2010 01:11:45 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201003090111.o291Bj79062503@svn.freebsd.org>
From: Qing Li 
Date: Tue, 9 Mar 2010 01:11: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: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 01:11:45 -0000

Author: qingli
Date: Tue Mar  9 01:11:45 2010
New Revision: 204902
URL: http://svn.freebsd.org/changeset/base/204902

Log:
  One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to
  allow for connection load balancing across interfaces. Currently
  the address alias handling method is colliding with the ECMP code.
  For example, when two interfaces are configured on the same prefix,
  only one prefix route is installed. So connection load balancing
  among the available interfaces is not possible.
  
  The other advantage of ECMP is for failover. The issue with the
  current code, is that the interface link-state is not reflected
  in the route entry. For example, if there are two interfaces on
  the same prefix, the cable on one interface is unplugged, new and
  existing connections should switch over to the other interface.
  This is not done today and packets go into a black hole.
  
  Also, there is a small bug in the kernel where deleting ECMP routes
  in the userland will always return an error even though the command
  is successfully executed.
  
  MFC after:	5 days

Modified:
  head/sys/net/flowtable.c
  head/sys/net/radix.c
  head/sys/net/radix_mpath.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/netinet/in.c
  head/sys/netinet/ip_output.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/net/flowtable.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -472,7 +472,8 @@ flow_stale(struct flowtable *ft, struct 
 	    || ((fle->f_rt->rt_flags & RTF_HOST) &&
 		((fle->f_rt->rt_flags & (RTF_UP))
 		    != (RTF_UP)))
-	    || (fle->f_rt->rt_ifp == NULL))
+	    || (fle->f_rt->rt_ifp == NULL)
+	    || !RT_LINK_IS_UP(fle->f_rt->rt_ifp))
 		return (1);
 
 	idle_time = time_uptime - fle->f_uptime;

Modified: head/sys/net/radix.c
==============================================================================
--- head/sys/net/radix.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/net/radix.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -761,8 +761,10 @@ on2:
 		if (m->rm_flags & RNF_NORMAL) {
 			mmask = m->rm_leaf->rn_mask;
 			if (tt->rn_flags & RNF_NORMAL) {
+#if !defined(RADIX_MPATH)
 			    log(LOG_ERR,
 			        "Non-unique normal route, mask not entered\n");
+#endif
 				return tt;
 			}
 		} else

Modified: head/sys/net/radix_mpath.c
==============================================================================
--- head/sys/net/radix_mpath.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/net/radix_mpath.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -270,7 +270,8 @@ rtalloc_mpath_fib(struct route *ro, uint
 	 * XXX we don't attempt to lookup cached route again; what should
 	 * be done for sendto(3) case?
 	 */
-	if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
+	if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP)
+	    && RT_LINK_IS_UP(ro->ro_rt->rt_ifp))
 		return;				 
 	ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0, fibnum);
 

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/net/route.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -830,7 +830,13 @@ rt_getifa_fib(struct rt_addrinfo *info, 
 int
 rtexpunge(struct rtentry *rt)
 {
+#if !defined(RADIX_MPATH)
 	struct radix_node *rn;
+#else
+	struct rt_addrinfo info;
+	int fib;
+	struct rtentry *rt0;
+#endif
 	struct radix_node_head *rnh;
 	struct ifaddr *ifa;
 	int error = 0;
@@ -843,14 +849,26 @@ rtexpunge(struct rtentry *rt)
 	if (rnh == NULL)
 		return (EAFNOSUPPORT);
 	RADIX_NODE_HEAD_LOCK_ASSERT(rnh);
-#if 0
-	/*
-	 * We cannot assume anything about the reference count
-	 * because protocols call us in many situations; often
-	 * before unwinding references to the table entry.
-	 */
-	KASSERT(rt->rt_refcnt <= 1, ("bogus refcnt %ld", rt->rt_refcnt));
-#endif
+
+#ifdef RADIX_MPATH
+	fib = rt->rt_fibnum;
+	bzero(&info, sizeof(info));
+	info.rti_ifp = rt->rt_ifp;
+	info.rti_flags = RTF_RNH_LOCKED;
+	info.rti_info[RTAX_DST] = rt_key(rt);
+	info.rti_info[RTAX_GATEWAY] = rt->rt_ifa->ifa_addr;
+
+	RT_UNLOCK(rt);
+	error = rtrequest1_fib(RTM_DELETE, &info, &rt0, fib);
+
+	if (error == 0 && rt0 != NULL) {
+		rt = rt0;
+		RT_LOCK(rt);
+	} else if (error != 0) {
+		RT_LOCK(rt);
+		return (error);
+	}
+#else
 	/*
 	 * Remove the item from the tree; it should be there,
 	 * but when callers invoke us blindly it may not (sigh).
@@ -864,6 +882,7 @@ rtexpunge(struct rtentry *rt)
 		("unexpected flags 0x%x", rn->rn_flags));
 	KASSERT(rt == RNTORT(rn),
 		("lookup mismatch, rt %p rn %p", rt, rn));
+#endif /* RADIX_MPATH */
 
 	rt->rt_flags &= ~RTF_UP;
 
@@ -886,7 +905,9 @@ rtexpunge(struct rtentry *rt)
 	 * linked to the routing table.
 	 */
 	V_rttrash++;
+#if !defined(RADIX_MPATH)
 bad:
+#endif
 	return (error);
 }
 
@@ -1044,6 +1065,7 @@ rtrequest1_fib(int req, struct rt_addrin
 			 */
 			if (error != ENOENT)
 				goto bad;
+			error = 0;
 		}
 #endif
 		/*

Modified: head/sys/net/route.h
==============================================================================
--- head/sys/net/route.h	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/net/route.h	Tue Mar  9 01:11:45 2010	(r204902)
@@ -319,6 +319,8 @@ struct rt_addrinfo {
 
 #ifdef _KERNEL
 
+#define RT_LINK_IS_UP(ifp)	((ifp)->if_link_state == LINK_STATE_UP)
+
 #define	RT_LOCK_INIT(_rt) \
 	mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK)
 #define	RT_LOCK(_rt)		mtx_lock(&(_rt)->rt_mtx)

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/netinet/in.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -34,6 +34,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_carp.h"
+#include "opt_mpath.h"
 
 #include 
 #include 
@@ -1040,6 +1041,13 @@ in_addprefix(struct in_ifaddr *target, i
 		 * interface address, we are done here.
 		 */
 		if (ia->ia_flags & IFA_ROUTE) {
+#ifdef RADIX_MPATH
+			if (ia->ia_addr.sin_addr.s_addr == 
+			    target->ia_addr.sin_addr.s_addr)
+				return (EEXIST);
+			else
+				break;
+#endif
 			if (V_sameprefixcarponly &&
 			    target->ia_ifp->if_type != IFT_CARP &&
 			    ia->ia_ifp->if_type != IFT_CARP) {

Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c	Tue Mar  9 00:52:16 2010	(r204901)
+++ head/sys/netinet/ip_output.c	Tue Mar  9 01:11:45 2010	(r204902)
@@ -199,6 +199,8 @@ again:
 	 */
 	rte = ro->ro_rt;
 	if (rte && ((rte->rt_flags & RTF_UP) == 0 ||
+		    rte->rt_ifp == NULL ||
+		    !RT_LINK_IS_UP(rte->rt_ifp) ||
 			  dst->sin_family != AF_INET ||
 			  dst->sin_addr.s_addr != ip->ip_dst.s_addr)) {
 		if (!nortfree)
@@ -270,7 +272,9 @@ again:
 #endif
 			rte = ro->ro_rt;
 		}
-		if (rte == NULL) {
+		if (rte == NULL ||
+		    rte->rt_ifp == NULL ||
+		    !RT_LINK_IS_UP(rte->rt_ifp)) {
 #ifdef IPSEC
 			/*
 			 * There is no route for this packet, but it is

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 01:35:58 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id 2201B1065674;
	Tue,  9 Mar 2010 01:35:58 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: John Baldwin 
Date: Mon, 8 Mar 2010 20:35:42 -0500
User-Agent: KMail/1.6.2
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003081725.59267.jhb@freebsd.org>
	<201003081752.20087.jkim@FreeBSD.org>
In-Reply-To: <201003081752.20087.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003082035.43977.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 01:35:58 -0000

On Monday 08 March 2010 05:52 pm, Jung-uk Kim wrote:
> On Monday 08 March 2010 05:25 pm, John Baldwin wrote:
> > On Monday 08 March 2010 5:11:42 pm Jung-uk Kim wrote:
> > > On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> > > > On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > > > > Author: jkim
> > > > > Date: Mon Mar  8 19:40:31 2010
> > > > > New Revision: 204877
> > > > > URL: http://svn.freebsd.org/changeset/base/204877
> > > > >
> > > > > Log:
> > > > >   Enable ACPI module build on amd64.  Although we strongly
> > > > > recommend building it into kernel, there is no need to
> > > > > prevent it from building at all.
> > > >
> > > > (Oops, ignore previous spurious reply).
> > > >
> > > > Please revert this.  The MADT parser on amd64 is slightly
> > > > different from i386 and will not work when acpi is loaded as
> > > > a module.  If anything, I would prefer we make acpi not be a
> > > > module on i386. There are several things that would be far
> > > > less invasive to implement via #ifdef DEV_ACPI than by
> > > > defining runtime kobj interfaces to the ACPI driver.
> > >
> > > madt.c itself is not very different but I understand what you
> > > are trying to explain here.  In fact, I tested it before
> > > committing and the trick was adding mptable in place of acpi. 
> > > It worked fine although it may not be ideal.  I can back out
> > > sys/modules/acpi/Makefile change if you agree, however.
> >
> > It is different enough.  Specifically, the amd64 one sets a
> > "better" value for mp_maxid than i386, but it can only do this
> > because it can run before SI_SUB_KLD since it is never invoked as
> > a module.  I still think that we should probably be moving away
> > from acpi.ko rather than towards for other reasons.
>
> I noticed that and I used mptable instead, which seems to do well
> enough for the job.  Please keep in mind that I am not trying to
> promote acpi.ko at all.  I just want to make sure acpi.ko can be
> built and loaded without builing and installing the whole
> world/kernel for i386 to test new ACPICA. :-(
>
> Any way, I will just revert sys/modules/acpi/Makefile change, then.
> It should be a reasonable compromise, deal?

I thought you complained because I accidentally committed my local 
changes to sys/modules/acpi/Makefile.  In fact, I didn't. :-) Do you 
still think I should back it out?  Or is it okay?

Jung-uk Kim

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 02:00:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E6A5106566B;
	Tue,  9 Mar 2010 02:00:54 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 632588FC12;
	Tue,  9 Mar 2010 02:00: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 o2920sTR073259;
	Tue, 9 Mar 2010 02:00:54 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2920soQ073256;
	Tue, 9 Mar 2010 02:00:54 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201003090200.o2920soQ073256@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Tue, 9 Mar 2010 02:00: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: r204903 - in head/sys/powerpc: aim booke
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 02:00:54 -0000

Author: nwhitehorn
Date: Tue Mar  9 02:00:53 2010
New Revision: 204903
URL: http://svn.freebsd.org/changeset/base/204903

Log:
  Place interrupt handling in a critical section and remove double
  counting in incrementing the interrupt nesting level. This fixes a number
  of bugs in which the interrupt thread could be preempted by an IPI,
  indefinitely delaying acknowledgement of the interrupt to the PIC, causing
  interrupt starvation and hangs.
  
  Reported by:	linimon
  Reviewed by:	marcel, jhb
  MFC after:	1 week

Modified:
  head/sys/powerpc/aim/interrupt.c
  head/sys/powerpc/booke/interrupt.c

Modified: head/sys/powerpc/aim/interrupt.c
==============================================================================
--- head/sys/powerpc/aim/interrupt.c	Tue Mar  9 01:11:45 2010	(r204902)
+++ head/sys/powerpc/aim/interrupt.c	Tue Mar  9 02:00:53 2010	(r204903)
@@ -80,15 +80,17 @@ powerpc_interrupt(struct trapframe *fram
 
 	switch (framep->exc) {
 	case EXC_EXI:
-		atomic_add_int(&td->td_intr_nesting_level, 1);
+		critical_enter();
 		PIC_DISPATCH(pic, framep);
-		atomic_subtract_int(&td->td_intr_nesting_level, 1);	
+		critical_exit();
 		break;
 
 	case EXC_DECR:
+		critical_enter();
 		atomic_add_int(&td->td_intr_nesting_level, 1);
 		decr_intr(framep);
 		atomic_subtract_int(&td->td_intr_nesting_level, 1);	
+		critical_exit();
 		break;
 
 	default:

Modified: head/sys/powerpc/booke/interrupt.c
==============================================================================
--- head/sys/powerpc/booke/interrupt.c	Tue Mar  9 01:11:45 2010	(r204902)
+++ head/sys/powerpc/booke/interrupt.c	Tue Mar  9 02:00:53 2010	(r204903)
@@ -118,9 +118,11 @@ powerpc_decr_interrupt(struct trapframe 
 	struct thread *td;
 
 	td = PCPU_GET(curthread);
+	critical_enter();
 	atomic_add_int(&td->td_intr_nesting_level, 1);
 	decr_intr(framep);
 	atomic_subtract_int(&td->td_intr_nesting_level, 1);
+	critical_exit();
 }
 
 /*
@@ -129,10 +131,8 @@ powerpc_decr_interrupt(struct trapframe 
 void
 powerpc_extr_interrupt(struct trapframe *framep)
 {
-	struct thread *td;
 
-	td = PCPU_GET(curthread);
-	atomic_add_int(&td->td_intr_nesting_level, 1);
+	critical_enter();
 	PIC_DISPATCH(pic, framep);
-	atomic_subtract_int(&td->td_intr_nesting_level, 1);
+	critical_exit();
 }

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 02:05:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7288E106566C;
	Tue,  9 Mar 2010 02:05:02 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6212A8FC13;
	Tue,  9 Mar 2010 02:05: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 o292529e074248;
	Tue, 9 Mar 2010 02:05:02 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29252EU074246;
	Tue, 9 Mar 2010 02:05:02 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201003090205.o29252EU074246@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Tue, 9 Mar 2010 02:05: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: r204904 - head/sys/ia64/ia64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 02:05:02 -0000

Author: marcel
Date: Tue Mar  9 02:05:01 2010
New Revision: 204904
URL: http://svn.freebsd.org/changeset/base/204904

Log:
  Remove support for SYS_RES_DRQ.

Modified:
  head/sys/ia64/ia64/nexus.c

Modified: head/sys/ia64/ia64/nexus.c
==============================================================================
--- head/sys/ia64/ia64/nexus.c	Tue Mar  9 02:00:53 2010	(r204903)
+++ head/sys/ia64/ia64/nexus.c	Tue Mar  9 02:05:01 2010	(r204904)
@@ -78,7 +78,7 @@ struct nexus_device {
 
 #define DEVTONX(dev)	((struct nexus_device *)device_get_ivars(dev))
 
-static struct rman irq_rman, drq_rman, port_rman, mem_rman;
+static struct rman irq_rman, port_rman, mem_rman;
 
 static	int nexus_probe(device_t);
 static	int nexus_attach(device_t);
@@ -190,21 +190,6 @@ nexus_probe(device_t dev)
 		panic("nexus_probe irq_rman");
 
 	/*
-	 * ISA DMA on PCI systems is implemented in the ISA part of each
-	 * PCI->ISA bridge and the channels can be duplicated if there are
-	 * multiple bridges.  (eg: laptops with docking stations)
-	 */
-	drq_rman.rm_start = 0;
-	drq_rman.rm_end = 7;
-	drq_rman.rm_type = RMAN_ARRAY;
-	drq_rman.rm_descr = "DMA request lines";
-	/* XXX drq 0 not available on some machines */
-	if (rman_init(&drq_rman)
-	    || rman_manage_region(&drq_rman,
-				  drq_rman.rm_start, drq_rman.rm_end))
-		panic("nexus_probe drq_rman");
-
-	/*
 	 * However, IO ports and Memory truely are global at this level,
 	 * as are APIC interrupts (however many IO APICS there turn out
 	 * to be on large systems..)
@@ -355,10 +340,6 @@ nexus_alloc_resource(device_t bus, devic
 		rm = &irq_rman;
 		break;
 
-	case SYS_RES_DRQ:
-		rm = &drq_rman;
-		break;
-
 	case SYS_RES_IOPORT:
 		rm = &port_rman;
 		break;
@@ -591,4 +572,3 @@ nexus_settime(device_t dev, struct times
 	tm.tm_mday = ct.day;
 	return (efi_set_time(&tm));
 }
-

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 02:08:03 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD9F61065670;
	Tue,  9 Mar 2010 02:08:03 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CD5028FC12;
	Tue,  9 Mar 2010 02:08: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 o29282WX074933;
	Tue, 9 Mar 2010 02:08:02 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29282Jk074931;
	Tue, 9 Mar 2010 02:08:02 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201003090208.o29282Jk074931@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Tue, 9 Mar 2010 02:08: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: r204905 - head/sys/ia64/ia64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 02:08:04 -0000

Author: marcel
Date: Tue Mar  9 02:08:02 2010
New Revision: 204905
URL: http://svn.freebsd.org/changeset/base/204905

Log:
  Remove inclusion of 
  While here move inclusion of  in a better place.

Modified:
  head/sys/ia64/ia64/vm_machdep.c

Modified: head/sys/ia64/ia64/vm_machdep.c
==============================================================================
--- head/sys/ia64/ia64/vm_machdep.c	Tue Mar  9 02:05:01 2010	(r204904)
+++ head/sys/ia64/ia64/vm_machdep.c	Tue Mar  9 02:08:02 2010	(r204905)
@@ -70,6 +70,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -89,14 +90,11 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 
-#include 
-
 void
 cpu_thread_exit(struct thread *td)
 {

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 03:30:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE7DF1065688;
	Tue,  9 Mar 2010 03:30:32 +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 669FD8FC0A;
	Tue,  9 Mar 2010 03:30:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o293UWvR093412;
	Tue, 9 Mar 2010 03:30:32 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o293UVtp093407;
	Tue, 9 Mar 2010 03:30:31 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201003090330.o293UVtp093407@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 9 Mar 2010 03:30:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204907 - in head/sys/amd64: amd64 include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 03:30:32 -0000

Author: alc
Date: Tue Mar  9 03:30:31 2010
New Revision: 204907
URL: http://svn.freebsd.org/changeset/base/204907

Log:
  Implement AMD's recommended workaround for Erratum 383 on Family 10h
  processors.  With this workaround, superpage promotion can be re-enabled
  under virtualization.  Moreover, machine check exceptions can safely be
  enabled when FreeBSD is running natively on Family 10h processors.
  
  Most of the credit should go to Andriy Gapon for diagnosing the error and
  working with Borislav Petkov at AMD to document it.  Andriy also reviewed
  and tested my patches.
  
  Discussed with:	jhb
  MFC after:	3 weeks

Modified:
  head/sys/amd64/amd64/mca.c
  head/sys/amd64/amd64/pmap.c
  head/sys/amd64/include/md_var.h
  head/sys/amd64/include/specialreg.h

Modified: head/sys/amd64/amd64/mca.c
==============================================================================
--- head/sys/amd64/amd64/mca.c	Tue Mar  9 02:28:20 2010	(r204906)
+++ head/sys/amd64/amd64/mca.c	Tue Mar  9 03:30:31 2010	(r204907)
@@ -65,6 +65,15 @@ TUNABLE_INT("hw.mca.enabled", &mca_enabl
 SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0,
     "Administrative toggle for machine check support");
 
+static int amd10h_L1TP = 1;
+TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP);
+SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0,
+    "Administrative toggle for logging of level one TLB parity (L1TP) errors");
+
+int workaround_erratum383;
+SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0,
+    "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?");
+
 static STAILQ_HEAD(, mca_internal) mca_records;
 static struct callout mca_timer;
 static int mca_ticks = 3600;	/* Check hourly by default. */
@@ -481,7 +490,7 @@ void
 mca_init(void)
 {
 	uint64_t mcg_cap;
-	uint64_t ctl;
+	uint64_t ctl, mask;
 	int skip;
 	int i;
 
@@ -489,6 +498,15 @@ mca_init(void)
 	if (!mca_enabled || !(cpu_feature & CPUID_MCE))
 		return;
 
+	/*
+	 * On AMD Family 10h processors, unless logging of level one TLB
+	 * parity (L1TP) errors is disabled, enable the recommended workaround
+	 * for Erratum 383.
+	 */
+	if (cpu_vendor_id == CPU_VENDOR_AMD &&
+	    CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP)
+		workaround_erratum383 = 1;
+
 	if (cpu_feature & CPUID_MCA) {
 		if (PCPU_GET(cpuid) == 0)
 			mca_setup();
@@ -499,6 +517,22 @@ mca_init(void)
 			/* Enable MCA features. */
 			wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE);
 
+		/*
+		 * Disable logging of level one TLB parity (L1TP) errors by
+		 * the data and instruction caches as an alternative
+		 * workaround for AMD Family 10h Erratum 383.  Unlike the
+		 * recommended workaround, there is no performance penalty to
+		 * this workaround.  However, L1TP errors will go unreported.
+		 */
+		if (cpu_vendor_id == CPU_VENDOR_AMD &&
+		    CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) {
+			mask = rdmsr(MSR_MC0_CTL_MASK);
+			if ((mask & (1UL << 5)) == 0)
+				wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5));
+			mask = rdmsr(MSR_MC1_CTL_MASK);
+			if ((mask & (1UL << 5)) == 0)
+				wrmsr(MSR_MC1_CTL_MASK, mask | (1UL << 5));
+		}
 		for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) {
 			/* By default enable logging of all errors. */
 			ctl = 0xffffffffffffffffUL;

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Tue Mar  9 02:28:20 2010	(r204906)
+++ head/sys/amd64/amd64/pmap.c	Tue Mar  9 03:30:31 2010	(r204907)
@@ -7,7 +7,7 @@
  * All rights reserved.
  * Copyright (c) 2003 Peter Wemm
  * All rights reserved.
- * Copyright (c) 2005-2008 Alan L. Cox 
+ * Copyright (c) 2005-2010 Alan L. Cox 
  * All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
@@ -255,6 +255,9 @@ static void pmap_remove_entry(struct pma
 static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m);
 static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va,
     vm_page_t m);
+static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde,
+    pd_entry_t newpde);
+static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde);
 
 static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags);
 static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags);
@@ -686,13 +689,13 @@ pmap_init(void)
 	pv_entry_high_water = 9 * (pv_entry_max / 10);
 
 	/*
-	 * Disable large page mappings by default if the kernel is running in
-	 * a virtual machine on an AMD Family 10h processor.  This is a work-
-	 * around for Erratum 383.
+	 * If the kernel is running in a virtual machine on an AMD Family 10h
+	 * processor, then it must assume that MCA is enabled by the virtual
+	 * machine monitor.
 	 */
 	if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD &&
 	    CPUID_TO_FAMILY(cpu_id) == 0x10)
-		pg_ps_enabled = 0;
+		workaround_erratum383 = 1;
 
 	/*
 	 * Are large page mappings enabled?
@@ -848,6 +851,42 @@ pmap_cache_bits(int mode, boolean_t is_p
 		cache_bits |= PG_NC_PWT;
 	return (cache_bits);
 }
+
+/*
+ * After changing the page size for the specified virtual address in the page
+ * table, flush the corresponding entries from the processor's TLB.  Only the
+ * calling processor's TLB is affected.
+ *
+ * The calling thread must be pinned to a processor.
+ */
+static void
+pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde)
+{
+	u_long cr4;
+
+	if ((newpde & PG_PS) == 0)
+		/* Demotion: flush a specific 2MB page mapping. */
+		invlpg(va);
+	else if ((newpde & PG_G) == 0)
+		/*
+		 * Promotion: flush every 4KB page mapping from the TLB
+		 * because there are too many to flush individually.
+		 */
+		invltlb();
+	else {
+		/*
+		 * Promotion: flush every 4KB page mapping from the TLB,
+		 * including any global (PG_G) mappings.
+		 */
+		cr4 = rcr4();
+		load_cr4(cr4 & ~CR4_PGE);
+		/*
+		 * Although preemption at this point could be detrimental to
+		 * performance, it would not lead to an error.
+		 */
+		load_cr4(cr4);
+	}
+}
 #ifdef SMP
 /*
  * For SMP, these functions have to use the IPI mechanism for coherence.
@@ -944,6 +983,69 @@ pmap_invalidate_cache(void)
 	smp_cache_flush();
 	sched_unpin();
 }
+
+struct pde_action {
+	cpumask_t store;	/* processor that updates the PDE */
+	cpumask_t invalidate;	/* processors that invalidate their TLB */
+	vm_offset_t va;
+	pd_entry_t *pde;
+	pd_entry_t newpde;
+};
+
+static void
+pmap_update_pde_action(void *arg)
+{
+	struct pde_action *act = arg;
+
+	if (act->store == PCPU_GET(cpumask))
+		pde_store(act->pde, act->newpde);
+}
+
+static void
+pmap_update_pde_teardown(void *arg)
+{
+	struct pde_action *act = arg;
+
+	if ((act->invalidate & PCPU_GET(cpumask)) != 0)
+		pmap_update_pde_invalidate(act->va, act->newpde);
+}
+
+/*
+ * Change the page size for the specified virtual address in a way that
+ * prevents any possibility of the TLB ever having two entries that map the
+ * same virtual address using different page sizes.  This is the recommended
+ * workaround for Erratum 383 on AMD Family 10h processors.  It prevents a
+ * machine check exception for a TLB state that is improperly diagnosed as a
+ * hardware error.
+ */
+static void
+pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde)
+{
+	struct pde_action act;
+	cpumask_t active, cpumask;
+
+	sched_pin();
+	cpumask = PCPU_GET(cpumask);
+	if (pmap == kernel_pmap)
+		active = all_cpus;
+	else
+		active = pmap->pm_active;
+	if ((active & PCPU_GET(other_cpus)) != 0) {
+		act.store = cpumask;
+		act.invalidate = active;
+		act.va = va;
+		act.pde = pde;
+		act.newpde = newpde;
+		smp_rendezvous_cpus(cpumask | active,
+		    smp_no_rendevous_barrier, pmap_update_pde_action,
+		    pmap_update_pde_teardown, &act);
+	} else {
+		pde_store(pde, newpde);
+		if ((active & cpumask) != 0)
+			pmap_update_pde_invalidate(va, newpde);
+	}
+	sched_unpin();
+}
 #else /* !SMP */
 /*
  * Normal, non-SMP, invalidation functions.
@@ -981,6 +1083,15 @@ pmap_invalidate_cache(void)
 
 	wbinvd();
 }
+
+static void
+pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde)
+{
+
+	pde_store(pde, newpde);
+	if (pmap == kernel_pmap || pmap->pm_active)
+		pmap_update_pde_invalidate(va, newpde);
+}
 #endif /* !SMP */
 
 static void
@@ -2361,7 +2472,10 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t 
 	 * processor changing the setting of PG_A and/or PG_M between
 	 * the read above and the store below. 
 	 */
-	pde_store(pde, newpde);	
+	if (workaround_erratum383)
+		pmap_update_pde(pmap, va, pde, newpde);
+	else
+		pde_store(pde, newpde);
 
 	/*
 	 * Invalidate a stale recursive mapping of the page table page.
@@ -2977,7 +3091,10 @@ setpte:
 	/*
 	 * Map the superpage.
 	 */
-	pde_store(pde, PG_PS | newpde);
+	if (workaround_erratum383)
+		pmap_update_pde(pmap, va, pde, PG_PS | newpde);
+	else
+		pde_store(pde, PG_PS | newpde);
 
 	pmap_pde_promotions++;
 	CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx"

Modified: head/sys/amd64/include/md_var.h
==============================================================================
--- head/sys/amd64/include/md_var.h	Tue Mar  9 02:28:20 2010	(r204906)
+++ head/sys/amd64/include/md_var.h	Tue Mar  9 03:30:31 2010	(r204907)
@@ -61,6 +61,7 @@ extern	char	sigcode[];
 extern	int	szsigcode;
 extern	uint64_t *vm_page_dump;
 extern	int	vm_page_dump_size;
+extern	int	workaround_erratum383;
 extern	int	_udatasel;
 extern	int	_ucodesel;
 extern	int	_ucode32sel;

Modified: head/sys/amd64/include/specialreg.h
==============================================================================
--- head/sys/amd64/include/specialreg.h	Tue Mar  9 02:28:20 2010	(r204906)
+++ head/sys/amd64/include/specialreg.h	Tue Mar  9 03:30:31 2010	(r204907)
@@ -494,6 +494,8 @@
 #define	MSR_TOP_MEM	0xc001001a	/* boundary for ram below 4G */
 #define	MSR_TOP_MEM2	0xc001001d	/* boundary for ram above 4G */
 #define	MSR_K8_UCODE_UPDATE	0xc0010020	/* update microcode */
+#define	MSR_MC0_CTL_MASK	0xc0010044
+#define	MSR_MC1_CTL_MASK	0xc0010045
 
 /* VIA ACE crypto featureset: for via_feature_rng */
 #define	VIA_HAS_RNG		1	/* cpu has RNG */

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 06:33:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D865A106566C;
	Tue,  9 Mar 2010 06:33:11 +0000 (UTC)
	(envelope-from delphij@gmail.com)
Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com
	[74.125.83.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 8EDA58FC16;
	Tue,  9 Mar 2010 06:33:11 +0000 (UTC)
Received: by pvg3 with SMTP id 3so2317833pvg.13
	for ; Mon, 08 Mar 2010 22:33:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=6aTiCRD9cs7jiYp9lMVqaMgovPo+qy6+3MN96pSAqUk=;
	b=o3sd5/zdH0pmY6yKqw3GaA21CbHNxFsM48R7oMcDDwUmL3IFZmKg9+1STEFkAZupPE
	h+T09sXP6BGM3IvLZjuomBSKrjiOLh+mvk0ta2QFv6WPKUD9uaQxuOQKr4/uH1uzGrVq
	UtuULxdn/KT5Y6hIR5JROMiPpuMrUykofyuvI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=OeguFvg/SOtrnRexUfIox0VQgvABcOx3BxH1FLbPRgqIeFkie6hL5x/5IPOM49as/k
	hRVCwUr+vkGEWA+1j8R9tYvToJBOnR1fvmGDiB7QwvRiUzegucbZvp8lbB+vf0vDwSFA
	CYFJervIKm5UMb0JJMNTQuJKYLU/fBewVhsro=
MIME-Version: 1.0
Received: by 10.114.253.33 with SMTP id a33mr4167810wai.167.1268116390976; 
	Mon, 08 Mar 2010 22:33:10 -0800 (PST)
In-Reply-To: <9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com>
References: <201003081501.o28F18Lg025359@svn.freebsd.org>
	<9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com>
Date: Mon, 8 Mar 2010 22:33:10 -0800
Message-ID: 
From: Xin LI 
To: Ivan Voras 
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, Nathan Whitehorn 
Subject: Re: svn commit: r204870 - head/sys/modules
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 06:33:11 -0000

On Mon, Mar 8, 2010 at 10:14 AM, Ivan Voras  wrote:
> On 8 March 2010 16:01, Nathan Whitehorn  wrote:
>> Author: nwhitehorn
>> Date: Mon Mar =C2=A08 15:01:08 2010
>> New Revision: 204870
>> URL: http://svn.freebsd.org/changeset/base/204870
>>
>> Log:
>> =C2=A0Enable tmpfs unconditionally on all platforms. No one I spoke to c=
ould
>> =C2=A0remember why it was x86 only, and it works just as well on at leas=
t powerpc
>> =C2=A0as on x86.
>
> And it still has the Big Ugly "run away! run away!" banner displayed on l=
oad :(
>
> It's riddled by "XXX" comments, but so far it's been more stable for
> me than e.g. ZFS...

There are unfixed bugs.

Cheers,
--=20
Xin LI  http://www.delphij.net

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 06:33:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 016C1106566B;
	Tue,  9 Mar 2010 06:33:53 +0000 (UTC)
	(envelope-from delphij@gmail.com)
Received: from mail-pz0-f199.google.com (mail-pz0-f199.google.com
	[209.85.222.199])
	by mx1.freebsd.org (Postfix) with ESMTP id B7BDB8FC1A;
	Tue,  9 Mar 2010 06:33:52 +0000 (UTC)
Received: by pzk37 with SMTP id 37so4323159pzk.7
	for ; Mon, 08 Mar 2010 22:33:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=vq3KhV6G6qqvKBxgtkavcNd2VIEh7YTLNnxvWLc681s=;
	b=wH9nz9Btv5irGPsXiAsllSsgI4PfEMeh7+4Q/vkr055A/h7kBHgKEUQq4xb4xYDvML
	oL3pf4oMwN9PaGa0YKczJI7xObcqmppkEaoV+TC76SnnJ4gB5KQcrAOiyyrWPiT3mHJo
	ZgcQWk73itfvMbUnXHKlTZ+wu/ynDbUQEHZUs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=WRbpGJ1uctKj554PZPq8ttpqzsOocVaw4OD/jKbbI9oLSHV+w3jSa/l3vVUGuOnaXn
	nTlCfyqouoseimNfWfvoCNQW4+s7nK+ZIq/beRw1Xkjkr+IQrOIyWrxufSrLEI1bVNid
	YzilCjGcsXagD1hHLlxjBYTZQyK6hla5V9UjM=
MIME-Version: 1.0
Received: by 10.114.86.9 with SMTP id j9mr4226340wab.110.1268116432102; Mon, 
	08 Mar 2010 22:33:52 -0800 (PST)
In-Reply-To: <201003081501.o28F18Lg025359@svn.freebsd.org>
References: <201003081501.o28F18Lg025359@svn.freebsd.org>
Date: Mon, 8 Mar 2010 22:33:51 -0800
Message-ID: 
From: Xin LI 
To: Nathan Whitehorn 
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: r204870 - head/sys/modules
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 06:33:53 -0000

On Mon, Mar 8, 2010 at 7:01 AM, Nathan Whitehorn  w=
rote:
> Author: nwhitehorn
> Date: Mon Mar =C2=A08 15:01:08 2010
> New Revision: 204870
> URL: http://svn.freebsd.org/changeset/base/204870
>
> Log:
> =C2=A0Enable tmpfs unconditionally on all platforms. No one I spoke to co=
uld
> =C2=A0remember why it was x86 only, and it works just as well on at least=
 powerpc
> =C2=A0as on x86.

Thanks.  The only reason is that it was not tested on the other
platforms, it's nice that it worked on PowerPC.

Cheers,
--=20
Xin LI  http://www.delphij.net

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 06:43:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B9669106564A;
	Tue,  9 Mar 2010 06:43:35 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E2EC8FC17;
	Tue,  9 Mar 2010 06:43: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 o296hZUo036059;
	Tue, 9 Mar 2010 06:43:35 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o296hZmR036058;
	Tue, 9 Mar 2010 06:43:35 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201003090643.o296hZmR036058@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 9 Mar 2010 06:43: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: r204908 - head/usr.bin/ncal
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 06:43:35 -0000

Author: edwin
Date: Tue Mar  9 06:43:35 2010
New Revision: 204908
URL: http://svn.freebsd.org/changeset/base/204908

Log:
  - Fix the highlighting for non-terminals when the last week is not
    7 days long.
  - "-m  " now prints only the month, not the whole year.

Modified:
  head/usr.bin/ncal/ncal.1
  head/usr.bin/ncal/ncal.c

Modified: head/usr.bin/ncal/ncal.1
==============================================================================
--- head/usr.bin/ncal/ncal.1	Tue Mar  9 03:30:31 2010	(r204907)
+++ head/usr.bin/ncal/ncal.1	Tue Mar  9 06:43:35 2010	(r204908)
@@ -169,3 +169,6 @@ command and manual were written by
 .Sh BUGS
 The assignment of Julian\(enGregorian switching dates to country
 codes is historically naive for many countries.
+.Pp
+Not all options are compatible and using them in different orders
+will give varying results.

Modified: head/usr.bin/ncal/ncal.c
==============================================================================
--- head/usr.bin/ncal/ncal.c	Tue Mar  9 03:30:31 2010	(r204907)
+++ head/usr.bin/ncal/ncal.c	Tue Mar  9 06:43:35 2010	(r204908)
@@ -60,7 +60,7 @@ struct monthlines {
 	wchar_t name[MAX_WIDTH + 1];
 	char lines[7][MAX_WIDTH + 1];
 	char weeks[MAX_WIDTH + 1];
-	unsigned int linelen[7];
+	unsigned int extralen[7];
 };
 
 struct weekdays {
@@ -290,6 +290,8 @@ main(int argc, char *argv[])
 			break;
 		case 'm':
 			flag_month = optarg;
+			before = 0;
+			after = 0;
 			break;
 		case 'o':
 			if (flag_backward)
@@ -336,14 +338,19 @@ main(int argc, char *argv[])
 		if (flag_easter)
 			usage();
 		flag_month = *argv++;
+		before = 0;
+		after = 0;
+		m = strtol(flag_month, NULL, 10);
 		/* FALLTHROUGH */
 	case 1:
 		y = atoi(*argv++);
 		if (y < 1 || y > 9999)
 			errx(EX_USAGE, "year %d not in range 1..9999", y);
-		before = 0;
-		after = 11;
-		m = 1;
+		if (before == -1 && after == -1) {
+			before = 0;
+			after = 11;
+			m = 1;
+		}
 		break;
 	case 0:
 		{
@@ -470,8 +477,7 @@ printeaster(int y, int julian, int ortho
 	printf("%s\n", buf);
 }
 
-#define MW(mw, ms, ml) \
-	strlen(ms) > (ml) ? (mw) + 9 : (mw)
+#define MW(mw, me)		((mw) + me)
 #define	DECREASEMONTH(m, y) 		\
 		if (--m == 0) {		\
 			m = 12;		\
@@ -564,7 +570,9 @@ monthrangeb(int y, int jd_flag, int m, i
 
 		for (i = 0; i != 6; i++) {
 			for (j = 0; j < count; j++)
-				printf("%-*s  ", mw, year[j].lines[i]+1);
+				printf("%-*s  ",
+				    MW(mw, year[j].extralen[i]),
+					year[j].lines[i]+1);
 			printf("\n");
 		}
 
@@ -641,8 +649,8 @@ monthranger(int y, int jd_flag, int m, i
 			/* Full months */
 			for (j = 0; j < count; j++)
 				printf("%-*s",
-				    MW(mw, year[j].lines[i],
-					year[j].linelen[i]), year[j].lines[i]);
+				    MW(mw, year[j].extralen[i]),
+					year[j].lines[i]);
 			printf("\n");
 		}
 
@@ -733,7 +741,7 @@ mkmonthr(int y, int m, int jd_flag, stru
 				memcpy(mlines->lines[i] + k + l, "    ", dw);
 		}
 		mlines->lines[i][k + l] = '\0';
-		mlines->linelen[i] = k;
+		mlines->extralen[i] = l;
 	}
 
 	/* fill the weeknumbers */
@@ -840,6 +848,7 @@ mkmonthb(int y, int m, int jd_flag, stru
 			mlines->lines[i][1] = '\0';
 		else
 			mlines->lines[i][k + l] = '\0';
+		mlines->extralen[i] = l;
 	}
 }
 

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 09:18:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B9DC1065675;
	Tue,  9 Mar 2010 09:18:17 +0000 (UTC) (envelope-from bra@fsn.hu)
Received: from people.fsn.hu (people.fsn.hu [195.228.252.137])
	by mx1.freebsd.org (Postfix) with ESMTP id 435288FC20;
	Tue,  9 Mar 2010 09:18:14 +0000 (UTC)
Received: by people.fsn.hu (Postfix, from userid 1001)
	id 894D422B227; Tue,  9 Mar 2010 10:18:13 +0100 (CET)
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR:
	15.6442]
X-CRM114-CacheID: sfid-20100309_10181_385F836F 
X-CRM114-Status: Good  ( pR: 15.6442 )
Message-ID: <4B961253.5090401@fsn.hu>
Date: Tue, 09 Mar 2010 10:18:11 +0100
From: Attila Nagy 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0
MIME-Version: 1.0
To: Xin LI 
References: <201003081501.o28F18Lg025359@svn.freebsd.org>	<9bbcef731003081014n263e52f6t96e45bf8e01f2ee5@mail.gmail.com>
	
In-Reply-To: 
X-Stationery: 0.4.10
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3
	(people.fsn.hu); Tue, 09 Mar 2010 10:18:12 +0100 (CET)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Ivan Voras ,
	Nathan Whitehorn 
Subject: Re: svn commit: r204870 - head/sys/modules
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 09:18:17 -0000

Xin LI wrote:
> On Mon, Mar 8, 2010 at 10:14 AM, Ivan Voras  wrote:
>   
>> On 8 March 2010 16:01, Nathan Whitehorn  wrote:
>>     
>>> Author: nwhitehorn
>>> Date: Mon Mar  8 15:01:08 2010
>>> New Revision: 204870
>>> URL: http://svn.freebsd.org/changeset/base/204870
>>>
>>> Log:
>>>  Enable tmpfs unconditionally on all platforms. No one I spoke to could
>>>  remember why it was x86 only, and it works just as well on at least powerpc
>>>  as on x86.
>>>       
>> And it still has the Big Ugly "run away! run away!" banner displayed on load :(
>>
>> It's riddled by "XXX" comments, but so far it's been more stable for
>> me than e.g. ZFS...
>>     
>
> There are unfixed bugs.
>
>   
Speaking on that...
tmpfs                                     0B      0B      0B   100%    /tmp

I have:
Mem: 946M Active, 11G Inact, 17G Wired, 21M Cache, 3285M Buf, 1978M Free
Swap:


From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 10:31:03 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C89F106564A;
	Tue,  9 Mar 2010 10:31:03 +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 61A9E8FC1D;
	Tue,  9 Mar 2010 10:31:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o29AV382088203;
	Tue, 9 Mar 2010 10:31:03 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29AV3JO088200;
	Tue, 9 Mar 2010 10:31:03 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003091031.o29AV3JO088200@svn.freebsd.org>
From: Maxim Sobolev 
Date: Tue, 9 Mar 2010 10:31:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204909 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 10:31:03 -0000

Author: sobomax
Date: Tue Mar  9 10:31:03 2010
New Revision: 204909
URL: http://svn.freebsd.org/changeset/base/204909

Log:
  Change secrorsize back to int, since that's the data type expected by the
  ioctl(DIOCGSECTORSIZE). It creates issues on some architectures.
  
  MFC after:	1 week
  Reported by:	Jayachandran C.

Modified:
  head/sbin/newfs/newfs.c
  head/sbin/newfs/newfs.h

Modified: head/sbin/newfs/newfs.c
==============================================================================
--- head/sbin/newfs/newfs.c	Tue Mar  9 06:43:35 2010	(r204908)
+++ head/sbin/newfs/newfs.c	Tue Mar  9 10:31:03 2010	(r204909)
@@ -92,7 +92,7 @@ int	Jflag;			/* enable gjournal for file
 int	lflag;			/* enable multilabel for file system */
 int	nflag;			/* do not create .snap directory */
 intmax_t fssize;		/* file system size */
-int64_t	sectorsize;		/* bytes/sector */
+int	sectorsize;		/* bytes/sector */
 int	realsectorsize;		/* bytes/sector in hardware */
 int64_t	fsize = 0;		/* fragment size */
 int64_t	bsize = 0;		/* block size */
@@ -119,6 +119,7 @@ static void getfssize(intmax_t *, const 
 static struct disklabel *getdisklabel(char *s);
 static void rewritelabel(char *s, struct disklabel *lp);
 static void usage(void);
+static int expand_number_int(const char *buf, int *num);
 
 ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files */
 
@@ -171,7 +172,7 @@ main(int argc, char *argv[])
 			Rflag = 1;
 			break;
 		case 'S':
-			rval = expand_number(optarg, §orsize);
+			rval = expand_number_int(optarg, §orsize);
 			if (rval < 0 || sectorsize <= 0)
 				errx(1, "%s: bad sector size", optarg);
 			break;
@@ -496,3 +497,20 @@ usage()
 	fprintf(stderr, "\t-s file system size (sectors)\n");
 	exit(1);
 }
+
+static int
+expand_number_int(const char *buf, int *num)
+{
+	int64_t num64;
+	int rval;
+
+	rval = expand_number(buf, &num64);
+	if (rval != 0)
+		return (rval);
+	if (num64 > INT_MAX) {
+		errno = ERANGE;
+		return (-1);
+	}
+	*num = (int)num64;
+	return (0);
+}

Modified: head/sbin/newfs/newfs.h
==============================================================================
--- head/sbin/newfs/newfs.h	Tue Mar  9 06:43:35 2010	(r204908)
+++ head/sbin/newfs/newfs.h	Tue Mar  9 10:31:03 2010	(r204909)
@@ -86,7 +86,7 @@ extern int	Jflag;		/* enable gjournal fo
 extern int	lflag;		/* enable multilabel MAC for file system */
 extern int	nflag;		/* do not create .snap directory */
 extern intmax_t	fssize;		/* file system size */
-extern int64_t	sectorsize;	/* bytes/sector */
+extern int	sectorsize;	/* bytes/sector */
 extern int	realsectorsize;	/* bytes/sector in hardware*/
 extern int64_t	fsize;		/* fragment size */
 extern int64_t	bsize;		/* block size */

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 11:01:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E6F3E1065672;
	Tue,  9 Mar 2010 11:01:40 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from k7.mavetju.org (ppp113-58.static.internode.on.net
	[150.101.113.58])
	by mx1.freebsd.org (Postfix) with ESMTP id 8ACE68FC20;
	Tue,  9 Mar 2010 11:01:40 +0000 (UTC)
Received: by k7.mavetju.org (Postfix, from userid 1001)
	id 869AC451C3; Tue,  9 Mar 2010 22:00:17 +1100 (EST)
Date: Tue, 9 Mar 2010 22:00:17 +1100
From: Edwin Groothuis 
To: Alexander Best 
Message-ID: <20100309110017.GG1761@mavetju.org>
References: <20100307233409.GF2682@mavetju.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
Subject: Re: svn commit: r204849 - head/usr.bin/ncal
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 11:01:41 -0000

On Mon, Mar 08, 2010 at 01:39:28AM +0100, Alexander Best wrote:
> Edwin Groothuis schrieb am 2010-03-08:
> > On Mon, Mar 08, 2010 at 12:16:04AM +0100, Alexander Best wrote:
> > > could you have another look at the -J option? it seems highlighting
> > > still
> 
> > Aha, only -J in "month only" view is still not working. Will take
> > care of it later. Also add a bunch of regression tests to it, because
> > of all of this.
> 
> > > isn't enabled in combination with it. also i'm wondering what the
> > > purpose of
> > > the -b switch is. running `cal` and `ncal -b` seems to be doing the
> > > very same
> > > thing (setting flag_backward = 1).
> 
> > You can't run "cal" until you have installed it, while being able
> > to run "ncal -b" and coming into "cal" mode is kind of nice.
> 
> thanks for the hint. the -b switch definitely comes in handy when `cal` isn't
> available, because one is running ncal from /usr/src/usr.bin.
> 
> will the -b switch disappear once you ncal/cal works properly with
> highlighting?

It will be hard to write proper regression tests if you can't
properly specify what you want :-)

> what confused me a little is the output of something like `ncal 10 2011`.
> judging from ncal(1) i guessed the output to be October of 2011, yet the
> output is all months from October 2011 to September 2012.

Yeah, fixed.

> i tried `ncal -m 10 2011` instead and the output was just the same. so what's
> the right way to see the entry for lets say October 2011?
> 
> another issue i'm having is the -m switch in combination with f and p. judging
> from ncal(1) `ncal -m 3p` should output February 2010 and `ncal -m 3f` April
> 2010. however instead of printing the previous and next month the previous and
> next year gets printed.

If I understand correctly:

-m 1  gives this years January (which is 2010)
-m 1p gives the previous January (which is 2010)
-m 1f gives the next January (which is 2011)

-m 9  gives this years September (which is 2010)
-m 9p gives the previous September (which is 2009)
-m 9f gives the next September (which is 2010)

And now the tricky one:

-m 3  gives this years March (which is 2010)
-m 3p gives the previous March (which is 2009)
-m 3f gives the next March (which is 2011)

Edwin

-- 
Edwin Groothuis		Website: http://www.mavetju.org/
edwin@mavetju.org	Weblog:  http://www.mavetju.org/weblog/

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 11:28:58 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 917A9106564A;
	Tue,  9 Mar 2010 11:28:58 +0000 (UTC)
	(envelope-from phk@critter.freebsd.dk)
Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222])
	by mx1.freebsd.org (Postfix) with ESMTP id 49DAC8FC23;
	Tue,  9 Mar 2010 11:28:57 +0000 (UTC)
Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3])
	by phk.freebsd.dk (Postfix) with ESMTP id 6538C646B;
	Tue,  9 Mar 2010 11:28:56 +0000 (UTC)
Received: from critter.freebsd.dk (localhost [127.0.0.1])
	by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id o29BSurp058992;
	Tue, 9 Mar 2010 11:28:56 GMT (envelope-from phk@critter.freebsd.dk)
To: Maxim Sobolev 
From: "Poul-Henning Kamp" 
In-Reply-To: Your message of "Tue, 09 Mar 2010 10:31:03 GMT."
	<201003091031.o29AV3JO088200@svn.freebsd.org> 
Date: Tue, 09 Mar 2010 11:28:56 +0000
Message-ID: <58991.1268134136@critter.freebsd.dk>
Sender: phk@critter.freebsd.dk
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204909 - head/sbin/newfs 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 11:28:58 -0000

In message <201003091031.o29AV3JO088200@svn.freebsd.org>, Maxim Sobolev writes:

>Log:
>  Change secrorsize back to int, since that's the data type expected by the
>  ioctl(DIOCGSECTORSIZE). It creates issues on some architectures.

Uhm, no, DIOCGSECTORSIZE requires an u_int:

	$ grep DIOCGSECTORSIZE /sys/sys/disk.h
	#define DIOCGSECTORSIZE _IOR('d', 128, u_int)



-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 12:10:00 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52930106564A;
	Tue,  9 Mar 2010 12:10:00 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id F25518FC0C;
	Tue,  9 Mar 2010 12:09:59 +0000 (UTC)
Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net
	[70.71.175.212]) (authenticated bits=0)
	by sippysoft.com (8.14.3/8.14.3) with ESMTP id o29C9uZx008204
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 9 Mar 2010 04:09:58 -0800 (PST)
	(envelope-from sobomax@FreeBSD.org)
Message-ID: <4B963A97.4040308@FreeBSD.org>
Date: Tue, 09 Mar 2010 04:09:59 -0800
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Poul-Henning Kamp 
References: <58991.1268134136@critter.freebsd.dk>
In-Reply-To: <58991.1268134136@critter.freebsd.dk>
Content-Type: text/plain; charset=KOI8-U; 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: r204909 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 12:10:00 -0000

Poul-Henning Kamp wrote:
> In message <201003091031.o29AV3JO088200@svn.freebsd.org>, Maxim Sobolev writes:
> 
>> Log:
>>  Change secrorsize back to int, since that's the data type expected by the
>>  ioctl(DIOCGSECTORSIZE). It creates issues on some architectures.
> 
> Uhm, no, DIOCGSECTORSIZE requires an u_int:
> 
> 	$ grep DIOCGSECTORSIZE /sys/sys/disk.h
> 	#define DIOCGSECTORSIZE _IOR('d', 128, u_int)

Heh, so it was a bug in the original code prior to my initial change. 
However, I guess it's not a big issue anyway since media with sector 
size larger that 2GiB hardly makes any sense today. Maybe in 100 years 
from now this will be regular sector size, but by then we will probably 
have 1024-bit wide ints anyway. :)

-Maxim


From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 13:18:17 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A97041065785;
	Tue,  9 Mar 2010 13:18:17 +0000 (UTC) (envelope-from das@FreeBSD.ORG)
Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101])
	by mx1.freebsd.org (Postfix) with ESMTP id 27F0F8FC23;
	Tue,  9 Mar 2010 13:18:17 +0000 (UTC)
Received: from zim.MIT.EDU (localhost [127.0.0.1])
	by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o29DIGrS016368;
	Tue, 9 Mar 2010 08:18:16 -0500 (EST) (envelope-from das@FreeBSD.ORG)
Received: (from das@localhost)
	by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o29DIGYu016367;
	Tue, 9 Mar 2010 08:18:16 -0500 (EST) (envelope-from das@FreeBSD.ORG)
Date: Tue, 9 Mar 2010 08:18:15 -0500
From: David Schultz 
To: Andrey Chernov , Bruce Evans ,
	Jaakko Heinonen , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
Message-ID: <20100309131815.GA16286@zim.MIT.EDU>
Mail-Followup-To: Andrey Chernov ,
	Bruce Evans ,
	Jaakko Heinonen , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
References: <201003061921.o26JLv36014114@svn.freebsd.org>
	<20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi>
	<20100308015926.O11669@delplex.bde.org>
	<20100307183139.GA50243@nagual.pp.ru>
	<20100307201027.GA51623@nagual.pp.ru>
	<20100308195123.GA10624@zim.MIT.EDU>
	<20100308202919.GA67990@nagual.pp.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100308202919.GA67990@nagual.pp.ru>
Cc: 
Subject: Re: svn commit: r204803 - head/usr.bin/uniq
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 13:18:17 -0000

On Mon, Mar 08, 2010, Andrey Chernov wrote:
> > I've had a wide character version of getline() ready to
> > commit for some time (I just need to find the time to do it), so
> > you won't need to call mbstowcs() as a separate step.
> 
> It does not help, since wide version will fail on EILSEQ with sync lost,
> as getwc() does. Initially I was thinking about ftell+fseek back, but not 
> all files are seekable.

Yeah, and unfortunately the draft spec for getwline() has several
bugs, one of which is that it doesn't specify how EILSEQ in the
middle of a line is handled.

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 13:53:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B950A1065679;
	Tue,  9 Mar 2010 13:53:12 +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 7265F8FC08;
	Tue,  9 Mar 2010 13:53:12 +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 0A14B46B8F;
	Tue,  9 Mar 2010 08:53:12 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 15EA28A026;
	Tue,  9 Mar 2010 08:53:11 -0500 (EST)
From: John Baldwin 
To: "Jung-uk Kim" 
Date: Tue, 9 Mar 2010 07:53:31 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003081752.20087.jkim@FreeBSD.org>
	<201003082035.43977.jkim@FreeBSD.org>
In-Reply-To: <201003082035.43977.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003090753.31627.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 09 Mar 2010 08:53:11 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 13:53:12 -0000

On Monday 08 March 2010 8:35:42 pm Jung-uk Kim wrote:
> On Monday 08 March 2010 05:52 pm, Jung-uk Kim wrote:
> > On Monday 08 March 2010 05:25 pm, John Baldwin wrote:
> > > On Monday 08 March 2010 5:11:42 pm Jung-uk Kim wrote:
> > > > On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> > > > > On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > > > > > Author: jkim
> > > > > > Date: Mon Mar  8 19:40:31 2010
> > > > > > New Revision: 204877
> > > > > > URL: http://svn.freebsd.org/changeset/base/204877
> > > > > >
> > > > > > Log:
> > > > > >   Enable ACPI module build on amd64.  Although we strongly
> > > > > > recommend building it into kernel, there is no need to
> > > > > > prevent it from building at all.
> > > > >
> > > > > (Oops, ignore previous spurious reply).
> > > > >
> > > > > Please revert this.  The MADT parser on amd64 is slightly
> > > > > different from i386 and will not work when acpi is loaded as
> > > > > a module.  If anything, I would prefer we make acpi not be a
> > > > > module on i386. There are several things that would be far
> > > > > less invasive to implement via #ifdef DEV_ACPI than by
> > > > > defining runtime kobj interfaces to the ACPI driver.
> > > >
> > > > madt.c itself is not very different but I understand what you
> > > > are trying to explain here.  In fact, I tested it before
> > > > committing and the trick was adding mptable in place of acpi. 
> > > > It worked fine although it may not be ideal.  I can back out
> > > > sys/modules/acpi/Makefile change if you agree, however.
> > >
> > > It is different enough.  Specifically, the amd64 one sets a
> > > "better" value for mp_maxid than i386, but it can only do this
> > > because it can run before SI_SUB_KLD since it is never invoked as
> > > a module.  I still think that we should probably be moving away
> > > from acpi.ko rather than towards for other reasons.
> >
> > I noticed that and I used mptable instead, which seems to do well
> > enough for the job.  Please keep in mind that I am not trying to
> > promote acpi.ko at all.  I just want to make sure acpi.ko can be
> > built and loaded without builing and installing the whole
> > world/kernel for i386 to test new ACPICA. :-(
> >
> > Any way, I will just revert sys/modules/acpi/Makefile change, then.
> > It should be a reasonable compromise, deal?
> 
> I thought you complained because I accidentally committed my local 
> changes to sys/modules/acpi/Makefile.  In fact, I didn't. :-) Do you 
> still think I should back it out?  Or is it okay?

I think it should be backed out.  The MP table is not really a good workaround 
as you cannot mix and match ACPI and MP table for PCI interrupt routing.  Or 
rather, if you use the MP Table, we have to use it for all PCI stuff and 
cannot use ACPI for any PCI-related stuff, so it's not really ideal.  I don't 
think the system quite does the right thing though.  I suspect it is still 
using ACPI to manage PCI and you are just getting lucky that ACPI numbers the 
IO APIC IRQs the same way FreeBSD's MP Table driver happens to do.

Also, the MP Table is not always kept up to date in modern BIOSes.  Since most 
modern OS's only use the ACPI tables, BIOS writers do not test the MP Table, 
and I know of one instance a few years ago where Intel shipped a completely 
wrong MP Table for a new platform because nothing they tested used it.

If all you want is the ability to build an acpi.ko but not to actually use it, 
then maybe you could only enable building the module if a special variable is 
set?  That is, you could do 'make BUILD_KLD=yes' in sys/modules/acpi/acpi to 
build the module for debugging.  However, a default build (such as building 
GENERIC) would not build or install acpi.ko.  I just build a full kernel to 
test ACPI changes myself.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 14:21:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DFB4A106566C;
	Tue,  9 Mar 2010 14:21:57 +0000 (UTC) (envelope-from avg@freebsd.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A5DC8FC16;
	Tue,  9 Mar 2010 14:21:55 +0000 (UTC)
Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua
	[212.40.38.101])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA25999;
	Tue, 09 Mar 2010 16:21:54 +0200 (EET) (envelope-from avg@freebsd.org)
Message-ID: <4B965982.9070807@freebsd.org>
Date: Tue, 09 Mar 2010 16:21:54 +0200
From: Andriy Gapon 
User-Agent: Thunderbird 2.0.0.23 (X11/20100211)
MIME-Version: 1.0
To: Alan Cox 
References: <201003090330.o293UVtp093407@svn.freebsd.org>
In-Reply-To: <201003090330.o293UVtp093407@svn.freebsd.org>
X-Enigmail-Version: 0.95.7
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: r204907 - in head/sys/amd64: amd64 include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 14:21:58 -0000

on 09/03/2010 05:30 Alan Cox said the following:
>   Most of the credit should go to Andriy Gapon for diagnosing the error and
>   working with Borislav Petkov at AMD to document it.  Andriy also reviewed
>   and tested my patches.

This is an exaggeration :)
It was Alan who made crucial conclusions and wrote the actual code.

-- 
Andriy Gapon

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 14:24:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2A631065673;
	Tue,  9 Mar 2010 14:24:23 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi
	[195.197.172.116])
	by mx1.freebsd.org (Postfix) with ESMTP id 8EDA68FC32;
	Tue,  9 Mar 2010 14:24:23 +0000 (UTC)
Received: from a91-153-117-195.elisa-laajakaista.fi
	(a91-153-117-195.elisa-laajakaista.fi [91.153.117.195])
	by gw02.mail.saunalahti.fi (Postfix) with SMTP id 17E80139CA9;
	Tue,  9 Mar 2010 16:24:18 +0200 (EET)
Date: Tue, 9 Mar 2010 16:24:17 +0200
From: Jaakko Heinonen 
To: "Andrey A. Chernov" 
Message-ID: <20100309142417.GA2980@a91-153-117-195.elisa-laajakaista.fi>
References: <201003081940.o28JeNka088001@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003081940.o28JeNka088001@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204876 - head/usr.bin/uniq
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 14:24:24 -0000

On 2010-03-08, Andrey A. Chernov wrote:
>   1) Reimplement (differently) unlimited line length restricted in prev.
>   commit.

Thanks!

-- 
Jaakko

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 15:12:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D9FE106568D;
	Tue,  9 Mar 2010 15:12:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1EFA88FC08;
	Tue,  9 Mar 2010 15:12: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 o29FCs1b050638;
	Tue, 9 Mar 2010 15:12:54 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29FCs5v050636;
	Tue, 9 Mar 2010 15:12:54 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003091512.o29FCs5v050636@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 9 Mar 2010 15:12: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: r204913 - head/sys/amd64/amd64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 15:12:54 -0000

Author: jhb
Date: Tue Mar  9 15:12:53 2010
New Revision: 204913
URL: http://svn.freebsd.org/changeset/base/204913

Log:
  Now that the workaround for the AMD 10h CPUs is in place, re-enable machine
  checks by default on amd64.
  
  Discussed with:	alc

Modified:
  head/sys/amd64/amd64/mca.c

Modified: head/sys/amd64/amd64/mca.c
==============================================================================
--- head/sys/amd64/amd64/mca.c	Tue Mar  9 13:41:33 2010	(r204912)
+++ head/sys/amd64/amd64/mca.c	Tue Mar  9 15:12:53 2010	(r204913)
@@ -60,7 +60,7 @@ static int mca_count;		/* Number of reco
 
 SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture");
 
-static int mca_enabled = 0;
+static int mca_enabled = 1;
 TUNABLE_INT("hw.mca.enabled", &mca_enabled);
 SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0,
     "Administrative toggle for machine check support");

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 15:29:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 70F43106566B;
	Tue,  9 Mar 2010 15:29:52 +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 45D778FC1A;
	Tue,  9 Mar 2010 15:29:52 +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 ED46D46B58;
	Tue,  9 Mar 2010 10:29:51 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 225A58A01F;
	Tue,  9 Mar 2010 10:29:51 -0500 (EST)
From: John Baldwin 
To: src-committers@freebsd.org
Date: Tue, 9 Mar 2010 10:25:45 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003091512.o29FCs5v050636@svn.freebsd.org>
In-Reply-To: <201003091512.o29FCs5v050636@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201003091025.45610.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 09 Mar 2010 10:29:51 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r204913 - head/sys/amd64/amd64
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 15:29:52 -0000

On Tuesday 09 March 2010 10:12:53 am John Baldwin wrote:
> Author: jhb
> Date: Tue Mar  9 15:12:53 2010
> New Revision: 204913
> URL: http://svn.freebsd.org/changeset/base/204913
> 
> Log:
>   Now that the workaround for the AMD 10h CPUs is in place, re-enable machine
>   checks by default on amd64.

It will be re-enabled on i386 once Alan has ported the workaround to i386.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 17:47:20 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 697CB1065670;
	Tue,  9 Mar 2010 17:47:20 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au
	[211.29.132.189])
	by mx1.freebsd.org (Postfix) with ESMTP id F36FF8FC12;
	Tue,  9 Mar 2010 17:47:19 +0000 (UTC)
Received: from c220-239-227-59.carlnfd1.nsw.optusnet.com.au
	(c220-239-227-59.carlnfd1.nsw.optusnet.com.au [220.239.227.59])
	by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o29HlBx1008199
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 10 Mar 2010 04:47:17 +1100
Date: Wed, 10 Mar 2010 04:47:11 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Maxim Sobolev 
In-Reply-To: <201003091031.o29AV3JO088200@svn.freebsd.org>
Message-ID: <20100310042436.D13688@delplex.bde.org>
References: <201003091031.o29AV3JO088200@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: r204909 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 17:47:20 -0000

On Tue, 9 Mar 2010, Maxim Sobolev wrote:

> Log:
>  Change secrorsize back to int, since that's the data type expected by the
>  ioctl(DIOCGSECTORSIZE). It creates issues on some architectures.

This is how it should have been done originally.  Except, it should have
been done for all the int variables, and without the bugs in this version.

> Modified: head/sbin/newfs/newfs.c
> ==============================================================================
> --- head/sbin/newfs/newfs.c	Tue Mar  9 06:43:35 2010	(r204908)
> +++ head/sbin/newfs/newfs.c	Tue Mar  9 10:31:03 2010	(r204909)
> @@ -92,7 +92,7 @@ int	Jflag;			/* enable gjournal for file
> int	lflag;			/* enable multilabel for file system */
> int	nflag;			/* do not create .snap directory */
> intmax_t fssize;		/* file system size */
> -int64_t	sectorsize;		/* bytes/sector */
> +int	sectorsize;		/* bytes/sector */
> int	realsectorsize;		/* bytes/sector in hardware */
> int64_t	fsize = 0;		/* fragment size */
> int64_t	bsize = 0;		/* block size */
> @@ -119,6 +119,7 @@ static void getfssize(intmax_t *, const
> static struct disklabel *getdisklabel(char *s);
> static void rewritelabel(char *s, struct disklabel *lp);
> static void usage(void);
> +static int expand_number_int(const char *buf, int *num);

Style bug: insertion sort error.  The prototypes used to be sorted, but
the order had already rotted with getfssize().

> @@ -171,7 +172,7 @@ main(int argc, char *argv[])
> 			Rflag = 1;
> 			break;
> 		case 'S':
> -			rval = expand_number(optarg, §orsize);
> +			rval = expand_number_int(optarg, §orsize);
> 			if (rval < 0 || sectorsize <= 0)
> 				errx(1, "%s: bad sector size", optarg);
> 			break;

As pointed out in another reply, sectorsize should be u_int in another
context (for DICOGSECTORSIZE), but here negative values and values larger
than INT_MAX are disallowed so there is no problem here.  There is no
range checking for the value returned by DIOCGSECTORSIZE.  It is not
really needed since the kernel shouldn't return an invalid sector size.
The range checking here is rather pointless since sector sizes of <= 0
are only some of the ones that won't work.  Ones like 42 won't work
either.  No non-power of 2 will work, and huge values won't work.
There may be checks for huge values later.

> @@ -496,3 +497,20 @@ usage()
> 	fprintf(stderr, "\t-s file system size (sectors)\n");
> 	exit(1);
> }
> +
> +static int
> +expand_number_int(const char *buf, int *num)
> +{
> +	int64_t num64;
> +	int rval;
> +
> +	rval = expand_number(buf, &num64);
> +	if (rval != 0)
> +		return (rval);

This is missing the style bug of testing for (rval < 0).

> +	if (num64 > INT_MAX) {
> +		errno = ERANGE;
> +		return (-1);
> +	}

This is missing a check for (num64 < INT_MIN).

> +	*num = (int)num64;

This overflows when num64 < INT_MIN.  The overflow normally results in
truncation.  If the truncated value is > 0, the error is not detected
later.

> +	return (0);
> +}

Extending expand_number_int() and expand_number() to support unsigned
values is not easy without bloating the API.  expand_number_int() is
broken as designed, since it doesn't support unsigned values or
[u]intmax_t values.  strtonum() is even more broken as designed.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 17:55:47 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 30F2F106566C;
	Tue,  9 Mar 2010 17:55:47 +0000 (UTC) (envelope-from das@FreeBSD.ORG)
Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101])
	by mx1.freebsd.org (Postfix) with ESMTP id D7ABE8FC15;
	Tue,  9 Mar 2010 17:55:45 +0000 (UTC)
Received: from zim.MIT.EDU (localhost [127.0.0.1])
	by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o29HtjRZ017783;
	Tue, 9 Mar 2010 12:55:45 -0500 (EST) (envelope-from das@FreeBSD.ORG)
Received: (from das@localhost)
	by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o29Htivh017782;
	Tue, 9 Mar 2010 12:55:44 -0500 (EST) (envelope-from das@FreeBSD.ORG)
Date: Tue, 9 Mar 2010 12:55:44 -0500
From: David Schultz 
To: Andrey Chernov , Bruce Evans ,
	Jaakko Heinonen , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
Message-ID: <20100309175544.GA17698@zim.MIT.EDU>
Mail-Followup-To: Andrey Chernov ,
	Bruce Evans ,
	Jaakko Heinonen , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
References: <201003061921.o26JLv36014114@svn.freebsd.org>
	<20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi>
	<20100308015926.O11669@delplex.bde.org>
	<20100307183139.GA50243@nagual.pp.ru>
	<20100307201027.GA51623@nagual.pp.ru>
	<20100308195123.GA10624@zim.MIT.EDU>
	<20100308202919.GA67990@nagual.pp.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100308202919.GA67990@nagual.pp.ru>
Cc: 
Subject: Re: svn commit: r204803 - head/usr.bin/uniq
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 17:55:47 -0000

On Mon, Mar 08, 2010, Andrey Chernov wrote:
> > I've had a wide character version of getline() ready to
> > commit for some time (I just need to find the time to do it), so
> > you won't need to call mbstowcs() as a separate step.
> 
> It does not help, since wide version will fail on EILSEQ with sync lost,
> as getwc() does. Initially I was thinking about ftell+fseek back, but not 
> all files are seekable.
> 
> BTW, I plan to made similar changes to comm(1) too, it suffer from the 
> same EILSEQ problem.

Actually, a question...why doesn't it suffice to simply call
strcoll() instead of mbstowcs() followed by wcscoll()?
I would expect that in the absence of the -i flag, none of
this would be necessary.  At the very least, it would make
sense to start with a strcmp(), and only fall back on the
expensive conversion and collation if the strings don't
compare equal.

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 18:03:58 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by hub.freebsd.org (Postfix) with ESMTP id C889A1065721;
	Tue,  9 Mar 2010 18:03:57 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
From: Jung-uk Kim 
To: John Baldwin 
Date: Tue, 9 Mar 2010 13:03:45 -0500
User-Agent: KMail/1.6.2
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003082035.43977.jkim@FreeBSD.org>
	<201003090753.31627.jhb@freebsd.org>
In-Reply-To: <201003090753.31627.jhb@freebsd.org>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003091303.49689.jkim@FreeBSD.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 18:03:58 -0000

On Tuesday 09 March 2010 07:53 am, John Baldwin wrote:
> On Monday 08 March 2010 8:35:42 pm Jung-uk Kim wrote:
> > On Monday 08 March 2010 05:52 pm, Jung-uk Kim wrote:
> > > On Monday 08 March 2010 05:25 pm, John Baldwin wrote:
> > > > On Monday 08 March 2010 5:11:42 pm Jung-uk Kim wrote:
> > > > > On Monday 08 March 2010 04:11 pm, John Baldwin wrote:
> > > > > > On Monday 08 March 2010 2:40:31 pm Jung-uk Kim wrote:
> > > > > > > Author: jkim
> > > > > > > Date: Mon Mar  8 19:40:31 2010
> > > > > > > New Revision: 204877
> > > > > > > URL: http://svn.freebsd.org/changeset/base/204877
> > > > > > >
> > > > > > > Log:
> > > > > > >   Enable ACPI module build on amd64.  Although we
> > > > > > > strongly recommend building it into kernel, there is no
> > > > > > > need to prevent it from building at all.
> > > > > >
> > > > > > (Oops, ignore previous spurious reply).
> > > > > >
> > > > > > Please revert this.  The MADT parser on amd64 is slightly
> > > > > > different from i386 and will not work when acpi is loaded
> > > > > > as a module.  If anything, I would prefer we make acpi
> > > > > > not be a module on i386. There are several things that
> > > > > > would be far less invasive to implement via #ifdef
> > > > > > DEV_ACPI than by defining runtime kobj interfaces to the
> > > > > > ACPI driver.
> > > > >
> > > > > madt.c itself is not very different but I understand what
> > > > > you are trying to explain here.  In fact, I tested it
> > > > > before committing and the trick was adding mptable in place
> > > > > of acpi. It worked fine although it may not be ideal.  I
> > > > > can back out sys/modules/acpi/Makefile change if you agree,
> > > > > however.
> > > >
> > > > It is different enough.  Specifically, the amd64 one sets a
> > > > "better" value for mp_maxid than i386, but it can only do
> > > > this because it can run before SI_SUB_KLD since it is never
> > > > invoked as a module.  I still think that we should probably
> > > > be moving away from acpi.ko rather than towards for other
> > > > reasons.
> > >
> > > I noticed that and I used mptable instead, which seems to do
> > > well enough for the job.  Please keep in mind that I am not
> > > trying to promote acpi.ko at all.  I just want to make sure
> > > acpi.ko can be built and loaded without builing and installing
> > > the whole world/kernel for i386 to test new ACPICA. :-(
> > >
> > > Any way, I will just revert sys/modules/acpi/Makefile change,
> > > then. It should be a reasonable compromise, deal?
> >
> > I thought you complained because I accidentally committed my
> > local changes to sys/modules/acpi/Makefile.  In fact, I didn't.
> > :-) Do you still think I should back it out?  Or is it okay?
>
> I think it should be backed out.  The MP table is not really a good
> workaround as you cannot mix and match ACPI and MP table for PCI
> interrupt routing.  Or rather, if you use the MP Table, we have to
> use it for all PCI stuff and cannot use ACPI for any PCI-related
> stuff, so it's not really ideal.  I don't think the system quite
> does the right thing though.  I suspect it is still using ACPI to
> manage PCI and you are just getting lucky that ACPI numbers the IO
> APIC IRQs the same way FreeBSD's MP Table driver happens to do.

Understood.  Thanks for the detailed explanation.

> Also, the MP Table is not always kept up to date in modern BIOSes. 
> Since most modern OS's only use the ACPI tables, BIOS writers do
> not test the MP Table, and I know of one instance a few years ago
> where Intel shipped a completely wrong MP Table for a new platform
> because nothing they tested used it.

I am well aware of this issue.

> If all you want is the ability to build an acpi.ko but not to
> actually use it, then maybe you could only enable building the
> module if a special variable is set?  That is, you could do 'make
> BUILD_KLD=yes' in sys/modules/acpi/acpi to build the module for
> debugging.  However, a default build (such as building GENERIC)
> would not build or install acpi.ko.

And we do not build or install acpi.ko by default as you expected:

# $FreeBSD: head/sys/modules/acpi/Makefile 194701 2009-06-23 13:17:25Z rpaulo $

.if ${MACHINE} == "i386"
SUBDIR=		acpi
.endif

SUBDIR+=	acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm    \
		acpi_panasonic acpi_sony acpi_toshiba acpi_video        \
		acpi_dock acpi_wmi 

.include 

You have to descend to the subdir and build/install manually and
that's all I wanted.

> I just build a full kernel to test ACPI changes myself.

Thanks.

Jung-uk Kim

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:02:03 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B48761065677;
	Tue,  9 Mar 2010 19:02: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 A34858FC14;
	Tue,  9 Mar 2010 19:02: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 o29J23oM001750;
	Tue, 9 Mar 2010 19:02:03 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29J22lv001749;
	Tue, 9 Mar 2010 19:02:02 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003091902.o29J22lv001749@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 9 Mar 2010 19:02: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: r204916 - head/sys/dev/acpica
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:02:03 -0000

Author: jkim
Date: Tue Mar  9 19:02:02 2010
New Revision: 204916
URL: http://svn.freebsd.org/changeset/base/204916

Log:
  - Allow users to enable dumping Debug objects without ACPI debugger.
  Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
  value enables us to print Debug object when something is written to it.
  - Allow users to disable interpreter slack mode.  Setting the new tunable
  "debug.acpi.interpreter_slack" to zero disables some workarounds for common
  BIOS mistakes and enables strict ACPI implementations by the specification.

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Tue Mar  9 17:26:50 2010	(r204915)
+++ head/sys/dev/acpica/acpi.c	Tue Mar  9 19:02:02 2010	(r204916)
@@ -162,6 +162,7 @@ static int	acpi_sname2sstate(const char 
 static const char *acpi_sstate2sname(int sstate);
 static int	acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS);
 static int	acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS);
+static int	acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS);
 static int	acpi_pm_func(u_long cmd, void *arg, ...);
 static int	acpi_child_location_str_method(device_t acdev, device_t child,
 					       char *buf, size_t buflen);
@@ -253,6 +254,19 @@ SYSCTL_STRING(_debug_acpi, OID_AUTO, acp
 static int acpi_serialize_methods;
 TUNABLE_INT("hw.acpi.serialize_methods", &acpi_serialize_methods);
 
+/* Allow users to dump Debug objects without ACPI debugger. */
+static int acpi_debug_objects;
+TUNABLE_INT("debug.acpi.enable_debug_objects", &acpi_debug_objects);
+SYSCTL_PROC(_debug_acpi, OID_AUTO, enable_debug_objects,
+    CTLFLAG_RW | CTLTYPE_INT, NULL, 0, acpi_debug_objects_sysctl, "I",
+    "Enable Debug objects");
+
+/* Allow the interpreter to ignore common mistakes in BIOS. */
+static int acpi_interpreter_slack = 1;
+TUNABLE_INT("debug.acpi.interpreter_slack", &acpi_interpreter_slack);
+SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN,
+    &acpi_interpreter_slack, 1, "Turn on interpreter slack mode.");
+
 /* Power devices off and on in suspend and resume.  XXX Remove once tested. */
 static int acpi_do_powerstate = 1;
 TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate);
@@ -452,8 +466,17 @@ acpi_attach(device_t dev)
      * Set the globals from our tunables.  This is needed because ACPI-CA
      * uses UINT8 for some values and we have no tunable_byte.
      */
-    AcpiGbl_AllMethodsSerialized = acpi_serialize_methods;
-    AcpiGbl_EnableInterpreterSlack = TRUE;
+    AcpiGbl_AllMethodsSerialized = acpi_serialize_methods ? TRUE : FALSE;
+    AcpiGbl_EnableInterpreterSlack = acpi_interpreter_slack ? TRUE : FALSE;
+    AcpiGbl_EnableAmlDebugObject = acpi_debug_objects ? TRUE : FALSE;
+
+#ifndef ACPI_DEBUG
+    /*
+     * Disable all debugging layers and levels.
+     */
+    AcpiDbgLayer = 0;
+    AcpiDbgLevel = 0;
+#endif
 
     /* Start up the ACPI CA subsystem. */
     status = AcpiInitializeSubsystem();
@@ -3447,8 +3470,6 @@ acpi_set_debugging(void *junk)
 	AcpiDbgLevel = 0;
     }
 
-    AcpiGbl_EnableAmlDebugObject = TRUE;
-
     layer = getenv("debug.acpi.layer");
     level = getenv("debug.acpi.level");
     if (layer == NULL && level == NULL)
@@ -3525,6 +3546,26 @@ SYSCTL_PROC(_debug_acpi, OID_AUTO, level
 #endif /* ACPI_DEBUG */
 
 static int
+acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS)
+{
+	int	error;
+	int	old;
+
+	old = acpi_debug_objects;
+	error = sysctl_handle_int(oidp, &acpi_debug_objects, 0, req);
+	if (error != 0 || req->newptr == NULL)
+		return (error);
+	if (old == acpi_debug_objects || (old && acpi_debug_objects))
+		return (0);
+
+	ACPI_SERIAL_BEGIN(acpi);
+	AcpiGbl_EnableAmlDebugObject = acpi_debug_objects ? TRUE : FALSE;
+	ACPI_SERIAL_END(acpi);
+
+	return (0);
+}
+
+static int
 acpi_pm_func(u_long cmd, void *arg, ...)
 {
 	int	state, acpi_state;

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:10:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 165B5106564A;
	Tue,  9 Mar 2010 19:10:15 +0000 (UTC)
	(envelope-from a_best01@uni-muenster.de)
Received: from zivm-relay2.uni-muenster.de (ZIVM-RELAY2.UNI-MUENSTER.DE
	[128.176.192.13])
	by mx1.freebsd.org (Postfix) with ESMTP id 530698FC15;
	Tue,  9 Mar 2010 19:10:13 +0000 (UTC)
X-IronPort-AV: E=Sophos;i="4.49,609,1262559600"; d="scan'208";a="238714461"
Received: from zivmaildisp1.uni-muenster.de (HELO
	ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85])
	by zivm-relay2.uni-muenster.de with ESMTP; 09 Mar 2010 20:10:12 +0100
Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459)
	id 373D51B0768; Tue,  9 Mar 2010 20:10:12 +0100 (CET)
Date: Tue, 09 Mar 2010 20:10:05 +0100 (CET)
From: Alexander Best 
Sender: 
Organization: Westfaelische Wilhelms-Universitaet Muenster
To: Edwin Groothuis 
Message-ID: 
In-Reply-To: <20100309110017.GG1761@mavetju.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r204849 - head/usr.bin/ncal
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:10:15 -0000

Edwin Groothuis schrieb am 2010-03-09:
> On Mon, Mar 08, 2010 at 01:39:28AM +0100, Alexander Best wrote:
> > Edwin Groothuis schrieb am 2010-03-08:
> > > On Mon, Mar 08, 2010 at 12:16:04AM +0100, Alexander Best wrote:
> > > > could you have another look at the -J option? it seems
> > > > highlighting
> > > > still

> > > Aha, only -J in "month only" view is still not working. Will take
> > > care of it later. Also add a bunch of regression tests to it,
> > > because
> > > of all of this.

> > > > isn't enabled in combination with it. also i'm wondering what
> > > > the
> > > > purpose of
> > > > the -b switch is. running `cal` and `ncal -b` seems to be doing
> > > > the
> > > > very same
> > > > thing (setting flag_backward = 1).

> > > You can't run "cal" until you have installed it, while being able
> > > to run "ncal -b" and coming into "cal" mode is kind of nice.

> > thanks for the hint. the -b switch definitely comes in handy when
> > `cal` isn't
> > available, because one is running ncal from /usr/src/usr.bin.

> > will the -b switch disappear once you ncal/cal works properly with
> > highlighting?

> It will be hard to write proper regression tests if you can't
> properly specify what you want :-)

oh right. forgot about the regression tests. ;)

> > what confused me a little is the output of something like `ncal 10
> > 2011`.
> > judging from ncal(1) i guessed the output to be October of 2011,
> > yet the
> > output is all months from October 2011 to September 2012.

> Yeah, fixed.

thanks. :)

> > i tried `ncal -m 10 2011` instead and the output was just the same.
> > so what's
> > the right way to see the entry for lets say October 2011?

> > another issue i'm having is the -m switch in combination with f and
> > p. judging
> > from ncal(1) `ncal -m 3p` should output February 2010 and `ncal -m
> > 3f` April
> > 2010. however instead of printing the previous and next month the
> > previous and
> > next year gets printed.

> If I understand correctly:

> -m 1  gives this years January (which is 2010)
> -m 1p gives the previous January (which is 2010)
> -m 1f gives the next January (which is 2011)

> -m 9  gives this years September (which is 2010)
> -m 9p gives the previous September (which is 2009)
> -m 9f gives the next September (which is 2010)

> And now the tricky one:

> -m 3  gives this years March (which is 2010)
> -m 3p gives the previous March (which is 2009)
> -m 3f gives the next March (which is 2011)

ahh. now i understand the purpose of "p" and "f" in combination with the "-m"
switch. sorry for the misunderstanding. after reading the ncal(1) entry for
the "-m" switch i was under the impression that e.g. "-m 3p" takes the third
month of this year (march) and displays the previous month (february), whereas
"-m 3f" would display the next month after march (being april).

maybe ncal(1) could be a bit more precise about what "p" and "f" are for.

> Edwin


From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:16:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36CDA106566B;
	Tue,  9 Mar 2010 19:16:44 +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 2100B8FC12;
	Tue,  9 Mar 2010 19:16:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o29JGinY005100;
	Tue, 9 Mar 2010 19:16:44 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29JGhG3005096;
	Tue, 9 Mar 2010 19:16:43 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201003091916.o29JGhG3005096@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 9 Mar 2010 19:16: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: r204917 - in head: crypto/openssh
	crypto/openssh/openbsd-compat lib/libpam/modules/pam_ssh
	secure/lib/libssh secure/libexec
	secure/libexec/ssh-pkcs11-helper secure/usr.bin/ssh secure/us...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:16:44 -0000

Author: des
Date: Tue Mar  9 19:16:43 2010
New Revision: 204917
URL: http://svn.freebsd.org/changeset/base/204917

Log:
  Upgrade to OpenSSH 5.4p1.
  
  MFC after:	1 month

Added:
  head/crypto/openssh/PROTOCOL.certkeys
     - copied unchanged from r204870, vendor-crypto/openssh/dist/PROTOCOL.certkeys
  head/crypto/openssh/PROTOCOL.mux
     - copied unchanged from r204870, vendor-crypto/openssh/dist/PROTOCOL.mux
  head/crypto/openssh/openbsd-compat/pwcache.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/openbsd-compat/pwcache.c
  head/crypto/openssh/pkcs11.h
     - copied unchanged from r204870, vendor-crypto/openssh/dist/pkcs11.h
  head/crypto/openssh/roaming_client.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/roaming_client.c
  head/crypto/openssh/roaming_serv.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/roaming_serv.c
  head/crypto/openssh/ssh-pkcs11-client.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11-client.c
  head/crypto/openssh/ssh-pkcs11-helper.0
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11-helper.0
  head/crypto/openssh/ssh-pkcs11-helper.8
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11-helper.8
  head/crypto/openssh/ssh-pkcs11-helper.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11-helper.c
  head/crypto/openssh/ssh-pkcs11.c
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11.c
  head/crypto/openssh/ssh-pkcs11.h
     - copied unchanged from r204870, vendor-crypto/openssh/dist/ssh-pkcs11.h
  head/secure/libexec/ssh-pkcs11-helper/
Deleted:
  head/crypto/openssh/README.smartcard
  head/crypto/openssh/scard-opensc.c
  head/crypto/openssh/scard.c
  head/crypto/openssh/scard.h
Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/INSTALL
  head/crypto/openssh/PROTOCOL
  head/crypto/openssh/PROTOCOL.agent
  head/crypto/openssh/README
  head/crypto/openssh/addrmatch.c
  head/crypto/openssh/auth-krb5.c
  head/crypto/openssh/auth-options.c
  head/crypto/openssh/auth-options.h
  head/crypto/openssh/auth-rh-rsa.c
  head/crypto/openssh/auth-rhosts.c
  head/crypto/openssh/auth-rsa.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth.h
  head/crypto/openssh/auth2-hostbased.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfd.h
  head/crypto/openssh/authfile.c
  head/crypto/openssh/authfile.h
  head/crypto/openssh/bufaux.c
  head/crypto/openssh/buffer.c
  head/crypto/openssh/buffer.h
  head/crypto/openssh/canohost.c
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/clientloop.h
  head/crypto/openssh/config.guess
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/defines.h
  head/crypto/openssh/dh.c
  head/crypto/openssh/dns.c
  head/crypto/openssh/dns.h
  head/crypto/openssh/hostfile.c
  head/crypto/openssh/hostfile.h
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/kexdhs.c
  head/crypto/openssh/kexgexs.c
  head/crypto/openssh/key.c
  head/crypto/openssh/key.h
  head/crypto/openssh/loginrec.c
  head/crypto/openssh/match.h
  head/crypto/openssh/misc.c
  head/crypto/openssh/misc.h
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor_fdpass.c
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/mux.c
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/nchan.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
  head/crypto/openssh/openbsd-compat/openbsd-compat.h
  head/crypto/openssh/openbsd-compat/openssl-compat.c
  head/crypto/openssh/openbsd-compat/port-aix.c
  head/crypto/openssh/openbsd-compat/port-aix.h
  head/crypto/openssh/openbsd-compat/port-linux.c
  head/crypto/openssh/openbsd-compat/port-linux.h
  head/crypto/openssh/openbsd-compat/readpassphrase.c
  head/crypto/openssh/pathnames.h
  head/crypto/openssh/platform.c
  head/crypto/openssh/platform.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/roaming.h
  head/crypto/openssh/roaming_common.c
  head/crypto/openssh/scp.1
  head/crypto/openssh/scp.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-client.c
  head/crypto/openssh/sftp-client.h
  head/crypto/openssh/sftp-common.c
  head/crypto/openssh/sftp-common.h
  head/crypto/openssh/sftp-server.8
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/sftp.1
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-add.1
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-dss.c
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.1
  head/crypto/openssh/ssh-keyscan.c
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-rand-helper.c
  head/crypto/openssh/ssh-rsa.c
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh2.h
  head/crypto/openssh/ssh_config
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshpty.h
  head/crypto/openssh/sshtty.c
  head/crypto/openssh/version.h
  head/lib/libpam/modules/pam_ssh/pam_ssh.c
  head/secure/lib/libssh/Makefile
  head/secure/libexec/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile
Directory Properties:
  head/crypto/openssh/   (props changed)

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Tue Mar  9 19:02:02 2010	(r204916)
+++ head/crypto/openssh/ChangeLog	Tue Mar  9 19:16:43 2010	(r204917)
@@ -1,3 +1,982 @@
+20100307
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/03/07 22:16:01
+     [ssh-keygen.c]
+     make internal strptime string match strftime format;
+     suggested by vinschen AT redhat.com and markus@
+   - djm@cvs.openbsd.org 2010/03/08 00:28:55
+     [ssh-keygen.1]
+     document permit-agent-forwarding certificate constraint; patch from
+     stevesk@
+   - djm@cvs.openbsd.org 2010/03/07 22:01:32
+     [version.h]
+     openssh-5.4
+ - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
+   crank version numbers
+ - (djm) Release OpenSSH-5.4p1
+
+20100307
+ - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that
+   it gets the passwd struct from the LAM that knows about the user which is
+   not necessarily the default.  Patch from Alexandre Letourneau.
+ - (dtucker) [session.c] Bug #1567: move setpcred call to before chroot and
+   do not set real uid, since that's needed for the chroot, and will be set
+   by permanently_set_uid.
+ - (dtucker) [session.c] Also initialize creds to NULL for handing to
+    setpcred.
+ - (dtucker) OpenBSD CVS Sync
+   - dtucker@cvs.openbsd.org 2010/03/07 11:57:13
+     [auth-rhosts.c monitor.c monitor_wrap.c session.c auth-options.c sshd.c]
+     Hold authentication debug messages until after successful authentication.
+     Fixes an info leak of environment variables specified in authorized_keys,
+     reported by Jacob Appelbaum.  ok djm@
+
+20100305
+ - OpenBSD CVS Sync
+   - jmc@cvs.openbsd.org 2010/03/04 12:51:25
+     [ssh.1 sshd_config.5]
+     tweak previous;
+   - djm@cvs.openbsd.org 2010/03/04 20:35:08
+     [ssh-keygen.1 ssh-keygen.c]
+     Add a -L flag to print the contents of a certificate; ok markus@
+   - jmc@cvs.openbsd.org 2010/03/04 22:52:40
+     [ssh-keygen.1]
+     fix Bk/Ek;
+   - djm@cvs.openbsd.org 2010/03/04 23:17:25
+     [sshd_config.5]
+     missing word; spotted by jmc@
+   - djm@cvs.openbsd.org 2010/03/04 23:19:29
+     [ssh.1 sshd.8]
+     move section on CA and revoked keys from ssh.1 to sshd.8's known hosts
+     format section and rework it a bit; requested by jmc@
+   - djm@cvs.openbsd.org 2010/03/04 23:27:25
+     [auth-options.c ssh-keygen.c]
+     "force-command" is not spelled "forced-command"; spotted by
+     imorgan AT nas.nasa.gov
+   - djm@cvs.openbsd.org 2010/03/05 02:58:11
+     [auth.c]
+     make the warning for a revoked key louder and more noticable
+   - jmc@cvs.openbsd.org 2010/03/05 06:50:35
+     [ssh.1 sshd.8]
+     tweak previous;
+   - jmc@cvs.openbsd.org 2010/03/05 08:31:20
+     [ssh.1]
+     document certificate authentication; help/ok djm
+   - djm@cvs.openbsd.org 2010/03/05 10:28:21
+     [ssh-add.1 ssh.1 ssh_config.5]
+     mention loading of certificate files from [private]-cert.pub when
+     they are present; feedback and ok jmc@
+ - (tim) [ssh-pkcs11.c] Fix "non-constant initializer" errors in older
+   compilers. OK djm@
+ - (djm) [ssh-rand-helper.c] declare optind, avoiding compilation failure
+   on some platforms
+ - (djm) [configure.ac] set -fno-strict-aliasing for gcc4; ok dtucker@
+
+20100304
+ - (djm) [ssh-keygen.c] Use correct local variable, instead of
+   maybe-undefined global "optarg"
+ - (djm) [contrib/redhat/openssh.spec] Replace obsolete BuildPreReq
+   on XFree86-devel with neutral /usr/include/X11/Xlib.h;
+   imorgan AT nas.nasa.gov in bz#1731
+ - (djm) [.cvsignore] Ignore ssh-pkcs11-helper
+ - (djm) [regress/Makefile] Cleanup sshd_proxy_orig
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/03/03 01:44:36
+     [auth-options.c key.c]
+     reject strings with embedded ASCII nul chars in certificate key IDs,
+     principal names and constraints
+   - djm@cvs.openbsd.org 2010/03/03 22:49:50
+     [sshd.8]
+     the authorized_keys option for CA keys is "cert-authority", not
+     "from=cert-authority". spotted by imorgan AT nas.nasa.gov
+   - djm@cvs.openbsd.org 2010/03/03 22:50:40
+     [PROTOCOL.certkeys]
+     s/similar same/similar/; from imorgan AT nas.nasa.gov
+   - djm@cvs.openbsd.org 2010/03/04 01:44:57
+     [key.c]
+     use buffer_get_string_ptr_ret() where we are checking the return
+     value explicitly instead of the fatal()-causing buffer_get_string_ptr()
+   - djm@cvs.openbsd.org 2010/03/04 10:36:03
+     [auth-rh-rsa.c auth-rsa.c auth.c auth.h auth2-hostbased.c auth2-pubkey.c]
+     [authfile.c authfile.h hostfile.c hostfile.h servconf.c servconf.h]
+     [ssh-keygen.c ssh.1 sshconnect.c sshd_config.5]
+     Add a TrustedUserCAKeys option to sshd_config to specify CA keys that
+     are trusted to authenticate users (in addition than doing it per-user
+     in authorized_keys).
+     
+     Add a RevokedKeys option to sshd_config and a @revoked marker to
+     known_hosts to allow keys to me revoked and banned for user or host
+     authentication.
+     
+     feedback and ok markus@
+   - djm@cvs.openbsd.org 2010/03/03 00:47:23
+     [regress/cert-hostkey.sh regress/cert-userkey.sh]
+     add an extra test to ensure that authentication with the wrong
+     certificate fails as it should (and it does)
+   - djm@cvs.openbsd.org 2010/03/04 10:38:23
+     [regress/cert-hostkey.sh regress/cert-userkey.sh]
+     additional regression tests for revoked keys and TrustedUserCAKeys
+
+20100303
+ - (djm) [PROTOCOL.certkeys] Add RCS Ident
+ - OpenBSD CVS Sync
+   - jmc@cvs.openbsd.org 2010/02/26 22:09:28
+     [ssh-keygen.1 ssh.1 sshd.8]
+     tweak previous;
+   - otto@cvs.openbsd.org 2010/03/01 11:07:06
+     [ssh-add.c]
+     zap what seems to be a left-over debug message; ok markus@
+   - djm@cvs.openbsd.org 2010/03/02 23:20:57
+     [ssh-keygen.c]
+     POSIX strptime is stricter than OpenBSD's so do a little dance to
+     appease it.
+ - (djm) [regress/cert-userkey.sh] s/echo -n/echon/ here too
+
+20100302
+ - (tim) [config.guess config.sub] Bug 1722: Update to latest versions from
+   http://git.savannah.gnu.org/gitweb/ (2009-12-30 and 2010-01-22
+   respectively).
+
+20100301
+ - (dtucker) [regress/{cert-hostkey,cfgmatch,cipher-speed}.sh} Replace
+   "echo -n" with "echon" for portability.
+ - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
+   adjust log at verbose only, since according to cjwatson in bug #1470
+   some virtualization platforms don't allow writes.
+
+20100228
+ - (djm) [auth.c] On Cygwin, refuse usernames that have differences in
+   case from that matched in the system password database. On this
+   platform, passwords are stored case-insensitively, but sshd requires
+   exact case matching for Match blocks in sshd_config(5). Based on
+   a patch from vinschen AT redhat.com.
+ - (tim) [ssh-pkcs11-helper.c] Move declarations before calling functions
+   to make older compilers (gcc 2.95) happy.
+
+20100227
+ - (djm) [ssh-pkcs11-helper.c ] Ensure RNG is initialised and seeded
+ - (djm) [openbsd-compat/bsd-cygwin_util.c] Reduce the set of environment
+   variables copied into sshd child processes. From vinschen AT redhat.com
+
+20100226
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/02/26 20:29:54
+     [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys addrmatch.c auth-options.c]
+     [auth-options.h auth.h auth2-pubkey.c authfd.c dns.c dns.h hostfile.c]
+     [hostfile.h kex.h kexdhs.c kexgexs.c key.c key.h match.h monitor.c]
+     [myproposal.h servconf.c servconf.h ssh-add.c ssh-agent.c ssh-dss.c]
+     [ssh-keygen.1 ssh-keygen.c ssh-rsa.c ssh.1 ssh.c ssh2.h sshconnect.c]
+     [sshconnect2.c sshd.8 sshd.c sshd_config.5]
+     Add support for certificate key types for users and hosts.
+     
+     OpenSSH certificate key types are not X.509 certificates, but a much
+     simpler format that encodes a public key, identity information and
+     some validity constraints and signs it with a CA key. CA keys are
+     regular SSH keys. This certificate style avoids the attack surface
+     of X.509 certificates and is very easy to deploy.
+     
+     Certified host keys allow automatic acceptance of new host keys
+     when a CA certificate is marked as trusted in ~/.ssh/known_hosts.
+     see VERIFYING HOST KEYS in ssh(1) for details.
+     
+     Certified user keys allow authentication of users when the signing
+     CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS
+     FILE FORMAT" in sshd(8) for details.
+     
+     Certificates are minted using ssh-keygen(1), documentation is in
+     the "CERTIFICATES" section of that manpage.
+     
+     Documentation on the format of certificates is in the file
+     PROTOCOL.certkeys
+     
+     feedback and ok markus@
+   - djm@cvs.openbsd.org 2010/02/26 20:33:21
+     [Makefile regress/cert-hostkey.sh regress/cert-userkey.sh]
+     regression tests for certified keys
+
+20100224
+ - (djm) [pkcs11.h ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
+   [ssh-pkcs11.h] Add $OpenBSD$ RCS idents so we can sync portable
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/02/11 20:37:47
+     [pathnames.h]
+     correct comment
+   - dtucker@cvs.openbsd.org 2009/11/09 04:20:04
+     [regress/Makefile]
+     add regression test for ssh-keygen pubkey conversions
+   - dtucker@cvs.openbsd.org 2010/01/11 02:53:44
+     [regress/forwarding.sh]
+     regress test for stdio forwarding
+   - djm@cvs.openbsd.org 2010/02/09 04:57:36
+     [regress/addrmatch.sh]
+     clean up droppings
+   - djm@cvs.openbsd.org 2010/02/09 06:29:02
+     [regress/Makefile]
+     turn on all the malloc(3) checking options when running regression
+     tests. this has caught a few bugs for me in the past; ok dtucker@
+   - djm@cvs.openbsd.org 2010/02/24 06:21:56
+     [regress/test-exec.sh]
+     wait for sshd to fully stop in cleanup() function; avoids races in tests
+     that do multiple start_sshd/cleanup cycles; "I hate pidfiles" deraadt@
+   - markus@cvs.openbsd.org 2010/02/08 10:52:47
+     [regress/agent-pkcs11.sh]
+     test for PKCS#11 support (currently disabled)
+ - (djm) [Makefile.in ssh-pkcs11-helper.8] Add manpage for PKCS#11 helper
+ - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
+   [contrib/suse/openssh.spec] Add PKCS#11 helper binary and manpage
+
+20100212
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/02/02 22:49:34
+     [bufaux.c]
+     make buffer_get_string_ret() really non-fatal in all cases (it was
+     using buffer_get_int(), which could fatal() on buffer empty);
+     ok markus dtucker
+   - markus@cvs.openbsd.org 2010/02/08 10:50:20
+     [pathnames.h readconf.c readconf.h scp.1 sftp.1 ssh-add.1 ssh-add.c]
+     [ssh-agent.c ssh-keygen.1 ssh-keygen.c ssh.1 ssh.c ssh_config.5]
+     replace our obsolete smartcard code with PKCS#11.
+        ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20.pdf
+     ssh(1) and ssh-keygen(1) use dlopen(3) directly to talk to a PKCS#11
+     provider (shared library) while ssh-agent(1) delegates PKCS#11 to
+     a forked a ssh-pkcs11-helper process.
+     PKCS#11 is currently a compile time option.
+     feedback and ok djm@; inspired by patches from Alon Bar-Lev
+   - jmc@cvs.openbsd.org 2010/02/08 22:03:05
+     [ssh-add.1 ssh-keygen.1 ssh.1 ssh.c]
+     tweak previous; ok markus
+   - djm@cvs.openbsd.org 2010/02/09 00:50:36
+     [ssh-agent.c]
+     fallout from PKCS#11: unbreak -D
+   - djm@cvs.openbsd.org 2010/02/09 00:50:59
+     [ssh-keygen.c]
+     fix -Wall
+   - djm@cvs.openbsd.org 2010/02/09 03:56:28
+     [buffer.c buffer.h]
+     constify the arguments to buffer_len, buffer_ptr and buffer_dump
+   - djm@cvs.openbsd.org 2010/02/09 06:18:46
+     [auth.c]
+     unbreak ChrootDirectory+internal-sftp by skipping check for executable
+     shell when chrooting; reported by danh AT wzrd.com; ok dtucker@
+   - markus@cvs.openbsd.org 2010/02/10 23:20:38
+     [ssh-add.1 ssh-keygen.1 ssh.1 ssh_config.5]
+     pkcs#11 is no longer optional; improve wording; ok jmc@
+   - jmc@cvs.openbsd.org 2010/02/11 13:23:29
+     [ssh.1]
+     libarary -> library;
+ - (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c]
+   [scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java]
+   Remove obsolete smartcard support
+ - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
+   Make it compile on OSX
+ - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
+   Use ssh_get_progname to fill __progname
+ - (djm) [configure.ac] Enable PKCS#11 support only when we find a working
+   dlopen()
+
+20100210
+ - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
+   getseuserbyname; patch from calebcase AT gmail.com via
+   cjwatson AT debian.org
+
+20100202
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/01/30 21:08:33
+     [sshd.8]
+     debug output goes to stderr, not "the system log"; ok markus dtucker
+   - djm@cvs.openbsd.org 2010/01/30 21:12:08
+     [channels.c]
+     fake local addr:port when stdio fowarding as some servers (Tectia at
+     least) validate that they are well-formed;
+     reported by imorgan AT nas.nasa.gov
+     ok dtucker
+
+20100130
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/01/28 00:21:18
+     [clientloop.c]
+     downgrade an error() to a debug() - this particular case can be hit in
+     normal operation for certain sequences of mux slave vs session closure
+     and is harmless
+   - djm@cvs.openbsd.org 2010/01/29 00:20:41
+     [sshd.c]
+     set FD_CLOEXEC on sock_in/sock_out; bz#1706 from jchadima AT redhat.com
+     ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/29 20:16:17
+     [mux.c]
+     kill correct channel (was killing already-dead mux channel, not
+     its session channel)
+   - djm@cvs.openbsd.org 2010/01/30 02:54:53
+     [mux.c]
+     don't mark channel as read failed if it is already closing; suppresses
+     harmless error messages when connecting to SSH.COM Tectia server
+     report by imorgan AT nas.nasa.gov
+
+20100129
+ - (dtucker) [openbsd-compat/openssl-compat.c] Bug #1707: Call OPENSSL_config()
+   after registering the hardware engines, which causes the openssl.cnf file to
+   be processed.  See OpenSSL's man page for OPENSSL_config(3) for details.
+   Patch from Solomon Peachy, ok djm@.
+
+20100128
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/01/26 02:15:20
+     [mux.c]
+     -Wuninitialized and remove a // comment; from portable
+     (Id sync only)
+   - djm@cvs.openbsd.org 2010/01/27 13:26:17
+     [mux.c]
+     fix bug introduced in mux rewrite:
+     
+     In a mux master, when a socket to a mux slave closes before its server
+     session (as may occur when the slave has been signalled), gracefully
+     close the server session rather than deleting its channel immediately.
+     A server may have more messages on that channel to send (e.g. an exit
+     message) that will fatal() the client if they are sent to a channel that
+     has been prematurely deleted.
+     
+     spotted by imorgan AT nas.nasa.gov
+   - djm@cvs.openbsd.org 2010/01/27 19:21:39
+     [sftp.c]
+     add missing "p" flag to getopt optstring;
+     bz#1704 from imorgan AT nas.nasa.gov
+
+20100126
+ - (djm) OpenBSD CVS Sync
+   - tedu@cvs.openbsd.org 2010/01/17 21:49:09
+     [ssh-agent.1]
+     Correct and clarify ssh-add's password asking behavior.
+     Improved text dtucker and ok jmc
+   - dtucker@cvs.openbsd.org 2010/01/18 01:50:27
+     [roaming_client.c]
+     s/long long unsigned/unsigned long long/, from tim via portable
+     (Id sync only, change already in portable)
+   - djm@cvs.openbsd.org 2010/01/26 01:28:35
+     [channels.c channels.h clientloop.c clientloop.h mux.c nchan.c ssh.c]
+     rewrite ssh(1) multiplexing code to a more sensible protocol.
+     
+     The new multiplexing code uses channels for the listener and
+     accepted control sockets to make the mux master non-blocking, so
+     no stalls when processing messages from a slave.
+     
+     avoid use of fatal() in mux master protocol parsing so an errant slave
+     process cannot take down a running master.
+     
+     implement requesting of port-forwards over multiplexed sessions. Any
+     port forwards requested by the slave are added to those the master has
+     established.
+     
+     add support for stdio forwarding ("ssh -W host:port ...") in mux slaves.
+     
+     document master/slave mux protocol so that other tools can use it to
+     control a running ssh(1). Note: there are no guarantees that this
+     protocol won't be incompatibly changed (though it is versioned).
+     
+     feedback Salvador Fandino, dtucker@
+     channel changes ok markus@
+
+20100122
+ - (tim) [configure.ac] Due to constraints in Windows Sockets in terms of
+   socket inheritance, reduce the default SO_RCVBUF/SO_SNDBUF buffer size
+   in Cygwin to 65535. Patch from Corinna Vinschen.
+
+20100117
+ - (tim) [configure.ac] OpenServer 5 needs BROKEN_GETADDRINFO too.
+ - (tim) [configure.ac] On SVR5 systems, use the C99-conforming functions
+   snprintf() and vsnprintf() named _xsnprintf() and _xvsnprintf().
+
+20100116
+ - (dtucker) [openbsd-compat/pwcache.c] Pull in includes.h and thus defines.h
+   so we correctly detect whether or not we have a native user_from_uid.
+ - (dtucker) [openbsd-compat/openbsd-compat.h] Prototypes for user_from_uid
+   and group_from_gid.
+ - (dtucker) [openbsd-compat/openbsd-compat.h] Fix prototypes, spotted by
+   Tim.
+ - (dtucker) OpenBSD CVS Sync
+   - markus@cvs.openbsd.org 2010/01/15 09:24:23
+     [sftp-common.c]
+     unused
+ - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
+   variable warnings.
+ - (dtucker) [openbsd-compat/openbsd-compat.h] Typo.
+ - (tim) [regress/portnum.sh] Shell portability fix.
+ - (tim) [configure.ac] Define BROKEN_GETADDRINFO on SVR5 systems. The native
+   getaddrinfo() is too old and limited for addr_pton() in addrmatch.c.
+ - (tim) [roaming_client.c] Use of  is not really portable so we
+   use "openbsd-compat/sys-queue.h". s/long long unsigned/unsigned long long/
+   to keep USL compilers happy.
+
+20100115
+ - (dtucker) OpenBSD CVS Sync
+   - jmc@cvs.openbsd.org 2010/01/13 12:48:34
+     [sftp.1 sftp.c]
+     sftp.1: put ls -h in the right place
+     sftp.c: as above, plus add -p to get/put, and shorten their arg names
+     to keep the help usage nicely aligned
+     ok djm
+   - djm@cvs.openbsd.org 2010/01/13 23:47:26
+     [auth.c]
+     when using ChrootDirectory, make sure we test for the existence of the
+     user's shell inside the chroot; bz #1679, patch from alex AT rtfs.hu;
+     ok dtucker
+   - dtucker@cvs.openbsd.org 2010/01/14 23:41:49
+     [sftp-common.c]
+     use user_from{uid,gid} to lookup up ids since it keeps a small cache.
+     ok djm
+   - guenther@cvs.openbsd.org 2010/01/15 00:05:22
+     [sftp.c]
+     Reset SIGTERM to SIG_DFL before executing ssh, so that even if sftp
+     inherited SIGTERM as ignored it will still be able to kill the ssh it
+     starts.
+     ok dtucker@
+ - (dtucker) [openbsd-compat/pwcache.c] Pull in pwcache.c from OpenBSD (no
+   changes yet but there will be some to come).
+ - (dtucker) [configure.ac openbsd-compat/{Makefile.in,pwcache.c} Portability
+   for pwcache.  Also, added caching of negative hits.
+
+20100114
+ - (djm) [platform.h] Add missing prototype for
+   platform_krb5_get_principal_name
+
+20100113
+ - (dtucker) [monitor_fdpass.c] Wrap poll.h include in ifdefs.
+ - (dtucker) [openbsd-compat/readpassphrase.c] Resync against OpenBSD's r1.18:
+   missing restore of SIGTTOU and some whitespace.
+ - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.21.
+ - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.22.
+   Fixes bz #1590, where sometimes you could not interrupt a connection while
+   ssh was prompting for a passphrase or password.
+ - (dtucker) OpenBSD CVS Sync
+   - dtucker@cvs.openbsd.org 2010/01/13 00:19:04
+     [sshconnect.c auth.c]
+     Fix a couple of typos/mispellings in comments
+   - dtucker@cvs.openbsd.org 2010/01/13 01:10:56
+     [key.c]
+     Ignore and log any Protocol 1 keys where the claimed size is not equal to
+     the actual size.  Noted by Derek Martin, ok djm@
+   - dtucker@cvs.openbsd.org 2010/01/13 01:20:20
+     [canohost.c ssh-keysign.c sshconnect2.c]
+     Make HostBased authentication work with a ProxyCommand.  bz #1569, patch
+     from imorgan at nas nasa gov, ok djm@
+   - djm@cvs.openbsd.org 2010/01/13 01:40:16
+     [sftp.c sftp-server.c sftp.1 sftp-common.c sftp-common.h]
+     support '-h' (human-readable units) for sftp's ls command, just like
+     ls(1); ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/13 03:48:13
+     [servconf.c servconf.h sshd.c]
+     avoid run-time failures when specifying hostkeys via a relative
+     path by prepending the cwd in these cases; bz#1290; ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/13 04:10:50
+     [sftp.c]
+     don't append a space after inserting a completion of a directory (i.e.
+     a path ending in '/') for a slightly better user experience; ok dtucker@
+ - (dtucker) [sftp-common.c] Wrap include of util.h in an ifdef.
+ - (tim) [defines.h] openbsd-compat/readpassphrase.c now needs _NSIG. 
+   feedback and ok dtucker@
+
+20100112
+ - (dtucker) OpenBSD CVS Sync
+   - dtucker@cvs.openbsd.org 2010/01/11 01:39:46
+     [ssh_config channels.c ssh.1 channels.h ssh.c]
+     Add a 'netcat mode' (ssh -W).  This connects stdio on the client to a
+     single port forward on the server.  This allows, for example, using ssh as
+     a ProxyCommand to route connections via intermediate servers.
+     bz #1618, man page help from jmc@, ok markus@
+   - dtucker@cvs.openbsd.org 2010/01/11 04:46:45
+     [authfile.c sshconnect2.c]
+     Do not prompt for a passphrase if we fail to open a keyfile, and log the
+     reason the open failed to debug.
+     bz #1693, found by tj AT castaglia org, ok djm@
+   - djm@cvs.openbsd.org 2010/01/11 10:51:07
+     [ssh-keygen.c]
+     when converting keys, truncate key comments at 72 chars as per RFC4716;
+     bz#1630 reported by tj AT castaglia.org; ok markus@
+   - dtucker@cvs.openbsd.org 2010/01/12 00:16:47
+     [authfile.c]
+     Fix bug introduced in r1.78 (incorrect brace location) that broke key auth.
+     Patch from joachim joachimschipper nl.
+   - djm@cvs.openbsd.org 2010/01/12 00:58:25
+     [monitor_fdpass.c]
+     avoid spinning when fd passing on nonblocking sockets by calling poll()
+     in the EINTR/EAGAIN path, much like we do in atomicio; ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/12 00:59:29
+     [roaming_common.c]
+     delete with extreme prejudice a debug() that fired with every keypress;
+     ok dtucker deraadt
+   - dtucker@cvs.openbsd.org 2010/01/12 01:31:05
+     [session.c]
+     Do not allow logins if /etc/nologin exists but is not readable by the user
+     logging in.  Noted by Jan.Pechanec at Sun, ok djm@ deraadt@
+   - djm@cvs.openbsd.org 2010/01/12 01:36:08
+     [buffer.h bufaux.c]
+     add a buffer_get_string_ptr_ret() that does the same as
+     buffer_get_string_ptr() but does not fatal() on error; ok dtucker@
+   - dtucker@cvs.openbsd.org 2010/01/12 08:33:17
+     [session.c]
+     Add explicit stat so we reliably detect nologin with bad perms.
+     ok djm markus
+
+20100110
+ - (dtucker) [configure.ac misc.c readconf.c servconf.c ssh-keyscan.c]
+   Remove hacks add for RoutingDomain in preparation for its removal.
+ - (dtucker) OpenBSD CVS Sync
+   - dtucker@cvs.openbsd.org 2010/01/09 23:04:13
+     [channels.c ssh.1 servconf.c sshd_config.5 sshd.c channels.h servconf.h
+     ssh-keyscan.1 ssh-keyscan.c readconf.c sshconnect.c misc.c ssh.c
+     readconf.h scp.1 sftp.1 ssh_config.5 misc.h]
+     Remove RoutingDomain from ssh since it's now not needed.  It can be
+     replaced with "route exec" or "nc -V" as a proxycommand.  "route exec"
+     also ensures that trafic such as DNS lookups stays withing the specified
+     routingdomain.  For example (from reyk):
+     # route -T 2 exec /usr/sbin/sshd
+     or inherited from the parent process
+     $ route -T 2 exec sh
+     $ ssh 10.1.2.3
+     ok deraadt@ markus@ stevesk@ reyk@
+   - dtucker@cvs.openbsd.org 2010/01/10 03:51:17
+     [servconf.c]
+     Add ChrootDirectory to sshd.c test-mode output
+   - dtucker@cvs.openbsd.org 2010/01/10 07:15:56
+     [auth.c]
+     Output a debug if we can't open an existing keyfile.  bz#1694, ok djm@
+
+20100109
+ - (dtucker) Wrap use of IPPROTO_IPV6 in an ifdef for platforms that don't
+   have it.
+ - (dtucker) [defines.h] define PRIu64 for platforms that don't have it.
+ - (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef.
+ - (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
+   when using utmpx.  Patch from Ed Schouten.
+ - (dtucker) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2010/01/09 00:20:26
+     [sftp-server.c sftp-server.8]
+     add a 'read-only' mode to sftp-server(8) that disables open in write mode
+     and all other fs-modifying protocol methods. bz#430 ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/09 00:57:10
+     [PROTOCOL]
+     tweak language
+   - jmc@cvs.openbsd.org 2010/01/09 03:36:00
+     [sftp-server.8]
+     bad place to forget a comma...
+   - djm@cvs.openbsd.org 2010/01/09 05:04:24
+     [mux.c sshpty.h clientloop.c sshtty.c]
+     quell tc[gs]etattr warnings when forcing a tty (ssh -tt), since we
+     usually don't actually have a tty to read/set; bz#1686 ok dtucker@
+   - dtucker@cvs.openbsd.org 2010/01/09 05:17:00
+     [roaming_client.c]
+     Remove a PRIu64 format string that snuck in with roaming.  ok djm@
+   - dtucker@cvs.openbsd.org 2010/01/09 11:13:02
+     [sftp.c]
+     Prevent sftp from derefing a null pointer when given a "-" without a
+     command.  Also, allow whitespace to follow a "-".  bz#1691, path from
+     Colin Watson via Debian.  ok djm@ deraadt@
+   - dtucker@cvs.openbsd.org 2010/01/09 11:17:56
+     [sshd.c]
+     Afer sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs
+     itself.  Prevents two HUPs in quick succession from resulting in sshd
+     dying.  bz#1692, patch from Colin Watson via Ubuntu.
+ - (dtucker) [defines.h] Remove now-undeeded PRIu64 define.
+
+20100108
+ - (dtucker) OpenBSD CVS Sync
+   - andreas@cvs.openbsd.org 2009/10/24 11:11:58
+     [roaming.h]
+     Declarations needed for upcoming changes.
+     ok markus@
+   - andreas@cvs.openbsd.org 2009/10/24 11:13:54
+     [sshconnect2.c kex.h kex.c]
+     Let the client detect if the server supports roaming by looking
+     for the resume@appgate.com kex algorithm.
+     ok markus@
+   - andreas@cvs.openbsd.org 2009/10/24 11:15:29
+     [clientloop.c]
+     client_loop() must detect if the session has been suspended and resumed,
+     and take appropriate action in that case.
+     From Martin Forssen, maf at appgate dot com
+   - andreas@cvs.openbsd.org 2009/10/24 11:19:17
+     [ssh2.h]
+     Define the KEX messages used when resuming a suspended connection.
+     ok markus@
+   - andreas@cvs.openbsd.org 2009/10/24 11:22:37
+     [roaming_common.c]
+     Do the actual suspend/resume in the client. This won't be useful until
+     the server side supports roaming.
+     Most code from Martin Forssen, maf at appgate dot com. Some changes by
+     me and markus@
+     ok markus@
+   - andreas@cvs.openbsd.org 2009/10/24 11:23:42
+     [ssh.c]
+     Request roaming to be enabled if UseRoaming is true and the server
+     supports it.
+     ok markus@
+   - reyk@cvs.openbsd.org 2009/10/28 16:38:18
+     [ssh_config.5 sshd.c misc.h ssh-keyscan.1 readconf.h sshconnect.c
+     channels.c channels.h servconf.h servconf.c ssh.1 ssh-keyscan.c scp.1
+     sftp.1 sshd_config.5 readconf.c ssh.c misc.c]
+     Allow to set the rdomain in ssh/sftp/scp/sshd and ssh-keyscan.
+     ok markus@
+   - jmc@cvs.openbsd.org 2009/10/28 21:45:08
+     [sshd_config.5 sftp.1]
+     tweak previous;
+   - djm@cvs.openbsd.org 2009/11/10 02:56:22
+     [ssh_config.5]
+     explain the constraints on LocalCommand some more so people don't
+     try to abuse it.
+   - djm@cvs.openbsd.org 2009/11/10 02:58:56
+     [sshd_config.5]
+     clarify that StrictModes does not apply to ChrootDirectory. Permissions
+     and ownership are always checked when chrooting. bz#1532
+   - dtucker@cvs.openbsd.org 2009/11/10 04:30:45
+     [sshconnect2.c channels.c sshconnect.c]
+     Set close-on-exec on various descriptors so they don't get leaked to
+     child processes.  bz #1643, patch from jchadima at redhat, ok deraadt.
+   - markus@cvs.openbsd.org 2009/11/11 21:37:03
+     [channels.c channels.h]
+     fix race condition in x11/agent channel allocation: don't read after
+     the end of the select read/write fdset and make sure a reused FD
+     is not touched before the pre-handlers are called.
+     with and ok djm@
+   - djm@cvs.openbsd.org 2009/11/17 05:31:44
+     [clientloop.c]
+     fix incorrect exit status when multiplexing and channel ID 0 is recycled
+     bz#1570 reported by peter.oliver AT eon-is.co.uk; ok dtucker
+   - djm@cvs.openbsd.org 2009/11/19 23:39:50
+     [session.c]
+     bz#1606: error when an attempt is made to connect to a server
+     with ForceCommand=internal-sftp with a shell session (i.e. not a
+     subsystem session). Avoids stuck client when attempting to ssh to such a
+     service. ok dtucker@
+   - dtucker@cvs.openbsd.org 2009/11/20 00:15:41
+     [session.c]
+     Warn but do not fail if stat()ing the subsystem binary fails.  This helps
+     with chrootdirectory+forcecommand=sftp-server and restricted shells.
+     bz #1599, ok djm.
+   - djm@cvs.openbsd.org 2009/11/20 00:54:01
+     [sftp.c]
+     bz#1588 change "Connecting to host..." message to "Connected to host."
+     and delay it until after the sftp protocol connection has been established.
+     Avoids confusing sequence of messages when the underlying ssh connection
+     experiences problems. ok dtucker@
+   - dtucker@cvs.openbsd.org 2009/11/20 00:59:36
+     [sshconnect2.c]
+     Use the HostKeyAlias when prompting for passwords.  bz#1039, ok djm@
+   - djm@cvs.openbsd.org 2009/11/20 03:24:07
+     [misc.c]
+     correct off-by-one in percent_expand(): we would fatal() when trying
+     to expand EXPAND_MAX_KEYS, allowing only EXPAND_MAX_KEYS-1 to actually
+     work.  Note that nothing in OpenSSH actually uses close to this limit at
+     present.  bz#1607 from Jan.Pechanec AT Sun.COM
+   - halex@cvs.openbsd.org 2009/11/22 13:18:00
+     [sftp.c]
+     make passing of zero-length arguments to ssh safe by
+     passing "-" "" rather than "-"
+     ok dtucker@, guenther@, djm@
+   - dtucker@cvs.openbsd.org 2009/12/06 23:41:15
+     [sshconnect2.c]
+     zap unused variable and strlen; from Steve McClellan, ok djm
+   - djm@cvs.openbsd.org 2009/12/06 23:53:45
+     [roaming_common.c]
+     use socklen_t for getsockopt optlen parameter; reported by
+     Steve.McClellan AT radisys.com, ok dtucker@
+   - dtucker@cvs.openbsd.org 2009/12/06 23:53:54
+     [sftp.c]
+     fix potential divide-by-zero in sftp's "df" output when talking to a server
+     that reports zero files on the filesystem (Unix filesystems always have at
+     least the root inode).  From Steve McClellan at radisys, ok djm@
+   - markus@cvs.openbsd.org 2009/12/11 18:16:33
+     [key.c]
+     switch from 35 to the more common value of RSA_F4 == (2**16)+1 == 65537
+     for the RSA public exponent; discussed with provos; ok djm@
+   - guenther@cvs.openbsd.org 2009/12/20 07:28:36
+     [ssh.c sftp.c scp.c]
+     When passing user-controlled options with arguments to other programs,
+     pass the option and option argument as separate argv entries and
+     not smashed into one (e.g., as -l foo and not -lfoo).  Also, always
+     pass a "--" argument to stop option parsing, so that a positional
+     argument that starts with a '-' isn't treated as an option.  This
+     fixes some error cases as well as the handling of hostnames and
+     filenames that start with a '-'.
+     Based on a diff by halex@
+     ok halex@ djm@ deraadt@
+   - djm@cvs.openbsd.org 2009/12/20 23:20:40
+     [PROTOCOL]
+     fix an incorrect magic number and typo in PROTOCOL; bz#1688
+     report and fix from ueno AT unixuser.org
+   - stevesk@cvs.openbsd.org 2009/12/25 19:40:21
+     [readconf.c servconf.c misc.h ssh-keyscan.c misc.c]
+     validate routing domain is in range 0-RT_TABLEID_MAX.
+     'Looks right' deraadt@
+   - stevesk@cvs.openbsd.org 2009/12/29 16:38:41
+     [sshd_config.5 readconf.c ssh_config.5 scp.1 servconf.c sftp.1 ssh.1]
+     Rename RDomain config option to RoutingDomain to be more clear and
+     consistent with other options.
+     NOTE: if you currently use RDomain in the ssh client or server config,
+     or ssh/sshd -o, you must update to use RoutingDomain.
+     ok markus@ djm@
+   - jmc@cvs.openbsd.org 2009/12/29 18:03:32
+     [sshd_config.5 ssh_config.5]
+     sort previous;
+   - dtucker@cvs.openbsd.org 2010/01/04 01:45:30
+     [sshconnect2.c]
+     Don't escape backslashes in the SSH2 banner.  bz#1533, patch from
+     Michal Gorny via Gentoo.
+   - djm@cvs.openbsd.org 2010/01/04 02:03:57
+     [sftp.c]
+     Implement tab-completion of commands, local and remote filenames for sftp.
+     Hacked on and off for some time by myself, mouring, Carlos Silva (via 2009
+     Google Summer of Code) and polished to a fine sheen by myself again.
+     It should deal more-or-less correctly with the ikky corner-cases presented
+     by quoted filenames, but the UI could still be slightly improved.
+     In particular, it is quite slow for remote completion on large directories.
+     bz#200; ok markus@
+   - djm@cvs.openbsd.org 2010/01/04 02:25:15
+     [sftp-server.c]
+     bz#1566 don't unnecessarily dup() in and out fds for sftp-server;
+     ok markus@
+   - dtucker@cvs.openbsd.org 2010/01/08 21:50:49
+     [sftp.c]
+     Fix two warnings: possibly used unitialized and use a nul byte instead of
+     NULL pointer.  ok djm@
+ - (dtucker) [Makefile.in added roaming_client.c roaming_serv.c] Import new
+   files for roaming and add to Makefile.
+ - (dtucker) [Makefile.in] .c files do not belong in the OBJ lines.
+ - (dtucker) [sftp.c] ifdef out the sftp completion bits for platforms that
+   don't have libedit.
+ - (dtucker) [configure.ac misc.c readconf.c servconf.c ssh-keyscan.c] Make
+   RoutingDomain an unsupported option on platforms that don't have it.
+ - (dtucker) [sftp.c] Expand ifdef for libedit to cover complete_is_remote
+   too.
+ - (dtucker) [misc.c] Move the routingdomain ifdef to allow the socket to
+   be created.
+ - (dtucker] [misc.c] Shrink the area covered by USE_ROUTINGDOMAIN more
+   to eliminate an unused variable warning.
+ - (dtucker) [roaming_serv.c] Include includes.h for u_intXX_t types.
+
+20091226
+ - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1
+   Gzip all man pages. Patch from Corinna Vinschen.
+
+20091221
+ - (dtucker) [auth-krb5.c platform.{c,h} openbsd-compat/port-aix.{c,h}]
+   Bug #1583: Use system's kerberos principal name on AIX if it's available.
+   Based on a patch from and tested by Miguel Sanders 
+
+20091208
+ - (dtucker) Bug #1470: Disable OOM-killing of the listening sshd on Linux,
+   based on a patch from Vaclav Ovsik and Colin Watson.  ok djm.
+
+20091207
+ - (dtucker) Bug #1160: use pkg-config for opensc config if it's available.
+   Tested by Martin Paljak.
+ - (dtucker) Bug #1677: add conditionals around the source for ssh-askpass.
+
+20091121
+ - (tim) [opensshd.init.in] If PidFile is set in sshd_config, use it.
+   Bug 1628. OK dtucker@
+
+20091120
+ - (djm) [ssh-rand-helper.c] Print error and usage() when passed command-
+   line arguments as none are supported. Exit when passed unrecognised
+   commandline flags. bz#1568 from gson AT araneus.fi
+
+20091118
+ - (djm) [channels.c misc.c misc.h sshd.c] add missing setsockopt() to
+   set IPV6_V6ONLY for local forwarding with GatwayPorts=yes. Unify
+   setting IPV6_V6ONLY behind a new function misc.c:sock_set_v6only()
+   bz#1648, report and fix from jan.kratochvil AT redhat.com
+ - (djm) [contrib/gnome-ssh-askpass2.c] Make askpass dialog desktop-modal.
+   bz#1645, patch from jchadima AT redhat.com
+
+20091107
+ - (dtucker) [authfile.c] Fall back to 3DES for the encryption of private
+    keys when built with OpenSSL versions that don't do AES.
+
+20091105
+ - (dtucker) [authfile.c] Add OpenSSL compat header so this still builds with
+   older versions of OpenSSL.
+
+20091024
+ - (dtucker) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2009/10/11 23:03:15
+     [hostfile.c]
+     mention the host name that we are looking for in check_host_in_hostfile()
+   - sobrado@cvs.openbsd.org 2009/10/17 12:10:39
+     [sftp-server.c]
+     sort flags.
+   - sobrado@cvs.openbsd.org 2009/10/22 12:35:53
+     [ssh.1 ssh-agent.1 ssh-add.1]
+     use the UNIX-related macros (.At and .Ux) where appropriate.
+     ok jmc@
+   - sobrado@cvs.openbsd.org 2009/10/22 15:02:12
+     [ssh-agent.1 ssh-add.1 ssh.1]
+     write UNIX-domain in a more consistent way; while here, replace a
+     few remaining ".Tn UNIX" macros with ".Ux" ones.
+     pointed out by ratchov@, thanks!
+     ok jmc@
+   - djm@cvs.openbsd.org 2009/10/22 22:26:13
+     [authfile.c]
+     switch from 3DES to AES-128 for encryption of passphrase-protected
+     SSH protocol 2 private keys; ok several
+   - djm@cvs.openbsd.org 2009/10/23 01:57:11
+     [sshconnect2.c]
+     disallow a hostile server from checking jpake auth by sending an
+     out-of-sequence success message. (doesn't affect code enabled by default)
+   - dtucker@cvs.openbsd.org 2009/10/24 00:48:34
+     [ssh-keygen.1]
+     ssh-keygen now uses AES-128 for private keys
+ - (dtucker) [mdoc2man.awk] Teach it to understand the .Ux macro.
+ - (dtucker) [session.c openbsd-compat/port-linux.{c,h}] Bug #1637: if selinux
+   is enabled set the security context to "sftpd_t" before running the
+   internal sftp server   Based on a patch from jchadima at redhat.
+
+20091011
+ - (dtucker) [configure.ac sftp-client.c] Remove the gyrations required for
+   dirent d_type and DTTOIF as we've switched OpenBSD to the more portable
+   lstat.
+ - (dtucker) OpenBSD CVS Sync
+   - markus@cvs.openbsd.org 2009/10/08 14:03:41
+     [sshd_config readconf.c ssh_config.5 servconf.c sshd_config.5]
+     disable protocol 1 by default (after a transition period of about 10 years)
+     ok deraadt
+   - jmc@cvs.openbsd.org 2009/10/08 20:42:12
+     [sshd_config.5 ssh_config.5 sshd.8 ssh.1]
+     some tweaks now that protocol 1 is not offered by default; ok markus
+   - dtucker@cvs.openbsd.org 2009/10/11 10:41:26
+     [sftp-client.c]
+     d_type isn't portable so use lstat to get dirent modes.  Suggested by and
+     "looks sane" deraadt@
+   - markus@cvs.openbsd.org 2009/10/08 18:04:27
+     [regress/test-exec.sh]
+     re-enable protocol v1 for the tests.
+
+20091007
+ - (dtucker) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2009/08/12 00:13:00
+     [sftp.c sftp.1]
+     support most of scp(1)'s commandline arguments in sftp(1), as a first
+     step towards making sftp(1) a drop-in replacement for scp(1).
+     One conflicting option (-P) has not been changed, pending further
+     discussion.
+     Patch from carlosvsilvapt@gmail.com as part of his work in the
+     Google Summer of Code
+  - jmc@cvs.openbsd.org 2009/08/12 06:31:42
+     [sftp.1]
+     sort options;
+   - djm@cvs.openbsd.org 2009/08/13 01:11:19
+     [sftp.1 sftp.c]
+     Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path",
+     add "-P port" to match scp(1). Fortunately, the -P option is only really
+     used by our regression scripts.
+     part of larger patch from carlosvsilvapt@gmail.com for his Google Summer
+     of Code work; ok deraadt markus
+   - jmc@cvs.openbsd.org 2009/08/13 13:39:54
+     [sftp.1 sftp.c]
+     sync synopsis and usage();
+   - djm@cvs.openbsd.org 2009/08/14 18:17:49
+     [sftp-client.c]
+     make the "get_handle: ..." error messages vaguely useful by allowing
+     callers to specify their own error message strings.
+   - fgsch@cvs.openbsd.org 2009/08/15 18:56:34
+     [auth.h]
+     remove unused define. markus@ ok.
+     (Id sync only, Portable still uses this.)
+   - dtucker@cvs.openbsd.org 2009/08/16 23:29:26
+     [sshd_config.5]
+     Add PubkeyAuthentication to the list allowed in a Match block (bz #1577)
+   - djm@cvs.openbsd.org 2009/08/18 18:36:21
+     [sftp-client.h sftp.1 sftp-client.c sftp.c]
+     recursive transfer support for get/put and on the commandline
+     work mostly by carlosvsilvapt@gmail.com for the Google Summer of Code
+     with some tweaks by me; "go for it" deraadt@
+  - djm@cvs.openbsd.org 2009/08/18 21:15:59
+     [sftp.1]
+     fix "get" command usage, spotted by jmc@
+   - jmc@cvs.openbsd.org 2009/08/19 04:56:03
+     [sftp.1]
+     ether -> either;
+   - dtucker@cvs.openbsd.org 2009/08/20 23:54:28
+     [mux.c]
+     subsystem_flag is defined in ssh.c so it's extern; ok djm
+   - djm@cvs.openbsd.org 2009/08/27 17:28:52
+     [sftp-server.c]
+     allow setting an explicit umask on the commandline to override whatever
+     default the user has. bz#1229; ok dtucker@ deraadt@ markus@
+   - djm@cvs.openbsd.org 2009/08/27 17:33:49
+     [ssh-keygen.c]
+     force use of correct hash function for random-art signature display
+     as it was inheriting the wrong one when bubblebabble signatures were
+     activated; bz#1611 report and patch from fwojcik+openssh AT besh.com;
+     ok markus@
+   - djm@cvs.openbsd.org 2009/08/27 17:43:00
+     [sftp-server.8]
+     allow setting an explicit umask on the commandline to override whatever
+     default the user has. bz#1229; ok dtucker@ deraadt@ markus@
+   - djm@cvs.openbsd.org 2009/08/27 17:44:52
+     [authfd.c ssh-add.c authfd.h]
+     Do not fall back to adding keys without contraints (ssh-add -c / -t ...)
+     when the agent refuses the constrained add request. This was a useful
+     migration measure back in 2002 when constraints were new, but just
+     adds risk now.
+     bz #1612, report and patch from dkg AT fifthhorseman.net; ok markus@
+   - djm@cvs.openbsd.org 2009/08/31 20:56:02
+     [sftp-server.c]
+     check correct variable for error message, spotted by martynas@
+   - djm@cvs.openbsd.org 2009/08/31 21:01:29
+     [sftp-server.8]
+     document -e and -h; prodded by jmc@
+   - djm@cvs.openbsd.org 2009/09/01 14:43:17
+     [ssh-agent.c]
+     fix a race condition in ssh-agent that could result in a wedged or
+     spinning agent: don't read off the end of the allocated fd_sets, and
+     don't issue blocking read/write on agent sockets - just fall back to
+     select() on retriable read/write errors. bz#1633 reported and tested
+     by "noodle10000 AT googlemail.com"; ok dtucker@ markus@
+   - grunk@cvs.openbsd.org 2009/10/01 11:37:33
+     [dh.c]
+     fix a cast
+     ok djm@ markus@
+   - djm@cvs.openbsd.org 2009/10/06 04:46:40
+     [session.c]
+     bz#1596: fflush(NULL) before exec() to ensure that everying (motd
+     in particular) has made it out before the streams go away.
+   - djm@cvs.openbsd.org 2008/12/07 22:17:48
+     [regress/addrmatch.sh]
+     match string "passwordauthentication" only at start of line, not anywhere
+     in sshd -T output
+   - dtucker@cvs.openbsd.org 2009/05/05 07:51:36
+     [regress/multiplex.sh]
+     Always specify ssh_config for multiplex tests: prevents breakage caused
+     by options in ~/.ssh/config.  From Dan Peterson.
+   - djm@cvs.openbsd.org 2009/08/13 00:57:17
+     [regress/Makefile]
+     regression test for port number parsing. written as part of the a2port
+     change that went into 5.2 but I forgot to commit it at the time...
+   - djm@cvs.openbsd.org 2009/08/13 01:11:55
+     [regress/sftp-batch.sh regress/sftp-badcmds.sh regress/sftp.sh
+     regress/sftp-cmds.sh regres/sftp-glob.sh]
+     date: 2009/08/13 01:11:19;  author: djm;  state: Exp;  lines: +10 -7
+     Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path",
+     add "-P port" to match scp(1). Fortunately, the -P option is only really
+     used by our regression scripts.
+     part of larger patch from carlosvsilvapt@gmail.com for his Google Summer
+     of Code work; ok deraadt markus
+   - djm@cvs.openbsd.org 2009/08/20 18:43:07
+     [regress/ssh-com-sftp.sh]
+     fix one sftp -D ... => sftp -P ... conversion that I missed; from Carlos
+     Silva for Google Summer of Code
+   - dtucker@cvs.openbsd.org 2009/10/06 23:51:49
+     [regress/ssh2putty.sh]
+     Add OpenBSD tag to make syncs easier
+ - (dtucker) [regress/portnum.sh] Import new test.
+ - (dtucker) [configure.ac sftp-client.c] DTOTIF is in fs/ffs/dir.h on at
+   least dragonflybsd.
+ - (dtucker) d_type is not mandated by POSIX, so add fallback code using
+    stat(), needed on at least cygwin.
+
+20091002
+ - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps.
+   spotted by des AT des.no
+
 20090926
  - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
          [contrib/suse/openssh.spec] Update for release

Modified: head/crypto/openssh/INSTALL
==============================================================================
--- head/crypto/openssh/INSTALL	Tue Mar  9 19:02:02 2010	(r204916)
+++ head/crypto/openssh/INSTALL	Tue Mar  9 19:16:43 2010	(r204917)
@@ -208,10 +208,6 @@ are installed.
 --with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
 real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
 
---with-opensc=DIR
---with-sectok=DIR allows for OpenSC or sectok smartcard libraries to
-be used with OpenSSH.  See 'README.smartcard' for more details.
-
 If you need to pass special options to the compiler or linker, you
 can specify these as environment variables before running ./configure.
 For example:
@@ -266,4 +262,4 @@ Please refer to the "reporting bugs" sec
 http://www.openssh.com/

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:19:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 25523106566B;
	Tue,  9 Mar 2010 19:19:08 +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 143088FC1E;
	Tue,  9 Mar 2010 19:19: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 o29JJ7Vi005663;
	Tue, 9 Mar 2010 19:19:07 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29JJ7jj005661;
	Tue, 9 Mar 2010 19:19:07 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003091919.o29JJ7jj005661@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 9 Mar 2010 19:19:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204918 - head/share/man/man4
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:19:08 -0000

Author: jkim
Date: Tue Mar  9 19:19:07 2010
New Revision: 204918
URL: http://svn.freebsd.org/changeset/base/204918

Log:
  Document a new sysctl variable and a loader tunable.

Modified:
  head/share/man/man4/acpi.4

Modified: head/share/man/man4/acpi.4
==============================================================================
--- head/share/man/man4/acpi.4	Tue Mar  9 19:16:43 2010	(r204917)
+++ head/share/man/man4/acpi.4	Tue Mar  9 19:19:07 2010	(r204918)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 8, 2009
+.Dd March 9, 2010
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -62,6 +62,10 @@ used to modify or monitor
 .Nm
 behavior.
 .Bl -tag -width indent
+.It Va debug.acpi.enable_debug_objects
+Enable dumping Debug objects without
+.Cd "options ACPI_DEBUG" .
+Default is 0, ignore Debug objects.
 .It Va hw.acpi.acline
 AC line state (1 means online, 0 means on battery power).
 .It Va hw.acpi.cpu.cx_usage
@@ -197,6 +201,9 @@ Enables loading of a custom ACPI DSDT.
 Name of the DSDT table to load, if loading is enabled.
 .It Va debug.acpi.disabled
 Selectively disables portions of ACPI for debugging purposes.
+.It Va debug.acpi.interpreter_slack
+Enable less strict ACPI implementations.
+Default is 1, ignore common BIOS mistakes.
 .It Va debug.acpi.max_threads
 Specify the number of task threads that are started on boot.
 Limiting this to 1 may help work around various BIOSes that cannot

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:31:09 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19DD51065670;
	Tue,  9 Mar 2010 19:31:09 +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 080468FC12;
	Tue,  9 Mar 2010 19:31: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 o29JV87l008358;
	Tue, 9 Mar 2010 19:31:08 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29JV83g008354;
	Tue, 9 Mar 2010 19:31:08 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003091931.o29JV83g008354@svn.freebsd.org>
From: Maxim Sobolev 
Date: Tue, 9 Mar 2010 19:31: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: r204919 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:31:09 -0000

Author: sobomax
Date: Tue Mar  9 19:31:08 2010
New Revision: 204919
URL: http://svn.freebsd.org/changeset/base/204919

Log:
  o bdeficize expand_number_int() function;
  
  o revert most of the recent changes (int -> int64_t conversion) by using
  this functon for parsing all options.

Modified:
  head/sbin/newfs/mkfs.c
  head/sbin/newfs/newfs.c
  head/sbin/newfs/newfs.h

Modified: head/sbin/newfs/mkfs.c
==============================================================================
--- head/sbin/newfs/mkfs.c	Tue Mar  9 19:19:07 2010	(r204918)
+++ head/sbin/newfs/mkfs.c	Tue Mar  9 19:31:08 2010	(r204919)
@@ -191,8 +191,8 @@ restart:
 		exit(17);
 	}
 	if (sblock.fs_fsize < sectorsize) {
-		printf("increasing fragment size from %d to sector size (%jd)\n",
-		    sblock.fs_fsize, (intmax_t)sectorsize);
+		printf("increasing fragment size from %d to sector size (%d)\n",
+		    sblock.fs_fsize, sectorsize);
 		sblock.fs_fsize = sectorsize;
 	}
 	if (sblock.fs_bsize > MAXBSIZE) {
@@ -337,8 +337,8 @@ restart:
 	} else if (density < minfragsperinode * fsize) {
 		origdensity = density;
 		density = minfragsperinode * fsize;
-		fprintf(stderr, "density increased from %d to %jd\n",
-		    origdensity, (intmax_t)density);
+		fprintf(stderr, "density increased from %d to %d\n",
+		    origdensity, density);
 	}
 	origdensity = density;
 	for (;;) {
@@ -346,9 +346,8 @@ restart:
 		if (fragsperinode < minfragsperinode) {
 			bsize <<= 1;
 			fsize <<= 1;
-			printf("Block size too small for a file system %s %jd\n",
-			    "of this size. Increasing blocksize to",
-			    (intmax_t)bsize);
+			printf("Block size too small for a file system %s %d\n",
+			     "of this size. Increasing blocksize to", bsize);
 			goto restart;
 		}
 		minfpg = fragsperinode * INOPB(&sblock);
@@ -372,8 +371,7 @@ restart:
 		density -= sblock.fs_fsize;
 	}
 	if (density != origdensity)
-		printf("density reduced from %d to %jd\n", origdensity,
-		    (intmax_t)density);
+		printf("density reduced from %d to %d\n", origdensity, density);
 	/*
 	 * Start packing more blocks into the cylinder group until
 	 * it cannot grow any larger, the number of cylinder groups

Modified: head/sbin/newfs/newfs.c
==============================================================================
--- head/sbin/newfs/newfs.c	Tue Mar  9 19:19:07 2010	(r204918)
+++ head/sbin/newfs/newfs.c	Tue Mar  9 19:31:08 2010	(r204919)
@@ -94,17 +94,17 @@ int	nflag;			/* do not create .snap dire
 intmax_t fssize;		/* file system size */
 int	sectorsize;		/* bytes/sector */
 int	realsectorsize;		/* bytes/sector in hardware */
-int64_t	fsize = 0;		/* fragment size */
-int64_t	bsize = 0;		/* block size */
-int64_t	maxbsize = 0;		/* maximum clustering */
-int64_t	maxblkspercg = MAXBLKSPERCG; /* maximum blocks per cylinder group */
+int	fsize = 0;		/* fragment size */
+int	bsize = 0;		/* block size */
+int	maxbsize = 0;		/* maximum clustering */
+int	maxblkspercg = MAXBLKSPERCG; /* maximum blocks per cylinder group */
 int	minfree = MINFREE;	/* free space threshold */
 int	opt = DEFAULTOPT;	/* optimization preference (space or time) */
-int64_t	density;		/* number of bytes per inode */
-int64_t	maxcontig = 0;		/* max contiguous blocks to allocate */
-int64_t	maxbpg;			/* maximum blocks per file in a cyl group */
-int64_t	avgfilesize = AVFILESIZ;/* expected average file size */
-int64_t	avgfilesperdir = AFPDIR;/* expected number of files per directory */
+int	density;		/* number of bytes per inode */
+int	maxcontig = 0;		/* max contiguous blocks to allocate */
+int	maxbpg;			/* maximum blocks per file in a cyl group */
+int	avgfilesize = AVFILESIZ;/* expected average file size */
+int	avgfilesperdir = AFPDIR;/* expected number of files per directory */
 u_char	*volumelabel = NULL;	/* volume label for filesystem */
 struct uufsd disk;		/* libufs disk structure */
 
@@ -186,13 +186,13 @@ main(int argc, char *argv[])
 			Xflag++;
 			break;
 		case 'a':
-			rval = expand_number(optarg, &maxcontig);
+			rval = expand_number_int(optarg, &maxcontig);
 			if (rval < 0 || maxcontig <= 0)
 				errx(1, "%s: bad maximum contiguous blocks",
 				    optarg);
 			break;
 		case 'b':
-			rval = expand_number(optarg, &bsize);
+			rval = expand_number_int(optarg, &bsize);
 			if (rval < 0)
 				 errx(1, "%s: bad block size",
                                     optarg);
@@ -204,39 +204,39 @@ main(int argc, char *argv[])
 				    optarg, MAXBSIZE);
 			break;
 		case 'c':
-			rval = expand_number(optarg, &maxblkspercg);
+			rval = expand_number_int(optarg, &maxblkspercg);
 			if (rval < 0 || maxblkspercg <= 0)
 				errx(1, "%s: bad blocks per cylinder group",
 				    optarg);
 			break;
 		case 'd':
-			rval = expand_number(optarg, &maxbsize);
+			rval = expand_number_int(optarg, &maxbsize);
 			if (rval < 0 || maxbsize < MINBSIZE)
 				errx(1, "%s: bad extent block size", optarg);
 			break;
 		case 'e':
-			rval = expand_number(optarg, &maxbpg);
+			rval = expand_number_int(optarg, &maxbpg);
 			if (rval < 0 || maxbpg <= 0)
 			  errx(1, "%s: bad blocks per file in a cylinder group",
 				    optarg);
 			break;
 		case 'f':
-			rval = expand_number(optarg, &fsize);
+			rval = expand_number_int(optarg, &fsize);
 			if (rval < 0 || fsize <= 0)
 				errx(1, "%s: bad fragment size", optarg);
 			break;
 		case 'g':
-			rval = expand_number(optarg, &avgfilesize);
+			rval = expand_number_int(optarg, &avgfilesize);
 			if (rval < 0 || avgfilesize <= 0)
 				errx(1, "%s: bad average file size", optarg);
 			break;
 		case 'h':
-			rval = expand_number(optarg, &avgfilesperdir);
+			rval = expand_number_int(optarg, &avgfilesperdir);
 			if (rval < 0 || avgfilesperdir <= 0)
 			       errx(1, "%s: bad average files per dir", optarg);
 			break;
 		case 'i':
-			rval = expand_number(optarg, &density);
+			rval = expand_number_int(optarg, &density);
 			if (rval < 0 || density <= 0)
 				errx(1, "%s: bad bytes per inode", optarg);
 			break;
@@ -505,9 +505,9 @@ expand_number_int(const char *buf, int *
 	int rval;
 
 	rval = expand_number(buf, &num64);
-	if (rval != 0)
+	if (rval < 0)
 		return (rval);
-	if (num64 > INT_MAX) {
+	if (num64 > INT_MAX || num64 < INT_MIN) {
 		errno = ERANGE;
 		return (-1);
 	}

Modified: head/sbin/newfs/newfs.h
==============================================================================
--- head/sbin/newfs/newfs.h	Tue Mar  9 19:19:07 2010	(r204918)
+++ head/sbin/newfs/newfs.h	Tue Mar  9 19:31:08 2010	(r204919)
@@ -88,17 +88,17 @@ extern int	nflag;		/* do not create .sna
 extern intmax_t	fssize;		/* file system size */
 extern int	sectorsize;	/* bytes/sector */
 extern int	realsectorsize;	/* bytes/sector in hardware*/
-extern int64_t	fsize;		/* fragment size */
-extern int64_t	bsize;		/* block size */
-extern int64_t	maxbsize;	/* maximum clustering */
-extern int64_t	maxblkspercg;	/* maximum blocks per cylinder group */
+extern int	fsize;		/* fragment size */
+extern int	bsize;		/* block size */
+extern int	maxbsize;	/* maximum clustering */
+extern int	maxblkspercg;	/* maximum blocks per cylinder group */
 extern int	minfree;	/* free space threshold */
 extern int	opt;		/* optimization preference (space or time) */
-extern int64_t	density;	/* number of bytes per inode */
-extern int64_t	maxcontig;	/* max contiguous blocks to allocate */
-extern int64_t	maxbpg;		/* maximum blocks per file in a cyl group */
-extern int64_t	avgfilesize;	/* expected average file size */
-extern int64_t	avgfilesperdir;	/* expected number of files per directory */
+extern int	density;	/* number of bytes per inode */
+extern int	maxcontig;	/* max contiguous blocks to allocate */
+extern int	maxbpg;		/* maximum blocks per file in a cyl group */
+extern int	avgfilesize;	/* expected average file size */
+extern int	avgfilesperdir;	/* expected number of files per directory */
 extern u_char	*volumelabel;	/* volume label for filesystem */
 extern struct uufsd disk;	/* libufs disk structure */
 

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:33:42 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EB219106564A;
	Tue,  9 Mar 2010 19:33:42 +0000 (UTC)
	(envelope-from ache@nagual.pp.ru)
Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D1F58FC0C;
	Tue,  9 Mar 2010 19:33:41 +0000 (UTC)
Received: from nagual.pp.ru (ache@localhost [127.0.0.1])
	by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o29JXeGH014771;
	Tue, 9 Mar 2010 22:33:40 +0300 (MSK)
	(envelope-from ache@nagual.pp.ru)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru;
	s=default; t=1268163220;
	bh=xPnTC+8hdHiHny9r5PKuZCXTNkNM3G9hb1owDhfu2ow=; l=878;
	h=Date:From:To:Subject:Message-ID:References:MIME-Version:
	Content-Type:In-Reply-To;
	b=FohUk0bcjjGElPYSbvrYzAdPg41cGY6JVxZOMLz8NA03Xed3kLUsCRsASORUUIA/w
	S/IYSktwu225ajdNXT28pRYN6/bUYnIyJmiE7+t9SsNFtWSAeWjJ/8sFQ7o19dwiem
	XhnFLjKIDaGmw9x1iv/LmGF99GpRpzfCXLQFrYyE=
Received: (from ache@localhost)
	by nagual.pp.ru (8.14.3/8.14.3/Submit) id o29JXe1T014770;
	Tue, 9 Mar 2010 22:33:40 +0300 (MSK) (envelope-from ache)
Date: Tue, 9 Mar 2010 22:33:40 +0300
From: Andrey Chernov 
To: Bruce Evans , Jaakko Heinonen ,
	src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	svn-src-head@FreeBSD.ORG
Message-ID: <20100309193339.GA14612@nagual.pp.ru>
Mail-Followup-To: Andrey Chernov ,
	Bruce Evans ,
	Jaakko Heinonen , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
References: <201003061921.o26JLv36014114@svn.freebsd.org>
	<20100307104626.GA9015@a91-153-117-195.elisa-laajakaista.fi>
	<20100308015926.O11669@delplex.bde.org>
	<20100307183139.GA50243@nagual.pp.ru>
	<20100307201027.GA51623@nagual.pp.ru>
	<20100308195123.GA10624@zim.MIT.EDU>
	<20100308202919.GA67990@nagual.pp.ru>
	<20100309175544.GA17698@zim.MIT.EDU>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100309175544.GA17698@zim.MIT.EDU>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Re: svn commit: r204803 - head/usr.bin/uniq
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:33:43 -0000

On Tue, Mar 09, 2010 at 12:55:44PM -0500, David Schultz wrote:
> Actually, a question...why doesn't it suffice to simply call
> strcoll() instead of mbstowcs() followed by wcscoll()?
> I would expect that in the absence of the -i flag, none of
> this would be necessary.  

strcoll() is only for single-byte characters locale. It means no UTF-8 
f.e. To do what you assume (without coverting to wide chars), we'll need 
fast mbscoll() function (see our join.c for its slow emulation using 
wide chars).

> At the very least, it would make
> sense to start with a strcmp(), and only fall back on the
> expensive conversion and collation if the strings don't
> compare equal.

As I notice, files feeded to uniq commonly have only few equal lines and 
much more unequal ones, so strcmp() will be additional overkill most of 
the time.

-- 
http://ache.pp.ru/

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:39:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A34E106566B;
	Tue,  9 Mar 2010 19:39: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 28C508FC0A;
	Tue,  9 Mar 2010 19: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 o29Jdr4R010337;
	Tue, 9 Mar 2010 19:39:53 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29Jdr6x010335;
	Tue, 9 Mar 2010 19:39:53 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003091939.o29Jdr6x010335@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 9 Mar 2010 19:39: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: r204920 - head/sys/contrib/dev/acpica/hardware
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:39:53 -0000

Author: jkim
Date: Tue Mar  9 19:39:52 2010
New Revision: 204920
URL: http://svn.freebsd.org/changeset/base/204920

Log:
  Since the interpreter slack mode is a tunable now, enable a local hack only
  when it is set.  Note the default behaviour does not change by this change.

Modified:
  head/sys/contrib/dev/acpica/hardware/hwsleep.c

Modified: head/sys/contrib/dev/acpica/hardware/hwsleep.c
==============================================================================
--- head/sys/contrib/dev/acpica/hardware/hwsleep.c	Tue Mar  9 19:31:08 2010	(r204919)
+++ head/sys/contrib/dev/acpica/hardware/hwsleep.c	Tue Mar  9 19:39:52 2010	(r204920)
@@ -474,13 +474,16 @@ AcpiEnterSleepState (
             return_ACPI_STATUS (Status);
         }
 
-        /*
-         * Some BIOSs don't set WAK_STS at all.  Give up waiting after
-         * 1000 retries if it still isn't set.
-         */
-        if (Retry-- == 0)
+        if (AcpiGbl_EnableInterpreterSlack)
         {
-            break;
+            /*
+             * Some BIOSs don't set WAK_STS at all.  Give up waiting after
+             * 1000 retries if it still isn't set.
+             */
+            if (Retry-- == 0)
+            {
+                break;
+            }
         }
 
         /* Spin until we wake */

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:41:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E1D51065672;
	Tue,  9 Mar 2010 19:41:19 +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 D3CC78FC08;
	Tue,  9 Mar 2010 19:41:18 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 9397146B8E;
	Tue,  9 Mar 2010 14:41:18 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id C21858A01F;
	Tue,  9 Mar 2010 14:41:17 -0500 (EST)
From: John Baldwin 
To: "Jung-uk Kim" 
Date: Tue, 9 Mar 2010 14:39:46 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003081940.o28JeVG1088074@svn.freebsd.org>
	<201003090753.31627.jhb@freebsd.org>
	<201003091303.49689.jkim@FreeBSD.org>
In-Reply-To: <201003091303.49689.jkim@FreeBSD.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003091439.46622.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Tue, 09 Mar 2010 14:41:17 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204877 - head/sys/modules/acpi/acpi
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:41:19 -0000

On Tuesday 09 March 2010 1:03:45 pm Jung-uk Kim wrote:
> And we do not build or install acpi.ko by default as you expected:
> 
> # $FreeBSD: head/sys/modules/acpi/Makefile 194701 2009-06-23 13:17:25Z 
rpaulo $
> 
> .if ${MACHINE} == "i386"
> SUBDIR=		acpi
> .endif
> 
> SUBDIR+=	acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm    \
> 		acpi_panasonic acpi_sony acpi_toshiba acpi_video        \
> 		acpi_dock acpi_wmi 
> 
> .include 
> 
> You have to descend to the subdir and build/install manually and
> that's all I wanted.

Ah, ok.  That is probably fine.  I don't imagine most folks would use acpi.ko 
on amd64 anyway, and hopefully it will be sufficiently obscure that no users 
will. :)

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:57:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7736E106566B;
	Tue,  9 Mar 2010 19:57:44 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B85F8FC12;
	Tue,  9 Mar 2010 19:57: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 o29Jvi30014365;
	Tue, 9 Mar 2010 19:57:44 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29JviWj014362;
	Tue, 9 Mar 2010 19:57:44 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201003091957.o29JviWj014362@svn.freebsd.org>
From: Navdeep Parhar 
Date: Tue, 9 Mar 2010 19:57: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: r204921 - in head/sys/dev/cxgb: . common
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:57:44 -0000

Author: np
Date: Tue Mar  9 19:57:44 2010
New Revision: 204921
URL: http://svn.freebsd.org/changeset/base/204921

Log:
  Better TwinAx transceiver detection.
  
  Originally submitted by: 
  (This is a rewritten, corrected version of that patch)
  
  MFC after:    1 week

Modified:
  head/sys/dev/cxgb/common/cxgb_ael1002.c
  head/sys/dev/cxgb/cxgb_main.c

Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c
==============================================================================
--- head/sys/dev/cxgb/common/cxgb_ael1002.c	Tue Mar  9 19:39:52 2010	(r204920)
+++ head/sys/dev/cxgb/common/cxgb_ael1002.c	Tue Mar  9 19:57:44 2010	(r204921)
@@ -446,7 +446,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v == 0x1)
-			return phy_modtype_twinax;
+			goto twinax;
 		if (v == 0x10)
 			return phy_modtype_sr;
 		if (v == 0x20)
@@ -454,6 +454,17 @@ static int ael2xxx_get_module_type(struc
 		if (v == 0x40)
 			return phy_modtype_lrm;
 
+		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 8);
+		if (v < 0)
+			return v;
+		if (v == 4) {
+			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 60);
+			if (v < 0)
+				return v;
+			if (v & 0x1)
+				goto twinax;
+		}
+
 		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6);
 		if (v < 0)
 			return v;
@@ -465,6 +476,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v & 0x80) {
+twinax:
 			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12);
 			if (v < 0)
 				return v;

Modified: head/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- head/sys/dev/cxgb/cxgb_main.c	Tue Mar  9 19:39:52 2010	(r204920)
+++ head/sys/dev/cxgb/cxgb_main.c	Tue Mar  9 19:57:44 2010	(r204921)
@@ -1229,7 +1229,7 @@ t3_os_link_changed(adapter_t *adapter, i
 void t3_os_phymod_changed(struct adapter *adap, int port_id)
 {
 	static const char *mod_str[] = {
-		NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX", "unknown"
+		NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX-L", "unknown"
 	};
 	struct port_info *pi = &adap->port[port_id];
 	int mod = pi->phy.modtype;

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 19:58:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB91A1065673;
	Tue,  9 Mar 2010 19:58:00 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 98E6B8FC18;
	Tue,  9 Mar 2010 19:58:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o29Jw0bl014466;
	Tue, 9 Mar 2010 19:58:00 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29Jw0ag014463;
	Tue, 9 Mar 2010 19:58:00 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <201003091958.o29Jw0ag014463@svn.freebsd.org>
From: Weongyo Jeong 
Date: Tue, 9 Mar 2010 19:58:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204922 - in head/sys/dev: bwn siba
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 19:58:00 -0000

Author: weongyo
Date: Tue Mar  9 19:58:00 2010
New Revision: 204922
URL: http://svn.freebsd.org/changeset/base/204922

Log:
  o uses bus accessor macros to read values from ivar so no more values
    are referenced directly from ivar pointer.  It's to do like what other
    buses do. [1]
  o changes exported prototypes.  It doesn't use struct siba_* structures
    anymore that instead of it it uses only device_t.
  o removes duplicate code and debug messages.
  o style(9)
  
  Pointed out by:	imp [1]

Modified:
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/bwn/if_bwnvar.h
  head/sys/dev/siba/siba_bwn.c
  head/sys/dev/siba/siba_core.c
  head/sys/dev/siba/sibavar.h

Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c	Tue Mar  9 19:57:44 2010	(r204921)
+++ head/sys/dev/bwn/if_bwn.c	Tue Mar  9 19:58:00 2010	(r204922)
@@ -134,7 +134,7 @@ SYSCTL_INT(_hw_bwn, OID_AUTO, wme, CTLFL
 
 static int	bwn_attach_pre(struct bwn_softc *);
 static int	bwn_attach_post(struct bwn_softc *);
-static void	bwn_sprom_bugfixes(struct siba_softc *);
+static void	bwn_sprom_bugfixes(device_t);
 static void	bwn_init(void *);
 static int	bwn_init_locked(struct bwn_softc *);
 static int	bwn_ioctl(struct ifnet *, u_long, caddr_t);
@@ -205,7 +205,6 @@ static void	bwn_stop_locked(struct bwn_s
 static int	bwn_core_init(struct bwn_mac *);
 static void	bwn_core_start(struct bwn_mac *);
 static void	bwn_core_exit(struct bwn_mac *);
-static void	bwn_fix_imcfglobug(struct bwn_mac *);
 static void	bwn_bt_disable(struct bwn_mac *);
 static int	bwn_chip_init(struct bwn_mac *);
 static uint64_t	bwn_hf_read(struct bwn_mac *);
@@ -225,7 +224,6 @@ static int	bwn_fw_loadinitvals(struct bw
 static int	bwn_phy_init(struct bwn_mac *);
 static void	bwn_set_txantenna(struct bwn_mac *, int);
 static void	bwn_set_opmode(struct bwn_mac *);
-static void	bwn_gpio_cleanup(struct bwn_mac *);
 static void	bwn_rate_write(struct bwn_mac *, uint16_t, int);
 static uint8_t	bwn_plcp_getcck(const uint8_t);
 static uint8_t	bwn_plcp_getofdm(const uint8_t);
@@ -910,13 +908,12 @@ static const struct siba_devid bwn_devs[
 static int
 bwn_probe(device_t dev)
 {
-	struct siba_dev_softc *sd = device_get_ivars(dev);
 	int i;
 
 	for (i = 0; i < sizeof(bwn_devs) / sizeof(bwn_devs[0]); i++) {
-		if (sd->sd_id.sd_vendor == bwn_devs[i].sd_vendor &&
-		    sd->sd_id.sd_device == bwn_devs[i].sd_device &&
-		    sd->sd_id.sd_rev == bwn_devs[i].sd_rev)
+		if (siba_get_vendor(dev) == bwn_devs[i].sd_vendor &&
+		    siba_get_device(dev) == bwn_devs[i].sd_device &&
+		    siba_get_revid(dev) == bwn_devs[i].sd_rev)
 			return (BUS_PROBE_DEFAULT);
 	}
 
@@ -928,12 +925,9 @@ bwn_attach(device_t dev)
 {
 	struct bwn_mac *mac;
 	struct bwn_softc *sc = device_get_softc(dev);
-	struct siba_dev_softc *sd = device_get_ivars(dev);
-	struct siba_softc *siba = sd->sd_bus;
 	int error, i, msic, reg;
 
 	sc->sc_dev = dev;
-	sc->sc_sd = sd;
 #ifdef BWN_DEBUG
 	sc->sc_debug = bwn_debug;
 #endif
@@ -942,14 +936,14 @@ bwn_attach(device_t dev)
 		error = bwn_attach_pre(sc);
 		if (error != 0)
 			return (error);
-		bwn_sprom_bugfixes(sd->sd_bus);
+		bwn_sprom_bugfixes(dev);
 		sc->sc_flags |= BWN_FLAG_ATTACHED;
 	}
 
 	if (!TAILQ_EMPTY(&sc->sc_maclist)) {
-		if (siba->siba_pci_did != 0x4313 &&
-		    siba->siba_pci_did != 0x431a &&
-		    siba->siba_pci_did != 0x4321) {
+		if (siba_get_pci_device(dev) != 0x4313 &&
+		    siba_get_pci_device(dev) != 0x431a &&
+		    siba_get_pci_device(dev) != 0x4321) {
 			device_printf(sc->sc_dev,
 			    "skip 802.11 cores\n");
 			return (ENODEV);
@@ -961,7 +955,6 @@ bwn_attach(device_t dev)
 	if (mac == NULL)
 		return (ENOMEM);
 	mac->mac_sc = sc;
-	mac->mac_sd = sd;
 	mac->mac_status = BWN_MAC_STATUS_UNINIT;
 	if (bwn_bfp != 0)
 		mac->mac_flags |= BWN_MAC_FLAG_BADFRAME_PREEMP;
@@ -977,7 +970,7 @@ bwn_attach(device_t dev)
 
 	device_printf(sc->sc_dev, "WLAN (chipid %#x rev %u) "
 	    "PHY (analog %d type %d rev %d) RADIO (manuf %#x ver %#x rev %d)\n",
-	    sd->sd_bus->siba_chipid, sd->sd_id.sd_rev,
+	    siba_get_chipid(sc->sc_dev), siba_get_revid(sc->sc_dev),
 	    mac->mac_phy.analog, mac->mac_phy.type, mac->mac_phy.rev,
 	    mac->mac_phy.rf_manuf, mac->mac_phy.rf_ver,
 	    mac->mac_phy.rf_rev);
@@ -1065,8 +1058,6 @@ bwn_attach_post(struct bwn_softc *sc)
 {
 	struct ieee80211com *ic;
 	struct ifnet *ifp = sc->sc_ifp;
-	struct siba_dev_softc *sd = sc->sc_sd;
-	struct siba_sprom *sprom = &sd->sd_bus->siba_sprom;
 
 	ic = ifp->if_l2com;
 	ic->ic_ifp = ifp;
@@ -1087,8 +1078,9 @@ bwn_attach_post(struct bwn_softc *sc)
 
 	/* call MI attach routine. */
 	ieee80211_ifattach(ic,
-	    bwn_is_valid_ether_addr(sprom->mac_80211a) ? sprom->mac_80211a :
-	    sprom->mac_80211bg);
+	    bwn_is_valid_ether_addr(siba_sprom_get_mac_80211a(sc->sc_dev)) ?
+	    siba_sprom_get_mac_80211a(sc->sc_dev) :
+	    siba_sprom_get_mac_80211bg(sc->sc_dev));
 
 	ic->ic_headroom = sizeof(struct bwn_txhdr);
 
@@ -1219,21 +1211,24 @@ fail:	BWN_LOCK_DESTROY(sc);
 }
 
 static void
-bwn_sprom_bugfixes(struct siba_softc *siba)
+bwn_sprom_bugfixes(device_t dev)
 {
 #define	BWN_ISDEV(_vendor, _device, _subvendor, _subdevice)		\
-	((siba->siba_pci_vid == PCI_VENDOR_##_vendor) &&		\
-	 (siba->siba_pci_did == _device) &&				\
-	 (siba->siba_pci_subvid == PCI_VENDOR_##_subvendor) &&		\
-	 (siba->siba_pci_subdid == _subdevice))
-
-	if (siba->siba_board_vendor == PCI_VENDOR_APPLE &&
-	    siba->siba_board_type == 0x4e && siba->siba_board_rev > 0x40)
-		siba->siba_sprom.bf_lo |= BWN_BFL_PACTRL;
-	if (siba->siba_board_vendor == SIBA_BOARDVENDOR_DELL &&
-	    siba->siba_chipid == 0x4301 && siba->siba_board_rev == 0x74)
-		siba->siba_sprom.bf_lo |= BWN_BFL_BTCOEXIST;
-	if (siba->siba_type == SIBA_TYPE_PCI) {
+	((siba_get_pci_vendor(dev) == PCI_VENDOR_##_vendor) &&		\
+	 (siba_get_pci_device(dev) == _device) &&			\
+	 (siba_get_pci_subvendor(dev) == PCI_VENDOR_##_subvendor) &&	\
+	 (siba_get_pci_subdevice(dev) == _subdevice))
+
+	if (siba_get_pci_subvendor(dev) == PCI_VENDOR_APPLE &&
+	    siba_get_pci_subdevice(dev) == 0x4e &&
+	    siba_get_pci_revid(dev) > 0x40)
+		siba_sprom_set_bf_lo(dev,
+		    siba_sprom_get_bf_lo(dev) | BWN_BFL_PACTRL);
+	if (siba_get_pci_subvendor(dev) == SIBA_BOARDVENDOR_DELL &&
+	    siba_get_chipid(dev) == 0x4301 && siba_get_pci_revid(dev) == 0x74)
+		siba_sprom_set_bf_lo(dev,
+		    siba_sprom_get_bf_lo(dev) | BWN_BFL_BTCOEXIST);
+	if (siba_get_type(dev) == SIBA_TYPE_PCI) {
 		if (BWN_ISDEV(BROADCOM, 0x4318, ASUSTEK, 0x100f) ||
 		    BWN_ISDEV(BROADCOM, 0x4320, DELL, 0x0003) ||
 		    BWN_ISDEV(BROADCOM, 0x4320, HP, 0x12f8) ||
@@ -1241,7 +1236,8 @@ bwn_sprom_bugfixes(struct siba_softc *si
 		    BWN_ISDEV(BROADCOM, 0x4320, LINKSYS, 0x0014) ||
 		    BWN_ISDEV(BROADCOM, 0x4320, LINKSYS, 0x0015) ||
 		    BWN_ISDEV(BROADCOM, 0x4320, MOTOROLA, 0x7010))
-			siba->siba_sprom.bf_lo &= ~BWN_BFL_BTCOEXIST;
+			siba_sprom_set_bf_lo(dev,
+			    siba_sprom_get_bf_lo(dev) & ~BWN_BFL_BTCOEXIST);
 	}
 #undef	BWN_ISDEV
 }
@@ -1434,7 +1430,7 @@ bwn_pio_tx_start(struct bwn_mac *mac, st
 	tq->tq_used += roundup(m->m_pkthdr.len + BWN_HDRSIZE(mac), 4);
 	tq->tq_free--;
 
-	if (mac->mac_sd->sd_id.sd_rev >= 8) {
+	if (siba_get_revid(sc->sc_dev) >= 8) {
 		/*
 		 * XXX please removes m_defrag(9)
 		 */
@@ -1606,17 +1602,15 @@ static int
 bwn_attach_core(struct bwn_mac *mac)
 {
 	struct bwn_softc *sc = mac->mac_sc;
-	struct siba_dev_softc *sd = mac->mac_sd;
-	struct siba_softc *siba = sd->sd_bus;
 	int error, have_bg = 0, have_a = 0;
 	uint32_t high;
 
-	KASSERT(sd->sd_id.sd_rev >= 5,
-	    ("unsupported revision %d", sd->sd_id.sd_rev));
+	KASSERT(siba_get_revid(sc->sc_dev) >= 5,
+	    ("unsupported revision %d", siba_get_revid(sc->sc_dev)));
 
-	siba_powerup(siba, 0);
+	siba_powerup(sc->sc_dev, 0);
 
-	high = siba_read_4(sd, SIBA_TGSHIGH);
+	high = siba_read_4(sc->sc_dev, SIBA_TGSHIGH);
 	bwn_reset_core(mac,
 	    (high & BWN_TGSHIGH_HAVE_2GHZ) ? BWN_TGSLOW_SUPPORT_G : 0);
 	error = bwn_phy_getinfo(mac, high);
@@ -1625,8 +1619,9 @@ bwn_attach_core(struct bwn_mac *mac)
 
 	have_a = (high & BWN_TGSHIGH_HAVE_5GHZ) ? 1 : 0;
 	have_bg = (high & BWN_TGSHIGH_HAVE_2GHZ) ? 1 : 0;
-	if (siba->siba_pci_did != 0x4312 && siba->siba_pci_did != 0x4319 &&
-	    siba->siba_pci_did != 0x4324) {
+	if (siba_get_pci_device(sc->sc_dev) != 0x4312 &&
+	    siba_get_pci_device(sc->sc_dev) != 0x4319 &&
+	    siba_get_pci_device(sc->sc_dev) != 0x4324) {
 		have_a = have_bg = 0;
 		if (mac->mac_phy.type == BWN_PHYTYPE_A)
 			have_a = 1;
@@ -1719,30 +1714,30 @@ bwn_attach_core(struct bwn_mac *mac)
 
 	mac->mac_phy.switch_analog(mac, 0);
 
-	siba_dev_down(sd, 0);
+	siba_dev_down(sc->sc_dev, 0);
 fail:
-	siba_powerdown(siba);
+	siba_powerdown(sc->sc_dev);
 	return (error);
 }
 
 static void
 bwn_reset_core(struct bwn_mac *mac, uint32_t flags)
 {
-	struct siba_dev_softc *sd = mac->mac_sd;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint32_t low, ctl;
 
 	flags |= (BWN_TGSLOW_PHYCLOCK_ENABLE | BWN_TGSLOW_PHYRESET);
 
-	siba_dev_up(sd, flags);
+	siba_dev_up(sc->sc_dev, flags);
 	DELAY(2000);
 
-	low = (siba_read_4(sd, SIBA_TGSLOW) | SIBA_TGSLOW_FGC) &
+	low = (siba_read_4(sc->sc_dev, SIBA_TGSLOW) | SIBA_TGSLOW_FGC) &
 	    ~BWN_TGSLOW_PHYRESET;
-	siba_write_4(sd, SIBA_TGSLOW, low);
-	siba_read_4(sd, SIBA_TGSLOW);
+	siba_write_4(sc->sc_dev, SIBA_TGSLOW, low);
+	siba_read_4(sc->sc_dev, SIBA_TGSLOW);
 	DELAY(1000);
-	siba_write_4(sd, SIBA_TGSLOW, low & ~SIBA_TGSLOW_FGC);
-	siba_read_4(sd, SIBA_TGSLOW);
+	siba_write_4(sc->sc_dev, SIBA_TGSLOW, low & ~SIBA_TGSLOW_FGC);
+	siba_read_4(sc->sc_dev, SIBA_TGSLOW);
 	DELAY(1000);
 
 	if (mac->mac_phy.switch_analog != NULL)
@@ -1759,8 +1754,6 @@ bwn_phy_getinfo(struct bwn_mac *mac, int
 {
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_softc *sc = mac->mac_sc;
-	struct siba_dev_softc *sd = mac->mac_sd;
-	struct siba_softc *siba = sd->sd_bus;
 	uint32_t tmp;
 
 	/* PHY */
@@ -1779,10 +1772,10 @@ bwn_phy_getinfo(struct bwn_mac *mac, int
 		goto unsupphy;
 
 	/* RADIO */
-	if (siba->siba_chipid == 0x4317) {
-		if (siba->siba_chiprev == 0)
+	if (siba_get_chipid(sc->sc_dev) == 0x4317) {
+		if (siba_get_chiprev(sc->sc_dev) == 0)
 			tmp = 0x3205017f;
-		else if (siba->siba_chiprev == 1)
+		else if (siba_get_chiprev(sc->sc_dev) == 1)
 			tmp = 0x4205017f;
 		else
 			tmp = 0x5205017f;
@@ -1826,7 +1819,6 @@ bwn_chiptest(struct bwn_mac *mac)
 #define	TESTVAL0	0x55aaaa55
 #define	TESTVAL1	0xaa5555aa
 	struct bwn_softc *sc = mac->mac_sc;
-	struct siba_dev_softc *sd = mac->mac_sd;
 	uint32_t v, backup;
 
 	BWN_LOCK(sc);
@@ -1842,7 +1834,8 @@ bwn_chiptest(struct bwn_mac *mac)
 
 	bwn_shm_write_4(mac, BWN_SHARED, 0, backup);
 
-	if ((sd->sd_id.sd_rev >= 3) && (sd->sd_id.sd_rev <= 10)) {
+	if ((siba_get_revid(sc->sc_dev) >= 3) &&
+	    (siba_get_revid(sc->sc_dev) <= 10)) {
 		BWN_WRITE_2(mac, BWN_TSF_CFP_START, 0xaaaa);
 		BWN_WRITE_4(mac, BWN_TSF_CFP_START, 0xccccbbbb);
 		if (BWN_READ_2(mac, BWN_TSF_CFP_START_LOW) != 0xbbbb)
@@ -2070,15 +2063,17 @@ bwn_phy_g_attach(struct bwn_mac *mac)
 	struct bwn_softc *sc = mac->mac_sc;
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
-	struct siba_dev_softc *sd = mac->mac_sd;
-	struct siba_sprom *sprom = &sd->sd_bus->siba_sprom;
 	unsigned int i;
-	int16_t pab0 = (int16_t)(sprom->pa0b0), pab1 = (int16_t)(sprom->pa0b1),
-	    pab2 = (int16_t)(sprom->pa0b2);
+	int16_t pab0, pab1, pab2;
 	static int8_t bwn_phy_g_tssi2dbm_table[] = BWN_PHY_G_TSSI2DBM_TABLE;
-	int8_t bg = (int8_t)sprom->tssi_bg;
+	int8_t bg;
+
+	bg = (int8_t)siba_sprom_get_tssi_bg(sc->sc_dev);
+	pab0 = (int16_t)siba_sprom_get_pa0b0(sc->sc_dev);
+	pab1 = (int16_t)siba_sprom_get_pa0b1(sc->sc_dev);
+	pab2 = (int16_t)siba_sprom_get_pa0b2(sc->sc_dev);
 
-	if ((sd->sd_bus->siba_chipid == 0x4301) && (phy->rf_ver != 0x2050))
+	if ((siba_get_chipid(sc->sc_dev) == 0x4301) && (phy->rf_ver != 0x2050))
 		device_printf(sc->sc_dev, "not supported anymore\n");
 
 	pg->pg_flags = 0;
@@ -2175,8 +2170,8 @@ bwn_phy_g_prepare_hw(struct bwn_mac *mac
 {
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
+	struct bwn_softc *sc = mac->mac_sc;
 	struct bwn_txpwr_loctl *lo = &pg->pg_loctl;
-	struct siba_softc *bus = mac->mac_sd->sd_bus;
 	static const struct bwn_rfatt rfatt0[] = {
 		{ 3, 0 }, { 1, 0 }, { 5, 0 }, { 7, 0 },	{ 9, 0 }, { 2, 0 },
 		{ 0, 0 }, { 4, 0 }, { 6, 0 }, { 8, 0 }, { 1, 1 }, { 2, 1 },
@@ -2204,12 +2199,12 @@ bwn_phy_g_prepare_hw(struct bwn_mac *mac
 	/* prepare Radio Attenuation */
 	pg->pg_rfatt.padmix = 0;
 
-	if (bus->siba_board_vendor == SIBA_BOARDVENDOR_BCM &&
-	    bus->siba_board_type == SIBA_BOARD_BCM4309G) {
-		if (bus->siba_board_rev < 0x43) {
+	if (siba_get_pci_subvendor(sc->sc_dev) == SIBA_BOARDVENDOR_BCM &&
+	    siba_get_pci_subdevice(sc->sc_dev) == SIBA_BOARD_BCM4309G) {
+		if (siba_get_pci_revid(sc->sc_dev) < 0x43) {
 			pg->pg_rfatt.att = 2;
 			goto done;
-		} else if (bus->siba_board_rev < 0x51) {
+		} else if (siba_get_pci_revid(sc->sc_dev) < 0x51) {
 			pg->pg_rfatt.att = 3;
 			goto done;
 		}
@@ -2228,24 +2223,25 @@ bwn_phy_g_prepare_hw(struct bwn_mac *mac
 			goto done;
 		case 1:
 			if (phy->type == BWN_PHYTYPE_G) {
-				if (bus->siba_board_vendor ==
+				if (siba_get_pci_subvendor(sc->sc_dev) ==
 				    SIBA_BOARDVENDOR_BCM &&
-				    bus->siba_board_type ==
+				    siba_get_pci_subdevice(sc->sc_dev) ==
 				    SIBA_BOARD_BCM4309G &&
-				    bus->siba_board_rev >= 30)
+				    siba_get_pci_revid(sc->sc_dev) >= 30)
 					pg->pg_rfatt.att = 3;
-				else if (bus->siba_board_vendor ==
+				else if (siba_get_pci_subvendor(sc->sc_dev) ==
 				    SIBA_BOARDVENDOR_BCM &&
-				    bus->siba_board_type == SIBA_BOARD_BU4306)
+				    siba_get_pci_subdevice(sc->sc_dev) ==
+				    SIBA_BOARD_BU4306)
 					pg->pg_rfatt.att = 3;
 				else
 					pg->pg_rfatt.att = 1;
 			} else {
-				if (bus->siba_board_vendor ==
+				if (siba_get_pci_subvendor(sc->sc_dev) ==
 				    SIBA_BOARDVENDOR_BCM &&
-				    bus->siba_board_type ==
+				    siba_get_pci_subdevice(sc->sc_dev) ==
 				    SIBA_BOARD_BCM4309G &&
-				    bus->siba_board_rev >= 30)
+				    siba_get_pci_revid(sc->sc_dev) >= 30)
 					pg->pg_rfatt.att = 7;
 				else
 					pg->pg_rfatt.att = 6;
@@ -2253,17 +2249,18 @@ bwn_phy_g_prepare_hw(struct bwn_mac *mac
 			goto done;
 		case 2:
 			if (phy->type == BWN_PHYTYPE_G) {
-				if (bus->siba_board_vendor ==
+				if (siba_get_pci_subvendor(sc->sc_dev) ==
 				    SIBA_BOARDVENDOR_BCM &&
-				    bus->siba_board_type ==
+				    siba_get_pci_subdevice(sc->sc_dev) ==
 				    SIBA_BOARD_BCM4309G &&
-				    bus->siba_board_rev >= 30)
+				    siba_get_pci_revid(sc->sc_dev) >= 30)
 					pg->pg_rfatt.att = 3;
-				else if (bus->siba_board_vendor ==
+				else if (siba_get_pci_subvendor(sc->sc_dev) ==
 				    SIBA_BOARDVENDOR_BCM &&
-				    bus->siba_board_type == SIBA_BOARD_BU4306)
+				    siba_get_pci_subdevice(sc->sc_dev) ==
+				    SIBA_BOARD_BU4306)
 					pg->pg_rfatt.att = 5;
-				else if (bus->siba_chipid == 0x4320)
+				else if (siba_get_chipid(sc->sc_dev) == 0x4320)
 					pg->pg_rfatt.att = 4;
 				else
 					pg->pg_rfatt.att = 3;
@@ -2547,7 +2544,6 @@ bwn_phy_g_recalc_txpwr(struct bwn_mac *m
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
 	struct bwn_softc *sc = mac->mac_sc;
-	struct siba_softc *siba = mac->mac_sd->sd_bus;
 	unsigned int tssi;
 	int cck, ofdm;
 	int power;
@@ -2570,12 +2566,13 @@ bwn_phy_g_recalc_txpwr(struct bwn_mac *m
 	pg->pg_avgtssi = tssi;
 	KASSERT(tssi < BWN_TSSI_MAX, ("%s:%d: fail", __func__, __LINE__));
 
-	max = siba->siba_sprom.maxpwr_bg;
-	if (siba->siba_sprom.bf_lo & BWN_BFL_PACTRL)
+	max = siba_sprom_get_maxpwr_bg(sc->sc_dev);
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_PACTRL)
 		max -= 3;
 	if (max >= 120) {
 		device_printf(sc->sc_dev, "invalid max TX-power value\n");
-		siba->siba_sprom.maxpwr_bg = max = 80;
+		max = 80;
+		siba_sprom_set_maxpwr_bg(sc->sc_dev, max);
 	}
 
 	power = MIN(MAX((phy->txpower < 0) ? 0 : (phy->txpower << 2), 0), max) -
@@ -2619,9 +2616,8 @@ bwn_phy_g_set_txpwr(struct bwn_mac *mac)
 				txctl = BWN_TXCTL_PA2DB | BWN_TXCTL_TXMIX;
 				rfatt += 2;
 				bbatt += 2;
-			} else if (mac->mac_sd->sd_bus->siba_sprom.
-				   bf_lo &
-				   BWN_BFL_PACTRL) {
+			} else if (siba_sprom_get_bf_lo(sc->sc_dev) &
+			    BWN_BFL_PACTRL) {
 				bbatt += 4 * (rfatt - 2);
 				rfatt = 2;
 			}
@@ -2716,9 +2712,10 @@ static void
 bwn_phy_g_task_60s(struct bwn_mac *mac)
 {
 	struct bwn_phy *phy = &mac->mac_phy;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint8_t old = phy->chan;
 
-	if (!(mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_RSSI))
+	if (!(siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_RSSI))
 		return;
 
 	bwn_mac_suspend(mac);
@@ -3182,20 +3179,15 @@ bwn_wme_clear(struct bwn_softc *sc)
 static int
 bwn_core_init(struct bwn_mac *mac)
 {
-#ifdef BWN_DEBUG
 	struct bwn_softc *sc = mac->mac_sc;
-#endif
-	struct siba_dev_softc *sd = mac->mac_sd;
-	struct siba_softc *siba = sd->sd_bus;
-	struct siba_sprom *sprom = &siba->siba_sprom;
 	uint64_t hf;
 	int error;
 
 	KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT,
 	    ("%s:%d: fail", __func__, __LINE__));
 
-	siba_powerup(siba, 0);
-	if (!siba_dev_isup(sd))
+	siba_powerup(sc->sc_dev, 0);
+	if (!siba_dev_isup(sc->sc_dev))
 		bwn_reset_core(mac,
 		    mac->mac_phy.gmode ? BWN_TGSLOW_SUPPORT_G : 0);
 
@@ -3219,9 +3211,9 @@ bwn_core_init(struct bwn_mac *mac)
 
 	mac->mac_phy.init_pre(mac);
 
-	siba_pcicore_intr(&siba->siba_pci, sd);
+	siba_pcicore_intr(sc->sc_dev);
 
-	bwn_fix_imcfglobug(mac);
+	siba_fix_imcfglobug(sc->sc_dev);
 	bwn_bt_disable(mac);
 	if (mac->mac_phy.prepare_hw) {
 		error = mac->mac_phy.prepare_hw(mac);
@@ -3232,11 +3224,11 @@ bwn_core_init(struct bwn_mac *mac)
 	if (error)
 		goto fail0;
 	bwn_shm_write_2(mac, BWN_SHARED, BWN_SHARED_COREREV,
-	    mac->mac_sd->sd_id.sd_rev);
+	    siba_get_revid(sc->sc_dev));
 	hf = bwn_hf_read(mac);
 	if (mac->mac_phy.type == BWN_PHYTYPE_G) {
 		hf |= BWN_HF_GPHY_SYM_WORKAROUND;
-		if (sprom->bf_lo & BWN_BFL_PACTRL)
+		if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_PACTRL)
 			hf |= BWN_HF_PAGAINBOOST_OFDM_ON;
 		if (mac->mac_phy.rev == 1)
 			hf |= BWN_HF_GPHY_DC_CANCELFILTER;
@@ -3247,10 +3239,10 @@ bwn_core_init(struct bwn_mac *mac)
 		if (mac->mac_phy.rf_rev == 6)
 			hf |= BWN_HF_4318_TSSI;
 	}
-	if (sprom->bf_lo & BWN_BFL_CRYSTAL_NOSLOW)
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_CRYSTAL_NOSLOW)
 		hf |= BWN_HF_SLOWCLOCK_REQ_OFF;
-	if ((siba->siba_type == SIBA_TYPE_PCI) &&
-	    (siba->siba_pci.spc_dev->sd_id.sd_rev <= 10))
+	if ((siba_get_type(sc->sc_dev) == SIBA_TYPE_PCI) &&
+	    (siba_get_pcicore_revid(sc->sc_dev) <= 10))
 		hf |= BWN_HF_PCI_SLOWCLOCK_WORKAROUND;
 	hf &= ~BWN_HF_SKIP_CFP_UPDATE;
 	bwn_hf_write(mac, hf);
@@ -3267,7 +3259,7 @@ bwn_core_init(struct bwn_mac *mac)
 	    (mac->mac_phy.type == BWN_PHYTYPE_B) ? 0x1f : 0xf);
 	bwn_shm_write_2(mac, BWN_SCRATCH, BWN_SCRATCH_CONT_MAX, 0x3ff);
 
-	if (siba->siba_type == SIBA_TYPE_PCMCIA || bwn_usedma == 0)
+	if (siba_get_type(sc->sc_dev) == SIBA_TYPE_PCMCIA || bwn_usedma == 0)
 		bwn_pio_init(mac);
 	else
 		bwn_dma_init(mac);
@@ -3277,7 +3269,8 @@ bwn_core_init(struct bwn_mac *mac)
 	bwn_spu_setdelay(mac, 1);
 	bwn_bt_enable(mac);
 
-	siba_powerup(siba, !(sprom->bf_lo & BWN_BFL_CRYSTAL_NOSLOW));
+	siba_powerup(sc->sc_dev,
+	    !(siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_CRYSTAL_NOSLOW));
 	bwn_set_macaddr(mac);
 	bwn_crypt_init(mac);
 
@@ -3290,7 +3283,7 @@ bwn_core_init(struct bwn_mac *mac)
 fail1:
 	bwn_chip_exit(mac);
 fail0:
-	siba_powerdown(siba);
+	siba_powerdown(sc->sc_dev);
 	KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT,
 	    ("%s:%d: fail", __func__, __LINE__));
 	return (error);
@@ -3305,7 +3298,7 @@ bwn_core_start(struct bwn_mac *mac)
 	KASSERT(mac->mac_status == BWN_MAC_STATUS_INITED,
 	    ("%s:%d: fail", __func__, __LINE__));
 
-	if (mac->mac_sd->sd_id.sd_rev < 5)
+	if (siba_get_revid(sc->sc_dev) < 5)
 		return;
 
 	while (1) {
@@ -3325,6 +3318,7 @@ bwn_core_start(struct bwn_mac *mac)
 static void
 bwn_core_exit(struct bwn_mac *mac)
 {
+	struct bwn_softc *sc = mac->mac_sc;
 	uint32_t macctl;
 
 	BWN_ASSERT_LOCKED(mac->mac_sc);
@@ -3345,35 +3339,8 @@ bwn_core_exit(struct bwn_mac *mac)
 	bwn_pio_stop(mac);
 	bwn_chip_exit(mac);
 	mac->mac_phy.switch_analog(mac, 0);
-	siba_dev_down(mac->mac_sd, 0);
-	siba_powerdown(mac->mac_sd->sd_bus);
-}
-
-static void
-bwn_fix_imcfglobug(struct bwn_mac *mac)
-{
-	struct siba_dev_softc *sd = mac->mac_sd;
-	struct siba_softc *siba = sd->sd_bus;
-	uint32_t tmp;
-
-	if (siba->siba_pci.spc_dev == NULL)
-		return;
-	if (siba->siba_pci.spc_dev->sd_id.sd_device != SIBA_DEVID_PCI ||
-	    siba->siba_pci.spc_dev->sd_id.sd_rev > 5)
-		return;
-
-	tmp = siba_read_4(sd, SIBA_IMCFGLO) &
-	    ~(SIBA_IMCFGLO_REQTO | SIBA_IMCFGLO_SERTO);
-	switch (siba->siba_type) {
-	case SIBA_TYPE_PCI:
-	case SIBA_TYPE_PCMCIA:
-		tmp |= 0x32;
-		break;
-	case SIBA_TYPE_SSB:
-		tmp |= 0x53;
-		break;
-	}
-	siba_write_4(sd, SIBA_IMCFGLO, tmp);
+	siba_dev_down(sc->sc_dev, 0);
+	siba_powerdown(sc->sc_dev);
 }
 
 static void
@@ -3388,6 +3355,7 @@ bwn_bt_disable(struct bwn_mac *mac)
 static int
 bwn_chip_init(struct bwn_mac *mac)
 {
+	struct bwn_softc *sc = mac->mac_sc;
 	struct bwn_phy *phy = &mac->mac_phy;
 	uint32_t macctl;
 	int error;
@@ -3410,13 +3378,13 @@ bwn_chip_init(struct bwn_mac *mac)
 
 	error = bwn_fw_loadinitvals(mac);
 	if (error) {
-		bwn_gpio_cleanup(mac);
+		siba_gpio_set(sc->sc_dev, 0);
 		return (error);
 	}
 	phy->switch_analog(mac, 1);
 	error = bwn_phy_init(mac);
 	if (error) {
-		bwn_gpio_cleanup(mac);
+		siba_gpio_set(sc->sc_dev, 0);
 		return (error);
 	}
 	if (phy->set_im)
@@ -3428,7 +3396,7 @@ bwn_chip_init(struct bwn_mac *mac)
 	if (phy->type == BWN_PHYTYPE_B)
 		BWN_WRITE_2(mac, 0x005e, BWN_READ_2(mac, 0x005e) | 0x0004);
 	BWN_WRITE_4(mac, 0x0100, 0x01000000);
-	if (mac->mac_sd->sd_id.sd_rev < 5)
+	if (siba_get_revid(sc->sc_dev) < 5)
 		BWN_WRITE_4(mac, 0x010c, 0x01000000);
 
 	BWN_WRITE_4(mac, BWN_MACCTL,
@@ -3438,7 +3406,7 @@ bwn_chip_init(struct bwn_mac *mac)
 	bwn_shm_write_2(mac, BWN_SHARED, 0x0074, 0x0000);
 
 	bwn_set_opmode(mac);
-	if (mac->mac_sd->sd_id.sd_rev < 3) {
+	if (siba_get_revid(sc->sc_dev) < 3) {
 		BWN_WRITE_2(mac, 0x060e, 0x0000);
 		BWN_WRITE_2(mac, 0x0610, 0x8000);
 		BWN_WRITE_2(mac, 0x0604, 0x0000);
@@ -3454,10 +3422,9 @@ bwn_chip_init(struct bwn_mac *mac)
 	BWN_WRITE_4(mac, BWN_DMA3_INTR_MASK, 0x0001dc00);
 	BWN_WRITE_4(mac, BWN_DMA4_INTR_MASK, 0x0000dc00);
 	BWN_WRITE_4(mac, BWN_DMA5_INTR_MASK, 0x0000dc00);
-	siba_write_4(mac->mac_sd, SIBA_TGSLOW,
-	    siba_read_4(mac->mac_sd, SIBA_TGSLOW) | 0x00100000);
-	BWN_WRITE_2(mac, BWN_POWERUP_DELAY,
-	    mac->mac_sd->sd_bus->siba_cc.scc_powerup_delay);
+	siba_write_4(sc->sc_dev, SIBA_TGSLOW,
+	    siba_read_4(sc->sc_dev, SIBA_TGSLOW) | 0x00100000);
+	BWN_WRITE_2(mac, BWN_POWERUP_DELAY, siba_get_cc_powerdelay(sc->sc_dev));
 	return (error);
 }
 
@@ -3619,13 +3586,14 @@ bwn_pio_set_txqueue(struct bwn_mac *mac,
     int index)
 {
 	struct bwn_pio_txpkt *tp;
+	struct bwn_softc *sc = mac->mac_sc;
 	unsigned int i;
 
 	tq->tq_base = bwn_pio_idx2base(mac, index) + BWN_PIO_TXQOFFSET(mac);
 	tq->tq_index = index;
 
 	tq->tq_free = BWN_PIO_MAX_TXPACKETS;
-	if (mac->mac_sd->sd_id.sd_rev >= 8)
+	if (siba_get_revid(sc->sc_dev) >= 8)
 		tq->tq_size = 1920;
 	else {
 		tq->tq_size = bwn_pio_read_2(mac, tq, BWN_PIO_TXQBUFSIZE);
@@ -3664,7 +3632,7 @@ bwn_pio_idx2base(struct bwn_mac *mac, in
 		BWN_PIO11_BASE5,
 	};
 
-	if (mac->mac_sd->sd_id.sd_rev >= 11) {
+	if (siba_get_revid(sc->sc_dev) >= 11) {
 		if (index >= N(bases_rev11))
 			device_printf(sc->sc_dev, "%s: warning\n", __func__);
 		return (bases_rev11[index]);
@@ -3678,9 +3646,10 @@ static void
 bwn_pio_setupqueue_rx(struct bwn_mac *mac, struct bwn_pio_rxqueue *prq,
     int index)
 {
+	struct bwn_softc *sc = mac->mac_sc;
 
 	prq->prq_mac = mac;
-	prq->prq_rev = mac->mac_sd->sd_id.sd_rev;
+	prq->prq_rev = siba_get_revid(sc->sc_dev);
 	prq->prq_base = bwn_pio_idx2base(mac, index) + BWN_PIO_RXQOFFSET(mac);
 	bwn_dma_rxdirectfifo(mac, index, 1);
 }
@@ -4027,6 +3996,7 @@ bwn_dma_32_setdesc(struct bwn_dma_ring *
     int start, int end, int irq)
 {
 	struct bwn_dmadesc32 *descbase = dr->dr_ring_descbase;
+	struct bwn_softc *sc = dr->dr_mac->mac_sc;
 	uint32_t addr, addrext, ctl;
 	int slot;
 
@@ -4036,7 +4006,7 @@ bwn_dma_32_setdesc(struct bwn_dma_ring *
 
 	addr = (uint32_t) (dmaaddr & ~SIBA_DMA_TRANSLATION_MASK);
 	addrext = (uint32_t) (dmaaddr & SIBA_DMA_TRANSLATION_MASK) >> 30;
-	addr |= siba_dma_translation(dr->dr_mac->mac_sd);
+	addr |= siba_dma_translation(sc->sc_dev);
 	ctl = bufsize & BWN_DMA32_DCTL_BYTECNT;
 	if (slot == dr->dr_numslots - 1)
 		ctl |= BWN_DMA32_DCTL_DTABLEEND;
@@ -4115,6 +4085,7 @@ bwn_dma_64_setdesc(struct bwn_dma_ring *
     int start, int end, int irq)
 {
 	struct bwn_dmadesc64 *descbase = dr->dr_ring_descbase;
+	struct bwn_softc *sc = dr->dr_mac->mac_sc;
 	int slot;
 	uint32_t ctl0 = 0, ctl1 = 0;
 	uint32_t addrlo, addrhi;
@@ -4128,7 +4099,7 @@ bwn_dma_64_setdesc(struct bwn_dma_ring *
 	addrhi = (((uint64_t) dmaaddr >> 32) & ~SIBA_DMA_TRANSLATION_MASK);
 	addrext = (((uint64_t) dmaaddr >> 32) & SIBA_DMA_TRANSLATION_MASK) >>
 	    30;
-	addrhi |= (siba_dma_translation(dr->dr_mac->mac_sd) << 1);
+	addrhi |= (siba_dma_translation(sc->sc_dev) << 1);
 	if (slot == dr->dr_numslots - 1)
 		ctl0 |= BWN_DMA64_DCTL0_DTABLEEND;
 	if (start)
@@ -4238,9 +4209,10 @@ bwn_dma_allocringmemory(struct bwn_dma_r
 static void
 bwn_dma_setup(struct bwn_dma_ring *dr)
 {
+	struct bwn_softc *sc = dr->dr_mac->mac_sc;
 	uint64_t ring64;
 	uint32_t addrext, ring32, value;
-	uint32_t trans = siba_dma_translation(dr->dr_mac->mac_sd);
+	uint32_t trans = siba_dma_translation(sc->sc_dev);
 
 	if (dr->dr_tx) {
 		dr->dr_curslot = -1;
@@ -4536,18 +4508,18 @@ bwn_spu_setdelay(struct bwn_mac *mac, in
 static void
 bwn_bt_enable(struct bwn_mac *mac)
 {
-	struct siba_sprom *sprom = &mac->mac_sd->sd_bus->siba_sprom;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint64_t hf;
 
 	if (bwn_bluetooth == 0)
 		return;
-	if ((sprom->bf_lo & BWN_BFL_BTCOEXIST) == 0)
+	if ((siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_BTCOEXIST) == 0)
 		return;
 	if (mac->mac_phy.type != BWN_PHYTYPE_B && !mac->mac_phy.gmode)
 		return;
 
 	hf = bwn_hf_read(mac);
-	if (sprom->bf_lo & BWN_BFL_BTCMOD)
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_BTCMOD)
 		hf |= BWN_HF_BT_COEXISTALT;
 	else
 		hf |= BWN_HF_BT_COEXIST;
@@ -4584,25 +4556,25 @@ bwn_clear_keys(struct bwn_mac *mac)
 static void
 bwn_crypt_init(struct bwn_mac *mac)
 {
+	struct bwn_softc *sc = mac->mac_sc;
 
-	mac->mac_max_nr_keys = (mac->mac_sd->sd_id.sd_rev >= 5) ? 58 : 20;
+	mac->mac_max_nr_keys = (siba_get_revid(sc->sc_dev) >= 5) ? 58 : 20;
 	KASSERT(mac->mac_max_nr_keys <= N(mac->mac_key),
 	    ("%s:%d: fail", __func__, __LINE__));
 	mac->mac_ktp = bwn_shm_read_2(mac, BWN_SHARED, BWN_SHARED_KEY_TABLEP);
 	mac->mac_ktp *= 2;
-	if (mac->mac_sd->sd_id.sd_rev >= 5) {
-		BWN_WRITE_2(mac, BWN_RCMTA_COUNT,
-		    mac->mac_max_nr_keys - 8);
-	}
+	if (siba_get_revid(sc->sc_dev) >= 5)
+		BWN_WRITE_2(mac, BWN_RCMTA_COUNT, mac->mac_max_nr_keys - 8);
 	bwn_clear_keys(mac);
 }
 
 static void
 bwn_chip_exit(struct bwn_mac *mac)
 {
+	struct bwn_softc *sc = mac->mac_sc;
 
 	bwn_phy_exit(mac);
-	bwn_gpio_cleanup(mac);
+	siba_gpio_set(sc->sc_dev, 0);
 }
 
 static int
@@ -4622,33 +4594,31 @@ bwn_fw_fillinfo(struct bwn_mac *mac)
 static int
 bwn_gpio_init(struct bwn_mac *mac)
 {
-	struct siba_softc *bus = mac->mac_sd->sd_bus;
-	struct siba_dev_softc *sd;
-	uint32_t mask = 0x0000001f, set = 0x0000000f;
+	struct bwn_softc *sc = mac->mac_sc;
+	uint32_t mask = 0x1f, set = 0xf, value;
 
 	BWN_WRITE_4(mac, BWN_MACCTL,
 	    BWN_READ_4(mac, BWN_MACCTL) & ~BWN_MACCTL_GPOUT_MASK);
 	BWN_WRITE_2(mac, BWN_GPIO_MASK,
 	    BWN_READ_2(mac, BWN_GPIO_MASK) | 0x000f);
 
-	if (bus->siba_chipid == 0x4301) {
+	if (siba_get_chipid(sc->sc_dev) == 0x4301) {
 		mask |= 0x0060;
 		set |= 0x0060;
 	}
-	if (bus->siba_sprom.bf_lo & BWN_BFL_PACTRL) {
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_PACTRL) {
 		BWN_WRITE_2(mac, BWN_GPIO_MASK,
 		    BWN_READ_2(mac, BWN_GPIO_MASK) | 0x0200);
 		mask |= 0x0200;
 		set |= 0x0200;
 	}
-	if (mac->mac_sd->sd_id.sd_rev >= 2)
+	if (siba_get_revid(sc->sc_dev) >= 2)
 		mask |= 0x0010;
-	sd = (bus->siba_cc.scc_dev != NULL) ? bus->siba_cc.scc_dev :
-	    bus->siba_pci.spc_dev;
-	if (sd == NULL)
+
+	value = siba_gpio_get(sc->sc_dev);
+	if (value == -1)
 		return (0);
-	siba_write_4(sd, BWN_GPIOCTL,
-	    (siba_read_4(sd, BWN_GPIOCTL) & mask) | set);
+	siba_gpio_set(sc->sc_dev, (value & mask) | set);
 
 	return (0);
 }
@@ -4749,15 +4719,15 @@ bwn_set_opmode(struct bwn_mac *mac)
 		ctl &= ~BWN_MACCTL_STA;
 	ctl |= sc->sc_filters;
 
-	if (mac->mac_sd->sd_id.sd_rev <= 4)
+	if (siba_get_revid(sc->sc_dev) <= 4)
 		ctl |= BWN_MACCTL_PROMISC;
 
 	BWN_WRITE_4(mac, BWN_MACCTL, ctl);
 
 	cfp_pretbtt = 2;
 	if ((ctl & BWN_MACCTL_STA) && !(ctl & BWN_MACCTL_HOSTAP)) {
-		if (mac->mac_sd->sd_bus->siba_chipid == 0x4306 &&
-		    mac->mac_sd->sd_bus->siba_chiprev == 3)
+		if (siba_get_chipid(sc->sc_dev) == 0x4306 &&
+		    siba_get_chiprev(sc->sc_dev) == 3)
 			cfp_pretbtt = 100;
 		else
 			cfp_pretbtt = 50;
@@ -4765,19 +4735,6 @@ bwn_set_opmode(struct bwn_mac *mac)
 	BWN_WRITE_2(mac, 0x612, cfp_pretbtt);
 }
 
-static void
-bwn_gpio_cleanup(struct bwn_mac *mac)
-{
-	struct siba_softc *bus = mac->mac_sd->sd_bus;
-	struct siba_dev_softc *gpiodev, *pcidev = NULL;
-
-	pcidev = bus->siba_pci.spc_dev;
-	gpiodev = bus->siba_cc.scc_dev ? bus->siba_cc.scc_dev : pcidev;
-	if (!gpiodev)
-		return;
-	siba_write_4(gpiodev, BWN_GPIOCTL, 0);
-}
-
 static int
 bwn_dma_gettype(struct bwn_mac *mac)
 {
@@ -4810,6 +4767,7 @@ bwn_phy_g_init_sub(struct bwn_mac *mac)
 {
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint16_t i, tmp;
 
 	if (phy->rev == 1)
@@ -4872,7 +4830,7 @@ bwn_phy_g_init_sub(struct bwn_mac *mac)
 		BWN_PHY_SETMASK(mac, BWN_PHY_CCK(0x36), 0x0fff,
 		    (pg->pg_loctl.tx_bias << 12));
 	}
-	if (mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_PACTRL)
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_PACTRL)
 		BWN_PHY_WRITE(mac, BWN_PHY_CCK(0x2e), 0x8075);
 	else
 		BWN_PHY_WRITE(mac, BWN_PHY_CCK(0x2e), 0x807f);
@@ -4885,7 +4843,7 @@ bwn_phy_g_init_sub(struct bwn_mac *mac)
 		BWN_PHY_WRITE(mac, BWN_PHY_LO_MASK, 0x8078);
 	}
 
-	if (!(mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_RSSI)) {
+	if (!(siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_RSSI)) {
 		for (i = 0; i < 64; i++) {
 			BWN_PHY_WRITE(mac, BWN_PHY_NRSSI_CTRL, i);
 			BWN_PHY_WRITE(mac, BWN_PHY_NRSSI_DATA,
@@ -4904,8 +4862,8 @@ bwn_phy_g_init_sub(struct bwn_mac *mac)
 	if (phy->rf_rev == 8)
 		BWN_PHY_WRITE(mac, BWN_PHY_EXTG(0x05), 0x3230);
 	bwn_phy_hwpctl_init(mac);
-	if ((mac->mac_sd->sd_bus->siba_chipid == 0x4306
-	     && mac->mac_sd->sd_bus->siba_chippkg == 2) || 0) {
+	if ((siba_get_chipid(sc->sc_dev) == 0x4306
+	     && siba_get_chippkg(sc->sc_dev) == 2) || 0) {
 		BWN_PHY_MASK(mac, BWN_PHY_CRS0, 0xbfff);
 		BWN_PHY_MASK(mac, BWN_PHY_OFDM(0xc3), 0x7fff);
 	}
@@ -4923,16 +4881,16 @@ bwn_has_hwpctl(struct bwn_mac *mac)
 static void
 bwn_phy_init_b5(struct bwn_mac *mac)
 {
-	struct siba_softc *bus = mac->mac_sd->sd_bus;
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint16_t offset, value;
 	uint8_t old_channel;
 
 	if (phy->analog == 1)
 		BWN_RF_SET(mac, 0x007a, 0x0050);
-	if ((bus->siba_board_vendor != SIBA_BOARDVENDOR_BCM) &&
-	    (bus->siba_board_type != SIBA_BOARD_BU4306)) {
+	if ((siba_get_pci_subvendor(sc->sc_dev) != SIBA_BOARDVENDOR_BCM) &&
+	    (siba_get_pci_subdevice(sc->sc_dev) != SIBA_BOARD_BU4306)) {
 		value = 0x2120;
 		for (offset = 0x00a8; offset < 0x00c7; offset++) {
 			BWN_PHY_WRITE(mac, offset, value);
@@ -5021,6 +4979,7 @@ bwn_loopback_calcgain(struct bwn_mac *ma
 {
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint16_t backup_phy[16] = { 0 };
 	uint16_t backup_radio[3];
 	uint16_t backup_bband;
@@ -5099,7 +5058,7 @@ bwn_loopback_calcgain(struct bwn_mac *ma
 	BWN_PHY_SET(mac, BWN_PHY_RFOVER, 0x0100);
 	BWN_PHY_MASK(mac, BWN_PHY_RFOVERVAL, 0xcfff);
 
-	if (mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_EXTLNA) {
+	if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_EXTLNA) {
 		if (phy->rev >= 7) {
 			BWN_PHY_SET(mac, BWN_PHY_RFOVER, 0x0800);
 			BWN_PHY_SET(mac, BWN_PHY_RFOVERVAL, 0x8000);
@@ -5399,6 +5358,7 @@ bwn_phy_init_b6(struct bwn_mac *mac)
 {
 	struct bwn_phy *phy = &mac->mac_phy;
 	struct bwn_phy_g *pg = &phy->phy_g;
+	struct bwn_softc *sc = mac->mac_sc;
 	uint16_t offset, val;
 	uint8_t old_channel;
 
@@ -5428,7 +5388,7 @@ bwn_phy_init_b6(struct bwn_mac *mac)
 		BWN_RF_WRITE(mac, 0x5a, 0x88);
 		BWN_RF_WRITE(mac, 0x5b, 0x6b);
 		BWN_RF_WRITE(mac, 0x5c, 0x0f);
-		if (mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_ALTIQ) {
+		if (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_ALTIQ) {
 			BWN_RF_WRITE(mac, 0x5d, 0xfa);
 			BWN_RF_WRITE(mac, 0x5e, 0xd8);
 		} else {
@@ -5509,6 +5469,7 @@ static void
 bwn_phy_init_a(struct bwn_mac *mac)
 {
 	struct bwn_phy *phy = &mac->mac_phy;
+	struct bwn_softc *sc = mac->mac_sc;
 
 	KASSERT(phy->type == BWN_PHYTYPE_A || phy->type == BWN_PHYTYPE_G,
 	    ("%s:%d: fail", __func__, __LINE__));
@@ -5525,7 +5486,7 @@ bwn_phy_init_a(struct bwn_mac *mac)
 	bwn_wa_init(mac);
 
 	if (phy->type == BWN_PHYTYPE_G &&
-	    (mac->mac_sd->sd_bus->siba_sprom.bf_lo & BWN_BFL_PACTRL))
+	    (siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_PACTRL))
 		BWN_PHY_SETMASK(mac, BWN_PHY_OFDM(0x6e), 0xe000, 0x3cf);
 }
 
@@ -5776,7 +5737,7 @@ static void
 bwn_wa_init(struct bwn_mac *mac)
 {
 	struct bwn_phy *phy = &mac->mac_phy;
-	struct siba_softc *bus = mac->mac_sd->sd_bus;
+	struct bwn_softc *sc = mac->mac_sc;
 
 	KASSERT(phy->type == BWN_PHYTYPE_G, ("%s fail", __func__));
 
@@ -5795,9 +5756,9 @@ bwn_wa_init(struct bwn_mac *mac)
 		KASSERT(0 == 1, ("%s:%d: fail", __func__, __LINE__));
 	}
 
-	if (bus->siba_board_vendor != SIBA_BOARDVENDOR_BCM ||
-	    bus->siba_board_type != SIBA_BOARD_BU4306 ||
-	    bus->siba_board_rev != 0x17) {
+	if (siba_get_pci_subvendor(sc->sc_dev) != SIBA_BOARDVENDOR_BCM ||
+	    siba_get_pci_subdevice(sc->sc_dev) != SIBA_BOARD_BU4306 ||
+	    siba_get_pci_revid(sc->sc_dev) != 0x17) {
 		if (phy->rev < 2) {
 			bwn_ofdmtab_write_2(mac, BWN_OFDMTAB_GAINX_R1, 1,
 			    0x0002);
@@ -5806,7 +5767,8 @@ bwn_wa_init(struct bwn_mac *mac)
 		} else {
 			bwn_ofdmtab_write_2(mac, BWN_OFDMTAB_GAINX, 1, 0x0002);
 			bwn_ofdmtab_write_2(mac, BWN_OFDMTAB_GAINX, 2, 0x0001);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 20:07:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 395EA1065670;
	Tue,  9 Mar 2010 20:07:42 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D3508FC13;
	Tue,  9 Mar 2010 20: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 o29K7fAM016672;
	Tue, 9 Mar 2010 20:07:41 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29K7fj6016666;
	Tue, 9 Mar 2010 20:07:41 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <201003092007.o29K7fj6016666@svn.freebsd.org>
From: Weongyo Jeong 
Date: Tue, 9 Mar 2010 20:07: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: r204923 - in head/sys/dev: bwn siba
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 20:07:42 -0000

Author: weongyo
Date: Tue Mar  9 20:07:41 2010
New Revision: 204923
URL: http://svn.freebsd.org/changeset/base/204923

Log:
  uses KOBJMETHOD_END macro to indicate the end of method table.
  
  Submitted by:	yongari

Modified:
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/siba/siba.c
  head/sys/dev/siba/siba_bwn.c
  head/sys/dev/siba/siba_cc.c
  head/sys/dev/siba/siba_pcib.c

Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c	Tue Mar  9 19:58:00 2010	(r204922)
+++ head/sys/dev/bwn/if_bwn.c	Tue Mar  9 20:07:41 2010	(r204923)
@@ -14270,7 +14270,7 @@ static device_method_t bwn_methods[] = {
 	DEVMETHOD(device_detach,	bwn_detach),
 	DEVMETHOD(device_suspend,	bwn_suspend),
 	DEVMETHOD(device_resume,	bwn_resume),
-	{ 0,0 }
+	KOBJMETHOD_END
 };
 static driver_t bwn_driver = {
 	"bwn",

Modified: head/sys/dev/siba/siba.c
==============================================================================
--- head/sys/dev/siba/siba.c	Tue Mar  9 19:58:00 2010	(r204922)
+++ head/sys/dev/siba/siba.c	Tue Mar  9 20:07:41 2010	(r204923)
@@ -632,7 +632,7 @@ static device_method_t siba_methods[] = 
 	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 	DEVMETHOD(bus_write_ivar,	siba_write_ivar),
 
-	{0, 0},
+	KOBJMETHOD_END
 };
 
 static driver_t siba_driver = {

Modified: head/sys/dev/siba/siba_bwn.c
==============================================================================
--- head/sys/dev/siba/siba_bwn.c	Tue Mar  9 19:58:00 2010	(r204922)
+++ head/sys/dev/siba/siba_bwn.c	Tue Mar  9 20:07:41 2010	(r204923)
@@ -409,7 +409,7 @@ static device_method_t siba_bwn_methods[
 	DEVMETHOD(pci_release_msi,	siba_bwn_release_msi),
 	DEVMETHOD(pci_msi_count,	siba_bwn_msi_count),
 
-	{ 0,0 }
+	KOBJMETHOD_END
 };
 static driver_t siba_bwn_driver = {
 	"siba_bwn",

Modified: head/sys/dev/siba/siba_cc.c
==============================================================================
--- head/sys/dev/siba/siba_cc.c	Tue Mar  9 19:58:00 2010	(r204922)
+++ head/sys/dev/siba/siba_cc.c	Tue Mar  9 20:07:41 2010	(r204923)
@@ -141,7 +141,7 @@ static device_method_t siba_cc_methods[]
 	DEVMETHOD(device_attach,	siba_cc_attach),
 	DEVMETHOD(device_probe,		siba_cc_probe),
 
-	{0, 0},
+	KOBJMETHOD_END
 };
 
 static driver_t siba_cc_driver = {

Modified: head/sys/dev/siba/siba_pcib.c
==============================================================================
--- head/sys/dev/siba/siba_pcib.c	Tue Mar  9 19:58:00 2010	(r204922)
+++ head/sys/dev/siba/siba_pcib.c	Tue Mar  9 20:07:41 2010	(r204923)
@@ -419,7 +419,7 @@ static device_method_t siba_pcib_methods
 	DEVMETHOD(pcib_write_config,	siba_pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,	siba_pcib_route_interrupt),
 
-	{0, 0},
+	KOBJMETHOD_END
 };
 
 static driver_t siba_pcib_driver = {

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 20:58:16 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 07FA0106566C;
	Tue,  9 Mar 2010 20:58:16 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EAC1B8FC08;
	Tue,  9 Mar 2010 20:58: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 o29KwFEu028068;
	Tue, 9 Mar 2010 20:58:15 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29KwFAh028066;
	Tue, 9 Mar 2010 20:58:15 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003092058.o29KwFAh028066@svn.freebsd.org>
From: Ed Schouten 
Date: Tue, 9 Mar 2010 20:58: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: r204925 - head/contrib/ipfilter/ipsend
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 20:58:16 -0000

Author: ed
Date: Tue Mar  9 20:58:15 2010
New Revision: 204925
URL: http://svn.freebsd.org/changeset/base/204925

Log:
  Remove unneeded include of .
  
  This header file should not be included by anything.

Modified:
  head/contrib/ipfilter/ipsend/sbpf.c

Modified: head/contrib/ipfilter/ipsend/sbpf.c
==============================================================================
--- head/contrib/ipfilter/ipsend/sbpf.c	Tue Mar  9 20:25:40 2010	(r204924)
+++ head/contrib/ipfilter/ipsend/sbpf.c	Tue Mar  9 20:58:15 2010	(r204925)
@@ -9,7 +9,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 21:01:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CBE92106566C;
	Tue,  9 Mar 2010 21:01:12 +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 B9FF58FC1B;
	Tue,  9 Mar 2010 21:01: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 o29L1Cpv028788;
	Tue, 9 Mar 2010 21:01:12 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29L1C3s028784;
	Tue, 9 Mar 2010 21:01:12 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003092101.o29L1C3s028784@svn.freebsd.org>
From: Ed Schouten 
Date: Tue, 9 Mar 2010 21:01: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: r204926 - in head: include lib/libcompat sys/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 21:01:12 -0000

Author: ed
Date: Tue Mar  9 21:01:12 2010
New Revision: 204926
URL: http://svn.freebsd.org/changeset/base/204926

Log:
  Add warnings to  and .
  
  These header files only provide functionality that can be used in
  combination with libcompat. In order to prevent people from including
  them without any actual use (which happens a lot with ),
  put a warning here to make people more aware.
  
  This means we have to lower WARNS for libcompat, which is no big deal.

Modified:
  head/include/regexp.h
  head/lib/libcompat/Makefile
  head/sys/sys/timeb.h

Modified: head/include/regexp.h
==============================================================================
--- head/include/regexp.h	Tue Mar  9 20:58:15 2010	(r204925)
+++ head/include/regexp.h	Tue Mar  9 21:01:12 2010	(r204926)
@@ -37,6 +37,10 @@
 #ifndef	_REGEXP_H_
 #define	_REGEXP_H_
 
+#ifdef __GNUC__
+#warning "this file includes  which is deprecated, use  instead"
+#endif
+
 /*
  * Definitions etc. for regexp(3) routines.
  *

Modified: head/lib/libcompat/Makefile
==============================================================================
--- head/lib/libcompat/Makefile	Tue Mar  9 20:58:15 2010	(r204925)
+++ head/lib/libcompat/Makefile	Tue Mar  9 21:01:12 2010	(r204926)
@@ -5,7 +5,7 @@ LIB=compat
 CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
 NO_PIC=
 
-WARNS?=	1
+WARNS?=	0
 
 .PATH:	${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \
 	${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \

Modified: head/sys/sys/timeb.h
==============================================================================
--- head/sys/sys/timeb.h	Tue Mar  9 20:58:15 2010	(r204925)
+++ head/sys/sys/timeb.h	Tue Mar  9 21:01:12 2010	(r204926)
@@ -38,6 +38,10 @@
 #ifndef _SYS_TIMEB_H_
 #define _SYS_TIMEB_H_
 
+#ifdef __GNUC__
+#warning "this file includes  which is deprecated"
+#endif
+
 #include 
 
 #ifndef _TIME_T_DECLARED

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 21:06:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71D7F1065673;
	Tue,  9 Mar 2010 21:06:01 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6045B8FC12;
	Tue,  9 Mar 2010 21:06: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 o29L610k029913;
	Tue, 9 Mar 2010 21:06:01 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29L61Ca029911;
	Tue, 9 Mar 2010 21:06:01 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201003092106.o29L61Ca029911@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Tue, 9 Mar 2010 21:06: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: r204927 - head/usr.bin/uniq
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 21:06:01 -0000

Author: ache
Date: Tue Mar  9 21:06:01 2010
New Revision: 204927
URL: http://svn.freebsd.org/changeset/base/204927

Log:
  Add SIZE_MAX overflow check

Modified:
  head/usr.bin/uniq/uniq.c

Modified: head/usr.bin/uniq/uniq.c
==============================================================================
--- head/usr.bin/uniq/uniq.c	Tue Mar  9 21:01:12 2010	(r204926)
+++ head/usr.bin/uniq/uniq.c	Tue Mar  9 21:06:01 2010	(r204927)
@@ -196,6 +196,8 @@ convert(const char *str)
 
 	if ((n = mbstowcs(NULL, str, 0)) == (size_t)-1)
 		return (NULL);
+	if (SIZE_MAX / sizeof(*buf) < n + 1)
+		errx(1, "conversion buffer length overflow");
 	if ((buf = malloc((n + 1) * sizeof(*buf))) == NULL)
 		err(1, "malloc");
 	if (mbstowcs(buf, str, n + 1) != n)

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 21:06:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2F451065672;
	Tue,  9 Mar 2010 21:06:17 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C13598FC0C;
	Tue,  9 Mar 2010 21:06: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 o29L6HNP030016;
	Tue, 9 Mar 2010 21:06:17 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29L6HJv030014;
	Tue, 9 Mar 2010 21:06:17 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201003092106.o29L6HJv030014@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Tue, 9 Mar 2010 21:06: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: r204928 - head/usr.bin/comm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 21:06:17 -0000

Author: ache
Date: Tue Mar  9 21:06:17 2010
New Revision: 204928
URL: http://svn.freebsd.org/changeset/base/204928

Log:
  Add SIZE_MAX overflow check

Modified:
  head/usr.bin/comm/comm.c

Modified: head/usr.bin/comm/comm.c
==============================================================================
--- head/usr.bin/comm/comm.c	Tue Mar  9 21:06:01 2010	(r204927)
+++ head/usr.bin/comm/comm.c	Tue Mar  9 21:06:17 2010	(r204928)
@@ -201,6 +201,8 @@ convert(const char *str)
 
 	if ((n = mbstowcs(NULL, str, 0)) == (size_t)-1)
 		return (NULL);
+	if (SIZE_MAX / sizeof(*buf) < n + 1)
+		errx(1, "conversion buffer length overflow");
 	if ((buf = malloc((n + 1) * sizeof(*buf))) == NULL)
 		err(1, "malloc");
 	if (mbstowcs(buf, str, n + 1) != n)

From owner-svn-src-head@FreeBSD.ORG  Tue Mar  9 22:42:24 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5444F106566B;
	Tue,  9 Mar 2010 22:42:24 +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 411468FC08;
	Tue,  9 Mar 2010 22:42:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o29MgOp7051536;
	Tue, 9 Mar 2010 22:42:24 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o29MgOTW051534;
	Tue, 9 Mar 2010 22:42:24 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201003092242.o29MgOTW051534@svn.freebsd.org>
From: Xin LI 
Date: Tue, 9 Mar 2010 22:42:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204934 - head/sys/contrib/x86emu
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 09 Mar 2010 22:42:24 -0000

Author: delphij
Date: Tue Mar  9 22:42:24 2010
New Revision: 204934
URL: http://svn.freebsd.org/changeset/base/204934

Log:
  Integrate OpenBSD rev 1.5 of x86emu.c.

Modified:
  head/sys/contrib/x86emu/x86emu.c
Directory Properties:
  head/sys/contrib/x86emu/   (props changed)

Modified: head/sys/contrib/x86emu/x86emu.c
==============================================================================
--- head/sys/contrib/x86emu/x86emu.c	Tue Mar  9 22:40:05 2010	(r204933)
+++ head/sys/contrib/x86emu/x86emu.c	Tue Mar  9 22:42:24 2010	(r204934)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: x86emu.c,v 1.4 2009/06/18 14:19:21 pirofti Exp $	*/
+/*	$OpenBSD: x86emu.c,v 1.5 2010/02/17 15:09:47 pirofti Exp $	*/
 /*	$NetBSD: x86emu.c,v 1.7 2009/02/03 19:26:29 joerg Exp $	*/
 
 /*
@@ -235,7 +235,8 @@ x86emu_exec(struct x86emu *emu)
 
 	for (;;) {
 		if (emu->x86.intr) {
-			if (((emu->x86.intr & INTR_SYNCH) && (emu->x86.intno == 0 || emu->x86.intno == 2)) ||
+			if (((emu->x86.intr & INTR_SYNCH) &&
+			    (emu->x86.intno == 0 || emu->x86.intno == 2)) ||
 			    !ACCESS_FLAG(F_IF)) {
 				x86emu_intr_handle(emu);
 			}
@@ -796,9 +797,9 @@ decode_rh_seg_register(struct x86emu *em
 		x86emu_halt_sys(emu);
 	}
 }
+
 /*
- *
- * return offset from the SIB Byte
+ * Return offset from the SIB Byte.
  */
 static uint32_t 
 decode_sib_address(struct x86emu *emu, int sib, int mod)
@@ -1107,7 +1108,8 @@ common_dec_word_long(struct x86emu *emu,
 }
 
 static void
-common_binop_byte_rm_r(struct x86emu *emu, uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
+common_binop_byte_rm_r(struct x86emu *emu, 
+    uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
 {
 	uint32_t destoffset;
 	uint8_t *destreg, srcval;
@@ -1127,7 +1129,8 @@ common_binop_byte_rm_r(struct x86emu *em
 }
 
 static void
-common_binop_ns_byte_rm_r(struct x86emu *emu, void (*binop)(struct x86emu *, uint8_t, uint8_t))
+common_binop_ns_byte_rm_r(struct x86emu *emu, 
+    void (*binop)(struct x86emu *, uint8_t, uint8_t))
 {
 	uint32_t destoffset;
 	uint8_t destval, srcval;
@@ -1144,7 +1147,8 @@ common_binop_ns_byte_rm_r(struct x86emu 
 }
 
 static void
-common_binop_word_rm_r(struct x86emu *emu, uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
+common_binop_word_rm_r(struct x86emu *emu,
+    uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
 {
 	uint32_t destoffset;
 	uint16_t destval, *destreg, srcval;
@@ -1163,7 +1167,8 @@ common_binop_word_rm_r(struct x86emu *em
 }
 
 static void
-common_binop_byte_r_rm(struct x86emu *emu, uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
+common_binop_byte_r_rm(struct x86emu *emu,
+    uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
 {
 	uint8_t *destreg, srcval;
 	uint32_t srcoffset;
@@ -1180,7 +1185,8 @@ common_binop_byte_r_rm(struct x86emu *em
 }
 
 static void
-common_binop_long_rm_r(struct x86emu *emu, uint32_t (*binop)(struct x86emu *, uint32_t, uint32_t))
+common_binop_long_rm_r(struct x86emu *emu,
+    uint32_t (*binop)(struct x86emu *, uint32_t, uint32_t))
 {
 	uint32_t destoffset;
 	uint32_t destval, *destreg, srcval;
@@ -1200,7 +1206,8 @@ common_binop_long_rm_r(struct x86emu *em
 
 static void
 common_binop_word_long_rm_r(struct x86emu *emu,
-    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t), uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
+    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
+    uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
 {
 	if (emu->x86.mode & SYSMODE_PREFIX_DATA)
 		common_binop_long_rm_r(emu, binop32);
@@ -1209,7 +1216,8 @@ common_binop_word_long_rm_r(struct x86em
 }
 
 static void
-common_binop_ns_word_rm_r(struct x86emu *emu, void (*binop)(struct x86emu *, uint16_t, uint16_t))
+common_binop_ns_word_rm_r(struct x86emu *emu,
+    void (*binop)(struct x86emu *, uint16_t, uint16_t))
 {
 	uint32_t destoffset;
 	uint16_t destval, srcval;
@@ -1227,7 +1235,8 @@ common_binop_ns_word_rm_r(struct x86emu 
 
 
 static void
-common_binop_ns_long_rm_r(struct x86emu *emu, void (*binop)(struct x86emu *, uint32_t, uint32_t))
+common_binop_ns_long_rm_r(struct x86emu *emu,
+    void (*binop)(struct x86emu *, uint32_t, uint32_t))
 {
 	uint32_t destoffset;
 	uint32_t destval, srcval;
@@ -1245,7 +1254,8 @@ common_binop_ns_long_rm_r(struct x86emu 
 
 static void
 common_binop_ns_word_long_rm_r(struct x86emu *emu,
-    void (*binop16)(struct x86emu *, uint16_t, uint16_t), void (*binop32)(struct x86emu *, uint32_t, uint32_t))
+    void (*binop16)(struct x86emu *, uint16_t, uint16_t),
+    void (*binop32)(struct x86emu *, uint32_t, uint32_t))
 {
 	if (emu->x86.mode & SYSMODE_PREFIX_DATA)
 		common_binop_ns_long_rm_r(emu, binop32);
@@ -1254,7 +1264,8 @@ common_binop_ns_word_long_rm_r(struct x8
 }
 
 static void
-common_binop_long_r_rm(struct x86emu *emu, uint32_t (*binop)(struct x86emu *, uint32_t, uint32_t))
+common_binop_long_r_rm(struct x86emu *emu,
+    uint32_t (*binop)(struct x86emu *, uint32_t, uint32_t))
 {
 	uint32_t srcoffset;
 	uint32_t *destreg, srcval;
@@ -1271,7 +1282,8 @@ common_binop_long_r_rm(struct x86emu *em
 }
 
 static void
-common_binop_word_r_rm(struct x86emu *emu, uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
+common_binop_word_r_rm(struct x86emu *emu,
+    uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
 {
 	uint32_t srcoffset;
 	uint16_t *destreg, srcval;
@@ -1289,7 +1301,8 @@ common_binop_word_r_rm(struct x86emu *em
 
 static void
 common_binop_word_long_r_rm(struct x86emu *emu,
-    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t), uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
+    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
+    uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
 {
 	if (emu->x86.mode & SYSMODE_PREFIX_DATA)
 		common_binop_long_r_rm(emu, binop32);
@@ -1298,7 +1311,8 @@ common_binop_word_long_r_rm(struct x86em
 }
 
 static void
-common_binop_byte_imm(struct x86emu *emu, uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
+common_binop_byte_imm(struct x86emu *emu,
+    uint8_t (*binop)(struct x86emu *, uint8_t, uint8_t))
 {
 	uint8_t srcval;
 
@@ -1308,7 +1322,8 @@ common_binop_byte_imm(struct x86emu *emu
 
 static void
 common_binop_word_long_imm(struct x86emu *emu,
-    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t), uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
+    uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
+    uint32_t (*binop32)(struct x86emu *, uint32_t, uint32_t))
 {
 	if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
 		uint32_t srcval;
@@ -1765,7 +1780,8 @@ x86emuOp_opc80_byte_RM_IMM(struct x86emu
 }
 
 static
-uint16_t(* const opc81_word_operation[]) (struct x86emu *, uint16_t d, uint16_t s) =
+uint16_t(* const opc81_word_operation[])
+    (struct x86emu *, uint16_t d, uint16_t s) =
 {
 	add_word,		/* 00 */
 	or_word,		/* 01 */
@@ -1778,7 +1794,8 @@ uint16_t(* const opc81_word_operation[])
 };
 
 static
-uint32_t(* const opc81_long_operation[]) (struct x86emu *, uint32_t d, uint32_t s) =
+uint32_t(* const opc81_long_operation[])
+    (struct x86emu *, uint32_t d, uint32_t s) =
 {
 	add_long,		/* 00 */
 	or_long,		/* 01 */
@@ -1840,7 +1857,8 @@ x86emuOp_opc81_word_RM_IMM(struct x86emu
 }
 
 static
-uint8_t(* const opc82_byte_operation[]) (struct x86emu *, uint8_t s, uint8_t d) =
+uint8_t(* const opc82_byte_operation[])
+    (struct x86emu *, uint8_t s, uint8_t d) =
 {
 	add_byte,		/* 00 */
 	or_byte,		/* 01 *//* YYY UNUSED ???? */
@@ -1876,7 +1894,8 @@ x86emuOp_opc82_byte_RM_IMM(struct x86emu
 }
 
 static
-uint16_t(* const opc83_word_operation[]) (struct x86emu *, uint16_t s, uint16_t d) =
+uint16_t(* const opc83_word_operation[])
+    (struct x86emu *, uint16_t s, uint16_t d) =
 {
 	add_word,		/* 00 */
 	or_word,		/* 01 *//* YYY UNUSED ???? */
@@ -1889,7 +1908,8 @@ uint16_t(* const opc83_word_operation[])
 };
 
 static
-uint32_t(* const opc83_long_operation[]) (struct x86emu *, uint32_t s, uint32_t d) =
+uint32_t(* const opc83_long_operation[])
+    (struct x86emu *, uint32_t s, uint32_t d) =
 {
 	add_long,		/* 00 */
 	or_long,		/* 01 *//* YYY UNUSED ???? */
@@ -2603,7 +2623,8 @@ x86emuOp_movs_word(struct x86emu *emu)
 			store_long(emu, emu->x86.R_ES, emu->x86.R_DI, val);
 		} else {
 			val = fetch_data_word(emu, emu->x86.R_SI);
-			store_word(emu, emu->x86.R_ES, emu->x86.R_DI, (uint16_t) val);
+			store_word(emu, emu->x86.R_ES, emu->x86.R_DI,
+			    (uint16_t) val);
 		}
 		emu->x86.R_SI += inc;
 		emu->x86.R_DI += inc;
@@ -2689,11 +2710,13 @@ x86emuOp_cmps_word(struct x86emu *emu)
 		while (emu->x86.R_CX != 0) {
 			if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
 				val1 = fetch_data_long(emu, emu->x86.R_SI);
-				val2 = fetch_long(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val2 = fetch_long(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_long(emu, val1, val2);
 			} else {
 				val1 = fetch_data_word(emu, emu->x86.R_SI);
-				val2 = fetch_word(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val2 = fetch_word(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_word(emu, (uint16_t) val1, (uint16_t) val2);
 			}
 			emu->x86.R_CX -= 1;
@@ -2709,11 +2732,13 @@ x86emuOp_cmps_word(struct x86emu *emu)
 		while (emu->x86.R_CX != 0) {
 			if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
 				val1 = fetch_data_long(emu, emu->x86.R_SI);
-				val2 = fetch_long(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val2 = fetch_long(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_long(emu, val1, val2);
 			} else {
 				val1 = fetch_data_word(emu, emu->x86.R_SI);
-				val2 = fetch_word(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val2 = fetch_word(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_word(emu, (uint16_t) val1, (uint16_t) val2);
 			}
 			emu->x86.R_CX -= 1;
@@ -2769,7 +2794,8 @@ x86emuOp_stos_byte(struct x86emu *emu)
 		/* dont care whether REPE or REPNE */
 		/* move them until CX is ZERO. */
 		while (emu->x86.R_CX != 0) {
-			store_byte(emu, emu->x86.R_ES, emu->x86.R_DI, emu->x86.R_AL);
+			store_byte(emu, emu->x86.R_ES, emu->x86.R_DI,
+			    emu->x86.R_AL);
 			emu->x86.R_CX -= 1;
 			emu->x86.R_DI += inc;
 		}
@@ -2808,9 +2834,11 @@ x86emuOp_stos_word(struct x86emu *emu)
 	}
 	while (count--) {
 		if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
-			store_long(emu, emu->x86.R_ES, emu->x86.R_DI, emu->x86.R_EAX);
+			store_long(emu, emu->x86.R_ES, emu->x86.R_DI,
+			    emu->x86.R_EAX);
 		} else {
-			store_word(emu, emu->x86.R_ES, emu->x86.R_DI, emu->x86.R_AX);
+			store_word(emu, emu->x86.R_ES, emu->x86.R_DI,
+			    emu->x86.R_AX);
 		}
 		emu->x86.R_DI += inc;
 	}
@@ -2948,10 +2976,12 @@ x86emuOp_scas_word(struct x86emu *emu)
 		/* move them until CX is ZERO. */
 		while (emu->x86.R_CX != 0) {
 			if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
-				val = fetch_long(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val = fetch_long(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_long(emu, emu->x86.R_EAX, val);
 			} else {
-				val = fetch_word(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val = fetch_word(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_word(emu, emu->x86.R_AX, (uint16_t) val);
 			}
 			emu->x86.R_CX -= 1;
@@ -2965,10 +2995,12 @@ x86emuOp_scas_word(struct x86emu *emu)
 		/* move them until CX is ZERO. */
 		while (emu->x86.R_CX != 0) {
 			if (emu->x86.mode & SYSMODE_PREFIX_DATA) {
-				val = fetch_long(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val = fetch_long(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_long(emu, emu->x86.R_EAX, val);
 			} else {
-				val = fetch_word(emu, emu->x86.R_ES, emu->x86.R_DI);
+				val = fetch_word(emu, emu->x86.R_ES,
+				    emu->x86.R_DI);
 				cmp_word(emu, emu->x86.R_AX, (uint16_t) val);
 			}
 			emu->x86.R_CX -= 1;
@@ -3094,7 +3126,8 @@ x86emuOp_mov_word_DI_IMM(struct x86emu *
 }
 /* used by opcodes c0, d0, and d2. */
 static
-uint8_t(* const opcD0_byte_operation[]) (struct x86emu *, uint8_t d, uint8_t s) =
+uint8_t(* const opcD0_byte_operation[])
+    (struct x86emu *, uint8_t d, uint8_t s) =
 {
 	rol_byte,
 	ror_byte,
@@ -3128,7 +3161,8 @@ x86emuOp_opcC0_byte_RM_MEM(struct x86emu
 }
 /* used by opcodes c1, d1, and d3. */
 static
-uint16_t(* const opcD1_word_operation[]) (struct x86emu *, uint16_t s, uint8_t d) =
+uint16_t(* const opcD1_word_operation[])
+    (struct x86emu *, uint16_t s, uint8_t d) =
 {
 	rol_word,
 	ror_word,
@@ -3141,7 +3175,8 @@ uint16_t(* const opcD1_word_operation[])
 };
 /* used by opcodes c1, d1, and d3. */
 static
-uint32_t(* const opcD1_long_operation[]) (struct x86emu *, uint32_t s, uint8_t d) =
+uint32_t(* const opcD1_long_operation[])
+    (struct x86emu *, uint32_t s, uint8_t d) =
 {
 	rol_long,
 	ror_long,
@@ -3172,13 +3207,15 @@ x86emuOp_opcC1_word_RM_MEM(struct x86emu
 		uint32_t destval;
 
 		destval = decode_and_fetch_long_imm8(emu, &amt);
-		destval = (*opcD1_long_operation[emu->cur_rh]) (emu, destval, amt);
+		destval = (*opcD1_long_operation[emu->cur_rh])
+		    (emu, destval, amt);
 		write_back_long(emu, destval);
 	} else {
 		uint16_t destval;
 
 		destval = decode_and_fetch_word_imm8(emu, &amt);
-		destval = (*opcD1_word_operation[emu->cur_rh]) (emu, destval, amt);
+		destval = (*opcD1_word_operation[emu->cur_rh])
+		    (emu, destval, amt);
 		write_back_word(emu, destval);
 	}
 }
@@ -3295,7 +3332,8 @@ x86emuOp_enter(struct x86emu *emu)
 	if (nesting > 0) {
 		for (i = 1; i < nesting; i++) {
 			emu->x86.R_BP -= 2;
-			push_word(emu, fetch_word(emu, emu->x86.R_SS, emu->x86.R_BP));
+			push_word(emu, fetch_word(emu, emu->x86.R_SS,
+			    emu->x86.R_BP));
 		}
 		push_word(emu, frame_pointer);
 	}
@@ -3413,14 +3451,14 @@ x86emuOp_opcD1_word_RM_1(struct x86emu *
 
 		fetch_decode_modrm(emu);
 		destval = decode_and_fetch_long(emu);
-		destval = (*opcD1_long_operation[emu->cur_rh]) (emu, destval, 1);
+		destval = (*opcD1_long_operation[emu->cur_rh])(emu, destval, 1);
 		write_back_long(emu, destval);
 	} else {
 		uint16_t destval;
 
 		fetch_decode_modrm(emu);
 		destval = decode_and_fetch_word(emu);
-		destval = (*opcD1_word_operation[emu->cur_rh]) (emu, destval, 1);
+		destval = (*opcD1_word_operation[emu->cur_rh])(emu, destval, 1);
 		write_back_word(emu, destval);
 	}
 }
@@ -3436,7 +3474,8 @@ x86emuOp_opcD2_byte_RM_CL(struct x86emu 
 
 	fetch_decode_modrm(emu);
 	destval = decode_and_fetch_byte(emu);
-	destval = (*opcD0_byte_operation[emu->cur_rh]) (emu, destval, emu->x86.R_CL);
+	destval = (*opcD0_byte_operation[emu->cur_rh])
+	    (emu, destval, emu->x86.R_CL);
 	write_back_byte(emu, destval);
 }
 
@@ -3452,14 +3491,16 @@ x86emuOp_opcD3_word_RM_CL(struct x86emu 
 
 		fetch_decode_modrm(emu);
 		destval = decode_and_fetch_long(emu);
-		destval = (*opcD1_long_operation[emu->cur_rh]) (emu, destval, emu->x86.R_CL);
+		destval = (*opcD1_long_operation[emu->cur_rh])
+		    (emu, destval, emu->x86.R_CL);
 		write_back_long(emu, destval);
 	} else {
 		uint16_t destval;
 
 		fetch_decode_modrm(emu);
 		destval = decode_and_fetch_word(emu);
-		destval = (*opcD1_word_operation[emu->cur_rh]) (emu, destval, emu->x86.R_CL);
+		destval = (*opcD1_word_operation[emu->cur_rh])
+		    (emu, destval, emu->x86.R_CL);
 		write_back_word(emu, destval);
 	}
 }
@@ -4118,7 +4159,8 @@ x86emuOp_opcFF_word_RM(struct x86emu *em
 
 	/* Yet another special case instruction. */
 	fetch_decode_modrm(emu);
-	if ((emu->cur_mod == 3 && (emu->cur_rh == 3 || emu->cur_rh == 5)) || emu->cur_rh == 7)
+	if ((emu->cur_mod == 3 && (emu->cur_rh == 3 || emu->cur_rh == 5)) ||
+	    emu->cur_rh == 7)
 		x86emu_halt_sys(emu);
 	if (emu->cur_rh == 0 || emu->cur_rh == 1 || emu->cur_rh == 6) {
 		if (emu->x86.mode & SYSMODE_PREFIX_DATA)
@@ -5153,7 +5195,9 @@ common_shift(struct x86emu *emu, int shi
 		common_shift16(emu, shift_left, use_cl);
 }
 
-/*----------------------------- Implementation ----------------------------*/
+/*
+ * Implementation
+ */
 #define xorl(a,b)   ((a) && !(b)) || (!(a) && (b))
 
 
@@ -5669,18 +5713,21 @@ x86emu_exec_two_byte(struct x86emu * emu
 		common_jmp_long(emu, !ACCESS_FLAG(F_PF));
 		break;
 	case 0x8c:
-		common_jmp_long(emu, xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)));
+		common_jmp_long(emu, xorl(ACCESS_FLAG(F_SF),
+		    ACCESS_FLAG(F_OF)));
 		break;
 	case 0x8d:
-		common_jmp_long(emu, !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF))));
+		common_jmp_long(emu, !(xorl(ACCESS_FLAG(F_SF),
+		    ACCESS_FLAG(F_OF))));
 		break;
 	case 0x8e:
-		common_jmp_long(emu,
-		    (xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)));
+		common_jmp_long(emu, (xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF))
+		    || ACCESS_FLAG(F_ZF)));
 		break;
 	case 0x8f:
-		common_jmp_long(emu,
-		    !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)));
+		common_jmp_long(emu, 
+		    !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) ||
+		    ACCESS_FLAG(F_ZF)));
 		break;
 
 	case 0x90:
@@ -5720,10 +5767,12 @@ x86emu_exec_two_byte(struct x86emu * emu
 		common_set_byte(emu, !ACCESS_FLAG(F_PF));
 		break;
 	case 0x9c:
-		common_set_byte(emu, xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)));
+		common_set_byte(emu, xorl(ACCESS_FLAG(F_SF),
+		    ACCESS_FLAG(F_OF)));
 		break;
 	case 0x9d:
-		common_set_byte(emu, xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)));
+		common_set_byte(emu, xorl(ACCESS_FLAG(F_SF),
+		    ACCESS_FLAG(F_OF)));
 		break;
 	case 0x9e:
 		common_set_byte(emu,
@@ -5830,69 +5879,71 @@ x86emu_exec_two_byte(struct x86emu * emu
 }
 
 /*
-* Carry Chain Calculation
-*
-* This represents a somewhat expensive calculation which is
-* apparently required to emulate the setting of the OF and AF flag.
-* The latter is not so important, but the former is.  The overflow
-* flag is the XOR of the top two bits of the carry chain for an
-* addition (similar for subtraction).  Since we do not want to
-* simulate the addition in a bitwise manner, we try to calculate the
-* carry chain given the two operands and the result.
-*
-* So, given the following table, which represents the addition of two
-* bits, we can derive a formula for the carry chain.
-*
-* a   b   cin   r     cout
-* 0   0   0     0     0
-* 0   0   1     1     0
-* 0   1   0     1     0
-* 0   1   1     0     1
-* 1   0   0     1     0
-* 1   0   1     0     1
-* 1   1   0     0     1
-* 1   1   1     1     1
-*
-* Construction of table for cout:
-*
-* ab
-* r  \  00   01   11  10
-* |------------------
-* 0  |   0    1    1   1
-* 1  |   0    0    1   0
-*
-* By inspection, one gets:  cc = ab +  r'(a + b)
-*
-* That represents alot of operations, but NO CHOICE....
-*
-* Borrow Chain Calculation.
-*
-* The following table represents the subtraction of two bits, from
-* which we can derive a formula for the borrow chain.
-*
-* a   b   bin   r     bout
-* 0   0   0     0     0
-* 0   0   1     1     1
-* 0   1   0     1     1
-* 0   1   1     0     1
-* 1   0   0     1     0
-* 1   0   1     0     0
-* 1   1   0     0     0
-* 1   1   1     1     1
-*
-* Construction of table for cout:
-*
-* ab
-* r  \  00   01   11  10
-* |------------------
-* 0  |   0    1    0   0
-* 1  |   1    1    1   0
-*
-* By inspection, one gets:  bc = a'b +  r(a' + b)
-*
+ * Carry Chain Calculation
+ *
+ * This represents a somewhat expensive calculation which is
+ * apparently required to emulate the setting of the OF and AF flag.
+ * The latter is not so important, but the former is.  The overflow
+ * flag is the XOR of the top two bits of the carry chain for an
+ * addition (similar for subtraction).  Since we do not want to
+ * simulate the addition in a bitwise manner, we try to calculate the
+ * carry chain given the two operands and the result.
+ *
+ * So, given the following table, which represents the addition of two
+ * bits, we can derive a formula for the carry chain.
+ *
+ * a   b   cin   r     cout
+ * 0   0   0     0     0
+ * 0   0   1     1     0
+ * 0   1   0     1     0
+ * 0   1   1     0     1
+ * 1   0   0     1     0
+ * 1   0   1     0     1
+ * 1   1   0     0     1
+ * 1   1   1     1     1
+ *
+ * Construction of table for cout:
+ *
+ * ab
+ * r  \  00   01   11  10
+ * |------------------
+ * 0  |   0    1    1   1
+ * 1  |   0    0    1   0
+ *
+ * By inspection, one gets:  cc = ab +  r'(a + b)
+ *
+ * That represents alot of operations, but NO CHOICE....
+ *
+ * Borrow Chain Calculation.
+ *
+ * The following table represents the subtraction of two bits, from
+ * which we can derive a formula for the borrow chain.
+ *
+ * a   b   bin   r     bout
+ * 0   0   0     0     0
+ * 0   0   1     1     1
+ * 0   1   0     1     1
+ * 0   1   1     0     1
+ * 1   0   0     1     0
+ * 1   0   1     0     0
+ * 1   1   0     0     0
+ * 1   1   1     1     1
+ *
+ * Construction of table for cout:
+ *
+ * ab
+ * r  \  00   01   11  10
+ * |------------------
+ * 0  |   0    1    0   0
+ * 1  |   1    1    1   0
+ *
+ * By inspection, one gets:  bc = a'b +  r(a' + b)
+ *
  */
 
-/*------------------------- Global Variables ------------------------------*/
+/*
+ * Global Variables
+ */
 
 static uint32_t x86emu_parity_tab[8] =
 {
@@ -6654,33 +6705,38 @@ rcl_byte(struct x86emu *emu, uint8_t d, 
 	 * that's inefficient.  So the width is 9, and we split into three
 	 * parts:
 	 * 
-	 * The new carry flag   (was B_n) the stuff in B_n-1 .. B_0 the stuff in
-	 * B_7 .. B_n+1
+	 * The new carry flag   (was B_n) the stuff in B_n-1 .. B_0 the stuff
+	 * in B_7 .. B_n+1
 	 * 
-	 * The new rotate is done mod 9, and given this, for a rotation of n bits
-	 * (mod 9) the new carry flag is then located n bits from the MSB.
+	 * The new rotate is done mod 9, and given this, for a rotation of n
+	 * bits (mod 9) the new carry flag is then located n bits from the MSB.
 	 * The low part is then shifted up cnt bits, and the high part is or'd
 	 * in.  Using CAPS for new values, and lowercase for the original
 	 * values, this can be expressed as:
 	 * 
 	 * IF n > 0 1) CF <-  b_(8-n) 2) B_(7) .. B_(n)  <-  b_(8-(n+1)) .. b_0
-	 * 3) B_(n-1) <- cf 4) B_(n-2) .. B_0 <-  b_7 .. b_(8-(n-1)) */
+	 * 3) B_(n-1) <- cf 4) B_(n-2) .. B_0 <-  b_7 .. b_(8-(n-1))
+	 */
 	res = d;
 	if ((cnt = s % 9) != 0) {
 		/* extract the new CARRY FLAG. */
 		/* CF <-  b_(8-n)             */
 		cf = (d >> (8 - cnt)) & 0x1;
 
-		/* get the low stuff which rotated into the range B_7 .. B_cnt */
-		/* B_(7) .. B_(n)  <-  b_(8-(n+1)) .. b_0  */
-		/* note that the right hand side done by the mask */
+		/* 
+		 * Get the low stuff which rotated into the range B_7 .. B_cnt
+		 * B_(7) .. B_(n)  <-  b_(8-(n+1)) .. b_0
+		 * note that the right hand side done by the mask.
+		 */
 		res = (d << cnt) & 0xff;
 
-		/* now the high stuff which rotated around into the positions
-		 * B_cnt-2 .. B_0 */
-		/* B_(n-2) .. B_0 <-  b_7 .. b_(8-(n-1)) */
-		/* shift it downward, 7-(n-2) = 9-n positions. and mask off
-		 * the result before or'ing in. */
+		/* 
+		 * now the high stuff which rotated around into the positions
+		 * B_cnt-2 .. B_0
+		 * B_(n-2) .. B_0 <-  b_7 .. b_(8-(n-1))
+		 * shift it downward, 7-(n-2) = 9-n positions. and mask off
+		 * the result before or'ing in.
+		 */
 		mask = (1 << (cnt - 1)) - 1;
 		res |= (d >> (9 - cnt)) & mask;
 
@@ -6770,14 +6826,17 @@ rcr_byte(struct x86emu *emu, uint8_t d, 
 	 * 
 	 * CF  B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0
 	 * 
-	 * The new rotate is done mod 9, and given this, for a rotation of n bits
-	 * (mod 9) the new carry flag is then located n bits from the LSB.
+	 * The new rotate is done mod 9, and given this, for a rotation of n
+	 * bits (mod 9) the new carry flag is then located n bits from the LSB.
 	 * The low part is then shifted up cnt bits, and the high part is or'd
 	 * in.  Using CAPS for new values, and lowercase for the original
 	 * values, this can be expressed as:
 	 * 
-	 * IF n > 0 1) CF <-  b_(n-1) 2) B_(8-(n+1)) .. B_(0)  <-  b_(7) .. b_(n)
-	 * 3) B_(8-n) <- cf 4) B_(7) .. B_(8-(n-1)) <-  b_(n-2) .. b_(0) */
+	 * IF n > 0 
+	 *	1) CF <-  b_(n-1) 
+	 *	2) B_(8-(n+1)) .. B_(0)  <-  b_(7) .. b_(n)
+	 * 	3) B_(8-n) <- cf 4) B_(7) .. B_(8-(n-1)) <-  b_(n-2) .. b_(0)
+	 */
 	res = d;
 	if ((cnt = s % 9) != 0) {
 		/* extract the new CARRY FLAG. */
@@ -7193,8 +7252,8 @@ shl_long(struct x86emu *emu, uint32_t d,
 			res = d;
 		}
 		if (cnt == 1) {
-			CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000) ^
-				(ACCESS_FLAG(F_CF) != 0)), F_OF);
+			CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000)
+			    ^ (ACCESS_FLAG(F_CF) != 0)), F_OF);
 		} else {
 			CLEAR_FLAG(F_OF);
 		}
@@ -7505,8 +7564,8 @@ shld_long(struct x86emu *emu, uint32_t d
 			res = d;
 		}
 		if (cnt == 1) {
-			CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000) ^
-				(ACCESS_FLAG(F_CF) != 0)), F_OF);
+			CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000)
+			    ^ (ACCESS_FLAG(F_CF) != 0)), F_OF);
 		} else {
 			CLEAR_FLAG(F_OF);
 		}
@@ -8232,7 +8291,8 @@ outs(struct x86emu *emu, int size)
 		case 1:
 			while (count--) {
 				(*emu->emu_outb) (emu, emu->x86.R_DX,
-				    fetch_byte(emu, emu->x86.R_ES, emu->x86.R_SI));
+				    fetch_byte(emu, emu->x86.R_ES,
+				    emu->x86.R_SI));
 				emu->x86.R_SI += inc;
 			}
 			break;
@@ -8240,14 +8300,16 @@ outs(struct x86emu *emu, int size)
 		case 2:
 			while (count--) {
 				(*emu->emu_outw) (emu, emu->x86.R_DX,
-				    fetch_word(emu, emu->x86.R_ES, emu->x86.R_SI));
+				    fetch_word(emu, emu->x86.R_ES,
+				    emu->x86.R_SI));
 				emu->x86.R_SI += inc;
 			}
 			break;
 		case 4:
 			while (count--) {
 				(*emu->emu_outl) (emu, emu->x86.R_DX,
-				    fetch_long(emu, emu->x86.R_ES, emu->x86.R_SI));
+				    fetch_long(emu, emu->x86.R_ES,
+				    emu->x86.R_SI));
 				emu->x86.R_SI += inc;
 				break;
 			}

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 00:47:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00E2E1065673;
	Wed, 10 Mar 2010 00:47:10 +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 E4C068FC0C;
	Wed, 10 Mar 2010 00: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 o2A0l9WV079048;
	Wed, 10 Mar 2010 00:47:09 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A0l9vh079046;
	Wed, 10 Mar 2010 00:47:09 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003100047.o2A0l9vh079046@svn.freebsd.org>
From: Maxim Sobolev 
Date: Wed, 10 Mar 2010 00:47: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: r204936 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 00:47:10 -0000

Author: sobomax
Date: Wed Mar 10 00:47:09 2010
New Revision: 204936
URL: http://svn.freebsd.org/changeset/base/204936

Log:
  Fix "Empty input line" mdoc warning.
  
  Submitted by:	Alexander Best

Modified:
  head/sbin/newfs/newfs.8

Modified: head/sbin/newfs/newfs.8
==============================================================================
--- head/sbin/newfs/newfs.8	Tue Mar  9 23:12:18 2010	(r204935)
+++ head/sbin/newfs/newfs.8	Wed Mar 10 00:47:09 2010	(r204936)
@@ -78,10 +78,10 @@ The following options define the general
 .It Fl E
 Erase the content of the disk before making the filesystem.
 The reserved area in front of the superblock (for bootcode) will not be erased.
-
+.Pp
 This is a relevant option for flash based storage devices that use
 wear levelling algorithms.
-
+.Pp
 NB: Erasing may take as long time as writing every sector on the disk.
 .It Fl J
 Enable journaling on the new file system via gjournal.

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 01:00:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 206781065672;
	Wed, 10 Mar 2010 01:00:38 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FE6C8FC13;
	Wed, 10 Mar 2010 01:00:38 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2A10bYQ082111;
	Wed, 10 Mar 2010 01:00:37 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A10bmN082109;
	Wed, 10 Mar 2010 01:00:37 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201003100100.o2A10bmN082109@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 10 Mar 2010 01:00: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: r204937 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 01:00:38 -0000

Author: dougb
Date: Wed Mar 10 01:00:37 2010
New Revision: 204937
URL: http://svn.freebsd.org/changeset/base/204937

Log:
  Revert to r197433, the more recent change doesn't work for the common
  case, and has not been well received.

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Wed Mar 10 00:47:09 2010	(r204936)
+++ head/sys/conf/newvers.sh	Wed Mar 10 01:00:37 2010	(r204937)
@@ -88,15 +88,15 @@ v=`cat version` u=${USER:-root} d=`pwd` 
 i=`${MAKE:-make} -V KERN_IDENT`
 
 case "$d" in
-*/compile/*)
+*/sys/*)
 	SRCDIR=${d##*obj}
 	if [ -n "$MACHINE" ]; then
 		SRCDIR=${SRCDIR##/$MACHINE}
 	fi
-	SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd)
+	SRCDIR=${SRCDIR%%/sys/*}
 
 	for dir in /bin /usr/bin /usr/local/bin; do
-		if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then
+		if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then
 			svnversion=${dir}/svnversion
 			break
 		fi
@@ -107,7 +107,7 @@ case "$d" in
 	done
 
 	if [ -n "$svnversion" ] ; then
-		svn=" r`cd ${SRCDIR} && $svnversion`"
+		svn=" r`cd ${SRCDIR}/sys && $svnversion`"
 	fi
 	if [ -n "$git_cmd" ] ; then
 		git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null`

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 01:56:00 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76348106566B;
	Wed, 10 Mar 2010 01:56:00 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 526B08FC14;
	Wed, 10 Mar 2010 01:56:00 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2A1tq2b012509;
	Tue, 9 Mar 2010 17:55:52 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2A1tpXb012508;
	Tue, 9 Mar 2010 17:55:51 -0800 (PST) (envelope-from obrien)
Date: Tue, 9 Mar 2010 17:55:51 -0800
From: "David O'Brien" 
To: Doug Barton 
Message-ID: <20100310015551.GA12405@dragon.NUXI.org>
References: <201003071008.o27A80wC014578@svn.freebsd.org>
	<20100307.143619.510313205755027975.imp@bsdimp.com>
	<20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B945CAC.9020706@FreeBSD.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "M. Warner Losh" 
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 01:56:00 -0000

On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
> On 03/07/10 17:01, David O'Brien wrote:
> > +*/sys/*|*/compile/*)
> 
> Please revert your previous change, and feel free to add this one instead.
> 
> I'm a little aggravated because this question of "what if the directory
> isn't named */sys/*?" was already addressed when I made the change, and
> the general agreement was that !sys was an edge case that wasn't worth
> worrying about.

I probably would have if I had been able to update my main system to a
kernel newer than Nov 9th.  Every time I've tried HEAD is toxic[*].
Tried again this morning - "no route to 127.0.0.1".

> I'm even more aggravated that your change doesn't work for the common case.

Sorry, I build all my kernels the traditional way.  I was agrivated that
your change didn't work with the kernel build method with 15 years
history...

-- 
-- David  (obrien@FreeBSD.org)

[*] March 6th kernel panics, March 5th kernel dead locks trivially on disk
acces.  Kernel build broken in January for 3 days due to em, Feb 1st
panics, jan 26 panics.

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 02:17:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CD58106564A;
	Wed, 10 Mar 2010 02:17:58 +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 172828FC1F;
	Wed, 10 Mar 2010 02:17: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 o2A2HvqR099298;
	Wed, 10 Mar 2010 02:17:57 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A2HvrL099296;
	Wed, 10 Mar 2010 02:17:57 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201003100217.o2A2HvrL099296@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 10 Mar 2010 02:17: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: r204939 - head/secure/libexec
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 02:17:58 -0000

Author: dougb
Date: Wed Mar 10 02:17:57 2010
New Revision: 204939
URL: http://svn.freebsd.org/changeset/base/204939

Log:
  Fix the build. The ssh-pkcs11-helper directory is empty, which is
  causing confusion.

Modified:
  head/secure/libexec/Makefile

Modified: head/secure/libexec/Makefile
==============================================================================
--- head/secure/libexec/Makefile	Wed Mar 10 02:16:04 2010	(r204938)
+++ head/secure/libexec/Makefile	Wed Mar 10 02:17:57 2010	(r204939)
@@ -4,7 +4,7 @@
 
 SUBDIR=
 .if ${MK_OPENSSH} != "no"
-SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper
+SUBDIR+=sftp-server ssh-keysign
 .endif
 
 .include 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 02:25:17 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89787106566B
	for ; Wed, 10 Mar 2010 02:25:17 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 32B378FC15
	for ; Wed, 10 Mar 2010 02:25:16 +0000 (UTC)
Received: (qmail 23180 invoked by uid 399); 10 Mar 2010 02:25:16 -0000
Received: from localhost (HELO foreign.dougb.net)
	(dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 10 Mar 2010 02:25:16 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4B97030A.1040704@FreeBSD.org>
Date: Tue, 09 Mar 2010 18:25:14 -0800
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US;
	rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1
MIME-Version: 1.0
To: obrien@FreeBSD.org
References: <201003071008.o27A80wC014578@svn.freebsd.org>
	<20100307.143619.510313205755027975.imp@bsdimp.com>
	<20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
	<20100310015551.GA12405@dragon.NUXI.org>
In-Reply-To: <20100310015551.GA12405@dragon.NUXI.org>
X-Enigmail-Version: 1.0.1
OpenPGP: id=D5B2F0FB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "M. Warner Losh" 
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 02:25:17 -0000

On 03/09/10 17:55, David O'Brien wrote:
> On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
>> On 03/07/10 17:01, David O'Brien wrote:
>>> +*/sys/*|*/compile/*)
>>
>> Please revert your previous change, and feel free to add this one instead.
>>
>> I'm a little aggravated because this question of "what if the directory
>> isn't named */sys/*?" was already addressed when I made the change, and
>> the general agreement was that !sys was an edge case that wasn't worth
>> worrying about.
> 
> I probably would have if I had been able to update my main system to a
> kernel newer than Nov 9th.  Every time I've tried HEAD is toxic[*].
> Tried again this morning - "no route to 127.0.0.1".

I'm not sure what the connection is there. But FWIW Qing posted the fix
for that: http://people.freebsd.org/~qingli/route.h.diff. Not sure why
he hasn't committed it yet. The fix works for me.

>> I'm even more aggravated that your change doesn't work for the common case.
> 
> Sorry, I build all my kernels the traditional way.  I was agrivated that
> your change didn't work with the kernel build method with 15 years
> history...

The "traditional" way hasn't been the recommended method of kernel
building for years now.

In any case, at least one user has complained on the list that not
having the svn revision in uname has caused them an actual problem, so I
backed out your change today. If you'd like to submit a patch for review
(-current or -hackers are good choices) that ADDS support for
*/compile/* I have no objection, and as long as it doesn't cause any
problems for people whose sources are in */sys/* I think that'd be
great, and will do whatever I can to help.


Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 02:40:25 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5261E106564A;
	Wed, 10 Mar 2010 02:40:25 +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 027738FC1E;
	Wed, 10 Mar 2010 02:40:24 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2A2ZAQv006300;
	Tue, 9 Mar 2010 19:35:10 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 09 Mar 2010 19:35:12 -0700 (MST)
Message-Id: <20100309.193512.775474398290078267.imp@bsdimp.com>
To: dougb@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <4B97030A.1040704@FreeBSD.org>
References: <4B945CAC.9020706@FreeBSD.org>
	<20100310015551.GA12405@dragon.NUXI.org>
	<4B97030A.1040704@FreeBSD.org>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, obrien@FreeBSD.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 02:40:25 -0000

In message: <4B97030A.1040704@FreeBSD.org>
            Doug Barton  writes:
: On 03/09/10 17:55, David O'Brien wrote:
: > On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
: >> On 03/07/10 17:01, David O'Brien wrote:
: >>> +*/sys/*|*/compile/*)
: >>
: >> Please revert your previous change, and feel free to add this one instead.
: >>
: >> I'm a little aggravated because this question of "what if the directory
: >> isn't named */sys/*?" was already addressed when I made the change, and
: >> the general agreement was that !sys was an edge case that wasn't worth
: >> worrying about.
: > 
: > I probably would have if I had been able to update my main system to a
: > kernel newer than Nov 9th.  Every time I've tried HEAD is toxic[*].
: > Tried again this morning - "no route to 127.0.0.1".
: 
: I'm not sure what the connection is there. But FWIW Qing posted the fix
: for that: http://people.freebsd.org/~qingli/route.h.diff. Not sure why
: he hasn't committed it yet. The fix works for me.
: 
: >> I'm even more aggravated that your change doesn't work for the common case.
: > 
: > Sorry, I build all my kernels the traditional way.  I was agrivated that
: > your change didn't work with the kernel build method with 15 years
: > history...
: 
: The "traditional" way hasn't been the recommended method of kernel
: building for years now.
: 
: In any case, at least one user has complained on the list that not
: having the svn revision in uname has caused them an actual problem, so I
: backed out your change today. If you'd like to submit a patch for review
: (-current or -hackers are good choices) that ADDS support for
: */compile/* I have no objection, and as long as it doesn't cause any
: problems for people whose sources are in */sys/* I think that'd be
: great, and will do whatever I can to help.

I'd recommend something similar to the following change:

Index: newvers.sh
===================================================================
--- newvers.sh	(revision 204938)
+++ newvers.sh	(working copy)
@@ -38,13 +38,14 @@
 fi
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
+S=sys
 
 if [ "X${PARAMFILE}" != "X" ]; then
 	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
 		${PARAMFILE})
 else
 	RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-		$(dirname $0)/../sys/param.h)
+		$(dirname $0)/../$S/param.h)
 fi
 
 
@@ -88,15 +89,15 @@
 i=`${MAKE:-make} -V KERN_IDENT`
 
 case "$d" in
-*/sys/*)
+*/$S/*)
 	SRCDIR=${d##*obj}
 	if [ -n "$MACHINE" ]; then
 		SRCDIR=${SRCDIR##/$MACHINE}
 	fi
-	SRCDIR=${SRCDIR%%/sys/*}
+	SRCDIR=${SRCDIR%%/$S/*}
 
 	for dir in /bin /usr/bin /usr/local/bin; do
-		if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then
+		if [ -d "${SRCDIR}/$S/.svn" -a -x "${dir}/svnversion" ] ; then
 			svnversion=${dir}/svnversion
 			break
 		fi
@@ -107,7 +108,7 @@
 	done
 
 	if [ -n "$svnversion" ] ; then
-		svn=" r`cd ${SRCDIR}/sys && $svnversion`"
+		svn=" r`cd ${SRCDIR}/$S && $svnversion`"
 	fi
 	if [ -n "$git_cmd" ] ; then
 		git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null`

which would allow people that move sys to somewhere else to change one
line and still have everything work.  They are going to have to make
changes anyway to support that, since it isn't supported by FreeBSD
out of the box.

Warner

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 02:46:00 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2BE54106564A;
	Wed, 10 Mar 2010 02:46:00 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 08F178FC0A;
	Wed, 10 Mar 2010 02:45:59 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2A2jrDH014195;
	Tue, 9 Mar 2010 18:45:53 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2A2jrtg014194;
	Tue, 9 Mar 2010 18:45:53 -0800 (PST) (envelope-from obrien)
Date: Tue, 9 Mar 2010 18:45:53 -0800
From: "David O'Brien" 
To: Doug Barton 
Message-ID: <20100310024553.GA13821@dragon.NUXI.org>
References: <201003071008.o27A80wC014578@svn.freebsd.org>
	<20100307.143619.510313205755027975.imp@bsdimp.com>
	<20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B945CAC.9020706@FreeBSD.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "M. Warner Losh" 
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 02:46:00 -0000


On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
> On 03/07/10 17:01, David O'Brien wrote:
> 
> > +*/sys/*|*/compile/*)
> 
> Please revert your previous change, and feel free to add this one instead.

This alone will not work - it doesn't fix the calculation of SRCDIR:

+ v=0 u=root d=/MM/test/my-fbsd-kern/i386/compile/GENERIC h=dragon t='Tue Mar  9 18:42:18 PST 2010'
+ make -V KERN_IDENT
+ i=GENERIC
+ SRCDIR=/MM/test/my-fbsd-kern/i386/compile/GENERIC
+ [ -n '' ]
+ SRCDIR=/MM/test/my-fbsd-kern/i386/compile/GENERIC
+ [ -d /MM/test/my-fbsd-kern/i386/compile/GENERIC/sys/.svn -a -x /bin/svnversion ]
+ [ -d /MM/test/my-fbsd-kern/i386/compile/GENERIC/.git -a -x /bin/git ]


I will fix newvers.sh tonight.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 03:01:48 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2C9AA1065673
	for ; Wed, 10 Mar 2010 03:01:48 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 0E46F8FC18
	for ; Wed, 10 Mar 2010 03:01:43 +0000 (UTC)
Received: (qmail 8730 invoked by uid 399); 10 Mar 2010 03:01:43 -0000
Received: from localhost (HELO foreign.dougb.net)
	(dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 10 Mar 2010 03:01:43 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4B970B95.4040909@FreeBSD.org>
Date: Tue, 09 Mar 2010 19:01:41 -0800
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US;
	rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1
MIME-Version: 1.0
To: obrien@FreeBSD.org
References: <201003071008.o27A80wC014578@svn.freebsd.org>
	<20100307.143619.510313205755027975.imp@bsdimp.com>
	<20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
	<20100310024553.GA13821@dragon.NUXI.org>
In-Reply-To: <20100310024553.GA13821@dragon.NUXI.org>
X-Enigmail-Version: 1.0.1
OpenPGP: id=D5B2F0FB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "M. Warner Losh" 
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 03:01:48 -0000

On 03/09/10 18:45, David O'Brien wrote:
> 
> On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
>> On 03/07/10 17:01, David O'Brien wrote:
>>
>>> +*/sys/*|*/compile/*)
>>
>> Please revert your previous change, and feel free to add this one instead.
> 
> This alone will not work - it doesn't fix the calculation of SRCDIR:

I wasn't implying that fix would be complete, just the spirit of what
would be a good fix.

> I will fix newvers.sh tonight.

As I asked before, please submit a patch for review before making any
changes.


Thanks,

Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 03:23:46 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 371B5106564A;
	Wed, 10 Mar 2010 03:23:46 +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 EAD3A8FC15;
	Wed, 10 Mar 2010 03:23:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2A3IMJv006771;
	Tue, 9 Mar 2010 20:18:22 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 09 Mar 2010 20:18:25 -0700 (MST)
Message-Id: <20100309.201825.814211447400049397.imp@bsdimp.com>
To: obrien@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <20100310024553.GA13821@dragon.NUXI.org>
References: <20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
	<20100310024553.GA13821@dragon.NUXI.org>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, dougb@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 03:23:46 -0000

In message: <20100310024553.GA13821@dragon.NUXI.org>
            "David O'Brien"  writes:
: 
: On Sun, Mar 07, 2010 at 06:10:52PM -0800, Doug Barton wrote:
: > On 03/07/10 17:01, David O'Brien wrote:
: > 
: > > +*/sys/*|*/compile/*)
: > 
: > Please revert your previous change, and feel free to add this one instead.
: 
: This alone will not work - it doesn't fix the calculation of SRCDIR:
: 
: + v=0 u=root d=/MM/test/my-fbsd-kern/i386/compile/GENERIC h=dragon t='Tue Mar  9 18:42:18 PST 2010'
: + make -V KERN_IDENT
: + i=GENERIC
: + SRCDIR=/MM/test/my-fbsd-kern/i386/compile/GENERIC
: + [ -n '' ]
: + SRCDIR=/MM/test/my-fbsd-kern/i386/compile/GENERIC
: + [ -d /MM/test/my-fbsd-kern/i386/compile/GENERIC/sys/.svn -a -x /bin/svnversion ]
: + [ -d /MM/test/my-fbsd-kern/i386/compile/GENERIC/.git -a -x /bin/git ]
: 
: 
: I will fix newvers.sh tonight.

PLEASE DO NOT CHANGE newvers.sh FROM WHAT IT IS NOW.  Please talk
about your proposed changes in -hackers@ or -current@ first.

Thanks a lot.

Warner

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 04:34:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A35F106564A;
	Wed, 10 Mar 2010 04:34:43 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FF198FC19;
	Wed, 10 Mar 2010 04:34:42 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2A4YZZV010060;
	Tue, 9 Mar 2010 20:34:35 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2A4YZIR010059;
	Tue, 9 Mar 2010 20:34:35 -0800 (PST) (envelope-from obrien)
Date: Tue, 9 Mar 2010 20:34:35 -0800
From: "David O'Brien" 
To: "M. Warner Losh" 
Message-ID: <20100310043435.GA96059@dragon.NUXI.org>
References: <201003071008.o27A80wC014578@svn.freebsd.org>
	<20100307.143619.510313205755027975.imp@bsdimp.com>
	<20100308010125.GA6387@dragon.NUXI.org>
	<20100308.090659.460114267457255328.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF"
Content-Disposition: inline
In-Reply-To: <20100308.090659.460114267457255328.imp@bsdimp.com>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 04:34:43 -0000


--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Mar 08, 2010 at 09:06:59AM -0700, M. Warner Losh wrote:
> In message: <20100308010125.GA6387@dragon.NUXI.org>
>             "David O'Brien"  writes:
> : On Sun, Mar 07, 2010 at 02:36:19PM -0700, M. Warner Losh wrote:
> : > Please back out this change.  It is unwise, I think.
> : 
> : Instead I'd rather fix it for the use case you mention.
> 
> I'd still rather you back it out because it introduces a significant
> regression in speed, see below...

Can you please apply this diff:

Index: conf/kern.post.mk
===================================================================
--- conf/kern.post.mk	(revision 204912)
+++ conf/kern.post.mk	(working copy)
@@ -247 +247 @@ vers.c: $S/conf/newvers.sh $S/sys/param.
-	MAKE=${MAKE} sh $S/conf/newvers.sh ${KERN_IDENT}
+	MAKE=${MAKE} sh -x $S/conf/newvers.sh ${KERN_IDENT}

and send me the output of:
    rm /usr/obj/MM/test/sys/GENERIC/vers*
    make -DNOCLEAN buildkernel

I would like to understand and fix how my patch causes you longer build
times than r197433.

Attached are my typescripts for r197433 and the patch I sent you.  The
diff of which is:


--- typescript,r197433	2010-03-09 20:11:35.000000000 -0800
+++ typescript,new	2010-03-09 20:11:50.000000000 -0800
@@ -104,17 +104,16 @@ MAKE=make sh -x /MM/test/sys/conf/newver
 + cat version
 + pwd
 + date
-+ v=1 u=rootk d=/usr/obj/MM/test/sys/GENERIC h=dragon t='Tue Mar  9 20:06:11 PST 2010'
++ v=6 u=rootk d=/usr/obj/MM/test/sys/GENERIC h=dragon t='Tue Mar  9 20:20:33 PST 2010'
 + make -V KERN_IDENT
 + i=GENERIC
-+ SRCDIR=/MM/test/sys/GENERIC
-+ [ -n i386 ]
-+ SRCDIR=/MM/test/sys/GENERIC
-+ SRCDIR=/MM/test
++ dirname /MM/test/sys/conf/newvers.sh
++ realpath /MM/test/sys/conf/..
++ SRCDIR=/MM/test/sys
 + [ -d /MM/test/sys/.svn -a -x /bin/svnversion ]
-+ [ -d /MM/test/.git -a -x /bin/git ]
++ [ -d /MM/test/sys/.git -a -x /bin/git ]
 + [ -d /MM/test/sys/.svn -a -x /usr/bin/svnversion ]
-+ [ -d /MM/test/.git -a -x /usr/bin/git ]
++ [ -d /MM/test/sys/.git -a -x /usr/bin/git ]
 + [ -d /MM/test/sys/.svn -a -x /usr/local/bin/svnversion ]
 + svnversion=/usr/local/bin/svnversion
 + break

As you can see, the same .svn/ directory is used in my patch as in
r197433.

I think looking for .git/ in the same directory as .svn/ make sense, but
I'm not a heavy git user.  Assuming you disagree, the attached patch will
look above the kernel directory.  If it bothers you to run realpath(1)
twice, I can save its output in a shell var and use that.



> : Index: newvers.sh
..
> : -	SRCDIR=${d##*obj}
..

> : +	SRCDIR=$(realpath $(dirname $0)/..)

Is your newver.sh script in the normal place within 'conf/'?



> : Do you get the subversion revision in your vers.c file with this patch?
> 
> Well, except that you get the revision for the whole tree, instead of
> just for the kernel.  And this takes a *LOT* longer to compute.  The
> whole reason we did the sys hack was to make build times not suck...

Please send me the typescript output from with conf/kern.post.mk
patch.  I need to see how "SRCDIR" is getting set to "/usr/src" for you
and not "/usr/src/sys".

-- 
-- David  (obrien@FreeBSD.org)

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="typescript,r197433"

MAKE=make sh -x /MM/test/sys/conf/newvers.sh GENERIC
+ TYPE=FreeBSD
+ REVISION=9.0
+ BRANCH=CURRENT
+ [ X != X ]
+ RELEASE=9.0-CURRENT
+ VERSION='FreeBSD 9.0-CURRENT'
+ [ X != X ]
+ dirname /MM/test/sys/conf/newvers.sh
+ awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' /MM/test/sys/conf/../sys/param.h
+ RELDATE=900009
+ b=share/examples/etc/bsd-style-copyright
+ date +%Y
+ year=2010
+ [ -r ../share/examples/etc/bsd-style-copyright ]
+ [ -r ../../share/examples/etc/bsd-style-copyright ]
+ [ -r ../../../share/examples/etc/bsd-style-copyright ]
+ [ -r /usr/src/share/examples/etc/bsd-style-copyright ]
+ sed -e 's/\[year\]/1992-2010/' -e 's/\[your name here\]\.* /The FreeBSD Project./' -e 's/\[your name\]\.*/The FreeBSD Project./' -e '/\[id for your version control system, if any\]/d' /usr/src/share/examples/etc/bsd-style-copyright
+ COPYRIGHT='/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */'
+ break
+ [ 'X/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */' = X ]
+ COPYRIGHT='/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */
'
+ LC_ALL=C
+ export LC_ALL
+ [ ! -r version ]
+ touch version
+ cat version
+ pwd
+ date
+ v=1 u=rootk d=/usr/obj/MM/test/sys/GENERIC h=dragon t='Tue Mar  9 19:06:11 PST 2010'
+ make -V KERN_IDENT
+ i=GENERIC
+ SRCDIR=/MM/test/sys/GENERIC
+ [ -n i386 ]
+ SRCDIR=/MM/test/sys/GENERIC
+ SRCDIR=/MM/test
+ [ -d /MM/test/sys/.svn -a -x /bin/svnversion ]
+ [ -d /MM/test/.git -a -x /bin/git ]
+ [ -d /MM/test/sys/.svn -a -x /usr/bin/svnversion ]
+ [ -d /MM/test/.git -a -x /usr/bin/git ]
+ [ -d /MM/test/sys/.svn -a -x /usr/local/bin/svnversion ]
+ svnversion=/usr/local/bin/svnversion
+ break
+ [ -n /usr/local/bin/svnversion ]
+ cd /MM/test/sys
+ /usr/local/bin/svnversion
+ svn=' r204912M'
+ [ -n '' ]
+ cat
+ expr 1 + 1
+ echo 2

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="typescript,new"

MAKE=make sh -x /MM/test/sys/conf/newvers.sh GENERIC
+ TYPE=FreeBSD
+ REVISION=9.0
+ BRANCH=CURRENT
+ [ X != X ]
+ RELEASE=9.0-CURRENT
+ VERSION='FreeBSD 9.0-CURRENT'
+ [ X != X ]
+ dirname /MM/test/sys/conf/newvers.sh
+ awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' /MM/test/sys/conf/../sys/param.h
+ RELDATE=900009
+ b=share/examples/etc/bsd-style-copyright
+ date +%Y
+ year=2010
+ [ -r ../share/examples/etc/bsd-style-copyright ]
+ [ -r ../../share/examples/etc/bsd-style-copyright ]
+ [ -r ../../../share/examples/etc/bsd-style-copyright ]
+ [ -r /usr/src/share/examples/etc/bsd-style-copyright ]
+ sed -e 's/\[year\]/1992-2010/' -e 's/\[your name here\]\.* /The FreeBSD Project./' -e 's/\[your name\]\.*/The FreeBSD Project./' -e '/\[id for your version control system, if any\]/d' /usr/src/share/examples/etc/bsd-style-copyright
+ COPYRIGHT='/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */'
+ break
+ [ 'X/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */' = X ]
+ COPYRIGHT='/*-
 * Copyright (c) 1992-2010 The FreeBSD Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'\'\'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */
'
+ LC_ALL=C
+ export LC_ALL
+ [ ! -r version ]
+ touch version
+ cat version
+ pwd
+ date
+ v=6 u=rootk d=/usr/obj/MM/test/sys/GENERIC h=dragon t='Tue Mar  9 19:40:33 PST 2010'
+ make -V KERN_IDENT
+ i=GENERIC
+ dirname /MM/test/sys/conf/newvers.sh
+ realpath /MM/test/sys/conf/..
+ SRCDIR=/MM/test/sys
+ [ -d /MM/test/sys/.svn -a -x /bin/svnversion ]
+ [ -d /MM/test/sys/.git -a -x /bin/git ]
+ [ -d /MM/test/sys/.svn -a -x /usr/bin/svnversion ]
+ [ -d /MM/test/sys/.git -a -x /usr/bin/git ]
+ [ -d /MM/test/sys/.svn -a -x /usr/local/bin/svnversion ]
+ svnversion=/usr/local/bin/svnversion
+ break
+ [ -n /usr/local/bin/svnversion ]
+ cd /MM/test/sys
+ /usr/local/bin/svnversion
+ svn=' r204912M'
+ [ -n '' ]
+ cat
+ expr 1 + 1
+ echo 2

--3MwIy2ne0vdjdPXF
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="srcgit.patch"

Index: conf/newvers.sh
===================================================================
--- conf/newvers.sh	(revision 204912)
+++ conf/newvers.sh	(working copy)
@@ -87,21 +87,19 @@ touch version
 v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date`
 i=`${MAKE:-make} -V KERN_IDENT`
 
+# Are we doing a kernel build?  Look for "/sys/" in pwd for 'make kernel',
+# and "/compile/" for tradiational within-tree kernel build.
 case "$d" in
-*/compile/*)
-	SRCDIR=${d##*obj}
-	if [ -n "$MACHINE" ]; then
-		SRCDIR=${SRCDIR##/$MACHINE}
-	fi
-	SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd)
+*/sys/*|*/compile/*)
+	SRCDIR=$(realpath $(dirname $0)/..)
 
 	for dir in /bin /usr/bin /usr/local/bin; do
 		if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then
 			svnversion=${dir}/svnversion
 			break
 		fi
-		if [ -d "${SRCDIR}/.git" -a -x "${dir}/git" ] ; then
-			git_cmd="${dir}/git --git-dir=${SRCDIR}/.git"
+		if [ -d "${SRCDIR}/../.git" -a -x "${dir}/git" ] ; then
+			git_cmd="${dir}/git --git-dir=${SRCDIR}/../.git"
 			break
 		fi
 	done

--3MwIy2ne0vdjdPXF--

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 04:49:38 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6EB60106566B;
	Wed, 10 Mar 2010 04:49:38 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B5108FC15;
	Wed, 10 Mar 2010 04:49:38 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2A4nV0M011196;
	Tue, 9 Mar 2010 20:49:31 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2A4nVFZ011195;
	Tue, 9 Mar 2010 20:49:31 -0800 (PST) (envelope-from obrien)
Date: Tue, 9 Mar 2010 20:49:31 -0800
From: "David O'Brien" 
To: "M. Warner Losh" 
Message-ID: <20100310044931.GD96059@dragon.NUXI.org>
References: <4B945CAC.9020706@FreeBSD.org>
	<20100310015551.GA12405@dragon.NUXI.org>
	<4B97030A.1040704@FreeBSD.org>
	<20100309.193512.775474398290078267.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100309.193512.775474398290078267.imp@bsdimp.com>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, dougb@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 04:49:38 -0000

On Tue, Mar 09, 2010 at 07:35:12PM -0700, M. Warner Losh wrote:
> 
> I'd recommend something similar to the following change:
> Index: newvers.sh
..
> +S=sys
..
> -*/sys/*)
> +*/$S/*)
>  	SRCDIR=${d##*obj}
>  	if [ -n "$MACHINE" ]; then
>  		SRCDIR=${SRCDIR##/$MACHINE}
>  	fi
> -	SRCDIR=${SRCDIR%%/sys/*}
> +	SRCDIR=${SRCDIR%%/$S/*}

Why not make it simpler as my patch did?  Do you not trust that
newvers.sh (e.g. "$0") is within the kernel directory?


> which would allow people that move sys to somewhere else to change one
> line and still have everything work.  They are going to have to make
> changes anyway to support that, since it isn't supported by FreeBSD
> out of the box.

Eh?  'svn co svn://svn.freebsd.org/base/head/sys syshead' works as-is.

Using "$0" requires no one to have to change a single line.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 04:53:52 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61F99106566B;
	Wed, 10 Mar 2010 04:53:52 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 3CD508FC0C;
	Wed, 10 Mar 2010 04:53:52 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2A4rjPa011338;
	Tue, 9 Mar 2010 20:53:45 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2A4rjEh011337;
	Tue, 9 Mar 2010 20:53:45 -0800 (PST) (envelope-from obrien)
Date: Tue, 9 Mar 2010 20:53:45 -0800
From: "David O'Brien" 
To: "M. Warner Losh" 
Message-ID: <20100310045345.GE96059@dragon.NUXI.org>
References: <20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
	<20100310024553.GA13821@dragon.NUXI.org>
	<20100309.201825.814211447400049397.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100309.201825.814211447400049397.imp@bsdimp.com>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, dougb@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 04:53:52 -0000

On Tue, Mar 09, 2010 at 08:18:25PM -0700, M. Warner Losh wrote:
> In message: <20100310024553.GA13821@dragon.NUXI.org>
>             "David O'Brien"  writes:
..
> PLEASE DO NOT CHANGE newvers.sh FROM WHAT IT IS NOW.  Please talk
> about your proposed changes in -hackers@ or -current@ first.

When I wrote that Doug's change had not made it thru my svnsync.

It wasn't Doug's place to back out my change.  Geez, you're acting like
this is making the kernel toxic (like the now route to 127.0.0.1).



PLEASE CLALM DOWN WARNER.


-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 05:08:06 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F8251065673
	for ; Wed, 10 Mar 2010 05:08:06 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id AF4338FC19
	for ; Wed, 10 Mar 2010 05:08:05 +0000 (UTC)
Received: (qmail 8109 invoked by uid 399); 10 Mar 2010 05:08:05 -0000
Received: from localhost (HELO foreign.dougb.net)
	(dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 10 Mar 2010 05:08:05 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4B972933.2000207@FreeBSD.org>
Date: Tue, 09 Mar 2010 21:08:03 -0800
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US;
	rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1
MIME-Version: 1.0
To: obrien@FreeBSD.org
References: <20100308010125.GA6387@dragon.NUXI.org>
	<4B945CAC.9020706@FreeBSD.org>
	<20100310024553.GA13821@dragon.NUXI.org>
	<20100309.201825.814211447400049397.imp@bsdimp.com>
	<20100310045345.GE96059@dragon.NUXI.org>
In-Reply-To: <20100310045345.GE96059@dragon.NUXI.org>
X-Enigmail-Version: 1.0.1
OpenPGP: id=D5B2F0FB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "M. Warner Losh" 
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 05:08:06 -0000

On 03/09/10 20:53, David O'Brien wrote:
> On Tue, Mar 09, 2010 at 08:18:25PM -0700, M. Warner Losh wrote:
>> In message: <20100310024553.GA13821@dragon.NUXI.org>
>>             "David O'Brien"  writes:
> ..
>> PLEASE DO NOT CHANGE newvers.sh FROM WHAT IT IS NOW.  Please talk
>> about your proposed changes in -hackers@ or -current@ first.
> 
> When I wrote that Doug's change had not made it thru my svnsync.

Thanks for clarifying, I also misunderstood what you meant by "fix" there.


Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 05:10:45 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C5247106566B;
	Wed, 10 Mar 2010 05:10:45 +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 832328FC12;
	Wed, 10 Mar 2010 05:10:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2A55AMZ007679;
	Tue, 9 Mar 2010 22:05:10 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Tue, 09 Mar 2010 22:05:13 -0700 (MST)
Message-Id: <20100309.220513.175946041864684156.imp@bsdimp.com>
To: obrien@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <20100310045345.GE96059@dragon.NUXI.org>
References: <20100310024553.GA13821@dragon.NUXI.org>
	<20100309.201825.814211447400049397.imp@bsdimp.com>
	<20100310045345.GE96059@dragon.NUXI.org>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, dougb@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204824 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 05:10:45 -0000

In message: <20100310045345.GE96059@dragon.NUXI.org>
            "David O'Brien"  writes:
: On Tue, Mar 09, 2010 at 08:18:25PM -0700, M. Warner Losh wrote:
: > In message: <20100310024553.GA13821@dragon.NUXI.org>
: >             "David O'Brien"  writes:
: ..
: > PLEASE DO NOT CHANGE newvers.sh FROM WHAT IT IS NOW.  Please talk
: > about your proposed changes in -hackers@ or -current@ first.
: 
: When I wrote that Doug's change had not made it thru my svnsync.
: 
: It wasn't Doug's place to back out my change.  Geez, you're acting like
: this is making the kernel toxic (like the now route to 127.0.0.1).
: 
: 
: 
: PLEASE CLALM DOWN WARNER.

I am calm David.  I'm asking you to play by the rules.  You seemed to
be planning another drive-by commit.  Doug and I have both asked you
to get a review before you make any changes to this file.  These are
reasonable requests.  The standard way we do things in the project.
Please respect that this is an area of high contention that's been a
problem in the past and that drive-by commits create much
consternation and emotional churn in the project.  Please respect your
fellow committers and get the code reviewed please.

Thanks a lot.

Warner



From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 05:19:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9488B106566B;
	Wed, 10 Mar 2010 05:19:14 +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 839CB8FC0A;
	Wed, 10 Mar 2010 05:19: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 o2A5JEmK039499;
	Wed, 10 Mar 2010 05:19:14 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A5JEiS039497;
	Wed, 10 Mar 2010 05:19:14 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003100519.o2A5JEiS039497@svn.freebsd.org>
From: Maxim Sobolev 
Date: Wed, 10 Mar 2010 05:19: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: r204941 - head/sys/dev/mii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 05:19:14 -0000

Author: sobomax
Date: Wed Mar 10 05:19:14 2010
New Revision: 204941
URL: http://svn.freebsd.org/changeset/base/204941

Log:
  Provide workaround for the ages old bug affecting certain BCM5708S
  chip revision often found in the blades and resulting in interfaces
  not sensing carrier signal. Looking at all problem reports it
  appears that it only affects some very specific silicon revision
  (ASIC (0x57081021); Rev (B2)) and version of the PHY that
  supports 1000baseSX-FDX media only. Therefore, narrow the scope of
  workaround to combination of that revision and media type. Given
  that the first report on this issue is dated back to 2007, there is
  not much hope that this issue will ever be properly resolved.
  
  Among affected systems are IBM HS21, Intel SBXD132 and HP BL460c.
  
  PR:		118238, 122551, 140970
  MFC after:	1 month

Modified:
  head/sys/dev/mii/brgphy.c

Modified: head/sys/dev/mii/brgphy.c
==============================================================================
--- head/sys/dev/mii/brgphy.c	Wed Mar 10 05:06:47 2010	(r204940)
+++ head/sys/dev/mii/brgphy.c	Wed Mar 10 05:19:14 2010	(r204941)
@@ -66,14 +66,17 @@ __FBSDID("$FreeBSD$");
 static int brgphy_probe(device_t);
 static int brgphy_attach(device_t);
 
+#define BCM5708S_BAD_CHIPID	0x57081021
+
 struct brgphy_softc {
 	struct mii_softc mii_sc;
 	int mii_oui;
 	int mii_model;
 	int mii_rev;
 	int serdes_flags;	/* Keeps track of the serdes type used */
-#define BRGPHY_5706S	0x0001
-#define BRGPHY_5708S	0x0002
+#define BRGPHY_5706S		0x0001
+#define BRGPHY_5708S		0x0002
+#define BRGPHY_NOANWAIT		0x0004
 	int bce_phy_flags;	/* PHY flags transferred from the MAC driver */
 };
 
@@ -291,6 +294,19 @@ brgphy_attach(device_t dev)
 		if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) {
 			ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0);
 			printf("2500baseSX-FDX, ");
+		} else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc &&
+		    (bce_sc->bce_chipid == BCM5708S_BAD_CHIPID)) {
+			/*
+			 * There appears to be certain silicon revision
+			 * usually used in blades that is having issues with
+			 * this driver wating for the auto-negotiation to
+			 * complete. This happens with a specific chip id
+			 * only and when the 1000baseSX-FDX is the only
+			 * mode. Workaround this issue since it's unlikely
+			 * to be ever addressed.
+			 */
+			printf("auto-neg workaround, ");
+			bsc->serdes_flags |= BRGPHY_NOANWAIT;
 		}
 	}
 
@@ -544,7 +560,8 @@ brgphy_status(struct mii_softc *sc)
 
 	/* Autoneg is still in progress. */
 	if ((bmcr & BRGPHY_BMCR_AUTOEN) &&
-	    (bmsr & BRGPHY_BMSR_ACOMP) == 0) {
+	    (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;

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 05:44:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7AD931065670;
	Wed, 10 Mar 2010 05:44:57 +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 6A4048FC0C;
	Wed, 10 Mar 2010 05:44: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 o2A5ivq4045150;
	Wed, 10 Mar 2010 05:44:57 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A5ivtG045148;
	Wed, 10 Mar 2010 05:44:57 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201003100544.o2A5ivtG045148@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 10 Mar 2010 05:44: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: r204942 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 05:44:57 -0000

Author: dougb
Date: Wed Mar 10 05:44:57 2010
New Revision: 204942
URL: http://svn.freebsd.org/changeset/base/204942

Log:
  Add -i to the first post-install mergemaster example to make
  it consistent with the other. [1]
  
  Add a note about -U to the mergemaster footnote.
  
  Submitted by:	obrien [1]

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed Mar 10 05:19:14 2010	(r204941)
+++ head/UPDATING	Wed Mar 10 05:44:57 2010	(r204942)
@@ -983,7 +983,7 @@ COMMON ITEMS:
 	mergemaster -p					[5]
 	make installworld
 	make delete-old
-	mergemaster					[4]
+	mergemaster -i					[4]
 	
 
 
@@ -1054,7 +1054,8 @@ COMMON ITEMS:
 	system.  Attempting to do it by hand is not recommended and those
 	that pursue this avenue should read this file carefully, as well
 	as the archives of freebsd-current and freebsd-hackers mailing lists
-	for potential gotchas.
+	for potential gotchas.  The -U option is also useful to consider.
+	See mergemaster(8) for more information.
 
 	[5] Usually this step is a noop.  However, from time to time
 	you may need to do this if you get unknown user in the following

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 06:10:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 57C86106566C;
	Wed, 10 Mar 2010 06:10:39 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46D118FC21;
	Wed, 10 Mar 2010 06:10: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 o2A6AdNE050822;
	Wed, 10 Mar 2010 06:10:39 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2A6Ad9Q050820;
	Wed, 10 Mar 2010 06:10:39 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201003100610.o2A6Ad9Q050820@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 10 Mar 2010 06:10: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: r204943 - head
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 06:10:39 -0000

Author: obrien
Date: Wed Mar 10 06:10:39 2010
New Revision: 204943
URL: http://svn.freebsd.org/changeset/base/204943

Log:
  Use more proper terms (from official documents) for AMD CPU's.
  
  Reviewed by:	imp

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed Mar 10 05:44:57 2010	(r204942)
+++ head/UPDATING	Wed Mar 10 06:10:39 2010	(r204943)
@@ -497,7 +497,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 
 20090313:
 	The k8temp(4) driver has been renamed to amdtemp(4) since
-	support for K10 and K11 CPU families was added.
+	support for Family 10 and Family 11 CPU families was added.
 
 20090309:
 	IGMPv3 and Source-Specific Multicast (SSM) have been merged

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 11:01:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 250671065675;
	Wed, 10 Mar 2010 11:01:02 +0000 (UTC)
	(envelope-from rbgarga@gmail.com)
Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 67EFA8FC1F;
	Wed, 10 Mar 2010 11:01:00 +0000 (UTC)
Received: by wwb24 with SMTP id 24so1163708wwb.13
	for ; Wed, 10 Mar 2010 03:01:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=dgmhcCFxuhA4J/VmhnJGHd0pckvP9i0IcLdcNW15aYE=;
	b=JOCGH7CuXavNFg7x/5y9MC9+CoN1L4eKTL3itmTsFHFw5s8WJtc9mqUTHxin6bLDdz
	YxuLFk0IULBLL+3n6K69iLjxpCSaNOHz92EHosOeJ6qaTYp72Vb6BmdNiKUVqaA50pCq
	JF9rlCiV1a7TRhA+bamdKm2XvL5zXbcrdMB2U=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=tVfuC5JO6V/HKtGIjsreYo5CPpe6qeVHver87xa4bgzBy+7hV+0aOwXA/rH9QGdaqv
	7J8iSn6JKCp0Qv2VkWaKn+PYXox7b0XIaWYDpJ70Dmte3HLwemWqy64XW/CDGM0qezxT
	1gmAENcPQyDbG1zun9U4sIp+0o1CkaFBk2Z3c=
MIME-Version: 1.0
Received: by 10.216.88.136 with SMTP id a8mr781535wef.77.1268218860146; Wed, 
	10 Mar 2010 03:01:00 -0800 (PST)
In-Reply-To: <201003100100.o2A10bmN082109@svn.freebsd.org>
References: <201003100100.o2A10bmN082109@svn.freebsd.org>
From: Renato Botelho 
Date: Wed, 10 Mar 2010 08:00:40 -0300
Message-ID: <747dc8f31003100300j6ab027d8m61021ab11147b702@mail.gmail.com>
To: Doug Barton 
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: r204937 - head/sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 11:01:02 -0000

On Tue, Mar 9, 2010 at 10:00 PM, Doug Barton  wrote:
>
> Author: dougb
> Date: Wed Mar 10 01:00:37 2010
> New Revision: 204937
> URL: http://svn.freebsd.org/changeset/base/204937
>
> Log:
> =A0Revert to r197433, the more recent change doesn't work for the common
> =A0case, and has not been well received.

Thank you for this!!!

--
Renato Botelho

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 11:05:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44ECD106566B;
	Wed, 10 Mar 2010 11:05:32 +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 345F98FC20;
	Wed, 10 Mar 2010 11:05: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 o2AB5W38018145;
	Wed, 10 Mar 2010 11:05:32 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AB5WWm018143;
	Wed, 10 Mar 2010 11:05:32 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201003101105.o2AB5WWm018143@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 10 Mar 2010 11:05: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: r204948 - head/secure/libexec/ssh-pkcs11-helper
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 11:05:32 -0000

Author: des
Date: Wed Mar 10 11:05:31 2010
New Revision: 204948
URL: http://svn.freebsd.org/changeset/base/204948

Log:
  Forgot to svn add the Makefile.

Added:
  head/secure/libexec/ssh-pkcs11-helper/Makefile   (contents, props changed)

Added: head/secure/libexec/ssh-pkcs11-helper/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/secure/libexec/ssh-pkcs11-helper/Makefile	Wed Mar 10 11:05:31 2010	(r204948)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+PROG=	ssh-pkcs11-helper
+SRCS=	ssh-pkcs11.c ssh-pkcs11-helper.c
+SRCS+=	roaming_dummy.c
+MAN=	ssh-pkcs11-helper.8
+CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
+
+DPADD=	${LIBSSH} ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
+LDADD=	-lssh -lcrypt -lcrypto -lz
+
+.include 
+
+.PATH:	${SSHDIR}
+
+${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 11:31:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4DD71106566B;
	Wed, 10 Mar 2010 11:31:59 +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 0D2EB8FC15;
	Wed, 10 Mar 2010 11:31:58 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id D1A581FFC22;
	Wed, 10 Mar 2010 11:31:57 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id A923D84498; Wed, 10 Mar 2010 12:31:57 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Doug Barton 
References: <201003100217.o2A2HvrL099296@svn.freebsd.org>
Date: Wed, 10 Mar 2010 12:31:57 +0100
In-Reply-To: <201003100217.o2A2HvrL099296@svn.freebsd.org> (Doug Barton's
	message of "Wed, 10 Mar 2010 02:17:57 +0000 (UTC)")
Message-ID: <861vfs5s5u.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r204939 - head/secure/libexec
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 11:31:59 -0000

Doug Barton  writes:
> Log:
>   Fix the build. The ssh-pkcs11-helper directory is empty, which is
>   causing confusion.

The proper way to handle this would have been to send me an email asking
if perhaps I had forgotten to commit the Makefile.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 11:33:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B36AC1065679;
	Wed, 10 Mar 2010 11:33:15 +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 893118FC32;
	Wed, 10 Mar 2010 11:33: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 o2ABXFMO024273;
	Wed, 10 Mar 2010 11:33:15 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ABXFJ5024271;
	Wed, 10 Mar 2010 11:33:15 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201003101133.o2ABXFJ5024271@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 10 Mar 2010 11:33: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: r204949 - head/secure/libexec
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 11:33:15 -0000

Author: des
Date: Wed Mar 10 11:33:15 2010
New Revision: 204949
URL: http://svn.freebsd.org/changeset/base/204949

Log:
  Revert r204939

Modified:
  head/secure/libexec/Makefile

Modified: head/secure/libexec/Makefile
==============================================================================
--- head/secure/libexec/Makefile	Wed Mar 10 11:05:31 2010	(r204948)
+++ head/secure/libexec/Makefile	Wed Mar 10 11:33:15 2010	(r204949)
@@ -4,7 +4,7 @@
 
 SUBDIR=
 .if ${MK_OPENSSH} != "no"
-SUBDIR+=sftp-server ssh-keysign
+SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper
 .endif
 
 .include 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 13:23:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B823106566B;
	Wed, 10 Mar 2010 13:23:26 +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 3A80A8FC1E;
	Wed, 10 Mar 2010 13:23: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 o2ADNQDr048674;
	Wed, 10 Mar 2010 13:23:26 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ADNQgF048667;
	Wed, 10 Mar 2010 13:23:26 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003101323.o2ADNQgF048667@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 10 Mar 2010 13:23:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204950 - head/lib/libc/rpc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 13:23:26 -0000

Author: jhb
Date: Wed Mar 10 13:23:25 2010
New Revision: 204950
URL: http://svn.freebsd.org/changeset/base/204950

Log:
  Use thr_once() with once_t controls to initialize various thread_key_t
  objects used to provide per-thread storage in the RPC code.  Almost all
  of these used double-checking with a dedicated mutex (tsd_lock) to do this
  before.  However, that is not always safe with more relaxed memory orders.
  There were also other bugs, such as one in __rpc_createrr() that caused a
  new key to be allocated each time __rpc_createrr() was invoked.
  
  PR:		threads/144558
  Reported by:	Sam Robb  samrobb of averesystems com (key leak)
  MFC after:	1 week

Modified:
  head/lib/libc/rpc/Symbol.map
  head/lib/libc/rpc/clnt_simple.c
  head/lib/libc/rpc/getnetconfig.c
  head/lib/libc/rpc/key_call.c
  head/lib/libc/rpc/mt_misc.c
  head/lib/libc/rpc/mt_misc.h
  head/lib/libc/rpc/rpc_generic.c
  head/lib/libc/rpc/rpc_soc.c

Modified: head/lib/libc/rpc/Symbol.map
==============================================================================
--- head/lib/libc/rpc/Symbol.map	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/Symbol.map	Wed Mar 10 13:23:25 2010	(r204950)
@@ -239,10 +239,6 @@ FBSDprivate_1.0 {
 	__key_encryptsession_pk_LOCAL;
 	__key_decryptsession_pk_LOCAL;
 	__key_gendes_LOCAL;
-	__tsd_lock;	/*
-			 * Why does usr.bin/rpcinfo/Makefile need rpc_generic.c?
-			 * Remove this hack if rpcinfo stops building with it.
-			 */
 	__svc_clean_idle;
 	__rpc_gss_unwrap;
 	__rpc_gss_unwrap_stub;

Modified: head/lib/libc/rpc/clnt_simple.c
==============================================================================
--- head/lib/libc/rpc/clnt_simple.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/clnt_simple.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -76,7 +76,11 @@ struct rpc_call_private {
 	char	nettype[NETIDLEN];	/* Network type */
 };
 static struct rpc_call_private *rpc_call_private_main;
+static thread_key_t rpc_call_key;
+static once_t rpc_call_once = ONCE_INITIALIZER;
+static int rpc_call_key_error;
 
+static void rpc_call_key_init(void);
 static void rpc_call_destroy(void *);
 
 static void
@@ -91,6 +95,13 @@ rpc_call_destroy(void *vp)
 	}
 }
 
+static void
+rpc_call_key_init(void)
+{
+
+	rpc_call_key_error = thr_keycreate(&rpc_call_key, rpc_call_destroy);
+}
+
 /*
  * This is the simplified interface to the client rpc layer.
  * The client handle is not destroyed here and is reused for
@@ -112,17 +123,16 @@ rpc_call(host, prognum, versnum, procnum
 	struct rpc_call_private *rcp = (struct rpc_call_private *) 0;
 	enum clnt_stat clnt_stat;
 	struct timeval timeout, tottimeout;
-	static thread_key_t rpc_call_key;
 	int main_thread = 1;
 
 	if ((main_thread = thr_main())) {
 		rcp = rpc_call_private_main;
 	} else {
-		if (rpc_call_key == 0) {
-			mutex_lock(&tsd_lock);
-			if (rpc_call_key == 0)
-				thr_keycreate(&rpc_call_key, rpc_call_destroy);
-			mutex_unlock(&tsd_lock);
+		if (thr_once(&rpc_call_once, rpc_call_key_init) != 0 ||
+		    rpc_call_key_error != 0) {
+			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+			rpc_createerr.cf_error.re_errno = rpc_call_key_error;
+			return (rpc_createerr.cf_stat);
 		}
 		rcp = (struct rpc_call_private *)thr_getspecific(rpc_call_key);
 	}

Modified: head/lib/libc/rpc/getnetconfig.c
==============================================================================
--- head/lib/libc/rpc/getnetconfig.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/getnetconfig.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -130,21 +130,29 @@ static struct netconfig *dup_ncp(struct 
 
 
 static FILE *nc_file;		/* for netconfig db */
-static pthread_mutex_t nc_file_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t nc_file_lock = MUTEX_INITIALIZER;
 
 static struct netconfig_info	ni = { 0, 0, NULL, NULL};
-static pthread_mutex_t ni_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t ni_lock = MUTEX_INITIALIZER;
 
+static thread_key_t nc_key;
+static once_t nc_once = ONCE_INITIALIZER;
+static int nc_key_error;
+
+static void
+nc_key_init(void)
+{
+
+	nc_key_error = thr_keycreate(&nc_key, free);
+}
 
 #define MAXNETCONFIGLINE    1000
 
 static int *
 __nc_error()
 {
-	static pthread_mutex_t nc_lock = PTHREAD_MUTEX_INITIALIZER;
-	static thread_key_t nc_key = 0;
 	static int nc_error = 0;
-	int error, *nc_addr;
+	int *nc_addr;
 
 	/*
 	 * Use the static `nc_error' if we are the main thread
@@ -153,15 +161,8 @@ __nc_error()
 	 */
 	if (thr_main())
 		return (&nc_error);
-	if (nc_key == 0) {
-		error = 0;
-		mutex_lock(&nc_lock);
-		if (nc_key == 0)
-			error = thr_keycreate(&nc_key, free);
-		mutex_unlock(&nc_lock);
-		if (error)
-			return (&nc_error);
-	}
+	if (thr_once(&nc_once, nc_key_init) != 0 || nc_key_error != 0)
+		return (&nc_error);
 	if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) {
 		nc_addr = (int *)malloc(sizeof (int));
 		if (thr_setspecific(nc_key, (void *) nc_addr) != 0) {

Modified: head/lib/libc/rpc/key_call.c
==============================================================================
--- head/lib/libc/rpc/key_call.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/key_call.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -279,6 +279,9 @@ struct  key_call_private {
 	uid_t	uid;		/* user-id at last authorization */
 };
 static struct key_call_private *key_call_private_main = NULL;
+static thread_key_t key_call_key;
+static once_t key_call_once = ONCE_INITIALIZER;
+static int key_call_key_error;
 
 static void
 key_call_destroy(void *vp)
@@ -292,6 +295,13 @@ key_call_destroy(void *vp)
 	}
 }
 
+static void
+key_call_init(void)
+{
+
+	key_call_key_error = thr_keycreate(&key_call_key, key_call_destroy);
+}
+
 /*
  * Keep the handle cached.  This call may be made quite often.
  */
@@ -307,7 +317,6 @@ int	vers;
 	struct utsname u;
 	int main_thread;
 	int fd;
-	static thread_key_t key_call_key;
 
 #define	TOTAL_TIMEOUT	30	/* total timeout talking to keyserver */
 #define	TOTAL_TRIES	5	/* Number of tries */
@@ -315,12 +324,9 @@ int	vers;
 	if ((main_thread = thr_main())) {
 		kcp = key_call_private_main;
 	} else {
-		if (key_call_key == 0) {
-			mutex_lock(&tsd_lock);
-			if (key_call_key == 0)
-				thr_keycreate(&key_call_key, key_call_destroy);
-			mutex_unlock(&tsd_lock);
-		}
+		if (thr_once(&key_call_once, key_call_init) != 0 ||
+		    key_call_key_error != 0)
+			return ((CLIENT *) NULL);
 		kcp = (struct key_call_private *)thr_getspecific(key_call_key);
 	}	
 	if (kcp == (struct key_call_private *)NULL) {

Modified: head/lib/libc/rpc/mt_misc.c
==============================================================================
--- head/lib/libc/rpc/mt_misc.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/mt_misc.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$");
 #define	proglst_lock		__proglst_lock
 #define	rpcsoc_lock		__rpcsoc_lock
 #define	svcraw_lock		__svcraw_lock
-#define	tsd_lock		__tsd_lock
 #define	xprtlist_lock		__xprtlist_lock
 
 /* protects the services list (svc.c) */
@@ -76,33 +75,33 @@ pthread_mutex_t	rpcsoc_lock = PTHREAD_MU
 /* svc_raw.c serialization */
 pthread_mutex_t	svcraw_lock = PTHREAD_MUTEX_INITIALIZER;
 
-/* protects TSD key creation */
-pthread_mutex_t	tsd_lock = PTHREAD_MUTEX_INITIALIZER;
-
 /* xprtlist (svc_generic.c) */
 pthread_mutex_t	xprtlist_lock = PTHREAD_MUTEX_INITIALIZER;
 
 #undef	rpc_createerr
 
 struct rpc_createerr rpc_createerr;
+static thread_key_t rce_key;
+static once_t rce_once = ONCE_INITIALIZER;
+static int rce_key_error;
+
+static void
+rce_key_init(void)
+{
+
+	rce_key_error = thr_keycreate(&rce_key, free);
+}
 
 struct rpc_createerr *
 __rpc_createerr()
 {
-	static thread_key_t rce_key = 0;
 	struct rpc_createerr *rce_addr = 0;
 
 	if (thr_main())
 		return (&rpc_createerr);
-	if ((rce_addr =
-	    (struct rpc_createerr *)thr_getspecific(rce_key)) != 0) {
-		mutex_lock(&tsd_lock);
-		if (thr_keycreate(&rce_key, free) != 0) {
-			mutex_unlock(&tsd_lock);
-			return (&rpc_createerr);
-		}
-		mutex_unlock(&tsd_lock);
-	}
+	if (thr_once(&rce_once, rce_key_init) != 0 || rce_key_error != 0)
+		return (&rpc_createerr);
+	rce_addr = (struct rpc_createerr *)thr_getspecific(rce_key);
 	if (!rce_addr) {
 		rce_addr = (struct rpc_createerr *)
 			malloc(sizeof (struct rpc_createerr));

Modified: head/lib/libc/rpc/mt_misc.h
==============================================================================
--- head/lib/libc/rpc/mt_misc.h	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/mt_misc.h	Wed Mar 10 13:23:25 2010	(r204950)
@@ -42,7 +42,6 @@
 #define	proglst_lock		__proglst_lock
 #define	rpcsoc_lock		__rpcsoc_lock
 #define	svcraw_lock		__svcraw_lock
-#define	tsd_lock		__tsd_lock
 #define	xprtlist_lock		__xprtlist_lock
 
 extern pthread_rwlock_t	svc_lock;

Modified: head/lib/libc/rpc/rpc_generic.c
==============================================================================
--- head/lib/libc/rpc/rpc_generic.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/rpc_generic.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -221,6 +221,18 @@ getnettype(nettype)
 	return (_rpctypelist[i].type);
 }
 
+static thread_key_t tcp_key, udp_key;
+static once_t keys_once = ONCE_INITIALIZER;
+static int tcp_key_error, udp_key_error;
+
+static void
+keys_init(void)
+{
+
+	tcp_key_error = thr_keycreate(&tcp_key, free);
+	udp_key_error = thr_keycreate(&udp_key, free);
+}
+
 /*
  * For the given nettype (tcp or udp only), return the first structure found.
  * This should be freed by calling freenetconfigent()
@@ -242,19 +254,10 @@ __rpc_getconfip(nettype)
 		netid_udp = netid_udp_main;
 		netid_tcp = netid_tcp_main;
 	} else {
-		if (tcp_key == 0) {
-			mutex_lock(&tsd_lock);
-			if (tcp_key == 0)
-				thr_keycreate(&tcp_key, free);
-			mutex_unlock(&tsd_lock);
-		}
+		if (thr_once(&keys_once, keys_init) != 0 ||
+		    tcp_key_error != 0 || udp_key_error != 0)
+			return (NULL);
 		netid_tcp = (char *)thr_getspecific(tcp_key);
-		if (udp_key == 0) {
-			mutex_lock(&tsd_lock);
-			if (udp_key == 0)
-				thr_keycreate(&udp_key, free);
-			mutex_unlock(&tsd_lock);
-		}
 		netid_udp = (char *)thr_getspecific(udp_key);
 	}
 	if (!netid_udp && !netid_tcp) {

Modified: head/lib/libc/rpc/rpc_soc.c
==============================================================================
--- head/lib/libc/rpc/rpc_soc.c	Wed Mar 10 11:33:15 2010	(r204949)
+++ head/lib/libc/rpc/rpc_soc.c	Wed Mar 10 13:23:25 2010	(r204950)
@@ -360,6 +360,14 @@ registerrpc(prognum, versnum, procnum, p
  */
 static thread_key_t	clnt_broadcast_key;
 static resultproc_t	clnt_broadcast_result_main;
+static once_t		clnt_broadcast_once = ONCE_INITIALIZER;
+
+static void
+clnt_broadcast_key_init(void)
+{
+
+	thr_keycreate(&clnt_broadcast_key, free);
+}
 
 /*
  * Need to translate the netbuf address into sockaddr_in address.
@@ -402,12 +410,7 @@ clnt_broadcast(prog, vers, proc, xargs, 
 	if (thr_main())
 		clnt_broadcast_result_main = eachresult;
 	else {
-		if (clnt_broadcast_key == 0) {
-			mutex_lock(&tsd_lock);
-			if (clnt_broadcast_key == 0)
-				thr_keycreate(&clnt_broadcast_key, free);
-			mutex_unlock(&tsd_lock);
-		}
+		thr_once(&clnt_broadcast_once, clnt_broadcast_key_init);
 		thr_setspecific(clnt_broadcast_key, (void *) eachresult);
 	}
 	return rpc_broadcast((rpcprog_t)prog, (rpcvers_t)vers,

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 14:21:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E37AE106564A;
	Wed, 10 Mar 2010 14:21:05 +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 D31468FC1D;
	Wed, 10 Mar 2010 14:21: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 o2AEL55R061684;
	Wed, 10 Mar 2010 14:21:05 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AEL5qF061681;
	Wed, 10 Mar 2010 14:21:05 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201003101421.o2AEL5qF061681@svn.freebsd.org>
From: Luigi Rizzo 
Date: Wed, 10 Mar 2010 14:21: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: r204954 - head/sys/netinet/ipfw
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 14:21:06 -0000

Author: luigi
Date: Wed Mar 10 14:21:05 2010
New Revision: 204954
URL: http://svn.freebsd.org/changeset/base/204954

Log:
  fix handling of commands issued by RELENG_7 version of /sbin/ipfw,
  
  Submitted by:	Riccardo Panicucci

Modified:
  head/sys/netinet/ipfw/ip_dn_glue.c
  head/sys/netinet/ipfw/ip_fw_sockopt.c

Modified: head/sys/netinet/ipfw/ip_dn_glue.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dn_glue.c	Wed Mar 10 13:54:13 2010	(r204953)
+++ head/sys/netinet/ipfw/ip_dn_glue.c	Wed Mar 10 14:21:05 2010	(r204954)
@@ -495,7 +495,7 @@ dn_compat_config_profile(struct dn_profi
 static int
 dn_compat_configure(void *v)
 {
-	struct dn_id *buf, *base;
+	struct dn_id *buf = NULL, *base;
 	struct dn_sch *sch = NULL;
 	struct dn_link *p = NULL;
 	struct dn_fs *fs = NULL;
@@ -547,6 +547,8 @@ dn_compat_configure(void *v)
 	}
 	error = do_config(base, (char *)buf - (char *)base);
 
+	if (buf)
+		free(buf, M_DUMMYNET);
 	return error;
 }
 

Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_sockopt.c	Wed Mar 10 13:54:13 2010	(r204953)
+++ head/sys/netinet/ipfw/ip_fw_sockopt.c	Wed Mar 10 14:21:05 2010	(r204954)
@@ -951,7 +951,7 @@ ipfw_ctl(struct sockopt *sopt)
 	case IP_FW_ADD:
 		rule = malloc(RULE_MAXSIZE, M_TEMP, M_WAITOK);
 		error = sooptcopyin(sopt, rule, RULE_MAXSIZE,
-			sizeof(struct ip_fw) );
+			sizeof(struct ip_fw7) );
 
 		/*
 		 * If the size of commands equals RULESIZE7 then we assume

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 15:22:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6BF22106566B;
	Wed, 10 Mar 2010 15:22:26 +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 5BBE48FC19;
	Wed, 10 Mar 2010 15:22: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 o2AFMQd3075198;
	Wed, 10 Mar 2010 15:22:26 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AFMQbh075196;
	Wed, 10 Mar 2010 15:22:26 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003101522.o2AFMQbh075196@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 10 Mar 2010 15:22:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204955 - head/sys/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 15:22:26 -0000

Author: jhb
Date: Wed Mar 10 15:22:26 2010
New Revision: 204955
URL: http://svn.freebsd.org/changeset/base/204955

Log:
  Typo.

Modified:
  head/sys/sys/pcpu.h

Modified: head/sys/sys/pcpu.h
==============================================================================
--- head/sys/sys/pcpu.h	Wed Mar 10 14:21:05 2010	(r204954)
+++ head/sys/sys/pcpu.h	Wed Mar 10 15:22:26 2010	(r204955)
@@ -168,7 +168,7 @@ struct pcpu {
 	 * the pcpu structure is private to the kernel, some ports
 	 * (e.g. lsof, part of gtop) define _KERNEL and include this
 	 * header. While strictly speaking this is wrong, there's no
-	 * reason not to keep the offsets of the MI fields contants.
+	 * reason not to keep the offsets of the MI fields constant.
 	 * If only to make kernel debugging easier...
 	 */
 	PCPU_MD_FIELDS;

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 15:23:40 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0576E1065687;
	Wed, 10 Mar 2010 15:23:40 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id C20B68FC1A;
	Wed, 10 Mar 2010 15:23:39 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2AFNd3T057953;
	Wed, 10 Mar 2010 07:23:39 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2AFNdkn057952;
	Wed, 10 Mar 2010 07:23:39 -0800 (PST) (envelope-from obrien)
Date: Wed, 10 Mar 2010 07:23:39 -0800
From: "David O'Brien" 
To: Qing Li 
Message-ID: <20100310152339.GA57873@dragon.NUXI.org>
References: <201003090111.o291Bj79062503@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003090111.o291Bj79062503@svn.freebsd.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 15:23:40 -0000

Hi Qing,

This change doesn't seem to work in the common case, and has made the
kernel toxic - with folks unable to connect to 127.0.0.1.  Please back
this out or adjust the change.

thanks,
-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 15:50:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A86B2106564A;
	Wed, 10 Mar 2010 15:50: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 7D6DD8FC1D;
	Wed, 10 Mar 2010 15:50: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 o2AFocq1081422;
	Wed, 10 Mar 2010 15:50:38 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AFocNF081419;
	Wed, 10 Mar 2010 15:50:38 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201003101550.o2AFocNF081419@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 10 Mar 2010 15:50: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: r204957 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 15:50:38 -0000

Author: kib
Date: Wed Mar 10 15:50:38 2010
New Revision: 204957
URL: http://svn.freebsd.org/changeset/base/204957

Log:
  Fall back to wbinvd when region for CLFLUSH is >= 2MB.
  
  Submitted by:	Kevin Day 
  Reviewed by:	jhb
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/i386/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Wed Mar 10 15:47:33 2010	(r204956)
+++ head/sys/amd64/amd64/pmap.c	Wed Mar 10 15:50:38 2010	(r204957)
@@ -1105,7 +1105,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 
 	if (cpu_feature & CPUID_SS)
 		; /* If "Self Snoop" is supported, do nothing. */
-	else if (cpu_feature & CPUID_CLFSH) {
+	else if ((cpu_feature & CPUID_CLFSH) != 0 &&
+		 eva - sva < 2 * 1024 * 1024) {
 
 		/*
 		 * Otherwise, do per-cache line flush.  Use the mfence
@@ -1122,7 +1123,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 
 		/*
 		 * No targeted cache flush methods are supported by CPU,
-		 * globally invalidate cache as a last resort.
+		 * or the supplied range is bigger then 2MB.
+		 * Globally invalidate cache.
 		 */
 		pmap_invalidate_cache();
 	}

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Wed Mar 10 15:47:33 2010	(r204956)
+++ head/sys/i386/i386/pmap.c	Wed Mar 10 15:50:38 2010	(r204957)
@@ -996,7 +996,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 
 	if (cpu_feature & CPUID_SS)
 		; /* If "Self Snoop" is supported, do nothing. */
-	else if (cpu_feature & CPUID_CLFSH) {
+	else if ((cpu_feature & CPUID_CLFSH) != 0 &&
+		 eva - sva < 2 * 1024 * 1024) {
 
 		/*
 		 * Otherwise, do per-cache line flush.  Use the mfence
@@ -1013,7 +1014,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 
 		/*
 		 * No targeted cache flush methods are supported by CPU,
-		 * globally invalidate cache as a last resort.
+		 * or the supplied range is bigger then 2MB.
+		 * Globally invalidate cache.
 		 */
 		pmap_invalidate_cache();
 	}

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 15:50:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 22C6B106567C;
	Wed, 10 Mar 2010 15:50:54 +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 E79958FC29;
	Wed, 10 Mar 2010 15:50:53 +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 99AF946B45;
	Wed, 10 Mar 2010 10:50:53 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id D72038A026;
	Wed, 10 Mar 2010 10:50:52 -0500 (EST)
From: John Baldwin 
To: obrien@freebsd.org
Date: Wed, 10 Mar 2010 10:50:46 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
In-Reply-To: <20100310152339.GA57873@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003101050.46696.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Wed, 10 Mar 2010 10:50:52 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 15:50:54 -0000

On Wednesday 10 March 2010 10:23:39 am David O'Brien wrote:
> Hi Qing,
> 
> This change doesn't seem to work in the common case, and has made the
> kernel toxic - with folks unable to connect to 127.0.0.1.  Please back
> this out or adjust the change.

Did you try the route.h patch he posted to current@?

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 16:08:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2CEA51065674;
	Wed, 10 Mar 2010 16:08:59 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id E13898FC1A;
	Wed, 10 Mar 2010 16:08:58 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2AG8wBV059141;
	Wed, 10 Mar 2010 08:08:58 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2AG8wCs059140;
	Wed, 10 Mar 2010 08:08:58 -0800 (PST) (envelope-from obrien)
Date: Wed, 10 Mar 2010 08:08:58 -0800
From: "David O'Brien" 
To: John Baldwin 
Message-ID: <20100310160858.GC58634@dragon.NUXI.org>
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003101050.46696.jhb@freebsd.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 16:08:59 -0000

On Wed, Mar 10, 2010 at 10:50:46AM -0500, John Baldwin wrote:
> On Wednesday 10 March 2010 10:23:39 am David O'Brien wrote:
> > Hi Qing,
> > 
> > This change doesn't seem to work in the common case, and has made the
> > kernel toxic - with folks unable to connect to 127.0.0.1.  Please back
> > this out or adjust the change.
> 
> Did you try the route.h patch he posted to current@?

I looked at it, and at the diff of his original commit.  The changes were
large enough that I don't want to assume his patch takes care of all the
issues given that patch hasn't been committed verbatim.

We also have reports of the patch not working in freebsd-current@.
 
-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 17:04:00 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CB1E106567F;
	Wed, 10 Mar 2010 17:04:00 +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 8DD3F8FC29;
	Wed, 10 Mar 2010 17:03:58 +0000 (UTC)
Received: from c220-239-227-59.carlnfd1.nsw.optusnet.com.au
	(c220-239-227-59.carlnfd1.nsw.optusnet.com.au [220.239.227.59])
	by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o2AH3t24019206
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 11 Mar 2010 04:03:57 +1100
Date: Thu, 11 Mar 2010 04:03:55 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Maxim Sobolev 
In-Reply-To: <201003091931.o29JV83g008354@svn.freebsd.org>
Message-ID: <20100311040311.T14593@delplex.bde.org>
References: <201003091931.o29JV83g008354@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: r204919 - head/sbin/newfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 17:04:00 -0000

On Tue, 9 Mar 2010, Maxim Sobolev wrote:

> Log:
>  o bdeficize expand_number_int() function;
>
>  o revert most of the recent changes (int -> int64_t conversion) by using
>  this functon for parsing all options.

Thanks.  Now the parts that I don't like are small enough to review.
[Review sent privately.]

Bruce

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 17:46:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DA701065677;
	Wed, 10 Mar 2010 17:46:51 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f183.google.com (mail-qy0-f183.google.com
	[209.85.221.183])
	by mx1.freebsd.org (Postfix) with ESMTP id E70CF8FC23;
	Wed, 10 Mar 2010 17:46:50 +0000 (UTC)
Received: by qyk14 with SMTP id 14so3720254qyk.9
	for ; Wed, 10 Mar 2010 09:46:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=mDvf9MUuPyww+DMS4L5ql5721SlY6uHqjYkFDLYQnfQ=;
	b=ab0jdvLlJ5FtSZCldC7zGZo+FFZwY8YNWPJTy/P8hbc32VuBa1SkdFSu3ohQX3FAD+
	4G7MhUgVtydc3kGxud42k2vULeji64fB+SykS9/iU6BewzC0TsqVf04UkZD/zXLRZZC9
	1lgFeo/VF78CJm+5m+c7EFWT4+Fl76Hn77+jE=
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=VYyDQJnsLAE/3BxOUrwgLwVZGNXIjCm3W/XIr+k9ai1IC4MgvufoAzEz8is9QL8E74
	S2Z8yqOk61x2F3mRz2kq+DxEvNgP9Wz7iIAmHGRocrK2mEl/UTiquWKUE1WdUpvhsxdQ
	XC5VureOscqcZWqibhWi9vxT0Yi2GJooIFLuA=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.128.30 with SMTP id i30mr142265vcs.238.1268243209455; Wed, 
	10 Mar 2010 09:46:49 -0800 (PST)
In-Reply-To: <20100310160858.GC58634@dragon.NUXI.org>
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
Date: Wed, 10 Mar 2010 09:46:49 -0800
X-Google-Sender-Auth: e8ea8a20c7dc5667
Message-ID: <9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
From: Qing Li 
To: obrien@freebsd.org
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, John Baldwin 
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 17:46:51 -0000

>
> I looked at it, and at the diff of his original commit. =A0The changes we=
re
> large enough that I don't want to assume his patch takes care of all the
> issues given that patch hasn't been committed verbatim.
>

The change itself is not a huge change but if you disagree, then
please be specific.
The current mechanism and code is broken according to the original
design intention.

I have a habit of not committing things or quick finger until everyone
had a chance
to test the patch, although I have done unit testings myself. When you say
"... made the kernel toxic" and "...I don't want to assume ...", well, agai=
n, be
specific instead about what you mean and give me details.

The other reason I decided to postpone is because I wanted to spend
more time with
the PPP driver. Every other PPP interface types (if_tun, if_ng etc.)
updates the if_link_state
variable except PPP.

>
> We also have reports of the patch not working in freebsd-current@.
>

I have seen that report but it lacks detail. I have asked for more
information and
will investigate further as soon as it becomes available.

-- Qing

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 17:53:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A45A3106566C;
	Wed, 10 Mar 2010 17:53:59 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 666238FC1D;
	Wed, 10 Mar 2010 17:53:59 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2AHrwg4064726;
	Wed, 10 Mar 2010 09:53:58 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2AHrwxf064725;
	Wed, 10 Mar 2010 09:53:58 -0800 (PST) (envelope-from obrien)
Date: Wed, 10 Mar 2010 09:53:58 -0800
From: "David O'Brien" 
To: Qing Li 
Message-ID: <20100310175358.GB64044@dragon.NUXI.org>
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
	<9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 17:53:59 -0000

On Wed, Mar 10, 2010 at 09:46:49AM -0800, Qing Li wrote:
> >
> > I looked at it, and at the diff of his original commit.  The changes were
> > large enough that I don't want to assume his patch takes care of all the
> > issues given that patch hasn't been committed verbatim.
> 
> The change itself is not a huge change but if you disagree, then
> please be specific.

I'm not disagreeing.  I'm saying you and others that have worked in the
routing code are the best judge.

> The current mechanism and code is broken according to the original
> design intention.

But able to ping 127.0.0.1. :-)

> When you say
> "... made the kernel toxic" and "...I don't want to assume ...", well,
> again, be specific instead about what you mean and give me details.

A stock kernel cannot ping 127.0.0.1.  It is claimed there is no route to
127.0.0.1.  David Wolfskill has the same problem, as have others in the
freebsd-current@ mailing list.  I don't know about others, but not being
able to connect to 127.0.0.1 totally breaks my installation.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:05:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 65E50106566C;
	Wed, 10 Mar 2010 18:05:35 +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 35E968FC1B;
	Wed, 10 Mar 2010 18:05:35 +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 DAE2146B58;
	Wed, 10 Mar 2010 13:05:34 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 3E6078A021;
	Wed, 10 Mar 2010 13:05:34 -0500 (EST)
From: John Baldwin 
To: obrien@freebsd.org
Date: Wed, 10 Mar 2010 13:01:06 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
In-Reply-To: <20100310160858.GC58634@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003101301.06583.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Wed, 10 Mar 2010 13:05:34 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:05:35 -0000

On Wednesday 10 March 2010 11:08:58 am David O'Brien wrote:
> On Wed, Mar 10, 2010 at 10:50:46AM -0500, John Baldwin wrote:
> > On Wednesday 10 March 2010 10:23:39 am David O'Brien wrote:
> > > Hi Qing,
> > > 
> > > This change doesn't seem to work in the common case, and has made the
> > > kernel toxic - with folks unable to connect to 127.0.0.1.  Please back
> > > this out or adjust the change.
> > 
> > Did you try the route.h patch he posted to current@?
> 
> I looked at it, and at the diff of his original commit.  The changes were
> large enough that I don't want to assume his patch takes care of all the
> issues given that patch hasn't been committed verbatim.
> 
> We also have reports of the patch not working in freebsd-current@.

The reports have all said that the patch fixes pinging 127.0.0.1.  The one 
problem report is a different situation involving a VPN tunnel.  Just patch 
your system with the route.h patch for now.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:18:56 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06CA7106566B;
	Wed, 10 Mar 2010 18:18:56 +0000 (UTC) (envelope-from mj@feral.com)
Received: from ns1.feral.com (ns1.feral.com [192.67.166.1])
	by mx1.freebsd.org (Postfix) with ESMTP id C9F8F8FC23;
	Wed, 10 Mar 2010 18:18:55 +0000 (UTC)
Received: from [192.168.221.2] (remotevpn [192.168.221.2])
	by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2AIIswp076483
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 10 Mar 2010 10:18:54 -0800 (PST) (envelope-from mj@feral.com)
Message-ID: <4B97E28D.8070606@feral.com>
Date: Wed, 10 Mar 2010 10:18:53 -0800
From: Matthew Jacob 
Organization: Feral Software
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3
MIME-Version: 1.0
To: obrien@FreeBSD.org
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
	<9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
	<20100310175358.GB64044@dragon.NUXI.org>
In-Reply-To: <20100310175358.GB64044@dragon.NUXI.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3
	(ns1.feral.com [192.168.221.1]);
	Wed, 10 Mar 2010 10:18:55 -0800 (PST)
Cc: svn-src-head@FreeBSD.org, Qing Li ,
	svn-src-all@FreeBSD.org, src-committers@FreeBSD.org,
	John Baldwin 
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: mjacob@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:18:56 -0000


As well as breaking several RFCs

> A stock kernel cannot ping 127.0.0.1.  It is claimed there is no route to
> 127.0.0.1.  David Wolfskill has the same problem, as have others in the
> freebsd-current@ mailing list.  I don't know about others, but not being
> able to connect to 127.0.0.1 totally breaks my installation.
>
>    


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:26:29 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 979651065676;
	Wed, 10 Mar 2010 18:26:29 +0000 (UTC)
	(envelope-from julian@elischer.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 6D2968FC23;
	Wed, 10 Mar 2010 18:26:29 +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
	o2AIQSP5022200; Wed, 10 Mar 2010 10:26:29 -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
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 E18F52D6011;
	Wed, 10 Mar 2010 10:26:27 -0800 (PST)
Message-ID: <4B97E452.4080805@elischer.org>
Date: Wed, 10 Mar 2010 10:26:26 -0800
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: mjacob@FreeBSD.org
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
	<9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
	<20100310175358.GB64044@dragon.NUXI.org>
	<4B97E28D.8070606@feral.com>
In-Reply-To: <4B97E28D.8070606@feral.com>
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: src-committers@FreeBSD.org, John Baldwin ,
	svn-src-all@FreeBSD.org, obrien@FreeBSD.org,
	Qing Li , svn-src-head@FreeBSD.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:26:29 -0000

Matthew Jacob wrote:
> 
> As well as breaking several RFCs
> 
>> A stock kernel cannot ping 127.0.0.1.  It is claimed there is no route to
>> 127.0.0.1.  David Wolfskill has the same problem, as have others in the
>> freebsd-current@ mailing list.  I don't know about others, but not being
>> able to connect to 127.0.0.1 totally breaks my installation.
>>
>>    

We know there is a patch in the works for this so can we lay off
for a while?


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:27:06 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E162106567D;
	Wed, 10 Mar 2010 18:27:06 +0000 (UTC) (envelope-from mj@feral.com)
Received: from ns1.feral.com (ns1.feral.com [192.67.166.1])
	by mx1.freebsd.org (Postfix) with ESMTP id EFB1A8FC08;
	Wed, 10 Mar 2010 18:27:05 +0000 (UTC)
Received: from [192.168.221.2] (remotevpn [192.168.221.2])
	by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2AIR5pT076652
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 10 Mar 2010 10:27:05 -0800 (PST) (envelope-from mj@feral.com)
Message-ID: <4B97E479.4060207@feral.com>
Date: Wed, 10 Mar 2010 10:27:05 -0800
From: Matthew Jacob 
Organization: Feral Software
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3
MIME-Version: 1.0
To: Julian Elischer 
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<20100310152339.GA57873@dragon.NUXI.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
	<9ace436c1003100946s2e8f5f1cx1adee809c25ea92d@mail.gmail.com>
	<20100310175358.GB64044@dragon.NUXI.org>
	<4B97E28D.8070606@feral.com> <4B97E452.4080805@elischer.org>
In-Reply-To: <4B97E452.4080805@elischer.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3
	(ns1.feral.com [192.168.221.1]);
	Wed, 10 Mar 2010 10:27:05 -0800 (PST)
Cc: src-committers@FreeBSD.org, John Baldwin ,
	svn-src-all@FreeBSD.org, obrien@FreeBSD.org,
	Qing Li , svn-src-head@FreeBSD.org, mjacob@FreeBSD.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: mj@feral.com
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:27:06 -0000

On 03/10/2010 10:26 AM, Julian Elischer wrote:
> Matthew Jacob wrote:
>>
>> As well as breaking several RFCs
>>
>>> A stock kernel cannot ping 127.0.0.1.  It is claimed there is no 
>>> route to
>>> 127.0.0.1.  David Wolfskill has the same problem, as have others in the
>>> freebsd-current@ mailing list.  I don't know about others, but not 
>>> being
>>> able to connect to 127.0.0.1 totally breaks my installation.
>>>
>
> We know there is a patch in the works for this so can we lay off
> for a while?
>
d'accord


From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:30:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 378E2106566C;
	Wed, 10 Mar 2010 18:30:56 +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 2758B8FC17;
	Wed, 10 Mar 2010 18:30: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 o2AIUugO025735;
	Wed, 10 Mar 2010 18:30:56 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AIUuwR025732;
	Wed, 10 Mar 2010 18:30:56 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003101830.o2AIUuwR025732@svn.freebsd.org>
From: Jung-uk Kim 
Date: Wed, 10 Mar 2010 18:30: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: r204965 - head/sys/dev/acpica
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:30:56 -0000

Author: jkim
Date: Wed Mar 10 18:30:55 2010
New Revision: 204965
URL: http://svn.freebsd.org/changeset/base/204965

Log:
  Fix white spaces.

Modified:
  head/sys/dev/acpica/acpi_video.c

Modified: head/sys/dev/acpica/acpi_video.c
==============================================================================
--- head/sys/dev/acpica/acpi_video.c	Wed Mar 10 18:13:17 2010	(r204964)
+++ head/sys/dev/acpica/acpi_video.c	Wed Mar 10 18:30:55 2010	(r204965)
@@ -584,8 +584,8 @@ acpi_video_vo_bind(struct acpi_video_out
 			vo->vo_economy = vo->vo_levels[BCL_ECONOMY];
 	}
 	if (vo->vo_levels != NULL)
-	    AcpiInstallNotifyHandler(handle, ACPI_DEVICE_NOTIFY,
-		acpi_video_vo_notify_handler, vo);
+		AcpiInstallNotifyHandler(handle, ACPI_DEVICE_NOTIFY,
+		    acpi_video_vo_notify_handler, vo);
 	ACPI_SERIAL_END(video_output);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 18:51:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B2EE31065670;
	Wed, 10 Mar 2010 18:51:13 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 96E1F8FC12;
	Wed, 10 Mar 2010 18:51: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 o2AIpDGE031601;
	Wed, 10 Mar 2010 18:51:13 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AIpDAR031598;
	Wed, 10 Mar 2010 18:51:13 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003101851.o2AIpDAR031598@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Wed, 10 Mar 2010 18:51: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: r204966 - head/sbin/nos-tun
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 18:51:13 -0000

Author: uqs
Date: Wed Mar 10 18:51:13 2010
New Revision: 204966
URL: http://svn.freebsd.org/changeset/base/204966

Log:
  nos-tun(8): make WARNS=3 clean
  
  The renames are in spirit of DragonflyBSD, to keep diff minimal.
  
  PR:		bin/140060
  Approved by:	ed (co-mentor)

Modified:
  head/sbin/nos-tun/Makefile
  head/sbin/nos-tun/nos-tun.c

Modified: head/sbin/nos-tun/Makefile
==============================================================================
--- head/sbin/nos-tun/Makefile	Wed Mar 10 18:30:55 2010	(r204965)
+++ head/sbin/nos-tun/Makefile	Wed Mar 10 18:51:13 2010	(r204966)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 PROG=	nos-tun
-WARNS?=	0
 MAN=	nos-tun.8
+WARNS?=	3
 
 .include 
 

Modified: head/sbin/nos-tun/nos-tun.c
==============================================================================
--- head/sbin/nos-tun/nos-tun.c	Wed Mar 10 18:30:55 2010	(r204965)
+++ head/sbin/nos-tun/nos-tun.c	Wed Mar 10 18:51:13 2010	(r204966)
@@ -89,7 +89,8 @@ int tun;                          /* tun
 
 static void usage(void);
 
-int Set_address(char *addr, struct sockaddr_in *sin)
+static int
+Set_address(char *addr, struct sockaddr_in *sin)
 {
   struct hostent *hp;
 
@@ -107,15 +108,16 @@ int Set_address(char *addr, struct socka
   return 0;
 }
 
-int tun_open(char *devname, struct sockaddr *ouraddr, char *theiraddr)
+static int
+tun_open(char *dev_name, struct sockaddr *ouraddr, char *theiraddr)
 {
   int s;
   struct sockaddr_in *sin;
 
   /* Open tun device */
-  tun = open (devname, O_RDWR);
+  tun = open(dev_name, O_RDWR);
   if (tun < 0) {
-    syslog(LOG_ERR,"can't open %s - %m",devname);
+    syslog(LOG_ERR,"can't open %s - %m", dev_name);
     return(1);
   }
 
@@ -125,8 +127,8 @@ int tun_open(char *devname, struct socka
   bzero((char *)&ifra, sizeof(ifra));
   bzero((char *)&ifrq, sizeof(ifrq));
 
-  strncpy(ifrq.ifr_name, devname+5, IFNAMSIZ);
-  strncpy(ifra.ifra_name, devname+5, IFNAMSIZ);
+  strncpy(ifrq.ifr_name, dev_name+5, IFNAMSIZ);
+  strncpy(ifra.ifra_name, dev_name+5, IFNAMSIZ);
 
   s = socket(AF_INET, SOCK_DGRAM, 0);
   if (s < 0) {
@@ -189,7 +191,8 @@ tunc_return:
   return(1);
 }
 
-void Finish(int signum)
+static void
+Finish(int signum)
 {
   int s;
 
@@ -238,7 +241,7 @@ int main (int argc, char **argv)
 {
   int  c, len, ipoff;
 
-  char *devname = NULL;
+  char *dev_name = NULL;
   char *point_to = NULL;
   char *to_point = NULL;
   char *target;
@@ -268,7 +271,7 @@ int main (int argc, char **argv)
       point_to = optarg;
       break;
     case 't':
-      devname = optarg;
+      dev_name = optarg;
       break;
     case 'p':
       protocol = optarg;
@@ -278,7 +281,7 @@ int main (int argc, char **argv)
   argc -= optind;
   argv += optind;
 
-  if ((argc != 1 && argc != 2) || (devname == NULL) ||
+  if ((argc != 1 && argc != 2) || (dev_name == NULL) ||
       (point_to == NULL) || (to_point == NULL)) {
     usage();
   }
@@ -302,7 +305,7 @@ int main (int argc, char **argv)
     exit(2);
   }
 
-  if(tun_open(devname, &t_laddr, to_point)) {
+  if(tun_open(dev_name, &t_laddr, to_point)) {
     closelog();
     exit(3);
   }
@@ -386,7 +389,7 @@ int main (int argc, char **argv)
 }
 
 static void
-usage()
+usage(void)
 {
 	fprintf(stderr,
 "usage: nos-tun -t tunnel -s source -d destination -p protocol_number [source] target\n");

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 19:50:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62A981065678;
	Wed, 10 Mar 2010 19:50:53 +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 37C4E8FC17;
	Wed, 10 Mar 2010 19:50: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 o2AJoric044973;
	Wed, 10 Mar 2010 19:50:53 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AJoriE044968;
	Wed, 10 Mar 2010 19:50:53 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003101950.o2AJoriE044968@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 10 Mar 2010 19:50: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: r204972 - in head/sys: conf i386/conf i386/i386 i386/xen
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 19:50:53 -0000

Author: jhb
Date: Wed Mar 10 19:50:52 2010
New Revision: 204972
URL: http://svn.freebsd.org/changeset/base/204972

Log:
  Make NKPT a kernel option on i386 so that it can be set to a non-default
  value from kernel config files.
  
  Tested by:	Charles Sprickman  spork of bway net
  MFC after:	2 weeks

Modified:
  head/sys/conf/options.i386
  head/sys/i386/conf/NOTES
  head/sys/i386/i386/mp_machdep.c
  head/sys/i386/xen/mp_machdep.c

Modified: head/sys/conf/options.i386
==============================================================================
--- head/sys/conf/options.i386	Wed Mar 10 19:49:33 2010	(r204971)
+++ head/sys/conf/options.i386	Wed Mar 10 19:50:52 2010	(r204972)
@@ -12,6 +12,7 @@ I586_PMC_GUPROF		opt_i586_guprof.h
 MAXMEM
 MPTABLE_FORCE_HTT
 MP_WATCHDOG
+NKPT			opt_pmap.h
 PERFMON
 PMAP_SHPGPERPROC	opt_pmap.h
 POWERFAIL_NMI		opt_trap.h

Modified: head/sys/i386/conf/NOTES
==============================================================================
--- head/sys/i386/conf/NOTES	Wed Mar 10 19:49:33 2010	(r204971)
+++ head/sys/i386/conf/NOTES	Wed Mar 10 19:50:52 2010	(r204972)
@@ -862,6 +862,15 @@ options 	PMAP_SHPGPERPROC=201
 #
 options 	KVA_PAGES=260
 
+#
+# Number of initial kernel page table pages used for early bootstrap.
+# This number should include enough pages to map the kernel, any
+# modules or other data loaded with the kernel by the loader, and data
+# structures allocated before the VM system is initialized such as the
+# vm_page_t array.  Each page table page maps 4MB (2MB with PAE).
+#
+options 	NKPT=31
+
 
 #####################################################################
 # ABI Emulation

Modified: head/sys/i386/i386/mp_machdep.c
==============================================================================
--- head/sys/i386/i386/mp_machdep.c	Wed Mar 10 19:49:33 2010	(r204971)
+++ head/sys/i386/i386/mp_machdep.c	Wed Mar 10 19:50:52 2010	(r204972)
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
 #include "opt_mp_watchdog.h"
+#include "opt_pmap.h"
 #include "opt_sched.h"
 #include "opt_smp.h"
 

Modified: head/sys/i386/xen/mp_machdep.c
==============================================================================
--- head/sys/i386/xen/mp_machdep.c	Wed Mar 10 19:49:33 2010	(r204971)
+++ head/sys/i386/xen/mp_machdep.c	Wed Mar 10 19:50:52 2010	(r204972)
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
 #include "opt_mp_watchdog.h"
+#include "opt_pmap.h"
 #include "opt_sched.h"
 #include "opt_smp.h"
 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 19:55:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D24DF106568B;
	Wed, 10 Mar 2010 19:55:48 +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 C1C3B8FC2D;
	Wed, 10 Mar 2010 19:55: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 o2AJtmWb046139;
	Wed, 10 Mar 2010 19:55:48 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AJtmrP046136;
	Wed, 10 Mar 2010 19:55:48 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201003101955.o2AJtmrP046136@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 10 Mar 2010 19:55: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: r204974 - head/lib/libc/sparc64/fpu
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 19:55:48 -0000

Author: marius
Date: Wed Mar 10 19:55:48 2010
New Revision: 204974
URL: http://svn.freebsd.org/changeset/base/204974

Log:
  - The OPSZ macro actually only does the right thing for int32 and int64
    operands but not for double and extended double ones. Instead of trying
    to fix the macro just nuke it and unroll the loops in the correct way
    though as extended double operands turn out to be the only special case.
  - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded
    after setting type accordingly as it's generally decoded using the low
    2 bits as the type, which are 0 for these three instructions.
  - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be
    re-decoded using not only the operand mask appropriate for int64 but
    also the correct register number encoding.
  - Use const where appropriate.
  - Wrap long lines.
  
  Submitted by:	Peter Jeremy (partly)
  MFC after:	3 days

Modified:
  head/lib/libc/sparc64/fpu/fpu.c
  head/lib/libc/sparc64/fpu/fpu_emu.h

Modified: head/lib/libc/sparc64/fpu/fpu.c
==============================================================================
--- head/lib/libc/sparc64/fpu/fpu.c	Wed Mar 10 19:55:27 2010	(r204973)
+++ head/lib/libc/sparc64/fpu/fpu.c	Wed Mar 10 19:55:48 2010	(r204974)
@@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$");
 #define	X8(x) X4(x),X4(x)
 #define	X16(x) X8(x),X8(x)
 
-static char cx_to_trapx[] = {
+static const char cx_to_trapx[] = {
 	X1(FSR_NX),
 	X2(FSR_DZ),
 	X4(FSR_UF),
@@ -113,7 +113,8 @@ int __fpe_debug = 0;
 #endif
 #endif	/* FPU_DEBUG */
 
-static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, u_long);
+static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t,
+    u_long);
 
 /*
  * Need to use an fpstate on the stack; we could switch, so we cannot safely
@@ -169,7 +170,7 @@ __fpu_exception(struct utrapframe *uf)
 void
 __fpu_dumpfpn(struct fpn *fp)
 {
-	static char *class[] = {
+	static const char *const class[] = {
 		"SNAN", "QNAN", "ZERO", "NUM", "INF"
 	};
 
@@ -181,15 +182,11 @@ __fpu_dumpfpn(struct fpn *fp)
 }
 #endif
 
-static int opmask[] = {0, 0, 1, 3};
+static const int opmask[] = {0, 0, 1, 3, 1};
 
 /* Decode 5 bit register field depending on the type. */
 #define	RN_DECODE(tp, rn) \
-	((tp == FTYPE_DBL || tp == FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) & \
-	    ~opmask[tp])
-
-/* Operand size in 32-bit registers. */
-#define	OPSZ(tp)	((tp) == FTYPE_LNG ? 2 : (1 << (tp)))
+	((tp) >= FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn))
 
 /*
  * Helper for forming the below case statements. Build only the op3 and opf
@@ -209,8 +206,6 @@ static void
 __fpu_mov(struct fpemu *fe, int type, int rd, int rs2, u_int32_t nand,
     u_int32_t xor)
 {
-	u_int64_t tmp64;
-	int i;
 
 	if (type == FTYPE_INT || type == FTYPE_SNG)
 		__fpu_setreg(rd, (__fpu_getreg(rs2) & ~nand) ^ xor);
@@ -219,13 +214,10 @@ __fpu_mov(struct fpemu *fe, int type, in
 		 * Need to use the double versions to be able to access
 		 * the upper 32 fp registers.
 		 */
-		for (i = 0; i < OPSZ(type); i += 2, rd += 2, rs2 += 2) {
-			tmp64 = __fpu_getreg64(rs2);
-			if (i == 0)
-				tmp64 = (tmp64 & ~((u_int64_t)nand << 32)) ^
-				    ((u_int64_t)xor << 32);
-			__fpu_setreg64(rd, tmp64);
-		}
+		__fpu_setreg64(rd, (__fpu_getreg64(rs2) &
+		    ~((u_int64_t)nand << 32)) ^ ((u_int64_t)xor << 32));
+		if (type == FTYPE_EXT)
+			__fpu_setreg64(rd + 2, __fpu_getreg64(rs2 + 2));
 	}
 }
 
@@ -271,17 +263,17 @@ __fpu_cmpck(struct fpemu *fe)
  * multiply two integers this way.
  */
 static int
-__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, u_long tstate)
+__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn,
+    u_long tstate)
 {
 	struct fpn *fp;
 	int opf, rs1, rs2, rd, type, mask, cx, cond;
 	u_long reg, fsr;
 	u_int space[4];
-	int i;
 
 	/*
 	 * `Decode' and execute instruction.  Start with no exceptions.
-	 * The type of any opf opcode is in the bottom two bits, so we
+	 * The type of almost any OPF opcode is in the bottom two bits, so we
 	 * squish them out here.
 	 */
 	opf = insn & (IF_MASK(IF_F3_OP3_SHIFT, IF_F3_OP3_BITS) |
@@ -359,7 +351,7 @@ __fpu_execute(struct utrapframe *uf, str
 		__fpu_explode(fe, &fe->fe_f2, type, rs2);
 		__fpu_compare(fe, 1, IF_F3_CC(insn));
 		return (__fpu_cmpck(fe));
-	case FOP(INS2_FPop1, INSFP1_FMOV):	/* these should all be pretty obvious */
+	case FOP(INS2_FPop1, INSFP1_FMOV):
 		__fpu_mov(fe, type, rd, rs2, 0, 0);
 		return (0);
 	case FOP(INS2_FPop1, INSFP1_FNEG):
@@ -410,6 +402,7 @@ __fpu_execute(struct utrapframe *uf, str
 	case FOP(INS2_FPop1, INSFP1_FxTOd):
 	case FOP(INS2_FPop1, INSFP1_FxTOq):
 		type = FTYPE_LNG;
+		rs2 = RN_DECODE(type, IF_F3_RS2(insn));
 		__fpu_explode(fe, fp = &fe->fe_f1, type, rs2);
 		/* sneaky; depends on instruction encoding */
 		type = (IF_F3_OPF(insn) >> 2) & 3;
@@ -418,8 +411,7 @@ __fpu_execute(struct utrapframe *uf, str
 	case FOP(INS2_FPop1, INSFP1_FTOx):
 		__fpu_explode(fe, fp = &fe->fe_f1, type, rs2);
 		type = FTYPE_LNG;
-		mask = 1;	/* needs 2 registers */
-		rd = IF_F3_RD(insn) & ~mask;
+		rd = RN_DECODE(type, IF_F3_RD(insn));
 		break;
 	case FOP(INS2_FPop1, INSFP1_FTOs):
 	case FOP(INS2_FPop1, INSFP1_FTOd):
@@ -457,10 +449,10 @@ __fpu_execute(struct utrapframe *uf, str
 	if (type == FTYPE_INT || type == FTYPE_SNG)
 		__fpu_setreg(rd, space[0]);
 	else {
-		for (i = 0; i < OPSZ(type); i += 2) {
-			__fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) |
-			    space[i + 1]);
-		}
+		__fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]);
+		if (type == FTYPE_EXT)
+			__fpu_setreg64(rd + 2,
+			    ((u_int64_t)space[2] << 32) | space[3]);
 	}
 	return (0);	/* success */
 }

Modified: head/lib/libc/sparc64/fpu/fpu_emu.h
==============================================================================
--- head/lib/libc/sparc64/fpu/fpu_emu.h	Wed Mar 10 19:55:27 2010	(r204973)
+++ head/lib/libc/sparc64/fpu/fpu_emu.h	Wed Mar 10 19:55:48 2010	(r204974)
@@ -140,7 +140,7 @@ struct fpn {
 #define	FTYPE_SNG	INSFP_s
 #define	FTYPE_DBL	INSFP_d
 #define	FTYPE_EXT	INSFP_q
-#define	FTYPE_LNG	-1
+#define	FTYPE_LNG	5
 
 /*
  * Emulator state.

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 20:22:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4984F106564A;
	Wed, 10 Mar 2010 20:22:58 +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 393DE8FC19;
	Wed, 10 Mar 2010 20: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 o2AKMwR5052255;
	Wed, 10 Mar 2010 20:22:58 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AKMwvX052253;
	Wed, 10 Mar 2010 20:22:58 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003102022.o2AKMwvX052253@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Mar 2010 20: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: r204975 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 20:22:58 -0000

Author: yongari
Date: Wed Mar 10 20:22:57 2010
New Revision: 204975
URL: http://svn.freebsd.org/changeset/base/204975

Log:
  Enable hardware fixes for BCM5704 B0 as recommended by data sheet.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Mar 10 19:55:48 2010	(r204974)
+++ head/sys/dev/bge/if_bge.c	Wed Mar 10 20:22:57 2010	(r204975)
@@ -1342,6 +1342,7 @@ static int
 bge_chipinit(struct bge_softc *sc)
 {
 	uint32_t dma_rw_ctl;
+	uint16_t val;
 	int i;
 
 	/* Set endianness before we access any non-PCI registers. */
@@ -1362,6 +1363,17 @@ bge_chipinit(struct bge_softc *sc)
 	    i < BGE_STATUS_BLOCK_END + 1; i += sizeof(uint32_t))
 		BGE_MEMWIN_WRITE(sc, i, 0);
 
+	if (sc->bge_chiprev == BGE_CHIPREV_5704_BX) {
+		/*
+		 *  Fix data corruption casued by non-qword write with WB.
+		 *  Fix master abort in PCI mode.
+		 *  Fix PCI latency timer.
+		 */
+		val = pci_read_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, 2);
+		val |= (1 << 10) | (1 << 12) | (1 << 13);
+		pci_write_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, val, 2);
+	}
+
 	/*
 	 * Set up the PCI DMA control register.
 	 */

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 20:30:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B4FF7106564A;
	Wed, 10 Mar 2010 20:30:51 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A561A8FC08;
	Wed, 10 Mar 2010 20:30: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 o2AKUpTx054016;
	Wed, 10 Mar 2010 20:30:51 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AKUpSx054014;
	Wed, 10 Mar 2010 20:30:51 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201003102030.o2AKUpSx054014@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 10 Mar 2010 20:30: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: r204976 - head/sys/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 20:30:51 -0000

Author: imp
Date: Wed Mar 10 20:30:51 2010
New Revision: 204976
URL: http://svn.freebsd.org/changeset/base/204976

Log:
  Fix copyright spelling
  
  PR:		139825
  Submitted by:	Ruslan Mahmatkhanov

Modified:
  head/sys/sys/pioctl.h

Modified: head/sys/sys/pioctl.h
==============================================================================
--- head/sys/sys/pioctl.h	Wed Mar 10 20:22:57 2010	(r204975)
+++ head/sys/sys/pioctl.h	Wed Mar 10 20:30:51 2010	(r204976)
@@ -1,5 +1,5 @@
 /*-
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 20:31:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFA4A106566C;
	Wed, 10 Mar 2010 20:31:30 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F03D8FC24;
	Wed, 10 Mar 2010 20:31: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 o2AKVUq1054198;
	Wed, 10 Mar 2010 20:31:30 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AKVUmc054183;
	Wed, 10 Mar 2010 20:31:30 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201003102031.o2AKVUmc054183@svn.freebsd.org>
From: Warner Losh 
Date: Wed, 10 Mar 2010 20:31:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r204977 - head/usr.bin/truss
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 20:31:30 -0000

Author: imp
Date: Wed Mar 10 20:31:30 2010
New Revision: 204977
URL: http://svn.freebsd.org/changeset/base/204977

Log:
  Fix copyright spelling.
  
  PR:		139825
  Submitted by:	Ruslan Mahmatkhanov

Modified:
  head/usr.bin/truss/amd64-fbsd.c
  head/usr.bin/truss/amd64-fbsd32.c
  head/usr.bin/truss/amd64-linux32.c
  head/usr.bin/truss/extern.h
  head/usr.bin/truss/i386-fbsd.c
  head/usr.bin/truss/i386-linux.c
  head/usr.bin/truss/ia64-fbsd.c
  head/usr.bin/truss/main.c
  head/usr.bin/truss/mips-fbsd.c
  head/usr.bin/truss/powerpc-fbsd.c
  head/usr.bin/truss/setup.c
  head/usr.bin/truss/sparc64-fbsd.c
  head/usr.bin/truss/syscalls.c
  head/usr.bin/truss/truss.h

Modified: head/usr.bin/truss/amd64-fbsd.c
==============================================================================
--- head/usr.bin/truss/amd64-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/amd64-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/amd64-fbsd32.c
==============================================================================
--- head/usr.bin/truss/amd64-fbsd32.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/amd64-fbsd32.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/amd64-linux32.c
==============================================================================
--- head/usr.bin/truss/amd64-linux32.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/amd64-linux32.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/extern.h
==============================================================================
--- head/usr.bin/truss/extern.h	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/extern.h	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/i386-fbsd.c
==============================================================================
--- head/usr.bin/truss/i386-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/i386-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/i386-linux.c
==============================================================================
--- head/usr.bin/truss/i386-linux.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/i386-linux.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/ia64-fbsd.c
==============================================================================
--- head/usr.bin/truss/ia64-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/ia64-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/main.c
==============================================================================
--- head/usr.bin/truss/main.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/main.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*-
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/mips-fbsd.c
==============================================================================
--- head/usr.bin/truss/mips-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/mips-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1998 Sean Eric Fagan
+ * Copyright 1998 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/powerpc-fbsd.c
==============================================================================
--- head/usr.bin/truss/powerpc-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/powerpc-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2006 Peter Grehan 
- * Copryight 2005 Orlando Bassotto 
- * Copryight 1998 Sean Eric Fagan
+ * Copyright 2005 Orlando Bassotto 
+ * Copyright 1998 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/setup.c
==============================================================================
--- head/usr.bin/truss/setup.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/setup.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*-
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/sparc64-fbsd.c
==============================================================================
--- head/usr.bin/truss/sparc64-fbsd.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/sparc64-fbsd.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1998 Sean Eric Fagan
+ * Copyright 1998 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/syscalls.c	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 1997 Sean Eric Fagan
+ * Copyright 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/usr.bin/truss/truss.h
==============================================================================
--- head/usr.bin/truss/truss.h	Wed Mar 10 20:30:51 2010	(r204976)
+++ head/usr.bin/truss/truss.h	Wed Mar 10 20:31:30 2010	(r204977)
@@ -1,5 +1,5 @@
 /*
- * Copryight 2001 Jamey Wood
+ * Copyright 2001 Jamey Wood
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 20:54:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8BC841065676;
	Wed, 10 Mar 2010 20:54: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 618C18FC1B;
	Wed, 10 Mar 2010 20:54: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 o2AKs83B059279;
	Wed, 10 Mar 2010 20:54:08 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AKs8Yd059277;
	Wed, 10 Mar 2010 20:54:08 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003102054.o2AKs8Yd059277@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Mar 2010 20:54: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: r204978 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 20:54:08 -0000

Author: yongari
Date: Wed Mar 10 20:54:08 2010
New Revision: 204978
URL: http://svn.freebsd.org/changeset/base/204978

Log:
  Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
  Also disable relaxed ordering as recommended by data sheet for
  PCI-X devices. For PCI-X BCM5704, set maximum outstanding split
  transactions to 0 as indicated by data sheet.
  For BCM5703 in PCI-X mode, DMA read watermark should be less than
  or equal to maximum read byte count configuration. Enforce this
  limitation in DMA read watermark configuration.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Mar 10 20:31:30 2010	(r204977)
+++ head/sys/dev/bge/if_bge.c	Wed Mar 10 20:54:08 2010	(r204978)
@@ -1390,6 +1390,15 @@ bge_chipinit(struct bge_softc *sc)
 			dma_rw_ctl |= (sc->bge_asicrev == BGE_ASICREV_BCM5780) ?
 			    BGE_PCIDMARWCTL_ONEDMA_ATONCE_GLOBAL :
 			    BGE_PCIDMARWCTL_ONEDMA_ATONCE_LOCAL;
+		} else if (sc->bge_asicrev == BGE_ASICREV_BCM5703) {
+			/*
+			 * In the BCM5703, the DMA read watermark should
+			 * be set to less than or equal to the maximum
+			 * memory read byte count of the PCI-X command
+			 * register.
+			 */
+			dma_rw_ctl |= BGE_PCIDMARWCTL_RD_WAT_SHIFT(4) |
+			    BGE_PCIDMARWCTL_WR_WAT_SHIFT(3);
 		} else if (sc->bge_asicrev == BGE_ASICREV_BCM5704) {
 			/* 1536 bytes for read, 384 bytes for write. */
 			dma_rw_ctl |= BGE_PCIDMARWCTL_RD_WAT_SHIFT(7) |
@@ -3170,7 +3179,26 @@ bge_reset(struct bge_softc *sc)
 	pci_write_config(dev, BGE_PCI_CACHESZ, cachesize, 4);
 	pci_write_config(dev, BGE_PCI_CMD, command, 4);
 	write_op(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ);
-
+	/*
+	 * Disable PCI-X relaxed ordering to ensure status block update
+	 * comes first than packet buffer DMA. Otherwise driver may
+	 * read stale status block.
+	 */
+	if (sc->bge_flags & BGE_FLAG_PCIX) {
+		devctl = pci_read_config(dev,
+		    sc->bge_pcixcap + PCIXR_COMMAND, 2);
+		devctl &= ~PCIXM_COMMAND_ERO;
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5703) {
+			devctl &= ~PCIXM_COMMAND_MAX_READ;
+			devctl |= PCIXM_COMMAND_MAX_READ_2048;
+		} else if (sc->bge_asicrev == BGE_ASICREV_BCM5704) {
+			devctl &= ~(PCIXM_COMMAND_MAX_SPLITS |
+			    PCIXM_COMMAND_MAX_READ);
+			devctl |= PCIXM_COMMAND_MAX_READ_2048;
+		}
+		pci_write_config(dev, sc->bge_pcixcap + PCIXR_COMMAND,
+		    devctl, 2);
+	}
 	/* Re-enable MSI, if neccesary, and enable the memory arbiter. */
 	if (BGE_IS_5714_FAMILY(sc)) {
 		/* This chip disables MSI on reset. */

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 20:55:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00DA41065672;
	Wed, 10 Mar 2010 20:55:56 +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 E55F78FC15;
	Wed, 10 Mar 2010 20:55: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 o2AKttX7059717;
	Wed, 10 Mar 2010 20:55:55 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AKttem059715;
	Wed, 10 Mar 2010 20:55:55 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003102055.o2AKttem059715@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Mar 2010 20:55: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: r204979 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 20:55:56 -0000

Author: yongari
Date: Wed Mar 10 20:55:55 2010
New Revision: 204979
URL: http://svn.freebsd.org/changeset/base/204979

Log:
  Fix typo in r204975.
  
  Pointed out by:	marius

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Mar 10 20:54:08 2010	(r204978)
+++ head/sys/dev/bge/if_bge.c	Wed Mar 10 20:55:55 2010	(r204979)
@@ -1365,7 +1365,7 @@ bge_chipinit(struct bge_softc *sc)
 
 	if (sc->bge_chiprev == BGE_CHIPREV_5704_BX) {
 		/*
-		 *  Fix data corruption casued by non-qword write with WB.
+		 *  Fix data corruption caused by non-qword write with WB.
 		 *  Fix master abort in PCI mode.
 		 *  Fix PCI latency timer.
 		 */

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 21:35:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 84D54106566C;
	Wed, 10 Mar 2010 21:35:42 +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 7514A8FC08;
	Wed, 10 Mar 2010 21:35: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 o2ALZg0H068455;
	Wed, 10 Mar 2010 21:35:42 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ALZg8Z068453;
	Wed, 10 Mar 2010 21:35:42 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003102135.o2ALZg8Z068453@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 10 Mar 2010 21:35: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: r204980 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 21:35:42 -0000

Author: jhb
Date: Wed Mar 10 21:35:42 2010
New Revision: 204980
URL: http://svn.freebsd.org/changeset/base/204980

Log:
  Add descriptions for debug.ktr sysctl nodes.

Modified:
  head/sys/kern/kern_ktr.c

Modified: head/sys/kern/kern_ktr.c
==============================================================================
--- head/sys/kern/kern_ktr.c	Wed Mar 10 20:55:55 2010	(r204979)
+++ head/sys/kern/kern_ktr.c	Wed Mar 10 21:35:42 2010	(r204980)
@@ -84,20 +84,25 @@ SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFL
 
 int	ktr_cpumask = KTR_CPUMASK;
 TUNABLE_INT("debug.ktr.cpumask", &ktr_cpumask);
-SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0, "");
+SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0,
+    "Bitmask of CPUs on which KTR logging is enabled.");
 
 int	ktr_mask = KTR_MASK;
 TUNABLE_INT("debug.ktr.mask", &ktr_mask);
-SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, &ktr_mask, 0, "");
+SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, &ktr_mask, 0,
+    "Bitmask of KTR event classes for which logging is enabled.");
 
 int	ktr_compile = KTR_COMPILE;
-SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0, "");
+SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0,
+    "Bitmask of KTR event classes compiled into the kernel.");
 
 int	ktr_entries = KTR_ENTRIES;
-SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, &ktr_entries, 0, "");
+SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, &ktr_entries, 0,
+    "Number of entries in the KTR buffer.");
 
 int	ktr_version = KTR_VERSION;
-SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, "");
+SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0,
+    "Version of the KTR interface.");
 
 volatile int	ktr_idx = 0;
 struct	ktr_entry ktr_buf[KTR_ENTRIES];

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 21:37:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CAAFB1065678;
	Wed, 10 Mar 2010 21:37: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 BACDC8FC08;
	Wed, 10 Mar 2010 21:37: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 o2ALbJ2u068852;
	Wed, 10 Mar 2010 21:37:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ALbJho068850;
	Wed, 10 Mar 2010 21:37:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003102137.o2ALbJho068850@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Mar 2010 21:37: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: r204981 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 21:37:19 -0000

Author: yongari
Date: Wed Mar 10 21:37:19 2010
New Revision: 204981
URL: http://svn.freebsd.org/changeset/base/204981

Log:
  Fix typo in r204978.
  
  Pointed out by:	marius

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Mar 10 21:35:42 2010	(r204980)
+++ head/sys/dev/bge/if_bge.c	Wed Mar 10 21:37:19 2010	(r204981)
@@ -3181,7 +3181,7 @@ bge_reset(struct bge_softc *sc)
 	write_op(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ);
 	/*
 	 * Disable PCI-X relaxed ordering to ensure status block update
-	 * comes first than packet buffer DMA. Otherwise driver may
+	 * comes first then packet buffer DMA. Otherwise driver may
 	 * read stale status block.
 	 */
 	if (sc->bge_flags & BGE_FLAG_PCIX) {

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 21:45:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F59E1065670;
	Wed, 10 Mar 2010 21:45:41 +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 6F9028FC15;
	Wed, 10 Mar 2010 21:45: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 o2ALjfqg070791;
	Wed, 10 Mar 2010 21:45:41 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ALjfjg070789;
	Wed, 10 Mar 2010 21:45:41 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003102145.o2ALjfjg070789@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Mar 2010 21:45: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: r204983 - head/sys/dev/bwn
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 21:45:41 -0000

Author: yongari
Date: Wed Mar 10 21:45:40 2010
New Revision: 204983
URL: http://svn.freebsd.org/changeset/base/204983

Log:
  Fix build breakage introduced in r204922.

Modified:
  head/sys/dev/bwn/if_bwn.c

Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c	Wed Mar 10 21:42:05 2010	(r204982)
+++ head/sys/dev/bwn/if_bwn.c	Wed Mar 10 21:45:40 2010	(r204983)
@@ -10381,10 +10381,9 @@ bwn_rx_radiotap(struct bwn_mac *mac, str
 static void
 bwn_tsf_read(struct bwn_mac *mac, uint64_t *tsf)
 {
-	struct bwn_softc *sc = mac->mac_sc;
 	uint32_t low, high;
 
-	KASSERT(siba_get_revid(sc->sc_dev) >= 3,
+	KASSERT(siba_get_revid(mac->mac_sc->sc_dev) >= 3,
 	    ("%s:%d: fail", __func__, __LINE__));
 
 	low = BWN_READ_4(mac, BWN_REV3PLUS_TSF_LOW);

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 23:00:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A18F0106566B;
	Wed, 10 Mar 2010 23:00: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 766578FC13;
	Wed, 10 Mar 2010 23:00: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 o2AN0Fi4087916;
	Wed, 10 Mar 2010 23:00:15 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AN0F1T087914;
	Wed, 10 Mar 2010 23:00:15 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003102300.o2AN0F1T087914@svn.freebsd.org>
From: Maxim Sobolev 
Date: Wed, 10 Mar 2010 23:00: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: r204989 - head/sys/dev/mii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 23:00:15 -0000

Author: sobomax
Date: Wed Mar 10 23:00:15 2010
New Revision: 204989
URL: http://svn.freebsd.org/changeset/base/204989

Log:
  further narrow down no carrier workaround, since it appears to only affect
  very specific IBM hardware and other machines with the same BCM ASIC chip id
  0x57081021 are just fine.
  
  MFC after:	1 month

Modified:
  head/sys/dev/mii/brgphy.c

Modified: head/sys/dev/mii/brgphy.c
==============================================================================
--- head/sys/dev/mii/brgphy.c	Wed Mar 10 22:33:59 2010	(r204988)
+++ head/sys/dev/mii/brgphy.c	Wed Mar 10 23:00:15 2010	(r204989)
@@ -66,8 +66,6 @@ __FBSDID("$FreeBSD$");
 static int brgphy_probe(device_t);
 static int brgphy_attach(device_t);
 
-#define BCM5708S_BAD_CHIPID	0x57081021
-
 struct brgphy_softc {
 	struct mii_softc mii_sc;
 	int mii_oui;
@@ -145,6 +143,23 @@ static const struct mii_phydesc brgphys[
 	MII_PHY_END
 };
 
+#define HS21_PRODUCT_ID	"IBM eServer BladeCenter HS21"
+#define HS21_BCM_CHIPID	0x57081021
+
+static int
+detect_hs21(struct bce_softc *bce_sc)
+{
+	char *sysenv;
+
+	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);
+}
 
 /* Search for our PHY in the list of known PHYs */
 static int
@@ -295,10 +310,10 @@ brgphy_attach(device_t dev)
 			ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0);
 			printf("2500baseSX-FDX, ");
 		} else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc &&
-		    (bce_sc->bce_chipid == BCM5708S_BAD_CHIPID)) {
+		    (detect_hs21(bce_sc) != 0)) {
 			/*
 			 * There appears to be certain silicon revision
-			 * usually used in blades that is having issues with
+			 * in IBM HS21 blades that is having issues with
 			 * this driver wating for the auto-negotiation to
 			 * complete. This happens with a specific chip id
 			 * only and when the 1000baseSX-FDX is the only

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 23:02:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE3841065672;
	Wed, 10 Mar 2010 23:02:06 +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 CDA858FC22;
	Wed, 10 Mar 2010 23:02: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 o2AN26iJ088362;
	Wed, 10 Mar 2010 23:02:06 GMT (envelope-from sobomax@svn.freebsd.org)
Received: (from sobomax@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2AN265D088359;
	Wed, 10 Mar 2010 23:02:06 GMT (envelope-from sobomax@svn.freebsd.org)
Message-Id: <201003102302.o2AN265D088359@svn.freebsd.org>
From: Maxim Sobolev 
Date: Wed, 10 Mar 2010 23:02: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: r204990 - head/sys/dev/mii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 23:02:07 -0000

Author: sobomax
Date: Wed Mar 10 23:02:06 2010
New Revision: 204990
URL: http://svn.freebsd.org/changeset/base/204990

Log:
  Fix style(9) bugs in the previous revision.

Modified:
  head/sys/dev/mii/brgphy.c

Modified: head/sys/dev/mii/brgphy.c
==============================================================================
--- head/sys/dev/mii/brgphy.c	Wed Mar 10 23:00:15 2010	(r204989)
+++ head/sys/dev/mii/brgphy.c	Wed Mar 10 23:02:06 2010	(r204990)
@@ -152,12 +152,12 @@ detect_hs21(struct bce_softc *bce_sc)
 	char *sysenv;
 
 	if (bce_sc->bce_chipid != HS21_BCM_CHIPID)
-		return 0;
+		return (0);
 	sysenv = getenv("smbios.system.product");
 	if (sysenv == NULL)
-		return 0;
+		return (0);
 	if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0)
-		return 0;
+		return (0);
 	return (1);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 23:46:30 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A217106564A;
	Wed, 10 Mar 2010 23:46:30 +0000 (UTC)
	(envelope-from peterjeremy@acm.org)
Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au
	[211.29.132.198])
	by mx1.freebsd.org (Postfix) with ESMTP id E76CD8FC1A;
	Wed, 10 Mar 2010 23:46:29 +0000 (UTC)
Received: from server.vk2pj.dyndns.org
	(c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149])
	by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o2ANkQRg002692
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 11 Mar 2010 10:46:27 +1100
X-Bogosity: Ham, spamicity=0.000000
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o2ANkP2W069740;
	Thu, 11 Mar 2010 10:46:25 +1100 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o2ANkPB0069739;
	Thu, 11 Mar 2010 10:46:25 +1100 (EST) (envelope-from peter)
Date: Thu, 11 Mar 2010 10:46:25 +1100
From: Peter Jeremy 
To: Marius Strobl 
Message-ID: <20100310234625.GA69658@server.vk2pj.dyndns.org>
References: <201003101955.o2AJtmrP046136@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX"
Content-Disposition: inline
In-Reply-To: <201003101955.o2AJtmrP046136@svn.freebsd.org>
X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r204974 - head/lib/libc/sparc64/fpu
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 23:46:30 -0000


--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

One bug that crept in somewhere:

On 2010-Mar-10 19:55:48 +0000, Marius Strobl  wrote:
>Modified: head/lib/libc/sparc64/fpu/fpu.c
>@@ -181,15 +182,11 @@ __fpu_dumpfpn(struct fpn *fp)
> }
> #endif
>=20
>-static int opmask[] =3D {0, 0, 1, 3};
>+static const int opmask[] =3D {0, 0, 1, 3, 1};
>=20
=2E..
>Modified: head/lib/libc/sparc64/fpu/fpu_emu.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/lib/libc/sparc64/fpu/fpu_emu.h	Wed Mar 10 19:55:27 2010	(r204973)
>+++ head/lib/libc/sparc64/fpu/fpu_emu.h	Wed Mar 10 19:55:48 2010	(r204974)
>@@ -140,7 +140,7 @@ struct fpn {
> #define	FTYPE_SNG	INSFP_s
> #define	FTYPE_DBL	INSFP_d
> #define	FTYPE_EXT	INSFP_q
>-#define	FTYPE_LNG	-1
>+#define	FTYPE_LNG	5

FTYPE_* are used as indexes into opmask[].  Somewhere along the line,
FTYPE_LNG has changed from 4 to 5 but the opmask[] initialisers still
assume 4.  (It might be worth adding a comment into opmask[] so this
relationship is noted in future).

--=20
Peter Jeremy

--huq684BweRXVnRxX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkuYL1EACgkQ/opHv/APuIcZygCdFUUbJsCEYa+hxoib53TcKu0x
bCIAnj0t8dJ8nZb6TLkyqLzjsBZw4+hH
=PZ6y
-----END PGP SIGNATURE-----

--huq684BweRXVnRxX--

From owner-svn-src-head@FreeBSD.ORG  Wed Mar 10 23:58:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5929B106566B;
	Wed, 10 Mar 2010 23:58:41 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 345138FC15;
	Wed, 10 Mar 2010 23:58:40 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2ANweXs071158;
	Wed, 10 Mar 2010 15:58:40 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2ANweXo071157;
	Wed, 10 Mar 2010 15:58:40 -0800 (PST) (envelope-from obrien)
Date: Wed, 10 Mar 2010 15:58:40 -0800
From: "David O'Brien" 
To: John Baldwin 
Message-ID: <20100310235840.GA70978@dragon.NUXI.org>
References: <201003090111.o291Bj79062503@svn.freebsd.org>
	<201003101050.46696.jhb@freebsd.org>
	<20100310160858.GC58634@dragon.NUXI.org>
	<201003101301.06583.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201003101301.06583.jhb@freebsd.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r204902 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 10 Mar 2010 23:58:41 -0000

On Wed, Mar 10, 2010 at 01:01:06PM -0500, John Baldwin wrote:
> On Wednesday 10 March 2010 11:08:58 am David O'Brien wrote:
> > On Wed, Mar 10, 2010 at 10:50:46AM -0500, John Baldwin wrote:
> > > On Wednesday 10 March 2010 10:23:39 am David O'Brien wrote:
> > > > This change doesn't seem to work in the common case, and has made the
> > > > kernel toxic - with folks unable to connect to 127.0.0.1.  Please back
> > > > this out or adjust the change.
> > > 
> > > Did you try the route.h patch he posted to current@?
> > 
> > I looked at it, and at the diff of his original commit.  The changes were
> > large enough that I don't want to assume his patch takes care of all the
> > issues given that patch hasn't been committed verbatim.
> > 
> > We also have reports of the patch not working in freebsd-current@.
> 
> The reports have all said that the patch fixes pinging 127.0.0.1.  The one 
> problem report is a different situation involving a VPN tunnel.  Just patch 
> your system with the route.h patch for now.

I guess I don't get it - we have got reports of this badly affecting
basic functionallity for several people and yet we wont fix stock
sources?  This is serving users well?

Folks could have applied my patch sent to newvers.sh, but that was calmed
to be so bad that the commit was backed out.  Wow.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 01:35:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 08EFB1065675;
	Thu, 11 Mar 2010 01:35:39 +0000 (UTC)
	(envelope-from weongyo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC0358FC12;
	Thu, 11 Mar 2010 01:35: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 o2B1ZcUP022194;
	Thu, 11 Mar 2010 01:35:38 GMT (envelope-from weongyo@svn.freebsd.org)
Received: (from weongyo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B1ZctF022192;
	Thu, 11 Mar 2010 01:35:38 GMT (envelope-from weongyo@svn.freebsd.org)
Message-Id: <201003110135.o2B1ZctF022192@svn.freebsd.org>
From: Weongyo Jeong 
Date: Thu, 11 Mar 2010 01:35: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: r204992 - head/sys/dev/siba
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 01:35:39 -0000

Author: weongyo
Date: Thu Mar 11 01:35:38 2010
New Revision: 204992
URL: http://svn.freebsd.org/changeset/base/204992

Log:
  fixes a compile error if INVARIANTS is disabled.
  
  Pointy hat to:	me
  Submitted by:	Michael Butler 

Modified:
  head/sys/dev/siba/siba_core.c

Modified: head/sys/dev/siba/siba_core.c
==============================================================================
--- head/sys/dev/siba/siba_core.c	Thu Mar 11 01:02:27 2010	(r204991)
+++ head/sys/dev/siba/siba_core.c	Thu Mar 11 01:35:38 2010	(r204992)
@@ -2031,11 +2031,11 @@ siba_pcie_mdio_write(struct siba_pci *sp
 uint32_t
 siba_dma_translation(device_t dev)
 {
-	struct siba_dev_softc *sd = device_get_ivars(dev);
-	struct siba_softc *siba = sd->sd_bus;
 
-	KASSERT(siba->siba_type == SIBA_TYPE_PCI,
-	    ("unsupported bustype %d\n", siba->siba_type));
+	KASSERT(device_get_ivars(dev)->sd_bus->siba_type == SIBA_TYPE_PCI,
+	    ("unsupported bustype %d\n",
+	     device_get_ivars(dev)->sd_bus->siba_type));
+
 	return (SIBA_PCI_DMA);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 07:17:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2EE53106566B;
	Thu, 11 Mar 2010 07:17:15 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E08B8FC1C;
	Thu, 11 Mar 2010 07: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 o2B7HEVJ097773;
	Thu, 11 Mar 2010 07:17:15 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B7HEhE097772;
	Thu, 11 Mar 2010 07:17:14 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201003110717.o2B7HEhE097772@svn.freebsd.org>
From: Neel Natu 
Date: Thu, 11 Mar 2010 07:17: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: r204997 - in head/sys/mips: include mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 07:17:15 -0000

Author: neel
Date: Thu Mar 11 07:17:14 2010
New Revision: 204997
URL: http://svn.freebsd.org/changeset/base/204997

Log:
  Stash the context of the running thread at the time an IPI_STOP is received
  in 'stoppcbs[]'. We use the 'stoppcbs[]' context to generate the backtrace
  of such stopped threads.

Modified:
  head/sys/mips/include/kdb.h
  head/sys/mips/include/smp.h
  head/sys/mips/mips/db_trace.c
  head/sys/mips/mips/mp_machdep.c
  head/sys/mips/mips/swtch.S

Modified: head/sys/mips/include/kdb.h
==============================================================================
--- head/sys/mips/include/kdb.h	Thu Mar 11 03:18:16 2010	(r204996)
+++ head/sys/mips/include/kdb.h	Thu Mar 11 07:17:14 2010	(r204997)
@@ -32,6 +32,8 @@
 
 #include 
 
+#define	KDB_STOPPEDPCB(pc)	&stoppcbs[pc->pc_cpuid]
+
 static __inline void
 kdb_cpu_clear_singlestep(void)
 {

Modified: head/sys/mips/include/smp.h
==============================================================================
--- head/sys/mips/include/smp.h	Thu Mar 11 03:18:16 2010	(r204996)
+++ head/sys/mips/include/smp.h	Thu Mar 11 07:17:14 2010	(r204997)
@@ -17,6 +17,8 @@
 
 #ifdef _KERNEL
 
+#include 
+
 /*
  * Interprocessor interrupts for SMP.
  */
@@ -31,6 +33,8 @@ void	ipi_selected(cpumask_t cpus, int ip
 void	smp_init_secondary(u_int32_t cpuid);
 void	mpentry(void);
 
+extern struct pcb stoppcbs[];
+
 #endif /* !LOCORE */
 #endif /* _KERNEL */
 

Modified: head/sys/mips/mips/db_trace.c
==============================================================================
--- head/sys/mips/mips/db_trace.c	Thu Mar 11 03:18:16 2010	(r204996)
+++ head/sys/mips/mips/db_trace.c	Thu Mar 11 07:17:14 2010	(r204997)
@@ -169,6 +169,12 @@ loop:
 		subr = (uintptr_t)MipsKernTLBInvalidException;
 	else if (pcBetween(MipsUserTLBInvalidException, MipsTLBMissException))
 		subr = (uintptr_t)MipsUserTLBInvalidException;
+	else if (pcBetween(fork_trampoline, savectx))
+		subr = (uintptr_t)fork_trampoline;
+	else if (pcBetween(savectx, mips_cpu_throw))
+		subr = (uintptr_t)savectx;
+	else if (pcBetween(mips_cpu_throw, cpu_switch))
+		subr = (uintptr_t)cpu_throw;
 	else if (pcBetween(cpu_switch, MipsSwitchFPState))
 		subr = (uintptr_t)cpu_switch;
 	else if (pcBetween(_locore, _locoreEnd)) {
@@ -412,10 +418,8 @@ db_trace_thread(struct thread *thr, int 
                          : "=r" (pc)
 			 : "r" (ra));
 
-	}
-
-	else {
-		ctx = thr->td_pcb;
+	} else {
+		ctx = kdb_thr_ctx(thr);
 		sp = (register_t)ctx->pcb_context[PREG_SP];
 		pc = (register_t)ctx->pcb_context[PREG_PC];
 		ra = (register_t)ctx->pcb_context[PREG_RA];

Modified: head/sys/mips/mips/mp_machdep.c
==============================================================================
--- head/sys/mips/mips/mp_machdep.c	Thu Mar 11 03:18:16 2010	(r204996)
+++ head/sys/mips/mips/mp_machdep.c	Thu Mar 11 07:17:14 2010	(r204997)
@@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+struct pcb stoppcbs[MAXCPU];
+
 static void *dpcpu;
 static struct mtx ap_boot_mtx;
 
@@ -88,10 +90,14 @@ ipi_selected(cpumask_t cpus, int ipi)
 static int
 mips_ipi_handler(void *arg)
 {
+	int cpu;
 	cpumask_t cpumask;
 	u_int	ipi, ipi_bitmap;
 	int	bit;
 
+	cpu = PCPU_GET(cpuid);
+	cpumask = PCPU_GET(cpumask);
+
 	platform_ipi_clear();	/* quiesce the pending ipi interrupt */
 
 	ipi_bitmap = atomic_readandclear_int(PCPU_PTR(pending_ipis));
@@ -120,10 +126,16 @@ mips_ipi_handler(void *arg)
 			 * necessary to add it in the switch.
 			 */
 			CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD");
-			cpumask = PCPU_GET(cpumask);
+
+			savectx(&stoppcbs[cpu]);
+
+			/* Indicate we are stopped */
 			atomic_set_int(&stopped_cpus, cpumask);
+
+			/* Wait for restart */
 			while ((started_cpus & cpumask) == 0)
 				cpu_spinwait();
+
 			atomic_clear_int(&started_cpus, cpumask);
 			atomic_clear_int(&stopped_cpus, cpumask);
 			CTR0(KTR_SMP, "IPI_STOP (restart)");

Modified: head/sys/mips/mips/swtch.S
==============================================================================
--- head/sys/mips/mips/swtch.S	Thu Mar 11 03:18:16 2010	(r204996)
+++ head/sys/mips/mips/swtch.S	Thu Mar 11 07:17:14 2010	(r204997)
@@ -245,6 +245,14 @@ LEAF(savectx)
 	SAVE_U_PCB_CONTEXT(ra, PREG_RA, a0)
 	SAVE_U_PCB_CONTEXT(v0, PREG_SR, a0)
 	SAVE_U_PCB_CONTEXT(gp, PREG_GP, a0)
+
+	move	v0, ra			/* save 'ra' before we trash it */
+	jal	1f
+	nop
+1:
+	SAVE_U_PCB_CONTEXT(ra, PREG_PC, a0)
+	move	ra, v0			/* restore 'ra' before returning */
+
 	/*
 	 * FREEBSD_DEVELOPERS_FIXME:
 	 * In case there are CPU-specific registers that need

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 07:46:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F5B91065675;
	Thu, 11 Mar 2010 07:46:17 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F3118FC1F;
	Thu, 11 Mar 2010 07:46: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 o2B7kHFE004558;
	Thu, 11 Mar 2010 07:46:17 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B7kHeM004556;
	Thu, 11 Mar 2010 07:46:17 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201003110746.o2B7kHeM004556@svn.freebsd.org>
From: Marius Strobl 
Date: Thu, 11 Mar 2010 07: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: r205002 - head/lib/libc/sparc64/fpu
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 07:46:17 -0000

Author: marius
Date: Thu Mar 11 07:46:17 2010
New Revision: 205002
URL: http://svn.freebsd.org/changeset/base/205002

Log:
  Fix a typo in r204974 so that FTYPE_LNG matches the initialisers of
  the opmask array.
  
  Pointed out by:	Peter Jeremy

Modified:
  head/lib/libc/sparc64/fpu/fpu_emu.h

Modified: head/lib/libc/sparc64/fpu/fpu_emu.h
==============================================================================
--- head/lib/libc/sparc64/fpu/fpu_emu.h	Thu Mar 11 07:39:36 2010	(r205001)
+++ head/lib/libc/sparc64/fpu/fpu_emu.h	Thu Mar 11 07:46:17 2010	(r205002)
@@ -140,7 +140,7 @@ struct fpn {
 #define	FTYPE_SNG	INSFP_s
 #define	FTYPE_DBL	INSFP_d
 #define	FTYPE_EXT	INSFP_q
-#define	FTYPE_LNG	5
+#define	FTYPE_LNG	4
 
 /*
  * Emulator state.

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 08:03:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BBA1106566B;
	Thu, 11 Mar 2010 08:03:58 +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 3B44F8FC12;
	Thu, 11 Mar 2010 08:03: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 o2B83wYk008556;
	Thu, 11 Mar 2010 08:03:58 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B83weK008554;
	Thu, 11 Mar 2010 08:03:58 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003110803.o2B83weK008554@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 08:03: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: r205003 - head/sys/dev/siba
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 08:03:58 -0000

Author: thompsa
Date: Thu Mar 11 08:03:56 2010
New Revision: 205003
URL: http://svn.freebsd.org/changeset/base/205003

Log:
  Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
  non-debug cases.

Modified:
  head/sys/dev/siba/siba_core.c

Modified: head/sys/dev/siba/siba_core.c
==============================================================================
--- head/sys/dev/siba/siba_core.c	Thu Mar 11 07:46:17 2010	(r205002)
+++ head/sys/dev/siba/siba_core.c	Thu Mar 11 08:03:56 2010	(r205003)
@@ -2031,11 +2031,13 @@ siba_pcie_mdio_write(struct siba_pci *sp
 uint32_t
 siba_dma_translation(device_t dev)
 {
+#ifdef INVARIANTS
+	struct siba_dev_softc *sd = device_get_ivars(dev);
+	struct siba_softc *siba = sd->sd_bus;
 
-	KASSERT(device_get_ivars(dev)->sd_bus->siba_type == SIBA_TYPE_PCI,
-	    ("unsupported bustype %d\n",
-	     device_get_ivars(dev)->sd_bus->siba_type));
-
+	KASSERT(siba->siba_type == SIBA_TYPE_PCI,
+	    ("unsupported bustype %d\n", siba->siba_type));
+#endif
 	return (SIBA_PCI_DMA);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 08:33:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8D9851065672;
	Thu, 11 Mar 2010 08:33:39 +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 7D11E8FC1A;
	Thu, 11 Mar 2010 08:33: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 o2B8XdjD015214;
	Thu, 11 Mar 2010 08:33:39 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B8XdFr015212;
	Thu, 11 Mar 2010 08:33:39 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003110833.o2B8XdFr015212@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 08:33: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: r205005 - head/sys/dev/usb/controller
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 08:33:39 -0000

Author: thompsa
Date: Thu Mar 11 08:33:39 2010
New Revision: 205005
URL: http://svn.freebsd.org/changeset/base/205005

Log:
  Wrap the proc wakeup special case for ddb in ifdef DDB.
  
  Submitted by:	Giovanni Trematerra

Modified:
  head/sys/dev/usb/controller/usb_controller.c

Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c	Thu Mar 11 08:30:05 2010	(r205004)
+++ head/sys/dev/usb/controller/usb_controller.c	Thu Mar 11 08:33:39 2010	(r205005)
@@ -24,6 +24,8 @@
  * SUCH DAMAGE.
  */
 
+#include "opt_ddb.h"
+
 #include 
 #include 
 #include 
@@ -220,6 +222,7 @@ usb_bus_explore(struct usb_proc_msg *pm)
 			bus->driver_added_refcount = 1;
 		}
 
+#ifdef DDB
 		/*
 		 * The following three lines of code are only here to
 		 * recover from DDB:
@@ -227,6 +230,7 @@ usb_bus_explore(struct usb_proc_msg *pm)
 		usb_proc_rewakeup(&bus->control_xfer_proc);
 		usb_proc_rewakeup(&bus->giant_callback_proc);
 		usb_proc_rewakeup(&bus->non_giant_callback_proc);
+#endif
 
 		USB_BUS_UNLOCK(bus);
 
@@ -289,11 +293,13 @@ usb_power_wdog(void *arg)
 	usb_callout_reset(&bus->power_wdog,
 	    4 * hz, usb_power_wdog, arg);
 
+#ifdef DDB
 	/*
 	 * The following line of code is only here to recover from
 	 * DDB:
 	 */
 	usb_proc_rewakeup(&bus->explore_proc);	/* recover from DDB */
+#endif
 
 	USB_BUS_UNLOCK(bus);
 

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 11:09:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04FBE1065677;
	Thu, 11 Mar 2010 11:09:59 +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 E8EEF8FC0C;
	Thu, 11 Mar 2010 11:09: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 o2BB9wR5067792;
	Thu, 11 Mar 2010 11:09:58 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BB9wki067790;
	Thu, 11 Mar 2010 11:09:58 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003111109.o2BB9wki067790@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 11 Mar 2010 11:09: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: r205008 - head/usr.bin/script
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 11:09:59 -0000

Author: ed
Date: Thu Mar 11 11:09:58 2010
New Revision: 205008
URL: http://svn.freebsd.org/changeset/base/205008

Log:
  Make script(1) a little less broken.
  
  Close the file descriptor to the TTY. There is no reason why the parent
  process should keep track of the descriptor. This ensures that the
  application inside properly drains the TTY during exit(2).
  
  Reported by:	alfred
  MFC after:	2 weeks

Modified:
  head/usr.bin/script/script.c

Modified: head/usr.bin/script/script.c
==============================================================================
--- head/usr.bin/script/script.c	Thu Mar 11 08:58:13 2010	(r205007)
+++ head/usr.bin/script/script.c	Thu Mar 11 11:09:58 2010	(r205008)
@@ -158,6 +158,8 @@ main(int argc, char *argv[])
 	}
 	if (child == 0)
 		doshell(argv);
+	else
+		close(slave);
 
 	if (flushtime > 0)
 		tvp = &tv;

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 11:28:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 02A17106564A;
	Thu, 11 Mar 2010 11:28:30 +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 E68608FC1A;
	Thu, 11 Mar 2010 11:28: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 o2BBSTZ9083813;
	Thu, 11 Mar 2010 11:28:29 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BBSTwC083811;
	Thu, 11 Mar 2010 11:28:29 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003111128.o2BBSTwC083811@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 11 Mar 2010 11:28: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: r205009 - head/usr.bin/script
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 11:28:30 -0000

Author: ed
Date: Thu Mar 11 11:28:29 2010
New Revision: 205009
URL: http://svn.freebsd.org/changeset/base/205009

Log:
  Improve the change made in the previous commit.
  
  doshell() never returns, so there is no need to see whether we are the
  parent process.

Modified:
  head/usr.bin/script/script.c

Modified: head/usr.bin/script/script.c
==============================================================================
--- head/usr.bin/script/script.c	Thu Mar 11 11:09:58 2010	(r205008)
+++ head/usr.bin/script/script.c	Thu Mar 11 11:28:29 2010	(r205009)
@@ -158,8 +158,7 @@ main(int argc, char *argv[])
 	}
 	if (child == 0)
 		doshell(argv);
-	else
-		close(slave);
+	close(slave);
 
 	if (flushtime > 0)
 		tvp = &tv;

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 11:33:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC4D5106564A;
	Thu, 11 Mar 2010 11:33:04 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DB6FA8FC20;
	Thu, 11 Mar 2010 11:33: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 o2BBX4MY088009;
	Thu, 11 Mar 2010 11:33:04 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BBX4nI088006;
	Thu, 11 Mar 2010 11:33:04 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201003111133.o2BBX4nI088006@svn.freebsd.org>
From: Robert Watson 
Date: Thu, 11 Mar 2010 11:33: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: r205010 - head/sys/fs/nfsserver
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 11:33:07 -0000

Author: rwatson
Date: Thu Mar 11 11:33:04 2010
New Revision: 205010
URL: http://svn.freebsd.org/changeset/base/205010

Log:
  Update nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:
  
  - so_pcb is now guaranteed to be non-NULL and valid if a valid socket
    reference is held.
  
  - Need to check INP_TIMEWAIT and INP_DROPPED before assuming inp_ppcb is a
    tcpcb, as it might be a tcptw or NULL otherwise.
  
  - tp can never be NULL by the end of the function, so only check
    TCPS_ESTABLISHED before extracting tcpcb fields.
  
  The NFS server arguably incorporates too many assumptions about TCP
  internals, but fixing that is left for nother day.
  
  MFC after:		1 week
  Reviewed by:		bz
  Reviewed and tested by:	rmacklem
  Sponsored by:		Juniper Networks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Thu Mar 11 11:28:29 2010	(r205009)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Thu Mar 11 11:33:04 2010	(r205010)
@@ -2671,24 +2671,23 @@ nfsrv_getsocksndseq(struct socket *so, t
 {
 	struct inpcb *inp;
 	struct tcpcb *tp;
-	int error = EPIPE;
 
-	INP_INFO_RLOCK(&V_tcbinfo);
 	inp = sotoinpcb(so);
-	if (inp == NULL) {
-		INP_INFO_RUNLOCK(&V_tcbinfo);
-		return (error);
-	}
+	KASSERT(inp != NULL, ("nfsrv_getsocksndseq: inp == NULL"));
 	INP_RLOCK(inp);
-	INP_INFO_RUNLOCK(&V_tcbinfo);
+	if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
+		INP_RUNLOCK(inp);
+		return (EPIPE);
+	}
 	tp = intotcpcb(inp);
-	if (tp != NULL && tp->t_state == TCPS_ESTABLISHED) {
-		*maxp = tp->snd_max;
-		*unap = tp->snd_una;
-		error = 0;
+	if (tp->t_state != TCPS_ESTABLISHED) {
+		INP_RUNLOCK(inp);
+		return (EPIPE);
 	}
+	*maxp = tp->snd_max;
+	*unap = tp->snd_una;
 	INP_RUNLOCK(inp);
-	return (error);
+	return (0);
 }
 
 /*

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 12:18:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C99E3106564A;
	Thu, 11 Mar 2010 12:18:52 +0000 (UTC)
	(envelope-from joerg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E95A8FC16;
	Thu, 11 Mar 2010 12:18:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BCIq5d029461;
	Thu, 11 Mar 2010 12:18:52 GMT (envelope-from joerg@svn.freebsd.org)
Received: (from joerg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BCIq4J029458;
	Thu, 11 Mar 2010 12:18:52 GMT (envelope-from joerg@svn.freebsd.org)
Message-Id: <201003111218.o2BCIq4J029458@svn.freebsd.org>
From: Joerg Wunsch 
Date: Thu, 11 Mar 2010 12:18: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: r205011 - head/usr.bin/perror
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 12:18:52 -0000

Author: joerg
Date: Thu Mar 11 12:18:52 2010
New Revision: 205011
URL: http://svn.freebsd.org/changeset/base/205011

Log:
  The number after the command is *not* optional.
  
  MFC after:	1 day

Modified:
  head/usr.bin/perror/perror.1

Modified: head/usr.bin/perror/perror.1
==============================================================================
--- head/usr.bin/perror/perror.1	Thu Mar 11 11:33:04 2010	(r205010)
+++ head/usr.bin/perror/perror.1	Thu Mar 11 12:18:52 2010	(r205011)
@@ -34,7 +34,7 @@
 .Nd "print an error number as a string"
 .Sh SYNOPSIS
 .Nm
-.Op Ar number
+.Ar number
 .Sh DESCRIPTION
 The
 .Nm

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 13:16:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 992CB1065674;
	Thu, 11 Mar 2010 13:16:06 +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 884938FC2B;
	Thu, 11 Mar 2010 13:16: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 o2BDG6cc083194;
	Thu, 11 Mar 2010 13:16:06 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BDG6Kt083192;
	Thu, 11 Mar 2010 13:16:06 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111316.o2BDG6Kt083192@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 13:16: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: r205012 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 13:16:06 -0000

Author: jhb
Date: Thu Mar 11 13:16:06 2010
New Revision: 205012
URL: http://svn.freebsd.org/changeset/base/205012

Log:
  Fix a comment nit.
  
  Submitted by:	Alexander Best

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c	Thu Mar 11 12:18:52 2010	(r205011)
+++ head/sys/kern/vfs_syscalls.c	Thu Mar 11 13:16:06 2010	(r205012)
@@ -1060,8 +1060,8 @@ kern_openat(struct thread *td, int fd, c
 	AUDIT_ARG_MODE(mode);
 	/* XXX: audit dirfd */
 	/*
-	 * Only one of the O_EXEC, O_RDONLY, O_WRONLY and O_RDWR may
-	 * be specified.
+	 * Only one of the O_EXEC, O_RDONLY, O_WRONLY and O_RDWR flags
+	 * may be specified.
 	 */
 	if (flags & O_EXEC) {
 		if (flags & O_ACCMODE)

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 14:17:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7CB9A106566C;
	Thu, 11 Mar 2010 14:17:38 +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 6A6398FC23;
	Thu, 11 Mar 2010 14:17: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 o2BEHckN039683;
	Thu, 11 Mar 2010 14:17:38 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BEHcKU039680;
	Thu, 11 Mar 2010 14:17:38 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111417.o2BEHcKU039680@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 14:17: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: r205013 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 14:17:38 -0000

Author: jhb
Date: Thu Mar 11 14:17:37 2010
New Revision: 205013
URL: http://svn.freebsd.org/changeset/base/205013

Log:
  Print out the family and model from the cpu_id.  This is especially useful
  given the advent of the extended family and extended model fields.  The
  values are printed in hex to match their common usage in documentation.
  
  Submitted by:	Alexander Best
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/i386/i386/identcpu.c

Modified: head/sys/amd64/amd64/identcpu.c
==============================================================================
--- head/sys/amd64/amd64/identcpu.c	Thu Mar 11 13:16:06 2010	(r205012)
+++ head/sys/amd64/amd64/identcpu.c	Thu Mar 11 14:17:37 2010	(r205013)
@@ -187,7 +187,9 @@ printcpuinfo(void)
 	if (cpu_vendor_id == CPU_VENDOR_INTEL ||
 	    cpu_vendor_id == CPU_VENDOR_AMD ||
 	    cpu_vendor_id == CPU_VENDOR_CENTAUR) {
-		printf("  Stepping = %u", cpu_id & 0xf);
+		printf("  Family = %x", CPUID_TO_FAMILY(cpu_id));
+		printf("  Model = %x", CPUID_TO_MODEL(cpu_id));
+		printf("  Stepping = %u", cpu_id & CPUID_STEPPING);
 		if (cpu_high > 0) {
 
 			/*

Modified: head/sys/i386/i386/identcpu.c
==============================================================================
--- head/sys/i386/i386/identcpu.c	Thu Mar 11 13:16:06 2010	(r205012)
+++ head/sys/i386/i386/identcpu.c	Thu Mar 11 14:17:37 2010	(r205013)
@@ -672,9 +672,11 @@ printcpuinfo(void)
 	    cpu_vendor_id == CPU_VENDOR_NSC ||
 		(cpu_vendor_id == CPU_VENDOR_CYRIX &&
 		 ((cpu_id & 0xf00) > 0x500))) {
-		printf("  Stepping = %u", cpu_id & 0xf);
+		printf("  Family = %x", CPUID_TO_FAMILY(cpu_id));
+		printf("  Model = %x", CPUID_TO_MODEL(cpu_id));
+		printf("  Stepping = %u", cpu_id & CPUID_STEPPING);
 		if (cpu_vendor_id == CPU_VENDOR_CYRIX)
-			printf("  DIR=0x%04x", cyrix_did);
+			printf("\n  DIR=0x%04x", cyrix_did);
 		if (cpu_high > 0) {
 
 			/*

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 14:49:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 628E11065673;
	Thu, 11 Mar 2010 14:49: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 4BF598FC15;
	Thu, 11 Mar 2010 14:49:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BEn7NH069200;
	Thu, 11 Mar 2010 14:49:07 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BEn6QY069179;
	Thu, 11 Mar 2010 14:49:07 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201003111449.o2BEn6QY069179@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Thu, 11 Mar 2010 14:49: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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf
	sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 14:49:07 -0000

Author: nwhitehorn
Date: Thu Mar 11 14:49:06 2010
New Revision: 205014
URL: http://svn.freebsd.org/changeset/base/205014

Log:
  Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
  for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
  option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
  of the kernel and enhances the freebsd32 compatibility code to support
  big-endian platforms.
  
  Reviewed by:	kib, jhb

Modified:
  head/UPDATING
  head/sys/amd64/amd64/db_trace.c
  head/sys/amd64/amd64/exception.S
  head/sys/amd64/amd64/vm_machdep.c
  head/sys/amd64/conf/GENERIC
  head/sys/amd64/conf/NOTES
  head/sys/amd64/conf/XENHVM
  head/sys/amd64/include/elf.h
  head/sys/amd64/include/reg.h
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/freebsd32/freebsd32_proto.h
  head/sys/compat/freebsd32/freebsd32_syscall.h
  head/sys/compat/freebsd32/freebsd32_syscalls.c
  head/sys/compat/freebsd32/freebsd32_sysent.c
  head/sys/compat/freebsd32/freebsd32_util.h
  head/sys/compat/freebsd32/syscalls.master
  head/sys/compat/ia32/ia32_reg.h
  head/sys/compat/ia32/ia32_sysvec.c
  head/sys/conf/files.amd64
  head/sys/conf/files.ia64
  head/sys/conf/options.amd64
  head/sys/conf/options.ia64
  head/sys/fs/procfs/procfs_dbregs.c
  head/sys/fs/procfs/procfs_fpregs.c
  head/sys/fs/procfs/procfs_ioctl.c
  head/sys/fs/procfs/procfs_map.c
  head/sys/fs/procfs/procfs_regs.c
  head/sys/ia64/conf/GENERIC
  head/sys/ia64/conf/NOTES
  head/sys/ia64/ia64/exception.S
  head/sys/ia64/ia64/genassym.c
  head/sys/ia64/ia64/machdep.c
  head/sys/ia64/include/elf.h
  head/sys/ia64/include/reg.h
  head/sys/kern/imgact_elf.c
  head/sys/kern/kern_jail.c
  head/sys/kern/kern_module.c
  head/sys/kern/kern_thr.c
  head/sys/kern/kern_umtx.c
  head/sys/kern/sys_generic.c
  head/sys/kern/sys_process.c
  head/sys/kern/uipc_socket.c
  head/sys/kern/vfs_aio.c
  head/sys/modules/linux/Makefile
  head/sys/modules/procfs/Makefile
  head/sys/sys/ptrace.h

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/UPDATING	Thu Mar 11 14:49:06 2010	(r205014)
@@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20100311:
+	The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32
+	to allow 32-bit compatibility on non-x86 platforms. All kernel
+	configurations on amd64 and ia64 platforms using these options must
+	be modified accordingly.
+
 20100113:
 	The utmp user accounting database has been replaced with utmpx,
 	the user accounting interface standardized by POSIX.

Modified: head/sys/amd64/amd64/db_trace.c
==============================================================================
--- head/sys/amd64/amd64/db_trace.c	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/amd64/db_trace.c	Thu Mar 11 14:49:06 2010	(r205014)
@@ -319,7 +319,7 @@ db_nextframe(struct amd64_frame **fp, db
 			frame_type = INTERRUPT;
 		else if (strcmp(name, "Xfast_syscall") == 0)
 			frame_type = SYSCALL;
-#ifdef COMPAT_IA32
+#ifdef COMPAT_FREEBSD32
 		else if (strcmp(name, "Xint0x80_syscall") == 0)
 			frame_type = SYSCALL;
 #endif

Modified: head/sys/amd64/amd64/exception.S
==============================================================================
--- head/sys/amd64/amd64/exception.S	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/amd64/exception.S	Thu Mar 11 14:49:06 2010	(r205014)
@@ -572,7 +572,7 @@ ENTRY(fork_trampoline)
  * included.
  */
 
-#ifdef COMPAT_IA32
+#ifdef COMPAT_FREEBSD32
 	.data
 	.p2align 4
 	.text

Modified: head/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- head/sys/amd64/amd64/vm_machdep.c	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/amd64/vm_machdep.c	Thu Mar 11 14:49:06 2010	(r205014)
@@ -439,7 +439,7 @@ cpu_set_upcall_kse(struct thread *td, vo
 	 */
 	cpu_thread_clean(td);
 
-#ifdef COMPAT_IA32
+#ifdef COMPAT_FREEBSD32
 	if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
 		/*
 	 	 * Set the trap frame to point at the beginning of the uts
@@ -490,7 +490,7 @@ cpu_set_user_tls(struct thread *td, void
 	if ((u_int64_t)tls_base >= VM_MAXUSER_ADDRESS)
 		return (EINVAL);
 
-#ifdef COMPAT_IA32
+#ifdef COMPAT_FREEBSD32
 	if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
 		td->td_pcb->pcb_gsbase = (register_t)tls_base;
 		return (0);

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/conf/GENERIC	Thu Mar 11 14:49:06 2010	(r205014)
@@ -45,7 +45,7 @@ options 	PSEUDOFS		# Pseudo-filesystem f
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
 options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
-options 	COMPAT_IA32		# Compatible with i386 binaries
+options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6

Modified: head/sys/amd64/conf/NOTES
==============================================================================
--- head/sys/amd64/conf/NOTES	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/conf/NOTES	Thu Mar 11 14:49:06 2010	(r205014)
@@ -483,7 +483,7 @@ options 	PMAP_SHPGPERPROC=201
 #XXX these 32 bit binaries is added.
 
 # Enable 32-bit runtime support for FreeBSD/i386 binaries.
-options 	COMPAT_IA32
+options 	COMPAT_FREEBSD32
 
 # Enable iBCS2 runtime support for SCO and ISC binaries
 #XXX#options 	IBCS2
@@ -494,7 +494,7 @@ options 	COMPAT_IA32
 # Enable Linux ABI emulation
 #XXX#options 	COMPAT_LINUX
 
-# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_IA32)
+# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_FREEBSD32)
 options 	COMPAT_LINUX32
 
 # Enable the linux-like proc filesystem support (requires COMPAT_LINUX32

Modified: head/sys/amd64/conf/XENHVM
==============================================================================
--- head/sys/amd64/conf/XENHVM	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/conf/XENHVM	Thu Mar 11 14:49:06 2010	(r205014)
@@ -46,7 +46,7 @@ options 	PSEUDOFS		# Pseudo-filesystem f
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
 options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
-options 	COMPAT_IA32		# Compatible with i386 binaries
+options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6

Modified: head/sys/amd64/include/elf.h
==============================================================================
--- head/sys/amd64/include/elf.h	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/include/elf.h	Thu Mar 11 14:49:06 2010	(r205014)
@@ -42,6 +42,7 @@
 #include 
 
 #define	ELF_ARCH	EM_X86_64
+#define	ELF_ARCH32	EM_386
 
 #define	ELF_MACHINE_OK(x) ((x) == EM_X86_64)
 

Modified: head/sys/amd64/include/reg.h
==============================================================================
--- head/sys/amd64/include/reg.h	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/include/reg.h	Thu Mar 11 14:49:06 2010	(r205014)
@@ -37,6 +37,10 @@
 #ifndef _MACHINE_REG_H_
 #define	_MACHINE_REG_H_
 
+#if defined(_KERNEL) && !defined(_STANDALONE)
+#include "opt_compat.h"
+#endif
+
 /*
  * Register set accessible via /proc/$pid/regs and PT_{SET,GET}REGS.
  */
@@ -116,6 +120,11 @@ struct dbreg {
 #define	DBREG_DRX(d,x)	((d)->dr[(x)])	/* reference dr0 - dr15 by
 					   register number */
 
+#ifdef COMPAT_FREEBSD32
+#include 
+#include 
+#endif
+
 #ifdef _KERNEL
 /*
  * XXX these interfaces are MI, so they should be declared in a MI place.

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- head/sys/amd64/linux32/linux32_sysvec.c	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/amd64/linux32/linux32_sysvec.c	Thu Mar 11 14:49:06 2010	(r205014)
@@ -34,8 +34,8 @@
 __FBSDID("$FreeBSD$");
 #include "opt_compat.h"
 
-#ifndef COMPAT_IA32
-#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!"
+#ifndef COMPAT_FREEBSD32
+#error "Unable to compile Linux-emulator due to missing COMPAT_FREEBSD32 option!"
 #endif
 
 #define	__ELF_WORD_SIZE	32

Modified: head/sys/compat/freebsd32/freebsd32.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32.h	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/compat/freebsd32/freebsd32.h	Thu Mar 11 14:49:06 2010	(r205014)
@@ -29,6 +29,9 @@
 #ifndef _COMPAT_FREEBSD32_FREEBSD32_H_
 #define _COMPAT_FREEBSD32_FREEBSD32_H_
 
+#include 
+#include 
+
 #define PTRIN(v)	(void *)(uintptr_t) (v)
 #define PTROUT(v)	(u_int32_t)(uintptr_t) (v)
 
@@ -197,4 +200,25 @@ struct i386_ldt_args32 {
 	uint32_t num;
 };
 
+/*
+ * Alternative layouts for 
+ */
+struct prstatus32 {
+        int     pr_version;
+        u_int   pr_statussz;
+        u_int   pr_gregsetsz;
+        u_int   pr_fpregsetsz;
+        int     pr_osreldate;
+        int     pr_cursig;
+        pid_t   pr_pid;
+        struct reg32 pr_reg;
+};
+
+struct prpsinfo32 {
+        int     pr_version;
+        u_int   pr_psinfosz;
+        char    pr_fname[PRFNAMESZ+1];
+        char    pr_psargs[PRARGSZ+1];
+};
+
 #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Mar 11 14:49:06 2010	(r205014)
@@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$");
 #include "opt_inet.h"
 #include "opt_inet6.h"
 
+#define __ELF_WORD_SIZE 32
+
 #include 
 #include 
 #include 
@@ -44,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 		/* Must come after sys/malloc.h */
+#include 
 #include 
 #include 
 #include 
@@ -91,6 +94,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -115,6 +119,16 @@ CTASSERT(sizeof(struct sigaction32) == 2
 static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count);
 static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count);
 
+#if BYTE_ORDER == BIG_ENDIAN
+#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32))
+#define RETVAL_HI 0	
+#define RETVAL_LO 1	
+#else
+#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32))
+#define RETVAL_HI 1	
+#define RETVAL_LO 0	
+#endif
+
 int
 freebsd32_wait4(struct thread *td, struct freebsd32_wait4_args *uap)
 {
@@ -426,8 +440,7 @@ freebsd32_mmap(struct thread *td, struct
 	int prot	 = uap->prot;
 	int flags	 = uap->flags;
 	int fd		 = uap->fd;
-	off_t pos	 = (uap->poslo
-			    | ((off_t)uap->poshi << 32));
+	off_t pos	 = PAIR32TO64(off_t,uap->pos);
 #ifdef __ia64__
 	vm_size_t pageoff;
 	int error;
@@ -523,8 +536,8 @@ freebsd6_freebsd32_mmap(struct thread *t
 	ap.prot = uap->prot;
 	ap.flags = uap->flags;
 	ap.fd = uap->fd;
-	ap.poslo = uap->poslo;
-	ap.poshi = uap->poshi;
+	ap.pos1 = uap->pos1;
+	ap.pos2 = uap->pos2;
 
 	return (freebsd32_mmap(td, &ap));
 }
@@ -586,7 +599,6 @@ freebsd32_select(struct thread *td, stru
 	} else
 		tvp = NULL;
 	/*
-	 * XXX big-endian needs to convert the fd_sets too.
 	 * XXX Do pointers need PTRIN()?
 	 */
 	return (kern_select(td, uap->nd, uap->in, uap->ou, uap->ex, tvp,
@@ -620,7 +632,6 @@ freebsd32_pselect(struct thread *td, str
 	} else
 		uset = NULL;
 	/*
-	 * XXX big-endian needs to convert the fd_sets too.
 	 * XXX Do pointers need PTRIN()?
 	 */
 	error = kern_pselect(td, uap->nd, uap->in, uap->ou, uap->ex, tvp,
@@ -843,7 +854,7 @@ freebsd32_preadv(struct thread *td, stru
 	error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
 	if (error)
 		return (error);
-	error = kern_preadv(td, uap->fd, auio, uap->offset);
+	error = kern_preadv(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset));
 	free(auio, M_IOV);
 	return (error);
 }
@@ -857,7 +868,7 @@ freebsd32_pwritev(struct thread *td, str
 	error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
 	if (error)
 		return (error);
-	error = kern_pwritev(td, uap->fd, auio, uap->offset);
+	error = kern_pwritev(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset));
 	free(auio, M_IOV);
 	return (error);
 }
@@ -1982,7 +1993,7 @@ freebsd32_pread(struct thread *td, struc
 	ap.fd = uap->fd;
 	ap.buf = uap->buf;
 	ap.nbyte = uap->nbyte;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	return (pread(td, &ap));
 }
 
@@ -1994,7 +2005,7 @@ freebsd32_pwrite(struct thread *td, stru
 	ap.fd = uap->fd;
 	ap.buf = uap->buf;
 	ap.nbyte = uap->nbyte;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	return (pwrite(td, &ap));
 }
 
@@ -2006,13 +2017,13 @@ freebsd32_lseek(struct thread *td, struc
 	off_t pos;
 
 	ap.fd = uap->fd;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	ap.whence = uap->whence;
 	error = lseek(td, &ap);
 	/* Expand the quad return into two parts for eax and edx */
 	pos = *(off_t *)(td->td_retval);
-	td->td_retval[0] = pos & 0xffffffff;	/* %eax */
-	td->td_retval[1] = pos >> 32;		/* %edx */
+	td->td_retval[RETVAL_LO] = pos & 0xffffffff;	/* %eax */
+	td->td_retval[RETVAL_HI] = pos >> 32;		/* %edx */
 	return error;
 }
 
@@ -2022,7 +2033,7 @@ freebsd32_truncate(struct thread *td, st
 	struct truncate_args ap;
 
 	ap.path = uap->path;
-	ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+	ap.length = PAIR32TO64(off_t,uap->length);
 	return (truncate(td, &ap));
 }
 
@@ -2032,7 +2043,7 @@ freebsd32_ftruncate(struct thread *td, s
 	struct ftruncate_args ap;
 
 	ap.fd = uap->fd;
-	ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+	ap.length = PAIR32TO64(off_t,uap->length);
 	return (ftruncate(td, &ap));
 }
 
@@ -2064,7 +2075,7 @@ freebsd6_freebsd32_pread(struct thread *
 	ap.fd = uap->fd;
 	ap.buf = uap->buf;
 	ap.nbyte = uap->nbyte;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	return (pread(td, &ap));
 }
 
@@ -2076,7 +2087,7 @@ freebsd6_freebsd32_pwrite(struct thread 
 	ap.fd = uap->fd;
 	ap.buf = uap->buf;
 	ap.nbyte = uap->nbyte;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	return (pwrite(td, &ap));
 }
 
@@ -2088,13 +2099,13 @@ freebsd6_freebsd32_lseek(struct thread *
 	off_t pos;
 
 	ap.fd = uap->fd;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	ap.whence = uap->whence;
 	error = lseek(td, &ap);
 	/* Expand the quad return into two parts for eax and edx */
 	pos = *(off_t *)(td->td_retval);
-	td->td_retval[0] = pos & 0xffffffff;	/* %eax */
-	td->td_retval[1] = pos >> 32;		/* %edx */
+	td->td_retval[RETVAL_LO] = pos & 0xffffffff;	/* %eax */
+	td->td_retval[RETVAL_HI] = pos >> 32;		/* %edx */
 	return error;
 }
 
@@ -2104,7 +2115,7 @@ freebsd6_freebsd32_truncate(struct threa
 	struct truncate_args ap;
 
 	ap.path = uap->path;
-	ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+	ap.length = PAIR32TO64(off_t,uap->length);
 	return (truncate(td, &ap));
 }
 
@@ -2114,7 +2125,7 @@ freebsd6_freebsd32_ftruncate(struct thre
 	struct ftruncate_args ap;
 
 	ap.fd = uap->fd;
-	ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+	ap.length = PAIR32TO64(off_t,uap->length);
 	return (ftruncate(td, &ap));
 }
 #endif /* COMPAT_FREEBSD6 */
@@ -2141,7 +2152,7 @@ freebsd32_do_sendfile(struct thread *td,
 
 	ap.fd = uap->fd;
 	ap.s = uap->s;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+	ap.offset = PAIR32TO64(off_t,uap->offset);
 	ap.nbytes = uap->nbytes;
 	ap.hdtr = (struct sf_hdtr *)uap->hdtr;		/* XXX not used */
 	ap.sbytes = uap->sbytes;
@@ -2879,7 +2890,7 @@ freebsd32_cpuset_setid(struct thread *td
 	struct cpuset_setid_args ap;
 
 	ap.which = uap->which;
-	ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+	ap.id = PAIR32TO64(id_t,uap->id);
 	ap.setid = uap->setid;
 
 	return (cpuset_setid(td, &ap));
@@ -2893,7 +2904,7 @@ freebsd32_cpuset_getid(struct thread *td
 
 	ap.level = uap->level;
 	ap.which = uap->which;
-	ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+	ap.id = PAIR32TO64(id_t,uap->id);
 	ap.setid = uap->setid;
 
 	return (cpuset_getid(td, &ap));
@@ -2907,7 +2918,7 @@ freebsd32_cpuset_getaffinity(struct thre
 
 	ap.level = uap->level;
 	ap.which = uap->which;
-	ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+	ap.id = PAIR32TO64(id_t,uap->id);
 	ap.cpusetsize = uap->cpusetsize;
 	ap.mask = uap->mask;
 
@@ -2922,7 +2933,7 @@ freebsd32_cpuset_setaffinity(struct thre
 
 	ap.level = uap->level;
 	ap.which = uap->which;
-	ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+	ap.id = PAIR32TO64(id_t,uap->id);
 	ap.cpusetsize = uap->cpusetsize;
 	ap.mask = uap->mask;
 
@@ -3072,3 +3083,123 @@ syscall32_module_handler(struct module *
 		return (error);
 	}
 }
+
+register_t *
+freebsd32_copyout_strings(struct image_params *imgp)
+{
+	int argc, envc;
+	u_int32_t *vectp;
+	char *stringp, *destp;
+	u_int32_t *stack_base;
+	struct freebsd32_ps_strings *arginfo;
+	size_t execpath_len;
+	int szsigcode;
+
+	/*
+	 * Calculate string base and vector table pointers.
+	 * Also deal with signal trampoline code for this exec type.
+	 */
+	if (imgp->execpath != NULL && imgp->auxargs != NULL)
+		execpath_len = strlen(imgp->execpath) + 1;
+	else
+		execpath_len = 0;
+	arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS;
+	szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
+	destp =	(caddr_t)arginfo - szsigcode - SPARE_USRSPACE -
+		roundup(execpath_len, sizeof(char *)) -
+		roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *));
+
+	/*
+	 * install sigcode
+	 */
+	if (szsigcode)
+		copyout(imgp->proc->p_sysent->sv_sigcode,
+			((caddr_t)arginfo - szsigcode), szsigcode);
+
+	/*
+	 * Copy the image path for the rtld.
+	 */
+	if (execpath_len != 0) {
+		imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len;
+		copyout(imgp->execpath, (void *)imgp->execpathp,
+		    execpath_len);
+	}
+
+	/*
+	 * If we have a valid auxargs ptr, prepare some room
+	 * on the stack.
+	 */
+	if (imgp->auxargs) {
+		/*
+		 * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for
+		 * lower compatibility.
+		 */
+		imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size
+			: (AT_COUNT * 2);
+		/*
+		 * The '+ 2' is for the null pointers at the end of each of
+		 * the arg and env vector sets,and imgp->auxarg_size is room
+		 * for argument of Runtime loader.
+		 */
+		vectp = (u_int32_t *) (destp - (imgp->args->argc +
+		    imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) *
+		    sizeof(u_int32_t));
+	} else
+		/*
+		 * The '+ 2' is for the null pointers at the end of each of
+		 * the arg and env vector sets
+		 */
+		vectp = (u_int32_t *)
+			(destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t));
+
+	/*
+	 * vectp also becomes our initial stack base
+	 */
+	stack_base = vectp;
+
+	stringp = imgp->args->begin_argv;
+	argc = imgp->args->argc;
+	envc = imgp->args->envc;
+	/*
+	 * Copy out strings - arguments and environment.
+	 */
+	copyout(stringp, destp, ARG_MAX - imgp->args->stringspace);
+
+	/*
+	 * Fill in "ps_strings" struct for ps, w, etc.
+	 */
+	suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp);
+	suword32(&arginfo->ps_nargvstr, argc);
+
+	/*
+	 * Fill in argument portion of vector table.
+	 */
+	for (; argc > 0; --argc) {
+		suword32(vectp++, (u_int32_t)(intptr_t)destp);
+		while (*stringp++ != 0)
+			destp++;
+		destp++;
+	}
+
+	/* a null vector table pointer separates the argp's from the envp's */
+	suword32(vectp++, 0);
+
+	suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp);
+	suword32(&arginfo->ps_nenvstr, envc);
+
+	/*
+	 * Fill in environment portion of vector table.
+	 */
+	for (; envc > 0; --envc) {
+		suword32(vectp++, (u_int32_t)(intptr_t)destp);
+		while (*stringp++ != 0)
+			destp++;
+		destp++;
+	}
+
+	/* end of vector table is a null pointer */
+	suword32(vectp, 0);
+
+	return ((register_t *)stack_base);
+}
+

Modified: head/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_proto.h	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/compat/freebsd32/freebsd32_proto.h	Thu Mar 11 14:49:06 2010	(r205014)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 200111 2009-12-04 21:52:31Z kib 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -32,6 +32,9 @@ struct thread;
 #define	PADR_(t)	0
 #endif
 
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 struct freebsd32_wait4_args {
 	char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
 	char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)];
@@ -223,13 +226,15 @@ struct freebsd32_preadv_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
-	char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_pwritev_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
-	char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_modstat_args {
 	char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)];
@@ -294,8 +299,8 @@ struct freebsd32_nmount_args {
 struct freebsd32_sendfile_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
 	char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)];
 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
@@ -343,19 +348,22 @@ struct freebsd32_aio_fsync_args {
 	char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)];
 	char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
 };
+#ifdef PAD64_REQUIRED
 struct freebsd32_pread_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_pwrite_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_mmap_args {
 	char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
@@ -363,51 +371,106 @@ struct freebsd32_mmap_args {
 	char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
-	char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+	char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_lseek_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 	char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
 };
 struct freebsd32_truncate_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
-	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
-	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
 };
 struct freebsd32_ftruncate_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
-	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+#else
+struct freebsd32_pread_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
+	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_pwrite_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
+	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_mmap_args {
+	char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
+	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+	char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_lseek_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+	char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
+};
+struct freebsd32_truncate_args {
+	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_ftruncate_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+#endif
+#ifdef PAD64_REQUIRED
+struct freebsd32_cpuset_setid_args {
+	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+	char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+	char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
+	char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)];
 };
+#else
 struct freebsd32_cpuset_setid_args {
 	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
-	char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
-	char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
+	char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+	char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
 	char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)];
 };
+#endif
 struct freebsd32_cpuset_getid_args {
 	char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
 	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
-	char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
-	char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
+	char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+	char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
 	char setid_l_[PADL_(cpusetid_t *)]; cpusetid_t * setid; char setid_r_[PADR_(cpusetid_t *)];
 };
 struct freebsd32_cpuset_getaffinity_args {
 	char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
 	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
-	char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
-	char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
+	char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+	char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
 	char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)];
 	char mask_l_[PADL_(cpuset_t *)]; cpuset_t * mask; char mask_r_[PADR_(cpuset_t *)];
 };
 struct freebsd32_cpuset_setaffinity_args {
 	char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
 	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
-	char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
-	char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
+	char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+	char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
 	char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)];
 	char mask_l_[PADL_(const cpuset_t *)]; const cpuset_t * mask; char mask_r_[PADR_(const cpuset_t *)];
 };
@@ -461,6 +524,9 @@ struct freebsd32_pselect_args {
 	char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)];
 	char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)];
 };
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 int	freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *);
 int	freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *);
 int	freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *);
@@ -526,13 +592,26 @@ int	freebsd32_thr_suspend(struct thread 
 int	freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *);
 int	freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *);
 int	freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *);
+#ifdef PAD64_REQUIRED
 int	freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
 int	freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
 int	freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
 int	freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
 int	freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
 int	freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
+#else
+int	freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
+int	freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
+int	freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
+int	freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
+int	freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
+int	freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
+#endif
+#ifdef PAD64_REQUIRED
 int	freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *);
+#else
+int	freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *);
+#endif
 int	freebsd32_cpuset_getid(struct thread *, struct freebsd32_cpuset_getid_args *);
 int	freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *);
 int	freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *);
@@ -548,6 +627,9 @@ int	freebsd32_pselect(struct thread *, s
 
 #ifdef COMPAT_43
 
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 struct ofreebsd32_sigaction_args {
 	char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)];
 	char nsa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * nsa; char nsa_r_[PADR_(struct osigaction32 *)];
@@ -575,6 +657,12 @@ struct ofreebsd32_sigstack_args {
 	char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)];
 	char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)];
 };
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 int	ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *);
 int	ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *);
 int	ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *);
@@ -589,6 +677,9 @@ int	ofreebsd32_sigstack(struct thread *,
 
 #ifdef COMPAT_FREEBSD4
 
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 struct freebsd4_freebsd32_getfsstat_args {
 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
 	char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
@@ -609,8 +700,8 @@ struct freebsd4_freebsd32_fhstatfs_args 
 struct freebsd4_freebsd32_sendfile_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
 	char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)];
 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
@@ -624,6 +715,12 @@ struct freebsd4_freebsd32_sigaction_args
 struct freebsd4_freebsd32_sigreturn_args {
 	char sigcntxp_l_[PADL_(const struct freebsd4_freebsd32_ucontext *)]; const struct freebsd4_freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_freebsd32_ucontext *)];
 };
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 int	freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *);
 int	freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *);
 int	freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *);
@@ -637,21 +734,24 @@ int	freebsd4_freebsd32_sigreturn(struct 
 
 #ifdef COMPAT_FREEBSD6
 
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 struct freebsd6_freebsd32_pread_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd6_freebsd32_pwrite_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 };
 struct freebsd6_freebsd32_mmap_args {
 	char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
@@ -660,28 +760,34 @@ struct freebsd6_freebsd32_mmap_args {
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
-	char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
+	char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+	char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
 };
 struct freebsd6_freebsd32_lseek_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
-	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
+	char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+	char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
 	char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
 };
 struct freebsd6_freebsd32_truncate_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
-	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
 };
 struct freebsd6_freebsd32_ftruncate_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
-	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
-	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
+	char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+	char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
 };
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 int	freebsd6_freebsd32_pread(struct thread *, struct freebsd6_freebsd32_pread_args *);
 int	freebsd6_freebsd32_pwrite(struct thread *, struct freebsd6_freebsd32_pwrite_args *);
 int	freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args *);
@@ -694,6 +800,9 @@ int	freebsd6_freebsd32_ftruncate(struct 
 
 #ifdef COMPAT_FREEBSD7
 
+#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
 struct freebsd7_freebsd32_semctl_args {
 	char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)];
 	char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)];
@@ -710,6 +819,12 @@ struct freebsd7_freebsd32_shmctl_args {
 	char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)];
 	char buf_l_[PADL_(struct shmid_ds32_old *)]; struct shmid_ds32_old * buf; char buf_r_[PADR_(struct shmid_ds32_old *)];
 };
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
 int	freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *);
 int	freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *);
 int	freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *);
@@ -811,6 +926,13 @@ int	freebsd7_freebsd32_shmctl(struct thr
 #define	FREEBSD32_SYS_AUE_freebsd32_lseek	AUE_LSEEK
 #define	FREEBSD32_SYS_AUE_freebsd32_truncate	AUE_TRUNCATE
 #define	FREEBSD32_SYS_AUE_freebsd32_ftruncate	AUE_FTRUNCATE
+#define	FREEBSD32_SYS_AUE_freebsd32_pread	AUE_PREAD
+#define	FREEBSD32_SYS_AUE_freebsd32_pwrite	AUE_PWRITE
+#define	FREEBSD32_SYS_AUE_freebsd32_mmap	AUE_MMAP
+#define	FREEBSD32_SYS_AUE_freebsd32_lseek	AUE_LSEEK
+#define	FREEBSD32_SYS_AUE_freebsd32_truncate	AUE_TRUNCATE
+#define	FREEBSD32_SYS_AUE_freebsd32_ftruncate	AUE_FTRUNCATE
+#define	FREEBSD32_SYS_AUE_freebsd32_cpuset_setid	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_cpuset_setid	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_cpuset_getid	AUE_NULL
 #define	FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity	AUE_NULL

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Mar 11 14:49:06 2010	(r205014)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 200111 2009-12-04 21:52:31Z kib 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
  */
 
 #define	FREEBSD32_SYS_syscall	0
@@ -354,11 +354,18 @@
 #define	FREEBSD32_SYS_freebsd32_lseek	478
 #define	FREEBSD32_SYS_freebsd32_truncate	479
 #define	FREEBSD32_SYS_freebsd32_ftruncate	480
+#define	FREEBSD32_SYS_freebsd32_pread	475
+#define	FREEBSD32_SYS_freebsd32_pwrite	476
+#define	FREEBSD32_SYS_freebsd32_mmap	477
+#define	FREEBSD32_SYS_freebsd32_lseek	478
+#define	FREEBSD32_SYS_freebsd32_truncate	479
+#define	FREEBSD32_SYS_freebsd32_ftruncate	480
 #define	FREEBSD32_SYS_thr_kill2	481
 #define	FREEBSD32_SYS_shm_open	482
 #define	FREEBSD32_SYS_shm_unlink	483
 #define	FREEBSD32_SYS_cpuset	484
 #define	FREEBSD32_SYS_freebsd32_cpuset_setid	485
+#define	FREEBSD32_SYS_freebsd32_cpuset_setid	485
 #define	FREEBSD32_SYS_freebsd32_cpuset_getid	486
 #define	FREEBSD32_SYS_freebsd32_cpuset_getaffinity	487
 #define	FREEBSD32_SYS_freebsd32_cpuset_setaffinity	488

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Mar 11 14:17:37 2010	(r205013)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Mar 11 14:49:06 2010	(r205014)
@@ -3,10 +3,13 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 200111 2009-12-04 21:52:31Z kib 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 14:54:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4838E106564A;
	Thu, 11 Mar 2010 14:54:55 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 35B4D8FC1B;
	Thu, 11 Mar 2010 14:54: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 o2BEstKD074680;
	Thu, 11 Mar 2010 14:54:55 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BEstpe074678;
	Thu, 11 Mar 2010 14:54:55 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201003111454.o2BEstpe074678@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Thu, 11 Mar 2010 14:54: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: r205015 - head/sys/ia64/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 14:54:55 -0000

Author: nwhitehorn
Date: Thu Mar 11 14:54:54 2010
New Revision: 205015
URL: http://svn.freebsd.org/changeset/base/205015

Log:
  Accidentally committed test code. Remove it.
  
  Big pointy hat:	me

Modified:
  head/sys/ia64/conf/GENERIC

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Thu Mar 11 14:49:06 2010	(r205014)
+++ head/sys/ia64/conf/GENERIC	Thu Mar 11 14:54:54 2010	(r205015)
@@ -28,7 +28,6 @@ makeoptions	DEBUG=-g	# Build kernel with
 options 	AUDIT		# Security event auditing
 options 	CD9660		# ISO 9660 Filesystem
 options 	COMPAT_43TTY	# BSD 4.3 TTY compat (sgtty)
-options 	COMPAT_FREEBSD32	# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD6	# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
 options 	DDB		# Support DDB

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 14:57:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 09BD81065670;
	Thu, 11 Mar 2010 14:57:00 +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 D0B348FC15;
	Thu, 11 Mar 2010 14:56: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 o2BEux2C076802;
	Thu, 11 Mar 2010 14:56:59 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BEuxio076797;
	Thu, 11 Mar 2010 14:56:59 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201003111456.o2BEuxio076797@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Thu, 11 Mar 2010 14:56: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: r205016 - head/sys/compat/freebsd32
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 14:57:00 -0000

Author: nwhitehorn
Date: Thu Mar 11 14:56:59 2010
New Revision: 205016
URL: http://svn.freebsd.org/changeset/base/205016

Log:
  Regen after big endian compatibility import.

Modified:
  head/sys/compat/freebsd32/freebsd32_proto.h
  head/sys/compat/freebsd32/freebsd32_syscall.h
  head/sys/compat/freebsd32/freebsd32_syscalls.c
  head/sys/compat/freebsd32/freebsd32_sysent.c

Modified: head/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_proto.h	Thu Mar 11 14:54:54 2010	(r205015)
+++ head/sys/compat/freebsd32/freebsd32_proto.h	Thu Mar 11 14:56:59 2010	(r205016)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Mar 11 14:54:54 2010	(r205015)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Mar 11 14:56:59 2010	(r205016)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn 
  */
 
 #define	FREEBSD32_SYS_syscall	0

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Mar 11 14:54:54 2010	(r205015)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Mar 11 14:56:59 2010	(r205016)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn 
  */
 
 const char *freebsd32_syscallnames[] = {

Modified: head/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_sysent.c	Thu Mar 11 14:54:54 2010	(r205015)
+++ head/sys/compat/freebsd32/freebsd32_sysent.c	Thu Mar 11 14:56:59 2010	(r205016)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 203660 2010-02-08 10:02:01Z ed 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn 
  */
 
 #include "opt_compat.h"

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 15:13:56 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41FC41065670;
	Thu, 11 Mar 2010 15:13:56 +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 153F88FC29;
	Thu, 11 Mar 2010 15:13:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BFDt7L092474;
	Thu, 11 Mar 2010 15:13:55 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BFDtpD092472;
	Thu, 11 Mar 2010 15:13:55 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111513.o2BFDtpD092472@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 15:13: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: r205017 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 15:13:56 -0000

Author: jhb
Date: Thu Mar 11 15:13:55 2010
New Revision: 205017
URL: http://svn.freebsd.org/changeset/base/205017

Log:
  Style fixes.
  
  Submitted by:	bde

Modified:
  head/sys/kern/kern_ktr.c

Modified: head/sys/kern/kern_ktr.c
==============================================================================
--- head/sys/kern/kern_ktr.c	Thu Mar 11 14:56:59 2010	(r205016)
+++ head/sys/kern/kern_ktr.c	Thu Mar 11 15:13:55 2010	(r205017)
@@ -84,25 +84,25 @@ SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFL
 
 int	ktr_cpumask = KTR_CPUMASK;
 TUNABLE_INT("debug.ktr.cpumask", &ktr_cpumask);
-SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0,
-    "Bitmask of CPUs on which KTR logging is enabled.");
+SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW,
+    &ktr_cpumask, 0, "Bitmask of CPUs on which KTR logging is enabled");
 
 int	ktr_mask = KTR_MASK;
 TUNABLE_INT("debug.ktr.mask", &ktr_mask);
-SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, &ktr_mask, 0,
-    "Bitmask of KTR event classes for which logging is enabled.");
+SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW,
+    &ktr_mask, 0, "Bitmask of KTR event classes for which logging is enabled");
 
 int	ktr_compile = KTR_COMPILE;
-SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0,
-    "Bitmask of KTR event classes compiled into the kernel.");
+SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD,
+    &ktr_compile, 0, "Bitmask of KTR event classes compiled into the kernel");
 
 int	ktr_entries = KTR_ENTRIES;
-SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, &ktr_entries, 0,
-    "Number of entries in the KTR buffer.");
+SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD,
+    &ktr_entries, 0, "Number of entries in the KTR buffer");
 
 int	ktr_version = KTR_VERSION;
-SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0,
-    "Version of the KTR interface.");
+SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD,
+    &ktr_version, 0, "Version of the KTR interface");
 
 volatile int	ktr_idx = 0;
 struct	ktr_entry ktr_buf[KTR_ENTRIES];

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 15:25:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B4F31065672;
	Thu, 11 Mar 2010 15:25:48 +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 092F48FC1E;
	Thu, 11 Mar 2010 15:25: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 o2BFPloO003635;
	Thu, 11 Mar 2010 15:25:47 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BFPlig003633;
	Thu, 11 Mar 2010 15:25:47 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111525.o2BFPlig003633@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 15:25: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: r205018 - head/sys/dev/pci
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 15:25:48 -0000

Author: jhb
Date: Thu Mar 11 15:25:47 2010
New Revision: 205018
URL: http://svn.freebsd.org/changeset/base/205018

Log:
  Small whitespace fixes.

Modified:
  head/sys/dev/pci/vga_pci.c

Modified: head/sys/dev/pci/vga_pci.c
==============================================================================
--- head/sys/dev/pci/vga_pci.c	Thu Mar 11 15:13:55 2010	(r205017)
+++ head/sys/dev/pci/vga_pci.c	Thu Mar 11 15:25:47 2010	(r205018)
@@ -232,7 +232,7 @@ vga_pci_read_config(device_t dev, device
 }
 
 static void
-vga_pci_write_config(device_t dev, device_t child, int reg, 
+vga_pci_write_config(device_t dev, device_t child, int reg,
     uint32_t val, int width)
 {
 
@@ -409,7 +409,6 @@ static device_method_t vga_pci_methods[]
 	DEVMETHOD(bus_write_ivar,	vga_pci_write_ivar),
 	DEVMETHOD(bus_setup_intr,	vga_pci_setup_intr),
 	DEVMETHOD(bus_teardown_intr,	vga_pci_teardown_intr),
-
 	DEVMETHOD(bus_alloc_resource,	vga_pci_alloc_resource),
 	DEVMETHOD(bus_release_resource,	vga_pci_release_resource),
 	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 16:58:16 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3892E1065678;
	Thu, 11 Mar 2010 16:58: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 277858FC12;
	Thu, 11 Mar 2010 16:58: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 o2BGwGNd088068;
	Thu, 11 Mar 2010 16:58:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BGwGT4088066;
	Thu, 11 Mar 2010 16:58:16 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111658.o2BGwGT4088066@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 16:58: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: r205020 - head/lib/libc/rpc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 16:58:16 -0000

Author: jhb
Date: Thu Mar 11 16:58:15 2010
New Revision: 205020
URL: http://svn.freebsd.org/changeset/base/205020

Log:
  Fix a bug in the previous change: remove function-local definition of
  tcp_key and udp_key that shadows the global definition.
  
  PR:		threads/144558
  Submitted by:	Sam Robb

Modified:
  head/lib/libc/rpc/rpc_generic.c

Modified: head/lib/libc/rpc/rpc_generic.c
==============================================================================
--- head/lib/libc/rpc/rpc_generic.c	Thu Mar 11 15:33:12 2010	(r205019)
+++ head/lib/libc/rpc/rpc_generic.c	Thu Mar 11 16:58:15 2010	(r205020)
@@ -248,7 +248,6 @@ __rpc_getconfip(nettype)
 	static char *netid_udp_main;
 	struct netconfig *dummy;
 	int main_thread;
-	static thread_key_t tcp_key, udp_key;
 
 	if ((main_thread = thr_main())) {
 		netid_udp = netid_udp_main;

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 17:01:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2E90106564A;
	Thu, 11 Mar 2010 17:01:33 +0000 (UTC)
	(envelope-from a_best01@uni-muenster.de)
Received: from zivm-relay3.uni-muenster.de (ZIVM-RELAY3.UNI-MUENSTER.DE
	[128.176.192.19])
	by mx1.freebsd.org (Postfix) with ESMTP id E33558FC21;
	Thu, 11 Mar 2010 17:01:32 +0000 (UTC)
X-IronPort-AV: E=Sophos;i="4.49,621,1262559600"; d="scan'208";a="28179080"
Received: from zivmaildisp1.uni-muenster.de (HELO
	ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85])
	by zivm-relay3.uni-muenster.de with ESMTP; 11 Mar 2010 18:01:29 +0100
Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459)
	id 0A5ED1B0750; Thu, 11 Mar 2010 18:01:29 +0100 (CET)
Date: Thu, 11 Mar 2010 18:01:28 +0100 (CET)
From: Alexander Best 
Sender: 
Organization: Westfaelische Wilhelms-Universitaet Muenster
To: John Baldwin 
Message-ID: 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r205013 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 17:01:33 -0000

thanks for the commit. :)

a few thoughts:

1) why does stepping remain to be printed in dec while family and model are in
hex? is this the way amd/intel cpu docs refer to stepping/model/family?
2) the hex value for "Id" and "(AMD) Features(2)" gets printed with an "0x"
prepended to indicate it's in hex. maybe this should also be the case here.

cheers.
alex

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 17:03:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53044106566C;
	Thu, 11 Mar 2010 17:03:33 +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 409EF8FC22;
	Thu, 11 Mar 2010 17:03: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 o2BH3Xgg092978;
	Thu, 11 Mar 2010 17:03:33 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BH3WGW092963;
	Thu, 11 Mar 2010 17:03:32 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003111703.o2BH3WGW092963@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Mar 2010 17:03: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: r205021 - head/lib/libc/stdio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 17:03:33 -0000

Author: jhb
Date: Thu Mar 11 17:03:32 2010
New Revision: 205021
URL: http://svn.freebsd.org/changeset/base/205021

Log:
  - Use an initializer macro to initialize fields in 'fake' FILE objects used
    by *sprintf(), etc.
  - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE
    objects.  This is currently a nop on FreeBSD, but is import for other
    platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply
    zero.
  
  PR:		threads/141198
  Reported by:	Jeremy Huddleston @ Apple
  MFC after:	2 weeks

Modified:
  head/lib/libc/stdio/findfp.c
  head/lib/libc/stdio/local.h
  head/lib/libc/stdio/snprintf.c
  head/lib/libc/stdio/vasprintf.c
  head/lib/libc/stdio/vdprintf.c
  head/lib/libc/stdio/vfprintf.c
  head/lib/libc/stdio/vsnprintf.c
  head/lib/libc/stdio/vsprintf.c
  head/lib/libc/stdio/vsscanf.c
  head/lib/libc/stdio/vswprintf.c
  head/lib/libc/stdio/vswscanf.c
  head/lib/libc/stdio/xprintf.c

Modified: head/lib/libc/stdio/findfp.c
==============================================================================
--- head/lib/libc/stdio/findfp.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/findfp.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -61,6 +61,7 @@ int	__sdidinit;
 	._read = __sread,		\
 	._seek = __sseek,		\
 	._write = __swrite,		\
+	._fl_mutex = PTHREAD_MUTEX_INITIALIZER, \
 }
 				/* the usual - (stdin + stdout + stderr) */
 static FILE usual[FOPEN_MAX - 3];
@@ -96,7 +97,7 @@ moreglue(n)
 	int n;
 {
 	struct glue *g;
-	static FILE empty;
+	static FILE empty = { ._fl_mutex = PTHREAD_MUTEX_INITIALIZER };
 	FILE *p;
 
 	g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE));
@@ -154,7 +155,7 @@ found:
 	fp->_ub._size = 0;
 	fp->_lb._base = NULL;	/* no line buffer */
 	fp->_lb._size = 0;
-/*	fp->_lock = NULL; */	/* once set always set (reused) */
+/*	fp->_fl_mutex = NULL; */ /* once set always set (reused) */
 	fp->_orientation = 0;
 	memset(&fp->_mbstate, 0, sizeof(mbstate_t));
 	return (fp);

Modified: head/lib/libc/stdio/local.h
==============================================================================
--- head/lib/libc/stdio/local.h	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/local.h	Thu Mar 11 17:03:32 2010	(r205021)
@@ -110,6 +110,14 @@ extern int	__sdidinit;
 }
 
 /*
+ * Structure initializations for 'fake' FILE objects.
+ */
+#define	FAKE_FILE {				\
+	._file = -1,				\
+	._fl_mutex = PTHREAD_MUTEX_INITIALIZER, \
+}
+
+/*
  * Set the orientation for a stream. If o > 0, the stream has wide-
  * orientation. If o < 0, the stream has byte-orientation.
  */

Modified: head/lib/libc/stdio/snprintf.c
==============================================================================
--- head/lib/libc/stdio/snprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/snprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -48,7 +48,7 @@ snprintf(char * __restrict str, size_t n
 	size_t on;
 	int ret;
 	va_list ap;
-	FILE f;
+	FILE f = FAKE_FILE;
 
 	on = n;
 	if (n != 0)
@@ -56,12 +56,9 @@ snprintf(char * __restrict str, size_t n
 	if (n > INT_MAX)
 		n = INT_MAX;
 	va_start(ap, fmt);
-	f._file = -1;
 	f._flags = __SWR | __SSTR;
 	f._bf._base = f._p = (unsigned char *)str;
 	f._bf._size = f._w = n;
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	ret = __vfprintf(&f, fmt, ap);
 	if (on > 0)
 		*f._p = '\0';

Modified: head/lib/libc/stdio/vasprintf.c
==============================================================================
--- head/lib/libc/stdio/vasprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vasprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -42,9 +42,8 @@ vasprintf(str, fmt, ap)
 	__va_list ap;
 {
 	int ret;
-	FILE f;
+	FILE f = FAKE_FILE;
 
-	f._file = -1;
 	f._flags = __SWR | __SSTR | __SALC;
 	f._bf._base = f._p = (unsigned char *)malloc(128);
 	if (f._bf._base == NULL) {
@@ -53,8 +52,6 @@ vasprintf(str, fmt, ap)
 		return (-1);
 	}
 	f._bf._size = f._w = 127;		/* Leave room for the NUL */
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	ret = __vfprintf(&f, fmt, ap);
 	if (ret < 0) {
 		free(f._bf._base);

Modified: head/lib/libc/stdio/vdprintf.c
==============================================================================
--- head/lib/libc/stdio/vdprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vdprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 int
 vdprintf(int fd, const char * __restrict fmt, va_list ap)
 {
-	FILE f;
+	FILE f = FAKE_FILE;
 	unsigned char buf[BUFSIZ];
 	int ret;
 
@@ -56,8 +56,6 @@ vdprintf(int fd, const char * __restrict
 	f._write = __swrite;
 	f._bf._base = buf;
 	f._bf._size = sizeof(buf);
-	f._orientation = 0;
-	bzero(&f._mbstate, sizeof(f._mbstate));
 
 	if ((ret = __vfprintf(&f, fmt, ap)) < 0)
 		return (ret);

Modified: head/lib/libc/stdio/vfprintf.c
==============================================================================
--- head/lib/libc/stdio/vfprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vfprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -169,7 +169,7 @@ static int
 __sbprintf(FILE *fp, const char *fmt, va_list ap)
 {
 	int ret;
-	FILE fake;
+	FILE fake = FAKE_FILE;
 	unsigned char buf[BUFSIZ];
 
 	/* XXX This is probably not needed. */

Modified: head/lib/libc/stdio/vsnprintf.c
==============================================================================
--- head/lib/libc/stdio/vsnprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vsnprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -47,7 +47,7 @@ vsnprintf(char * __restrict str, size_t 
 	size_t on;
 	int ret;
 	char dummy[2];
-	FILE f;
+	FILE f = FAKE_FILE;
 
 	on = n;
 	if (n != 0)
@@ -61,12 +61,9 @@ vsnprintf(char * __restrict str, size_t 
 		str = dummy;
 		n = 1;
 	}
-	f._file = -1;
 	f._flags = __SWR | __SSTR;
 	f._bf._base = f._p = (unsigned char *)str;
 	f._bf._size = f._w = n;
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	ret = __vfprintf(&f, fmt, ap);
 	if (on > 0)
 		*f._p = '\0';

Modified: head/lib/libc/stdio/vsprintf.c
==============================================================================
--- head/lib/libc/stdio/vsprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vsprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -44,14 +44,11 @@ int
 vsprintf(char * __restrict str, const char * __restrict fmt, __va_list ap)
 {
 	int ret;
-	FILE f;
+	FILE f = FAKE_FILE;
 
-	f._file = -1;
 	f._flags = __SWR | __SSTR;
 	f._bf._base = f._p = (unsigned char *)str;
 	f._bf._size = f._w = INT_MAX;
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	ret = __vfprintf(&f, fmt, ap);
 	*f._p = 0;
 	return (ret);

Modified: head/lib/libc/stdio/vsscanf.c
==============================================================================
--- head/lib/libc/stdio/vsscanf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vsscanf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -55,16 +55,11 @@ int
 vsscanf(const char * __restrict str, const char * __restrict fmt,
 	__va_list ap)
 {
-	FILE f;
+	FILE f = FAKE_FILE;
 
-	f._file = -1;
 	f._flags = __SRD;
 	f._bf._base = f._p = (unsigned char *)str;
 	f._bf._size = f._r = strlen(str);
 	f._read = eofread;
-	f._ub._base = NULL;
-	f._lb._base = NULL;
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	return (__svfscanf(&f, fmt, ap));
 }

Modified: head/lib/libc/stdio/vswprintf.c
==============================================================================
--- head/lib/libc/stdio/vswprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vswprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -45,7 +45,7 @@ vswprintf(wchar_t * __restrict s, size_t
 {
 	static const mbstate_t initial;
 	mbstate_t mbs;
-	FILE f;
+	FILE f = FAKE_FILE;
 	char *mbp;
 	int ret, sverrno;
 	size_t nwc;
@@ -55,7 +55,6 @@ vswprintf(wchar_t * __restrict s, size_t
 		return (-1);
 	}
 
-	f._file = -1;
 	f._flags = __SWR | __SSTR | __SALC;
 	f._bf._base = f._p = (unsigned char *)malloc(128);
 	if (f._bf._base == NULL) {
@@ -63,8 +62,6 @@ vswprintf(wchar_t * __restrict s, size_t
 		return (-1);
 	}
 	f._bf._size = f._w = 127;		/* Leave room for the NUL */
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	ret = __vfwprintf(&f, fmt, ap);
 	if (ret < 0) {
 		sverrno = errno;

Modified: head/lib/libc/stdio/vswscanf.c
==============================================================================
--- head/lib/libc/stdio/vswscanf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/vswscanf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -62,7 +62,7 @@ vswscanf(const wchar_t * __restrict str,
 {
 	static const mbstate_t initial;
 	mbstate_t mbs;
-	FILE f;
+	FILE f = FAKE_FILE;
 	char *mbstr;
 	size_t mlen;
 	int r;
@@ -80,15 +80,10 @@ vswscanf(const wchar_t * __restrict str,
 		free(mbstr);
 		return (EOF);
 	}
-	f._file = -1;
 	f._flags = __SRD;
 	f._bf._base = f._p = (unsigned char *)mbstr;
 	f._bf._size = f._r = mlen;
 	f._read = eofread;
-	f._ub._base = NULL;
-	f._lb._base = NULL;
-	f._orientation = 0;
-	memset(&f._mbstate, 0, sizeof(mbstate_t));
 	r = __vfwscanf(&f, fmt, ap);
 	free(mbstr);
 

Modified: head/lib/libc/stdio/xprintf.c
==============================================================================
--- head/lib/libc/stdio/xprintf.c	Thu Mar 11 16:58:15 2010	(r205020)
+++ head/lib/libc/stdio/xprintf.c	Thu Mar 11 17:03:32 2010	(r205021)
@@ -48,6 +48,7 @@
 #include 
 #include "un-namespace.h"
 
+#include "local.h"
 #include "printf.h"
 #include "fvwrite.h"
 
@@ -575,7 +576,7 @@ static int
 __v3printf(FILE *fp, const char *fmt, int pct, va_list ap)
 {
 	int ret;
-	FILE fake;
+	FILE fake = FAKE_FILE;
 	unsigned char buf[BUFSIZ];
 
 	/* copy the important variables */

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 17:29:13 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99993106566C;
	Thu, 11 Mar 2010 17:29:13 +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 6A6878FC0C;
	Thu, 11 Mar 2010 17:29:13 +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 1CABD46B92;
	Thu, 11 Mar 2010 12:29:13 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 62CC78A01F;
	Thu, 11 Mar 2010 12:29:12 -0500 (EST)
From: John Baldwin 
To: Alexander Best 
Date: Thu, 11 Mar 2010 12:29:11 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003111229.11181.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 11 Mar 2010 12:29:12 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r205013 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 17:29:13 -0000

On Thursday 11 March 2010 12:01:28 pm Alexander Best wrote:
> thanks for the commit. :)
> 
> a few thoughts:
> 
> 1) why does stepping remain to be printed in dec while family and model are 
in
> hex? is this the way amd/intel cpu docs refer to stepping/model/family?
> 2) the hex value for "Id" and "(AMD) Features(2)" gets printed with an "0x"
> prepended to indicate it's in hex. maybe this should also be the case here.
> 
> cheers.
> alex
> 

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 17:56:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F2D51065670;
	Thu, 11 Mar 2010 17:56:47 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1482A8FC16;
	Thu, 11 Mar 2010 17:56: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 o2BHukn8042452;
	Thu, 11 Mar 2010 17:56:46 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BHukJu042449;
	Thu, 11 Mar 2010 17:56:46 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201003111756.o2BHukJu042449@svn.freebsd.org>
From: Qing Li 
Date: Thu, 11 Mar 2010 17:56: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: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 17:56:47 -0000

Author: qingli
Date: Thu Mar 11 17:56:46 2010
New Revision: 205024
URL: http://svn.freebsd.org/changeset/base/205024

Log:
  The if_tap interface is of IFT_ETHERNET type, but it
  does not set or update the if_link_state variable.
  As such RT_LINK_IS_UP() fails for the if_tap interface.
  
  Also, the RT_LINK_IS_UP() needs to bypass all loopback
  interfaces because loopback interfaces are considered
  up logically as long as the system is running.
  
  This patch fixes the above issues by setting and updating
  the if_link_state variable when the tap interface is
  opened or closed respectively. Similary approach is
  already done in the if_tun device.
  
  MFC after:	3 days

Modified:
  head/sys/net/if_tap.c
  head/sys/net/route.h

Modified: head/sys/net/if_tap.c
==============================================================================
--- head/sys/net/if_tap.c	Thu Mar 11 17:15:40 2010	(r205023)
+++ head/sys/net/if_tap.c	Thu Mar 11 17:56:46 2010	(r205024)
@@ -502,6 +502,7 @@ tapopen(struct cdev *dev, int flag, int 
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	if (tapuponopen)
 		ifp->if_flags |= IFF_UP;
+	if_link_state_change(ifp, LINK_STATE_UP);
 	splx(s);
 
 	TAPDEBUG("%s is open. minor = %#x\n", ifp->if_xname, dev2unit(dev));
@@ -547,6 +548,7 @@ tapclose(struct cdev *dev, int foo, int 
 	} else
 		mtx_unlock(&tp->tap_mtx);
 
+	if_link_state_change(ifp, LINK_STATE_DOWN);
 	funsetown(&tp->tap_sigio);
 	selwakeuppri(&tp->tap_rsel, PZERO+1);
 	KNOTE_UNLOCKED(&tp->tap_rsel.si_note, 0);

Modified: head/sys/net/route.h
==============================================================================
--- head/sys/net/route.h	Thu Mar 11 17:15:40 2010	(r205023)
+++ head/sys/net/route.h	Thu Mar 11 17:56:46 2010	(r205024)
@@ -319,7 +319,9 @@ struct rt_addrinfo {
 
 #ifdef _KERNEL
 
-#define RT_LINK_IS_UP(ifp)	((ifp)->if_link_state == LINK_STATE_UP)
+#define RT_LINK_IS_UP(ifp)	(((ifp)->if_flags &		    \
+				  (IFF_LOOPBACK | IFF_POINTOPOINT)) \
+				 || (ifp)->if_link_state == LINK_STATE_UP)
 
 #define	RT_LOCK_INIT(_rt) \
 	mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK)

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 18:15:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B3A19106564A;
	Thu, 11 Mar 2010 18:15:19 +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 841A58FC2E;
	Thu, 11 Mar 2010 18:15:19 +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 07A8246B8C;
	Thu, 11 Mar 2010 13:15:19 -0500 (EST)
Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id DEED28A01F;
	Thu, 11 Mar 2010 13:15:17 -0500 (EST)
From: John Baldwin 
To: Alexander Best 
Date: Thu, 11 Mar 2010 13:11:52 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; )
References: 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201003111311.52606.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 11 Mar 2010 13:15:17 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham
	version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r205013 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 18:15:19 -0000

On Thursday 11 March 2010 12:01:28 pm Alexander Best wrote:
> thanks for the commit. :)
> 
> a few thoughts:
> 
> 1) why does stepping remain to be printed in dec while family and model are in
> hex? is this the way amd/intel cpu docs refer to stepping/model/family?

I just left it the way it was.

> 2) the hex value for "Id" and "(AMD) Features(2)" gets printed with an "0x"
> prepended to indicate it's in hex. maybe this should also be the case here.

Because on a typical Intel system you overflow 80 cols if you do that. :(
Otherwise I would have.  We could maybe add an 'h' suffix as that is what
the manuals and it would only add 2 chars rather than 4.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 20:41:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 33F881065670;
	Thu, 11 Mar 2010 20:41: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 2488D8FC0A;
	Thu, 11 Mar 2010 20:41: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 o2BKfLYe097877;
	Thu, 11 Mar 2010 20:41:21 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BKfLKo097871;
	Thu, 11 Mar 2010 20:41:21 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112041.o2BKfLKo097871@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 20:41: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: r205026 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 20:41:22 -0000

Author: thompsa
Date: Thu Mar 11 20:41:21 2010
New Revision: 205026
URL: http://svn.freebsd.org/changeset/base/205026

Log:
  Reapply r185998 which was overwritten at some point.

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 20:32:28 2010	(r205025)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 20:41:21 2010	(r205026)
@@ -2003,9 +2003,6 @@ product MSI RT3070_7		0x899a	RT3070
 product MSI RT2573_3		0xa861	RT2573
 product MSI RT2573_4		0xa874	RT2573
 
-/* Microdia products */
-product MICRODIA TWINKLECAM	0x600d	TwinkleCam USB camera
-
 /* Microsoft products */
 product MICROSOFT SIDEPREC	0x0008	SideWinder Precision Pro
 product MICROSOFT INTELLIMOUSE	0x0009	IntelliMouse

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:04:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B2BD1065676;
	Thu, 11 Mar 2010 21:04:30 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BF608FC2D;
	Thu, 11 Mar 2010 21:04: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 o2BL4U6J020245;
	Thu, 11 Mar 2010 21:04:30 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BL4U0I020242;
	Thu, 11 Mar 2010 21:04:30 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <201003112104.o2BL4U0I020242@svn.freebsd.org>
From: Rafal Jaworowski 
Date: Thu, 11 Mar 2010 21:04:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205027 - head/sys/arm/arm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:04:30 -0000

Author: raj
Date: Thu Mar 11 21:04:29 2010
New Revision: 205027
URL: http://svn.freebsd.org/changeset/base/205027

Log:
  Let detailed info about CPU features print on Marvell Sheeva CPU as well.
  
  Provide missing entry in the cpu_classes[].
  
  Reported by:	Maks Verver
  MFC after:	1 week

Modified:
  head/sys/arm/arm/identcpu.c

Modified: head/sys/arm/arm/identcpu.c
==============================================================================
--- head/sys/arm/arm/identcpu.c	Thu Mar 11 20:41:21 2010	(r205026)
+++ head/sys/arm/arm/identcpu.c	Thu Mar 11 21:04:29 2010	(r205027)
@@ -329,6 +329,7 @@ const struct cpu_classtab cpu_classes[] 
 	{ "SA-1",	"CPU_SA110" },		/* CPU_CLASS_SA1 */
 	{ "XScale",	"CPU_XSCALE_..." },	/* CPU_CLASS_XSCALE */
 	{ "ARM11J",	"CPU_ARM11" },		/* CPU_CLASS_ARM11J */
+	{ "Marvell",	"CPU_MARVELL" },	/* CPU_CLASS_MARVELL */
 };
 
 /*
@@ -404,6 +405,7 @@ identify_arm_cpu(void)
 	case CPU_CLASS_SA1:
 	case CPU_CLASS_XSCALE:
 	case CPU_CLASS_ARM11J:
+	case CPU_CLASS_MARVELL:
 		if ((ctrl & CPU_CONTROL_DC_ENABLE) == 0)
 			printf(" DC disabled");
 		else

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:16:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BACDB1065672;
	Thu, 11 Mar 2010 21:16:54 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AB32A8FC08;
	Thu, 11 Mar 2010 21:16: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 o2BLGsns031914;
	Thu, 11 Mar 2010 21:16:54 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLGslX031910;
	Thu, 11 Mar 2010 21:16:54 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <201003112116.o2BLGslX031910@svn.freebsd.org>
From: Rafal Jaworowski 
Date: Thu, 11 Mar 2010 21:16: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: r205028 - head/sys/arm/arm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:16:54 -0000

Author: raj
Date: Thu Mar 11 21:16:54 2010
New Revision: 205028
URL: http://svn.freebsd.org/changeset/base/205028

Log:
  Fix ARM cache handling yet more.
  
  1) vm_machdep.c: remove the dangling allocations so they do not
     un-necessarily turn off the cache upon consecutive access.
  
  2) busdma_machdep.c: remove the same amount than shadow mapped.
  
  Reported by:	Maks Verver
  Submitted by:	Mark Tinguely
  Reviewed by:	Grzegorz Bernacki
  MFC after:	3 days

Modified:
  head/sys/arm/arm/busdma_machdep.c
  head/sys/arm/arm/vm_machdep.c

Modified: head/sys/arm/arm/busdma_machdep.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep.c	Thu Mar 11 21:04:29 2010	(r205027)
+++ head/sys/arm/arm/busdma_machdep.c	Thu Mar 11 21:16:54 2010	(r205028)
@@ -649,7 +649,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void
 		KASSERT(map->allocbuffer == vaddr,
 		    ("Trying to freeing the wrong DMA buffer"));
 		vaddr = map->origbuffer;
-		arm_unmap_nocache(map->allocbuffer, dmat->maxsize);
+		arm_unmap_nocache(map->allocbuffer,
+		    dmat->maxsize + ((vm_offset_t)vaddr & PAGE_MASK));
 	}
         if (dmat->maxsize <= PAGE_SIZE &&
 	   dmat->alignment < dmat->maxsize &&

Modified: head/sys/arm/arm/vm_machdep.c
==============================================================================
--- head/sys/arm/arm/vm_machdep.c	Thu Mar 11 21:04:29 2010	(r205027)
+++ head/sys/arm/arm/vm_machdep.c	Thu Mar 11 21:16:54 2010	(r205028)
@@ -171,6 +171,9 @@ sf_buf_free(struct sf_buf *sf)
 	 if (sf->ref_count == 0) {
 		 TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry);
 		 nsfbufsused--;
+		 pmap_kremove(sf->kva);
+		 sf->m = NULL;
+		 LIST_REMOVE(sf, list_entry);
 		 if (sf_buf_alloc_want > 0)
 			 wakeup_one(&sf_buf_freelist);
 	 }
@@ -502,9 +505,12 @@ arm_unmap_nocache(void *addr, vm_size_t 
 
 	size = round_page(size);
 	i = (raddr - arm_nocache_startaddr) / (PAGE_SIZE);
-	for (; size > 0; size -= PAGE_SIZE, i++)
+	for (; size > 0; size -= PAGE_SIZE, i++) {
 		arm_nocache_allocated[i / BITS_PER_INT] &= ~(1 << (i % 
 		    BITS_PER_INT));
+		pmap_kremove(raddr);
+		raddr += PAGE_SIZE;
+	}
 }
 
 #ifdef ARM_USE_SMALL_ALLOC

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:32:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E8A05106564A;
	Thu, 11 Mar 2010 21:32:37 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id C41838FC2B;
	Thu, 11 Mar 2010 21:32:37 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id 5113D46B35;
	Thu, 11 Mar 2010 16:32:37 -0500 (EST)
Date: Thu, 11 Mar 2010 21:32:37 +0000 (GMT)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: Qing Li 
In-Reply-To: <201003111756.o2BHukJu042449@svn.freebsd.org>
Message-ID: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:32:38 -0000


On Thu, 11 Mar 2010, Qing Li wrote:

>  The if_tap interface is of IFT_ETHERNET type, but it
>  does not set or update the if_link_state variable.
>  As such RT_LINK_IS_UP() fails for the if_tap interface.
>
>  Also, the RT_LINK_IS_UP() needs to bypass all loopback
>  interfaces because loopback interfaces are considered
>  up logically as long as the system is running.
>
>  This patch fixes the above issues by setting and updating
>  the if_link_state variable when the tap interface is
>  opened or closed respectively. Similary approach is
>  already done in the if_tun device.

A couple of questions:

(1) It used to be the case that quite a few interface drivers and types didn't
     have a notion of "link up" -- especially older ethernet devices.  Do those
     all have the same problem?  It was probably a design oversight that
     devices don't declare an explicit capability for "can report link state".

(2) While loopback interfaces don't really have a link state, they can be
     administratively down -- should/do you check that as well as link state?
     And more generally, even if link is up, administratively down should be
     obeyed?

Finally, it would be neat if there were a way to have information beyond link 
state influence the choice to balance to a particular route/interface.  For 
example, imagine if I have a router with ECMP, and on the other side on a 
single ethernet segment, I have two DSL modems.  The ethernet link will remain 
up, but I may (via out-of-band mechanisms, such as SNMP or an active probe) be 
able to tell that one of the DSL lines is down.  Is there a way to push that 
information into the kernel currently without deleting the routes, and instead 
say "yeah, but for ECMP purposes this is 'down'"?

Robert

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:42:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44FF5106566B;
	Thu, 11 Mar 2010 21:42: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 F3CD48FC16;
	Thu, 11 Mar 2010 21:42:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BLg9Wh056275;
	Thu, 11 Mar 2010 21:42:09 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLg975056273;
	Thu, 11 Mar 2010 21:42:09 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112142.o2BLg975056273@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:42:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205029 - head/sys/dev/usb/serial
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:42:10 -0000

Author: thompsa
Date: Thu Mar 11 21:42:09 2010
New Revision: 205029
URL: http://svn.freebsd.org/changeset/base/205029

Log:
  Use wMaxPacketSize for the uftdi input buffer size.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/serial/uftdi.c

Modified: head/sys/dev/usb/serial/uftdi.c
==============================================================================
--- head/sys/dev/usb/serial/uftdi.c	Thu Mar 11 21:16:54 2010	(r205028)
+++ head/sys/dev/usb/serial/uftdi.c	Thu Mar 11 21:42:09 2010	(r205029)
@@ -84,8 +84,6 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu
 #define	UFTDI_CONFIG_INDEX	0
 #define	UFTDI_IFACE_INDEX	0
 
-#define	UFTDI_IBUFSIZE 64		/* bytes, maximum number of bytes per
-					 * frame */
 #define	UFTDI_OBUFSIZE 64		/* bytes, cannot be increased due to
 					 * do size encoding */
 
@@ -166,7 +164,7 @@ static const struct usb_config uftdi_con
 		.type = UE_BULK,
 		.endpoint = UE_ADDR_ANY,
 		.direction = UE_DIR_IN,
-		.bufsize = UFTDI_IBUFSIZE,
+		.bufsize = 0,		/* use wMaxPacketSize */
 		.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
 		.callback = &uftdi_read_callback,
 	},

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:45:32 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 226DB1065673;
	Thu, 11 Mar 2010 21:45:32 +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 125B68FC1E;
	Thu, 11 Mar 2010 21:45: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 o2BLjV8R059551;
	Thu, 11 Mar 2010 21:45:31 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLjV0s059546;
	Thu, 11 Mar 2010 21:45:31 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112145.o2BLjV0s059546@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:45: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: r205030 - head/sys/dev/usb/template
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:45:32 -0000

Author: thompsa
Date: Thu Mar 11 21:45:31 2010
New Revision: 205030
URL: http://svn.freebsd.org/changeset/base/205030

Log:
  - make the usb_temp_setup() and usb_temp_unsetup() functions public so that
    other modules can generate USB descriptors.
  - extend the vendor specific request function by one length pointer argument,
    because not all descriptors store the length in the first byte. For example
    HID descriptors.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/template/usb_template.c
  head/sys/dev/usb/template/usb_template.h
  head/sys/dev/usb/template/usb_template_mtp.c

Modified: head/sys/dev/usb/template/usb_template.c
==============================================================================
--- head/sys/dev/usb/template/usb_template.c	Thu Mar 11 21:42:09 2010	(r205029)
+++ head/sys/dev/usb/template/usb_template.c	Thu Mar 11 21:45:31 2010	(r205030)
@@ -98,13 +98,10 @@ static void	*usb_temp_get_config_desc(st
 static const void *usb_temp_get_string_desc(struct usb_device *, uint16_t,
 		    uint8_t);
 static const void *usb_temp_get_vendor_desc(struct usb_device *,
-		    const struct usb_device_request *);
+		    const struct usb_device_request *, uint16_t *plen);
 static const void *usb_temp_get_hub_desc(struct usb_device *);
 static usb_error_t usb_temp_get_desc(struct usb_device *,
 		    struct usb_device_request *, const void **, uint16_t *);
-static usb_error_t usb_temp_setup(struct usb_device *,
-		    const struct usb_temp_device_desc *);
-static void	usb_temp_unsetup(struct usb_device *);
 static usb_error_t usb_temp_setup_by_index(struct usb_device *,
 		    uint16_t index);
 static void	usb_temp_init(void *);
@@ -1035,7 +1032,7 @@ usb_temp_get_config_desc(struct usb_devi
  *------------------------------------------------------------------------*/
 static const void *
 usb_temp_get_vendor_desc(struct usb_device *udev,
-    const struct usb_device_request *req)
+    const struct usb_device_request *req, uint16_t *plen)
 {
 	const struct usb_temp_device_desc *tdd;
 
@@ -1046,7 +1043,7 @@ usb_temp_get_vendor_desc(struct usb_devi
 	if (tdd->getVendorDesc == NULL) {
 		return (NULL);
 	}
-	return ((tdd->getVendorDesc) (req));
+	return ((tdd->getVendorDesc) (req, plen));
 }
 
 /*------------------------------------------------------------------------*
@@ -1109,7 +1106,6 @@ usb_temp_get_desc(struct usb_device *ude
 		default:
 			goto tr_stalled;
 		}
-		break;
 	case UT_READ_CLASS_DEVICE:
 		switch (req->bRequest) {
 		case UR_GET_DESCRIPTOR:
@@ -1117,11 +1113,6 @@ usb_temp_get_desc(struct usb_device *ude
 		default:
 			goto tr_stalled;
 		}
-		break;
-	case UT_READ_VENDOR_DEVICE:
-	case UT_READ_VENDOR_OTHER:
-		buf = usb_temp_get_vendor_desc(udev, req);
-		goto tr_valid;
 	default:
 		goto tr_stalled;
 	}
@@ -1158,7 +1149,6 @@ tr_handle_get_descriptor:
 	default:
 		goto tr_stalled;
 	}
-	goto tr_stalled;
 
 tr_handle_get_class_descriptor:
 	if (req->wValue[0]) {
@@ -1168,17 +1158,20 @@ tr_handle_get_class_descriptor:
 	goto tr_valid;
 
 tr_valid:
-	if (buf == NULL) {
+	if (buf == NULL)
 		goto tr_stalled;
-	}
-	if (len == 0) {
+	if (len == 0)
 		len = buf[0];
-	}
 	*pPtr = buf;
 	*pLength = len;
 	return (0);	/* success */
 
 tr_stalled:
+	/* try to get a vendor specific descriptor */
+	len = 0;
+	buf = usb_temp_get_vendor_desc(udev, req, &len);
+	if (buf != NULL)
+		goto tr_valid;
 	*pPtr = NULL;
 	*pLength = 0;
 	return (0);	/* we ignore failures */
@@ -1195,7 +1188,7 @@ tr_stalled:
  *    0: Success
  * Else: Failure
  *------------------------------------------------------------------------*/
-static usb_error_t
+usb_error_t
 usb_temp_setup(struct usb_device *udev,
     const struct usb_temp_device_desc *tdd)
 {
@@ -1285,7 +1278,7 @@ error:
  * This function frees any memory associated with the currently
  * setup template, if any.
  *------------------------------------------------------------------------*/
-static void
+void
 usb_temp_unsetup(struct usb_device *udev)
 {
 	if (udev->usb_template_ptr) {

Modified: head/sys/dev/usb/template/usb_template.h
==============================================================================
--- head/sys/dev/usb/template/usb_template.h	Thu Mar 11 21:42:09 2010	(r205029)
+++ head/sys/dev/usb/template/usb_template.h	Thu Mar 11 21:45:31 2010	(r205030)
@@ -31,7 +31,7 @@
 #define	_USB_TEMPLATE_H_
 
 typedef const void *(usb_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index);
-typedef const void *(usb_temp_get_vendor_desc_t)(const struct usb_device_request *req);
+typedef const void *(usb_temp_get_vendor_desc_t)(const struct usb_device_request *req, uint16_t *plen);
 
 struct usb_temp_packet_size {
 	uint16_t mps[USB_SPEED_MAX];
@@ -98,5 +98,8 @@ extern const struct usb_temp_device_desc
 extern const struct usb_temp_device_desc usb_template_msc;	/* Mass Storage Class */
 extern const struct usb_temp_device_desc usb_template_mtp;	/* Message Transfer
 								 * Protocol */
+usb_error_t	usb_temp_setup(struct usb_device *,
+		    const struct usb_temp_device_desc *);
+void	usb_temp_unsetup(struct usb_device *);
 
 #endif					/* _USB_TEMPLATE_H_ */

Modified: head/sys/dev/usb/template/usb_template_mtp.c
==============================================================================
--- head/sys/dev/usb/template/usb_template_mtp.c	Thu Mar 11 21:42:09 2010	(r205029)
+++ head/sys/dev/usb/template/usb_template_mtp.c	Thu Mar 11 21:45:31 2010	(r205030)
@@ -211,7 +211,7 @@ const struct usb_temp_device_desc usb_te
  * Else: Success. Pointer to vendor descriptor is returned.
  *------------------------------------------------------------------------*/
 static const void *
-mtp_get_vendor_desc(const struct usb_device_request *req)
+mtp_get_vendor_desc(const struct usb_device_request *req, uint16_t *plen)
 {
 	static const uint8_t dummy_desc[0x28] = {
 		0x28, 0, 0, 0, 0, 1, 4, 0,

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:46:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98F30106564A;
	Thu, 11 Mar 2010 21: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 892B08FC0A;
	Thu, 11 Mar 2010 21: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 o2BLkXYF060598;
	Thu, 11 Mar 2010 21: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 o2BLkXXi060595;
	Thu, 11 Mar 2010 21:46:33 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112146.o2BLkXXi060595@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:46: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: r205031 - head/sys/dev/usb/serial
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:46:33 -0000

Author: thompsa
Date: Thu Mar 11 21:46:33 2010
New Revision: 205031
URL: http://svn.freebsd.org/changeset/base/205031

Log:
  It appears that some UVISOR devices do not handle when the clear stall command
  is issued at the beginning of the initial IN/OUT data transfers.  Reason
  unknown, probably firmware fault. Now the stall is only cleared on data
  transfer errors.
  
  PR:		usb/144199
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/serial/uvisor.c

Modified: head/sys/dev/usb/serial/uvisor.c
==============================================================================
--- head/sys/dev/usb/serial/uvisor.c	Thu Mar 11 21:45:31 2010	(r205030)
+++ head/sys/dev/usb/serial/uvisor.c	Thu Mar 11 21:46:33 2010	(r205031)
@@ -338,11 +338,6 @@ uvisor_attach(device_t dev)
 		DPRINTF("could not allocate all pipes\n");
 		goto detach;
 	}
-	/* clear stall at first run */
-	mtx_lock(&sc->sc_mtx);
-	usbd_xfer_set_stall(sc->sc_xfer[UVISOR_BULK_DT_WR]);
-	usbd_xfer_set_stall(sc->sc_xfer[UVISOR_BULK_DT_RD]);
-	mtx_unlock(&sc->sc_mtx);
 
 	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
 	    &uvisor_callback, &sc->sc_mtx);

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:47:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 630DB106566C;
	Thu, 11 Mar 2010 21:47:26 +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 5314E8FC12;
	Thu, 11 Mar 2010 21:47:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BLlQlv061504;
	Thu, 11 Mar 2010 21:47:26 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLlQI9061500;
	Thu, 11 Mar 2010 21:47:26 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112147.o2BLlQI9061500@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:47:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205032 - in head/sys/dev/usb: . serial
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:47:26 -0000

Author: thompsa
Date: Thu Mar 11 21:47:25 2010
New Revision: 205032
URL: http://svn.freebsd.org/changeset/base/205032

Log:
  Add new uvisor(4) device ID.
  
  PR:		usb/144201

Modified:
  head/sys/dev/usb/serial/uvisor.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/uvisor.c
==============================================================================
--- head/sys/dev/usb/serial/uvisor.c	Thu Mar 11 21:46:33 2010	(r205031)
+++ head/sys/dev/usb/serial/uvisor.c	Thu Mar 11 21:47:25 2010	(r205032)
@@ -256,6 +256,7 @@ MODULE_DEPEND(uvisor, usb, 1, 1, 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) }
 	UVISOR_DEV(ACEECA, MEZ1000, UVISOR_FLAG_PALM4),
+	UVISOR_DEV(ALPHASMART, DANA_SYNC, UVISOR_FLAG_PALM4),
 	UVISOR_DEV(GARMIN, IQUE_3600, UVISOR_FLAG_PALM4),
 	UVISOR_DEV(FOSSIL, WRISTPDA, UVISOR_FLAG_PALM4),
 	UVISOR_DEV(HANDSPRING, VISOR, UVISOR_FLAG_VISOR),

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 21:46:33 2010	(r205031)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 21:47:25 2010	(r205032)
@@ -400,6 +400,7 @@ vendor STSN		0x07ef	STSN
 vendor CENTURY		0x07f7	Century Corp
 vendor ZOOM		0x0803	Zoom Telephonics
 vendor PCS		0x0810	Personal Communication Systems
+vendor ALPHASMART	0x081e	AlphaSmart, Inc.
 vendor BROADLOGIC	0x0827	BroadLogic
 vendor HANDSPRING	0x082d	Handspring
 vendor PALM		0x0830	Palm Computing
@@ -885,6 +886,10 @@ product ALTEC ASC495		0xff05	ASC495 Spea
 /* Allied Telesyn International products */
 product ALLIEDTELESYN ATUSB100	0xb100	AT-USB100
 
+/* AlphaSmart, Inc. products */
+product ALPHASMART DANA_KB	0xdbac	AlphaSmart Dana Keyboard
+product ALPHASMART DANA_SYNC	0xdf00	AlphaSmart Dana HotSync
+
 /* Amoi products */
 product AMOI H01		0x0800	H01 3G modem
 product AMOI H01A		0x7002	H01A 3G modem

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:48:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACC37106566C;
	Thu, 11 Mar 2010 21:48: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 82CA18FC1A;
	Thu, 11 Mar 2010 21:48: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 o2BLmAhD062276;
	Thu, 11 Mar 2010 21:48:10 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLmAqt062274;
	Thu, 11 Mar 2010 21:48:10 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112148.o2BLmAqt062274@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:48: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: r205033 - head/sys/dev/usb/template
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:48:10 -0000

Author: thompsa
Date: Thu Mar 11 21:48:10 2010
New Revision: 205033
URL: http://svn.freebsd.org/changeset/base/205033

Log:
  isochronous endpoint descriptors should have two more bytes which are zero by
  default.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/template/usb_template.c

Modified: head/sys/dev/usb/template/usb_template.c
==============================================================================
--- head/sys/dev/usb/template/usb_template.c	Thu Mar 11 21:47:25 2010	(r205032)
+++ head/sys/dev/usb/template/usb_template.c	Thu Mar 11 21:48:10 2010	(r205033)
@@ -162,15 +162,23 @@ usb_make_endpoint_desc(struct usb_temp_s
 	const void **rd;
 	uint16_t old_size;
 	uint16_t mps;
-	uint8_t ea = 0;			/* Endpoint Address */
-	uint8_t et = 0;			/* Endpiont Type */
+	uint8_t ea;			/* Endpoint Address */
+	uint8_t et;			/* Endpiont Type */
 
 	/* Reserve memory */
 	old_size = temp->size;
-	temp->size += sizeof(*ed);
 
-	/* Scan all Raw Descriptors first */
+	ea = (ted->bEndpointAddress & (UE_ADDR | UE_DIR_IN | UE_DIR_OUT));
+	et = (ted->bmAttributes & UE_XFERTYPE);
+
+	if (et == UE_ISOCHRONOUS) {
+		/* account for extra byte fields */
+		temp->size += sizeof(*ed) + 2;
+	} else {
+		temp->size += sizeof(*ed);
+	}
 
+	/* Scan all Raw Descriptors first */
 	rd = ted->ppRawDesc;
 	if (rd) {
 		while (*rd) {
@@ -192,8 +200,6 @@ usb_make_endpoint_desc(struct usb_temp_s
 		/* escape for Zero Max Packet Size */
 		mps = 0;
 	}
-	ea = (ted->bEndpointAddress & (UE_ADDR | UE_DIR_IN | UE_DIR_OUT));
-	et = (ted->bmAttributes & UE_XFERTYPE);
 
 	/*
 	 * Fill out the real USB endpoint descriptor
@@ -201,7 +207,10 @@ usb_make_endpoint_desc(struct usb_temp_s
 	 */
 	if (temp->buf) {
 		ed = USB_ADD_BYTES(temp->buf, old_size);
-		ed->bLength = sizeof(*ed);
+		if (et == UE_ISOCHRONOUS)
+			ed->bLength = sizeof(*ed) + 2;
+		else
+			ed->bLength = sizeof(*ed);
 		ed->bDescriptorType = UDESC_ENDPOINT;
 		ed->bEndpointAddress = ea;
 		ed->bmAttributes = ted->bmAttributes;

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:49:01 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 369A2106567A;
	Thu, 11 Mar 2010 21:49: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 26F378FC26;
	Thu, 11 Mar 2010 21:49: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 o2BLn1HP063124;
	Thu, 11 Mar 2010 21:49:01 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLn1on063121;
	Thu, 11 Mar 2010 21:49:01 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112149.o2BLn1on063121@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:49: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: r205034 - head/sys/dev/usb/controller
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:49:01 -0000

Author: thompsa
Date: Thu Mar 11 21:49:00 2010
New Revision: 205034
URL: http://svn.freebsd.org/changeset/base/205034

Log:
  For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
  because the chip doesn't do this by itself.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/controller/uss820dci.c

Modified: head/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- head/sys/dev/usb/controller/uss820dci.c	Thu Mar 11 21:48:10 2010	(r205033)
+++ head/sys/dev/usb/controller/uss820dci.c	Thu Mar 11 21:49:00 2010	(r205034)
@@ -333,6 +333,14 @@ uss820dci_setup_rx(struct uss820dci_td *
 	} else {
 		sc->sc_dv_addr = 0xFF;
 	}
+
+	/* reset TX FIFO */
+	temp = USS820_READ_1(sc, USS820_TXCON);
+	temp |= USS820_TXCON_TXCLR;
+	USS820_WRITE_1(sc, USS820_TXCON, temp);
+	temp &= ~USS820_TXCON_TXCLR;
+	USS820_WRITE_1(sc, USS820_TXCON, temp);
+
 	return (0);			/* complete */
 
 setup_not_complete:

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:49:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D173E106566C;
	Thu, 11 Mar 2010 21:49:43 +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 C1D228FC1C;
	Thu, 11 Mar 2010 21:49: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 o2BLnhJ2063825;
	Thu, 11 Mar 2010 21:49:43 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLnhfi063822;
	Thu, 11 Mar 2010 21:49:43 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112149.o2BLnhfi063822@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:49: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: r205035 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:49:43 -0000

Author: thompsa
Date: Thu Mar 11 21:49:43 2010
New Revision: 205035
URL: http://svn.freebsd.org/changeset/base/205035

Log:
  Make sure there is a way to reset the endpoint FIFO on transfer errors for
  ISOCHRONOUS transfers
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_transfer.c

Modified: head/sys/dev/usb/usb_transfer.c
==============================================================================
--- head/sys/dev/usb/usb_transfer.c	Thu Mar 11 21:49:00 2010	(r205034)
+++ head/sys/dev/usb/usb_transfer.c	Thu Mar 11 21:49:43 2010	(r205035)
@@ -2410,21 +2410,24 @@ usbd_pipe_start(struct usb_xfer_queue *p
 	 * Check if we are supposed to stall the endpoint:
 	 */
 	if (xfer->flags.stall_pipe) {
+		struct usb_device *udev;
+		struct usb_xfer_root *info;
+
 		/* clear stall command */
 		xfer->flags.stall_pipe = 0;
 
+		/* get pointer to USB device */
+		info = xfer->xroot;
+		udev = info->udev;
+
 		/*
 		 * Only stall BULK and INTERRUPT endpoints.
 		 */
 		type = (ep->edesc->bmAttributes & UE_XFERTYPE);
 		if ((type == UE_BULK) ||
 		    (type == UE_INTERRUPT)) {
-			struct usb_device *udev;
-			struct usb_xfer_root *info;
 			uint8_t did_stall;
 
-			info = xfer->xroot;
-			udev = info->udev;
 			did_stall = 1;
 
 			if (udev->flags.usb_mode == USB_MODE_DEVICE) {
@@ -2452,6 +2455,17 @@ usbd_pipe_start(struct usb_xfer_queue *p
 				ep->is_stalled = 1;
 				return;
 			}
+		} else if (type == UE_ISOCHRONOUS) {
+
+			/* 
+			 * Make sure any FIFO overflow or other FIFO
+			 * error conditions go away by resetting the
+			 * endpoint FIFO through the clear stall
+			 * method.
+			 */
+			if (udev->flags.usb_mode == USB_MODE_DEVICE) {
+				(udev->bus->methods->clear_stall) (udev, ep);
+			}
 		}
 	}
 	/* Set or clear stall complete - special case */

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:50:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 770C6106564A;
	Thu, 11 Mar 2010 21:50:37 +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 4D0478FC18;
	Thu, 11 Mar 2010 21:50: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 o2BLobA1064741;
	Thu, 11 Mar 2010 21:50:37 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLob0w064737;
	Thu, 11 Mar 2010 21:50:37 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112150.o2BLob0w064737@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:50: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: r205036 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:50:37 -0000

Author: thompsa
Date: Thu Mar 11 21:50:36 2010
New Revision: 205036
URL: http://svn.freebsd.org/changeset/base/205036

Log:
  Implement USB kernel driver detach from userland.
  
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_device.h
  head/sys/dev/usb/usb_generic.c

Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c	Thu Mar 11 21:49:43 2010	(r205035)
+++ head/sys/dev/usb/usb_device.c	Thu Mar 11 21:50:36 2010	(r205036)
@@ -80,7 +80,6 @@
 static void	usb_init_endpoint(struct usb_device *, uint8_t,
 		    struct usb_endpoint_descriptor *, struct usb_endpoint *);
 static void	usb_unconfigure(struct usb_device *, uint8_t);
-static void	usb_detach_device(struct usb_device *, uint8_t, uint8_t);
 static void	usb_detach_device_sub(struct usb_device *, device_t *,
 		    uint8_t);
 static uint8_t	usb_probe_and_attach_sub(struct usb_device *,

Modified: head/sys/dev/usb/usb_device.h
==============================================================================
--- head/sys/dev/usb/usb_device.h	Thu Mar 11 21:49:43 2010	(r205035)
+++ head/sys/dev/usb/usb_device.h	Thu Mar 11 21:50:36 2010	(r205036)
@@ -196,6 +196,7 @@ struct usb_device *usb_alloc_device(devi
 		    enum usb_dev_speed speed, enum usb_hc_mode mode);
 usb_error_t	usb_probe_and_attach(struct usb_device *udev,
 		    uint8_t iface_index);
+void		usb_detach_device(struct usb_device *, uint8_t, uint8_t);
 usb_error_t	usb_reset_iface_endpoints(struct usb_device *udev,
 		    uint8_t iface_index);
 usb_error_t	usbd_set_config_index(struct usb_device *udev, uint8_t index);

Modified: head/sys/dev/usb/usb_generic.c
==============================================================================
--- head/sys/dev/usb/usb_generic.c	Thu Mar 11 21:49:43 2010	(r205035)
+++ head/sys/dev/usb/usb_generic.c	Thu Mar 11 21:50:36 2010	(r205036)
@@ -2095,17 +2095,32 @@ ugen_ioctl_post(struct usb_fifo *f, u_lo
 		break;
 
 	case USB_IFACE_DRIVER_ACTIVE:
-		/* TODO */
-		*u.pint = 0;
+
+		n = *u.pint & 0xFF;
+
+		iface = usbd_get_iface(f->udev, n);
+
+		if (iface && iface->subdev)
+			error = 0;
+		else
+			error = ENXIO;
 		break;
 
 	case USB_IFACE_DRIVER_DETACH:
-		/* TODO */
+
 		error = priv_check(curthread, PRIV_DRIVER);
-		if (error) {
+
+		if (error)
+			break;
+
+		n = *u.pint & 0xFF;
+
+		if (n == USB_IFACE_INDEX_ANY) {
+			error = EINVAL;
 			break;
 		}
-		error = EINVAL;
+
+		usb_detach_device(f->udev, n, 0);
 		break;
 
 	case USB_SET_POWER_MODE:

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:52:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94372106564A;
	Thu, 11 Mar 2010 21:52:31 +0000 (UTC)
	(envelope-from a_best01@uni-muenster.de)
Received: from zivm-relay1.uni-muenster.de (ZIVM-RELAY1.UNI-MUENSTER.DE
	[128.176.192.12])
	by mx1.freebsd.org (Postfix) with ESMTP id C4FE88FC13;
	Thu, 11 Mar 2010 21:52:30 +0000 (UTC)
X-IronPort-AV: E=Sophos;i="4.49,622,1262559600"; d="scan'208";a="298893667"
Received: from zivmaildisp1.uni-muenster.de (HELO
	ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85])
	by zivm-relay1.uni-muenster.de with ESMTP; 11 Mar 2010 22:52:28 +0100
Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459)
	id 1E27B1B0750; Thu, 11 Mar 2010 22:52:28 +0100 (CET)
Date: Thu, 11 Mar 2010 22:52:27 +0100 (CET)
From: Alexander Best 
Sender: 
Organization: Westfaelische Wilhelms-Universitaet Muenster
To: John Baldwin 
Message-ID: 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r205012 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:52:31 -0000

thanks. :)

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:54:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCD2D1065677;
	Thu, 11 Mar 2010 21:54: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 BD4328FC0C;
	Thu, 11 Mar 2010 21:54: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 o2BLsN97068477;
	Thu, 11 Mar 2010 21:54:23 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLsNTD068474;
	Thu, 11 Mar 2010 21:54:23 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112154.o2BLsNTD068474@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:54:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205038 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:54:23 -0000

Author: thompsa
Date: Thu Mar 11 21:54:23 2010
New Revision: 205038
URL: http://svn.freebsd.org/changeset/base/205038

Log:
  add new vendor ID for APACER
  
  Submitted by:	Paul B Mahol

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 21:54:09 2010	(r205037)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 21:54:23 2010	(r205038)
@@ -538,6 +538,7 @@ vendor FALCOM		0x0f94	Falcom Wireless Co
 vendor RIM		0x0fca	Research In Motion
 vendor DYNASTREAM	0x0fcf	Dynastream Innovations
 vendor QUALCOMM		0x1004	Qualcomm
+vendor APACER		0x1005	Apacer
 vendor DESKNOTE		0x1019	Desknote
 vendor GIGABYTE		0x1044	GIGABYTE
 vendor WESTERN		0x1058	Western Digital

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:55:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CBC7F1065673;
	Thu, 11 Mar 2010 21:55:25 +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 BC29D8FC16;
	Thu, 11 Mar 2010 21:55: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 o2BLtPMw069563;
	Thu, 11 Mar 2010 21:55:25 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLtPKY069561;
	Thu, 11 Mar 2010 21:55:25 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112155.o2BLtPKY069561@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:55: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: r205039 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:55:25 -0000

Author: thompsa
Date: Thu Mar 11 21:55:25 2010
New Revision: 205039
URL: http://svn.freebsd.org/changeset/base/205039

Log:
  Add new device ID for the SMC 2514HUB
  
  Submitted by:	Alexander Best

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 21:54:23 2010	(r205038)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 21:55:25 2010	(r205039)
@@ -2771,6 +2771,7 @@ product SMC 2202USB		0x0200	10/100 Ether
 product SMC 2206USB		0x0201	EZ Connect USB Ethernet
 product SMC 2862WG		0xee13	EZ Connect Wireless Adapter
 product SMC2 2020HUB		0x2020	USB Hub
+product SMC2 2514HUB		0x2514	USB Hub
 product SMC3 2662WUSB		0xa002	2662W-AR Wireless
 
 /* SOHOware products */

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:57:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 186451065675;
	Thu, 11 Mar 2010 21:57:02 +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 088AB8FC1D;
	Thu, 11 Mar 2010 21:57: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 o2BLv1Ol071202;
	Thu, 11 Mar 2010 21:57:01 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BLv1KS071199;
	Thu, 11 Mar 2010 21:57:01 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112157.o2BLv1KS071199@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 21:57: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: r205040 - head/sys/dev/usb/input
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:57:02 -0000

Author: thompsa
Date: Thu Mar 11 21:57:01 2010
New Revision: 205040
URL: http://svn.freebsd.org/changeset/base/205040

Log:
  extend search for Apple Function Key.
  
  PR:		usb/144414
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==============================================================================
--- head/sys/dev/usb/input/ukbd.c	Thu Mar 11 21:55:25 2010	(r205039)
+++ head/sys/dev/usb/input/ukbd.c	Thu Mar 11 21:57:01 2010	(r205040)
@@ -876,28 +876,33 @@ ukbd_attach(device_t dev)
 	err = usbd_req_get_hid_desc(uaa->device, NULL, &hid_ptr,
 	    &hid_len, M_TEMP, uaa->info.bIfaceIndex);
 	if (err == 0) {
+		uint8_t apple_keys = 0;
 		uint8_t temp_id;
 
 		/* investigate if this is an Apple Keyboard */
 		if (hid_locate(hid_ptr, hid_len,
 		    HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT),
 		    hid_input, 0, &sc->sc_loc_apple_eject, &flags,
-		    &sc->sc_kbd_id)) {
+		    &temp_id)) {
 			if (flags & HIO_VARIABLE)
 				sc->sc_flags |= UKBD_FLAG_APPLE_EJECT | 
 				    UKBD_FLAG_APPLE_SWAP;
-			if (hid_locate(hid_ptr, hid_len,
-			    HID_USAGE2(0xFFFF, 0x0003),
-			    hid_input, 0, &sc->sc_loc_apple_fn, &flags,
-			    &temp_id)) {
-				if (flags & HIO_VARIABLE)
-					sc->sc_flags |= UKBD_FLAG_APPLE_FN |
-					    UKBD_FLAG_APPLE_SWAP;
-				if (temp_id != sc->sc_kbd_id) {
-					DPRINTF("HID IDs mismatch\n");
-				}
-			}
-		} else {
+			DPRINTFN(1, "Found Apple eject-key\n");
+			apple_keys = 1;
+			sc->sc_kbd_id = temp_id;
+		}
+		if (hid_locate(hid_ptr, hid_len,
+		    HID_USAGE2(0xFFFF, 0x0003),
+		    hid_input, 0, &sc->sc_loc_apple_fn, &flags,
+		    &temp_id)) {
+			if (flags & HIO_VARIABLE)
+				sc->sc_flags |= UKBD_FLAG_APPLE_FN |
+				    UKBD_FLAG_APPLE_SWAP;
+			DPRINTFN(1, "Found Apple FN-key\n");
+			apple_keys = 1;
+			sc->sc_kbd_id = temp_id;
+		}
+		if (apple_keys == 0) {
 			/* 
 			 * Assume the first HID ID contains the
 			 * keyboard data

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 21:57:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44735106566C;
	Thu, 11 Mar 2010 21:57:07 +0000 (UTC)
	(envelope-from a_best01@uni-muenster.de)
Received: from zivm-relay2.uni-muenster.de (ZIVM-RELAY2.UNI-MUENSTER.DE
	[128.176.192.13])
	by mx1.freebsd.org (Postfix) with ESMTP id 74E218FC13;
	Thu, 11 Mar 2010 21:57:06 +0000 (UTC)
X-IronPort-AV: E=Sophos;i="4.49,622,1262559600"; d="scan'208";a="238908759"
Received: from zivmaildisp1.uni-muenster.de (HELO
	ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85])
	by zivm-relay2.uni-muenster.de with ESMTP; 11 Mar 2010 22:57:04 +0100
Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459)
	id BE49C1B0750; Thu, 11 Mar 2010 22:57:04 +0100 (CET)
Date: Thu, 11 Mar 2010 22:57:04 +0100 (CET)
From: Alexander Best 
Sender: 
Organization: Westfaelische Wilhelms-Universitaet Muenster
To: Andrew Thompson 
Message-ID: 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r205026 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 21:57:07 -0000

thanks. this fixes building the kernel with USB_VERBOSE [1].

[1] http://www.mail-archive.com/freebsd-usb@freebsd.org/msg06581.html

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:05:12 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DEEAF106566C;
	Thu, 11 Mar 2010 22:05:12 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CE1978FC08;
	Thu, 11 Mar 2010 22:05:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BM5CET079451;
	Thu, 11 Mar 2010 22:05:12 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BM5C56079446;
	Thu, 11 Mar 2010 22:05:12 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112205.o2BM5C56079446@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 22:05:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205042 - in head/sys/dev/usb: . wlan
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:05:13 -0000

Author: thompsa
Date: Thu Mar 11 22:05:12 2010
New Revision: 205042
URL: http://svn.freebsd.org/changeset/base/205042

Log:
  - Integrate latest driver code from OpenBSD
  - Drain our tasks from the ieee80211 taskqueue
  - Add more IDs
  
  Submitted by:	Akinori Furukoshi

Modified:
  head/sys/dev/usb/usbdevs
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runreg.h
  head/sys/dev/usb/wlan/if_runvar.h

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 22:01:48 2010	(r205041)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 22:05:12 2010	(r205042)
@@ -270,6 +270,7 @@ vendor LACIE		0x059f	LaCie
 vendor FUJIFILM		0x05a2	Fuji Film
 vendor ARC		0x05a3	ARC
 vendor ORTEK		0x05a4	Ortek
+vendor CISCOLINKSYS3	0x05a6	Cisco-Linksys
 vendor BOSE		0x05a7	Bose
 vendor OMNIVISION	0x05a9	OmniVision
 vendor INSYSTEM		0x05ab	In-System Design
@@ -539,6 +540,7 @@ vendor RIM		0x0fca	Research In Motion
 vendor DYNASTREAM	0x0fcf	Dynastream Innovations
 vendor QUALCOMM		0x1004	Qualcomm
 vendor APACER		0x1005	Apacer
+vendor MOTOROLA4	0x100d	Motorola
 vendor DESKNOTE		0x1019	Desknote
 vendor GIGABYTE		0x1044	GIGABYTE
 vendor WESTERN		0x1058	Western Digital
@@ -635,6 +637,7 @@ vendor LINKSYS3		0x1915	Linksys
 vendor QUALCOMMINC	0x19d2	Qualcomm, Incorporated
 vendor WCH2		0x1a86	QinHeng Electronics
 vendor STELERA		0x1a8d	Stelera Wireless
+vendor OVISLINK		0x1b75	OvisLink
 vendor TCTMOBILE	0x1bbb  TCT Mobile
 vendor TELIT		0x1bc7  Telit
 vendor MPMAN		0x1cae	MpMan
@@ -676,6 +679,7 @@ vendor 3COM2		0x6891	3Com
 vendor EDIMAX		0x7392	Edimax
 vendor INTEL		0x8086	Intel
 vendor INTEL2		0x8087	Intel
+vendor ALLWIN		0x8516	ALLWIN Tech
 vendor SITECOM2		0x9016	Sitecom
 vendor MOSCHIP		0x9710	MosChip Semiconductor
 vendor MARVELL		0x9e88	Marvell Technology Group Ltd.
@@ -755,6 +759,7 @@ product	ACCTON RT3070_1		0xa701	RT3070
 product	ACCTON RT3070_2		0xa702	RT3070
 product ACCTON RT2870_1		0xb522	RT2870
 product	ACCTON RT3070_3		0xc522	RT3070
+product	ACCTON RT3070_5		0xd522	RT3070
 product ACCTON ZD1211B		0xe501	ZD1211B
 
 /* Aceeca products */
@@ -887,6 +892,15 @@ product ALTEC ASC495		0xff05	ASC495 Spea
 /* Allied Telesyn International products */
 product ALLIEDTELESYN ATUSB100	0xb100	AT-USB100
 
+/* ALLWIN Tech products */
+product ALLWIN RT2070		0x2070	RT2070
+product ALLWIN RT2770		0x2770	RT2770
+product ALLWIN RT2870		0x2870	RT2870
+product ALLWIN RT3070		0x3070	RT3070
+product ALLWIN RT3071		0x3071	RT3071
+product ALLWIN RT3072		0x3072	RT3072
+product ALLWIN RT3572		0x3572	RT3572
+
 /* AlphaSmart, Inc. products */
 product ALPHASMART DANA_KB	0xdbac	AlphaSmart Dana Keyboard
 product ALPHASMART DANA_SYNC	0xdf00	AlphaSmart Dana HotSync
@@ -989,7 +1003,8 @@ product ASUS RT2870_2		0x1732	RT2870
 product ASUS RT2870_3		0x1742	RT2870
 product ASUS RT2870_4		0x1760	RT2870
 product ASUS RT2870_5		0x1761	RT2870
-product	ASUS RT3070		0x1784	RT3070
+product	ASUS USBN13		0x1784	USB-N13
+product	ASUS RT3070_1		0x1790	RT3070
 product ASUS P535		0x420f	ASUS P535 PDA
 product	ASUS GMSC		0x422f	ASUS Generic Mass Storage
 product ASUS RT2570		0x1706	RT2500USB Wireless Adapter
@@ -1147,7 +1162,8 @@ product CISCOLINKSYS HU200TS	0x001a	HU20
 product CISCOLINKSYS WUSB54GC	0x0020	WUSB54GC
 product CISCOLINKSYS WUSB54GR	0x0023	WUSB54GR
 product CISCOLINKSYS WUSBF54G	0x0024	WUSBF54G
-product	CISCOLINKSYS2	RT3070	0x4001	RT3070
+product	CISCOLINKSYS2 RT3070	0x4001	RT3070
+product	CISCOLINKSYS3 RT3070	0x0101	RT3070
 
 /* CMOTECH products */
 product CMOTECH CNU510		0x5141	CDMA Technologies USB modem
@@ -1174,6 +1190,8 @@ product CONCEPTRONIC AR5523_2	0x7811	AR5
 product CONCEPTRONIC AR5523_2_NF	0x7812	AR5523 (no firmware)
 product CONCEPTRONIC2 C54RU	0x3c02	C54RU WLAN
 product CONCEPTRONIC2 C54RU2	0x3c22	C54RU
+product CONCEPTRONIC2 RT3070_1	0x3c08	RT3070
+product CONCEPTRONIC2 RT3070_2	0x3c11	RT3070
 product CONCEPTRONIC2 VIGORN61	0x3c25	VIGORN61
 product CONCEPTRONIC2 RT2870_1	0x3c06	RT2870
 product CONCEPTRONIC2 RT2870_2	0x3c07	RT2870
@@ -1326,12 +1344,14 @@ product DLINK2 DWA111		0x3c06	DWA-111
 product DLINK2 RT2870_1		0x3c09	RT2870
 product DLINK2 DWA110		0x3c07	DWA-110
 product DLINK2 RT3072		0x3c0a	RT3072
+product DLINK2 RT3072_1		0x3c0b	RT3072
 product DLINK2 RT3070_1		0x3c0d	RT3070
 product DLINK2 RT3070_2		0x3c0e	RT3070
 product DLINK2 RT3070_3		0x3c0f	RT3070
 product DLINK2 RT2870_2		0x3c11	RT2870
 product DLINK2 DWA130		0x3c13	DWA-130
 product DLINK2 RT3070_4		0x3c15	RT3070
+product DLINK2 RT3070_5		0x3c16	RT3070
 product DLINK3 DWM652		0x3e04	DWM-652
 
 /* DMI products */
@@ -1902,6 +1922,7 @@ product LINKSYS4 WUSB100	0x0070	WUSB100
 product LINKSYS4 WUSB600N	0x0071	WUSB600N
 product LINKSYS4 WUSB54GCV2	0x0073	WUSB54GC v2
 product LINKSYS4 WUSB54GCV3	0x0077	WUSB54GC v3
+product LINKSYS4 RT3070		0x0078	RT3070
 product LINKSYS4 WUSB600NV2	0x0079	WUSB600N v2
 
 /* Logitech products */
@@ -1975,6 +1996,8 @@ product MELCO KG54L		0x00da	WLI-U2-KG54L
 product MELCO WLIUCG300N	0x00e8	WLI-UC-G300N
 product MELCO SG54HG		0x00f4	WLI-U2-SG54HG
 product MELCO WLIUCAG300N	0x012e	WLI-UC-AG300N
+product MELCO RT2870_1		0x0148	RT2870
+product MELCO RT2870_2		0x0150	RT2870
 product MELCO WLIUCGN		0x015d	WLI-UC-GN
 
 /* Merlin products */
@@ -1995,7 +2018,9 @@ product MGE UPS2		0xffff	MGE UPS SYSTEMS
 product MSI BT_DONGLE		0x1967	Bluetooth USB dongle
 product MSI RT3070_1		0x3820	RT3070
 product MSI RT3070_2		0x3821	RT3070
+product MSI RT3070_8		0x3822	RT3070
 product MSI RT3070_3		0x3870	RT3070
+product MSI RT3070_9		0x3871	RT3070
 product MSI UB11B		0x6823	UB11B
 product MSI RT2570		0x6861	RT2570
 product MSI RT2570_2		0x6865	RT2570
@@ -2004,7 +2029,9 @@ product MSI RT2573_1		0x6874	RT2573
 product MSI RT2573_2		0x6877	RT2573
 product MSI RT3070_4		0x6899	RT3070
 product MSI RT3070_5		0x821a	RT3070
+product MSI RT3070_10		0x822a	RT3070
 product MSI RT3070_6		0x870a	RT3070
+product MSI RT3070_11		0x871a	RT3070
 product MSI RT3070_7		0x899a	RT3070
 product MSI RT2573_3		0xa861	RT2573
 product MSI RT2573_4		0xa874	RT2573
@@ -2085,6 +2112,8 @@ product MOTOROLA2 A41XV32X	0x2a22	A41x/V
 product MOTOROLA2 E398		0x4810	E398 Mobile Phone
 product MOTOROLA2 USBLAN	0x600c	USBLAN
 product MOTOROLA2 USBLAN2	0x6027	USBLAN
+product MOTOROLA4 RT2770	0x9031	RT2770
+product MOTOROLA4 RT3070	0x9032	RT3070
 
 /* MultiTech products */
 product MULTITECH ATLAS		0xf101	MT5634ZBA-USB modem
@@ -2255,6 +2284,9 @@ product OPTION MODHSXPA		0xd013	Globetro
 product OPTION ICON321		0xd031	Globetrotter HSUPA
 product OPTION ICON505		0xd055	Globetrotter iCON 505
 
+/* OvisLink product */
+product OVISLINK RT3072		0x3072	RT3072
+
 /* OQO */
 product OQO WIFI01		0x0002	model 01 WiFi interface
 product OQO BT01		0x0003	model 01 Bluetooth interface
@@ -2289,6 +2321,7 @@ product PARA RT3070		0x8888	RT3070
 product PEGATRON RT2870		0x0002	RT2870
 product PEGATRON RT3070		0x000c	RT3070
 product PEGATRON RT3070_2	0x000e	RT3070
+product PEGATRON RT3070_3	0x0010	RT3070
 
 /* Peracom products */
 product PERACOM SERIAL1		0x0001	Serial
@@ -2508,7 +2541,9 @@ product RALINK RT2870		0x2870	RT2870
 product RALINK RT3070		0x3070	RT3070
 product RALINK RT3071		0x3071	RT3071
 product RALINK RT3072		0x3072	RT3072
+product RALINK RT3370		0x3370	RT3370
 product RALINK RT3572		0x3572	RT3572
+product RALINK RT8070		0x8070	RT8070
 product RALINK RT2570_3		0x9020	RT2500USB Wireless Adapter
 product RALINK RT2573_2		0x9021	RT2501USB Wireless Adapter
 
@@ -2745,6 +2780,7 @@ product SITECOMEU RT3070_3	0x003c	RT3070
 product SITECOMEU RT3070_4	0x003d	RT3070
 product SITECOMEU RT3070	0x003e	RT3070
 product SITECOMEU WL608		0x003f	WL-608
+product SITECOMEU RT3071	0x0040	RT3071
 product SITECOMEU RT3072_1	0x0041	RT3072
 product SITECOMEU RT3072_2	0x0042	RT3072
 product SITECOMEU RT3072_3	0x0047	RT3072
@@ -2881,6 +2917,7 @@ product SURECOM RT2573		0x31f3	RT2573
 
 /* Sweex products */
 product SWEEX ZD1211		0x1809	ZD1211
+product SWEEX2 LW153		0x0153	LW153
 product SWEEX2 LW303		0x0302	LW303
 product SWEEX2 LW313		0x0313	LW313
 
@@ -2936,6 +2973,7 @@ product TOPRE HHKB		0x0100	HHKB Professi
 
 /* Toshiba Corporation products */
 product TOSHIBA POCKETPC_E740	0x0706	PocketPC e740
+product TOSHIBA RT3070		0x0a07	RT3070
 product TOSHIBA G450		0x0d45	G450 modem
 product TOSHIBA HSDPA		0x1302	G450 modem
 
@@ -3116,3 +3154,4 @@ product ZYXEL M202		0x340a	M-202
 product ZYXEL G220V2		0x340f	G-220 v2
 product ZYXEL G202		0x3410	G-202
 product ZYXEL RT2870_1		0x3416	RT2870
+product ZYXEL RT2870_2		0x341a	RT2870

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Thu Mar 11 22:01:48 2010	(r205041)
+++ head/sys/dev/usb/wlan/if_run.c	Thu Mar 11 22:05:12 2010	(r205042)
@@ -1,8 +1,9 @@
 /*	$FreeBSD$	*/
 
 /*-
- * Copyright (c) 2008,2009 Damien Bergamini 
- *	ported to FreeBSD by Akinori Furukoshi 
+ * Copyright (c) 2008,2010 Damien Bergamini 
+ * ported to FreeBSD by Akinori Furukoshi 
+ * USB Consulting, Hans Petter Selasky 
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -17,8 +18,6 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* release date Jan. 09, 2010 */
-
 #include 
 __FBSDID("$FreeBSD$");
 
@@ -107,11 +106,20 @@ static const struct usb_device_id run_de
     { 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) },
@@ -122,6 +130,8 @@ static const struct usb_device_id run_de
     { 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) },
@@ -133,6 +143,8 @@ static const struct usb_device_id run_de
     { 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) },
@@ -141,6 +153,8 @@ static const struct usb_device_id run_de
     { 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) },
@@ -157,7 +171,9 @@ static const struct usb_device_id run_de
     { 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) },
@@ -178,6 +194,7 @@ static const struct usb_device_id run_de
     { 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) },
@@ -185,9 +202,13 @@ static const struct usb_device_id run_de
     { 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) },
@@ -195,10 +216,16 @@ static const struct usb_device_id run_de
     { 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) },
@@ -212,7 +239,9 @@ static const struct usb_device_id run_de
     { 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) },
@@ -234,6 +263,7 @@ static const struct usb_device_id run_de
     { 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) },
@@ -243,8 +273,10 @@ static const struct usb_device_id run_de
     { 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) },
@@ -254,6 +286,7 @@ static const struct usb_device_id run_de
     { 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) },
 };
 
 MODULE_DEPEND(run, wlan, 1, 1, 1);
@@ -340,10 +373,12 @@ static int	run_raw_xmit(struct ieee80211
 		    const struct ieee80211_bpf_params *);
 static void	run_start(struct ifnet *);
 static int	run_ioctl(struct ifnet *, u_long, caddr_t);
+static void	run_set_agc(struct run_softc *, uint8_t);
 static void	run_select_chan_group(struct run_softc *, int);
 static void	run_set_rx_antenna(struct run_softc *, int);
 static void	run_rt2870_set_chan(struct run_softc *, u_int);
 static void	run_rt3070_set_chan(struct run_softc *, u_int);
+static void	run_rt3572_set_chan(struct run_softc *, u_int);
 static int	run_set_chan(struct run_softc *, struct ieee80211_channel *);
 static void	run_set_channel(struct ieee80211com *);
 static void	run_scan_start(struct ieee80211com *);
@@ -369,6 +404,7 @@ static int	run_bbp_init(struct run_softc
 static int	run_rt3070_rf_init(struct run_softc *);
 static int	run_rt3070_filter_calib(struct run_softc *, uint8_t, uint8_t,
 		    uint8_t *);
+static void	run_rt3070_rf_setup(struct run_softc *);
 static int	run_txrx_enable(struct run_softc *);
 static void	run_init(void *);
 static void	run_init_locked(struct run_softc *);
@@ -398,8 +434,8 @@ static const struct rfprog {
 
 struct {
 	uint8_t	n, r, k;
-} run_rf3020_freqs[] = {
-	RT3070_RF3020
+} rt3070_freqs[] = {
+	RT3070_RF3052
 };
 
 static const struct {
@@ -407,6 +443,8 @@ static const struct {
 	uint8_t	val;
 } rt3070_def_rf[] = {
 	RT3070_DEF_RF
+},rt3572_def_rf[] = {
+	RT3572_DEF_RF
 };
 
 static const struct usb_config run_config[RUN_N_XFER] = {
@@ -502,6 +540,7 @@ run_attach(device_t self)
 	struct usb_attach_arg *uaa = device_get_ivars(self);
 	struct ieee80211com *ic;
 	struct ifnet *ifp;
+	uint32_t ver;
 	int i, ntries, error;
 	uint8_t iface_index, bands;
 
@@ -513,11 +552,10 @@ run_attach(device_t self)
 	    MTX_NETWORK_LOCK, MTX_DEF);
 
 	iface_index = RT2860_IFACE_INDEX;
-	/* Rx transfer has own lock */
 	error = usbd_transfer_setup(uaa->device, &iface_index,
 	    sc->sc_xfer, run_config, RUN_N_XFER, sc, &sc->sc_mtx);
 	if (error) {
-		device_printf(self, "could not allocate USB Tx transfers, "
+		device_printf(self, "could not allocate USB transfers, "
 		    "err=%s\n", usbd_errstr(error));
 		goto detach;
 	}
@@ -526,11 +564,11 @@ 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, &sc->mac_rev) != 0){
+		if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){
 			RUN_UNLOCK(sc);
 			goto detach;
 		}
-		if (sc->mac_rev != 0 && sc->mac_rev != 0xffffffff)
+		if (ver != 0 && ver != 0xffffffff)
 			break;
 		run_delay(sc, 10);
 	}
@@ -540,13 +578,15 @@ run_attach(device_t self)
 		RUN_UNLOCK(sc);
 		goto detach;
 	}
+	sc->mac_ver = ver >> 16;
+	sc->mac_rev = ver & 0xffff;
 
 	/* retrieve RF rev. no and various other things from EEPROM */
 	run_read_eeprom(sc);
 
 	device_printf(sc->sc_dev,
 	    "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n",
-	    sc->mac_rev >> 16, sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev),
+	    sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev),
 	    sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid));
 
 	if ((error = run_load_microcode(sc)) != 0) {
@@ -609,7 +649,9 @@ run_attach(device_t self)
 	 * Do this by own because h/w supports
 	 * more channels than ieee80211_init_channels()
 	 */
-	if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) {
+	if (sc->rf_rev == RT2860_RF_2750 ||
+	    sc->rf_rev == RT2860_RF_2850 ||
+	    sc->rf_rev == RT3070_RF_3052) {
 		/* set supported .11a rates */
 		for (i = 14; i < nitems(rt2860_rf2850); i++) {
 			uint8_t chan = rt2860_rf2850[i].chan;
@@ -743,11 +785,15 @@ run_vap_delete(struct ieee80211vap *vap)
 
 	sc = ifp->if_softc;
 
-	if (ifp && ifp->if_flags & IFF_UP){
-		RUN_LOCK(sc);
-		run_stop(sc);
-		RUN_UNLOCK(sc);
-	}
+	RUN_LOCK(sc);
+	sc->sc_rvp->amrr_run = RUN_AMRR_OFF;
+	RUN_UNLOCK(sc);
+
+	/* drain them all */
+	usb_callout_drain(&sc->sc_rvp->amrr_ch);
+	ieee80211_draintask(ic, &sc->sc_rvp->amrr_task);
+	ieee80211_draintask(ic, &sc->wme_task);
+	ieee80211_draintask(ic, &sc->usb_timeout_task);
 
 	ieee80211_amrr_cleanup(&rvp->amrr);
 	ieee80211_vap_detach(vap);
@@ -808,7 +854,9 @@ run_load_microcode(struct run_softc *sc)
 	const uint64_t *temp;
 	uint64_t bytes;
 
+	RUN_UNLOCK(sc);
 	fw = firmware_get("runfw");
+	RUN_LOCK(sc);
 	if(fw == NULL){
 		device_printf(sc->sc_dev,
 		    "failed loadfirmware of file %s\n", "runfw");
@@ -829,14 +877,11 @@ run_load_microcode(struct run_softc *sc)
 	 * last half is for rt3071.
 	 */
 	base = fw->data;
-	if ((sc->mac_rev >> 16) != 0x2860 &&
-	    (sc->mac_rev >> 16) != 0x2872 &&
-	    (sc->mac_rev >> 16) != 0x3070 &&
-	    (sc->mac_rev >> 16) != 0x3572){
+	if ((sc->mac_ver) != 0x2860 &&
+	    (sc->mac_ver) != 0x2872 &&
+	    (sc->mac_ver) != 0x3070){ 
 		base += 4096;
-		device_printf(sc->sc_dev, "loading RT3071 firmware\n");
-	} else
-		device_printf(sc->sc_dev, "loading RT2870 firmware\n");
+	}
 
 	/* cheap sanity check */
 	temp = fw->data;
@@ -866,7 +911,7 @@ run_load_microcode(struct run_softc *sc)
 	run_delay(sc, 10);
 
 	run_write(sc, RT2860_H2M_MAILBOX, 0);
-	if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_BOOT, 0)) != 0)
+	if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0)) != 0)
 		goto fail;
 
 	/* wait until microcontroller is ready */
@@ -884,7 +929,8 @@ run_load_microcode(struct run_softc *sc)
 		error = ETIMEDOUT;
 		goto fail;
 	}
-	DPRINTF("microcode successfully loaded after %d tries\n", ntries);
+	device_printf(sc->sc_dev, "firmware %s loaded\n",
+	    (base == fw->data) ? "RT2870" : "RT3071");
 
 fail:
 	firmware_put(fw, FIRMWARE_UNLOAD);
@@ -1283,7 +1329,7 @@ run_read_eeprom(struct run_softc *sc)
 
 	/* check whether the ROM is eFUSE ROM or EEPROM */
 	sc->sc_srom_read = run_eeprom_read_2;
-	if ((sc->mac_rev & 0xfff00000) >= 0x30700000) {
+	if (sc->mac_ver >= 0x3070) {
 		run_read(sc, RT3070_EFUSE_CTRL, &tmp);
 		DPRINTF("EFUSE_CTRL=0x%08x\n", tmp);
 		if (tmp & RT3070_SEL_EFUSE)
@@ -1305,21 +1351,32 @@ run_read_eeprom(struct run_softc *sc)
 	sc->sc_bssid[4] = val & 0xff;
 	sc->sc_bssid[5] = val >> 8;
 
-	/* read default BBP settings */
-	for (i = 0; i < 8; i++) {
+	/* read vender BBP settings */
+	for (i = 0; i < 10; i++) {
 		run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, &val);
 		sc->bbp[i].val = val & 0xff;
 		sc->bbp[i].reg = val >> 8;
 		DPRINTF("BBP%d=0x%02x\n", sc->bbp[i].reg, sc->bbp[i].val);
 	}
+	if (sc->mac_ver >= 0x3071) {
+		/* read vendor RF settings */
+		for (i = 0; i < 10; i++) {
+			run_srom_read(sc, RT3071_EEPROM_RF_BASE + i, &val);
+			sc->rf[i].val = val & 0xff;
+			sc->rf[i].reg = val >> 8;
+			DPRINTF("RF%d=0x%02x\n", sc->rf[i].reg,
+			    sc->rf[i].val);
+		}
+	}
 
 	/* read RF frequency offset from EEPROM */
 	run_srom_read(sc, RT2860_EEPROM_FREQ_LEDS, &val);
 	sc->freq = ((val & 0xff) != 0xff) ? val & 0xff : 0;
 	DPRINTF("EEPROM freq offset %d\n", sc->freq & 0xff);
 
-	if ((sc->leds = val >> 8) != 0xff) {
+	if (val >> 8 != 0xff) {
 		/* read LEDs operating mode */
+		sc->leds = val >> 8;
 		run_srom_read(sc, RT2860_EEPROM_LED1, &sc->led[0]);
 		run_srom_read(sc, RT2860_EEPROM_LED2, &sc->led[1]);
 		run_srom_read(sc, RT2860_EEPROM_LED3, &sc->led[2]);
@@ -1337,7 +1394,12 @@ run_read_eeprom(struct run_softc *sc)
 	run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val);
 	if (val == 0xffff) {
 		DPRINTF("invalid EEPROM antenna info, using default\n");
-		if ((sc->mac_rev >> 16) >= 0x3070) {
+		if (sc->mac_ver == 0x3572) {
+			/* default to RF3052 2T2R */
+			sc->rf_rev = RT3070_RF_3052;
+			sc->ntxchains = 2;
+			sc->nrxchains = 2;
+		} else if (sc->mac_ver >= 0x3070) {
 			/* default to RF3020 1T1R */
 			sc->rf_rev = RT3070_RF_3020;
 			sc->ntxchains = 1;
@@ -1356,13 +1418,18 @@ run_read_eeprom(struct run_softc *sc)
 	DPRINTF("EEPROM RF rev=0x%02x chains=%dT%dR\n",
 	    sc->rf_rev, sc->ntxchains, sc->nrxchains);
 
-	/* check if RF supports automatic Tx access gain control */
 	run_srom_read(sc, RT2860_EEPROM_CONFIG, &val);
 	DPRINTF("EEPROM CFG 0x%04x\n", val);
+	/* check if driver should patch the DAC issue */
+	if ((val >> 8) != 0xff)
+		sc->patch_dac = (val >> 15) & 1;
 	if ((val & 0xff) != 0xff) {
 		sc->ext_5ghz_lna = (val >> 3) & 1;
 		sc->ext_2ghz_lna = (val >> 2) & 1;
+		/* check if RF supports automatic Tx access gain control */
 		sc->calib_2ghz = sc->calib_5ghz = (val >> 1) & 1;
+		/* check if we have a hardware radio switch */
+		sc->rfswitch = val & 1;
 	}
 
 	/* read power settings for 2GHz channels */
@@ -1385,7 +1452,7 @@ run_read_eeprom(struct run_softc *sc)
 		    rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]);
 	}
 	/* read power settings for 5GHz channels */
-	for (i = 0; i < 36; i += 2) {
+	for (i = 0; i < 40; i += 2) {
 		run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val);
 		sc->txpow1[i + 14] = (int8_t)(val & 0xff);
 		sc->txpow1[i + 15] = (int8_t)(val >> 8);
@@ -1395,7 +1462,7 @@ run_read_eeprom(struct run_softc *sc)
 		sc->txpow2[i + 15] = (int8_t)(val >> 8);
 	}
 	/* fix broken Tx power entries */
-	for (i = 0; i < 36; i++) {
+	for (i = 0; i < 40; i++) {
 		if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15)
 			sc->txpow1[14 + i] = 5;
 		if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15)
@@ -1444,14 +1511,32 @@ run_read_eeprom(struct run_softc *sc)
 	sc->rssi_2ghz[0] = val & 0xff;	/* Ant A */
 	sc->rssi_2ghz[1] = val >> 8;	/* Ant B */
 	run_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ, &val);
-	sc->rssi_2ghz[2] = val & 0xff;	/* Ant C */
+	if (sc->mac_ver >= 0x3070) {
+		/*
+		 * On RT3070 chips (limited to 2 Rx chains), this ROM
+		 * field contains the Tx mixer gain for the 2GHz band.
+		 */
+		if ((val & 0xff) != 0xff)
+			sc->txmixgain_2ghz = val & 0x7;
+		DPRINTF("tx mixer gain=%u (2GHz)\n", sc->txmixgain_2ghz);
+	} else
+		sc->rssi_2ghz[2] = val & 0xff;	/* Ant C */
 	sc->lna[2] = val >> 8;		/* channel group 2 */
 
 	run_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ, &val);
 	sc->rssi_5ghz[0] = val & 0xff;	/* Ant A */
 	sc->rssi_5ghz[1] = val >> 8;	/* Ant B */
 	run_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ, &val);
-	sc->rssi_5ghz[2] = val & 0xff;	/* Ant C */
+	if (sc->mac_ver == 0x3572) {
+		/*
+		 * On RT3572 chips (limited to 2 Rx chains), this ROM
+		 * field contains the Tx mixer gain for the 5GHz band.
+		 */
+		if ((val & 0xff) != 0xff)
+			sc->txmixgain_5ghz = val & 0x7;
+		DPRINTF("tx mixer gain=%u (5GHz)\n", sc->txmixgain_5ghz);
+	} else
+		sc->rssi_5ghz[2] = val & 0xff;	/* Ant C */
 	sc->lna[3] = val >> 8;		/* channel group 3 */
 
 	run_srom_read(sc, RT2860_EEPROM_LNA, &val);
@@ -2639,7 +2724,7 @@ run_tx(struct run_softc *sc, struct mbuf
 			dur = rt2860_rates[ridx].sp_ack_dur;
 		else
 			dur = rt2860_rates[ridx].lp_ack_dur;
-		*(uint16_t *)wh->i_dur = htole16(dur + sc->sifs);
+		*(uint16_t *)wh->i_dur = htole16(dur);
 	}
 
 	/* reserve slots for mgmt packets, just in case */
@@ -3006,9 +3091,26 @@ run_ioctl(struct ifnet *ifp, u_long cmd,
 }
 
 static void
+run_set_agc(struct run_softc *sc, uint8_t agc)
+{
+	uint8_t bbp;
+
+	if (sc->mac_ver == 0x3572) {
+		run_bbp_read(sc, 27, &bbp);
+		bbp &= ~(0x3 << 5);
+		run_bbp_write(sc, 27, bbp | 0 << 5);	/* select Rx0 */
+		run_bbp_write(sc, 66, agc);
+		run_bbp_write(sc, 27, bbp | 1 << 5);	/* select Rx1 */
+		run_bbp_write(sc, 66, agc);
+	} else
+		run_bbp_write(sc, 66, agc);
+}
+
+static void
 run_select_chan_group(struct run_softc *sc, int group)
 {
 	uint32_t tmp;
+	uint8_t agc;
 
 	run_bbp_write(sc, 62, 0x37 - sc->lna[group]);
 	run_bbp_write(sc, 63, 0x37 - sc->lna[group]);
@@ -3024,13 +3126,14 @@ run_select_chan_group(struct run_softc *
 			run_bbp_write(sc, 75, 0x50);
 		}
 	} else {
-		if (sc->ext_5ghz_lna) {
+		if (sc->mac_ver == 0x3572)
+			run_bbp_write(sc, 82, 0x94);
+		else
 			run_bbp_write(sc, 82, 0xf2);
+		if (sc->ext_5ghz_lna)
 			run_bbp_write(sc, 75, 0x46);
-		} else {
-			run_bbp_write(sc, 82, 0xf2);
+		else 
 			run_bbp_write(sc, 75, 0x50);
-		}
 	}
 
 	run_read(sc, RT2860_TX_BAND_CFG, &tmp);
@@ -3053,13 +3156,26 @@ run_select_chan_group(struct run_softc *
 		if (sc->nrxchains > 1)
 			tmp |= RT2860_LNA_PE_A1_EN;
 	}
-	run_write(sc, RT2860_TX_PIN_CFG, tmp);
+	if (sc->mac_ver == 0x3572) {
+		run_rt3070_rf_write(sc, 8, 0x00);
+		run_write(sc, RT2860_TX_PIN_CFG, tmp);
+		run_rt3070_rf_write(sc, 8, 0x80);
+	} else
+		run_write(sc, RT2860_TX_PIN_CFG, tmp);
 
 	/* set initial AGC value */
-	if (group == 0)
-		run_bbp_write(sc, 66, 0x2e + sc->lna[0]);
-	else
-		run_bbp_write(sc, 66, 0x32 + (sc->lna[group] * 5) / 3);
+	if (group == 0) {	/* 2GHz band */
+		if (sc->mac_ver >= 0x3070)
+			agc = 0x1c + sc->lna[0] * 2;
+		else
+			agc = 0x2e + sc->lna[0];
+	} else {		/* 5GHz band */
+		if (sc->mac_ver == 0x3572)
+			agc = 0x22 + (sc->lna[group] * 5) / 3;
+		else
+			agc = 0x32 + (sc->lna[group] * 5) / 3;
+	}
+	run_set_agc(sc, agc);
 }
 
 static void
@@ -3122,18 +3238,22 @@ run_rt3070_set_chan(struct run_softc *sc
 {
 	int8_t txpow1, txpow2;
 	uint8_t rf;
+	int i;
 
 	/* RT3070 is 2GHz only */
 	KASSERT(chan >= 1 && chan <= 14, ("wrong channel selected\n"));
 
+	/* find the settings for this channel (we know it exists) */
+	for (i = 0; rt2860_rf2850[i].chan != chan; i++);
+
 	/* use Tx power values from EEPROM */
-	txpow1 = sc->txpow1[chan - 1];
-	txpow2 = sc->txpow2[chan - 1];
+	txpow1 = sc->txpow1[i];
+	txpow2 = sc->txpow2[i];
 
-	run_rt3070_rf_write(sc, 2, run_rf3020_freqs[chan - 1].n);
-	run_rt3070_rf_write(sc, 3, run_rf3020_freqs[chan - 1].k);
+	run_rt3070_rf_write(sc, 2, rt3070_freqs[i].n);
+	run_rt3070_rf_write(sc, 3, rt3070_freqs[i].k);
 	run_rt3070_rf_read(sc, 6, &rf);
-	rf = (rf & ~0x03) | run_rf3020_freqs[chan - 1].r;
+	rf = (rf & ~0x03) | rt3070_freqs[i].r;
 	run_rt3070_rf_write(sc, 6, rf);
 
 	/* set Tx0 power */
@@ -3164,12 +3284,166 @@ run_rt3070_set_chan(struct run_softc *sc
 	run_rt3070_rf_write(sc, 23, rf);
 
 	/* program RF filter */
-	run_rt3070_rf_write(sc, 24, sc->rf24_20mhz);
-	run_rt3070_rf_write(sc, 31, sc->rf24_20mhz);
+	run_rt3070_rf_read(sc, 24, &rf);	/* Tx */
+	rf = (rf & ~0x3f) | sc->rf24_20mhz;
+	run_rt3070_rf_write(sc, 24, rf);
+	run_rt3070_rf_read(sc, 31, &rf);	/* Rx */
+	rf = (rf & ~0x3f) | sc->rf24_20mhz;
+	run_rt3070_rf_write(sc, 31, rf);
+
+	/* enable RF tuning */
+	run_rt3070_rf_read(sc, 7, &rf);
+	run_rt3070_rf_write(sc, 7, rf | 0x01);
+}
+
+static void
+run_rt3572_set_chan(struct run_softc *sc, u_int chan)
+{
+	int8_t txpow1, txpow2;
+	uint32_t tmp;
+	uint8_t rf;
+	int i;
+
+	/* find the settings for this channel (we know it exists) */
+	for (i = 0; rt2860_rf2850[i].chan != chan; i++);
+
+	/* use Tx power values from EEPROM */
+	txpow1 = sc->txpow1[i];
+	txpow2 = sc->txpow2[i];
+
+	if (chan <= 14) {
+		run_bbp_write(sc, 25, sc->bbp25);
+		run_bbp_write(sc, 26, sc->bbp26);
+	} else {
+		/* enable IQ phase correction */
+		run_bbp_write(sc, 25, 0x09);
+		run_bbp_write(sc, 26, 0xff);
+	}
+
+	run_rt3070_rf_write(sc, 2, rt3070_freqs[i].n);
+	run_rt3070_rf_write(sc, 3, rt3070_freqs[i].k);
+	run_rt3070_rf_read(sc, 6, &rf);
+	rf  = (rf & ~0x0f) | rt3070_freqs[i].r;
+	rf |= (chan <= 14) ? 0x08 : 0x04;
+	run_rt3070_rf_write(sc, 6, rf);
+
+	/* set PLL mode */
+	run_rt3070_rf_read(sc, 5, &rf);
+	rf &= ~(0x08 | 0x04);
+	rf |= (chan <= 14) ? 0x04 : 0x08;
+	run_rt3070_rf_write(sc, 5, rf);
+
+	/* set Tx power for chain 0 */
+	if (chan <= 14)
+		rf = 0x60 | txpow1;
+	else
+		rf = 0xe0 | (txpow1 & 0xc) << 1 | (txpow1 & 0x3);
+	run_rt3070_rf_write(sc, 12, rf);
+
+	/* set Tx power for chain 1 */
+	if (chan <= 14)
+		rf = 0x60 | txpow2;
+	else
+		rf = 0xe0 | (txpow2 & 0xc) << 1 | (txpow2 & 0x3);
+	run_rt3070_rf_write(sc, 13, rf);
+
+	/* set Tx/Rx streams */
+	run_rt3070_rf_read(sc, 1, &rf);
+	rf &= ~0xfc;
+	if (sc->ntxchains == 1)
+		rf |= 1 << 7 | 1 << 5;  /* 1T: disable Tx chains 2 & 3 */
+	else if (sc->ntxchains == 2)
+		rf |= 1 << 7;           /* 2T: disable Tx chain 3 */
+	if (sc->nrxchains == 1)
+		rf |= 1 << 6 | 1 << 4;  /* 1R: disable Rx chains 2 & 3 */
+	else if (sc->nrxchains == 2)
+		rf |= 1 << 6;           /* 2R: disable Rx chain 3 */
+	run_rt3070_rf_write(sc, 1, rf);
+
+	/* set RF offset */
+	run_rt3070_rf_read(sc, 23, &rf);
+	rf = (rf & ~0x7f) | sc->freq;
+	run_rt3070_rf_write(sc, 23, rf);
+
+	/* program RF filter */
+	rf = sc->rf24_20mhz;
+	run_rt3070_rf_write(sc, 24, rf);	/* Tx */
+	run_rt3070_rf_write(sc, 31, rf);	/* Rx */
+
+	/* enable RF tuning */
+	run_rt3070_rf_read(sc, 7, &rf);
+	rf = (chan <= 14) ? 0xd8 : ((rf & ~0xc8) | 0x14);
+	run_rt3070_rf_write(sc, 7, rf);
+
+	/* TSSI */
+	rf = (chan <= 14) ? 0xc3 : 0xc0;
+	run_rt3070_rf_write(sc, 9, rf);
+
+	/* set loop filter 1 */
+	run_rt3070_rf_write(sc, 10, 0xf1);
+	/* set loop filter 2 */
+	run_rt3070_rf_write(sc, 11, (chan <= 14) ? 0xb9 : 0x00);
+
+	/* set tx_mx2_ic */
+	run_rt3070_rf_write(sc, 15, (chan <= 14) ? 0x53 : 0x43);
+	/* set tx_mx1_ic */
+	if (chan <= 14)
+		rf = 0x48 | sc->txmixgain_2ghz;
+	else
+		rf = 0x78 | sc->txmixgain_5ghz;
+	run_rt3070_rf_write(sc, 16, rf);
+
+	/* set tx_lo1 */
+	run_rt3070_rf_write(sc, 17, 0x23);
+	/* set tx_lo2 */
+	if (chan <= 14)
+		rf = 0x93;
+	else if (chan <= 64)
+		rf = 0xb7;
+	else if (chan <= 128)
+		rf = 0x74;
+	else
+		rf = 0x72;
+	run_rt3070_rf_write(sc, 19, rf);
+
+	/* set rx_lo1 */
+	if (chan <= 14)
+		rf = 0xb3;
+	else if (chan <= 64)
+		rf = 0xf6;
+	else if (chan <= 128)
+		rf = 0xf4;
+	else
+		rf = 0xf3;
+	run_rt3070_rf_write(sc, 20, rf);
+
+	/* set pfd_delay */
+	if (chan <= 14)
+		rf = 0x15;
+	else if (chan <= 64)
+		rf = 0x3d;
+	else
+		rf = 0x01;
+	run_rt3070_rf_write(sc, 25, rf);
+
+	/* set rx_lo2 */
+	run_rt3070_rf_write(sc, 26, (chan <= 14) ? 0x85 : 0x87);
+	/* set ldo_rf_vc */
+	run_rt3070_rf_write(sc, 27, (chan <= 14) ? 0x00 : 0x01);
+	/* set drv_cc */
+	run_rt3070_rf_write(sc, 29, (chan <= 14) ? 0x9b : 0x9f);
+
+	run_read(sc, RT2860_GPIO_CTRL, &tmp);
+	tmp &= ~0x8080;
+	if (chan <= 14)
+		tmp |= 0x80;
+	run_write(sc, RT2860_GPIO_CTRL, tmp);
 
 	/* enable RF tuning */
 	run_rt3070_rf_read(sc, 7, &rf);
 	run_rt3070_rf_write(sc, 7, rf | 0x01);
+
+	run_delay(sc, 2);
 }
 
 static void
@@ -3178,13 +3452,11 @@ run_set_rx_antenna(struct run_softc *sc,
 	uint32_t tmp;
 
 	if (aux) {
-		run_read(sc, RT2860_PCI_EECTRL, &tmp);
-		run_write(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C);
+		run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 0);
 		run_read(sc, RT2860_GPIO_CTRL, &tmp);
 		run_write(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08);
 	} else {
-		run_read(sc, RT2860_PCI_EECTRL, &tmp);
-		run_write(sc, RT2860_PCI_EECTRL, tmp | RT2860_C);
+		run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 1);
 		run_read(sc, RT2860_GPIO_CTRL, &tmp);
 		run_write(sc, RT2860_GPIO_CTRL, tmp & ~0x0808);
 	}
@@ -3200,14 +3472,13 @@ run_set_chan(struct run_softc *sc, struc
 	if (chan == 0 || chan == IEEE80211_CHAN_ANY)
 		return EINVAL;
 
-	if ((sc->mac_rev >> 16) >= 0x3070)
+	if (sc->mac_ver == 0x3572)
+		run_rt3572_set_chan(sc, chan);
+	else if (sc->mac_ver >= 0x3070)
 		run_rt3070_set_chan(sc, chan);
 	else
 		run_rt2870_set_chan(sc, chan);
 
-	/* 802.11a uses a 16 microseconds short interframe space */
-	sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10;
-
 	/* determine channel group */
 	if (chan <= 14)
 		group = 0;
@@ -3373,7 +3644,7 @@ run_usb_timeout_cb(void *arg, int pendin
 	struct run_softc *sc = arg;
 	struct ieee80211vap *vap = &sc->sc_rvp->vap;
 
-	RUN_LOCK_ASSERT(sc, MA_OWNED);
+	RUN_LOCK(sc);
 
 	if(vap->iv_state == IEEE80211_S_RUN &&
 	    vap->iv_opmode != IEEE80211_M_STA)
@@ -3384,6 +3655,8 @@ run_usb_timeout_cb(void *arg, int pendin
 		ieee80211_cancel_scan(vap);
 	} else
 		DPRINTF("timeout by unknown cause\n");
+
+	RUN_UNLOCK(sc);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:09:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC76C106566C;
	Thu, 11 Mar 2010 22:09:21 +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 ACA678FC16;
	Thu, 11 Mar 2010 22:09:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BM9L3P083667;
	Thu, 11 Mar 2010 22:09:21 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BM9LGu083665;
	Thu, 11 Mar 2010 22:09:21 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201003112209.o2BM9LGu083665@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 11 Mar 2010 22:09:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205043 - head/sys/dev/usb
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:09:21 -0000

Author: thompsa
Date: Thu Mar 11 22:09:21 2010
New Revision: 205043
URL: http://svn.freebsd.org/changeset/base/205043

Log:
  Add device ID for the NATURAL4000 keyboard

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Thu Mar 11 22:05:12 2010	(r205042)
+++ head/sys/dev/usb/usbdevs	Thu Mar 11 22:09:21 2010	(r205043)
@@ -2055,6 +2055,7 @@ product MICROSOFT WLNOTEBOOK2	0x00e1	Wir
 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
 
 /* Microtech products */
 product MICROTECH SCSIDB25	0x0004	USB-SCSI-DB25

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:22:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C393D106564A;
	Thu, 11 Mar 2010 22:22:06 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B28EC8FC16;
	Thu, 11 Mar 2010 22:22: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 o2BMM669096591;
	Thu, 11 Mar 2010 22:22:06 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BMM6HM096588;
	Thu, 11 Mar 2010 22:22:06 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003112222.o2BMM6HM096588@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 11 Mar 2010 22:22: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: r205047 - head/sys/mips/cavium/dev/rgmii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:22:06 -0000

Author: jmallett
Date: Thu Mar 11 22:22:06 2010
New Revision: 205047
URL: http://svn.freebsd.org/changeset/base/205047

Log:
  o) Eliminate use of sc->typestr, which is always NULL.
  o) Inline octeon_rgmx_mark_ready into octeon_rgmx_init.
  o) Add a media status handler that reports link and media status.
  o) Set link state when if_init is called.
  o) Remove some printfs related to driver state changes.
  o) Remove some gratuitous comments.
  
  Reviewed by:	imp
  Sponsored by:	Packet Forensics

Modified:
  head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c

Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Thu Mar 11 22:14:07 2010	(r205046)
+++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Thu Mar 11 22:22:06 2010	(r205047)
@@ -136,7 +136,6 @@ struct rgmx_softc_dev {
 	u_int			idx;
         u_char                  ieee[6];
 
-        char const * typestr;   /* printable name of the interface.  */
         u_short txb_size;       /* size of TX buffer, in bytes  */
 
         /* Transmission buffer management.  */
@@ -182,7 +181,6 @@ static u_int get_rgmx_port_ordinal(u_int
 static void octeon_rgmx_set_mac(u_int port);
 static void octeon_rgmx_init_sc(struct rgmx_softc_dev *sc, device_t dev, u_int port, u_int num_devices);
 static int octeon_rgmx_init_ifnet(struct rgmx_softc_dev *sc);
-static void octeon_rgmx_mark_ready(struct rgmx_softc_dev *sc);
 static void octeon_rgmx_stop(struct rgmx_softc_dev *sc);
 static void octeon_rgmx_config_speed(u_int port, u_int);
 #ifdef DEBUG_RGMX_DUMP
@@ -349,8 +347,6 @@ static int octeon_rgmx_init_ifnet (struc
         ifmedia_set(&sc->media, bit2media[0]);
 
         ether_ifattach(sc->ifp, sc->ieee);
-        /* Print additional info when attached.  */
-        device_printf(sc->sc_dev, "type %s, full duplex\n", sc->typestr);
 
         return (0);
 }
@@ -447,12 +443,6 @@ static int rgmii_attach (device_t dev)
                             	device_printf(dev, "  ifinit failed for rgmx port %u\n", port);
                                 return (ENOSPC);
                         }
-/*
- * Don't call octeon_rgmx_mark_ready()
- * ifnet will call it indirectly via  octeon_rgmx_init()
- *
- *                         octeon_rgmx_mark_ready(sc);
- */
                         num_devices++;
                 }
 	}
@@ -1648,9 +1638,47 @@ static int octeon_rgmx_medchange (struct
 
 static void octeon_rgmx_medstat (struct ifnet *ifp, struct ifmediareq *ifm)
 {
-    /*
-     * No support for Media Status callback
-     */
+    	struct rgmx_softc_dev *sc = ifp->if_softc;
+	octeon_rgmx_rxx_rx_inbnd_t link_status;
+
+	octeon_rgmx_config_speed(sc->port, 1);
+
+	RGMX_LOCK(sc);
+
+	ifm->ifm_status = IFM_AVALID;
+	ifm->ifm_active = IFM_ETHER;
+
+	/*
+	 * Parse link status.
+	 */
+	link_status.word64 = sc->link_status;
+
+	if (!link_status.bits.status) {
+		RGMX_UNLOCK(sc);
+		return;
+	}
+
+	ifm->ifm_status |= IFM_ACTIVE;
+
+	switch (link_status.bits.speed) {
+	case 0:
+		ifm->ifm_active |= IFM_10_T;
+		break;
+	case 1:
+		ifm->ifm_active |= IFM_100_TX;
+		break;
+	case 2:
+		ifm->ifm_active |= IFM_1000_T;;
+		break;
+	default:
+		/* Unknown!  */
+		break;
+	}
+
+	/* Always full duplex.  */
+	ifm->ifm_active |= IFM_FDX;
+
+	RGMX_UNLOCK(sc);
 }
 
 static int octeon_rgmx_ioctl (struct ifnet * ifp, u_long command, caddr_t data)
@@ -1678,10 +1706,7 @@ static int octeon_rgmx_ioctl (struct ifn
                          * Restart or Start now, if driver is not running currently.
                          */
                         if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-                            printf(" SIOCSTIFFLAGS  UP/Not-running\n"); break;
                             octeon_rgmx_init(sc);
-                        } else {
-                            printf(" SIOCSTIFFLAGS  UP/Running\n"); break;
                         }
                     } else {
                         /*
@@ -1689,10 +1714,7 @@ static int octeon_rgmx_ioctl (struct ifn
                          * Stop & shut it down now, if driver is running currently.
                          */
                         if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
-                            printf(" SIOCSTIFFLAGS  Down/Running\n"); break;
                             octeon_rgmx_stop(sc);
-                        } else {
-                            printf(" SIOCSTIFFLAGS  Down/Not-Running\n"); break;
                         }
                     }
                     break;
@@ -1734,17 +1756,10 @@ static int octeon_rgmx_ioctl (struct ifn
         return (error);
 }
 
-
-
-
-/*
- * octeon_rgmx_mark_ready
- *
- * Initialize the rgmx driver for this instance
- * Initialize device.
- */
-static void octeon_rgmx_mark_ready (struct rgmx_softc_dev *sc)
+static void  octeon_rgmx_init (void *xsc)
 {
+	struct rgmx_softc_dev *sc = xsc;
+	octeon_rgmx_rxx_rx_inbnd_t link_status;
 
         /* Enable interrupts.  */
     	/* For RGMX they are already enabled earlier */
@@ -1763,21 +1778,21 @@ static void octeon_rgmx_mark_ready (stru
 
         /* Kick start the output */
         /* Hopefully PKO is running and will pick up packets via the timer  or receive loop */
-}
 
+	/* Set link status.  */
+	octeon_rgmx_config_speed(sc->port, 0);
 
-static void  octeon_rgmx_init (void *xsc)
-{
+	RGMX_LOCK(sc);
+	/*
+	 * Parse link status.
+	 */
+	link_status.word64 = sc->link_status;
 
-    /*
-     * Called mostly from ifnet interface  ifp->if_init();
-     * I think we can anchor most of our iniialization here and
-     * not do it in different places  from driver_attach().
-     */
-    /*
-     * For now, we only mark the interface ready
-     */
-    octeon_rgmx_mark_ready((struct rgmx_softc_dev *) xsc);
+	if (link_status.bits.status)
+		if_link_state_change(sc->ifp, LINK_STATE_UP);
+	else
+		if_link_state_change(sc->ifp, LINK_STATE_DOWN);
+	RGMX_UNLOCK(sc);
 }
 
 

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:25:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E15E9106564A;
	Thu, 11 Mar 2010 22:25:53 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D15E98FC15;
	Thu, 11 Mar 2010 22:25: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 o2BMPrV0000511;
	Thu, 11 Mar 2010 22:25:53 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BMPrwf000509;
	Thu, 11 Mar 2010 22:25:53 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003112225.o2BMPrwf000509@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 11 Mar 2010 22:25: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: r205048 - head/sys/mips/cavium
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:25:54 -0000

Author: jmallett
Date: Thu Mar 11 22:25:53 2010
New Revision: 205048
URL: http://svn.freebsd.org/changeset/base/205048

Log:
  Don't force single user on Octeon anymore.

Modified:
  head/sys/mips/cavium/octeon_machdep.c

Modified: head/sys/mips/cavium/octeon_machdep.c
==============================================================================
--- head/sys/mips/cavium/octeon_machdep.c	Thu Mar 11 22:22:06 2010	(r205047)
+++ head/sys/mips/cavium/octeon_machdep.c	Thu Mar 11 22:25:53 2010	(r205048)
@@ -730,8 +730,6 @@ platform_start(__register_t a0, __regist
 {
 	uint64_t platform_counter_freq;
 
-	boothowto |= RB_SINGLE;
-
 	/* Initialize pcpu stuff */
 	mips_pcpu0_init();
 	mips_timer_early_init(OCTEON_CLOCK_DEFAULT);

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:29:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E3E01065672;
	Thu, 11 Mar 2010 22:29:46 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F26468FC15;
	Thu, 11 Mar 2010 22:29: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 o2BMTjxt004362;
	Thu, 11 Mar 2010 22:29:45 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BMTjFn004359;
	Thu, 11 Mar 2010 22:29:45 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003112229.o2BMTjFn004359@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 11 Mar 2010 22:29: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: r205049 - head/sys/mips/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:29:46 -0000

Author: jmallett
Date: Thu Mar 11 22:29:45 2010
New Revision: 205049
URL: http://svn.freebsd.org/changeset/base/205049

Log:
  Add bpf and random to Octeon configurations, since they're needed to run
  dhclient and ssh respectively.
  
  Reviewed by:	imp

Modified:
  head/sys/mips/conf/OCTEON1
  head/sys/mips/conf/OCTEON1-32

Modified: head/sys/mips/conf/OCTEON1
==============================================================================
--- head/sys/mips/conf/OCTEON1	Thu Mar 11 22:25:53 2010	(r205048)
+++ head/sys/mips/conf/OCTEON1	Thu Mar 11 22:29:45 2010	(r205049)
@@ -81,6 +81,8 @@ nodevice	uart_ns8250
 device 		rgmii
 #options 	VERBOSE_SYSINIT
 
+device		bpf
+device		random
 
 #
 # Use the following for  Compact Flash file-system

Modified: head/sys/mips/conf/OCTEON1-32
==============================================================================
--- head/sys/mips/conf/OCTEON1-32	Thu Mar 11 22:25:53 2010	(r205048)
+++ head/sys/mips/conf/OCTEON1-32	Thu Mar 11 22:29:45 2010	(r205049)
@@ -70,6 +70,8 @@ nodevice	uart_ns8250
 device	 	rgmii
 #options 	VERBOSE_SYSINIT
 
+device		bpf
+device		random
 
 #
 # Use the following for  Compact Flash file-system

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 22:42:34 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3831A106564A;
	Thu, 11 Mar 2010 22:42:34 +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 25F478FC17;
	Thu, 11 Mar 2010 22:42: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 o2BMgYCQ016791;
	Thu, 11 Mar 2010 22:42:34 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BMgY9a016787;
	Thu, 11 Mar 2010 22:42:34 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201003112242.o2BMgY9a016787@svn.freebsd.org>
From: Luigi Rizzo 
Date: Thu, 11 Mar 2010 22:42: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: r205050 - in head: sbin/ipfw sys/netinet/ipfw
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 22:42:34 -0000

Author: luigi
Date: Thu Mar 11 22:42:33 2010
New Revision: 205050
URL: http://svn.freebsd.org/changeset/base/205050

Log:
  implement listing of a subset of pipes/queues/schedulers.
  The filtering of the output is done in the kernel instead of userland
  to reduce the amount of data transfered.

Modified:
  head/sbin/ipfw/dummynet.c
  head/sys/netinet/ipfw/ip_dn_private.h
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sbin/ipfw/dummynet.c
==============================================================================
--- head/sbin/ipfw/dummynet.c	Thu Mar 11 22:29:45 2010	(r205049)
+++ head/sbin/ipfw/dummynet.c	Thu Mar 11 22:42:33 2010	(r205050)
@@ -1234,53 +1234,142 @@ dummynet_flush(void)
 	do_cmd(IP_DUMMYNET3, &oid, oid.len);
 }
 
+/* Parse input for 'ipfw [pipe|sched|queue] show [range list]'
+ * Returns the number of ranges, and possibly stores them
+ * in the array v of size len.
+ */
+static int
+parse_range(int ac, char *av[], uint32_t *v, int len)
+{
+	int n = 0;
+	char *endptr, *s;
+	uint32_t base[2];
+
+	if (v == NULL || len < 2) {
+		v = base;
+		len = 2;
+	}
+
+	for (s = *av; s != NULL; av++, ac--) {
+		v[0] = strtoul(s, &endptr, 10);
+		v[1] = (*endptr != '-') ? v[0] :
+			 strtoul(endptr+1, &endptr, 10);
+		if (*endptr == '\0') { /* prepare for next round */
+			s = (ac > 0) ? *(av+1) : NULL;
+		} else {
+			if (*endptr != ',') {
+				warn("invalid number: %s", s);
+				s = ++endptr;
+				continue;
+			}
+			/* continue processing from here */
+			s = ++endptr;
+			ac++;
+			av--;
+		}
+		if (v[1] < v[0] ||
+			v[1] < 0 || v[1] >= DN_MAX_ID-1 ||
+			v[0] < 0 || v[1] >= DN_MAX_ID-1) {
+			continue; /* invalid entry */
+		}
+		n++;
+		/* translate if 'pipe list' */
+		if (co.do_pipe == 1) {
+			v[0] += DN_MAX_ID;
+			v[1] += DN_MAX_ID;
+		}
+		v = (n*2 < len) ? v + 2 : base;
+	}
+	return n;
+}
+
 /* main entry point for dummynet list functions. co.do_pipe indicates
  * which function we want to support.
- * XXX todo- accept filtering arguments.
+ * av may contain filtering arguments, either individual entries
+ * or ranges, or lists (space or commas are valid separators).
+ * Format for a range can be n1-n2 or n3 n4 n5 ...
+ * In a range n1 must be <= n2, otherwise the range is ignored.
+ * A number 'n4' is translate in a range 'n4-n4'
+ * All number must be > 0 and < DN_MAX_ID-1
  */
 void
 dummynet_list(int ac, char *av[], int show_counters)
 {
-	struct dn_id oid, *x = NULL;
-	int ret, i, l = sizeof(oid);
+	struct dn_id *oid, *x = NULL;
+	int ret, i, l;
+	int n; 		/* # of ranges */
+	int buflen;
+	int max_size;	/* largest obj passed up */
+
+	ac--;
+	av++; 		/* skip 'list' | 'show' word */
+
+	n = parse_range(ac, av, NULL, 0);	/* Count # of ranges. */
+
+	/* Allocate space to store ranges */
+	l = sizeof(*oid) + sizeof(uint32_t) * n * 2;
+	oid = safe_calloc(1, l);
+	oid_fill(oid, l, DN_CMD_GET, DN_API_VERSION);
+
+	if (n > 0)	/* store ranges in idx */
+		parse_range(ac, av, (uint32_t *)(oid + 1), n*2);
+	/*
+	 * Compute the size of the largest object returned. If the
+	 * response leaves at least this much spare space in the
+	 * buffer, then surely the response is complete; otherwise
+	 * there might be a risk of truncation and we will need to
+	 * retry with a larger buffer.
+	 * XXX don't bother with smaller structs.
+	 */
+	max_size = sizeof(struct dn_fs);
+	if (max_size < sizeof(struct dn_sch))
+		max_size = sizeof(struct dn_sch);
+	if (max_size < sizeof(struct dn_flow))
+		max_size = sizeof(struct dn_flow);
 
-	oid_fill(&oid, l, DN_CMD_GET, DN_API_VERSION);
 	switch (co.do_pipe) {
 	case 1:
-		oid.subtype = DN_LINK;	/* list pipe */
+		oid->subtype = DN_LINK;	/* list pipe */
 		break;
 	case 2:
-		oid.subtype = DN_FS;	/* list queue */
+		oid->subtype = DN_FS;	/* list queue */
 		break;
 	case 3:
-		oid.subtype = DN_SCH;	/* list sched */
+		oid->subtype = DN_SCH;	/* list sched */
 		break;
 	}
 
-	/* Request the buffer size (in oid.id)*/
-	ret = do_cmd(-IP_DUMMYNET3, &oid, (uintptr_t)&l);
-	// printf("%s returns %d need %d\n", __FUNCTION__, ret, oid.id);
-	if (ret != 0 || oid.id <= sizeof(oid))
-		return;
-
-	/* Try max 10 times
-	 * Buffer is correct if l != 0.
-	 * If l == 0 no buffer is sent, maybe because kernel requires 
-	 * a greater buffer, so try with the new size in x->id.
+	/*
+	 * Ask the kernel an estimate of the required space (result
+	 * in oid.id), unless we are requesting a subset of objects,
+	 * in which case the kernel does not give an exact answer.
+	 * In any case, space might grow in the meantime due to the
+	 * creation of new queues, so we must be prepared to retry.
 	 */
-	for (i = 0, l = oid.id; i < 10; i++, l = x->id) {
+	if (n > 0) {
+		buflen = 4*1024;
+	} else {
+		ret = do_cmd(-IP_DUMMYNET3, oid, (uintptr_t)&l);
+		if (ret != 0 || oid->id <= sizeof(*oid))
+			goto done;
+		buflen = oid->id + max_size;
+		oid->len = sizeof(*oid); /* restore */
+	}
+	/* Try a few times, until the buffer fits */
+	for (i = 0; i < 20; i++) {
+		l = buflen;
 		x = safe_realloc(x, l);
-	*x = oid;
-	ret = do_cmd(-IP_DUMMYNET3, x, (uintptr_t)&l);
-
-		if (ret != 0 || x->id <= sizeof(oid))
-			return;
-
-		if (l != 0)
+		bcopy(oid, x, oid->len);
+		ret = do_cmd(-IP_DUMMYNET3, x, (uintptr_t)&l);
+		if (ret != 0 || x->id <= sizeof(*oid))
+			goto done; /* no response */
+		if (l + max_size <= buflen)
 			break; /* ok */
+		buflen *= 2;	 /* double for next attempt */
 	}
-	// printf("%s returns %d need %d\n", __FUNCTION__, ret, oid.id);
-	// XXX filter on ac, av
 	list_pipes(x, O_NEXT(x, l));
-	free(x);
+done:
+	if (x)
+		free(x);
+	free(oid);
 }

Modified: head/sys/netinet/ipfw/ip_dn_private.h
==============================================================================
--- head/sys/netinet/ipfw/ip_dn_private.h	Thu Mar 11 22:29:45 2010	(r205049)
+++ head/sys/netinet/ipfw/ip_dn_private.h	Thu Mar 11 22:42:33 2010	(r205050)
@@ -359,13 +359,24 @@ struct dn_queue *ipdn_q_find(struct dn_f
         struct ipfw_flow_id *);
 struct dn_sch_inst *ipdn_si_find(struct dn_schk *, struct ipfw_flow_id *);
 
-/* helper structure to copy objects returned to userland */
+/*
+ * copy_range is a template for requests for ranges of pipes/queues/scheds.
+ * The number of ranges is variable and can be derived by o.len.
+ * As a default, we use a small number of entries so that the struct
+ * fits easily on the stack and is sufficient for most common requests.
+ */
+#define DEFAULT_RANGES	5
+struct copy_range {
+        struct dn_id o;
+        uint32_t	r[ 2 * DEFAULT_RANGES ];
+};
+
 struct copy_args {
 	char **start;
 	char *end;
 	int flags;
 	int type;
-	int extra;	/* extra filtering */
+	struct copy_range *extra;	/* extra filtering */
 };
 
 struct sockopt;

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dummynet.c	Thu Mar 11 22:29:45 2010	(r205049)
+++ head/sys/netinet/ipfw/ip_dummynet.c	Thu Mar 11 22:42:33 2010	(r205050)
@@ -787,7 +787,7 @@ copy_obj(char **start, char *end, void *
 	int have = end - *start;
 
 	if (have < o->len || o->len == 0 || o->type == 0) {
-		D("ERROR type %d %s %d have %d need %d",
+		D("(WARN) type %d %s %d have %d need %d",
 			o->type, msg, i, have, o->len);
 		return 1;
 	}
@@ -954,43 +954,64 @@ static int
 copy_data_helper(void *_o, void *_arg)
 {
 	struct copy_args *a = _arg;
+	uint32_t *r = a->extra->r; /* start of first range */
+	uint32_t *lim;	/* first invalid pointer */
+	int n;
 
-	if (a->type == DN_LINK ||	/* pipe show */
-	    a->type == DN_SCH) {	/* sched show */
-		struct dn_schk *s = _o; /* we get only schedulers */
-		if (a->type == DN_SCH && s->sch.sched_nr >= DN_MAX_ID)
-			return 0;	/* not valid scheduler */
-		if (a->type == DN_LINK && s->sch.sched_nr <= DN_MAX_ID)
-			return 0;	/* not valid pipe */
-		if (a->flags & DN_C_LINK) {
-			if (copy_obj(a->start, a->end, &s->link,
-					"link", s->sch.sched_nr))
-				return DNHT_SCAN_END;
-			if (copy_profile(a, s->profile))
-				return DNHT_SCAN_END;
-			if (copy_flowset(a, s->fs, 0))
-				return DNHT_SCAN_END;
-		}
-		if (a->flags & DN_C_SCH) {
-			if (copy_obj(a->start, a->end, &s->sch,
-					"sched", s->sch.sched_nr))
-				return DNHT_SCAN_END;
+	lim = (uint32_t *)((char *)(a->extra) + a->extra->o.len);
 
-			/* list all attached flowsets */
-			if (copy_fsk_list(a, s, 0))
-				return DNHT_SCAN_END;
-		}
-		if (a->flags & DN_C_FLOW) {
-			copy_si(a, s, 0);
+	if (a->type == DN_LINK || a->type == DN_SCH) {
+		/* pipe|sched show, we receive a dn_schk */
+		struct dn_schk *s = _o;
+
+		n = s->sch.sched_nr;
+		if (a->type == DN_SCH && n >= DN_MAX_ID)
+			return 0;	/* not a scheduler */
+		if (a->type == DN_LINK && n <= DN_MAX_ID)
+		    return 0;	/* not a pipe */
+
+		/* see if the object is within one of our ranges */
+		for (;r < lim; r += 2) {
+			if (n < r[0] || n > r[1])
+				continue;
+			/* Found a valid entry, copy and we are done */
+			if (a->flags & DN_C_LINK) {
+				if (copy_obj(a->start, a->end,
+				    &s->link, "link", n))
+					return DNHT_SCAN_END;
+				if (copy_profile(a, s->profile))
+					return DNHT_SCAN_END;
+				if (copy_flowset(a, s->fs, 0))
+					return DNHT_SCAN_END;
+			}
+			if (a->flags & DN_C_SCH) {
+				if (copy_obj(a->start, a->end,
+				    &s->sch, "sched", n))
+					return DNHT_SCAN_END;
+				/* list all attached flowsets */
+				if (copy_fsk_list(a, s, 0))
+					return DNHT_SCAN_END;
+			}
+			if (a->flags & DN_C_FLOW)
+				copy_si(a, s, 0);
+			break;
 		}
-	}
-	if (a->type == DN_FS) {	/* queue show, skip internal flowsets */
+	} else if (a->type == DN_FS) {
+		/* queue show, skip internal flowsets */
 		struct dn_fsk *fs = _o;
-		if (fs->fs.fs_nr >= DN_MAX_ID)
+
+		n = fs->fs.fs_nr;
+		if (n >= DN_MAX_ID)
 			return 0;
-		if (copy_flowset(a, fs, 0))
-			return DNHT_SCAN_END;
-		copy_q(a, fs, 0);
+		/* see if the object is within one of our ranges */
+		for (;r < lim; r += 2) {
+			if (n < r[0] || n > r[1])
+				continue;
+			if (copy_flowset(a, fs, 0))
+				return DNHT_SCAN_END;
+			copy_q(a, fs, 0);
+			break; /* we are done */
+		}
 	}
 	return 0;
 }
@@ -1690,7 +1711,7 @@ do_config(void *p, int l)
 }
 
 static int
-compute_space(struct dn_id *cmd, int *to_copy)
+compute_space(struct dn_id *cmd, struct copy_args *a)
 {
 	int x = 0, need = 0;
 	int profile_size = sizeof(struct dn_profile) - 
@@ -1746,7 +1767,7 @@ compute_space(struct dn_id *cmd, int *to
 		need =  dn_compat_calc_size(dn_cfg); 
 		break;
 	}
-	*to_copy = x;
+	a->flags = x;
 	if (x & DN_C_SCH) {
 		need += dn_cfg.schk_count * sizeof(struct dn_sch) / 2;
 		/* NOT also, each fs might be attached to a sched */
@@ -1775,61 +1796,105 @@ dummynet_get(struct sockopt *sopt, void 
 	int have, i, need, error;
 	char *start = NULL, *buf;
 	size_t sopt_valsize;
-	struct dn_id cmd;
+	struct dn_id *cmd;
 	struct copy_args a;
+	struct copy_range r;
+	int l = sizeof(struct dn_id);
+
+	bzero(&a, sizeof(a));
+	bzero(&r, sizeof(r));
 
 	/* save and restore original sopt_valsize around copyin */
 	sopt_valsize = sopt->sopt_valsize;
+
+	cmd = &r.o;
+
 	if (!compat) {
-		error = sooptcopyin(sopt, &cmd, sizeof(cmd), sizeof(cmd));
-		if (error)
-			return error;
+		/* copy at least an oid, and possibly a full object */
+		error = sooptcopyin(sopt, cmd, sizeof(r), sizeof(*cmd));
 		sopt->sopt_valsize = sopt_valsize;
+		if (error)
+			goto done;
+		l = cmd->len;
 #ifdef EMULATE_SYSCTL
 		/* sysctl emulation. */
-		if (cmd.type == DN_SYSCTL_GET)
+		if (cmd->type == DN_SYSCTL_GET)
 			return kesysctl_emu_get(sopt);
 #endif
-	} else {
+		if (l > sizeof(r)) {
+			/* request larger than default, allocate buffer */
+			cmd = malloc(l,  M_DUMMYNET, M_WAIT);
+			if (cmd == NULL)
+				return ENOMEM; //XXX
+			error = sooptcopyin(sopt, cmd, l, l);
+			sopt->sopt_valsize = sopt_valsize;
+			if (error)
+				goto done;
+		}
+	} else { /* compatibility */
 		error = 0;
-		cmd.type = DN_CMD_GET;
-		cmd.len = sizeof(struct dn_id);
-		cmd.subtype = DN_GET_COMPAT;
-		// cmd.id = sopt_valsize;
+		cmd->type = DN_CMD_GET;
+		cmd->len = sizeof(struct dn_id);
+		cmd->subtype = DN_GET_COMPAT;
+		// cmd->id = sopt_valsize;
 		D("compatibility mode");
 	}
+	a.extra = (struct copy_range *)cmd;
+	if (cmd->len == sizeof(*cmd)) { /* no range, create a default */
+		uint32_t *rp = (uint32_t *)(cmd + 1);
+		cmd->len += 2* sizeof(uint32_t);
+		rp[0] = 1;
+		rp[1] = DN_MAX_ID - 1;
+		if (cmd->subtype == DN_LINK) {
+			rp[0] += DN_MAX_ID;
+			rp[1] += DN_MAX_ID;
+		}
+	}
 	/* Count space (under lock) and allocate (outside lock).
 	 * Exit with lock held if we manage to get enough buffer.
 	 * Try a few times then give up.
 	 */
 	for (have = 0, i = 0; i < 10; i++) {
 		DN_BH_WLOCK();
-		need = compute_space(&cmd, &a.flags);
+		need = compute_space(cmd, &a);
+
+		/* if there is a range, ignore value from compute_space() */
+		if (l > sizeof(*cmd))
+			need = sopt_valsize - sizeof(*cmd);
+
 		if (need < 0) {
 			DN_BH_WUNLOCK();
-			return EINVAL;
+			error = EINVAL;
+			goto done;
 		}
-		need += sizeof(cmd);
-		cmd.id = need;
+		need += sizeof(*cmd);
+		cmd->id = need;
 		if (have >= need)
 			break;
+
 		DN_BH_WUNLOCK();
 		if (start)
 			free(start, M_DUMMYNET);
 		start = NULL;
 		if (need > sopt_valsize)
 			break;
+
 		have = need;
 		start = malloc(have, M_DUMMYNET, M_WAITOK | M_ZERO);
-		if (start == NULL)
-			return ENOMEM;
+		if (start == NULL) {
+			error = ENOMEM;
+			goto done;
+		}
 	}
+
 	if (start == NULL) {
 		if (compat) {
 			*compat = NULL;
-			return 1; // XXX
+			error =  1; // XXX
+		} else {
+			error = sooptcopyout(sopt, cmd, sizeof(*cmd));
 		}
-		return sooptcopyout(sopt, &cmd, sizeof(cmd));
+		goto done;
 	}
 	ND("have %d:%d sched %d, %d:%d links %d, %d:%d flowsets %d, "
 		"%d:%d si %d, %d:%d queues %d",
@@ -1839,10 +1904,12 @@ dummynet_get(struct sockopt *sopt, void 
 		dn_cfg.si_count, sizeof(struct dn_flow), DN_SCH_I,
 		dn_cfg.queue_count, sizeof(struct dn_queue), DN_QUEUE);
 	sopt->sopt_valsize = sopt_valsize;
-	a.type = cmd.subtype;
+	a.type = cmd->subtype;
+
 	if (compat == NULL) {
-		bcopy(&cmd, start, sizeof(cmd));
-		buf = start + sizeof(cmd);
+		bcopy(cmd, start, sizeof(*cmd));
+		((struct dn_id*)(start))->len = sizeof(struct dn_id);
+		buf = start + sizeof(*cmd);
 	} else
 		buf = start;
 	a.start = &buf;
@@ -1853,19 +1920,26 @@ dummynet_get(struct sockopt *sopt, void 
 		dn_ht_scan(dn_cfg.schedhash, copy_data_helper_compat, &a);
 		a.type = DN_COMPAT_QUEUE;
 		dn_ht_scan(dn_cfg.fshash, copy_data_helper_compat, &a);
-	} else if (a.type == DN_FS)
+	} else if (a.type == DN_FS) {
 		dn_ht_scan(dn_cfg.fshash, copy_data_helper, &a);
-	else
+	} else {
 		dn_ht_scan(dn_cfg.schedhash, copy_data_helper, &a);
+	}
 	DN_BH_WUNLOCK();
+
 	if (compat) {
 		*compat = start;
 		sopt->sopt_valsize = buf - start;
 		/* free() is done by ip_dummynet_compat() */
+		start = NULL; //XXX hack
 	} else {
 		error = sooptcopyout(sopt, start, buf - start);
-		free(start, M_DUMMYNET);
 	}
+done:
+	if (cmd && cmd != &r.o)
+		free(cmd, M_DUMMYNET);
+	if (start)
+		free(start, M_DUMMYNET);
 	return error;
 }
 
@@ -1945,8 +2019,7 @@ drain_queue_fs_cb(void *_fs, void *arg)
 		dn_ht_scan_bucket(fs->qht, &fs->drain_bucket,
 				drain_queue_cb, NULL);
 		fs->drain_bucket++;
-	}
-	else {
+	} else {
 		/* No hash table for this flowset, null the pointer 
 		 * if the queue is deleted
 		 */

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 23:30:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 90A1E1065673;
	Thu, 11 Mar 2010 23:30:26 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 0DE568FC12;
	Thu, 11 Mar 2010 23:30:25 +0000 (UTC)
Received: by qyk5 with SMTP id 5so628615qyk.13
	for ; Thu, 11 Mar 2010 15:30:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=J4U23D4DwntTbUtv5MFMkgf5i8JAsqNEghE2flH5Xdg=;
	b=uZJxEZ9BVFwaYqy8iWFZRh40oFezwkx0ngwJ+RO2Cg9ISM0rRgrTnv5M1BQOO1Zyu0
	KcfTjHGy+LJhS+mpD3KKjLX15T+oQN2UUVuMJtH0g98/cEhzAiZhPQRb3hVWKodQcyOg
	VdOKitRGdQ5A2p9lhxJC4ZosL00sOBPUOjFFM=
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=OcGTlxSdPu6GI7IHc85kMafzXXO5Bl+uC014vtTStcsobV0Ubus4iYx03EjrV0dcs1
	GWk5xcO6klvJFTcHUtopqLWezi7GwI9sNNIabeKX+S7P29IblzzA/gkZKaTZCezU+PrZ
	qSp/Zcz39NMa9FgFxNoUWctJvwekH9OrxxgiM=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.123.207 with SMTP id q15mr366017vcr.186.1268350225105; 
	Thu, 11 Mar 2010 15:30:25 -0800 (PST)
In-Reply-To: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
Date: Thu, 11 Mar 2010 15:30:25 -0800
X-Google-Sender-Auth: f1a9a28a70e3afff
Message-ID: <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
From: Qing Li 
To: Robert Watson 
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: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 23:30:26 -0000

>
> A couple of questions:
>
> (1) It used to be the case that quite a few interface drivers and types
> didn't have a notion of "link up" -- especially older ethernet devices. =
=A0Do
> those all have the same problem? =A0It was probably a design oversight th=
at
>=A0devices don't declare an explicit capability for "can report link state=
".
>

  What you raised is definitely a possibility and these fixes take the
  similar approach. I am going to try and go through each of these
  drivers in /sys/dev/ and converting them, very soon.

>
> (2) While loopback interfaces don't really have a link state, they can be
>=A0administratively down -- should/do you check that as well as link state=
?
> And more generally, even if link is up, administratively down should be
>=A0obeyed?
>

  For loopback interfaces, althgouth administrative these can be taken down=
,
  I personally cannot think one practical usage case where ECMP across
  loopback interfaces would be interesting or usefaul. So I can think of
  very little reason to be concerned in the loopback case.

>
> Finally, it would be neat if there were a way to have information beyond
> link state influence the choice to balance to a particular route/interfac=
e.
> =A0For example, imagine if I have a router with ECMP, and on the other si=
de on
> a single ethernet segment, I have two DSL modems. =A0The ethernet link wi=
ll
> remain up, but I may (via out-of-band mechanisms, such as SNMP or an acti=
ve
> probe) be able to tell that one of the DSL lines is down. =A0Is there a w=
ay to
> push that information into the kernel currently without deleting the rout=
es,
> and instead say "yeah, but for ECMP purposes this is 'down'"?
>

  The above really falls into policy based routing. And policy based
  routing infrastrucutre is something I have already been working on
but cannot yet
  push back into -current. In fact Julian and I had a conversation about
  this topic during the FIBs implementation time in late 2008.

  This infrastructure enhancement is definitely coming but I cannot yet prv=
oide
  a timeline for merge back.

  It's mostly a time issue.

  Let me know if I have answered these questions to your satisfaction.

  -- Qing

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 23:36:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93D6E106566C;
	Thu, 11 Mar 2010 23:36:37 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com
	[209.85.220.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 900D08FC1B;
	Thu, 11 Mar 2010 23:36:18 +0000 (UTC)
Received: by fxm1 with SMTP id 1so674808fxm.13
	for ; Thu, 11 Mar 2010 15:36:07 -0800 (PST)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.103.135.25 with SMTP id m25mr1339556mun.32.1268350533123; Thu, 
	11 Mar 2010 15:35:33 -0800 (PST)
In-Reply-To: <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	 
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
From: Juli Mallett 
Date: Thu, 11 Mar 2010 15:35:13 -0800
X-Google-Sender-Auth: b51d2ae7de8fa54e
Message-ID: 
To: Qing Li 
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, Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 23:36:37 -0000

On Thu, Mar 11, 2010 at 15:30, Qing Li  wrote:
>>
>> A couple of questions:
>>
>> (1) It used to be the case that quite a few interface drivers and types
>> didn't have a notion of "link up" -- especially older ethernet devices. =
=A0Do
>> those all have the same problem? =A0It was probably a design oversight t=
hat
>>=A0devices don't declare an explicit capability for "can report link stat=
e".
>>
>
> =A0What you raised is definitely a possibility and these fixes take the
> =A0similar approach. I am going to try and go through each of these
> =A0drivers in /sys/dev/ and converting them, very soon.

Go through drivers in the embedded port directories, too.  The Octeon
port's Ethernet driver was broken by this, and it looks like the
Atheros if_arge is probably broken, too.  I would even suggest going
back to the old behavior briefly while the port maintainers are given
an opportunity to update their drivers.  Actually, it looks like only
MIPS has Ethernet drivers outside of dev/ at a quick glance, but I'd
be surprised if there weren't other broken examples.

Juli.

From owner-svn-src-head@FreeBSD.ORG  Thu Mar 11 23:39:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 108BF106566C;
	Thu, 11 Mar 2010 23:39:57 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 5DCB58FC0C;
	Thu, 11 Mar 2010 23:39:56 +0000 (UTC)
Received: by qyk5 with SMTP id 5so636691qyk.13
	for ; Thu, 11 Mar 2010 15:39:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=wFlXpw30+4IMGOBFqzWabfrEkyiBf1ATIp84yfBVt0M=;
	b=TxO0ZdTnODwyzy3lg05cJMEn/KGlOl3XEfIUfvshK9zECc57H4b5VzIMYwBmAkz2AO
	cx4Nllrt2ROHOsucsRbfqgqNwe4ul0+qr/le+ZQe3TTmDFn/XITxLoEO7sKEsZDgZNNp
	XXHM8LwlKIPU1cmdaD9QGkpfvbg7/LPTPW7Vc=
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=mQFM3k85IPGRINKj4LFe0bFuI78tz6UOW3hpCxYR0Lkvs8670adofAAwknzGi94VrO
	YzvWCQXISnraMmav7Qcknq/Jxun6v1nrY98mchMshkziNiIC8GkAIzE1BMmk7cMejxpA
	BudlmBTqTN9UVNNFUwV2DVaSaV+1YiIcc9NB4=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.128.16 with SMTP id i16mr421657vcs.0.1268350795247; Thu, 
	11 Mar 2010 15:39:55 -0800 (PST)
In-Reply-To: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
Date: Thu, 11 Mar 2010 15:39:55 -0800
X-Google-Sender-Auth: 2e6197f628b303ce
Message-ID: <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
From: Qing Li 
To: Juli Mallett 
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, Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Mar 2010 23:39:57 -0000

I guess it's a good time to clean things up. The if_link_state code has bee=
n
around for quite some time, either it be fully utilized or not be there at =
all.
The inconsistency is the root cause.

I will try going through these tonight and hopefully the fix all take a
common approach.

-- Qing


On Thu, Mar 11, 2010 at 3:35 PM, Juli Mallett  wrote:
> On Thu, Mar 11, 2010 at 15:30, Qing Li  wrote:
>>>
>>> A couple of questions:
>>>
>>> (1) It used to be the case that quite a few interface drivers and types
>>> didn't have a notion of "link up" -- especially older ethernet devices.=
 =A0Do
>>> those all have the same problem? =A0It was probably a design oversight =
that
>>>=A0devices don't declare an explicit capability for "can report link sta=
te".
>>>
>>
>> =A0What you raised is definitely a possibility and these fixes take the
>> =A0similar approach. I am going to try and go through each of these
>> =A0drivers in /sys/dev/ and converting them, very soon.
>
> Go through drivers in the embedded port directories, too. =A0The Octeon
> port's Ethernet driver was broken by this, and it looks like the
> Atheros if_arge is probably broken, too. =A0I would even suggest going
> back to the old behavior briefly while the port maintainers are given
> an opportunity to update their drivers. =A0Actually, it looks like only
> MIPS has Ethernet drivers outside of dev/ at a quick glance, but I'd
> be surprised if there weren't other broken examples.
>
> Juli.
>

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 00:08:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 464F1106566B;
	Fri, 12 Mar 2010 00:08:05 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com
	[209.85.220.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 358398FC12;
	Fri, 12 Mar 2010 00:08:03 +0000 (UTC)
Received: by fxm1 with SMTP id 1so18515fxm.13
	for ; Thu, 11 Mar 2010 16:08:03 -0800 (PST)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.103.50.13 with SMTP id c13mr2280349muk.63.1268352483242; Thu, 
	11 Mar 2010 16:08:03 -0800 (PST)
In-Reply-To: <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	 
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> 
	 
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
From: Juli Mallett 
Date: Thu, 11 Mar 2010 16:07:43 -0800
X-Google-Sender-Auth: 2e32f1dd685f9141
Message-ID: 
To: Qing Li 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 00:08:05 -0000

On Thu, Mar 11, 2010 at 15:39, Qing Li  wrote:
> I guess it's a good time to clean things up. The if_link_state code has been
> around for quite some time, either it be fully utilized or not be there at all.
> The inconsistency is the root cause.

Sure.  There is an increasing amount of stuff that network drivers are
expected to do, but they work without doing them.  It's easy to think
you have a functioning network driver and that you can get by without
adding support for media changes and link status reporting, etc.

> I will try going through these tonight and hopefully the fix all take a
> common approach.

If you can think of a way to add some invariants (warn the first time
a driver receives a packet without having ever set the link state,
make sure the media status callback sets the valid flag in the
request, etc) that would probably be very helpful for people who are
writing network drivers.  If I hadn't been following the threads about
your changes, I would have had to spend much longer fixing the Octeon
port's Ethernet driver, wondering why suddenly it broke and
instrumenting the routing code.  A printf would go a long way.

Juli.

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 00:18:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CFB611065769;
	Fri, 12 Mar 2010 00:18:38 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A4778FC19;
	Fri, 12 Mar 2010 00:18:37 +0000 (UTC)
Received: by qyk5 with SMTP id 5so669414qyk.13
	for ; Thu, 11 Mar 2010 16:18:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=iyJauxMwoyCdmQcnxGe4Bxg/NeWqA1oGVftaxqRDx6E=;
	b=JZLls9VloaJEPI35b6iRcyLKVsZZQaJHfK8xNCSuU2FygF11nX6OEZFwQ/eLHPCm/7
	c9rNkAPY6XcGEGhZb8arYsNzjq9IyDyytOVbpScUvczpZDhErHfvkP7o/EBJsfsnMXtO
	0Uz9a+X6RTLe/+FPOuopkDBpzZVct5hkfuZPM=
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=L1A2vKIVpzepDiUNRmw10DMJHFAML96HQoeUZQ1dKDqb3jPSsdgvDYHuKbjL30cSAf
	v7csnzBWTmyyxY8st95o18m/AMkUm3Fv7Cw6htGtXAu4T56YfB4CEvuyxstuLuQlVcSF
	ZQ/Ee7mbbr6YAOoo1wmw8K3gxftkwbf0gdyt4=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.107.17 with SMTP id z17mr432676vco.75.1268353117106; Thu, 
	11 Mar 2010 16:18:37 -0800 (PST)
In-Reply-To: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
Date: Thu, 11 Mar 2010 16:18:37 -0800
X-Google-Sender-Auth: a6c4769d7ed44980
Message-ID: <9ace436c1003111618t28dba8d8x19aeff2acff0c489@mail.gmail.com>
From: Qing Li 
To: Juli Mallett 
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, Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 00:18:38 -0000

>
> If you can think of a way to add some invariants (warn the first time
> a driver receives a packet without having ever set the link state,
> make sure the media status callback sets the valid flag in the
> request, etc) that would probably be very helpful for people who are
> writing network drivers. =A0If I hadn't been following the threads about
> your changes, I would have had to spend much longer fixing the Octeon
> port's Ethernet driver, wondering why suddenly it broke and
> instrumenting the routing code. =A0A printf would go a long way.
>

  You definitely have a very good point here.  I was a bit surprised
  during debugging that the link state is not consistently initialized
  and by far not enforced across all of the drivers. Admittedly I checked
  the most commonly deployed devices and they are in good state.

  I certainly appreciate your patience on this one and will try to get
  it resolved quickly.

  -- Qing

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 02:56:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89798106567B;
	Fri, 12 Mar 2010 02:56:45 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 77DCA8FC23;
	Fri, 12 Mar 2010 02:56: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 o2C2ujWN069266;
	Fri, 12 Mar 2010 02:56:45 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C2ujLm069264;
	Fri, 12 Mar 2010 02:56:45 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003120256.o2C2ujLm069264@svn.freebsd.org>
From: Juli Mallett 
Date: Fri, 12 Mar 2010 02:56: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: r205061 - head/sys/mips/cavium/dev/rgmii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 02:56:45 -0000

Author: jmallett
Date: Fri Mar 12 02:56:45 2010
New Revision: 205061
URL: http://svn.freebsd.org/changeset/base/205061

Log:
  o) Send packets being queued for transmission up to BPF if there's a listener.
  o) Properly configure the CAM to handle IFF_PROMISC and note where IFF_ALLMULTI
     handling would go if we didn't already force the NIC to receive all
     multicast traffic.
  
  Reviewed by:	imp
  Sponsored by:	Packet Forensics

Modified:
  head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c

Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Fri Mar 12 02:55:10 2010	(r205060)
+++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Fri Mar 12 02:56:45 2010	(r205061)
@@ -209,6 +209,7 @@ static int octeon_rgmx_intr(void *arg);
 /* Standard driver entry points.  These can be static.  */
 static void  octeon_rgmx_init	      (void *);
 //static driver_intr_t    rgmx_intr;
+static void  octeon_rgmx_config_cam   (struct ifnet *);
 static int   octeon_rgmx_ioctl        (struct ifnet *, u_long, caddr_t);
 static void  octeon_rgmx_output_start (struct ifnet *);
 static void  octeon_rgmx_output_start_locked (struct ifnet *);
@@ -1225,6 +1226,8 @@ static void octeon_rgmx_output_start_loc
                 for (ii = 0; ii < len; ii++) printf(" %X", dc[ii]); printf("\n");
 #endif
 
+		ETHER_BPF_MTAP(ifp, m);
+
         	IF_ENQUEUE(&sc->tx_pending_queue, m);
 
                 /*
@@ -1681,6 +1684,60 @@ static void octeon_rgmx_medstat (struct 
 	RGMX_UNLOCK(sc);
 }
 
+static void octeon_rgmx_config_cam(struct ifnet *ifp)
+{
+	struct rgmx_softc_dev *sc = ifp->if_softc;
+	u_int port = sc->port;
+	int index = INDEX(port);
+        int iface = INTERFACE(port);
+	u_int last_enabled;
+	uint64_t adr_ctl;
+
+	last_enabled = octeon_rgmx_stop_port(port);
+
+	adr_ctl = oct_read64(OCTEON_RGMX_RXX_ADR_CTL(index, iface));
+
+	/*
+	 * Always accept broadcast traffic.
+	 */
+	if ((adr_ctl & OCTEON_RGMX_ADRCTL_ACCEPT_BROADCAST) == 0)
+		adr_ctl |= OCTEON_RGMX_ADRCTL_ACCEPT_BROADCAST;
+
+	/*
+	 * Accept all multicast in all multicast mode and in
+	 * promiscuous mode.
+	 *
+	 * XXX Since we don't handle programming the CAM for
+	 * multicast filtering, always accept all multicast.
+	 */
+	adr_ctl &= ~OCTEON_RGMX_ADRCTL_REJECT_ALL_MULTICAST;
+	adr_ctl |= OCTEON_RGMX_ADRCTL_ACCEPT_ALL_MULTICAST;
+
+	/*
+	 * In promiscuous mode, the CAM is shut off, so reject everything.
+	 * Otherwise, filter using the CAM.
+	 */
+	if ((ifp->if_flags & IFF_PROMISC) != 0) {
+		adr_ctl &= ~OCTEON_RGMX_ADRCTL_CAM_MODE_ACCEPT_DMAC;
+		adr_ctl |= OCTEON_RGMX_ADRCTL_CAM_MODE_REJECT_DMAC;
+	} else {
+		adr_ctl &= ~OCTEON_RGMX_ADRCTL_CAM_MODE_REJECT_DMAC;
+		adr_ctl |= OCTEON_RGMX_ADRCTL_CAM_MODE_ACCEPT_DMAC;
+	}
+
+	oct_write64(OCTEON_RGMX_RXX_ADR_CTL(index, iface), adr_ctl);
+
+	/*
+	 * If in promiscuous mode, disable the CAM.
+	 */
+	if ((ifp->if_flags & IFF_PROMISC) != 0)
+		oct_write64(OCTEON_RGMX_RXX_ADR_CAM_EN(index, iface), 0);
+	else
+		oct_write64(OCTEON_RGMX_RXX_ADR_CAM_EN(index, iface), 1);
+
+	if (last_enabled) octeon_rgmx_start_port(port);
+}
+
 static int octeon_rgmx_ioctl (struct ifnet * ifp, u_long command, caddr_t data)
 {
     	struct rgmx_softc_dev *sc = ifp->if_softc;
@@ -1699,8 +1756,6 @@ static int octeon_rgmx_ioctl (struct ifn
                      * "stopped", reflecting the UP flag.
                      */
                     if (ifp->if_flags & IFF_UP) {
-
-
                         /*
                          * New state is IFF_UP
                          * Restart or Start now, if driver is not running currently.
@@ -1708,6 +1763,7 @@ static int octeon_rgmx_ioctl (struct ifn
                         if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
                             octeon_rgmx_init(sc);
                         }
+			octeon_rgmx_config_cam(ifp);
                     } else {
                         /*
                          * New state is IFF_DOWN.

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 03:08:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A3DD106566B;
	Fri, 12 Mar 2010 03:08:48 +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 4945D8FC19;
	Fri, 12 Mar 2010 03:08: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 o2C38mc9072167;
	Fri, 12 Mar 2010 03:08:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C38mAD072164;
	Fri, 12 Mar 2010 03:08:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201003120308.o2C38mAD072164@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 12 Mar 2010 03:08: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: r205063 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 03:08:48 -0000

Author: jhb
Date: Fri Mar 12 03:08:47 2010
New Revision: 205063
URL: http://svn.freebsd.org/changeset/base/205063

Log:
  Fix the previous attempt to fix kernel builds of HEAD on 7.x.  Use the
  __gnu_inline__ attribute for PMAP_INLINE when using the 7.x compiler to
  match what 7.x uses for PMAP_INLINE.

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/i386/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Fri Mar 12 02:56:49 2010	(r205062)
+++ head/sys/amd64/amd64/pmap.c	Fri Mar 12 03:08:47 2010	(r205063)
@@ -152,7 +152,7 @@ __FBSDID("$FreeBSD$");
 
 #if !defined(DIAGNOSTIC)
 #ifdef __GNUC_GNU_INLINE__
-#define PMAP_INLINE	inline
+#define PMAP_INLINE	__attribute__((__gnu_inline__)) inline
 #else
 #define PMAP_INLINE	extern inline
 #endif

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Fri Mar 12 02:56:49 2010	(r205062)
+++ head/sys/i386/i386/pmap.c	Fri Mar 12 03:08:47 2010	(r205063)
@@ -163,7 +163,7 @@ __FBSDID("$FreeBSD$");
 
 #if !defined(DIAGNOSTIC)
 #ifdef __GNUC_GNU_INLINE__
-#define PMAP_INLINE	inline
+#define PMAP_INLINE	__attribute__((__gnu_inline__)) inline
 #else
 #define PMAP_INLINE	extern inline
 #endif

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 03:49:17 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC3D8106566C;
	Fri, 12 Mar 2010 03:49:17 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 949D98FC1A;
	Fri, 12 Mar 2010 03:49: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 o2C3nHvB081215;
	Fri, 12 Mar 2010 03:49:17 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C3nHP6081210;
	Fri, 12 Mar 2010 03:49:17 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201003120349.o2C3nHP6081210@svn.freebsd.org>
From: Neel Natu 
Date: Fri, 12 Mar 2010 03:49: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: r205064 - in head/sys/mips: include mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 03:49:18 -0000

Author: neel
Date: Fri Mar 12 03:49:17 2010
New Revision: 205064
URL: http://svn.freebsd.org/changeset/base/205064

Log:
  Make the ddb command "show tlb" SMP friendly.
  
  It now accepts an argument to dump out the tlb of a particular cpu.

Modified:
  head/sys/mips/include/cpuregs.h
  head/sys/mips/include/pmap.h
  head/sys/mips/mips/mp_machdep.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/include/cpuregs.h
==============================================================================
--- head/sys/mips/include/cpuregs.h	Fri Mar 12 03:08:47 2010	(r205063)
+++ head/sys/mips/include/cpuregs.h	Fri Mar 12 03:49:17 2010	(r205064)
@@ -577,6 +577,8 @@
 
 #define MIPS_CONFIG1_TLBSZ_MASK		0x7E000000	/* bits 30..25 # tlb entries minus one */
 #define MIPS_CONFIG1_TLBSZ_SHIFT	25
+#define	MIPS_MAX_TLB_ENTRIES		64
+
 #define MIPS_CONFIG1_IS_MASK		0x01C00000	/* bits 24..22 icache sets per way */
 #define MIPS_CONFIG1_IS_SHIFT		22
 #define MIPS_CONFIG1_IL_MASK		0x00380000	/* bits 21..19 icache line size */

Modified: head/sys/mips/include/pmap.h
==============================================================================
--- head/sys/mips/include/pmap.h	Fri Mar 12 03:08:47 2010	(r205063)
+++ head/sys/mips/include/pmap.h	Fri Mar 12 03:49:17 2010	(r205064)
@@ -219,6 +219,11 @@ pmap_map_fpage(vm_paddr_t pa, struct fpa
     boolean_t check_unmaped);
 void pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp);
 
+/*
+ * Function to save TLB contents so that they may be inspected in the debugger.
+ */
+extern void pmap_save_tlb(void);
+
 #endif				/* _KERNEL */
 
 #endif				/* !LOCORE */

Modified: head/sys/mips/mips/mp_machdep.c
==============================================================================
--- head/sys/mips/mips/mp_machdep.c	Fri Mar 12 03:08:47 2010	(r205063)
+++ head/sys/mips/mips/mp_machdep.c	Fri Mar 12 03:49:17 2010	(r205064)
@@ -128,6 +128,7 @@ mips_ipi_handler(void *arg)
 			CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD");
 
 			savectx(&stoppcbs[cpu]);
+			pmap_save_tlb();
 
 			/* Indicate we are stopped */
 			atomic_set_int(&stopped_cpus, cpumask);

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Mar 12 03:08:47 2010	(r205063)
+++ head/sys/mips/mips/pmap.c	Fri Mar 12 03:49:17 2010	(r205064)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -149,6 +150,8 @@ unsigned pmap_max_asid;		/* max ASID sup
 
 vm_offset_t kernel_vm_end;
 
+static struct tlb tlbstash[MAXCPU][MIPS_MAX_TLB_ENTRIES];
+
 static void pmap_asid_alloc(pmap_t pmap);
 
 /*
@@ -3284,17 +3287,6 @@ db_dump_tlb(int first, int last)
 	}
 }
 
-#ifdef DDB
-#include 
-#include 
-
-DB_SHOW_COMMAND(tlb, ddb_dump_tlb)
-{
-	db_dump_tlb(0, num_tlbentries - 1);
-}
-
-#endif
-
 /*
  *	Routine:	pmap_kextract
  *	Function:
@@ -3377,3 +3369,61 @@ pmap_flush_pvcache(vm_page_t m)
 		}
 	}
 }
+
+void
+pmap_save_tlb(void)
+{
+	int tlbno, cpu;
+
+	cpu = PCPU_GET(cpuid);
+
+	for (tlbno = 0; tlbno < num_tlbentries; ++tlbno)
+		MachTLBRead(tlbno, &tlbstash[cpu][tlbno]);
+}
+
+#ifdef DDB
+#include 
+
+DB_SHOW_COMMAND(tlb, ddb_dump_tlb)
+{
+	int cpu, tlbno;
+	struct tlb *tlb;
+
+	if (have_addr)
+		cpu = ((addr >> 4) % 16) * 10 + (addr % 16);
+	else
+		cpu = PCPU_GET(cpuid);
+
+	if (cpu < 0 || cpu >= mp_ncpus) {
+		db_printf("Invalid CPU %d\n", cpu);
+		return;
+	} else
+		db_printf("CPU %d:\n", cpu);
+
+	if (cpu == PCPU_GET(cpuid))
+		pmap_save_tlb();
+
+	for (tlbno = 0; tlbno < num_tlbentries; ++tlbno) {
+		tlb = &tlbstash[cpu][tlbno];
+		if (tlb->tlb_lo0 & PTE_V || tlb->tlb_lo1 & PTE_V) {
+			printf("TLB %2d vad 0x%0lx ",
+				tlbno, (long)(tlb->tlb_hi & 0xffffff00));
+		} else {
+			printf("TLB*%2d vad 0x%0lx ",
+				tlbno, (long)(tlb->tlb_hi & 0xffffff00));
+		}
+		printf("0=0x%0lx ", pfn_to_vad((long)tlb->tlb_lo0));
+		printf("%c", tlb->tlb_lo0 & PTE_V ? 'V' : '-');
+		printf("%c", tlb->tlb_lo0 & PTE_M ? 'M' : '-');
+		printf("%c", tlb->tlb_lo0 & PTE_G ? 'G' : '-');
+		printf(" atr %x ", (tlb->tlb_lo0 >> 3) & 7);
+		printf("1=0x%0lx ", pfn_to_vad((long)tlb->tlb_lo1));
+		printf("%c", tlb->tlb_lo1 & PTE_V ? 'V' : '-');
+		printf("%c", tlb->tlb_lo1 & PTE_M ? 'M' : '-');
+		printf("%c", tlb->tlb_lo1 & PTE_G ? 'G' : '-');
+		printf(" atr %x ", (tlb->tlb_lo1 >> 3) & 7);
+		printf(" sz=%x pid=%x\n", tlb->tlb_mask,
+		       (tlb->tlb_hi & 0x000000ff));
+	}
+}
+#endif	/* DDB */

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 04:10:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A43A21065673;
	Fri, 12 Mar 2010 04:10:08 +0000 (UTC)
	(envelope-from jhay@meraka.csir.co.za)
Received: from zibbi.meraka.csir.co.za (unknown [IPv6:2001:4200:7000:2::1])
	by mx1.freebsd.org (Postfix) with ESMTP id CD5F78FC14;
	Fri, 12 Mar 2010 04:10:07 +0000 (UTC)
Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973)
	id 7580D39824; Fri, 12 Mar 2010 06:10:01 +0200 (SAST)
Date: Fri, 12 Mar 2010 06:10:01 +0200
From: John Hay 
To: Juli Mallett 
Message-ID: <20100312041001.GA85817@zibbi.meraka.csir.co.za>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
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, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 04:10:08 -0000

On Thu, Mar 11, 2010 at 03:35:13PM -0800, Juli Mallett wrote:
> On Thu, Mar 11, 2010 at 15:30, Qing Li  wrote:
> >>
> >> A couple of questions:
> >>
> >> (1) It used to be the case that quite a few interface drivers and types
> >> didn't have a notion of "link up" -- especially older ethernet devices. ?Do
> >> those all have the same problem? ?It was probably a design oversight that
> >>?devices don't declare an explicit capability for "can report link state".
> >>
> >
> > ?What you raised is definitely a possibility and these fixes take the
> > ?similar approach. I am going to try and go through each of these
> > ?drivers in /sys/dev/ and converting them, very soon.
> 
> Go through drivers in the embedded port directories, too.  The Octeon
> port's Ethernet driver was broken by this, and it looks like the
> Atheros if_arge is probably broken, too.  I would even suggest going
> back to the old behavior briefly while the port maintainers are given
> an opportunity to update their drivers.  Actually, it looks like only
> MIPS has Ethernet drivers outside of dev/ at a quick glance, but I'd
> be surprised if there weren't other broken examples.

There is also if_npe in the arm/xscale/ixp425 directory and probably
others in the rest of the arm directories.

John
-- 
John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 05:03:27 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 128D81065677;
	Fri, 12 Mar 2010 05:03:27 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 01F868FC13;
	Fri, 12 Mar 2010 05:03: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 o2C53Qmb097544;
	Fri, 12 Mar 2010 05:03:26 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C53QCs097541;
	Fri, 12 Mar 2010 05:03:26 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003120503.o2C53QCs097541@svn.freebsd.org>
From: Kip Macy 
Date: Fri, 12 Mar 2010 05:03:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205066 - in head/sys: net netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 05:03:27 -0000

Author: kmacy
Date: Fri Mar 12 05:03:26 2010
New Revision: 205066
URL: http://svn.freebsd.org/changeset/base/205066

Log:
  - restructure flowtable to support ipv6
  - add a name argument to flowtable_alloc for printing with ddb commands
  - extend ddb commands to print destination address or 4-tuples
  - don't parse ports in ulp header if FL_HASH_ALL is not passed
  - add kern_flowtable_insert to enable more generic use of flowtable
    (e.g. system calls for adding entries)
  - don't hash loopback addresses
  - cleanup whitespace
  - keep statistics per-cpu for per-cpu flowtables to avoid cache line contention
  - add sysctls to accumulate stats and report aggregate
  
  MFC after:	7 days

Modified:
  head/sys/net/flowtable.c
  head/sys/net/flowtable.h
  head/sys/net/if_llatbl.c
  head/sys/net/if_llatbl.h
  head/sys/netinet/ip_input.c
  head/sys/netinet/ip_output.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Fri Mar 12 04:44:20 2010	(r205065)
+++ head/sys/net/flowtable.c	Fri Mar 12 05:03:26 2010	(r205066)
@@ -1,6 +1,6 @@
 /**************************************************************************
 
-Copyright (c) 2008-2009, BitGravity Inc.
+Copyright (c) 2008-2010, BitGravity Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
 #include "opt_route.h"
 #include "opt_mpath.h"
 #include "opt_ddb.h"
+#include "opt_inet.h"
+#include "opt_inet6.h"
 
 #include 
 __FBSDID("$FreeBSD$");
@@ -45,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,6 +66,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef INET6
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -140,31 +146,39 @@ union flentryp {
 	struct flentry		**pcpu[MAXCPU];
 };
 
+struct flowtable_stats {
+	uint64_t	ft_collisions;
+	uint64_t	ft_allocated;
+	uint64_t	ft_misses;
+	uint64_t	ft_max_depth;
+	uint64_t	ft_free_checks;
+	uint64_t	ft_frees;
+	uint64_t	ft_hits;
+	uint64_t	ft_lookups;
+} __aligned(128);
+
 struct flowtable {
+	struct	flowtable_stats ft_stats[MAXCPU];
 	int 		ft_size;
 	int 		ft_lock_count;
 	uint32_t	ft_flags;
-	uint32_t	ft_collisions;
-	uint32_t	ft_allocated;
-	uint32_t	ft_misses;
-	uint64_t	ft_hits;
 
 	uint32_t	ft_udp_idle;
 	uint32_t	ft_fin_wait_idle;
 	uint32_t	ft_syn_idle;
 	uint32_t	ft_tcp_idle;
 
+	char		*ft_name;
 	fl_lock_t	*ft_lock;
 	fl_lock_t 	*ft_unlock;
 	fl_rtalloc_t	*ft_rtalloc;
 	struct mtx	*ft_locks;
 
-	
 	union flentryp	ft_table;
 	bitstr_t 	*ft_masks[MAXCPU];
 	bitstr_t	*ft_tmpmask;
 	struct flowtable *ft_next;
-};
+} __aligned(128);
 
 static struct proc *flowcleanerproc;
 static VNET_DEFINE(struct flowtable *, flow_list_head);
@@ -181,12 +195,24 @@ static struct cv 	flowclean_cv;
 static struct mtx	flowclean_lock;
 static uint32_t		flowclean_cycles;
 
+#ifdef FLOWTABLE_DEBUG
+#define FLDPRINTF(ft, flags, fmt, ...) 		\
+do {		  				\
+	if ((ft)->ft_flags & (flags))		\
+		printf((fmt), __VA_ARGS__);	\
+} while (0);					\
+
+#else
+#define FLDPRINTF(ft, flags, fmt, ...)
+
+#endif
+
+
 /*
  * TODO:
  * - Make flowtable stats per-cpu, aggregated at sysctl call time,
  *   to avoid extra cache evictions caused by incrementing a shared
  *   counter
- * - add IPv6 support to flow lookup
  * - add sysctls to resize && flush flow tables 
  * - Add per flowtable sysctls for statistics and configuring timeouts
  * - add saturation counter to rtentry to support per-packet load-balancing
@@ -200,13 +226,6 @@ static uint32_t		flowclean_cycles;
  */
 VNET_DEFINE(int, flowtable_enable) = 1;
 static VNET_DEFINE(int, flowtable_debug);
-static VNET_DEFINE(int, flowtable_hits);
-static VNET_DEFINE(int, flowtable_lookups);
-static VNET_DEFINE(int, flowtable_misses);
-static VNET_DEFINE(int, flowtable_frees);
-static VNET_DEFINE(int, flowtable_free_checks);
-static VNET_DEFINE(int, flowtable_max_depth);
-static VNET_DEFINE(int, flowtable_collisions);
 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;
@@ -216,13 +235,6 @@ static VNET_DEFINE(int, flowtable_ready)
 
 #define	V_flowtable_enable		VNET(flowtable_enable)
 #define	V_flowtable_debug		VNET(flowtable_debug)
-#define	V_flowtable_hits		VNET(flowtable_hits)
-#define	V_flowtable_lookups		VNET(flowtable_lookups)
-#define	V_flowtable_misses		VNET(flowtable_misses)
-#define	V_flowtable_frees		VNET(flowtable_frees)
-#define	V_flowtable_free_checks		VNET(flowtable_free_checks)
-#define	V_flowtable_max_depth		VNET(flowtable_max_depth)
-#define	V_flowtable_collisions		VNET(flowtable_collisions)
 #define	V_flowtable_syn_expire		VNET(flowtable_syn_expire)
 #define	V_flowtable_udp_expire		VNET(flowtable_udp_expire)
 #define	V_flowtable_fin_wait_expire	VNET(flowtable_fin_wait_expire)
@@ -235,20 +247,6 @@ SYSCTL_VNET_INT(_net_inet_flowtable, OID
     &VNET_NAME(flowtable_debug), 0, "print debug info.");
 SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW,
     &VNET_NAME(flowtable_enable), 0, "enable flowtable caching.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, hits, CTLFLAG_RD,
-    &VNET_NAME(flowtable_hits), 0, "# flowtable hits.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, lookups, CTLFLAG_RD,
-    &VNET_NAME(flowtable_lookups), 0, "# flowtable lookups.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, misses, CTLFLAG_RD,
-    &VNET_NAME(flowtable_misses), 0, "#flowtable misses.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, frees, CTLFLAG_RD,
-    &VNET_NAME(flowtable_frees), 0, "#flows freed.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, free_checks, CTLFLAG_RD,
-    &VNET_NAME(flowtable_free_checks), 0, "#flows free checks.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, max_depth, CTLFLAG_RD,
-    &VNET_NAME(flowtable_max_depth), 0, "max collision list length.");
-SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, collisions, CTLFLAG_RD,
-    &VNET_NAME(flowtable_collisions), 0, "#flowtable collisions.");
 
 /*
  * XXX This does not end up updating timeouts at runtime
@@ -298,6 +296,77 @@ SYSCTL_VNET_PROC(_net_inet_flowtable, OI
     CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_nmbflows, "IU",
     "Maximum number of flows allowed");
 
+
+
+#define FS_PRINT(sb, field)	sbuf_printf((sb), "\t%s=%jd", #field, fs->ft_##field)
+
+static void
+fs_print(struct flowtable_stats *fs)
+{
+	struct sbuf *sb;
+
+	sb = sbuf_new(NULL, NULL, 32*1024, SBUF_FIXEDLEN);
+
+	FS_PRINT(sb, collisions);
+	FS_PRINT(sb, allocated);
+	FS_PRINT(sb, misses);
+	FS_PRINT(sb, max_depth);
+	FS_PRINT(sb, free_checks);
+	FS_PRINT(sb, frees);
+	FS_PRINT(sb, hits);
+	FS_PRINT(sb, lookups);
+	sbuf_finish(sb);
+	
+}
+
+static void
+flowtable_show_stats(struct flowtable *ft)
+{
+	int i;
+	struct flowtable_stats fs, *pfs;
+
+	if (ft->ft_flags & FL_PCPU) {
+		bzero(&fs, sizeof(fs));
+		pfs = &fs;
+		for (i = 0; i <= mp_maxid; i++) {
+			if (CPU_ABSENT(i))
+				continue;
+			pfs->ft_collisions  += ft->ft_stats[i].ft_collisions;
+			pfs->ft_allocated   += ft->ft_stats[i].ft_allocated;
+			pfs->ft_misses      += ft->ft_stats[i].ft_misses;
+			pfs->ft_free_checks += ft->ft_stats[i].ft_free_checks;
+			pfs->ft_frees       += ft->ft_stats[i].ft_frees;
+			pfs->ft_hits        += ft->ft_stats[i].ft_hits;
+			pfs->ft_lookups     += ft->ft_stats[i].ft_lookups;
+			if (ft->ft_stats[i].ft_max_depth > pfs->ft_max_depth)
+				pfs->ft_max_depth = ft->ft_stats[i].ft_max_depth;
+		}
+	} else {
+		pfs = &ft->ft_stats[0];
+	}
+
+	fs_print(pfs);
+}
+
+static int
+sysctl_flowtable_stats(SYSCTL_HANDLER_ARGS)
+{
+	struct flowtable *ft;
+
+	ft = V_flow_list_head;
+	while (ft != NULL) {
+		printf("name: %s\n", ft->ft_name);
+		flowtable_show_stats(ft);
+		ft = ft->ft_next;
+	}
+
+	return (0);
+}
+SYSCTL_VNET_PROC(_net_inet_flowtable, OID_AUTO, stats,
+    CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_flowtable_stats, "IU",
+    "flowtable statistics");
+
+
 #ifndef RADIX_MPATH
 static void
 in_rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum)
@@ -342,52 +411,122 @@ flowtable_pcpu_unlock(struct flowtable *
 #define FL_ENTRY_LOCK(table, hash)  (table)->ft_lock((table), (hash))
 #define FL_ENTRY_UNLOCK(table, hash) (table)->ft_unlock((table), (hash))
 
-#define FL_STALE (1<<8)
-#define FL_IPV6  (1<<9)
+#define FL_STALE 	(1<<8)
+#define FL_IPV6  	(1<<9)
+#define FL_OVERWRITE	(1<<10)
 
-static uint32_t
-ipv4_flow_lookup_hash_internal(struct mbuf *m, struct route *ro,
-    uint32_t *key, uint16_t *flags, uint8_t *protop)
+void
+flow_invalidate(struct flentry *fle)
 {
-	uint16_t sport = 0, dport = 0;
-	struct ip *ip = NULL;
-	uint8_t proto = 0;
+
+	fle->f_flags |= FL_STALE;
+}
+
+static __inline int
+proto_to_flags(uint8_t proto)
+{
+	int flag;
+
+	switch (proto) {
+	case IPPROTO_TCP:
+		flag = FL_TCP;
+		break;
+	case IPPROTO_SCTP:
+		flag = FL_SCTP;
+		break;		
+	case IPPROTO_UDP:
+		flag = FL_UDP;
+		break;
+	default:
+		flag = 0;
+		break;
+	}
+
+	return (flag);
+}
+
+static __inline int
+flags_to_proto(int flags)
+{
+	int proto, protoflags;
+
+	protoflags = flags & (FL_TCP|FL_SCTP|FL_UDP);
+	switch (protoflags) {
+	case FL_TCP:
+		proto = IPPROTO_TCP;
+		break;
+	case FL_SCTP:
+		proto = IPPROTO_SCTP;
+		break;
+	case FL_UDP:
+		proto = IPPROTO_UDP;
+		break;
+	default:
+		proto = 0;
+		break;
+	}
+	return (proto);
+}
+
+#ifdef INET
+#ifdef FLOWTABLE_DEBUG
+static void
+ipv4_flow_print_tuple(int flags, int proto, struct sockaddr_in *ssin,
+    struct sockaddr_in *dsin)
+{
+	char saddr[4*sizeof "123"], daddr[4*sizeof "123"];
+
+	if (flags & FL_HASH_ALL) {
+		inet_ntoa_r(ssin->sin_addr, saddr);
+		inet_ntoa_r(dsin->sin_addr, daddr);
+		printf("proto=%d %s:%d->%s:%d\n",
+		    proto, saddr, ntohs(ssin->sin_port), daddr,
+		    ntohs(dsin->sin_port));
+	} else {
+		inet_ntoa_r(*(struct in_addr *) &dsin->sin_addr, daddr);
+		printf("proto=%d %s\n", proto, daddr);
+	}
+
+}
+#endif
+
+static int
+ipv4_mbuf_demarshal(struct flowtable *ft, struct mbuf *m,
+    struct sockaddr_in *ssin, struct sockaddr_in *dsin, uint16_t *flags)
+{
+	struct ip *ip;
+	uint8_t proto;
 	int iphlen;
-	uint32_t hash;
-	struct sockaddr_in *sin;
 	struct tcphdr *th;
 	struct udphdr *uh;
 	struct sctphdr *sh;
+	uint16_t sport, dport;
 
-	if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0))
-		return (0);
+	proto = sport = dport = 0;
+	ip = mtod(m, struct ip *);
+	dsin->sin_family = AF_INET;
+	dsin->sin_len = sizeof(*dsin);
+	dsin->sin_addr = ip->ip_dst;
+	ssin->sin_family = AF_INET;
+	ssin->sin_len = sizeof(*ssin);
+	ssin->sin_addr = ip->ip_src;	
 
-	key[1] = key[0] = 0;
-	sin = (struct sockaddr_in *)&ro->ro_dst;
-	if (m != NULL) {
-		ip = mtod(m, struct ip *);
-		sin->sin_family = AF_INET;
-		sin->sin_len = sizeof(*sin);
-		sin->sin_addr = ip->ip_dst;
-	} else
-		*flags &= ~FL_HASH_PORTS;
-
-	key[2] = sin->sin_addr.s_addr;
-
-	if ((*flags & FL_HASH_PORTS) == 0)
+	proto = ip->ip_p;
+	if ((*flags & FL_HASH_ALL) == 0) {
+		FLDPRINTF(ft, FL_DEBUG_ALL, "skip port check flags=0x%x ",
+		    *flags);
 		goto skipports;
+	}
 
-	proto = ip->ip_p;
 	iphlen = ip->ip_hl << 2; /* XXX options? */
-	key[1] = ip->ip_src.s_addr;
-	
+
 	switch (proto) {
 	case IPPROTO_TCP:
 		th = (struct tcphdr *)((caddr_t)ip + iphlen);
-		sport = ntohs(th->th_sport);
-		dport = ntohs(th->th_dport);
-		*flags |= th->th_flags;
-		if (*flags & TH_RST)
+		sport = th->th_sport;
+		dport = th->th_dport;
+		if ((*flags & FL_HASH_ALL) &&
+		    (th->th_flags & (TH_RST|TH_FIN)))
 			*flags |= FL_STALE;
 	break;
 	case IPPROTO_UDP:
@@ -401,38 +540,288 @@ ipv4_flow_lookup_hash_internal(struct mb
 		dport = sh->dest_port;
 	break;
 	default:
-		if (*flags & FL_HASH_PORTS)
-			goto noop;
+		FLDPRINTF(ft, FL_DEBUG_ALL, "proto=0x%x not supported\n", proto);
+		return (ENOTSUP);
 		/* no port - hence not a protocol we care about */
 		break;
 	
 	}
-	*protop = proto;
 
-	/*
-	 * If this is a transmit route cache then 
-	 * hash all flows to a given destination to
-	 * the same bucket
-	 */
-	if ((*flags & FL_HASH_PORTS) == 0)
-		proto = sport = dport = 0;
+skipports:
+	*flags |= proto_to_flags(proto);
+	ssin->sin_port = sport;
+	dsin->sin_port = dport;
+	return (0);
+}
+
+static uint32_t
+ipv4_flow_lookup_hash_internal(
+	struct sockaddr_in *ssin, struct sockaddr_in *dsin, 
+	    uint32_t *key, uint16_t flags)
+{
+	uint16_t sport, dport;
+	uint8_t proto;
+	int offset = 0;
+
+	if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0))
+		return (0);
+	proto = flags_to_proto(flags);
+	sport = dport = key[2] = key[1] = key[0] = 0;
+	if ((ssin != NULL) && (flags & FL_HASH_ALL)) {
+		key[1] = ssin->sin_addr.s_addr;
+		sport = ssin->sin_port;
+	}
+	if (dsin != NULL) {
+		key[2] = dsin->sin_addr.s_addr;
+		dport = dsin->sin_port;
+	}
+	if (flags & FL_HASH_ALL) {
+		((uint16_t *)key)[0] = sport;
+		((uint16_t *)key)[1] = dport; 
+	} else
+		offset = V_flow_hashjitter + proto;
 
-	((uint16_t *)key)[0] = sport;
-	((uint16_t *)key)[1] = dport; 
+	return (jenkins_hashword(key, 3, offset));
+}
 
-skipports:
-	hash = jenkins_hashword(key, 3, V_flow_hashjitter + proto);
-	if (m != NULL && (m->m_flags & M_FLOWID) == 0) {
-		m->m_flags |= M_FLOWID;
-		m->m_pkthdr.flowid = hash;
+static struct flentry *
+flowtable_lookup_mbuf4(struct flowtable *ft, struct mbuf *m)
+{
+	struct sockaddr_storage ssa, dsa;
+	uint16_t flags;
+	struct sockaddr_in *dsin, *ssin;
+
+	dsin = (struct sockaddr_in *)&dsa;
+	ssin = (struct sockaddr_in *)&ssa;
+	flags = ft->ft_flags;
+	if (ipv4_mbuf_demarshal(ft, m, ssin, dsin, &flags) != 0)
+		return (NULL);
+
+	return (flowtable_lookup(ft, &ssa, &dsa, M_GETFIB(m), flags));
+}
+
+void
+flow_to_route(struct flentry *fle, struct route *ro)
+{
+	uint32_t *hashkey = NULL;
+	struct sockaddr_in *sin;
+
+	sin = (struct sockaddr_in *)&ro->ro_dst;
+	sin->sin_family = AF_INET;
+	sin->sin_len = sizeof(*sin);
+	hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
+	sin->sin_addr.s_addr = hashkey[2];
+	ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
+	ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle);
+}
+#endif /* INET */
+
+#ifdef INET6
+/*
+ * PULLUP_TO(len, p, T) makes sure that len + sizeof(T) is contiguous,
+ * then it sets p to point at the offset "len" in the mbuf. WARNING: the
+ * pointer might become stale after other pullups (but we never use it
+ * this way).
+ */
+#define PULLUP_TO(_len, p, T)						\
+do {									\
+	int x = (_len) + sizeof(T);					\
+	if ((m)->m_len < x) {						\
+		goto receive_failed;					\
+	}								\
+	p = (mtod(m, char *) + (_len));					\
+} while (0)
+
+#define	TCP(p)		((struct tcphdr *)(p))
+#define	SCTP(p)		((struct sctphdr *)(p))
+#define	UDP(p)		((struct udphdr *)(p))
+
+static int
+ipv6_mbuf_demarshal(struct flowtable *ft, struct mbuf *m,
+    struct sockaddr_in6 *ssin6, struct sockaddr_in6 *dsin6, uint16_t *flags)
+{
+	struct ip6_hdr *ip6;
+	uint8_t proto;
+	int hlen;
+	uint16_t src_port, dst_port;
+	u_short offset;
+	void *ulp;
+
+	offset = hlen = src_port = dst_port = 0;
+	ulp = NULL;
+	ip6 = mtod(m, struct ip6_hdr *);
+	hlen = sizeof(struct ip6_hdr);
+	proto = ip6->ip6_nxt;
+
+	if ((*flags & FL_HASH_ALL) == 0)
+		goto skipports;
+
+	while (ulp == NULL) {
+		switch (proto) {
+		case IPPROTO_ICMPV6:
+		case IPPROTO_OSPFIGP:
+		case IPPROTO_PIM:
+		case IPPROTO_CARP:
+		case IPPROTO_ESP:
+		case IPPROTO_NONE:
+			ulp = ip6;
+			break;
+		case IPPROTO_TCP:
+			PULLUP_TO(hlen, ulp, struct tcphdr);
+			dst_port = TCP(ulp)->th_dport;
+			src_port = TCP(ulp)->th_sport;
+			if ((*flags & FL_HASH_ALL) &&
+			    (TCP(ulp)->th_flags & (TH_RST|TH_FIN)))
+				*flags |= FL_STALE;
+			break;
+		case IPPROTO_SCTP:
+			PULLUP_TO(hlen, ulp, struct sctphdr);
+			src_port = SCTP(ulp)->src_port;
+			dst_port = SCTP(ulp)->dest_port;
+			break;
+		case IPPROTO_UDP:
+			PULLUP_TO(hlen, ulp, struct udphdr);
+			dst_port = UDP(ulp)->uh_dport;
+			src_port = UDP(ulp)->uh_sport;
+			break;
+		case IPPROTO_HOPOPTS:	/* RFC 2460 */
+			PULLUP_TO(hlen, ulp, struct ip6_hbh);
+			hlen += (((struct ip6_hbh *)ulp)->ip6h_len + 1) << 3;
+			proto = ((struct ip6_hbh *)ulp)->ip6h_nxt;
+			ulp = NULL;
+			break;
+		case IPPROTO_ROUTING:	/* RFC 2460 */
+			PULLUP_TO(hlen, ulp, struct ip6_rthdr);	
+			hlen += (((struct ip6_rthdr *)ulp)->ip6r_len + 1) << 3;
+			proto = ((struct ip6_rthdr *)ulp)->ip6r_nxt;
+			ulp = NULL;
+			break;
+		case IPPROTO_FRAGMENT:	/* RFC 2460 */
+			PULLUP_TO(hlen, ulp, struct ip6_frag);
+			hlen += sizeof (struct ip6_frag);
+			proto = ((struct ip6_frag *)ulp)->ip6f_nxt;
+			offset = ((struct ip6_frag *)ulp)->ip6f_offlg &
+			    IP6F_OFF_MASK;
+			ulp = NULL;
+			break;
+		case IPPROTO_DSTOPTS:	/* RFC 2460 */
+			PULLUP_TO(hlen, ulp, struct ip6_hbh);
+			hlen += (((struct ip6_hbh *)ulp)->ip6h_len + 1) << 3;
+			proto = ((struct ip6_hbh *)ulp)->ip6h_nxt;
+			ulp = NULL;
+			break;
+		case IPPROTO_AH:	/* RFC 2402 */
+			PULLUP_TO(hlen, ulp, struct ip6_ext);
+			hlen += (((struct ip6_ext *)ulp)->ip6e_len + 2) << 2;
+			proto = ((struct ip6_ext *)ulp)->ip6e_nxt;
+			ulp = NULL;
+			break;
+		default:
+			PULLUP_TO(hlen, ulp, struct ip6_ext);
+			break;
+		}
+	}
+
+	if (src_port == 0) {
+	receive_failed:
+		return (ENOTSUP);
 	}
 
-	return (hash);
-noop:
-	*protop = proto;
+skipports:
+	dsin6->sin6_family = AF_INET6;
+	dsin6->sin6_len = sizeof(*dsin6);
+	dsin6->sin6_port = dst_port;
+	memcpy(&dsin6->sin6_addr, &ip6->ip6_dst, sizeof(struct in6_addr));
+
+	ssin6->sin6_family = AF_INET6;
+	ssin6->sin6_len = sizeof(*ssin6);
+	ssin6->sin6_port = src_port;
+	memcpy(&ssin6->sin6_addr, &ip6->ip6_src, sizeof(struct in6_addr));
+	*flags |= proto_to_flags(proto);
+
 	return (0);
 }
 
+#define zero_key(key) 		\
+do {				\
+	key[0] = 0;		\
+	key[1] = 0;		\
+	key[2] = 0;		\
+	key[3] = 0;		\
+	key[4] = 0;		\
+	key[5] = 0;		\
+	key[6] = 0;		\
+	key[7] = 0;		\
+	key[8] = 0;		\
+} while (0)
+	
+static uint32_t
+ipv6_flow_lookup_hash_internal(
+	struct sockaddr_in6 *ssin6, struct sockaddr_in6 *dsin6, 
+	    uint32_t *key, uint16_t flags)
+{
+	uint16_t sport, dport;
+	uint8_t proto;
+	int offset = 0;
+
+	if ((V_flowtable_enable == 0) || (V_flowtable_ready == 0))
+		return (0);
+
+	proto = flags_to_proto(flags);
+	zero_key(key);
+	sport = dport = 0;
+	if (dsin6 != NULL) {
+		memcpy(&key[1], &dsin6->sin6_addr, sizeof(struct in6_addr));
+		dport = dsin6->sin6_port;
+	}
+	if ((ssin6 != NULL) && (flags & FL_HASH_ALL)) {
+		memcpy(&key[5], &ssin6->sin6_addr, sizeof(struct in6_addr));
+		sport = ssin6->sin6_port;
+	}
+	if (flags & FL_HASH_ALL) {
+		((uint16_t *)key)[0] = sport;
+		((uint16_t *)key)[1] = dport; 
+	} else
+		offset = V_flow_hashjitter + proto;
+
+	return (jenkins_hashword(key, 9, offset));
+}
+
+static struct flentry *
+flowtable_lookup_mbuf6(struct flowtable *ft, struct mbuf *m)
+{
+	struct sockaddr_storage ssa, dsa;
+	struct sockaddr_in6 *dsin6, *ssin6;	
+	uint16_t flags;
+
+	dsin6 = (struct sockaddr_in6 *)&dsa;
+	ssin6 = (struct sockaddr_in6 *)&ssa;
+	flags = ft->ft_flags;
+	
+	if (ipv6_mbuf_demarshal(ft, m, ssin6, dsin6, &flags) != 0)
+		return (NULL);
+
+	return (flowtable_lookup(ft, &ssa, &dsa, M_GETFIB(m), flags));
+}
+
+void
+flow_to_route_in6(struct flentry *fle, struct route_in6 *ro)
+{
+	uint32_t *hashkey = NULL;
+	struct sockaddr_in6 *sin6;
+
+	sin6 = (struct sockaddr_in6 *)&ro->ro_dst;
+
+	sin6->sin6_family = AF_INET6;
+	sin6->sin6_len = sizeof(*sin6);
+	hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
+	memcpy(&sin6->sin6_addr, &hashkey[5], sizeof (struct in6_addr));
+	ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
+	ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle);
+
+}
+#endif /* INET6 */
+
 static bitstr_t *
 flowtable_mask(struct flowtable *ft)
 {
@@ -512,14 +901,30 @@ flowtable_set_hashkey(struct flentry *fl
 		hashkey[i] = key[i];
 }
 
+
+static uint32_t *
+flowtable_get_hashkey(struct flentry *fle)
+{
+	uint32_t *hashkey;
+
+	if (fle->f_flags & FL_IPV6)
+		hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
+	else
+		hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
+
+	return (hashkey);
+}
+
 static int
 flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key,
-    uint8_t proto, uint32_t fibnum, struct route *ro, uint16_t flags)
+    uint32_t fibnum, struct route *ro, uint16_t flags)
 {
 	struct flentry *fle, *fletail, *newfle, **flep;
+	struct flowtable_stats *fs = &ft->ft_stats[curcpu];
 	int depth;
 	uma_zone_t flezone;
 	bitstr_t *mask;
+	uint8_t proto;
 
 	flezone = (flags & FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone;
 	newfle = uma_zalloc(flezone, M_NOWAIT | M_ZERO);
@@ -527,7 +932,8 @@ flowtable_insert(struct flowtable *ft, u
 		return (ENOMEM);
 
 	newfle->f_flags |= (flags & FL_IPV6);
-	
+	proto = flags_to_proto(flags);
+
 	FL_ENTRY_LOCK(ft, hash);
 	mask = flowtable_mask(ft);
 	flep = flowtable_entry(ft, hash);
@@ -540,7 +946,7 @@ flowtable_insert(struct flowtable *ft, u
 	} 
 	
 	depth = 0;
-	V_flowtable_collisions++;
+	fs->ft_collisions++;
 	/*
 	 * find end of list and make sure that we were not
 	 * preempted by another thread handling this flow
@@ -554,6 +960,9 @@ flowtable_insert(struct flowtable *ft, u
 			FL_ENTRY_UNLOCK(ft, hash);
 			uma_zfree((newfle->f_flags & FL_IPV6) ?
 			    V_flow_ipv6_zone : V_flow_ipv4_zone, newfle);
+
+			if (flags & FL_OVERWRITE) 
+				goto skip;
 			return (EEXIST);
 		}
 		/*
@@ -566,8 +975,8 @@ flowtable_insert(struct flowtable *ft, u
 		fle = fle->f_next;
 	} 
 
-	if (depth > V_flowtable_max_depth)
-		V_flowtable_max_depth = depth;
+	if (depth > fs->ft_max_depth)
+		fs->ft_max_depth = depth;
 	fletail->f_next = newfle;
 	fle = newfle;
 skip:
@@ -583,6 +992,35 @@ skip:
 	return (0);
 }
 
+int
+kern_flowtable_insert(struct flowtable *ft,
+    struct sockaddr_storage *ssa, struct sockaddr_storage *dsa,
+    struct route *ro, uint32_t fibnum, int flags)
+{
+	uint32_t key[9], hash;
+
+	flags = (ft->ft_flags | flags | FL_OVERWRITE);
+	hash = 0;
+
+#ifdef INET
+	if (ssa->ss_family == AF_INET) 
+		hash = ipv4_flow_lookup_hash_internal((struct sockaddr_in *)ssa,
+		    (struct sockaddr_in *)dsa, key, flags);
+#endif
+#ifdef INET6
+	if (ssa->ss_family == AF_INET6) 
+		hash = ipv6_flow_lookup_hash_internal((struct sockaddr_in6 *)ssa,
+		    (struct sockaddr_in6 *)dsa, key, flags);
+#endif	
+	if (ro->ro_rt == NULL || ro->ro_lle == NULL)
+		return (EINVAL);
+
+	FLDPRINTF(ft, FL_DEBUG,
+	    "kern_flowtable_insert: key=%x:%x:%x hash=%x fibnum=%d flags=%x\n",
+	    key[0], key[1], key[2], hash, fibnum, flags);
+	return (flowtable_insert(ft, hash, key, fibnum, ro, flags));
+}
+
 static int
 flowtable_key_equal(struct flentry *fle, uint32_t *key)
 {
@@ -596,7 +1034,7 @@ flowtable_key_equal(struct flentry *fle,
 		nwords = 3;
 		hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
 	}
-	
+
 	for (i = 0; i < nwords; i++) 
 		if (hashkey[i] != key[i])
 			return (0);
@@ -604,44 +1042,86 @@ flowtable_key_equal(struct flentry *fle,
 	return (1);
 }
 
-int
-flowtable_lookup(struct flowtable *ft, struct mbuf *m, struct route *ro, uint32_t fibnum)
+struct flentry *
+flowtable_lookup_mbuf(struct flowtable *ft, struct mbuf *m, int af)
+{
+	struct flentry *fle = NULL;
+
+#ifdef INET
+	if (af == AF_INET)
+		fle = flowtable_lookup_mbuf4(ft, m);
+#endif
+#ifdef INET6
+	if (af == AF_INET6)
+		fle = flowtable_lookup_mbuf6(ft, m);
+#endif	
+	if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) {
+		m->m_flags |= M_FLOWID;
+		m->m_pkthdr.flowid = fle->f_fhash;
+	}
+	return (fle);
+}
+	
+struct flentry *
+flowtable_lookup(struct flowtable *ft, struct sockaddr_storage *ssa,
+    struct sockaddr_storage *dsa, uint32_t fibnum, int flags)
 {
 	uint32_t key[9], hash;
 	struct flentry *fle;
-	uint16_t flags;
+	struct flowtable_stats *fs = &ft->ft_stats[curcpu];
 	uint8_t proto = 0;
 	int error = 0;
 	struct rtentry *rt;
 	struct llentry *lle;
+	struct route sro, *ro;
+	struct route_in6 sro6;
 
-	flags = ft->ft_flags;
-	ro->ro_rt = NULL;
-	ro->ro_lle = NULL;
+	sro.ro_rt = sro6.ro_rt = NULL;
+	sro.ro_lle = sro6.ro_lle = NULL;
+	ro = NULL;
+	hash = 0;
+	flags |= ft->ft_flags;
+	proto = flags_to_proto(flags);
+#ifdef INET
+	if (ssa->ss_family == AF_INET) {
+		struct sockaddr_in *ssin, *dsin;
+
+		ro = &sro;
+		memcpy(&ro->ro_dst, dsa, sizeof(struct sockaddr_in));
+		dsin = (struct sockaddr_in *)dsa;
+		ssin = (struct sockaddr_in *)ssa;
+		if ((dsin->sin_addr.s_addr == ssin->sin_addr.s_addr) ||
+		    (ntohl(dsin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET ||
+		    (ntohl(ssin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET)
+			return (NULL);
 
-	/*
-	 * The internal hash lookup is the only IPv4 specific bit
-	 * remaining
-	 *
-	 * XXX BZ: to add IPv6 support just add a check for the
-	 * address type in m and ro and an equivalent ipv6 lookup
-	 * function - the rest of the code should automatically
-	 * handle an ipv6 flow (note that m can be NULL in which
-	 * case ro will be set)
-	 */
-	hash = ipv4_flow_lookup_hash_internal(m, ro, key,
-	    &flags, &proto);
+		hash = ipv4_flow_lookup_hash_internal(ssin, dsin, key, flags);
+	}
+#endif
+#ifdef INET6
+	if (ssa->ss_family == AF_INET6) {
+		struct sockaddr_in6 *ssin6, *dsin6;
+
+		ro = (struct route *)&sro6;
+		memcpy(&sro6.ro_dst, dsa,
+		    sizeof(struct sockaddr_in6));
+		dsin6 = (struct sockaddr_in6 *)dsa;
+		ssin6 = (struct sockaddr_in6 *)ssa;
 
+		flags |= FL_IPV6;
+		hash = ipv6_flow_lookup_hash_internal(ssin6, dsin6, key, flags);
+	}
+#endif
 	/*
 	 * Ports are zero and this isn't a transmit cache
 	 * - thus not a protocol for which we need to keep 
 	 * state
-	 * FL_HASH_PORTS => key[0] != 0 for TCP || UDP || SCTP
+	 * FL_HASH_ALL => key[0] != 0 for TCP || UDP || SCTP
 	 */
-	if (hash == 0 || (key[0] == 0 && (ft->ft_flags & FL_HASH_PORTS)))
-		return (ENOENT);
+	if (hash == 0 || (key[0] == 0 && (ft->ft_flags & FL_HASH_ALL)))
+		return (NULL);
 
-	V_flowtable_lookups++;
+	fs->ft_lookups++;
 	FL_ENTRY_LOCK(ft, hash);
 	if ((fle = FL_ENTRY(ft, hash)) == NULL) {
 		FL_ENTRY_UNLOCK(ft, hash);
@@ -657,21 +1137,21 @@ keycheck:	
 	    && (fibnum == fle->f_fibnum)
 	    && (rt->rt_flags & RTF_UP)
 	    && (rt->rt_ifp != NULL)) {
-		V_flowtable_hits++;
+		fs->ft_hits++;
 		fle->f_uptime = time_uptime;
 		fle->f_flags |= flags;
-		ro->ro_rt = rt;
-		ro->ro_lle = lle;
 		FL_ENTRY_UNLOCK(ft, hash);
-		return (0);
+		return (fle);
 	} else if (fle->f_next != NULL) {
 		fle = fle->f_next;
 		goto keycheck;
 	}
 	FL_ENTRY_UNLOCK(ft, hash);
-
 uncached:
-	V_flowtable_misses++;
+	if (flags & FL_NOAUTO)
+		return (NULL);
+
+	fs->ft_misses++;
 	/*
 	 * This bit of code ends up locking the
 	 * same route 3 times (just like ip_output + ether_output)
@@ -684,36 +1164,64 @@ uncached:
 	 * receive the route locked
 	 */
 
+#ifdef INVARIANTS
+	if ((ro->ro_dst.sa_family != AF_INET) &&
+	    (ro->ro_dst.sa_family != AF_INET6))
+		panic("sa_family == %d\n", ro->ro_dst.sa_family);
+#endif
+
 	ft->ft_rtalloc(ro, hash, fibnum);
 	if (ro->ro_rt == NULL) 
 		error = ENETUNREACH;
 	else {
 		struct llentry *lle = NULL;
-		struct sockaddr *l3addr;
+		struct sockaddr_storage *l3addr;
 		struct rtentry *rt = ro->ro_rt;
 		struct ifnet *ifp = rt->rt_ifp;
 
 		if (ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) {
 			RTFREE(rt);
 			ro->ro_rt = NULL;
-			return (ENOENT);
+			return (NULL);
 		}
+#ifdef INET6
+		if (ssa->ss_family == AF_INET6) {
+			struct sockaddr_in6 *dsin6;
+
+			dsin6 = (struct sockaddr_in6 *)dsa;			
+			if (in6_localaddr(&dsin6->sin6_addr)) {
+				RTFREE(rt);
+				ro->ro_rt = NULL;
+				return (NULL);				
+			}
 
-		if (rt->rt_flags & RTF_GATEWAY)
-			l3addr = rt->rt_gateway;
-		else
-			l3addr = &ro->ro_dst;
-		llentry_update(&lle, LLTABLE(ifp), l3addr, ifp);
+			if (rt->rt_flags & RTF_GATEWAY)
+				l3addr = (struct sockaddr_storage *)rt->rt_gateway;
+			
+			else

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 06:31:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B59F1065673;
	Fri, 12 Mar 2010 06:31:20 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 328728FC13;
	Fri, 12 Mar 2010 06:31: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 o2C6VKDO017180;
	Fri, 12 Mar 2010 06:31:20 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C6VKgR017178;
	Fri, 12 Mar 2010 06:31:20 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003120631.o2C6VKgR017178@svn.freebsd.org>
From: Kip Macy 
Date: Fri, 12 Mar 2010 06:31: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: r205069 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 06:31:20 -0000

Author: kmacy
Date: Fri Mar 12 06:31:19 2010
New Revision: 205069
URL: http://svn.freebsd.org/changeset/base/205069

Log:
  fix stats reporting sysctl

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Fri Mar 12 05:16:24 2010	(r205068)
+++ head/sys/net/flowtable.c	Fri Mar 12 06:31:19 2010	(r205069)
@@ -1,6 +1,6 @@
 /**************************************************************************
 
-Copyright (c) 2008-2010, BitGravity Inc.
+Copyright (c) 2008-2009, BitGravity Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -298,14 +298,11 @@ SYSCTL_VNET_PROC(_net_inet_flowtable, OI
 
 
 
-#define FS_PRINT(sb, field)	sbuf_printf((sb), "\t%s=%jd", #field, fs->ft_##field)
+#define FS_PRINT(sb, field)	sbuf_printf((sb), "\t%s: %jd\n", #field, fs->ft_##field)
 
 static void
-fs_print(struct flowtable_stats *fs)
+fs_print(struct sbuf *sb, struct flowtable_stats *fs)
 {
-	struct sbuf *sb;
-
-	sb = sbuf_new(NULL, NULL, 32*1024, SBUF_FIXEDLEN);
 
 	FS_PRINT(sb, collisions);
 	FS_PRINT(sb, allocated);
@@ -315,12 +312,10 @@ fs_print(struct flowtable_stats *fs)
 	FS_PRINT(sb, frees);
 	FS_PRINT(sb, hits);
 	FS_PRINT(sb, lookups);
-	sbuf_finish(sb);
-	
 }
 
 static void
-flowtable_show_stats(struct flowtable *ft)
+flowtable_show_stats(struct sbuf *sb, struct flowtable *ft)
 {
 	int i;
 	struct flowtable_stats fs, *pfs;
@@ -344,27 +339,32 @@ flowtable_show_stats(struct flowtable *f
 	} else {
 		pfs = &ft->ft_stats[0];
 	}
-
-	fs_print(pfs);
+	fs_print(sb, pfs);
 }
 
 static int
 sysctl_flowtable_stats(SYSCTL_HANDLER_ARGS)
 {
 	struct flowtable *ft;
+	struct sbuf *sb;
+	int error;
+
+	sb = sbuf_new(NULL, NULL, 64*1024, SBUF_FIXEDLEN);
 
 	ft = V_flow_list_head;
 	while (ft != NULL) {
-		printf("name: %s\n", ft->ft_name);
-		flowtable_show_stats(ft);
+		sbuf_printf(sb, "\ntable name: %s\n", ft->ft_name);
+		flowtable_show_stats(sb, ft);
 		ft = ft->ft_next;
 	}
+	sbuf_finish(sb);
+	error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1);
+	sbuf_delete(sb);
 
-	return (0);
+	return (error);
 }
-SYSCTL_VNET_PROC(_net_inet_flowtable, OID_AUTO, stats,
-    CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_flowtable_stats, "IU",
-    "flowtable statistics");
+SYSCTL_VNET_PROC(_net_inet_flowtable, OID_AUTO, stats, CTLTYPE_STRING|CTLFLAG_RD,
+    NULL, 0, sysctl_flowtable_stats, "A", "flowtable statistics");
 
 
 #ifndef RADIX_MPATH

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 06:57:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FB82106566B;
	Fri, 12 Mar 2010 06:57:53 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F8408FC12;
	Fri, 12 Mar 2010 06:57: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 o2C6vrKf023145;
	Fri, 12 Mar 2010 06:57:53 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C6vrX2023142;
	Fri, 12 Mar 2010 06:57:53 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201003120657.o2C6vrX2023142@svn.freebsd.org>
From: Edwin Groothuis 
Date: Fri, 12 Mar 2010 06:57: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: r205071 - head/usr.bin/ncal
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 06:57:53 -0000

Author: edwin
Date: Fri Mar 12 06:57:53 2010
New Revision: 205071
URL: http://svn.freebsd.org/changeset/base/205071

Log:
  - With the introduction of -A, -B and -3, not all combinations of
    arguments makes sense anymore. For example, what would a combination
    of -3 (show three months) and -y (show the whole year) do?
    We will abort on these cases.
  - Move the debug option -d to -H (from highlight), while -d is now
    used for setting the day of "today" so that -y and friends can
    be tested.

Modified:
  head/usr.bin/ncal/ncal.1
  head/usr.bin/ncal/ncal.c

Modified: head/usr.bin/ncal/ncal.1
==============================================================================
--- head/usr.bin/ncal/ncal.1	Fri Mar 12 06:56:51 2010	(r205070)
+++ head/usr.bin/ncal/ncal.1	Fri Mar 12 06:57:53 2010	(r205071)
@@ -117,12 +117,6 @@ Britain and her colonies switched to the
 Print the number of the week below each week column.
 .It Fl y
 Display a calendar for the specified year.
-.It Fl b
-Switch to backwards compatibility mode (for debugging).
-.It Fl d Ar yyyy-mm-dd
-Use
-.Ar yyyy-mm-dd
-as the current date (for debugging of highlighting).
 .It Fl 3
 Display the previous, current and next month surrounding today.
 .It Fl A Ar number
@@ -133,6 +127,16 @@ of months after the current month.
 Display the
 .Ar number
 of months before the current month.
+.It Fl b
+Switch to backwards compatibility mode (for debugging).
+.It Fl d Ar yyyy-mm
+Use
+.Ar yyyy-mm
+as the current date (for debugging of date selection).
+.It Fl H Ar yyyy-mm-dd
+Use
+.Ar yyyy-mm-dd
+as the current date (for debugging of highlighting).
 .El
 .Pp
 A single parameter specifies the year (1\(en9999) to be displayed;
@@ -148,6 +152,14 @@ year default to those of the current sys
 will display a calendar for the month of August in the current
 year).
 .Pp
+Not all options can be used together. For example
+.Dq Li -3 -A 2 -B 3 -y -m 7
+would mean:
+show me the three months around the seventh month, three before
+that, two after that and the whole year.
+.Nm ncal
+will warn about these combinations.
+.Pp
 A year starts on January 1.
 .Sh SEE ALSO
 .Xr calendar 3 ,

Modified: head/usr.bin/ncal/ncal.c
==============================================================================
--- head/usr.bin/ncal/ncal.c	Fri Mar 12 06:56:51 2010	(r205070)
+++ head/usr.bin/ncal/ncal.c	Fri Mar 12 06:57:53 2010	(r205071)
@@ -163,25 +163,25 @@ int	flag_nohighlight;	/* user doesn't wa
 int     flag_weeks;		/* user wants number of week */
 int     nswitch;		/* user defined switch date */
 int	nswitchb;		/* switch date for backward compatibility */
-int	today;
+int	highlightdate;
 
 char	*center(char *s, char *t, int w);
 wchar_t *wcenter(wchar_t *s, wchar_t *t, int w);
+int	firstday(int y, int m);
+void	highlight(char *dst, char *src, int len, int *extraletters);
 void	mkmonthr(int year, int month, int jd_flag, struct monthlines * monthl);
 void	mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl);
 void	mkweekdays(struct weekdays * wds);
+void	monthranger(int year, int m, int jd_flag, int before, int after);
+void	monthrangeb(int year, int m, int jd_flag, int before, int after);
 int	parsemonth(const char *s, int *m, int *y);
 void	printcc(void);
 void	printeaster(int year, int julian, int orthodox);
-int	firstday(int y, int m);
 date	*sdater(int ndays, struct date * d);
 date	*sdateb(int ndays, struct date * d);
 int	sndaysr(struct date * d);
 int	sndaysb(struct date * d);
 static void	usage(void);
-void	monthranger(int year, int jd_flag, int m, int before, int after);
-void	monthrangeb(int year, int jd_flag, int m, int before, int after);
-void	highlight(char *dst, char *src, int len, int *extraletters);
 
 int
 main(int argc, char *argv[])
@@ -194,15 +194,21 @@ main(int argc, char *argv[])
 	int     m = 0;			/* month */
 	int	y = 0;			/* year */
 	int     flag_backward = 0;	/* user called cal--backward compat. */
-	int     flag_hole_year = 0;	/* user wants the whole year */
+	int     flag_wholeyear = 0;	/* user wants the whole year */
 	int	flag_julian_cal = 0;	/* user wants Julian Calendar */
-	int     flag_julian_day = 0;	/* user wants the Julian day
-					 * numbers */
-	int	flag_orthodox = 0;	/* use wants Orthodox easter */
-	int	flag_easter = 0;	/* use wants easter date */
+	int     flag_julian_day = 0;	/* user wants the Julian day numbers */
+	int	flag_orthodox = 0;	/* user wants Orthodox easter */
+	int	flag_easter = 0;	/* user wants easter date */
+	int	flag_3months = 0;	/* user wants 3 month display (-3) */
+	int	flag_after = 0;		/* user wants to see months after */
+	int	flag_before = 0;	/* user wants to see months before */
+	int	flag_specifiedmonth = 0;/* user wants to see this month (-m) */
+	int	flag_givenmonth = 0;	/* user has specified month [n] */
+	int	flag_givenyear = 0;	/* user has specified year [n] */
 	char	*cp;			/* character pointer */
+	char	*flag_today = NULL;	/* debug: use date as being today */
 	char	*flag_month = NULL;	/* requested month as string */
-	char	*flag_highlightdate = NULL;
+	char	*flag_highlightdate = NULL; /* debug: date to highlight */
 	int	before, after;
 	const char    *locale;		/* locale to get country code */
 
@@ -250,20 +256,26 @@ main(int argc, char *argv[])
 
 	before = after = -1;
 
-	while ((ch = getopt(argc, argv, "A:B:3Jbd:ehjm:ops:wy")) != -1)
+	while ((ch = getopt(argc, argv, "A:B:3Jbd:eH:hjm:ops:wy")) != -1)
 		switch (ch) {
 		case '3':
-			before = after = 1;
+			flag_3months = 1;
 			break;
 		case 'A':
-			after = strtol(optarg, NULL, 10);
-			if (after < 0)
-				errx(1, "Argument to -A must be positive");
+			if (flag_after > 0)
+				errx(EX_USAGE, "Double -A specified");
+			flag_after = strtol(optarg, NULL, 10);
+			if (flag_after <= 0)
+				errx(EX_USAGE,
+				    "Argument to -A must be positive");
 			break;
 		case 'B':
-			before = strtol(optarg, NULL, 10);
-			if (before < 0)
-				errx(1, "Argument to -B must be positive");
+			if (flag_before > 0)
+				errx(EX_USAGE, "Double -A specified");
+			flag_before = strtol(optarg, NULL, 10);
+			if (flag_before <= 0)
+				errx(EX_USAGE,
+				    "Argument to -B must be positive");
 			break;
 		case 'J':
 			if (flag_backward)
@@ -275,6 +287,9 @@ main(int argc, char *argv[])
 			flag_backward = 1;
 			break;
 		case 'd':
+			flag_today = optarg;
+			break;
+		case 'H':
 			flag_highlightdate = optarg;
 			break;
 		case 'h':
@@ -289,9 +304,10 @@ main(int argc, char *argv[])
 			flag_julian_day = 1;
 			break;
 		case 'm':
+			if (flag_specifiedmonth)
+				errx(EX_USAGE, "Double -m specified");
 			flag_month = optarg;
-			before = 0;
-			after = 0;
+			flag_specifiedmonth = 1;
 			break;
 		case 'o':
 			if (flag_backward)
@@ -324,7 +340,7 @@ main(int argc, char *argv[])
 			flag_weeks = 1;
 			break;
 		case 'y':
-			flag_hole_year = 1;
+			flag_wholeyear = 1;
 			break;
 		default:
 			usage();
@@ -338,22 +354,21 @@ main(int argc, char *argv[])
 		if (flag_easter)
 			usage();
 		flag_month = *argv++;
-		before = 0;
-		after = 0;
+		flag_givenmonth = 1;
 		m = strtol(flag_month, NULL, 10);
 		/* FALLTHROUGH */
 	case 1:
-		y = atoi(*argv++);
+		y = atoi(*argv);
 		if (y < 1 || y > 9999)
-			errx(EX_USAGE, "year %d not in range 1..9999", y);
-		if (before == -1 && after == -1) {
-			before = 0;
-			after = 11;
-			m = 1;
-		}
+			errx(EX_USAGE, "year `%s' not in range 1..9999", *argv);
+		argv++;
+		flag_givenyear = 1;
 		break;
 	case 0:
-		{
+		if (flag_today != NULL) {
+			y = strtol(flag_today, NULL, 10);
+			m = strtol(flag_today + 5, NULL, 10);
+		} else {
 			time_t t;
 			struct tm *tm;
 
@@ -361,22 +376,12 @@ main(int argc, char *argv[])
 			tm = localtime(&t);
 			y = tm->tm_year + 1900;
 			m = tm->tm_mon + 1;
-			if (before == -1)
-				before = 0;
-			if (after == -1)
-				after = 0;
 		}
 		break;
 	default:
 		usage();
 	}
 
-	if (flag_hole_year) {
-		m = 1;
-		before = 0;
-		after = 11;
-	}
-
 	if (flag_month != NULL) {
 		if (parsemonth(flag_month, &m, &y)) {
 			errx(EX_USAGE,
@@ -385,6 +390,84 @@ main(int argc, char *argv[])
 		}
 	}
 
+	/*
+	 * What is not supported:
+	 * -3 with -A or -B
+	 *	-3 displays 3 months, -A and -B change that behaviour.
+	 * -3 with -y
+	 *	-3 displays 3 months, -y says display a whole year.
+	 * -3 with a given year but no given month or without -m
+	 *	-3 displays 3 months, no month specified doesn't make clear
+	 *      which three months.
+	 * -m with a given month
+	 *	conflicting arguments, both specify the same field.
+	 * -y with -m
+	 *	-y displays the whole year, -m displays a single month.
+	 * -y with a given month
+	 *	-y displays the whole year, the given month displays a single
+	 *	month.
+	 * -y with -A or -B
+	 *	-y displays the whole year, -A and -B display extra months.
+	 */
+
+	/* -3 together with -A or -B. */
+	if (flag_3months && (flag_after || flag_before))
+		errx(EX_USAGE, "-3 together with -A and -B is not supported.");
+	/* -3 together with -y. */
+	if (flag_3months && flag_wholeyear)
+		errx(EX_USAGE, "-3 together with -y is not supported.");
+	/* -3 together with givenyear but no givenmonth. */
+	if (flag_3months && flag_givenyear &&
+	    !(flag_givenmonth || flag_specifiedmonth))
+		errx(EX_USAGE,
+		    "-3 together with a given year but no given month is "
+		    "not supported.");
+	/* -m together with xx xxxx. */
+	if (flag_specifiedmonth && flag_givenmonth)
+		errx(EX_USAGE,
+		    "-m together with a given month is not supported.");
+	/* -y together with -m. */
+	if (flag_wholeyear && flag_specifiedmonth)
+		errx(EX_USAGE, "-y together with -m is not supported.");
+	/* -y together with xx xxxx. */
+	if (flag_wholeyear && flag_givenmonth)
+		errx(EX_USAGE, "-y together a given month is not supported.");
+	/* -y together with -A or -B. */
+	if (flag_wholeyear && (flag_before > 0 || flag_after > 0))
+		errx(EX_USAGE, "-y together a -A or -B is not supported.");
+	/* The rest should be fine. */
+
+	/* Select the period to display, in order of increasing priority .*/
+	if (flag_wholeyear ||
+	    (flag_givenyear && !(flag_givenmonth || flag_specifiedmonth))) {
+		m = 1;
+		before = 0;
+		after = 11;
+	}
+	if (flag_givenyear && flag_givenmonth) {
+		before = 0;
+		after = 0;
+	}
+	if (flag_specifiedmonth) {
+		before = 0;
+		after = 0;
+	}
+	if (flag_before) {
+		before = flag_before;
+	}
+	if (flag_after) {
+		after = flag_after;
+	}
+	if (flag_3months) {
+		before = 1;
+		after = 1;
+	}
+	if (after == -1)
+		after = 0;
+	if (before == -1)
+		before = 0;
+
+	/* Highlight a specified day or today .*/
 	if (flag_highlightdate != NULL) {
 		dt.y = strtol(flag_highlightdate, NULL, 10);
 		dt.m = strtol(flag_highlightdate + 5, NULL, 10);
@@ -399,15 +482,16 @@ main(int argc, char *argv[])
 		dt.m = tm1->tm_mon + 1;
 		dt.d = tm1->tm_mday;
 	}
-	today = sndaysb(&dt);
+	highlightdate = sndaysb(&dt);
 
+	/* And now we finally start to calculate and output calendars. */
 	if (flag_easter)
 		printeaster(y, flag_julian_cal, flag_orthodox);
 	else
 		if (flag_backward)
-			monthrangeb(y, flag_julian_day, m, before, after);
+			monthrangeb(y, m, flag_julian_day, before, after);
 		else
-			monthranger(y, flag_julian_day, m, before, after);
+			monthranger(y, m, flag_julian_day, before, after);
 	return (0);
 }
 
@@ -420,12 +504,12 @@ usage(void)
 	    "       cal [-hj] [-m month] [year]\n"
 	    "       ncal [-hJjpwy] [-s country_code] [[month] year]\n"
 	    "       ncal [-hJeo] [year]\n"
-	    "for debug the highlighting: [-b] [-d yyyy-mm-dd]\n",
+	    "for debug the highlighting: [-b] [-H yyyy-mm-dd] [-d yyyy-mm]\n",
 	    stderr);
 	exit(EX_USAGE);
 }
 
-/* print the assumed switches for all countries */
+/* Print the assumed switches for all countries. */
 void
 printcc(void)
 {
@@ -446,7 +530,7 @@ printcc(void)
 		printf(FSTR"\n", FSTRARG(p));
 }
 
-/* print the date of easter sunday */
+/* Print the date of easter sunday. */
 void
 printeaster(int y, int julian, int orthodox)
 {
@@ -491,8 +575,9 @@ printeaster(int y, int julian, int ortho
 #define	M2Y(m)	((m) / 12)
 #define	M2M(m)	(1 + (m) % 12) 
 
+/* Print all months for the period in the range [ before .. y-m .. after ]. */
 void
-monthrangeb(int y, int jd_flag, int m, int before, int after)
+monthrangeb(int y, int m, int jd_flag, int before, int after)
 {
 	struct monthlines year[12];
 	struct weekdays wds;
@@ -539,14 +624,14 @@ monthrangeb(int y, int jd_flag, int m, i
 		if (m != m1)
 			printf("\n");
 
-		/* Year at the top */
+		/* Year at the top. */
 		if (printyearheader && M2Y(m) != prevyear) {
 			sprintf(s, "%d", M2Y(m));
 			printf("%s\n", center(t, s, mpl * mw));
 			prevyear = M2Y(m);
 		}
 
-		/* Month names */
+		/* Month names. */
 		for (i = 0; i < count; i++)
 			if (printyearheader)
 				wprintf(L"%-*ls  ",
@@ -558,7 +643,7 @@ monthrangeb(int y, int jd_flag, int m, i
 			}
 		printf("\n");
 
-		/* Day of the week names */
+		/* Day of the week names. */
 		for (i = 0; i < count; i++) {
 			wprintf(L"%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls%s%ls ",
 				wdss, wds.names[6], wdss, wds.names[0],
@@ -568,6 +653,7 @@ monthrangeb(int y, int jd_flag, int m, i
 		}
 		printf("\n");
 
+		/* And the days of the month. */
 		for (i = 0; i != 6; i++) {
 			for (j = 0; j < count; j++)
 				printf("%-*s  ",
@@ -581,7 +667,7 @@ monthrangeb(int y, int jd_flag, int m, i
 }
 
 void
-monthranger(int y, int jd_flag, int m, int before, int after)
+monthranger(int y, int m, int jd_flag, int before, int after)
 {
 	struct monthlines year[12];
 	struct weekdays wds;
@@ -621,18 +707,18 @@ monthranger(int y, int jd_flag, int m, i
 			count++;
 		}
 
-		/* Empty line between two rows of months */
+		/* Empty line between two rows of months. */
 		if (m != m1)
 			printf("\n");
 
-		/* Year at the top */
+		/* Year at the top. */
 		if (printyearheader && M2Y(m) != prevyear) {
 			sprintf(s, "%d", M2Y(m));
 			printf("%s\n", center(t, s, mpl * mw));
 			prevyear = M2Y(m);
 		}
 
-		/* Month names */
+		/* Month names. */
 		wprintf(L"    ");
 		for (i = 0; i < count; i++)
 			if (printyearheader)
@@ -642,6 +728,7 @@ monthranger(int y, int jd_flag, int m, i
 				    mw - wcslen(year[i].name) - 1, M2Y(m + i));
 		printf("\n");
 
+		/* And the days of the month. */
 		for (i = 0; i != 7; i++) {
 			/* Week day */
 			wprintf(L"%.2ls", wds.names[i]);
@@ -654,6 +741,7 @@ monthranger(int y, int jd_flag, int m, i
 			printf("\n");
 		}
 
+		/* Week numbers. */
 		if (flag_weeks) {
 			printf("  ");
 			for (i = 0; i < count; i++)
@@ -709,7 +797,7 @@ mkmonthr(int y, int m, int jd_flag, stru
 	 */
 	firstm = first - weekday(first);
 
-	/* Set ds (daystring) and dw (daywidth) according to the jd_flag */
+	/* Set ds (daystring) and dw (daywidth) according to the jd_flag. */
 	if (jd_flag) {
 		ds = jdaystr;
 		dw = 4;
@@ -731,7 +819,7 @@ mkmonthr(int y, int m, int jd_flag, stru
 					dt.d = j - jan1 + 1;
 				else
 					sdater(j, &dt);
-				if (j == today && !flag_nohighlight)
+				if (j == highlightdate && !flag_nohighlight)
 					highlight(mlines->lines[i] + k,
 					    ds + dt.d * dw, dw, &l);
 				else
@@ -744,7 +832,7 @@ mkmonthr(int y, int m, int jd_flag, stru
 		mlines->extralen[i] = l;
 	}
 
-	/* fill the weeknumbers */
+	/* fill the weeknumbers. */
 	if (flag_weeks) {
 		for (j = firstm, k = 0; j < last;  k += dw, j += 7)
 			if (j <= nswitch)
@@ -781,7 +869,7 @@ mkmonthb(int y, int m, int jd_flag, stru
 		dw = 3;
 	}
 
-	/* Set name of month centered */
+	/* Set name of month centered. */
 	memset(&tm, 0, sizeof(tm));
 	tm.tm_mon = m;
 	wcsftime(mlines->name, sizeof(mlines->name) / sizeof(mlines->name[0]),
@@ -835,7 +923,7 @@ mkmonthb(int y, int m, int jd_flag, stru
 					dt.d = j - jan1 + 1;
 				else
 					sdateb(j, &dt);
-				if (j == today && !flag_nohighlight)
+				if (j == highlightdate && !flag_nohighlight)
 					highlight(mlines->lines[i] + k,
 					    ds + dt.d * dw, dw, &l);
 				else
@@ -852,7 +940,7 @@ mkmonthb(int y, int m, int jd_flag, stru
 	}
 }
 
-/* Put the local names of weekdays into the wds */
+/* Put the local names of weekdays into the wds. */
 void
 mkweekdays(struct weekdays *wds)
 {
@@ -878,9 +966,8 @@ mkweekdays(struct weekdays *wds)
 }
 
 /*
- * Compute the day number of the first
- * existing date after the first day in month.
- * (the first day in month and even the month might not exist!)
+ * Compute the day number of the first existing date after the first day in
+ * month. (the first day in month and even the month might not exist!)
  */
 int
 firstday(int y, int m)
@@ -933,7 +1020,7 @@ sndaysb(struct date *d)
 		return (ndaysj(d));
 }
 
-/* Inverse of sndays */
+/* Inverse of sndays. */
 struct date *
 sdater(int nd, struct date *d)
 {
@@ -944,7 +1031,7 @@ sdater(int nd, struct date *d)
 		return (jdate(nd, d));
 }
 
-/* Inverse of sndaysb */
+/* Inverse of sndaysb. */
 struct date *
 sdateb(int nd, struct date *d)
 {
@@ -955,7 +1042,7 @@ sdateb(int nd, struct date *d)
 		return (jdate(nd, d));
 }
 
-/* Center string t in string s of length w by putting enough leading blanks */
+/* Center string t in string s of length w by putting enough leading blanks. */
 char *
 center(char *s, char *t, int w)
 {
@@ -966,7 +1053,7 @@ center(char *s, char *t, int w)
 	return (s);
 }
 
-/* Center string t in string s of length w by putting enough leading blanks */
+/* Center string t in string s of length w by putting enough leading blanks. */
 wchar_t *
 wcenter(wchar_t *s, wchar_t *t, int w)
 {
@@ -1021,7 +1108,7 @@ highlight(char *dst, char *src, int len,
 
 		term_se = term_so = NULL;
 
-		/* On how to highlight on this type of terminal (if any) */
+		/* On how to highlight on this type of terminal (if any). */
 		if (isatty(STDOUT_FILENO) && tgetent(tbuf, NULL) == 1) {
 			b = cbuf;
 			term_so = tgetstr("so", &b);
@@ -1040,42 +1127,45 @@ highlight(char *dst, char *src, int len,
 		return;
 	}
 
-	/* If it is a real terminal, use the data from the termcap database. */
+	/*
+	 * If it is a real terminal, use the data from the termcap database.
+	 */
 	if (term_so != NULL && term_se != NULL) {
-		/* separator */
+		/* separator. */
 		dst[0] = ' ';
 		dst++;
-		/* highlight on */
+		/* highlight on. */
 		memcpy(dst, term_so, strlen(term_so));
 		dst += strlen(term_so);
-		/* the actual text (minus leading space) */
+		/* the actual text. (minus leading space) */
 		len--;
 		src++;
 		memcpy(dst, src, len);
 		dst += len;
-		/* highlight off */
+		/* highlight off. */
 		memcpy(dst, term_se, strlen(term_se));
 		*extralen = strlen(term_so) + strlen(term_se);
 		return;
 	}
 
 	/*
-	 * Otherwise, print a _, backspace and the letter
+	 * Otherwise, print a _, backspace and the letter.
 	 */
 	*extralen = 0;
-	/* skip leading space */
+	/* skip leading space. */
 	src++;
 	len--;
-	/* separator */
+	/* separator. */
 	dst[0] = ' ';
 	dst++;
 	while (len > 0) {
-		/* _ and backspace */
+		/* _ and backspace. */
 		memcpy(dst, "_\010", 2);
 		dst += 2;
 		*extralen += 2;
-		/* the character */
+		/* the character. */
 		*dst++ = *src++;
 		len--;
 	}
+	return;
 }

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:08:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 328B6106564A;
	Fri, 12 Mar 2010 07:08:21 +0000 (UTC)
	(envelope-from neel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0943E8FC19;
	Fri, 12 Mar 2010 07: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 o2C78KGn025550;
	Fri, 12 Mar 2010 07:08:20 GMT (envelope-from neel@svn.freebsd.org)
Received: (from neel@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C78KTG025547;
	Fri, 12 Mar 2010 07:08:20 GMT (envelope-from neel@svn.freebsd.org)
Message-Id: <201003120708.o2C78KTG025547@svn.freebsd.org>
From: Neel Natu 
Date: Fri, 12 Mar 2010 07:08: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: r205072 - in head/sys/mips: include mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:08:21 -0000

Author: neel
Date: Fri Mar 12 07:08:20 2010
New Revision: 205072
URL: http://svn.freebsd.org/changeset/base/205072

Log:
  - Enable kernel stack guard page.
  
  - Unmap the unused kernel stack page that we cannot use because it is
    not aligned on a (PAGE_SIZE * 2) boundary.

Modified:
  head/sys/mips/include/param.h
  head/sys/mips/mips/vm_machdep.c

Modified: head/sys/mips/include/param.h
==============================================================================
--- head/sys/mips/include/param.h	Fri Mar 12 06:57:53 2010	(r205071)
+++ head/sys/mips/include/param.h	Fri Mar 12 07:08:20 2010	(r205072)
@@ -128,14 +128,13 @@
 #define	MAXDUMPPGS	1		/* xxx: why is this only one? */
 
 /*
- * NOTE: In FreeBSD, Uarea's don't have a fixed address.
- *	 Therefore, any code imported from OpenBSD which depends on
- *	 UADDR, UVPN and KERNELSTACK requires porting.
- * XXX: 3 stack pages?  Not 4 which would be more efficient from a tlb
- * XXX: point of view.
+ * The kernel stack needs to be aligned on a (PAGE_SIZE * 2) boundary.
+ *
+ * Although we allocate 3 pages for the kernel stack we end up using
+ * only the 2 pages that are aligned on a (PAGE_SIZE * 2) boundary.
  */
 #define	KSTACK_PAGES		3	/* kernel stack*/
-#define	KSTACK_GUARD_PAGES	0	/* pages of kstack guard; 0 disables */
+#define	KSTACK_GUARD_PAGES	1	/* pages of kstack guard; 0 disables */
 
 #define	UPAGES			2
 

Modified: head/sys/mips/mips/vm_machdep.c
==============================================================================
--- head/sys/mips/mips/vm_machdep.c	Fri Mar 12 06:57:53 2010	(r205071)
+++ head/sys/mips/mips/vm_machdep.c	Fri Mar 12 07:08:20 2010	(r205072)
@@ -214,6 +214,16 @@ cpu_thread_swapin(struct thread *td)
 {
 	pt_entry_t *pte;
 	int i;
+	vm_offset_t unused_kstack_page;
+
+	/*
+	 * Unmap the unused kstack page.
+	 */
+	unused_kstack_page = td->td_kstack;
+	if (td->td_md.md_realstack == td->td_kstack)
+		unused_kstack_page += (KSTACK_PAGES - 1) * PAGE_SIZE;
+
+	pmap_kremove(unused_kstack_page);
 
 	/*
 	 * The kstack may be at a different physical address now.
@@ -239,13 +249,19 @@ cpu_thread_swapout(struct thread *td)
 void
 cpu_thread_alloc(struct thread *td)
 {
+	vm_offset_t unused_kstack_page;
 	pt_entry_t *pte;
 	int i;
 
-	if(td->td_kstack & (1 << PAGE_SHIFT))
+	if (td->td_kstack & (1 << PAGE_SHIFT)) {
 		td->td_md.md_realstack = td->td_kstack + PAGE_SIZE;
-	else
+		unused_kstack_page = td->td_kstack;
+	} else {
 		td->td_md.md_realstack = td->td_kstack;
+		unused_kstack_page = td->td_kstack +
+					(KSTACK_PAGES - 1) * PAGE_SIZE;
+	}
+	pmap_kremove(unused_kstack_page);
 
 	td->td_pcb = (struct pcb *)(td->td_md.md_realstack +
 	    (td->td_kstack_pages - 1) * PAGE_SIZE) - 1;

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:15:24 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 64E52106564A;
	Fri, 12 Mar 2010 07:15:24 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from out-0.mx.aerioconnect.net (oute.internet-mail-service.net
	[216.240.47.228])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A9678FC27;
	Fri, 12 Mar 2010 07:15:24 +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
	o2C7FN0r006180; Thu, 11 Mar 2010 23:15:23 -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 868582D6017;
	Thu, 11 Mar 2010 23:15:22 -0800 (PST)
Message-ID: <4B99EA09.80108@elischer.org>
Date: Thu, 11 Mar 2010 23:15:21 -0800
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: Juli Mallett 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
In-Reply-To: 
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, Qing Li ,
	svn-src-all@FreeBSD.org, src-committers@FreeBSD.org,
	Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:15:24 -0000

Juli Mallett wrote:
> On Thu, Mar 11, 2010 at 15:39, Qing Li  wrote:
>> I guess it's a good time to clean things up. The if_link_state code has been
>> around for quite some time, either it be fully utilized or not be there at all.
>> The inconsistency is the root cause.
> 
> Sure.  There is an increasing amount of stuff that network drivers are
> expected to do, but they work without doing them.  It's easy to think
> you have a functioning network driver and that you can get by without
> adding support for media changes and link status reporting, etc.
> 
>> I will try going through these tonight and hopefully the fix all take a
>> common approach.

probably should add a flag that means "we have media state"
and if it is not set, assume it is always on.

> 
> If you can think of a way to add some invariants (warn the first time
> a driver receives a packet without having ever set the link state,
> make sure the media status callback sets the valid flag in the
> request, etc) that would probably be very helpful for people who are
> writing network drivers.  If I hadn't been following the threads about
> your changes, I would have had to spend much longer fixing the Octeon
> port's Ethernet driver, wondering why suddenly it broke and
> instrumenting the routing code.  A printf would go a long way.
> 
> Juli.


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:26:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0005106566C;
	Fri, 12 Mar 2010 07:26:37 +0000 (UTC)
	(envelope-from brooks@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C02288FC0C;
	Fri, 12 Mar 2010 07:26: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 o2C7QbRo029646;
	Fri, 12 Mar 2010 07:26:37 GMT (envelope-from brooks@svn.freebsd.org)
Received: (from brooks@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C7QbNi029642;
	Fri, 12 Mar 2010 07:26:37 GMT (envelope-from brooks@svn.freebsd.org)
Message-Id: <201003120726.o2C7QbNi029642@svn.freebsd.org>
From: Brooks Davis 
Date: Fri, 12 Mar 2010 07:26: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: r205073 - head/share/misc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:26:37 -0000

Author: brooks
Date: Fri Mar 12 07:26:37 2010
New Revision: 205073
URL: http://svn.freebsd.org/changeset/base/205073

Log:
  Regen:
  
  * Hart:		rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y).
  * Boemler:	vendors.txt (2010-03126)
  
  PR:		kern/133733
  MFC after:	1 week

Modified:
  head/share/misc/pci_vendors

Modified: head/share/misc/pci_vendors
==============================================================================
--- head/share/misc/pci_vendors	Fri Mar 12 07:08:20 2010	(r205072)
+++ head/share/misc/pci_vendors	Fri Mar 12 07:26:37 2010	(r205073)
@@ -18,7 +18,7 @@
 	4001	WinTV PVR-250 (v1)
 	4009	WinTV PVR-250
 	4801	WinTV PVR-250 MCE
-	6800	Hauppage Nova -TD-500 DVB-T Tuner Device
+	6800	Hauppage Nova -TD-500 DVB-T Tuner Device ( PCIVEN_1131&DEV_7130&SUBSYS_40510000&REV_014&3B)
 0071	Nebula Electronics Ltd
 0100	Ncipher Corp Ltd
 0123	General Dynamics
@@ -44,6 +44,10 @@
 	8519	OV519 series
 05E3	CyberDoor
 	0701	CBD516
+064E	SUYIN Corporation
+	A101	Acer Crystal Eye Webcam (suYin)
+	A103	WebCam (SuYin)
+	D101	Web Cam (SuYin)
 066F	Sigmatel Inc
 	3410	SMTP3410
 	3500	SMTP3500
@@ -54,6 +58,8 @@
 	1704	ISDN Adapter (PCI Bus, D, C)
 067B	Prolific Technology Inc
 	2303	PL-2303 USB-to-Serial Converter
+	2305	USB-to-Printer Bridge Controller (PL-2305)
+	2393	prolific (prolific)
 	3507	PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller
 069D	Hughes Network Systems (HNS)
 0700	Stream Machine
@@ -70,7 +76,7 @@
 09C1	Arris
 	0704	CM 200E Cable Modem
 0A5C	Broadcom Corporation
-	0201	Broadcom USB iLine10(tm) Network Adapter
+	0201	Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme BCM5782 Gigabie Ethernet Contro)
 	2000	Broadcom Bluetooth Firmware Upgrade Device
 	2009	Broadcom Bluetooth Controller
 	200A	Broadcom Bluetooth Controller
@@ -84,17 +90,17 @@
 	2038	Broadcom Blutonium Device Firmware Downloader (BCM2038)
 	2039	BROADCOM Bluetooth Device
 	2045	Broadcom Bluetooth Controller
-	2046	Broadcom USB Bluetooth Device
+	2046	Broadcom USB Bluetooth Device ( 5738z)
 	2047	Broadcom USB Bluetooth Device
 	205E	Broadcom Bluetooth Firmware Upgrade Device
-	2100	Broadcom Bluetooth 2.0+eDR USB dongle
-	2101	Broadcom Bluetooth 2.0+EDR USB dongle
-	2102	ANYCOM Blue USB-200/250
+	2100	Broadcom Bluetooth 2.0+eDR USB dongle (BT 50)
+	2101	Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2)
+	2102	ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6)
 	2110	Broadcom Bluetooth Controller
 	2111	ANYCOM Blue USB-UHE 200/250
 	2120	Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045)
 	2121	Broadcom 2045 Bluetooth 2.0 USB Device with trace filter
-	2122	Broadcom Bluetooth 2.0+EDR USB dongle
+	2122	Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3)
 	2124	2045B3ROM Bluetooth Dongle
 	2130	Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter
 	2131	Broadcom 2045 Bluetooth 2.0 USB Device with trace filter
@@ -104,7 +110,7 @@
 	2143	2046 Flash non UHE Class 1
 	2144	2046 Flash non UHE module Class 2
 	2145	Broadcom BCM9204MD LENO Module
-	2146	Broadcom 2046 Bluetooth 2.1 USB UHE Dongle
+	2146	Broadcom 2045 Bluetooth 2.1 USB UHE Dongle
 	2147	Broadcom 2046 Bluetooth 2.1 USB Dongle
 	2148	Broadcom 2046 Bluetooth 2.1 USB UHE Dongle
 	2149	Broadcom 2046 Bluetooth 2.1 USB Dongle
@@ -122,8 +128,9 @@
 	2155	Broadcom Bluetooth USB Dongle
 	2157	BCM2046 B1 USB 500
 	2158	Broadcom 2046 Bluetooth 2.1 Device
-	4502	USB Human Interface Device
-	4503	USB Human Interface Device
+	4500	Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1)
+	4502	Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1)
+	4503	Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1)
 	5800	Unified Security Hub
 	6300	Pirelli ISB Remote NDIS Device
 0A89	BREA Technologies Inc
@@ -144,17 +151,22 @@
 	0A06	RCB672FXX 672-channel modular analog telphony card
 0B49	ASCII Corporation
 	064F	Trance Vibrator
+0C45	Microdia Ltd.
+	602D	USB Webcam (7&2BE7B8E3&0&4)
+	6130	USB CAMERA (5&3512B308&0&1)
 0E11	Compaq Computer Corp (Now owned by Hewlett-Packard)
 	0001	PCI to EISA Bridge
-	0002	PCI to ISA Bridge
+	0002	PCI to ISA Bridge (ISA Bridge)
 	000F	StorageWorks Library Adapter (HVD) (CPQB1A9)
 	0012	686P7 (686P7)
-	0046	Smart Array 64xx/6i Controller
+	0046	Smart Array 6400 Controller (N/A)
 	0049	Gigabit Upgrade Module (NC7132)
 	004A	Gigabit Server Adapter (NC6136)
+	005A	HP Remote Insight Lights-Out II Board (PowerPC 405GP processor at 200MHz [3305103C])
 	007C	NC7770 1000BaseTX
 	007D	NC6770 1000BaseTX
 	0085	NC7780 1000BaseTX
+	00B1	HP Remote Insight Lights-Out II PCI Device (3305103C)
 	00BB	NC7760
 	00C0	AIC-7899G 64-bit, 66MHz Dual Channel Wide Ultra3 SCSI Controller
 	00CA	NC7771
@@ -201,8 +213,8 @@
 	AE29	PCI to ISA Bridge (MIS-L)
 	AE2A	CPU to PCI Bridge (MPC)
 	AE2B	PCI to ISA PnP Bridge (MIS-E)
-	AE31	System Management Controller (1002&DEV-4385&SUBSY)
-	AE32	Netelligent 10/100 TX PCI UTP TLAN 2.3
+	AE31	System Management Controller (1002&DEV-5653&SUBSYS)
+	AE32	Netelligent 10/100 TX PCI UTP TLAN 2.3 (950)
 	AE33	Dual EIDE Controller (Triflex)
 	AE34	Netelligent 10 T PCI UTP TLAN 2.3
 	AE35	Integrated NetFlex-3/P TLAN 2.3
@@ -321,70 +333,70 @@
 	0017	PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E)
 	0020	Universal digital I/O PCI-Interface (ispLSI1032E)
 1002	ATI Technologies Inc. / Advanced Micro Devices, Inc.
-	0B12	ati 1900 (ati 1900)
+	0B12	ATI Radeon X1900 (R580)
 	1002	0F2A1787 (0F2A1787)
-	3150	Radeon Mobility X600 (M24 1P)
-	3151	FIREMV 2400
-	3152	Mobility Radeon X300
-	3154	Mobility FireGL V3200
-	3171	FireMV 2400 Secondary
-	3E50	Radeon X600/X650 Series
-	3E54	FireGL V3200 (RV380)
-	3E70	Radeon X600 Series Secondary
-	3E74	FIREGL V3200 Secondary
+	3150	ATI MOBILITY /ATI RADEON X600 (M24)
+	3151	ATI FireMV 2400 (RV380)
+	3152	ATI MOBILITY /ATI RADEON X300 (M24)
+	3154	ATI MOBILITY FireGL V3200 (M24GL)
+	3171	ATI FireMV 2400 Secondary (RV380)
+	3E50	ATI RADEON X600/X550 Series (RV380)
+	3E54	ATI FireGL V3200 (RV380GL)
+	3E70	ATI RADEON X600/X550 Series Secondary (RV380)
+	3E74	ATI FireGL V3200 Secondary (RV380GL)
 	4136	Radeon IGP 320 (A3)
 	4137	Radeon IGP 340 (RS200)
 	4144	Radeon 9500 Series (R300)
 	4145	Radeon 9200 (M+X) (R300)
-	4146	Radeon 9700 (R300)
+	4146	ATI RADEON 9600TX (R300)
 	4147	Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P)
-	4148	Radeon 9800 SE (R350)
-	4149	Radeon 9500 Family
+	4148	ATI RADEON 9800 SE (R350)
+	4149	ATI RADEON 9500 (R350)
 	414A	Radeon 9800 Family
 	414B	Fire GL X2
-	4150	Radeon 9600 Series (V350)
-	4151	Radeon 9600 (RV350)
-	4152	Radeon 9600 XT (RV360)
-	4153	Radeon 9550 (RV350)
-	4154	Fire GL T2
-	4155	Fire GL T2
+	4150	ATI RADEON 9600 Series (RV350)
+	4151	ATI RADEON 9600 Series (RV350)
+	4152	ATI RADEON 9600 Series (RV360)
+	4153	ATI RADEON 9550/X1050 Series (RV350)
+	4154	ATI FireGL T2 (RV350GL)
+	4155	ATI RADEON 9600 Series (RV350)
 	4156	Fire GL T2
 	4157	Fire GL T2
-	4158	vga video (4c59h)
-	4164	R300 (128bit mem bus) (Radeon 9500 Series, secondary)
+	4158	Mach32 (68800AX)
+	4164	Radeon 9500 Series (R300) - Secondary
 	4165	Radeon 9700 Pro (R300 AE) - Secondary
-	4166	Radeon 9600TX - Secondary
+	4166	ATI RADEON 9600TX Secondary (R300)
 	4167	Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P)
-	4168	Radeon 9800 SE - Secondary (R350)
-	4169	Radeon 9500 Family - Secondary
-	4170	Radeon 9600 - Secondary (RV350)
-	4171	Radeon 9600 (RV350) - Secondary
-	4172	Radeon 9600 XT - Secondary (RV360)
-	4173	Radeon 9550 - Secondary (RV350)
-	4174	FireGL T2 - Seocndary
-	4175	Radeon 9600 Series Secondary
+	4168	ATI RADEON 9800 SE Secondary (R350)
+	4169	ATI RADEON 9500 Secondary (R350)
+	4170	ATI RADEON 9600 Series Secondary (RV350)
+	4171	ATI RADEON 9600 Series Secondary (RV350)
+	4172	ATI RADEON 9600 Series Secondary (RV360)
+	4173	ATI RADEON 9550/X1050 Series Secondary (RV350)
+	4174	ATI FireGL T2 Secondary (RV350GL)
+	4175	ATI RADEON 9600 Series Secondary (RV350)
 	4237	Radeon 7000 IGP
 	4242	All-In-Wonder 8500DV (R200AIW)
 	4243	Radeon 8500 DV OHCI FireWire Controller
 	4336	Radeon IGP 320M (rs200)
 	4337	Mobility M6 (U2) (RS200M)
-	4341	AC'97 Audio Controller (AD1981)
-	4342	HUB Bridge (IXP 150)
-	4345	EHCI USB Controller (IXP 150)
-	4347	OHCI USB Controller *1 (IXP 150)
-	4348	OHCI USB Controller *2 (IXP 150)
-	4349	PATA 100 Controller (IXP 1xx/2xx)
-	434C	LPC Controller (IXP 150)
-	434D	Agere Systems AC'97 Modem device (a75-s226)
+	4341	AC'97 Audio Controller (SB200)
+	4342	PCI-PCI Bridge (SB200)
+	4345	EHCI USB Controller (SB200)
+	4347	OHCI USB Controller *1
+	4348	OHCI USB Controller *2
+	4349	PATA-100 IDE Controller (SB200)
+	434C	PCI-ISA Bridge (SB200)
+	434D	AC'97 Modem Controller (SB200)
 	4353	IXP SB200 SMBUS Controller
-	4354	mach64 ct pci (215r2qzua21)
-	4358	Mach64 CX (216l0sas25)
+	4354	Mach64 CT (215CT222)
+	4358	Mach64 CX (210888CX)
 	4361	AC'97 Audio Controller
 	4363	IXP SB300 SMBUS Controller
 	4369	PATA 133 Controller (IXP 3xx)
 	436D	IXP SB300 AC'97 Modem Controller
 	436E	IXP SB300 Serial ATA Controller
-	4370	IXP AC'97 Audio Controller (IXP_AUDIO_400)
+	4370	IXP SB400 AC'97 Audio Controller
 	4371	IXP SB400 PCI-PCI Bridge
 	4372	ATI SMBus (x200)
 	4373	IXP SB400 EHCI USB 2.0 Controller
@@ -395,7 +407,7 @@
 	4378	IXP SB400 AC'97 Modem Controller
 	4379	IXP SB400 Serial ATA Controller
 	437A	IXP SB400 Serial ATA Controller
-	437B	IXP SB450 High Definition Audio Controller (Intel Corporation)
+	437B	IXP SB450 High Definition Audio Controller
 	4380	IXP SB600 Serial ATA Controller
 	4381	IXP SB600 Serial ATA RAID Controller
 	4382	IXP SB600 AC'97 Audio Controller
@@ -409,9 +421,9 @@
 	438A	IXP SB600 USB Controller (OHCI3)
 	438B	IXP SB600 USB Controller (OHCI4)
 	438C	ATI RD600/RS600 IDE Controller (RD600/RS600)
-	438D	ATK0110 ACPI Utility (1043.4.0.0)
+	438D	IXP SB600 PCI to LPC Bridge
 	438E	IXP SB600 AC'97 Modem Controller
-	4390	SB700 SATA Controller [IDE mode]
+	4390	Integrated SATA II Controller (SB700)
 	4391	SB700 SATA Controller [AHCI mode]
 	4392	SB700 SATA Controller [Non-RAID5 mode]
 	4393	SB700 SATA Controller [RAID5 mode]
@@ -419,16 +431,16 @@
 	4395	SB SATA Controller [AHCI mode with HyperFlash-PCIE]
 	4396	SB700 USB EHCI Controller
 	4397	SB700 USB OHCI0 Controller
-	4398	SB700 USB OHCI1 Controller
+	4398	Standard OpenHCD USB-Hostcontroller (SB700)
 	4399	SB700 USB OHCI2 Controller
 	439C	PATA 133 Controller (SB7xx)
 	439D	SB700 LPC host controller
 	4437	Radeon Mobility 7000 IGP
 	4554	Mach64 ET
 	4654	113--34004-104 (Mach64 VT)
-	4742	ATI  3D Rage Pro  AGP 2X 8mb (gt-c2u2) ((GT-C2U2))
+	4742	3D Rage Pro AGP 1X/2X ((GT-C2U2))
 	4744	Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x)
-	4747	GT-C2U2 (Rage 3D Pro)
+	4747	Rage 3D Pro (GT-C2U2)
 	4749	ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X)
 	474C	k7 som+ (Rage XC PCI-66)
 	474D	SLAT (Rage XL AGP 2x)
@@ -442,7 +454,7 @@
 	4755	3d rage 2 + dvd (Rage 3D II+pci)
 	4756	Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package)
 	4757	Rage 3D IIC AGP (BGA Package)
-	4758	Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX])
+	4758	Mach64 GX (210888GX)
 	4759	m3d agp card on agp slot (215r2qzua21)
 	475A	Rage 3D IIC AGP (PQFP Package)
 	4964	Radeon 9000 Series (RV250 Id)
@@ -451,33 +463,33 @@
 	4967	Radeon 9000 (RV250)
 	496E	Radeon 9000/9000 Pro - Secondary (RV250)
 	496F	Radeon 9000 (RV250) - Secondary
-	4A48	Radeon X800 Series (R420 JH)
-	4A49	Radeon X800 gt (R423)
-	4A4A	Radeon X800 Series
-	4A4B	RADEON X800 XT (R420)
-	4A4C	Radeon X800 Series (R420 JL)
-	4A4D	FireGL X3 (R420 JM)
-	4A4E	Radeon Mobility 9800 (M18 JN)
-	4A4F	Radeon X800 SE
-	4A50	Radeon X800 XT Platinum
-	4A54	Radeon X800 VE (R420)
-	4A68	Radeon X800 Series Secondary
-	4A69	Radeon X800 Series - Secondary
-	4A6A	Radeon X800 Series - Secondary
-	4A6B	RADEON X800 XT Secondary (R420)
-	4A6C	Radeon X800 Series Secondary
-	4A6D	FIREGL X3-256 Secondary
-	4A6F	Radeon X800 SE Secondary
-	4A70	Radeon X800 XT Platinum - Secondary
-	4A74	Radeon X800 VE (R420) (Secondary)
-	4B49	Radeon X850XT
+	4A48	ATI RADEON X800 Series (R420)
+	4A49	ATI RADEON X800 PRO (R420)
+	4A4A	ATI RADEON X800 Series (R420)
+	4A4B	ATI RADEON X800 XT (R420)
+	4A4C	ATI RADEON X800 Series (R420)
+	4A4D	ATI FireGL X3-256 (R420GL)
+	4A4E	ATI MOBILITY /ATI RADEON 9800 (M18)
+	4A4F	ATI RADEON X800 SE (R420)
+	4A50	ATI RADEON X800 XT Platinum Edition (R420)
+	4A54	ATI RADEON X800 VE (R420)
+	4A68	ATI RADEON X800 Series Secondary (R420)
+	4A69	ATI RADEON X800 PRO Secondary (R420)
+	4A6A	ATI RADEON X800 Series Secondary (R420)
+	4A6B	ATI RADEON X800 XT Secondary (R420)
+	4A6C	ATI RADEON X800 Series Secondary (R420)
+	4A6D	ATI FireGL X3-256 Secondary (R420GL)
+	4A6F	ATI RADEON X800 SE Secondary (R420)
+	4A70	ATI RADEON X800 XT Platinum Edition Secondary (R420)
+	4A74	ATI RADEON X800 VE Secondary (R420)
+	4B49	ATI RADEON X850 XT (R481)
 	4B4A	Radeon X850 SE
-	4B4B	Radeon X850 PRO
-	4B4C	Radeon X850XT-PE
-	4B69	Radeon X850XT secondary
-	4B6A	Radeon X850 SE Secondary
-	4B6B	Radeon X850 PRO secondary
-	4B6C	Radeon X850XT-PE Secondary
+	4B4B	ATI RADEON X850 PRO (R481)
+	4B4C	ATI RADEON X850 XT Platinum Edition (R481)
+	4B69	ATI RADEON X850 XT Secondary (R481)
+	4B6A	ATI RADEON X850 SE Secondary (R481)
+	4B6B	ATI RADEON X850 PRO Secondary (R481)
+	4B6C	ATI RADEON X850 XT Platinum Edition Secondary (R481)
 	4C42	Rage 3D LT Pro AGP 133MHz (BGA-312 Package)
 	4C44	Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP)
 	4C45	Rage Mobility M3 AGP
@@ -486,18 +498,18 @@
 	4C49	Rage 3D LT Pro PCI (BGA-312 Package)
 	4C4D	Rage P/M Mobility AGP 2x (01541014)
 	4C4E	Rage Mobility l (216lo sasa25)
-	4C50	Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC)
+	4C50	Rage 3D LT Pro PCI (BGA-256 Package)
 	4C51	Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D)
 	4C52	Rage P/M Mobility PCI
 	4C53	Rage L Mobility PCI (216L0SASA25)
 	4C54	Mach64 LT (264LT)
-	4C57	Mobility Radeon 7500 (fdds)
+	4C57	Mobility Radeon 7500 (M7 [LW])
 	4C58	FireGL Mobility
 	4C59	Radeon Mobility M6 Series (Mobility 6)
 	4C5A	Radeon Mobility M6 LZ
 	4C64	Radeon Mobility M9-GL
 	4C65	Radeon Mobility 9000 (R250 Le)
-	4C66	Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -)
+	4C66	MOBILITY RADEON 9000 (M9) (R250)
 	4C67	Radeon Mobility 9000 (R250 Lg)
 	4C6E	Radeon Mobility 9000 - Secondary (R250 Ln)
 	4D46	Rage Mobility 128 AGP 4x (ATI mobility128)
@@ -507,27 +519,27 @@
 	4D52	ATI Theater 550 Pro (ATI Theater 550 Pro)
 	4D53	Unified AVStream Driver
 	4E44	Radeon 9700/Pro, 9500 Series (R300)
-	4E45	Radeon 9700/9500 Series (R300)
-	4E46	Radeon 9600TX (R300)
+	4E45	ATI RADEON 9500 PRO / 9700 (R300)
+	4E46	ATI RADEON 9600 TX (R300)
 	4E47	Fire GL X1/Z1 AGP/Pro Video Accelerator (R300-WS)
-	4E48	Radeon 9800 Pro (R350)
+	4E48	ATI RADEON 9800 PRO (R350)
 	4E49	Radeon 9800 (R350) (??)
-	4E4A	Radeon 9800 XT (R350)
-	4E4B	ATI FIREGL X2-256T (FGL9800XT)
-	4E50	Mobility Radeon 9700 (M10 NP) (RV350)
-	4E51	Mobility Radeon 9600 (M10 NQ)
+	4E4A	ATI RADEON 9800 XT (R360)
+	4E4B	ATI FireGL X2-256/X2-256t (R350GL)
+	4E50	ATI MOBILITY /ATI RADEON 9600/9700 Series (M10)
+	4E51	ATI RADEON 9600 Series (RV350)
 	4E52	Mobility Radeon 9500/9600 (M10) (RV350)
 	4E53	Radeon Mobility 9600 (M10 NS)
-	4E54	Radeon Mobility M10 NT (RV350-WS)
-	4E56	FireGL Mobility T2e (M11 NV)
+	4E54	ATI MOBILITY FIRE GL T2/T2e (M10GL)
+	4E56	ATI MOBILITY /ATI RADEON 9550 (M12)
 	4E64	Radeon 9700/Pro, 9500 (R300) Series - Secondary
-	4E65	Radeon 9700/9500 Series (R300) - Secondary
-	4E66	Radeon 9600TX (R300) - Secondary
+	4E65	ATI RADEON 9500 PRO / 9700 Secondary (R300)
+	4E66	ATI RADEON 9600 TX Secondary (R300)
 	4E67	Fire GL X1/Z1 AGP/Pro Secondary Video Accelerator
-	4E68	Radeon 9800 Pro (R350) - Secondary
-	4E69	Radeon 9800 (R350) - Secondary
-	4E6A	Radeon 9800 XT (R350) - Secondary
-	4E6B	ATI FIREGL X2-256T Secondary (FGL9800XT)
+	4E68	ATI RADEON 9800 PRO Secondary (R350)
+	4E69	ATI RADEON 9800 Secondary (R350)
+	4E6A	ATI RADEON 9800 XT Secondary (R360)
+	4E6B	ATI FireGL X2-256/X2-256t Secondary (R350GL)
 	4E71	Radeon Mobility 9600 (M10 NQ) (secondary)
 	4F72	Radeon 9000 Series (RV250)
 	4F73	Radeon 9000 Series (RV250) (Secondary)
@@ -538,8 +550,8 @@
 	5045	Rage 128 PE/Pro AGP 2x (TMDS)
 	5046	Rage 128 PF/Pro AGP 4x (TMDS)
 	5047	 3d Rage pro agp 2x (215R3BUA22)
-	5048	Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP)
-	5049	Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t)
+	5048	Rage 128 Pro PH AGP 2x (8212104D)
+	5049	Rage 128 Pro PI AGP 4x (R128)
 	504A	Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI)
 	504B	Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP)
 	504C	4x (TMDS) (Rage 128 Pro PL AGP)
@@ -583,7 +595,7 @@
 	516D	Radeon 9100 Series (R200) - Secondary
 	5245	Rage 128 GL PCI (215R46ASA22)
 	5246	Rage 32MB (Rage 128 PRO)
-	5247	Rage 128 RG
+	5247	Rage 128 RG (Rage 32MB)
 	524B	Rage 128 VR RK PCI (g01080-108)
 	524C	Rage 128 RL/VR AGP 2x
 	5345	Rage 128 SE/4x PCI
@@ -595,68 +607,68 @@
 	534D	Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x)
 	534E	Rage 128 4x
 	5354	Mach 64 ST
-	5446	Video Controller (VGA Compatible) (ewmewm)
+	5446	Rage 128 Pro Ultra TF (unknown)
 	544C	Rage 128 Pro TL
 	5452	Rage 128 Pro TR
 	5453	Rage 128 Pro Ultra TS
 	5454	Rage 128 Pro Ultra TT
 	5455	Rade 128 Pro Ultra TU
-	5460	Radeon X300 Mobility (M22) (RV370)
-	5461	Mobility Radeon X300
-	5462	Mobility Radeon X600 SE
-	5464	FireGL GL (M22)
-	5548	Radeon X800 (R423 UH)
-	5549	Radeon X800 Pro
-	554A	Radeon X800 XT Platinum
-	554B	Primary (X800GT)
+	5460	ATI MOBILITY /ATI RADEON X300 (M22)
+	5461	ATI MOBILITY /ATI RADEON X300 (M22)
+	5462	ATI MOBILITY /ATI RADEON X600 SE (M24C)
+	5464	ATI MOBILITY FireGL V3100 (M22GL)
+	5548	ATI RADEON X800 Series (R423)
+	5549	ATI RADEON X800 GTO (R423)
+	554A	ATI RADEON X800 XT Platinum Edition (R423)
+	554B	ATI RADEON X800 GT (R423)
 	554C	R430 XTP
-	554D	Radeon X800 XL (R430)
-	554E	Radeon X800 Series
-	554F	Radeon X800 Series
-	5550	FireGL V7100 (R423)
-	5551	ATI FIREGL V5100 PCI-EX Primary (R423GL-SE)
+	554D	ATI RADEON X800 CrossFire Edition (R430)
+	554E	ATI RADEON X800 GT (R430)
+	554F	ATI RADEON X800 GTO (R430)
+	5550	ATI FireGL V7100 (R423GL)
+	5551	ATI FireGL V5100 (R423GL)
 	5552	FireGL V5100 (R423 UR)
 	5554	FireGL V7100 (R423 UT)
-	5568	Radeon X800 Series Secondary
-	5569	Radeon X800 Pro - Secondary
-	556A	Radeon X800 XT Platinum - Secondary
-	556B	Radeon X800 SE - Secondary
+	5568	ATI RADEON X800 Series Secondary (R423)
+	5569	ATI RADEON X800 GTO Secondary (R423)
+	556A	ATI RADEON X800 XT Platinum Edition Secondary (R423)
+	556B	ATI RADEON X800 GT Secondary (R423)
 	556C	R430 XTP Secondary
-	556D	Radeon X800 XL - Secondary (R430)
-	556E	Radeon X800 Series - Secondary
-	556F	Radeon X800 Series - Secondary
-	5570	FIREGL V7100 Secondary
-	5571	ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE)
-	564A	Mobility FIREGL V5000 (M26)
-	564B	Mobility FIREGL V5000
-	564F	Mobility Radeon X700 XL PCIe (M26)
-	5652	Mobility Radeon X700
-	5653	Mobility Radeon X700
-	5654	Mach 64 VT VIDEO XPRESSION (215VT2CA42)
+	556D	ATI RADEON X800 CrossFire Edition Secondary (R430)
+	556E	ATI RADEON X800 GT Secondary (R430)
+	556F	ATI RADEON X800 GTO Secondary (R430)
+	5570	ATI FireGL V7100 Secondary (R423GL)
+	5571	FireGL V5100 PCIe (R423GL-SE) - Secondary
+	564A	ATI MOBILITY FireGL V5000 (M26GL)
+	564B	ATI MOBILITY FireGL V5000 (M26GL)
+	564F	ATI MOBILITY /ATI RADEON X700 XL (M26)
+	5652	ATI MOBILITY /ATI RADEON X700 (M26)
+	5653	ATI MOBILITY/ATI RADEON X700 (RV410)
+	5654	Mach64 VT (215VT22200)
 	5655	Mach 64 VT3
 	5656	Mach 64 VT4 PCI (Mach 64 VT4 PCI)
-	5657	Radeon X550/X700 Series
+	5657	ATI RADEON X550/X700 Series (RV410)
 	566F	RADEON X700 SERIES SECONDARY
-	5673	Mobility Radeon X700 Secondary
-	5677	Radeon X550/X700 Series Secondary
+	5673	ATI MOBILITY /ATI RADEON X700 Secondary (M26)
+	5677	ATI RADEON X550/X700 Series Secondary (RV410)
 	5830	RS300/100 Host Bridge
 	5831	RS300/133 Host Bridge
 	5832	RS300/166 Host Bridge
-	5833	Radeon IGP9100 RS300/200 Host Bridge
+	5833	ATI Radeon 9000/9100 IGP Chipset - Host-PCI Bridge (RS300M)
 	5834	Radeon 9100 IGP (RS300)
-	5835	Mobility Radeon 9100 IGP (RS300M AGP)
-	5838	AGP Bridge (Radeon 9100 IGP)
+	5835	Mobilitiy Radeon 9100 IGP AGP (RS300M)
+	5838	ATI Radeon 9000/9100 IGP Chipset - AGP Controller (RS300M)
 	5854	Radeon XPRESS 200 Series Secondary
 	5874	Radeon XPRESS 200 Series Secondary
-	5940	www.ati.comRadeon 9200 Pro - Secondary (RV280)
+	5940	Radeon 9200 Pro Secondary (RV280)
 	5941	ATI Radeon 9200 - Secondary (RV280)
 	5942	Radeon 9000U Family - Secondary
 	5944	Radeon 9200SE PCI (RV280)
 	5950	RS480 Host Bridge
 	5951	Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge
 	5952	CrossFire Xpress 3200 (RD580) Chipset Host Bridge
-	5954	ATI Radeon Xpress 200 Series - RS480 (na)
-	5955	Mobility Radeon XPRESS 200
+	5954	ATI RADEON Xpress Series (RS480)
+	5955	ATI RADEON Xpress Series (RS480M)
 	5956	RD790 GFX Dual Slot
 	5957	RX790 GFX Single Slot
 	5958	RD780 GFX Dual Slot
@@ -664,10 +676,10 @@
 	5961	ATI RADEON 9200 se agp (RV280)
 	5962	Radeon 9000U Family
 	5964	Radeon 9200 SE Series (Radeon 9200)
-	5965	FireMV 2200 (Nvidia)
+	5965	FireMV 2200 (unknown)
 	5969	ES1000
-	5974	Radeon XPRESS 200 Series
-	5975	ATI Radeon X1100 (Radeon Xpress 1100)
+	5974	ATI RADEON Xpress Series (RS482)
+	5975	ATI RADEON Xpress Series (RS482M)
 	5978	RD790 PCI to PCI bridge (external gfx0 port A)
 	5979	RD790 PCI to PCI bridge (external gfx0 port B)
 	597A	RD790 PCI to PCI bridge (PCIe gpp port A)
@@ -696,7 +708,7 @@
 	5A1E	RD890 PCI to PCI bridge (external gfx1 port B)
 	5A1F	RD890 PCI to PCI bridge (NB-SB link)
 	5A30	RS400/100 Host Bridge
-	5A31	RS400/133 Host Bridge
+	5A31	Host Bridge (RS400/133)
 	5A32	RS400/166 Host Bridge
 	5A33	Northbridge: Radeon Xpress 200 (RC410)
 	5A34	RS480 PCI-X Root Port
@@ -705,211 +717,220 @@
 	5A38	RS480 PCI Bridge
 	5A39	RS480 PCI Bridge
 	5A3F	RS480 PCI Bridge
-	5A41	Radeon XPRESS 200
-	5A42	SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M)
+	5A41	ATI RADEON Xpress Series (RS400)
+	5A42	ATI RADEON Xpress Series (RS400M)
 	5A43	Radeon XPRESS 200 Series Secondary
-	5A61	Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410))
-	5A62	ATI RADEON XPRESS 1100 (RC410M)
+	5A61	ATI RADEON Xpress Series (RC410)
+	5A62	ATI RADEON Xpress Series (RC410M)
 	5A63	Radeon XPRESS 200 Series Secondary
-	5B60	ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300)
+	5B60	ATI RADEON X300/X550/X1050 Series (RV370)
 	5B61	RV371
-	5B62	RADEON X600 Series 265MB (RV380)
-	5B63	ATI Radoen X1050 (Unknown)
-	5B64	FireGL V3100 (RV370 5B64)
+	5B62	ATI RADEON X600 Series (RV380x)
+	5B63	ATI RADEON X300/X550/X1050 Series (RV370)
+	5B64	ATI FireGL V3100 (RV370GL)
 	5B65	FireGL D1100 (RV370 5B65)
 	5B66	RV370X
-	5B70	Radeon X300/X550/X1050 Series - Secondary
+	5B70	ATI RADEON X300/X550/X1050 Series Secondary (RV370)
 	5B71	RV371 Secondary
-	5B72	Radeon X600 Series - Secondary
-	5B73	Radeon X550 Series - Secondary
-	5B74	ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100)
-	5B75	FIREMV 2200 Secondary
+	5B72	ATI RADEON X600 Series Secondary (RV380x)
+	5B73	ATI RADEON X300/X550/X1050 Series Secondary (RV370)
+	5B74	ATI FireGL V3100 Secondary (RV370GL)
+	5B75	ATI FireMV 2200 Secondary (RV370)
 	5B76	RV370X Secondary
 	5C61	Mobility Radeon 9200 (bk-ati ver008.016m.085.006)
 	5C63	Mobility Radeon 9200 (RV280 (M9+))
 	5D44	Radeon 9200 SE Series - Secondary (RV280)
 	5D45	ATI FireMV 2200 PCI Secondary (RV280)
-	5D48	Mobility Radeon X800 XT
-	5D49	Mobility FireGL V5100
-	5D4A	PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800)
+	5D48	ATI MOBILITY/ATI RADEON X800  XT (M28)
+	5D49	ATI MOBILITY FireGL V5100 (M28GL)
+	5D4A	ATI MOBILITY /ATI RADEON X800 (M28)
 	5D4C	R480 CONSUMER 4P
-	5D4D	Radeon XT850 (Radeon XT850)
+	5D4D	ATI RADEON X850 XT Platinum Edition (R480)
 	5D4E	Radeon X800 GT
-	5D4F	x800gto 256 pci-e (r480)
-	5D50	FIREGL V7200
-	5D52	Radeon X850XT (PCIE) Primary (R480)
-	5D57	Radeon X800 XT
+	5D4F	ATI RADEON X800 GTO (R480)
+	5D50	ATI FireGL V7200 (R480GL)
+	5D52	ATI RADEON X850 XT (R480)
+	5D57	ATI RADEON X800 XT (R423)
 	5D6C	R480 CONSUMER 4P Secondary
-	5D6D	Radeon X850 Series - Secondary
+	5D6D	ATI RADEON X850 XT Platinum Edition Secondary (R480)
 	5D6E	Radeon X800 GT Secondary
-	5D6F	Radeon X850 Pro 256M (01131002)
-	5D70	FIREGL V7200 Secondary
-	5D72	Radeon X850 Series - Secondary
-	5D77	Radeon X800 XT - Secondary
-	5E48	FireGL V5000 (RV410)
+	5D6F	ATI RADEON X800 GTO Secondary (R480)
+	5D70	ATI FireGL V7200 Secondary (R480GL)
+	5D72	ATI RADEON X850 XT Secondary (R480)
+	5D77	ATI RADEON X800 XT Secondary (R423)
+	5E48	ATI FireGL V5000 (RV410GL)
 	5E49	FireGL V3300 (RV410)
-	5E4A	Radeon X700 Series
-	5E4B	Radeon X700 Series
-	5E4C	Radeon X700 Series
-	5E4D	Radeon X700 Series
-	5E4F	Radeon X700 SE
-	5E68	FIREGL V5000 Secondary
-	5E6A	Radeon X700 Series - Secondary
-	5E6B	Radeon X700 Series - Secondary
-	5E6C	Radeon X700 Series - Secondary
-	5E6D	Radeon X700 Series - Secondary
-	5E6F	Radeon X700 SE - Secondary
+	5E4A	ATI RADEON X700 XT (RV410)
+	5E4B	ATI RADEON X700 PRO (RV410)
+	5E4C	ATI RADEON X700 SE (RV410)
+	5E4D	ATI RADEON X700 (RV410)
+	5E4F	ATI RADEON X700/X550 Series (RV410)
+	5E68	ATI FireGL V5000 Secondary (RV410GL)
+	5E6A	ATI RADEON X700 XT Secondary (RV410)
+	5E6B	ATI RADEON X700 PRO Secondary (RV410)
+	5E6C	ATI RADEON X700 SE Secondary (RV410)
+	5E6D	ATI RADEON X700 Secondary (RV410)
+	5E6F	ATI RADEON X700/X550 Series Secondary (RV410)
 	5F57	Radeon X800XT PCIe (R423)
+	6898	ATI Radeon HD 5800 Series (EG CYPRESS XT)
+	6899	ATI Radeon HD 5800 Series (EG CYPRESS PRO)
+	68A0	ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT)
+	68A1	ATI Mobility Radeon HD 5800 Series (EG BROADWAY PRO/LP)
+	68B0	ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT)
+	68B8	ATI Radeon HD 5700 Series (EG JUNIPER XT)
+	68BE	ATI Radeon HD 5700 Series (EG JUNIPER LE)
 	700F	PCI to AGP Bridge (A3/U1)
 	7010	PCI to AGP Bridge (RS200)
-	7100	Radeon X1800 Series
-	7101	Mobility Radeon X1800 XT
-	7102	Radeon Mobility X1800
-	7103	Mobility FireGL V7200
-	7104	ATI FireGL 7200 or 3200
-	7105	R520 [FireGL]
-	7106	Mobility FireGL V7100
-	7108	Radeon Mobility X1800
+	7100	ATI RADEON X1800 Series (R520)
+	7101	ATI MOBILITY /ATI RADEON X1800 XT (M58)
+	7102	ATI MOBILITY /ATI RADEON X1800 (M58)
+	7103	ATI MOBILITY FireGL V7200 (M58GL)
+	7104	ATI FireGL V7200 (R520GL)
+	7105	ATI FireGL V5300 (R520GL)
+	7106	ATI MOBILITY FireGL V7100 (M58GL)
+	7108	ATI RADEON X1800 Series (R520)
 	7109	Radeon X1800 Series - Secondary
-	710A	Radeon X1800 GTO
-	710B	Radeon X1800
-	710C	Radeon X1800
-	710E	FIREGL V7300
-	710F	ATI FireGL (V7350)
-	7120	Radeon X1800 Series Secondary
-	7124	FireGL V7200 (R520 GL) - Secondary
-	7125	Radeon X1800 Series Secondary
-	7128	Radeon X1800 Series Secondary
-	7129	Radeon X1800 Series - Secondary
-	712A	Radeon X1800 GTO - Secondary
-	712B	Radeon X1800 Series Secondary
-	712C	Radeon X1800 Series Secondary
-	712E	FIREGL V7300 Secondary
-	712F	ATI FireGL (V 7350 Secondary)
-	7140	Radeon X1300 Series
+	710A	ATI RADEON X1800 Series (R520)
+	710B	ATI RADEON X1800 Series (R520)
+	710C	ATI RADEON X1800 Series (R520)
+	710E	ATI FireGL V7300 (R520GL)
+	710F	ATI FireGL V7350 (R520GL)
+	7120	ATI RADEON X1800 Series Secondary (R520)
+	7124	ATI FireGL V7200 Secondary (R520GL)
+	7125	ATI FireGL V5300 Secondary (R520GL)
+	7128	ATI RADEON X1800 Series Secondary (R520)
+	7129	ATI RADEON X1800 Series Secondary (R520)
+	712A	ATI RADEON X1800 Series Secondary (R520)
+	712B	ATI RADEON X1800 Series Secondary (R520)
+	712C	ATI RADEON X1800 Series Secondary (R520)
+	712E	ATI FireGL V7300 Secondary (R520GL)
+	712F	ATI FireGL V7350 Secondary (R520GL)
+	7140	ATI RADEON X1600 Series (RV515)
 	7141	RV505
-	7142	Radeon X1300 Pro or X1550 (rv515)
-	7143	Radeon X1550 Series (RV505)
-	7145	PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400)
-	7146	Radeon X1300 XGE (N/A)
-	7147	Radeon X1550 64-bit (RV505)
-	7149	ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG)
-	714A	Mobility Radeon X1300
-	714B	Mobility Radeon X1300
-	714C	Mobility Radeon X1300
-	714D	Radeon X1300 (RV515)
-	714E	Radeon X1300 (RV515)
+	7142	ATI RADEON X1300/X1550 Series (RV515)
+	7143	ATI RADEON X1550 Series (RV515)
+	7145	ATI MOBILITY /ATI RADEON X1400 (M54)
+	7146	ATI RADEON X1300 / X1550 Series (RV515)
+	7147	ATI RADEON X1550 64-bit (RV515)
+	7149	ATI MOBILITY /ATI RADEON X1300 (M52)
+	714A	ATI MOBILITY /ATI RADEON X1300 (M52)
+	714B	ATI MOBILITY /ATI RADEON X1300 (M52)
+	714C	ATI MOBILITY /ATI RADEON X1300 (M52)
+	714D	ATI RADEON X1300 Series (RV515)
+	714E	ATI RADEON X1300 Series (RV515PCI)
 	714F	RV505
 	7151	RV505
-	7152	HP Fire GL v3300 (Fire GL v3300)
-	7153	FireGL V3350 (RV515GL)
-	715E	Radeon X1300 Series
-	715F	Radeon X1300 Series
-	7160	Radeon X1300 Series - Secondary
+	7152	ATI FireGL V3300 (RV515GL)
+	7153	ATI FireGL V3350 (RV515GL)
+	715E	ATI RADEON X1300 Series (RV515)
+	715F	ATI RADEON X1550 64-bit (RV515)
+	7160	ATI RADEON X1600 Series Secondary (RV515)
 	7161	RV505 Secondary
-	7162	Radeon X1300 Series - Secondary
-	7163	Radeon X1300 PRO Secondary
-	7166	Radeon X1300 Series - Secondary
-	7167	Radeon X1300 Series Secondary
+	7162	ATI RADEON X1300/X1550 Series Secondary (RV515)
+	7163	ATI RADEON X1550 Series Secondary (RV515)
+	7166	ATI RADEON X1300 / X1550 Series Secondary (RV515)
+	7167	ATI RADEON X1550 64-bit Secondary (RV515)
 	7169	M52 Secondary
-	716D	Radeon X1300 Series Secondary
-	716E	Radeon X1300 Series Secondary
+	716D	ATI RADEON X1300 Series Secondary (RV515)
+	716E	ATI RADEON X1300 Series Secondary (RV515PCI)
 	716F	RV505 Secondary
 	7171	RV505 Secondary
-	7172	FireGL V3300 (RV515GL) Secondary
-	7173	FireGL V3350 (RV515GL) Secondary
-	717E	Radeon X1300 Series Secondary
-	717F	Radeon X1300 Series Secondary
-	7180	Radeon X1300 Series
-	7181	Radeon X1600 Series (RV516XT)
-	7183	Radeon X1300/X1550 Series (RV505)
-	7186	PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450)
-	7187	Radeon 1300 (Radeon 1300)
-	7188	ATI Mobility Radeon X2300 (Mobility X2300)
-	718A	Mobility Radeon X2300 Series
-	718B	Mobility Radeon X1350
-	718C	Mobility Radeon X1350
-	718D	Mobility Radeon X1450
-	718F	Radeon X1300 Series
-	7193	Radeon X1550 Series
-	7196	Mobility Radeon X1350
-	719B	FireMV 2250
-	719F	Radeon X1550 Series
-	71A0	Radeon X1300 Series Secondary
-	71A1	Radeon X1600 Series (RV516XT) Secondary
-	71A3	Radeon X1300 Series Secondary
-	71A7	Radeon 1300 Secondary (Radeon 1300)
-	71B3	Radeon X1550 Series Secondary
-	71BB	FireMV 2250 Secondary
-	71C0	Radeon X1600 Series
-	71C1	Radeon X1650 Pro (RV535)
-	71C2	ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E)
-	71C3	Radeon X1600 Series
-	71C4	Mobility FIREGL V5200
-	71C5	Radeon X1600 Mobility (RV530?)
-	71C6	Radeon X1650 Series (RV530 LE)
-	71C7	RADEON X1650 SERIES
-	71CD	Radeon X1600 Series
-	71CE	Radeon X1600 PRO / X1300XT (RV530 VE)
-	71D2	FireGL V3400 (RV530GL)
-	71D4	Mobility FireGL V5250 (M56GL)
-	71D5	Mobility Radeon X1700 (M66-P)
-	71D6	Mobility Radeon X1700 (M66-XT)
-	71DA	FIREGL V5200
-	71DE	Ati Radeon X2500  (Uknown)
-	71E0	Radeon X1600 Series Secondary
-	71E1	Radeon X1650 Series Secondary
-	71E2	Radeon X1600 Series Secondary
-	71E3	Radeon X1600 Series Secondary
+	7172	ATI FireGL V3300 Secondary (RV515GL)
+	7173	ATI FireGL V3350 Secondary (RV515GL)
+	717E	ATI RADEON X1300 Series Secondary (RV515)
+	717F	ATI RADEON X1550 64-bit Secondary (RV515)
+	7180	ATI RADEON X1300/X1550 Series (RV515)
+	7181	ATI RADEON X1600 Series (RV515)
+	7183	ATI RADEON X1300/X1550 Series (RV515)
+	7186	ATI MOBILITY /ATI RADEON X1450 (M54)
+	7187	ATI RADEON X1300/X1550 Series (RV515)
+	7188	ATI MOBILITY /ATI RADEON X2300 (M54)
+	718A	ATI MOBILITY /ATI RADEON X2300 (M54)
+	718B	ATI MOBILITY /ATI RADEON X1350 (M52)
+	718C	ATI MOBILITY /ATI RADEON X1350 (M52)
+	718D	ATI MOBILITY /ATI RADEON X1450 (M54)
+	718F	ATI RADEON X1300 Series (RV515PCI)
+	7193	ATI RADEON X1550 Series (RV515)
+	7196	ATI MOBILITY /ATI RADEON X1350 (M52)
+	719B	ATI FireMV 2250 (RV515)
+	719F	ATI RADEON X1550 64-bit (RV515)
+	71A0	ATI RADEON X1300/X1550 Series Secondary (RV515)
+	71A1	ATI RADEON X1600 Series Secondary (RV515)
+	71A3	ATI RADEON X1300/X1550 Series Secondary (RV515)
+	71A7	ATI RADEON X1300/X1550 Series Secondary (RV515)
+	71AF	ATI RADEON X1300 Series Secondary (RV515PCI)
+	71B3	ATI RADEON X1550 Series Secondary (RV515)
+	71BB	ATI FireMV 2250 Secondary (RV515)
+	71C0	ATI RADEON X1600 Series (RV530)
+	71C1	ATI RADEON X1650 Series (RV535)
+	71C2	ATI RADEON X1600 Series (RV530)
+	71C3	ATI RADEON X1300 Series (RV535)
+	71C4	ATI MOBILITY FireGL V5200 (M56GL)
+	71C5	ATI MOBILITY /ATI RADEON X1600 (M56)
+	71C6	ATI RADEON X1650 Series (RV530)
+	71C7	ATI RADEON X1650 Series (RV535)
+	71CD	ATI RADEON X1600 Series (RV530)
+	71CE	ATI RADEON X1600 Pro / ATI RADEON X1300 XT (RV530)
+	71D2	ATI FireGL V3400 (RV530GL)
+	71D4	ATI MOBILITY FireGL V5250 (M56GL)
+	71D5	ATI MOBILITY /ATI RADEON X1700 (M56)
+	71D6	ATI MOBILITY /ATI RADEON X1700 XT (M56)
+	71DA	ATI FireGL V5200 (RV530GL)
+	71DE	ATI MOBILITY /ATI RADEON X1700 (M56)
+	71E0	ATI RADEON X1600 Series Secondary (RV530)
+	71E1	ATI RADEON X1650 Series Secondary (RV535)
+	71E2	ATI RADEON X1600 Series Secondary (RV530)
+	71E3	ATI RADEON X1300 Series Secondary (RV535)
 	71E5	M56 Secondary
-	71E6	Radeon X1650 Series Secondary (RV530 LE)
-	71E7	RADEON X1650 SERIES SECONDARY
-	71ED	Radeon X1600 Series Secondary
-	71EE	Radeon X1600 PRO / X1300XT Secondary (RV530 VE)
+	71E6	ATI RADEON X1600 Series Secondary (RV530)
+	71E7	ATI RADEON X1650 Series Secondary (RV535)
+	71ED	ATI RADEON X1600 Series Secondary (RV530)
+	71EE	ATI RADEON X1600 Pro / ATI RADEON X1300 XT Secondary (RV530)
 	71F2	ATI FireGL V3400 Secondary (RV530GL)
-	71FA	FIREGL V5200 Secondary
+	71FA	ATI FireGL V5200 Secondary (RV530GL)
 	71FE	RV530 SE Secondary
 	7205	S3G Unichrome IGP KM400/KN400 (1106)
-	7210	Mobility Radeon X2100
-	7211	Mobility Radeon X2100 Secondary
-	7240	Radeon X1900 (R580)
+	7210	ATI MOBILITY /ATI RADEON HD 2300 (M71)
+	7211	ATI MOBILITY /ATI RADEON HD 2300 (M71)
+	7240	ATI RADEON X1950 Series (R580)
 	7241	Radeon X1900 (R580)
 	7242	Radeon X1900 (R580)
-	7243	Radeon X1900 (R580)
-	7244	Radeon X1950XT Series
-	7245	Radeon X1900 (R580)
-	7246	Radeon X1900 (R580)
-	7247	Radeon X1900 (R580)
-	7248	Radeon X1900 (R580)
-	7249	Radeon X1900 Series
-	724A	Radeon X1900 (R580)
-	724B	R580LE (180636911721)
-	724C	Radeon X1900 (R580)
-	724D	Radeon X1900 (R580)
+	7243	ATI RADEON X1900 Series (R580)
+	7244	ATI RADEON X1950 Series (R580)
+	7245	ATI RADEON X1900 Series (R580)
+	7246	ATI RADEON X1900 Series (R580)
+	7247	ATI RADEON X1900 Series (R580)
+	7248	ATI RADEON X1900 Series (R580)
+	7249	ATI RADEON X1900 Series (R580)
+	724A	ATI RADEON X1900 Series (R580)
+	724B	ATI RADEON X1900 Series (R580)
+	724C	ATI RADEON X1900 Series (R580)
+	724D	ATI RADEON X1900 Series (R580)
 	724E	FireGL V7300/V7350 PCIe (R580)
-	724F	Radeon X1900 Series
-	7260	Radeon X1950 Series Secondary
-	7263	Radeon X1900 Series Secondary
-	7264	Radeon X1950XT Series Secondary
-	7265	Radeon X1900 Series Secondary
-	7266	Radeon X1900 Series Secondary
-	7267	Radeon X1900 Series Secondary
-	7268	Radeon X1950 Series Secondary
-	7269	Radeon X1900 Series Secondary
-	726A	Radeon X1900 Series Secondary
-	726B	Radeon X1900 Secondary
-	726C	Radeon X1900 Series Secondary
-	726D	Radeon X1900 Series Secondary
+	724F	ATI RADEON X1900 Series (R580)
+	7260	ATI RADEON X1950 Series Secondary (R580)
+	7263	ATI RADEON X1900 Series Secondary (R580)
+	7264	ATI RADEON X1950 Series Secondary (R580)
+	7265	ATI RADEON X1900 Series Secondary (R580)
+	7266	ATI RADEON X1900 Series Secondary (R580)
+	7267	ATI RADEON X1900 Series Secondary (R580)
+	7268	ATI RADEON X1900 Series Secondary (R580)
+	7269	ATI RADEON X1900 Series Secondary (R580)
+	726A	ATI RADEON X1900 Series Secondary (R580)
+	726B	ATI RADEON X1900 Series Secondary (R580)
+	726C	ATI RADEON X1900 Series Secondary (R580)
+	726D	ATI RADEON X1900 Series Secondary (R580)
 	726E	FireGL V7300/V7350 PCIe (R580) - Secondary
-	726F	Radeon X1900 Series Secondary
-	7280	Radeon X1950 Pro Series AGP (0x7280) (Radeon X1950 Pro)
-	7288	Radeon X1950 GT
-	7291	Radeon X1650 XT (PCIe)
-	7293	Radeon X1650 Series
-	72A0	Radeon X1950 Pro Series AGP (0x72A0) (Radeon X1950 Pro Secondary)
-	72A8	Radeon X1950 GT (Secondary)
-	72B1	Radeon X1650 XT (Secondary) (PCIe)
-	72B3	Radeon X1650 Series (Secondary)
+	726F	ATI RADEON X1900 Series Secondary (R580)
+	7280	ATI RADEON X1950 Series (R580)
+	7284	ATI MOBILITY /ATI RADEON X1900 (M58)
+	7288	ATI RADEON X1950 GT (R580)
+	7291	ATI RADEON X1650 Series (R580)
+	7293	ATI RADEON X1650 Series (R580)
+	72A0	ATI RADEON X1950 Series Secondary (R580)
+	72A8	ATI RADEON X1950 GT Secondary (R580)
+	72B1	ATI RADEON X1650 Series Secondary (R580)
+	72B3	ATI RADEON X1650 Series Secondary (R580)
 	7800	?
 	7830	RS350/100 Host Bridge
 	7831	RS350/133 Host Bridge
@@ -923,60 +944,136 @@
 	7916	RS690 PCI to PCI Bridge (PCI Express Port 2)
 	7917	RS690 PCI to PCI Bridge (PCI Express Port 3)
 	7919	Radeon X1200 Series Audio Controller
-	791E	ATI xpress 1250 (303017AA)
-	791F	ATI Mobility Radeon x1250 (RS690)
+	791A	HDMI Audio (791A)
+	791E	ATI RADEON X1200 Series (RS690)
+	791F	ATI Mobility Radeon x1100 (RS690M)
 	7930	RS600(M) Chipset - Host Bridge
 	7933	RS600(M) Chipset - PCI Express Graphics Port 0
 	7935	RS600(M) Chipset - PCI Express Port 1
 	7937	ATI Technoligies Inc (Samsung R25P)
-	793F	Radeon X1200 Series (Secondary)
-	7941	Radeon XPRESS 1300
-	7942	ATI XPress 1250M (1002)
-	796E	ATI RADEON 2100 (RS740)
+	793F	ATI RADEON Xpress 1200 Series (RS600)
+	7941	ATI RADEON Xpress 1200 Series (RS600)
+	7942	ATI RADEON Xpress 1200 Series (RS600M)
+	796E	ATI RADEON 2100 (RS690)
 	7C37	Radeon 9600 SE (RV350 AQ)
 	9400	ATI Radeon HD 2900 XT (R600)
-	9401	Radeon HD 2900 XT
-	9402	Radeon HD 2900 XT
-	9403	Radeon HD 2900 PRO
-	9405	Radeon HD 2900 GT
-	940A	FireGL V8650
-	940B	FireGL V8600
-	940F	FireGL V7600
-	9440	Graphics adapter (Radeon 4870)
-	94C1	ATI Radeon HD 2400 PRO (REV_00)
-	94C3	ATI Radeon HD 2400 PRO (RV610)
-	94C4	ATI Radeon HD 3470 PRO AGP (RV610)
-	94C5	RADEON HD 2400 LE
-	94C7	RADEON HD 2350
-	94C8	Mobility Radeon HD 2400 XT
-	94C9	Mobility Radeon HD 2400
-	94CB	Radeon E2400
-	94CC	ATI Radeon HD 2400 Series (ATI Radeon HD 4670 Series)
-	9501	ATI Radeon HD 3870 (RV670)
-	9505	Radeon HD 3850
-	9515	ATI Radeon HD3850 AGP
-	9581	ATI Mobility Radeon HD2600 (600458)
-	9583	Mobility Radeon HD 2600 XT
-	9586	Radeon HD 2600 XT AGP
-	9587	 Radeon hd 2600 pro (agp) ( Radeon hd 2600 pro (agp))
-	9588	ATI Radeon HD 2600 XT (RV530)
-	9589	ATI Radeon HD 2600 PRO (RV630)
+	9401	ATI RADEON HD 2900 XT (R600)
+	9402	ATI RADEON HD 2900 XT (R600)
+	9403	ATI RADEON HD 2900 PRO (R600)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:27:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0EF271065680;
	Fri, 12 Mar 2010 07:27:02 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 533CA8FC15;
	Fri, 12 Mar 2010 07:27:01 +0000 (UTC)
Received: by qyk5 with SMTP id 5so1038985qyk.13
	for ; Thu, 11 Mar 2010 23:27:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=rHQiFu2rIm5f1MoGhgk1D5eveOlklsJpKRfQaNbOMT0=;
	b=b8VkVf18WcV6iZ8diIOMsEpS2tYtbduWDfGZ0TLOyBlU6DBZ35PGdcitSolM16N1js
	u5SHc3gUWKDZVguKdhgn77DJP0YRiYZ4kJV8ueEi37googuWUmv8kY8Vb8OG3b9/XrXk
	y66kHUs+IpUR3xStTUTDRQY8TEI4xg6xJSYx8=
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=Ooxvy4+hJhsGpZqjpj1paWWv1aoJJ1jXJp5Hu0hqz7S475xGjsgPVQb9oXpdZ/njvl
	6TlETVZ85jqCIrDQxOHxQSWN9whnpTk7kMhZlLBO4OA3taUGtio0U6GyYDpx875rZzui
	JMeqfzXDU+0phdjN7kgq7BifPKurTEgWmSyNE=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.107.213 with SMTP id c21mr824766vcp.104.1268378820450; 
	Thu, 11 Mar 2010 23:27:00 -0800 (PST)
In-Reply-To: <4B99EA09.80108@elischer.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
	<4B99EA09.80108@elischer.org>
Date: Thu, 11 Mar 2010 23:27:00 -0800
X-Google-Sender-Auth: 64db781cfbb8b09e
Message-ID: <9ace436c1003112327i3350a0e8n9f6d5e917e9d1411@mail.gmail.com>
From: Qing Li 
To: Julian Elischer 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Juli Mallett , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Robert Watson 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:27:02 -0000

That's a good idea. I will take your approach.

-- Qing


On Thu, Mar 11, 2010 at 11:15 PM, Julian Elischer  wro=
te:
> Juli Mallett wrote:
>>
>> On Thu, Mar 11, 2010 at 15:39, Qing Li  wrote:
>>>
>>> I guess it's a good time to clean things up. The if_link_state code has
>>> been
>>> around for quite some time, either it be fully utilized or not be there
>>> at all.
>>> The inconsistency is the root cause.
>>
>> Sure. =A0There is an increasing amount of stuff that network drivers are
>> expected to do, but they work without doing them. =A0It's easy to think
>> you have a functioning network driver and that you can get by without
>> adding support for media changes and link status reporting, etc.
>>
>>> I will try going through these tonight and hopefully the fix all take a
>>> common approach.
>
> probably should add a flag that means "we have media state"
> and if it is not set, assume it is always on.
>
>>
>> If you can think of a way to add some invariants (warn the first time
>> a driver receives a packet without having ever set the link state,
>> make sure the media status callback sets the valid flag in the
>> request, etc) that would probably be very helpful for people who are
>> writing network drivers. =A0If I hadn't been following the threads about
>> your changes, I would have had to spend much longer fixing the Octeon
>> port's Ethernet driver, wondering why suddenly it broke and
>> instrumenting the routing code. =A0A printf would go a long way.
>>
>> Juli.
>
>

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:45:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04E4B106566C;
	Fri, 12 Mar 2010 07:45:42 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id D25518FC15;
	Fri, 12 Mar 2010 07:45:41 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id CF91446B17;
	Fri, 12 Mar 2010 02:45:40 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
Date: Fri, 12 Mar 2010 07:45:39 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:45:43 -0000


On Mar 11, 2010, at 11:30 PM, Qing Li wrote:

>  What you raised is definitely a possibility and these fixes take the
>  similar approach. I am going to try and go through each of these
>  drivers in /sys/dev/ and converting them, very soon.

Is there any way we can pick up via an assertion that an interface =
driver has failed to implement this functionality? This has never been a =
historic requirement, so I suspect there are a lot of drivers floating =
around that fail to meet the requirement. Also, is this for IFT_ETHER =
only, or also other link types?

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:47:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92890106566B;
	Fri, 12 Mar 2010 07:47:59 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 67D038FC17;
	Fri, 12 Mar 2010 07:47:59 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id 5734C46B06;
	Fri, 12 Mar 2010 02:47:58 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003111618t28dba8d8x19aeff2acff0c489@mail.gmail.com>
Date: Fri, 12 Mar 2010 07:47:56 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
	<9ace436c1003111618t28dba8d8x19aeff2acff0c489@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: Juli Mallett , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:47:59 -0000


On Mar 12, 2010, at 12:18 AM, Qing Li wrote:

>  You definitely have a very good point here.  I was a bit surprised
>  during debugging that the link state is not consistently initialized
>  and by far not enforced across all of the drivers. Admittedly I =
checked
>  the most commonly deployed devices and they are in good state.
>=20
>  I certainly appreciate your patience on this one and will try to get
>  it resolved quickly.

One of the reasons drivers don't do this consistently his that =
historically, hardware has not consistently supported link state =
detection. This now does seem to be a standard feature, but I think it =
would be useful to continue to support some notion of a driver not =
supporting it, hence my thoughts on a link state capability: only test =
link state if the driver can implement it. Otherwise, you end up with a =
link state undefined state, which likely comes to much the same thing, =
and is presumably what in practice you get today on drivers that don't =
set it.

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:49:10 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73D9C106564A;
	Fri, 12 Mar 2010 07:49:10 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 644C78FC17;
	Fri, 12 Mar 2010 07:49: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 o2C7nAiK034665;
	Fri, 12 Mar 2010 07:49:10 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C7nAmg034657;
	Fri, 12 Mar 2010 07:49:10 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201003120749.o2C7nAmg034657@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 12 Mar 2010 07:49: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: r205074 - head/sys/dev/ata
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:49:10 -0000

Author: mav
Date: Fri Mar 12 07:49:10 2010
New Revision: 205074
URL: http://svn.freebsd.org/changeset/base/205074

Log:
  Mask disk_idx to avoid panic because of extra bits set.
  
  PR:		kern/102211
  Submitted by:	yoichi

Modified:
  head/sys/dev/ata/ata-raid.c

Modified: head/sys/dev/ata/ata-raid.c
==============================================================================
--- head/sys/dev/ata/ata-raid.c	Fri Mar 12 07:26:37 2010	(r205073)
+++ head/sys/dev/ata/ata-raid.c	Fri Mar 12 07:49:10 2010	(r205074)
@@ -2544,22 +2544,24 @@ ata_raid_intel_read_meta(device_t dev, s
 
 	    /* clear out any old info */
 	    for (disk = 0; disk < raid->total_disks; disk++) {
+		u_int disk_idx = map->disk_idx[disk] & 0xffff;
+
 		raid->disks[disk].dev = NULL;
-		bcopy(meta->disk[map->disk_idx[disk]].serial,
+		bcopy(meta->disk[disk_idx].serial,
 		      raid->disks[disk].serial,
 		      sizeof(raid->disks[disk].serial));
 		raid->disks[disk].sectors =
-		    meta->disk[map->disk_idx[disk]].sectors;
+		    meta->disk[disk_idx].sectors;
 		raid->disks[disk].flags = 0;
-		if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ONLINE)
+		if (meta->disk[disk_idx].flags & INTEL_F_ONLINE)
 		    raid->disks[disk].flags |= AR_DF_ONLINE;
-		if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_ASSIGNED)
+		if (meta->disk[disk_idx].flags & INTEL_F_ASSIGNED)
 		    raid->disks[disk].flags |= AR_DF_ASSIGNED;
-		if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_SPARE) {
+		if (meta->disk[disk_idx].flags & INTEL_F_SPARE) {
 		    raid->disks[disk].flags &= ~(AR_DF_ONLINE | AR_DF_ASSIGNED);
 		    raid->disks[disk].flags |= AR_DF_SPARE;
 		}
-		if (meta->disk[map->disk_idx[disk]].flags & INTEL_F_DOWN)
+		if (meta->disk[disk_idx].flags & INTEL_F_DOWN)
 		    raid->disks[disk].flags &= ~AR_DF_ONLINE;
 	    }
 	}

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 07:52:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1DA68106566B;
	Fri, 12 Mar 2010 07:52:53 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A4B88FC19;
	Fri, 12 Mar 2010 07:52:52 +0000 (UTC)
Received: by qw-out-2122.google.com with SMTP id 5so325171qwi.7
	for ; Thu, 11 Mar 2010 23:52:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=Rti0TvFvIjEWUn93MMsZzX9dMlwsEvhN1u5XILEbtUg=;
	b=bEr9KTVvni6Vk5FdDk+OVzWQPWti8yWYWENuTXOB84APn9UuhfMzO5LBSxyPKKM0mv
	4B/Kk1ikECA9svGX8tMjFk3/GpzGNT7Qknd7cq4dm4CsU6mkEWG41po3XhEi+oulbNg1
	BuRbCSFCsBh+x+QU3c7i+StAQM+EDh2NRn/dg=
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=YVnmpScDgsNmjcNxAwMEtFcTfSBjND6uVpPr6+1vZe/PkUfpBXRqZmX9XDQ4aMgg2y
	2fQpimhHiDyfbXEG7celVjZZNv6hevv6kzYWLBlxaUs2KD7wXiIonARID4KEmv1pwTDU
	xpA7LYzNlP2XlK/0IiAyLvHcvlXXuEx7k/56g=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.124.170 with SMTP id u42mr893995vcr.50.1268380371626; Thu, 
	11 Mar 2010 23:52:51 -0800 (PST)
In-Reply-To: <5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
Date: Thu, 11 Mar 2010 23:52:51 -0800
X-Google-Sender-Auth: 33bc419e14412061
Message-ID: <9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
From: Qing Li 
To: "Robert N. M. Watson" 
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: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 07:52:53 -0000

>
> Is there any way we can pick up via an assertion that an interface driver=
 has failed to implement this functionality? This has never been a historic=
 requirement, so I suspect there are a lot of drivers floating around that =
fail to meet the requirement. Also, is this for IFT_ETHER only, or also oth=
er link types?
>

Not sure if I get the assertion suggestion. How would an assertion help her=
e ?

-- Qing

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:00:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB802106564A;
	Fri, 12 Mar 2010 08:00:15 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 91DA58FC13;
	Fri, 12 Mar 2010 08:00:15 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id 660FD46B65;
	Fri, 12 Mar 2010 03:00:14 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
Date: Fri, 12 Mar 2010 08:00:12 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:00:15 -0000


On Mar 12, 2010, at 7:52 AM, Qing Li wrote:

>> Is there any way we can pick up via an assertion that an interface =
driver has failed to implement this functionality? This has never been a =
historic requirement, so I suspect there are a lot of drivers floating =
around that fail to meet the requirement. Also, is this for IFT_ETHER =
only, or also other link types?
>=20
> Not sure if I get the assertion suggestion. How would an assertion =
help here ?

I think my proposal is similar to what Juli is suggesting:

- Define a new interface capability for link state detection.
- If a packet is sent or received on the interface, the capability is =
set, but the link state hasn't been set, panic.
- If a packet is sent received on the interface, the capability isn't =
set, and the link state has been set, panic.

That way the system blows up nicely and immediately, rather than =
dhclient simply never working, etc. Also, that way, testing for link =
state support is done at a point when we know the interface is live (a =
packet is sent or received).

Finally, it means that code interested in link state isn't testing for =
one of (n) IFT_ types it thinks should have link state, but instead =
testing specifically whether the driver declares link state support. Of =
course, then you have to decide how to behave if a configured interface =
ECMP is running on doesn't support link state: the answer there is =
probably to assume it is always up, which would make this work for all =
those drivers that current fail to implement it. And if the hardware =
can't support link state, which some historic (and perhaps future) link =
types can't, things still work.

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:10:30 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB93C106566B;
	Fri, 12 Mar 2010 08:10:30 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 917328FC17;
	Fri, 12 Mar 2010 08:10: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 o2C8AUCB039375;
	Fri, 12 Mar 2010 08:10:30 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2C8AUhM039373;
	Fri, 12 Mar 2010 08:10:30 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201003120810.o2C8AUhM039373@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 12 Mar 2010 08:10:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205075 - head/sys/netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:10:30 -0000

Author: rrs
Date: Fri Mar 12 08:10:30 2010
New Revision: 205075
URL: http://svn.freebsd.org/changeset/base/205075

Log:
  With the recent change of the sctp checksum  to support offload,
  no delayed checksum was added to the ip6 output code. This
  causes cards that do not support SCTP checksum offload to
  have SCTP packets that are IPv6 NOT have the sctp checksum
  performed. Thus you could not communicate with a peer. This
  adds the missing bits to make the checksum happen for these cards.
  
  PR:		144529
  MFC after:	2 weeks

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Fri Mar 12 07:49:10 2010	(r205074)
+++ head/sys/netinet6/ip6_output.c	Fri Mar 12 08:10:30 2010	(r205075)
@@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"
+#include "opt_sctp.h"
 
 #include 
 #include 
@@ -102,6 +103,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #endif /* IPSEC */
+#ifdef SCTP
+#include 
+#include 
+#endif
 
 #include 
 #include 
@@ -208,6 +213,9 @@ ip6_output(struct mbuf *m0, struct ip6_p
 	struct route_in6 *ro_pmtu = NULL;
 	int hdrsplit = 0;
 	int needipsec = 0;
+#ifdef SCTP
+	int sw_csum;
+#endif
 #ifdef IPSEC
 	struct ipsec_output_state state;
 	struct ip6_rthdr *rh = NULL;
@@ -829,6 +837,10 @@ again:
 			}
 			m->m_pkthdr.csum_flags |=
 			    CSUM_IP_CHECKED | CSUM_IP_VALID;
+#ifdef SCTP
+			if (m->m_pkthdr.csum_flags & CSUM_SCTP)
+				m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
+#endif
 			error = netisr_queue(NETISR_IPV6, m);
 			goto done;
 		} else
@@ -857,6 +869,13 @@ passout:
 	 * 4: if dontfrag == 1 && alwaysfrag == 1
 	 *	error, as we cannot handle this conflicting request
 	 */
+#ifdef SCTP
+	sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist;
+	if (sw_csum & CSUM_SCTP) {
+		sctp_delayed_cksum(m);
+		sw_csum &= ~CSUM_SCTP;
+	}
+#endif
 	tlen = m->m_pkthdr.len;
 
 	if (opt && (opt->ip6po_flags & IP6PO_DONTFRAG))

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:11:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94EE4106567D;
	Fri, 12 Mar 2010 08:11:15 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 0BDCF8FC2F;
	Fri, 12 Mar 2010 08:11:14 +0000 (UTC)
Received: by qyk5 with SMTP id 5so1068384qyk.13
	for ; Fri, 12 Mar 2010 00:11:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=xj3LhsC99EWO8/62co+Dj4hLAIR5kQWffV6zJgJjog8=;
	b=ACVxbzSUfe8n7cWmKdqqGyl68+CRXSelFKG4ZWsVGHChiFW2WRfNWs2ChTtHkF7bYr
	wwnCBytqd9EO0t5CIlguX5XfjDfOfhK7sGA6vgEdNtMX3o97B3VptZfe2HH/vYe+sJVe
	QrRS6kAG06JDo7oiLAAuTHbOb4LIXItpJYwf0=
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=kC7/X+k5nWpmS0tk4ALKbI88OAO7CN8Dk6FySayQv0mIbGbONaGREsjUjO0nQTj6fd
	SfoNHvDA2shvHTX7kkc3Dpe3vQRP66BDAeaf+8e/iWuqvXTLeTuahVDvtkeLUIfEzSt0
	IvRg1mUFqy3Sy25K0zu7d1XYvbmt/4aw6gGNI=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.122.15 with SMTP id j15mr879038vcr.150.1268381474217; Fri, 
	12 Mar 2010 00:11:14 -0800 (PST)
In-Reply-To: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
Date: Fri, 12 Mar 2010 00:11:14 -0800
X-Google-Sender-Auth: 4537e647d5cf592b
Message-ID: <9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
From: Qing Li 
To: "Robert N. M. Watson" 
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: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:11:15 -0000

I like Julian's suggestion because it is simple and very low risk.
And there isn't a need to check for interface type any more.
Here is why:

1. The interfaces that are popular and modern are already supporting
    link_state. So for these drivers, and there are just a few, I will go s=
et
    its if_flags to include "can change link_state".

2. For the existing dated drivers, because that flag bit is never set,
    no check is done.

3. In the mean time, we try to convert the drivers progressively.

4. If one wants to do ECMP and not having packets go into a black
    hole when the physical link is down, that person can ping the ML
    and ask for driver compatibility list. If we haven't converted that
    particular driver by then, we will update the driver if it's capable
    at that time.

-- Qing


On Fri, Mar 12, 2010 at 12:00 AM, Robert N. M. Watson
 wrote:
>
> On Mar 12, 2010, at 7:52 AM, Qing Li wrote:
>
>>> Is there any way we can pick up via an assertion that an interface driv=
er has failed to implement this functionality? This has never been a histor=
ic requirement, so I suspect there are a lot of drivers floating around tha=
t fail to meet the requirement. Also, is this for IFT_ETHER only, or also o=
ther link types?
>>
>> Not sure if I get the assertion suggestion. How would an assertion help =
here ?
>
> I think my proposal is similar to what Juli is suggesting:
>
> - Define a new interface capability for link state detection.
> - If a packet is sent or received on the interface, the capability is set=
, but the link state hasn't been set, panic.
> - If a packet is sent received on the interface, the capability isn't set=
, and the link state has been set, panic.
>
> That way the system blows up nicely and immediately, rather than dhclient=
 simply never working, etc. Also, that way, testing for link state support =
is done at a point when we know the interface is live (a packet is sent or =
received).
>
> Finally, it means that code interested in link state isn't testing for on=
e of (n) IFT_ types it thinks should have link state, but instead testing s=
pecifically whether the driver declares link state support. Of course, then=
 you have to decide how to behave if a configured interface ECMP is running=
 on doesn't support link state: the answer there is probably to assume it i=
s always up, which would make this work for all those drivers that current =
fail to implement it. And if the hardware can't support link state, which s=
ome historic (and perhaps future) link types can't, things still work.
>
> Robert

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:26:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61B611065679;
	Fri, 12 Mar 2010 08:26:33 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 373B08FC27;
	Fri, 12 Mar 2010 08:26:33 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id AF42946B8C;
	Fri, 12 Mar 2010 03:26:31 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
Date: Fri, 12 Mar 2010 08:26:29 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:26:33 -0000


On Mar 12, 2010, at 8:11 AM, Qing Li wrote:

> I like Julian's suggestion because it is simple and very low risk.
> And there isn't a need to check for interface type any more.
> Here is why:
>=20
> 1. The interfaces that are popular and modern are already supporting
>    link_state. So for these drivers, and there are just a few, I will =
go set
>    its if_flags to include "can change link_state".
>=20
> 2. For the existing dated drivers, because that flag bit is never set,
>    no check is done.
>=20
> 3. In the mean time, we try to convert the drivers progressively.
>=20
> 4. If one wants to do ECMP and not having packets go into a black
>    hole when the physical link is down, that person can ping the ML
>    and ask for driver compatibility list. If we haven't converted that
>    particular driver by then, we will update the driver if it's =
capable
>    at that time.


Today, we support three link state values:

170 /*
171  * Values for if_link_state.
172  */
173 #define LINK_STATE_UNKNOWN      0       /* link invalid/unknown */
174 #define LINK_STATE_DOWN         1       /* link is down */
175 #define LINK_STATE_UP           2       /* link is up */

I'm confused about Julian's proposal because it seems to me that we =
already know when a driver hasn't set or is unable to determine the link =
state: it will (should) be set to LINK_STATE_UNKNOWN by default.

So the only question we don't know the answer to, at run-time, is =
whether a driver may *ever* set the link state (i.e., it thinks it knows =
how to), and hence whether or not tools like dhclient should try to wait =
for that to happen. That is the problem that an interface capability =
would solve.

For the purposes of ECMP, you just need to decide on your policy: map =
UNKNOWN to either UP or DOWN for your purposes.

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:28:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4F29F106566B;
	Fri, 12 Mar 2010 08:28:05 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com
	[209.85.220.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E9C78FC25;
	Fri, 12 Mar 2010 08:28:03 +0000 (UTC)
Received: by fxm1 with SMTP id 1so229231fxm.13
	for ; Fri, 12 Mar 2010 00:28:03 -0800 (PST)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.103.135.25 with SMTP id m25mr1643944mun.32.1268382483101; Fri, 
	12 Mar 2010 00:28:03 -0800 (PST)
In-Reply-To: <9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	 
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> 
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com> 
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
From: Juli Mallett 
Date: Fri, 12 Mar 2010 00:27:43 -0800
X-Google-Sender-Auth: 98194c00f6a6ed34
Message-ID: 
To: Qing Li 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, "Robert N. M. Watson" 
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:28:05 -0000

On Fri, Mar 12, 2010 at 00:11, Qing Li  wrote:
> I like Julian's suggestion because it is simple and very low risk.
> And there isn't a need to check for interface type any more.
> Here is why:

For actual link state, you can already see whether a driver is in
UNKNOWN state, like:

%%%
/*
 * Values for if_link_state.
 */
#define	LINK_STATE_UNKNOWN	0	/* link invalid/unknown */
#define	LINK_STATE_DOWN		1	/* link is down */
#define	LINK_STATE_UP		2	/* link is up */
%%%

Therefore you should be able to easily add assertions and debugging
printfs for interfaces that don't event support *setting* link state
-- which is the real problem more than changing link state, since a
driver probably won't report link as down if it has no intention of
changing it.

It doesn't help that there are two things wrt link state floating
around -- one in the form of LINK_STATE (the one that matters here)
and the other in ifmedia stuff.  I think that's confusing this
discussion gratuitously.

Juli.

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:29:38 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A6324106566B;
	Fri, 12 Mar 2010 08:29:38 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B0E68FC0C;
	Fri, 12 Mar 2010 08:29:38 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2565846B53;
	Fri, 12 Mar 2010 03:29:37 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
Date: Fri, 12 Mar 2010 08:29:35 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:29:38 -0000


On Mar 12, 2010, at 8:11 AM, Qing Li wrote:

> I like Julian's suggestion because it is simple and very low risk.
> And there isn't a need to check for interface type any more.
> Here is why:

Re-reading this e-mail: perhaps you mean Juli, not Julian?

Robert

>=20
> 1. The interfaces that are popular and modern are already supporting
>    link_state. So for these drivers, and there are just a few, I will =
go set
>    its if_flags to include "can change link_state".
>=20
> 2. For the existing dated drivers, because that flag bit is never set,
>    no check is done.
>=20
> 3. In the mean time, we try to convert the drivers progressively.
>=20
> 4. If one wants to do ECMP and not having packets go into a black
>    hole when the physical link is down, that person can ping the ML
>    and ask for driver compatibility list. If we haven't converted that
>    particular driver by then, we will update the driver if it's =
capable
>    at that time.
>=20
> -- Qing
>=20
>=20
> On Fri, Mar 12, 2010 at 12:00 AM, Robert N. M. Watson
>  wrote:
>>=20
>> On Mar 12, 2010, at 7:52 AM, Qing Li wrote:
>>=20
>>>> Is there any way we can pick up via an assertion that an interface =
driver has failed to implement this functionality? This has never been a =
historic requirement, so I suspect there are a lot of drivers floating =
around that fail to meet the requirement. Also, is this for IFT_ETHER =
only, or also other link types?
>>>=20
>>> Not sure if I get the assertion suggestion. How would an assertion =
help here ?
>>=20
>> I think my proposal is similar to what Juli is suggesting:
>>=20
>> - Define a new interface capability for link state detection.
>> - If a packet is sent or received on the interface, the capability is =
set, but the link state hasn't been set, panic.
>> - If a packet is sent received on the interface, the capability isn't =
set, and the link state has been set, panic.
>>=20
>> That way the system blows up nicely and immediately, rather than =
dhclient simply never working, etc. Also, that way, testing for link =
state support is done at a point when we know the interface is live (a =
packet is sent or received).
>>=20
>> Finally, it means that code interested in link state isn't testing =
for one of (n) IFT_ types it thinks should have link state, but instead =
testing specifically whether the driver declares link state support. Of =
course, then you have to decide how to behave if a configured interface =
ECMP is running on doesn't support link state: the answer there is =
probably to assume it is always up, which would make this work for all =
those drivers that current fail to implement it. And if the hardware =
can't support link state, which some historic (and perhaps future) link =
types can't, things still work.
>>=20
>> Robert


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:30:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0FF58106566B;
	Fri, 12 Mar 2010 08:30:02 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.221.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F07F8FC1E;
	Fri, 12 Mar 2010 08:30:01 +0000 (UTC)
Received: by qyk5 with SMTP id 5so1080777qyk.13
	for ; Fri, 12 Mar 2010 00:30:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=wfis95glzt45iBBmbt8u6PY1aai4p8/avm1itvsZe1U=;
	b=k0/0+tKnYN8shP6DMhfdqNFyq3SdD8qKMfhUMLLi0QRN9clurAqILwlwMO6HYM0O8e
	6l3AbyBwwpfxRd6mwpOGjgpdvgBxYpUTQTI9UPCnT2GY/2vzZ6bW1hNF6WYqHlk67OQB
	E4Sii136VIJCT9frztTbJPVxofr4rIbJKgtz8=
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=RVz0bOTaEzCMEPE9y04/zc6G8HcyJLHSSbFWa2/hdRJ1HHtZM1Y7m7j3nwBjI8CsAx
	zvsOcL/u7WewSlzqCqHrrbq2mYV7HqJlcy+Vtj0MTsYOzcXRayYGinvUr3vLTVt2qGyj
	5t7r2ZmGpUIUNSWHYWraMkhDBG6vpdSnRQkfg=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.89.83 with SMTP id d19mr868307vcm.209.1268382600545; Fri, 
	12 Mar 2010 00:30:00 -0800 (PST)
In-Reply-To: <8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	<8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
Date: Fri, 12 Mar 2010 00:30:00 -0800
X-Google-Sender-Auth: dcfbdb5f0faa8995
Message-ID: <9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
From: Qing Li 
To: "Robert N. M. Watson" 
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: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:30:02 -0000

I believe what Julian means is the following:

1. in the driver, I do this

     ifp->if_flags |=3D IFF_KNOWS_LINK_STATE;

2. In route.h, I do this

    if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state =3D=3D
LINK_STATE_UP)
       return 1;

-- Qing


On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson
 wrote:
>
> On Mar 12, 2010, at 8:11 AM, Qing Li wrote:
>
>> I like Julian's suggestion because it is simple and very low risk.
>> And there isn't a need to check for interface type any more.
>> Here is why:
>>
>> 1. The interfaces that are popular and modern are already supporting
>> =A0 =A0link_state. So for these drivers, and there are just a few, I wil=
l go set
>> =A0 =A0its if_flags to include "can change link_state".
>>
>> 2. For the existing dated drivers, because that flag bit is never set,
>> =A0 =A0no check is done.
>>
>> 3. In the mean time, we try to convert the drivers progressively.
>>
>> 4. If one wants to do ECMP and not having packets go into a black
>> =A0 =A0hole when the physical link is down, that person can ping the ML
>> =A0 =A0and ask for driver compatibility list. If we haven't converted th=
at
>> =A0 =A0particular driver by then, we will update the driver if it's capa=
ble
>> =A0 =A0at that time.
>
>
> Today, we support three link state values:
>
> 170 /*
> 171 =A0* Values for if_link_state.
> 172 =A0*/
> 173 #define LINK_STATE_UNKNOWN =A0 =A0 =A00 =A0 =A0 =A0 /* link invalid/u=
nknown */
> 174 #define LINK_STATE_DOWN =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 /* link is down=
 */
> 175 #define LINK_STATE_UP =A0 =A0 =A0 =A0 =A0 2 =A0 =A0 =A0 /* link is up=
 */
>
> I'm confused about Julian's proposal because it seems to me that we alrea=
dy know when a driver hasn't set or is unable to determine the link state: =
it will (should) be set to LINK_STATE_UNKNOWN by default.
>
> So the only question we don't know the answer to, at run-time, is whether=
 a driver may *ever* set the link state (i.e., it thinks it knows how to), =
and hence whether or not tools like dhclient should try to wait for that to=
 happen. That is the problem that an interface capability would solve.
>
> For the purposes of ECMP, you just need to decide on your policy: map UNK=
NOWN to either UP or DOWN for your purposes.
>
> Robert

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:31:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6AA861065670;
	Fri, 12 Mar 2010 08:31:37 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26])
	by mx1.freebsd.org (Postfix) with ESMTP id D571A8FC23;
	Fri, 12 Mar 2010 08:31:36 +0000 (UTC)
Received: by qw-out-2122.google.com with SMTP id 5so333042qwi.7
	for ; Fri, 12 Mar 2010 00:31:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=XAd7JQKIKSybU4+zXksHBs2D5d1IUBJKZPtN3BkLiXg=;
	b=eAmIH2YdyVDCq/wGVPlBqhi0sNQjDKQZLj346uaAHugKf8iq6SlaZQgNedJYHBOO/+
	LPiy/c9FZ9h2GNZRdEztkRcleIL5hcauIGv2i8Y1XokFLSWRI5P2VN0iDZBI0tHOhqG5
	1TdHEE2FzXfyVU3qqVpBloZjxZenJnm4+C6xk=
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=DaRC4nxKIuHldv3G8P10r0usqxuqor7FyyICkOJ7Bq0jdzJhoRWNEXRFWRA0g/QSvo
	7VxBG0WSX3ag1j71xkGBxAHpCgOLbcEYeq3UIZd/2BVk6UxYtX/ibvDfs3fss/JSzp8f
	IsZC6xM7axuxBpEXZ945A4dGKxXWLpvmPXo1c=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.123.207 with SMTP id q15mr869497vcr.186.1268382695941; 
	Fri, 12 Mar 2010 00:31:35 -0800 (PST)
In-Reply-To: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	
Date: Fri, 12 Mar 2010 00:31:35 -0800
X-Google-Sender-Auth: 35b6fb518256ea0f
Message-ID: <9ace436c1003120031g37755281g736d6713f8757163@mail.gmail.com>
From: Qing Li 
To: "Robert N. M. Watson" 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:31:37 -0000

Nope, I meant Julian, and what he proposed, and if I understood
correctly, is the simplest
approach and easily done.

-- Qing


On Fri, Mar 12, 2010 at 12:29 AM, Robert N. M. Watson
 wrote:
>
> On Mar 12, 2010, at 8:11 AM, Qing Li wrote:
>
>> I like Julian's suggestion because it is simple and very low risk.
>> And there isn't a need to check for interface type any more.
>> Here is why:
>
> Re-reading this e-mail: perhaps you mean Juli, not Julian?
>

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:32:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53C7D1065670;
	Fri, 12 Mar 2010 08:32:25 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 1168F8FC15;
	Fri, 12 Mar 2010 08:32:25 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id C516146B53;
	Fri, 12 Mar 2010 03:32:23 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
Date: Fri, 12 Mar 2010 08:32:20 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	<8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
	<9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:32:25 -0000


On Mar 12, 2010, at 8:30 AM, Qing Li wrote:

> I believe what Julian means is the following:
>=20
> 1. in the driver, I do this
>=20
>     ifp->if_flags |=3D IFF_KNOWS_LINK_STATE;
>=20
> 2. In route.h, I do this
>=20
>    if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state =3D=3D
> LINK_STATE_UP)
>       return 1;

Please do *NOT* do this:

(1) Do not overload if_flags with more run-time set flags without =
well-defined atomicity properties
(2) Why isn't LINK_STATE_UNKNOWN already sufficient here?

The only change I think would be useful is adding a new IFCAP flag that =
allows a driver to statically declare that it will someday set the link =
state. But I don't think that helps with ECMP, that's just for the =
benefit of programs like dhclient that care about future events rather =
than current state.

Robert


>=20
> -- Qing
>=20
>=20
> On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson
>  wrote:
>>=20
>> On Mar 12, 2010, at 8:11 AM, Qing Li wrote:
>>=20
>>> I like Julian's suggestion because it is simple and very low risk.
>>> And there isn't a need to check for interface type any more.
>>> Here is why:
>>>=20
>>> 1. The interfaces that are popular and modern are already supporting
>>>    link_state. So for these drivers, and there are just a few, I =
will go set
>>>    its if_flags to include "can change link_state".
>>>=20
>>> 2. For the existing dated drivers, because that flag bit is never =
set,
>>>    no check is done.
>>>=20
>>> 3. In the mean time, we try to convert the drivers progressively.
>>>=20
>>> 4. If one wants to do ECMP and not having packets go into a black
>>>    hole when the physical link is down, that person can ping the ML
>>>    and ask for driver compatibility list. If we haven't converted =
that
>>>    particular driver by then, we will update the driver if it's =
capable
>>>    at that time.
>>=20
>>=20
>> Today, we support three link state values:
>>=20
>> 170 /*
>> 171  * Values for if_link_state.
>> 172  */
>> 173 #define LINK_STATE_UNKNOWN      0       /* link invalid/unknown =
*/
>> 174 #define LINK_STATE_DOWN         1       /* link is down */
>> 175 #define LINK_STATE_UP           2       /* link is up */
>>=20
>> I'm confused about Julian's proposal because it seems to me that we =
already know when a driver hasn't set or is unable to determine the link =
state: it will (should) be set to LINK_STATE_UNKNOWN by default.
>>=20
>> So the only question we don't know the answer to, at run-time, is =
whether a driver may *ever* set the link state (i.e., it thinks it knows =
how to), and hence whether or not tools like dhclient should try to wait =
for that to happen. That is the problem that an interface capability =
would solve.
>>=20
>> For the purposes of ECMP, you just need to decide on your policy: map =
UNKNOWN to either UP or DOWN for your purposes.
>>=20
>> Robert


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:41:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 967D31065672;
	Fri, 12 Mar 2010 08:41:46 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from out-0.mx.aerioconnect.net (outf.internet-mail-service.net
	[216.240.47.229])
	by mx1.freebsd.org (Postfix) with ESMTP id 6BEDC8FC16;
	Fri, 12 Mar 2010 08:41:46 +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
	o2C8fiSD009958; Fri, 12 Mar 2010 00:41:45 -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
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 6EF302D6020;
	Fri, 12 Mar 2010 00:41:43 -0800 (PST)
Message-ID: <4B99FE46.6090001@elischer.org>
Date: Fri, 12 Mar 2010 00:41:42 -0800
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: "Robert N. M. Watson" 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	<8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
	<9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
	
In-Reply-To: 
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, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:41:46 -0000

Robert N. M. Watson wrote:
> On Mar 12, 2010, at 8:30 AM, Qing Li wrote:
> 
>> I believe what Julian means is the following:
>>
>> 1. in the driver, I do this
>>
>>     ifp->if_flags |= IFF_KNOWS_LINK_STATE;
>>
>> 2. In route.h, I do this
>>
>>    if (ifp->flags & IFF_KNOWS_LINK_STATE) && (ifp->if_link_state ==
>> LINK_STATE_UP)
>>       return 1;
> 
> Please do *NOT* do this:
> 
> (1) Do not overload if_flags with more run-time set flags without well-defined atomicity properties
> (2) Why isn't LINK_STATE_UNKNOWN already sufficient here?
> 
> The only change I think would be useful is adding a new IFCAP flag that allows a driver to statically declare that it will someday set the link state. But I don't think that helps with ECMP, that's just for the benefit of programs like dhclient that care about future events rather than current state.
> 
> Robert

I think that any driver that can set link stats will set it to 1 or 2 
and that we can treat a state of 0 as "I don't know what the heck you 
are talking about".

My comment on a flag for this purpose was in the abstract. I didn't
necessarily mean that a particular bit in a particular register be 
used for this purpose.. The aim is to be able to discern a driver that
will not give a useful result and should therefore be assumed to be
online at all times. It looks to me that this can be achieved
several ways, including looking for the UNKNOWN link state, or adding 
a bit in the word to indicate it is valid, to adding a bit somewhere else.

> 
> 
>> -- Qing
>>
>>
>> On Fri, Mar 12, 2010 at 12:26 AM, Robert N. M. Watson
>>  wrote:
>>> On Mar 12, 2010, at 8:11 AM, Qing Li wrote:
>>>
>>>> I like Julian's suggestion because it is simple and very low risk.
>>>> And there isn't a need to check for interface type any more.
>>>> Here is why:
>>>>
>>>> 1. The interfaces that are popular and modern are already supporting
>>>>    link_state. So for these drivers, and there are just a few, I will go set
>>>>    its if_flags to include "can change link_state".
>>>>
>>>> 2. For the existing dated drivers, because that flag bit is never set,
>>>>    no check is done.
>>>>
>>>> 3. In the mean time, we try to convert the drivers progressively.
>>>>
>>>> 4. If one wants to do ECMP and not having packets go into a black
>>>>    hole when the physical link is down, that person can ping the ML
>>>>    and ask for driver compatibility list. If we haven't converted that
>>>>    particular driver by then, we will update the driver if it's capable
>>>>    at that time.
>>>
>>> Today, we support three link state values:
>>>
>>> 170 /*
>>> 171  * Values for if_link_state.
>>> 172  */
>>> 173 #define LINK_STATE_UNKNOWN      0       /* link invalid/unknown */
>>> 174 #define LINK_STATE_DOWN         1       /* link is down */
>>> 175 #define LINK_STATE_UP           2       /* link is up */
>>>
>>> I'm confused about Julian's proposal because it seems to me that we already know when a driver hasn't set or is unable to determine the link state: it will (should) be set to LINK_STATE_UNKNOWN by default.
>>>
>>> So the only question we don't know the answer to, at run-time, is whether a driver may *ever* set the link state (i.e., it thinks it knows how to), and hence whether or not tools like dhclient should try to wait for that to happen. That is the problem that an interface capability would solve.
>>>
>>> For the purposes of ECMP, you just need to decide on your policy: map UNKNOWN to either UP or DOWN for your purposes.
>>>
>>> Robert


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:45:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CFDDB1065673;
	Fri, 12 Mar 2010 08:45:00 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from out-0.mx.aerioconnect.net (outf.internet-mail-service.net
	[216.240.47.229])
	by mx1.freebsd.org (Postfix) with ESMTP id A5E848FC1A;
	Fri, 12 Mar 2010 08:45:00 +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
	o2C8ixhB010093; Fri, 12 Mar 2010 00:44:59 -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
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 514FB2D601B;
	Fri, 12 Mar 2010 00:44:59 -0800 (PST)
Message-ID: <4B99FF0A.5080504@elischer.org>
Date: Fri, 12 Mar 2010 00:44:58 -0800
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: "Robert N. M. Watson" 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	<8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
	<9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
	
	<4B99FE46.6090001@elischer.org>
In-Reply-To: <4B99FE46.6090001@elischer.org>
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, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:45:00 -0000

Julian Elischer wrote:
> Robert N. M. Watson wrote:

>>>>
>>>> Today, we support three link state values:
>>>>
>>>> 170 /*
>>>> 171  * Values for if_link_state.
>>>> 172  */
>>>> 173 #define LINK_STATE_UNKNOWN      0       /* link invalid/unknown */
>>>> 174 #define LINK_STATE_DOWN         1       /* link is down */
>>>> 175 #define LINK_STATE_UP           2       /* link is up */
>>>>
>>>> I'm confused about Julian's proposal because it seems to me that we 
>>>> already know when a driver hasn't set or is unable to determine the 
>>>> link state: it will (should) be set to LINK_STATE_UNKNOWN by default.

the question is whether there is any other meaning for this state.
For example "I have not started up yet"

>>>>
>>>> So the only question we don't know the answer to, at run-time, is 
>>>> whether a driver may *ever* set the link state (i.e., it thinks it 
>>>> knows how to), and hence whether or not tools like dhclient should 
>>>> try to wait for that to happen. That is the problem that an 
>>>> interface capability would solve.
>>>>
>>>> For the purposes of ECMP, you just need to decide on your policy: 
>>>> map UNKNOWN to either UP or DOWN for your purposes.

yes
this is a good approach assuming that there is no other meaning.


>>>>
>>>> Robert


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 08:49:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B4EE6106564A;
	Fri, 12 Mar 2010 08:49:44 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 86E0C8FC1A;
	Fri, 12 Mar 2010 08:49:44 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id 0D1AD46B39;
	Fri, 12 Mar 2010 03:49:42 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=iso-8859-1
From: "Robert N. M. Watson" 
In-Reply-To: <4B99FF0A.5080504@elischer.org>
Date: Fri, 12 Mar 2010 08:49:40 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <385F840D-4011-443C-8FC9-FAB9FDF211DF@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
	<9ace436c1003120011v3c627aadka2e57615ae01fe6f@mail.gmail.com>
	<8726950E-5110-4FE1-90BB-B4205D637764@freebsd.org>
	<9ace436c1003120030m39f518basc77c7cff40299008@mail.gmail.com>
	
	<4B99FE46.6090001@elischer.org> <4B99FF0A.5080504@elischer.org>
To: Julian Elischer 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 08:49:44 -0000


On Mar 12, 2010, at 8:44 AM, Julian Elischer wrote:

>>>>> I'm confused about Julian's proposal because it seems to me that =
we already know when a driver hasn't set or is unable to determine the =
link state: it will (should) be set to LINK_STATE_UNKNOWN by default.
>=20
> the question is whether there is any other meaning for this state.
> For example "I have not started up yet"

Right now LINK_STATE_UNKNOWN conflates three different conditions:

(1) I haven't and won't ever set the link state
(2) I haven't yet, but may in the future set the link state
(3) I wanted to check the link state, and the hardware is $*$**=A3*@@ so =
I left or set this value instead

My preferred solution is to advertise driver capabilities via the driver =
capabilities flag, if_capabilities, and define a new flag =
IFCAP_LINKSTATE (or something similar) that allows a driver to declare =
that it is able to determine link state. If the flag is set, then =
components like ECMP, but also dhclient, can reasonably expect that the =
driver will do its best to provide link state information, addressing =
the difference between (1) and (2) when a value of LINK_STATE_UNKNOWN is =
found.

If we are able to explicitly handle (3) in any of our drivers, then a =
new link state definition should be defined, LINK_STATE_ERROR, which =
should be set by the driver if it declared ICAP_LINKSTATE but was =
unable, due to hardware failure, to check it.

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 10:01:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40F0F106566C;
	Fri, 12 Mar 2010 10:01:07 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2C1AC8FC1A;
	Fri, 12 Mar 2010 10:01: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 o2CA17Xx063654;
	Fri, 12 Mar 2010 10:01:07 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CA16Xi063630;
	Fri, 12 Mar 2010 10:01:06 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003121001.o2CA16Xi063630@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 12 Mar 2010 10:01: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: r205076 - in head: games/pom lib/libc/compat-43
	lib/libgssapi lib/libkvm lib/librpcsec_gss lib/msun/man
	libexec/tftpd sbin/quotacheck share/man/man4 share/man/man9
	usr.bin/tar usr.sbin/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 10:01:07 -0000

Author: uqs
Date: Fri Mar 12 10:01:06 2010
New Revision: 205076
URL: http://svn.freebsd.org/changeset/base/205076

Log:
  Fix several typos in macros or macro misusage.
  
  Found by:	make manlint
  Reviewed by:	ru
  Approved by:	philip (mentor)

Modified:
  head/games/pom/pom.6
  head/lib/libc/compat-43/sigpause.2
  head/lib/libgssapi/gss_init_sec_context.3
  head/lib/libgssapi/gss_unwrap.3
  head/lib/libkvm/kvm_getpcpu.3
  head/lib/librpcsec_gss/rpcsec_gss.3
  head/lib/msun/man/cimag.3
  head/libexec/tftpd/tftpd.8
  head/sbin/quotacheck/quotacheck.8
  head/share/man/man4/acpi_wmi.4
  head/share/man/man4/altq.4
  head/share/man/man4/amdtemp.4
  head/share/man/man4/cxgb.4
  head/share/man/man4/ddb.4
  head/share/man/man4/iscsi_initiator.4
  head/share/man/man4/textdump.4
  head/share/man/man4/uart.4
  head/share/man/man9/fail.9
  head/usr.bin/tar/bsdtar.1
  head/usr.sbin/freebsd-update/freebsd-update.8
  head/usr.sbin/pkg_install/updating/pkg_updating.1
  head/usr.sbin/pmcannotate/pmcannotate.8
  head/usr.sbin/uhsoctl/uhsoctl.1

Modified: head/games/pom/pom.6
==============================================================================
--- head/games/pom/pom.6	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/games/pom/pom.6	Fri Mar 12 10:01:06 2010	(r205076)
@@ -34,7 +34,6 @@
 .\"
 .Dd May 31, 1993
 .Dt POM 6
-.UC 7
 .Sh NAME
 .Nm pom
 .Nd display the phase of the moon

Modified: head/lib/libc/compat-43/sigpause.2
==============================================================================
--- head/lib/libc/compat-43/sigpause.2	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/libc/compat-43/sigpause.2	Fri Mar 12 10:01:06 2010	(r205076)
@@ -195,6 +195,7 @@ functions, an attempt was made to catch 
 .Dv SIGKILL
 or
 .Dv SIGSTOP .
+.El
 .Sh SEE ALSO
 .Xr kill 2 ,
 .Xr sigaction 2 ,

Modified: head/lib/libgssapi/gss_init_sec_context.3
==============================================================================
--- head/lib/libgssapi/gss_init_sec_context.3	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/libgssapi/gss_init_sec_context.3	Fri Mar 12 10:01:06 2010	(r205076)
@@ -153,7 +153,7 @@ The values of the
 .Dv GSS_C_MUTUAL_FLAG ,
 .Dv GSS_C_REPLAY_FLAG ,
 .Dv GSS_C_SEQUENCE_FLAG ,
-.Fv GSS_C_CONF_FLAG ,
+.Dv GSS_C_CONF_FLAG ,
 .Dv GSS_C_INTEG_FLAG and
 .Dv GSS_C_ANON_FLAG bits returned via the
 .Fa ret_flags

Modified: head/lib/libgssapi/gss_unwrap.3
==============================================================================
--- head/lib/libgssapi/gss_unwrap.3	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/libgssapi/gss_unwrap.3	Fri Mar 12 10:01:06 2010	(r205076)
@@ -155,6 +155,7 @@ The context_handle parameter did not ide
 Generic Security Service Application Program Interface Version 2, Update 1
 .It RFC 2744
 Generic Security Service API Version 2 : C-bindings
+.El
 .Sh HISTORY
 The
 .Nm

Modified: head/lib/libkvm/kvm_getpcpu.3
==============================================================================
--- head/lib/libkvm/kvm_getpcpu.3	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/libkvm/kvm_getpcpu.3	Fri Mar 12 10:01:06 2010	(r205076)
@@ -96,7 +96,7 @@ will return pointers to that data on the
 .Sh CACHING
 .Fn kvm_getmaxcpu
 and
-.Vn kvm_getpcpu
+.Fn kvm_getpcpu
 cache the nlist values for various kernel variables which are
 reused in successive calls.
 You may call either function with

Modified: head/lib/librpcsec_gss/rpcsec_gss.3
==============================================================================
--- head/lib/librpcsec_gss/rpcsec_gss.3	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/librpcsec_gss/rpcsec_gss.3	Fri Mar 12 10:01:06 2010	(r205076)
@@ -173,6 +173,7 @@ typedef struct {
 #define RPC_GSS_ER_SUCCESS	0	/* no error */
 #define RPC_GSS_ER_SYSTEMERROR	1	/* system error */
 .Ed
+.El
 .Sh INDEX
 .Bl -tag -width "MMMM"
 .It Xr rpc_gss_seccreate 3

Modified: head/lib/msun/man/cimag.3
==============================================================================
--- head/lib/msun/man/cimag.3	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/lib/msun/man/cimag.3	Fri Mar 12 10:01:06 2010	(r205076)
@@ -118,4 +118,4 @@ functions first appeared in
 The
 .Fn cproj
 functions appeared in
-.Fx 8.0.
+.Fx 8.0 .

Modified: head/libexec/tftpd/tftpd.8
==============================================================================
--- head/libexec/tftpd/tftpd.8	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/libexec/tftpd/tftpd.8	Fri Mar 12 10:01:06 2010	(r205076)
@@ -240,7 +240,7 @@ and the
 and
 .Fl W
 options were introduced in
-.Fx 7 .
+.Fx 8.0 .
 .Pp
 .Sh BUGS
 Files larger than 33488896 octets (65535 blocks) cannot be transferred

Modified: head/sbin/quotacheck/quotacheck.8
==============================================================================
--- head/sbin/quotacheck/quotacheck.8	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/sbin/quotacheck/quotacheck.8	Fri Mar 12 10:01:06 2010	(r205076)
@@ -82,7 +82,7 @@ is zero, parallel passes are run as per
 .Xr fsck 8 .
 This option is deprecated and parallel passes are always run
 as per
-.Xf fsck 8.
+.Xr fsck 8 .
 .It Fl u
 Only user quotas listed in
 .Pa /etc/fstab

Modified: head/share/man/man4/acpi_wmi.4
==============================================================================
--- head/share/man/man4/acpi_wmi.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/acpi_wmi.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -57,7 +57,7 @@ information about GUIDs found in the sys
 WMI status device.
 .El
 .Sh EXAMPLES
-.Bd Literal
+.Bd -literal
 # cat /dev/wmistat
 GUID                                  INST EXPE METH STR EVENT OID
 {5FB7F034-2C63-45E9-BE91-3D44E2C707E4}   1 NO   WMAA NO  NO    AA

Modified: head/share/man/man4/altq.4
==============================================================================
--- head/share/man/man4/altq.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/altq.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -121,7 +121,7 @@ They have been applied to the following 
 .Xr an 4 ,
 .Xr ath 4 ,
 .Xr aue 4 ,
-.Xt axe 4 ,
+.Xr axe 4 ,
 .Xr bce 4 ,
 .Xr bfe 4 ,
 .Xr bge 4 ,

Modified: head/share/man/man4/amdtemp.4
==============================================================================
--- head/share/man/man4/amdtemp.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/amdtemp.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -75,6 +75,5 @@ The
 driver first appeared in
 .Fx 7.1 .
 .Sh AUTHORS
-.An
 .An Rui Paulo Aq rpaulo@FreeBSD.org
 .An Norikatsu Shigemura Aq nork@FreeBSD.org

Modified: head/share/man/man4/cxgb.4
==============================================================================
--- head/share/man/man4/cxgb.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/cxgb.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -92,8 +92,6 @@ Tunables can be set at the
 .Xr loader 8
 prompt before booting the kernel or stored in
 .Xr loader.conf 5 .
-.Bl -tag -width indent
-.El
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "cxgb%d: Unable to allocate bus resource: memory"

Modified: head/share/man/man4/ddb.4
==============================================================================
--- head/share/man/man4/ddb.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/ddb.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -697,7 +697,7 @@ Show information from the local APIC reg
 .It Ic show Cm lock Ar addr
 Show lock structure.
 The output format is as follows:
-.Bl -tag -offset 0 -width "flags"
+.Bl -tag -width "flags"
 .It Ic class:
 Class of the lock.
 Possible types include

Modified: head/share/man/man4/iscsi_initiator.4
==============================================================================
--- head/share/man/man4/iscsi_initiator.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/iscsi_initiator.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -73,7 +73,7 @@ is the IP address of the target of sessi
 .Em n .
 .It Va net.iscsi.n.stats
 are some statistics for session
-.EM n
+.Em n
 .It Va net.iscsi.n.pid
 is the 
 .Em "process id"

Modified: head/share/man/man4/textdump.4
==============================================================================
--- head/share/man/man4/textdump.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/textdump.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -74,7 +74,7 @@ May be disabled by clearing the
 sysctl.
 .It Pa config.txt
 Kernel configuration, if
-.Od options INCLUDE_CONFIG_FILE
+.Cd options INCLUDE_CONFIG_FILE
 has been compiled into the kernel.
 May be disabled by clearing the
 .Dv debug.ddb.textdump.do_config

Modified: head/share/man/man4/uart.4
==============================================================================
--- head/share/man/man4/uart.4	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man4/uart.4	Fri Mar 12 10:01:06 2010	(r205076)
@@ -46,7 +46,6 @@ In
 .Cd hint.uart.0.baud="38400"
 .Cd hint.uart.0.port="0x3f8"
 .Cd hint.uart.0.flags="0x10"
-.Ed
 .Pp
 With
 .Ar flags

Modified: head/share/man/man9/fail.9
==============================================================================
--- head/share/man/man9/fail.9	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/share/man/man9/fail.9	Fri Mar 12 10:01:06 2010	(r205076)
@@ -84,7 +84,7 @@ below.
 The remaining
 .Fn KFAIL_POINT_*
 macros are wrappers around common error injection paths:
-.Bl -tag -width 8
+.Bl -inset
 .It Fn KFAIL_POINT_RETURN parent name
 is the equivalent of
 .Sy KFAIL_POINT_CODE(..., return RETURN_VALUE)
@@ -96,8 +96,7 @@ is the equivalent of
 .Sy KFAIL_POINT_CODE(..., error_var = RETURN_VALUE)
 .It Fn KFAIL_POINT_GOTO parent name error_var label
 is the equivalent of
-.Sy KFAIL_POINT_CODE(...,
-  { error_var = RETURN_VALUE; goto label;})
+.Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;})
 .El
 .Sh SYSCTL VARIABLES
 The

Modified: head/usr.bin/tar/bsdtar.1
==============================================================================
--- head/usr.bin/tar/bsdtar.1	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/usr.bin/tar/bsdtar.1	Fri Mar 12 10:01:06 2010	(r205076)
@@ -416,7 +416,7 @@ The pattern has the format /old/new/[gps
 old is a basic regular expression.
 If it doesn't apply, the pattern is skipped.
 new is the replacement string of the matched part.
-~ is substituted with the match, \1 to \9 with the content of
+~ is substituted with the match, \e1 to \e9 with the content of
 the corresponding captured group.
 The optional trailing g specifies that matching should continue
 after the matched part and stopped on the first unmatched pattern.

Modified: head/usr.sbin/freebsd-update/freebsd-update.8
==============================================================================
--- head/usr.sbin/freebsd-update/freebsd-update.8	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/usr.sbin/freebsd-update/freebsd-update.8	Fri Mar 12 10:01:06 2010	(r205076)
@@ -149,7 +149,7 @@ other than 3AM, to avoid overly imposing
 on the server(s) hosting the updates.
 .It
 In spite of its name,
-.Cm
+.Nm
 IDS should not be relied upon as an "Intrusion Detection
 System", since if the system has been tampered with
 it cannot be trusted to operate correctly.

Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1
==============================================================================
--- head/usr.sbin/pkg_install/updating/pkg_updating.1	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/usr.sbin/pkg_install/updating/pkg_updating.1	Fri Mar 12 10:01:06 2010	(r205076)
@@ -44,34 +44,25 @@ Defines a alternative location of the UP
 Print help message.
 .El
 .Sh EXAMPLES
-.Bl -tag -width indent
 Shows all entries of all installed ports:
-.Pp
 .Dl % pkg_updating
 .Pp
 Shows all entries of all installed ports since 2007-01-01:
-.Pp
 .Dl % pkg_updating -d 20070101
 .Pp
 Shows all entries for all apache and mysql ports:
-.Pp
 .Dl % pkg_updating apache mysql
 .Pp
 Shows all apache entries since 2006-01-01:
-.Pp
 .Dl % pkg_updating -d 20060101 apache
 .Pp
 Defines that the UPDATING file is in /tmp and shows all entries of all
 installed ports:
-.Pp
 .Dl % pkg_updating -f /tmp/UPDATING
 .Pp
 Fetch UPDATING file from ftp mirror and show all entries of all
 installed ports:
-.Pp
 .Dl % pkg_updating -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/UPDATING
-.Pp
-.El
 .Sh ENVIRONMENT
 .Bl -tag -width PKG_DBDIR
 .It Ev PKG_DBDIR

Modified: head/usr.sbin/pmcannotate/pmcannotate.8
==============================================================================
--- head/usr.sbin/pmcannotate/pmcannotate.8	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/usr.sbin/pmcannotate/pmcannotate.8	Fri Mar 12 10:01:06 2010	(r205076)
@@ -86,6 +86,7 @@ This directory specifies where
 should look for the kernel and its modules.
 The default is
 .Pa /boot/kernel .
+.El
 .Sh LIMITATIONS
 As long as
 .Nm

Modified: head/usr.sbin/uhsoctl/uhsoctl.1
==============================================================================
--- head/usr.sbin/uhsoctl/uhsoctl.1	Fri Mar 12 08:10:30 2010	(r205075)
+++ head/usr.sbin/uhsoctl/uhsoctl.1	Fri Mar 12 10:01:06 2010	(r205076)
@@ -94,11 +94,9 @@ on interface
 and use PIN
 .Dq 1234
 to enable the SIM card.
-
 .Dl "uhsoctl -a apn.example.com -p 1234 uhso0"
-
-Disconnect from a previously established connection
-
+.Pp
+Disconnect from a previously established connection.
 .Dl "uhsoctl -d uhso0"
 .Sh SEE ALSO
 .Xr uhso 4

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 10:24:59 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6E51B106564A;
	Fri, 12 Mar 2010 10:24:59 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 432138FC18;
	Fri, 12 Mar 2010 10:24: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 o2CAOx1D069049;
	Fri, 12 Mar 2010 10:24:59 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CAOxUv069047;
	Fri, 12 Mar 2010 10:24:59 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201003121024.o2CAOxUv069047@svn.freebsd.org>
From: Qing Li 
Date: Fri, 12 Mar 2010 10:24: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: r205077 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 10:24:59 -0000

Author: qingli
Date: Fri Mar 12 10:24:58 2010
New Revision: 205077
URL: http://svn.freebsd.org/changeset/base/205077

Log:
  The flow-table module retrieves the destination and source
  address as well as the transport protocol port information
  from the outbound packets. The routing code is generic and
  compares every byte in the given sockaddr object. Therefore
  the temporary sockaddr objects must be cleared due to padding
  bytes. In addition, the port information must be stripped
  or the route search will either fail or return the incorrect
  route entry.
  
  Unit testing is done using OpenVPN over the if_tun interface.
  
  MFC after:	7 days

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Fri Mar 12 10:01:06 2010	(r205076)
+++ head/sys/net/flowtable.c	Fri Mar 12 10:24:58 2010	(r205077)
@@ -593,6 +593,8 @@ flowtable_lookup_mbuf4(struct flowtable 
 
 	dsin = (struct sockaddr_in *)&dsa;
 	ssin = (struct sockaddr_in *)&ssa;
+	bzero(dsin, sizeof(*dsin));
+	bzero(ssin, sizeof(*ssin));
 	flags = ft->ft_flags;
 	if (ipv4_mbuf_demarshal(ft, m, ssin, dsin, &flags) != 0)
 		return (NULL);
@@ -796,6 +798,8 @@ flowtable_lookup_mbuf6(struct flowtable 
 
 	dsin6 = (struct sockaddr_in6 *)&dsa;
 	ssin6 = (struct sockaddr_in6 *)&ssa;
+	bzero(dsin6, sizeof(*dsin6));
+	bzero(ssin6, sizeof(*ssin6));
 	flags = ft->ft_flags;
 	
 	if (ipv6_mbuf_demarshal(ft, m, ssin6, dsin6, &flags) != 0)
@@ -1088,6 +1092,14 @@ flowtable_lookup(struct flowtable *ft, s
 
 		ro = &sro;
 		memcpy(&ro->ro_dst, dsa, sizeof(struct sockaddr_in));
+		/*
+		 * The harvested source and destination addresses
+		 * may contain port information if the packet is 
+		 * from a transport protocol (e.g. TCP/UDP). The 
+		 * port field must be cleared before performing 
+		 * a route lookup.
+		 */
+		((struct sockaddr_in *)&ro->ro_dst)->sin_port = 0;
 		dsin = (struct sockaddr_in *)dsa;
 		ssin = (struct sockaddr_in *)ssa;
 		if ((dsin->sin_addr.s_addr == ssin->sin_addr.s_addr) ||
@@ -1105,6 +1117,7 @@ flowtable_lookup(struct flowtable *ft, s
 		ro = (struct route *)&sro6;
 		memcpy(&sro6.ro_dst, dsa,
 		    sizeof(struct sockaddr_in6));
+		((struct sockaddr_in6 *)&ro->ro_dst)->sin6_port = 0;
 		dsin6 = (struct sockaddr_in6 *)dsa;
 		ssin6 = (struct sockaddr_in6 *)ssa;
 

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 11:05:37 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 634481065678;
	Fri, 12 Mar 2010 11:05:37 +0000 (UTC) (envelope-from uqs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 520AF8FC0C;
	Fri, 12 Mar 2010 11:05: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 o2CB5bWI079914;
	Fri, 12 Mar 2010 11:05:37 GMT (envelope-from uqs@svn.freebsd.org)
Received: (from uqs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CB5bi0079911;
	Fri, 12 Mar 2010 11:05:37 GMT (envelope-from uqs@svn.freebsd.org)
Message-Id: <201003121105.o2CB5bi0079911@svn.freebsd.org>
From: Ulrich Spoerlein 
Date: Fri, 12 Mar 2010 11:05: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: r205078 - in head/contrib/bsnmp: gensnmptree snmpd
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 11:05:37 -0000

Author: uqs
Date: Fri Mar 12 11:05:37 2010
New Revision: 205078
URL: http://svn.freebsd.org/changeset/base/205078

Log:
  Fix typo in macro name and macro usage.
  
  Found by:	make manlint
  Reviewed by:	ru
  Approved by:	harti, philip (mentor)

Modified:
  head/contrib/bsnmp/gensnmptree/gensnmptree.1
  head/contrib/bsnmp/snmpd/snmpmod.3

Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1
==============================================================================
--- head/contrib/bsnmp/gensnmptree/gensnmptree.1	Fri Mar 12 10:24:58 2010	(r205077)
+++ head/contrib/bsnmp/gensnmptree/gensnmptree.1	Fri Mar 12 11:05:37 2010	(r205078)
@@ -58,7 +58,7 @@ If none of the options
 .Fl e ,
 .Fl E
 or
-.FL t
+.Fl t
 are used
 .Nm
 reads a MIB description from its standard input and creates two files: a

Modified: head/contrib/bsnmp/snmpd/snmpmod.3
==============================================================================
--- head/contrib/bsnmp/snmpd/snmpmod.3	Fri Mar 12 10:24:58 2010	(r205077)
+++ head/contrib/bsnmp/snmpd/snmpmod.3	Fri Mar 12 11:05:37 2010	(r205078)
@@ -777,7 +777,8 @@ is used for GET or GETNEXT.
 The function
 .It Fn string_get_max
 can be used instead of
-.Nf stringto ensure that the returned string has a certain maximum length.
+.Fn string_get
+to ensure that the returned string has a certain maximum length.
 If
 .Fa len
 is -1, the length is computed via

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 12:07:21 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8189C106566C;
	Fri, 12 Mar 2010 12:07:21 +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 6FDC88FC25;
	Fri, 12 Mar 2010 12:07: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 o2CC7LRa093517;
	Fri, 12 Mar 2010 12:07:21 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CC7L0V093515;
	Fri, 12 Mar 2010 12:07:21 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201003121207.o2CC7L0V093515@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 12 Mar 2010 12:07: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: r205079 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 12:07:21 -0000

Author: pjd
Date: Fri Mar 12 12:07:21 2010
New Revision: 205079
URL: http://svn.freebsd.org/changeset/base/205079

Log:
  Remove bogus assertion.
  
  Reported by:	Johan Ström 
  Obtained from:	OpenSolaris, Bug ID 6827260
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Fri Mar 12 11:05:37 2010	(r205078)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Fri Mar 12 12:07:21 2010	(r205079)
@@ -2210,9 +2210,6 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *
 		for (i = db->db.db_size >> SPA_BLKPTRSHIFT; i > 0; i--, ibp++) {
 			if (BP_IS_HOLE(ibp))
 				continue;
-			ASSERT3U(BP_GET_LSIZE(ibp), ==,
-			    db->db_level == 1 ? dn->dn_datablksz :
-			    (1<dn_phys->dn_indblkshift));
 			fill += ibp->blk_fill;
 		}
 	}

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 12:11:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1134A106564A;
	Fri, 12 Mar 2010 12:11:02 +0000 (UTC)
	(envelope-from pjd@garage.freebsd.pl)
Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl
	[89.77.43.238])
	by mx1.freebsd.org (Postfix) with ESMTP id 4EDD58FC18;
	Fri, 12 Mar 2010 12:11:00 +0000 (UTC)
Received: by mail.garage.freebsd.pl (Postfix, from userid 65534)
	id E9A4745E87; Fri, 12 Mar 2010 13:10:58 +0100 (CET)
Received: from localhost (pdawidek.wheel.pl [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 5E91145CA0;
	Fri, 12 Mar 2010 13:10:53 +0100 (CET)
Date: Fri, 12 Mar 2010 13:10:53 +0100
From: Pawel Jakub Dawidek 
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
Message-ID: <20100312121053.GH1819@garage.freebsd.pl>
References: <201003121207.o2CC7L0V093515@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="bjuZg6miEcdLYP6q"
Content-Disposition: inline
In-Reply-To: <201003121207.o2CC7L0V093515@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 i386
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on 
	mail.garage.freebsd.pl
X-Spam-Level: 
X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 
	autolearn=ham version=3.0.4
Cc: 
Subject: Re: svn commit: r205079 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 12:11:02 -0000


--bjuZg6miEcdLYP6q
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 12, 2010 at 12:07:21PM +0000, Pawel Jakub Dawidek wrote:
> Author: pjd
> Date: Fri Mar 12 12:07:21 2010
> New Revision: 205079
> URL: http://svn.freebsd.org/changeset/base/205079
>=20
> Log:
>   Remove bogus assertion.
>  =20
>   Reported by:	Johan Str=F6m 
>   Obtained from:	OpenSolaris, Bug ID 6827260

Grr, it was bug 6920880. Unfortunately no forced commits in subversion.

>   MFC after:	1 week
>=20
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
>=20
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.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/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Fri Mar 12=
 11:05:37 2010	(r205078)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Fri Mar 12=
 12:07:21 2010	(r205079)
> @@ -2210,9 +2210,6 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *
>  		for (i =3D db->db.db_size >> SPA_BLKPTRSHIFT; i > 0; i--, ibp++) {
>  			if (BP_IS_HOLE(ibp))
>  				continue;
> -			ASSERT3U(BP_GET_LSIZE(ibp), =3D=3D,
> -			    db->db_level =3D=3D 1 ? dn->dn_datablksz :
> -			    (1<dn_phys->dn_indblkshift));
>  			fill +=3D ibp->blk_fill;
>  		}
>  	}

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--bjuZg6miEcdLYP6q
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkuaL00ACgkQForvXbEpPzT7DwCgpn4JmbqZyhp1DCRmQYKzigcg
Eq8An1HhXoFnYqo870kF4Jo+6PpRHNaF
=wkdj
-----END PGP SIGNATURE-----

--bjuZg6miEcdLYP6q--

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 12:36:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00DF21065670;
	Fri, 12 Mar 2010 12:36:58 +0000 (UTC)
	(envelope-from unixmania@gmail.com)
Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com
	[209.85.220.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F8528FC22;
	Fri, 12 Mar 2010 12:36:56 +0000 (UTC)
Received: by fxm1 with SMTP id 1so416470fxm.13
	for ; Fri, 12 Mar 2010 04:36:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=wN/kI4NAPkQMEukor6hWBZoejk55GfzKTdGtg8Y1QjE=;
	b=pBbnjJctcYnPI9AbZad758w9XslqjJ0ZyFS+BM9XYY+2vm2f5GvdsBDL6t+4/N27hA
	9FUnklR3FmIPipPIK4cKYuQCt1CfTWtwf9zRCfMQfMg+Ws9cxsguv7w9iYTvzJJe19Hp
	wyVqNMj+yWCEudDGB4ie66NynyBseCwHbGZlA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=o/I6o8jbD8lGxnHwPaS5mugxDj6tnBQOjZDPG9E6rnCxonFQGB3rFurHL+vzZ97lwB
	OjjB1Cwnbl64y04FvudOnOh80CbL4adn6JhU/GLhIjnKF9Dpt58m7cLt04qHQXuSIRgJ
	2rjNfRAXA4e3gsI2kcEuwCXAVNrVmTukegmCI=
MIME-Version: 1.0
Received: by 10.239.188.129 with SMTP id p1mr486340hbh.190.1268397415780; Fri, 
	12 Mar 2010 04:36:55 -0800 (PST)
In-Reply-To: <201003111449.o2BEn6QY069179@svn.freebsd.org>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
Date: Fri, 12 Mar 2010 09:36:55 -0300
Message-ID: 
From: "Carlos A. M. dos Santos" 
To: Nathan Whitehorn 
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: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 
	sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 12:36:58 -0000

On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
 wrote:
> Author: nwhitehorn
> Date: Thu Mar 11 14:49:06 2010
> New Revision: 205014
> URL: http://svn.freebsd.org/changeset/base/205014
>
> Log:
> =A0Provide groundwork for 32-bit binary compatibility on non-x86 platform=
s,
> =A0for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_=
IA32
> =A0option to COMPAT_FREEBSD32, removes some IA32-specific code from MI pa=
rts
> =A0of the kernel and enhances the freebsd32 compatibility code to support
> =A0big-endian platforms.

COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
interpreted as "compatible with FreeBSD 3.2". Something like
"COMPAT_32BIT" would be more meaningful.

--=20
Not so young, but still crying out
Full of anger full of doubt

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 13:31:02 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 30C491065673;
	Fri, 12 Mar 2010 13:31:02 +0000 (UTC)
	(envelope-from bms@incunabulum.net)
Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com
	[66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 137F48FC16;
	Fri, 12 Mar 2010 13:31:00 +0000 (UTC)
Received: from compute2.internal (compute2.internal [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id BC488E575F;
	Fri, 12 Mar 2010 08:30:59 -0500 (EST)
Received: from heartbeat2.messagingengine.com ([10.202.2.161])
	by compute2.internal (MEProxy); Fri, 12 Mar 2010 08:30:59 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
	h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding;
	s=smtpout; bh=ndrGDRImZb0Av0hXYOSvTohMQHI=;
	b=nui2RsTTYVwbxy9HhTEwIsx9AQvnaMWMNh3mlSNrVfGrumobGa9kX3aYyvRxktXM2GSqalB7aeKtHiVe4DmIvIk7UZ0ERZithFlaf2T2zdWJd3DsOEra0Jezhf/CYDXo2/xbW+/aIkyGrkEbiFVNuSQSzyTow9WQpXHPN0XZ4FI=
X-Sasl-enc: YzBr09RimIpovBZBm4xJHEgcChGIzwvIH97EVyqhor6j 1268400659
Received: from anglepoise.lon.incunabulum.net
	(cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id 064156FCE;
	Fri, 12 Mar 2010 08:30:58 -0500 (EST)
Message-ID: <4B9A4210.3030503@incunabulum.net>
Date: Fri, 12 Mar 2010 13:30:56 +0000
From: Bruce Simpson 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.8) Gecko/20100302 Thunderbird/3.0.3
MIME-Version: 1.0
To: "Robert N. M. Watson" 
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	<5ADB6F0D-11F1-4F9F-87A0-64F57063981E@freebsd.org>
	<9ace436c1003112352l3b2505ceq63d9c78954520497@mail.gmail.com>
	
In-Reply-To: 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, Qing Li ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 13:31:02 -0000

Any objections to making AF_NETLINK Foundation proposal public?

Might help FreeBSD get out of the niche a bit more; energy quantum wells 
are never great.

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 13:36:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B824C1065678;
	Fri, 12 Mar 2010 13:36:58 +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 8C80A8FC51;
	Fri, 12 Mar 2010 13:36: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 o2CDaweZ013392;
	Fri, 12 Mar 2010 13:36:58 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CDawC4013390;
	Fri, 12 Mar 2010 13:36:58 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201003121336.o2CDawC4013390@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Fri, 12 Mar 2010 13:36: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: r205080 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 13:36:58 -0000

Author: pjd
Date: Fri Mar 12 13:36:58 2010
New Revision: 205080
URL: http://svn.freebsd.org/changeset/base/205080

Log:
  Force commit to correct Bug ID:
  
  Obtained from:	OpenSolaris, Bug ID 6920880

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==============================================================================

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 13:46:25 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACD06106564A;
	Fri, 12 Mar 2010 13:46:25 +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 0FF038FC13;
	Fri, 12 Mar 2010 13:46:25 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 035781FFC22;
	Fri, 12 Mar 2010 13:46:23 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id D20E18449F; Fri, 12 Mar 2010 14:46:23 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Pawel Jakub Dawidek 
References: <201003121207.o2CC7L0V093515@svn.freebsd.org>
	<20100312121053.GH1819@garage.freebsd.pl>
Date: Fri, 12 Mar 2010 14:46:23 +0100
In-Reply-To: <20100312121053.GH1819@garage.freebsd.pl> (Pawel Jakub Dawidek's
	message of "Fri, 12 Mar 2010 13:10:53 +0100")
Message-ID: <866351fya8.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205079 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 13:46:25 -0000

Pawel Jakub Dawidek  writes:
> Grr, it was bug 6920880. Unfortunately no forced commits in subversion.

Forced commits are possible, as discussed on -developers a few months ago.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 13:52:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BD311065673;
	Fri, 12 Mar 2010 13:52:51 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com
	[209.85.220.223])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B0328FC14;
	Fri, 12 Mar 2010 13:52:50 +0000 (UTC)
Received: by fxm23 with SMTP id 23so1205263fxm.3
	for ; Fri, 12 Mar 2010 05:52:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:cc:message-id:from:to
	:in-reply-to:content-type:content-transfer-encoding:mime-version
	:subject:date:references:x-mailer;
	bh=0FX1yD9KbazoYE7gqLdp24oNl7IX9ycyVgJEA5lcNNM=;
	b=LhYTQT2GSmNd9rrgOBduq8SwxXKo5vYJqnanrbiw5HgJvjhk9KZ/9C+CNG/RZjy2OH
	idhkmXk2yBA+edPsb1SDEbQq+5hrC2amlwyjnuLQrZQELyeTNoEJjGjsICreWx0UyJ6G
	/QqQ4QobPl/jl1K+TtRr2UyKs256qzCXN0cG4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:cc:message-id:from:to:in-reply-to:content-type
	:content-transfer-encoding:mime-version:subject:date:references
	:x-mailer;
	b=aPpbgTTGirLi4rv33YuaTPFr1zY/2nEVOL7yyhnhwahEdUwAaCUI5JiSqbkMK3pFb9
	UZiYLndhvRKtwPUcmctUMb69MxIT936PS5BrkoZ5iXBI/5exgdnS5Ro29+zBVDJoMWvh
	DtUGYSM0hgCOWKKkG4bSF5NOFtqyP2Tbe5jYI=
Received: by 10.102.17.3 with SMTP id 3mr2836522muq.35.1268401969332;
	Fri, 12 Mar 2010 05:52:49 -0800 (PST)
Received: from [192.168.10.20] (s224.GtokyoFL6.vectant.ne.jp [222.228.90.224])
	by mx.google.com with ESMTPS id i7sm5001452mue.4.2010.03.12.05.52.46
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 12 Mar 2010 05:52:47 -0800 (PST)
Sender: Rui Paulo 
Message-Id: <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
From: Rui Paulo 
To: Carlos A. M. dos Santos 
In-Reply-To: 
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Fri, 12 Mar 2010 22:52:27 +0900
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf
	sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 13:52:51 -0000


On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote:

> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
>  wrote:
>> Author: nwhitehorn
>> Date: Thu Mar 11 14:49:06 2010
>> New Revision: 205014
>> URL: http://svn.freebsd.org/changeset/base/205014
>>
>> Log:
>>  Provide groundwork for 32-bit binary compatibility on non-x86  
>> platforms,
>>  for upcoming 64-bit PowerPC and MIPS support. This renames the  
>> COMPAT_IA32
>>  option to COMPAT_FREEBSD32, removes some IA32-specific code from  
>> MI parts
>>  of the kernel and enhances the freebsd32 compatibility code to  
>> support
>>  big-endian platforms.
>
> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
> interpreted as "compatible with FreeBSD 3.2". Something like
> "COMPAT_32BIT" would be more meaningful.

There's a lengthy discussion about this on another mailing list.

This is unlikely to be changed and emailing the committer who provided  
valuable time on this code wastes his time and everyone else's.

--
Rui Paulo


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 14:01:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F78B1065674;
	Fri, 12 Mar 2010 14:01:23 +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 450998FC20;
	Fri, 12 Mar 2010 14:01:23 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 473F01FFC22;
	Fri, 12 Mar 2010 14:01:22 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 1FFC38449F; Fri, 12 Mar 2010 15:01:22 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Rui Paulo 
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
Date: Fri, 12 Mar 2010 15:01:22 +0100
In-Reply-To: <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org> (Rui Paulo's
	message of "Fri, 12 Mar 2010 22:52:27 +0900")
Message-ID: <861vfpfxl9.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf
	sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 14:01:23 -0000

Rui Paulo  writes:
> Carlos A. M. dos Santos  writes:
> > COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
> > interpreted as "compatible with FreeBSD 3.2". Something like
> > "COMPAT_32BIT" would be more meaningful.
> This is unlikely to be changed and emailing the committer who provided
> valuable time on this code wastes his time and everyone else's.

The committer who provided valuable time on this code was warned that
COMPAT_FREEBSD32 was probably the worst imaginable option and that it
would set off a bikeshed.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 14:19:08 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 580F7106566B;
	Fri, 12 Mar 2010 14:19:08 +0000 (UTC)
	(envelope-from nwhitehorn@freebsd.org)
Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212])
	by mx1.freebsd.org (Postfix) with ESMTP id 222D38FC20;
	Fri, 12 Mar 2010 14:19:07 +0000 (UTC)
MIME-version: 1.0
Content-transfer-encoding: 8BIT
Content-type: text/plain; charset=UTF-8; format=flowed
Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by
	smtpauth3.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009)) id <0KZ600400AFVCA00@smtpauth3.wiscmail.wisc.edu>; Fri,
	12 Mar 2010 08:19:07 -0600 (CST)
Received: from comporellon.tachypleus.net
	(adsl-76-233-145-10.dsl.mdsnwi.sbcglobal.net [76.233.145.10])
	by smtpauth3.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009))
	with ESMTPSA id <0KZ600JTCAFOS960@smtpauth3.wiscmail.wisc.edu>; Fri,
	12 Mar 2010 08:19:02 -0600 (CST)
Date: Fri, 12 Mar 2010 08:19:00 -0600
From: Nathan Whitehorn 
In-reply-to: <861vfpfxl9.fsf@ds4.des.no>
To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= 
Message-id: <4B9A4D54.2080508@freebsd.org>
X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.233.145.10
X-Spam-PmxInfo: Server=avs-10, Version=5.5.5.374460,
	Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.3.12.140626,
	SenderIP=76.233.145.10
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	<861vfpfxl9.fsf@ds4.des.no>
User-Agent: Thunderbird 2.0.0.23 (X11/20100206)
Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Rui Paulo 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
 sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32
 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 14:19:08 -0000

Dag-Erling Smørgrav wrote:
> Rui Paulo  writes:
>   
>> Carlos A. M. dos Santos  writes:
>>     
>>> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
>>> interpreted as "compatible with FreeBSD 3.2". Something like
>>> "COMPAT_32BIT" would be more meaningful.
>>>       
>> This is unlikely to be changed and emailing the committer who provided
>> valuable time on this code wastes his time and everyone else's.
>>     
>
> The committer who provided valuable time on this code was warned that
> COMPAT_FREEBSD32 was probably the worst imaginable option and that it
> would set off a bikeshed.
>
> DES
>   
This name was picked for the following reasons, after discussion with 
several others: it is analogous to the existing COMPAT_LINUX32, the 
directory containing the relevant support code lives in 
/sys/compat/freebsd32, it is almost entirely specific to running 32-bit 
FreeBSD binaries, and it is a descriptive name. I also think it 
extremely unlikely that given the choice of interepretations "FreeBSD 
3.2", "32-bit FreeBSD", "FreeBSD version 32" (which, at our current 
rate, will be released in 2058, probably before Linux 3.2), anyone will 
fail to pick the correct meaning, especially given that it is documented 
and accompanied by a comment.
-Nathan


From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 14:33:55 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F30E61065670;
	Fri, 12 Mar 2010 14:33:54 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de
	[217.11.53.44])
	by mx1.freebsd.org (Postfix) with ESMTP id 83D158FC16;
	Fri, 12 Mar 2010 14:33:54 +0000 (UTC)
Received: from outgoing.leidinger.net (pD9E2D538.dip.t-dialin.net
	[217.226.213.56])
	by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id CD1A18453C9;
	Fri, 12 Mar 2010 15:33:48 +0100 (CET)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id E538654F8;
	Fri, 12 Mar 2010 15:33:45 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1268404426;
	bh=QLB1Pkk0mqcplmMLNiahdnq8vmZ8gZunXDkLZ3yfTjE=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=B56BI+JfC3yqBo3eBi3d4u9W9FwJzXnNOItxg7i7Hn3zbr4rD8arDNEM2sDL+a8lG
	iN6QXUANuRgYBiIHTl3GRE4SXH7I260jy4c95I7vs1+CIpW+w14CV15VGQCq0OUmKh
	Mmk85iN7mKLr4RqkwDIorzIi8vackKcd4tuna098iHMUSFvGCn/VR5dT0Cb8P/4l5z
	G1YWTF2jv3cpp32fynieBtztaEiGtnK9ww6NnIAiL4qqB6PaV1Qim3Y3J0JtY7dffJ
	SDP21PJbmVpLUwLl6vz9eLbB2S0w0jfRyEkVqCzzQsVBCURNLIdvYtpfVt4wBZdzhz
	64zNWsV6W/fhQ==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o2CEXj6E079619;
	Fri, 12 Mar 2010 15:33:45 +0100 (CET)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Fri, 12 Mar 2010
	15:33:45 +0100
Message-ID: <20100312153345.21115ph4yoc1ip8o@webmail.leidinger.net>
Date: Fri, 12 Mar 2010 15:33:45 +0100
From: Alexander Leidinger 
To: Rui Paulo 
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
In-Reply-To: <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4)
X-EBL-MailScanner-Information: Please contact the ISP for more information
X-EBL-MailScanner-ID: CD1A18453C9.8D359
X-EBL-MailScanner: Found to be clean
X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN,
	SpamAssassin (not cached, score=-1.363, required 6,
	autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00,
	DKIM_VERIFIED -0.00, TW_SV 0.08)
X-EBL-MailScanner-From: alexander@leidinger.net
X-EBL-MailScanner-Watermark: 1269009229.35378@Vd8pwRG8Zf3bMEL/5HaTVg
X-EBL-Spam-Status: No
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 14:33:55 -0000

Quoting Rui Paulo  (from Fri, 12 Mar 2010 22:52:27 +0900):

>
> On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote:
>
>> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
>>  wrote:
>>> Author: nwhitehorn
>>> Date: Thu Mar 11 14:49:06 2010
>>> New Revision: 205014
>>> URL: http://svn.freebsd.org/changeset/base/205014
>>>
>>> Log:
>>> Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
>>> for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
>>> option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
>>> of the kernel and enhances the freebsd32 compatibility code to support
>>> big-endian platforms.
>>
>> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
>> interpreted as "compatible with FreeBSD 3.2". Something like
>> "COMPAT_32BIT" would be more meaningful.
>
> There's a lengthy discussion about this on another mailing list.
>
> This is unlikely to be changed and emailing the committer who  
> provided valuable time on this code wastes his time and everyone  
> else's.

As someone "outside of the box" (I do not care which name is used), I  
have to say that the current influx of mails regarding this is some  
kind of indication that there are POLA implications ahead or if you  
want to have a buzzword, it looks to me like people think the  
usability of the COMPAT_FREEBSD* stuff was lowered by this,  
respectively the userfriendlyness degraded, or with again some  
different words, the COMPAT_FREEBSD* options are not intuitive to use  
anymore. When I look at our man-pages or the handbook, it looks like  
one of the goals is to make a feature easy (relative to the complexity  
of the topic) to use.

I do not care much about what you (plural) do about this, but to me it  
looks like the fastest way to not waste more time with this is to  
change the name to something less ambiguous compared to what the other  
COMPAT_FREEBSD* options do.

Bye,
Alexander.

-- 
My weight is perfect for my height -- which varies.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 14:51:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A8CFB106564A;
	Fri, 12 Mar 2010 14:51:42 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 976308FC1A;
	Fri, 12 Mar 2010 14:51: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 o2CEpgcf030009;
	Fri, 12 Mar 2010 14:51:42 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CEpgws030007;
	Fri, 12 Mar 2010 14:51:42 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201003121451.o2CEpgws030007@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 12 Mar 2010 14:51: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: r205082 - head/sys/netgraph
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 14:51:42 -0000

Author: glebius
Date: Fri Mar 12 14:51:42 2010
New Revision: 205082
URL: http://svn.freebsd.org/changeset/base/205082

Log:
  Fix 'netstat -f netgraph', which I had broken in r163463 ling time
  ago in 2006. This linked list is actually needed for userland.
  
  PR:		kern/140446
  Submitted by:	Adrian Steinmann 

Modified:
  head/sys/netgraph/ng_socket.c

Modified: head/sys/netgraph/ng_socket.c
==============================================================================
--- head/sys/netgraph/ng_socket.c	Fri Mar 12 13:53:52 2010	(r205081)
+++ head/sys/netgraph/ng_socket.c	Fri Mar 12 14:51:42 2010	(r205082)
@@ -156,6 +156,11 @@ static u_long ngpdg_recvspace = 20 * 102
 SYSCTL_INT(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW,
     &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams");
 
+/* List of all sockets (for netstat -f netgraph) */
+static LIST_HEAD(, ngpcb) ngsocklist;
+
+static struct mtx	ngsocketlist_mtx;
+
 #define sotongpcb(so) ((struct ngpcb *)(so)->so_pcb)
 
 /* If getting unexplained errors returned, set this to "kdb_enter("X"); */
@@ -584,6 +589,10 @@ ng_attach_common(struct socket *so, int 
 	so->so_pcb = (caddr_t)pcbp;
 	pcbp->ng_socket = so;
 
+	/* Add the socket to linked list */
+	mtx_lock(&ngsocketlist_mtx);
+	LIST_INSERT_HEAD(&ngsocklist, pcbp, socks);
+	mtx_unlock(&ngsocketlist_mtx);
 	return (0);
 }
 
@@ -617,6 +626,9 @@ ng_detach_common(struct ngpcb *pcbp, int
 	}
 
 	pcbp->ng_socket->so_pcb = NULL;
+	mtx_lock(&ngsocketlist_mtx);
+	LIST_REMOVE(pcbp, socks);
+	mtx_unlock(&ngsocketlist_mtx);
 	free(pcbp, M_PCB);
 }
 
@@ -1115,8 +1127,14 @@ ngs_mod_event(module_t mod, int event, v
 
 	switch (event) {
 	case MOD_LOAD:
+		mtx_init(&ngsocketlist_mtx, "ng_socketlist", NULL, MTX_DEF);
 		break;
 	case MOD_UNLOAD:
+		/* Ensure there are no open netgraph sockets. */
+		if (!LIST_EMPTY(&ngsocklist)) {
+			error = EBUSY;
+			break;
+		}
 #ifdef NOTYET
 		/* Unregister protocol domain XXX can't do this yet.. */
 #endif

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 15:05:00 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 595E4106566C;
	Fri, 12 Mar 2010 15:05:00 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D0758FC16;
	Fri, 12 Mar 2010 15:05: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 o2CF50i4033057;
	Fri, 12 Mar 2010 15:05:00 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CF50MB033023;
	Fri, 12 Mar 2010 15:05:00 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201003121505.o2CF50MB033023@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 12 Mar 2010 15:05: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: r205083 - in head: sys/netgraph usr.bin/netstat
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 15:05:00 -0000

Author: glebius
Date: Fri Mar 12 15:04:59 2010
New Revision: 205083
URL: http://svn.freebsd.org/changeset/base/205083

Log:
  Now fix functionality of 'netstat -f netgraph' that hasn't worked
  starting from netgraph import in 1999.
  
  netstat(8) used pointer to node as node address, oops. That didn't
  work, we need the node ID in brackets to successfully address a node.
  We can't look into ng_node, due to inability to include netgraph/netgraph.h
  in userland code. So let the node make a hint for a userland, storing
  the node ID in its private data.
  
  MFC after:	2 weeks

Modified:
  head/sys/netgraph/ng_socket.c
  head/sys/netgraph/ng_socketvar.h
  head/usr.bin/netstat/netgraph.c

Modified: head/sys/netgraph/ng_socket.c
==============================================================================
--- head/sys/netgraph/ng_socket.c	Fri Mar 12 14:51:42 2010	(r205082)
+++ head/sys/netgraph/ng_socket.c	Fri Mar 12 15:04:59 2010	(r205083)
@@ -552,6 +552,9 @@ ng_attach_cntl(struct socket *so)
 		return (error);
 	}
 
+	/* Store a hint for netstat(1). */
+	priv->node_id = priv->node->nd_ID;
+
 	/* Link the node and the private data. */
 	NG_NODE_SET_PRIVATE(priv->node, priv);
 	NG_NODE_REF(priv->node);

Modified: head/sys/netgraph/ng_socketvar.h
==============================================================================
--- head/sys/netgraph/ng_socketvar.h	Fri Mar 12 14:51:42 2010	(r205082)
+++ head/sys/netgraph/ng_socketvar.h	Fri Mar 12 15:04:59 2010	(r205083)
@@ -61,6 +61,7 @@ struct ngsock {
 	int    refs;
 	struct mtx	mtx;		/* mtx to wait on */
 	int		error;		/* place to store error */
+	ng_ID_t		node_id;	/* a hint for netstat(1) to find the node */
 };
 #define	NGS_FLAG_NOLINGER	1	/* close with last hook */
 

Modified: head/usr.bin/netstat/netgraph.c
==============================================================================
--- head/usr.bin/netstat/netgraph.c	Fri Mar 12 14:51:42 2010	(r205082)
+++ head/usr.bin/netstat/netgraph.c	Fri Mar 12 15:04:59 2010	(r205083)
@@ -166,14 +166,14 @@ netgraphprotopr(u_long off, const char *
 		    name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc);
 
 		/* Get ngsock structure */
-		if (ngpcb.sockdata == 0)	/* unconnected data socket */
+		if (ngpcb.sockdata == NULL)	/* unconnected data socket */
 			goto finish;
 		kread((u_long)ngpcb.sockdata, (char *)&info, sizeof(info));
 
 		/* Get info on associated node */
-		if (info.node == 0 || csock == -1)
+		if (info.node_id == 0 || csock == -1)
 			goto finish;
-		snprintf(path, sizeof(path), "[%lx]:", (u_long) info.node);
+		snprintf(path, sizeof(path), "[%x]:", info.node_id);
 		if (NgSendMsg(csock, path,
 		    NGM_GENERIC_COOKIE, NGM_NODEINFO, NULL, 0) < 0)
 			goto finish;

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 15:47:33 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 229D61065670;
	Fri, 12 Mar 2010 15:47:33 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de
	[217.11.53.44])
	by mx1.freebsd.org (Postfix) with ESMTP id B20128FC13;
	Fri, 12 Mar 2010 15:47:32 +0000 (UTC)
Received: from outgoing.leidinger.net (pD9E2D538.dip.t-dialin.net
	[217.226.213.56])
	by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id CE2EB8453CA;
	Fri, 12 Mar 2010 16:47:26 +0100 (CET)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id 332E55500;
	Fri, 12 Mar 2010 16:47:23 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1268408843;
	bh=t6QWQamSIA/Qjo+8pNjDUAarJnnhUc9nCxZ800BEaqc=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=K7YXQ6jnSVW0oqaX3VgN0nuXcs8ZoTMVRqfyVw2i1G3aU6GLLpfkyQa3g1TwtXm8W
	mWJa2dOXfzVLobfbc54hZQDtF2HvWPCcXNCquQGDtzziJ/ZZNLHL6yYE+YaDRY0Z4p
	iGRYQMVZ53e5TkphpSdlKfsWLLRGGh1u80x+kvsUg504gQiJFxC3QJUv3Q9zzX7kXP
	R/FgwIwbPrIYRXwJQKU/2tyugSIEw7CBHiba6T7UJVDnNXyuifWKMNPGMDeQwxFYBF
	2KPtyrmJlNn/im67pVmJhDxD5cxhDCC1Cuaf1GAypx2pP45LUr9wP3Kr58n8UMhKJU
	3Jqj6EgZ/n7Qw==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o2CFlMp9012454;
	Fri, 12 Mar 2010 16:47:22 +0100 (CET)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Fri, 12 Mar 2010
	16:47:21 +0100
Message-ID: <20100312164721.11643qp5y0o0kgsg@webmail.leidinger.net>
Date: Fri, 12 Mar 2010 16:47:21 +0100
From: Alexander Leidinger 
To: Nathan Whitehorn 
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	<861vfpfxl9.fsf@ds4.des.no> <4B9A4D54.2080508@freebsd.org>
In-Reply-To: <4B9A4D54.2080508@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4)
X-EBL-MailScanner-Information: Please contact the ISP for more information
X-EBL-MailScanner-ID: CE2EB8453CA.0EF9E
X-EBL-MailScanner: Found to be clean
X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN,
	SpamAssassin (not cached, score=-1.363, required 6,
	autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00,
	DKIM_VERIFIED -0.00, TW_SV 0.08)
X-EBL-MailScanner-From: alexander@leidinger.net
X-EBL-MailScanner-Watermark: 1269013647.77816@v48QxTLFebm7VkgOHcpy5w
X-EBL-Spam-Status: No
Cc: "Carlos A. M. dos Santos" , src-committers@freebsd.org,
	Rui Paulo , svn-src-all@freebsd.org,
	svn-src-head@freebsd.org,
	Dag-Erling =?utf-8?b?U23Dg8K4cmdyYXY=?= 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 15:47:33 -0000

Quoting Nathan Whitehorn  (from Fri, 12 Mar  
2010 08:19:00 -0600):

> This name was picked for the following reasons, after discussion  
> with several others: it is analogous to the existing COMPAT_LINUX32,  
> the

Datapoint:
  COMPAT_LINUX is native (64bit on 64bit arch, 32bit on 32bit arch) emulation
  COMPAT_LINUX32 is 32bit on 64bit arch emulation (useless on 32bit arch)
  There is no COMAPT_LINUXxyz with xyz being a specific linux version,
  the linux version to emulate is chosen by a sysctl (run time
  switch possible if no linux program is running).

As such the COMPAT_LINUXyy is conceptionally different from what we  
have with COMPAT_FREEBSDy (compatibility stuff for FreeBSD version y).

I think this is the base of the complains we see here.

Bye,
Alexander.

-- 
Etiquette is for those with no breeding;
fashion for those with no taste.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 15:55:22 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CEB81065670;
	Fri, 12 Mar 2010 15:55:22 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D2C08FC12;
	Fri, 12 Mar 2010 15:55:21 +0000 (UTC)
Received: from cell.glebius.int.ru (localhost [127.0.0.1])
	by cell.glebius.int.ru (8.14.3/8.14.3) with ESMTP id o2CFJW4R085893;
	Fri, 12 Mar 2010 18:19:32 +0300 (MSK)
	(envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
	by cell.glebius.int.ru (8.14.3/8.14.3/Submit) id o2CFJVe1085892;
	Fri, 12 Mar 2010 18:19:31 +0300 (MSK)
	(envelope-from glebius@FreeBSD.org)
X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to
	glebius@FreeBSD.org using -f
Date: Fri, 12 Mar 2010 18:19:31 +0300
From: Gleb Smirnoff 
To: Julian Elischer 
Message-ID: <20100312151931.GS37184@FreeBSD.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
	<4B99EA09.80108@elischer.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <4B99EA09.80108@elischer.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: src-committers@FreeBSD.org, Juli Mallett ,
	svn-src-all@FreeBSD.org, Qing Li ,
	Robert Watson , svn-src-head@FreeBSD.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 15:55:22 -0000

On Thu, Mar 11, 2010 at 11:15:21PM -0800, Julian Elischer wrote:
J> Juli Mallett wrote:
J> > On Thu, Mar 11, 2010 at 15:39, Qing Li  wrote:
J> >> I guess it's a good time to clean things up. The if_link_state code has been
J> >> around for quite some time, either it be fully utilized or not be there at all.
J> >> The inconsistency is the root cause.
J> > 
J> > Sure.  There is an increasing amount of stuff that network drivers are
J> > expected to do, but they work without doing them.  It's easy to think
J> > you have a functioning network driver and that you can get by without
J> > adding support for media changes and link status reporting, etc.
J> > 
J> >> I will try going through these tonight and hopefully the fix all take a
J> >> common approach.
J> 
J> probably should add a flag that means "we have media state"
J> and if it is not set, assume it is always on.

We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to
this value in ether_ifattach(). And Qing should treat this value as
LINK_STATE_UP in routing decision until better times.

-- 
Totus tuus, Glebius.

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 17:28:12 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 381EE106564A;
	Fri, 12 Mar 2010 17:28:12 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id ECB538FC1C;
	Fri, 12 Mar 2010 17:28:11 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id o2CHSBvV032099;
	Fri, 12 Mar 2010 09:28:11 -0800 (PST)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id o2CHSBCL032098;
	Fri, 12 Mar 2010 09:28:11 -0800 (PST) (envelope-from obrien)
Date: Fri, 12 Mar 2010 09:28:11 -0800
From: "David O'Brien" 
To: Rui Paulo 
Message-ID: <20100312172811.GA31991@dragon.NUXI.org>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: "Carlos A. M. dos Santos" , svn-src-head@FreeBSD.org,
	svn-src-all@FreeBSD.org, src-committers@FreeBSD.org,
	Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
	sys/amd64/conf sys/amd64/include sys/amd64/linux32
	sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs
	sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 17:28:12 -0000

On Fri, Mar 12, 2010 at 10:52:27PM +0900, Rui Paulo wrote:
> On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote:
>> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
>>  wrote:
>>> Author: nwhitehorn
>>> Date: Thu Mar 11 14:49:06 2010
>>> New Revision: 205014
>>> URL: http://svn.freebsd.org/changeset/base/205014
>>> 
>>> Log:
>>>  Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
>>>  for upcoming 64-bit PowerPC and MIPS support. This renames the 
>>> COMPAT_IA32
>>>  option to COMPAT_FREEBSD32, removes some IA32-specific code from MI 
>>> parts
>>>  of the kernel and enhances the freebsd32 compatibility code to support
>>>  big-endian platforms.
>> 
>> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
>> interpreted as "compatible with FreeBSD 3.2". Something like
>> "COMPAT_32BIT" would be more meaningful.
> 
> There's a lengthy discussion about this on another mailing list.
> 
> This is unlikely to be changed and emailing the committer who provided 
> valuable time on this code wastes his time and everyone else's.

  $ cd /usr/src/sys
  $ wcfind . -type f | xargs sed -i '' -e 's/COMPAT_FREEBSD32/COMPAT_32BIT/g'

really doesn't take much developer time.

I can whip up the patch for review.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 17:30:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9F78F106564A;
	Fri, 12 Mar 2010 17:30:45 +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 583858FC1C;
	Fri, 12 Mar 2010 17:30:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2CHLerq069594;
	Fri, 12 Mar 2010 10:21:40 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Fri, 12 Mar 2010 10:21:47 -0700 (MST)
Message-Id: <20100312.102147.1139860627944844739.imp@bsdimp.com>
To: jmallett@freebsd.org
From: "M. Warner Losh" 
In-Reply-To: 
References: 
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, qingli@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, rwatson@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 17:30:45 -0000

In message: 
            Juli Mallett  writes:
: On Thu, Mar 11, 2010 at 15:30, Qing Li  wrote:
: >>
: >> A couple of questions:
: >>
: >> (1) It used to be the case that quite a few interface drivers and =
types
: >> didn't have a notion of "link up" -- especially older ethernet dev=
ices. =A0Do
: >> those all have the same problem? =A0It was probably a design overs=
ight that
: >>=A0devices don't declare an explicit capability for "can report lin=
k state".
: >>
: >
: > =A0What you raised is definitely a possibility and these fixes take=
 the
: > =A0similar approach. I am going to try and go through each of these=

: > =A0drivers in /sys/dev/ and converting them, very soon.
: =

: Go through drivers in the embedded port directories, too.  The Octeon=

: port's Ethernet driver was broken by this, and it looks like the
: Atheros if_arge is probably broken, too.  I would even suggest going
: back to the old behavior briefly while the port maintainers are given=

: an opportunity to update their drivers.  Actually, it looks like only=

: MIPS has Ethernet drivers outside of dev/ at a quick glance, but I'd
: be surprised if there weren't other broken examples.

arm has them as well.  sys/arm/at91/if_ate.c.  Powerpc does as well.

Warner

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 17:55:29 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A6B1E1065674;
	Fri, 12 Mar 2010 17:55:29 +0000 (UTC)
	(envelope-from fanf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 955188FC13;
	Fri, 12 Mar 2010 17:55: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 o2CHtTC8070931;
	Fri, 12 Mar 2010 17:55:29 GMT (envelope-from fanf@svn.freebsd.org)
Received: (from fanf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CHtTlj070927;
	Fri, 12 Mar 2010 17:55:29 GMT (envelope-from fanf@svn.freebsd.org)
Message-Id: <201003121755.o2CHtTlj070927@svn.freebsd.org>
From: Tony Finch 
Date: Fri, 12 Mar 2010 17:55: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: r205089 - head/usr.bin/unifdef
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 17:55:29 -0000

Author: fanf
Date: Fri Mar 12 17:55:29 2010
New Revision: 205089
URL: http://svn.freebsd.org/changeset/base/205089

Log:
  Update to upstream version 2.3
  
  Add -V (display version) and -S (list controlling symbols per #if
  with nesting information) options, and improve unifdefall debug output.
  Done committing 0 revisions to SVN
  
  Obtained from: http://dotat.at/prog/unifdef

Modified:
  head/usr.bin/unifdef/unifdef.1
  head/usr.bin/unifdef/unifdef.c
  head/usr.bin/unifdef/unifdefall.sh

Modified: head/usr.bin/unifdef/unifdef.1
==============================================================================
--- head/usr.bin/unifdef/unifdef.1	Fri Mar 12 17:23:26 2010	(r205088)
+++ head/usr.bin/unifdef/unifdef.1	Fri Mar 12 17:55:29 2010	(r205089)
@@ -29,11 +29,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"     @(#)unifdef.1	8.2 (Berkeley) 4/1/94
-.\"	$dotat: unifdef/unifdef.1,v 1.63 2010/02/19 16:41:15 fanf2 Exp $
 .\" $FreeBSD$
 .\"
-.Dd January 19, 2010
+.Dd March 11, 2010
 .Dt UNIFDEF 1
 .Os
 .Sh NAME
@@ -41,7 +39,7 @@
 .Nd remove preprocessor conditionals from code
 .Sh SYNOPSIS
 .Nm
-.Op Fl BbcdeKknst
+.Op Fl bBcdeKknsStV
 .Op Fl I Ns Ar path
 .Op Fl D Ns Ar sym Ns Op = Ns Ar val
 .Op Fl U Ns Ar sym
@@ -184,12 +182,6 @@ Specify that a symbol is undefined.
 If the same symbol appears in more than one argument,
 the last occurrence dominates.
 .Pp
-.It Fl B
-Compress blank lines around a deleted section.
-Mutually exclusive with the
-.Fl b
-option.
-.Pp
 .It Fl b
 Replace removed lines with blank lines
 instead of deleting them.
@@ -197,6 +189,12 @@ Mutually exclusive with the
 .Fl B
 option.
 .Pp
+.It Fl B
+Compress blank lines around a deleted section.
+Mutually exclusive with the
+.Fl b
+option.
+.Pp
 .It Fl c
 If the
 .Fl c
@@ -285,6 +283,13 @@ for creating
 .Nm
 command lines.
 .Pp
+.It Fl S
+Like the
+.Fl s
+option, but the nesting depth of each symbol is also printed.
+This is useful for working out the number of possible combinations
+of interdependent defined/undefined symbols.
+.Pp
 .It Fl t
 Disables parsing for C comments
 and line continuations,
@@ -329,6 +334,9 @@ for compatibility with
 .Xr cpp 1
 and to simplify the implementation of
 .Nm unifdefall .
+.Pp
+.It Fl V
+Print version details.
 .El
 .Pp
 The

Modified: head/usr.bin/unifdef/unifdef.c
==============================================================================
--- head/usr.bin/unifdef/unifdef.c	Fri Mar 12 17:23:26 2010	(r205088)
+++ head/usr.bin/unifdef/unifdef.c	Fri Mar 12 17:55:29 2010	(r205089)
@@ -56,12 +56,12 @@
 #include 
 #include 
 
-#ifdef __IDSTRING
-__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.198 2010/02/19 16:37:05 fanf2 Exp $");
-#endif
-#ifdef __FBSDID
-__FBSDID("$FreeBSD$");
-#endif
+const char copyright[] =
+    "@(#) $Version: unifdef-2.3 $\n"
+    "@(#) $FreeBSD$\n"
+    "@(#) $Author: Tony Finch (dot@dotat.at) $\n"
+    "@(#) $URL: http://dotat.at/prog/unifdef $\n"
+;
 
 /* types of input lines: */
 typedef enum {
@@ -172,6 +172,7 @@ static bool             strictlogic;		/*
 static bool             killconsts;		/* -k: eval constant #ifs */
 static bool             lnnum;			/* -n: add #line directives */
 static bool             symlist;		/* -s: output symbol list */
+static bool             symdepth;		/* -S: output symbol depth */
 static bool             text;			/* -t: this is a text file */
 
 static const char      *symname[MAXSYMS];	/* symbol name */
@@ -204,6 +205,8 @@ static int              delcount;		/* co
 static unsigned         blankcount;		/* count of blank lines */
 static unsigned         blankmax;		/* maximum recent blankcount */
 static bool             constexpr;		/* constant #if expression */
+static bool             zerosyms = true;	/* to format symdepth output */
+static bool             firstsym;		/* ditto */
 
 static int              exitstat;		/* program exit status */
 
@@ -228,6 +231,7 @@ static void             state(Ifstate);
 static int              strlcmp(const char *, const char *, size_t);
 static void             unnest(void);
 static void             usage(void);
+static void             version(void);
 
 #define endsym(c) (!isalnum((unsigned char)c) && c != '_')
 
@@ -239,7 +243,7 @@ main(int argc, char *argv[])
 {
 	int opt;
 
-	while ((opt = getopt(argc, argv, "i:D:U:I:o:BbcdeKklnst")) != -1)
+	while ((opt = getopt(argc, argv, "i:D:U:I:o:bBcdeKklnsStV")) != -1)
 		switch (opt) {
 		case 'i': /* treat stuff controlled by these symbols as text */
 			/*
@@ -261,16 +265,15 @@ main(int argc, char *argv[])
 		case 'U': /* undef a symbol */
 			addsym(false, false, optarg);
 			break;
-		case 'I':
-			/* no-op for compatibility with cpp */
-			break;
-		case 'B': /* compress blank lines around removed section */
-			compblank = true;
+		case 'I': /* no-op for compatibility with cpp */
 			break;
 		case 'b': /* blank deleted lines instead of omitting them */
 		case 'l': /* backwards compatibility */
 			lnblank = true;
 			break;
+		case 'B': /* compress blank lines around removed section */
+			compblank = true;
+			break;
 		case 'c': /* treat -D as -U and vice versa */
 			complement = true;
 			break;
@@ -295,9 +298,14 @@ main(int argc, char *argv[])
 		case 's': /* only output list of symbols that control #ifs */
 			symlist = true;
 			break;
+		case 'S': /* list symbols with their nesting depth */
+			symlist = symdepth = true;
+			break;
 		case 't': /* don't parse C comments */
 			text = true;
 			break;
+		case 'V': /* print version */
+			version();
 		default:
 			usage();
 		}
@@ -309,7 +317,7 @@ main(int argc, char *argv[])
 		errx(2, "can only do one file");
 	} else if (argc == 1 && strcmp(*argv, "-") != 0) {
 		filename = *argv;
-		input = fopen(filename, "r");
+		input = fopen(filename, "rb");
 		if (input == NULL)
 			err(2, "can't open %s", filename);
 	} else {
@@ -345,12 +353,12 @@ main(int argc, char *argv[])
 				    TEMPLATE);
 			ofd = mkstemp(tempname);
 			if (ofd != -1)
-				output = fdopen(ofd, "w+");
+				output = fdopen(ofd, "wb+");
 			if (output == NULL)
 				err(2, "can't create temporary file");
-			fchmod(ofd, ist.st_mode & ACCESSPERMS);
+			fchmod(ofd, ist.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO));
 		} else {
-			output = fopen(ofilename, "w");
+			output = fopen(ofilename, "wb");
 			if (output == NULL)
 				err(2, "can't open %s", ofilename);
 		}
@@ -360,9 +368,23 @@ main(int argc, char *argv[])
 }
 
 static void
+version(void)
+{
+	const char *c = copyright;
+	for (;;) {
+		while (*++c != '$')
+			if (*c == '\0')
+				exit(0);
+		while (*++c != '$')
+			putc(*c, stderr);
+		putc('\n', stderr);
+	}
+}
+
+static void
 usage(void)
 {
-	fprintf(stderr, "usage: unifdef [-BbcdeKknst] [-Ipath]"
+	fprintf(stderr, "usage: unifdef [-bBcdeKknsStV] [-Ipath]"
 	    " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
 	exit(2);
 }
@@ -557,6 +579,8 @@ flushline(bool keep)
 		delcount += 1;
 		blankcount = 0;
 	}
+	if (debugging)
+		fflush(output);
 }
 
 /*
@@ -565,17 +589,14 @@ flushline(bool keep)
 static void
 process(void)
 {
-	Linetype lineval;
-
 	/* When compressing blank lines, act as if the file
 	   is preceded by a large number of blank lines. */
 	blankmax = blankcount = 1000;
 	for (;;) {
-		linenum++;
-		lineval = parseline();
+		Linetype lineval = parseline();
 		trans_table[ifstate[depth]][lineval]();
-		debug("process %s -> %s depth %d",
-		    linetype_name[lineval],
+		debug("process line %d %s -> %s depth %d",
+		    linenum, linetype_name[lineval],
 		    ifstate_name[ifstate[depth]], depth);
 	}
 }
@@ -586,6 +607,8 @@ process(void)
 static void
 closeout(void)
 {
+	if (symdepth && !zerosyms)
+		printf("\n");
 	if (fclose(output) == EOF) {
 		warn("couldn't write to %s", ofilename);
 		if (overwriting) {
@@ -628,6 +651,7 @@ parseline(void)
 	Linetype retval;
 	Comment_state wascomment;
 
+	linenum++;
 	if (fgets(tline, MAXLINE, input) == NULL)
 		return (LT_EOF);
 	if (newline == NULL) {
@@ -642,6 +666,7 @@ parseline(void)
 	if (linestate == LS_START) {
 		if (*cp == '#') {
 			linestate = LS_HASH;
+			firstsym = true;
 			cp = skipcomment(cp + 1);
 		} else if (*cp != '\0')
 			linestate = LS_DIRTY;
@@ -715,7 +740,7 @@ parseline(void)
 		while (*cp != '\0')
 			cp = skipcomment(cp + 1);
 	}
-	debug("parser %s comment %s line",
+	debug("parser line %d state %s comment %s line", linenum,
 	    comment_name[incomment], linestate_name[linestate]);
 	return (retval);
 }
@@ -1108,7 +1133,13 @@ findsym(const char *str)
 	if (cp == str)
 		return (-1);
 	if (symlist) {
-		printf("%.*s\n", (int)(cp-str), str);
+		if (symdepth && firstsym)
+			printf("%s%3d", zerosyms ? "" : "\n", depth);
+		firstsym = zerosyms = false;
+		printf("%s%.*s%s",
+		    symdepth ? " " : "",
+		    (int)(cp-str), str,
+		    symdepth ? "" : "\n");
 		/* we don't care about the value of the symbol */
 		return (0);
 	}
@@ -1153,6 +1184,8 @@ addsym(bool ignorethis, bool definethis,
 			usage();
 		value[symind] = NULL;
 	}
+	debug("addsym %s=%s", symname[symind],
+	    value[symind] ? value[symind] : "undef");
 }
 
 /*

Modified: head/usr.bin/unifdef/unifdefall.sh
==============================================================================
--- head/usr.bin/unifdef/unifdefall.sh	Fri Mar 12 17:23:26 2010	(r205088)
+++ head/usr.bin/unifdef/unifdefall.sh	Fri Mar 12 17:55:29 2010	(r205089)
@@ -26,7 +26,6 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-#	$dotat: unifdef/unifdefall.sh,v 1.27 2010/01/19 16:09:50 fanf2 Exp $
 # $FreeBSD$
 
 set -e
@@ -36,17 +35,21 @@ if [ ! -e "$unifdef" ]
 then
 	unifdef=unifdef
 fi
-# export to the final shell command
-export unifdef
+
+case "$@" in
+"-d "*)	echo DEBUGGING 1>&2
+	debug=-d
+	shift
+esac
 
 basename=$(basename "$0")
 tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2
-trap 'rm -r "$tmp" || exit 1' EXIT
+trap 'rm -r "$tmp" || exit 2' EXIT
 
 export LC_ALL=C
 
 # list of all controlling macros
-"$unifdef" -s "$@" | sort | uniq >"$tmp/ctrl"
+"$unifdef" $debug -s "$@" | sort | uniq >"$tmp/ctrl"
 # list of all macro definitions
 cpp -dM "$@" | sort | sed 's/^#define //' >"$tmp/hashdefs"
 # list of defined macro names
@@ -58,7 +61,7 @@ comm -12 "$tmp/ctrl" "$tmp/alldef" >"$tm
 # and converts them to unifdef command-line arguments
 sed 's|.*|s/^&\\(([^)]*)\\)\\{0,1\\} /-D&=/p|' <"$tmp/def" >"$tmp/script"
 # create the final unifdef command
-{	echo '"$unifdef" -k \'
+{	echo "$unifdef" $debug -k '\'
 	# convert the controlling undefined macros to -U arguments
 	sed 's/.*/-U& \\/' <"$tmp/undef"
 	# convert the controlling defined macros to quoted -D arguments
@@ -66,5 +69,11 @@ sed 's|.*|s/^&\\(([^)]*)\\)\\{0,1\\} /-D
 		sed "s/'/'\\\\''/g;s/.*/'&' \\\\/"
 	echo '"$@"'
 } >"$tmp/cmd"
+case $debug in
+-d)	for i in ctrl hashdefs alldef undef def script cmd
+	do	echo ==== $i
+		cat "$tmp/$i"
+	done 1>&2
+esac
 # run the command we just created
 sh "$tmp/cmd" "$@"

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 18:18:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48161106566C;
	Fri, 12 Mar 2010 18:18:05 +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 1DC198FC1D;
	Fri, 12 Mar 2010 18:18: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 o2CII5GT076016;
	Fri, 12 Mar 2010 18:18:05 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CII4ri076014;
	Fri, 12 Mar 2010 18:18:04 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003121818.o2CII4ri076014@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 12 Mar 2010 18:18: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: r205090 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 18:18:05 -0000

Author: yongari
Date: Fri Mar 12 18:18:04 2010
New Revision: 205090
URL: http://svn.freebsd.org/changeset/base/205090

Log:
  Reorder interrupt handler a bit such that producer/consumer
  index of status block is read first before acknowledging the
  interrupts. Otherwise bge(4) may get stale status block as
  acknowledging an interrupt may yield another status block update.
  
  Reviewed by:	marius

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Fri Mar 12 17:55:29 2010	(r205089)
+++ head/sys/dev/bge/if_bge.c	Fri Mar 12 18:18:04 2010	(r205090)
@@ -3654,6 +3654,22 @@ bge_intr(void *xsc)
 #endif
 
 	/*
+	 * Do the mandatory PCI flush as well as get the link status.
+	 */
+	statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
+
+	/* Make sure the descriptor ring indexes are coherent. */
+	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
+	    sc->bge_cdata.bge_status_map,
+	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
+	rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx;
+	tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx;
+	sc->bge_ldata.bge_status_block->bge_status = 0;
+	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
+	    sc->bge_cdata.bge_status_map,
+	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+
+	/*
 	 * Ack the interrupt by writing something to BGE_MBX_IRQ0_LO.  Don't
 	 * disable interrupts by writing nonzero like we used to, since with
 	 * our current organization this just gives complications and
@@ -3675,22 +3691,6 @@ bge_intr(void *xsc)
 	 */
 	bge_writembx(sc, BGE_MBX_IRQ0_LO, 0);
 
-	/*
-	 * Do the mandatory PCI flush as well as get the link status.
-	 */
-	statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
-
-	/* Make sure the descriptor ring indexes are coherent. */
-	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
-	    sc->bge_cdata.bge_status_map,
-	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
-	rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx;
-	tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx;
-	sc->bge_ldata.bge_status_block->bge_status = 0;
-	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
-	    sc->bge_cdata.bge_status_map,
-	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-
 	if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 &&
 	    sc->bge_chipid != BGE_CHIPID_BCM5700_B2) ||
 	    statusword || sc->bge_link_evt)

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 18:41:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C4A8106566B;
	Fri, 12 Mar 2010 18:41:41 +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 3B7CA8FC0C;
	Fri, 12 Mar 2010 18:41: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 o2CIffcd081279;
	Fri, 12 Mar 2010 18:41:41 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CIffPA081276;
	Fri, 12 Mar 2010 18:41:41 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201003121841.o2CIffPA081276@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 12 Mar 2010 18:41: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: r205091 - head/sys/dev/msk
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 18:41:41 -0000

Author: yongari
Date: Fri Mar 12 18:41:41 2010
New Revision: 205091
URL: http://svn.freebsd.org/changeset/base/205091

Log:
  Implement Rx checksum offloading for Yukon EC, Yukon Ultra,
  Yukon FE and Yukon Ultra2. These controllers provide very simple
  checksum computation mechanism and it requires additional pseudo
  header checksum computation in upper stack. Even though I couldn't
  see much performance difference with/without Rx checksum offloading
  it may help notebook based controllers.
  
  Actually controller can compute two checksum value by giving
  different starting position of checksum computation on received
  frame. However, for long time, Marvell's checksum offloading engine
  have been known to have several silicon bugs so don't blindly trust
  computed partial checksum value. Instead, compute partial checksum
  twice by giving the same checksum computation position and compare
  the result. If the value is different it's clear indication of
  hardware bug. This configuration lose IP checksum offloading
  capability but I think it's better to take safe route.
  Note, Rx checksum offloading for Yukon XL was still disabled due to
  known silicon bug.

Modified:
  head/sys/dev/msk/if_msk.c
  head/sys/dev/msk/if_mskreg.h

Modified: head/sys/dev/msk/if_msk.c
==============================================================================
--- head/sys/dev/msk/if_msk.c	Fri Mar 12 18:18:04 2010	(r205090)
+++ head/sys/dev/msk/if_msk.c	Fri Mar 12 18:41:41 2010	(r205091)
@@ -266,6 +266,7 @@ static void msk_intr_hwerr(struct msk_so
 #ifndef __NO_STRICT_ALIGNMENT
 static __inline void msk_fixup_rx(struct mbuf *);
 #endif
+static __inline void msk_rxcsum(struct msk_if_softc *, uint32_t, struct mbuf *);
 static void msk_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int);
 static void msk_jumbo_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int);
 static void msk_txeof(struct msk_if_softc *, int);
@@ -290,6 +291,7 @@ static int msk_txrx_dma_alloc(struct msk
 static int msk_rx_dma_jalloc(struct msk_if_softc *);
 static void msk_txrx_dma_free(struct msk_if_softc *);
 static void msk_rx_dma_jfree(struct msk_if_softc *);
+static int msk_rx_fill(struct msk_if_softc *, int);
 static int msk_init_rx_ring(struct msk_if_softc *);
 static int msk_init_jumbo_rx_ring(struct msk_if_softc *);
 static void msk_init_tx_ring(struct msk_if_softc *);
@@ -643,6 +645,54 @@ msk_setvlan(struct msk_if_softc *sc_if, 
 }
 
 static int
+msk_rx_fill(struct msk_if_softc *sc_if, int jumbo)
+{
+	uint16_t idx;
+	int i;
+
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
+	    (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) {
+		/* Wait until controller executes OP_TCPSTART command. */
+		for (i = 10; i > 0; i--) {
+			DELAY(10);
+			idx = CSR_READ_2(sc_if->msk_softc,
+			    Y2_PREF_Q_ADDR(sc_if->msk_rxq,
+			    PREF_UNIT_GET_IDX_REG));
+			if (idx != 0)
+				break;
+		}
+		if (i == 0) {
+			device_printf(sc_if->msk_if_dev,
+			    "prefetch unit stuck?\n");
+			return (ETIMEDOUT);
+		}
+		/*
+		 * Fill consumed LE with free buffer. This can be done
+		 * in Rx handler but we don't want to add special code
+		 * in fast handler.
+		 */
+		if (jumbo > 0) {
+			if (msk_jumbo_newbuf(sc_if, 0) != 0)
+				return (ENOBUFS);
+			bus_dmamap_sync(sc_if->msk_cdata.msk_jumbo_rx_ring_tag,
+			    sc_if->msk_cdata.msk_jumbo_rx_ring_map,
+			    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+		} else {
+			if (msk_newbuf(sc_if, 0) != 0)
+				return (ENOBUFS);
+			bus_dmamap_sync(sc_if->msk_cdata.msk_rx_ring_tag,
+			    sc_if->msk_cdata.msk_rx_ring_map,
+			    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+		}
+		sc_if->msk_cdata.msk_rx_prod = 0;
+		CSR_WRITE_2(sc_if->msk_softc,
+		    Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_PUT_IDX_REG),
+		    sc_if->msk_cdata.msk_rx_prod);
+	}
+	return (0);
+}
+
+static int
 msk_init_rx_ring(struct msk_if_softc *sc_if)
 {
 	struct msk_ring_data *rd;
@@ -658,7 +708,21 @@ msk_init_rx_ring(struct msk_if_softc *sc
 	rd = &sc_if->msk_rdata;
 	bzero(rd->msk_rx_ring, sizeof(struct msk_rx_desc) * MSK_RX_RING_CNT);
 	prod = sc_if->msk_cdata.msk_rx_prod;
-	for (i = 0; i < MSK_RX_RING_CNT; i++) {
+	i = 0;
+	/* Have controller know how to compute Rx checksum. */
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
+	    (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) {
+		rxd = &sc_if->msk_cdata.msk_rxdesc[prod];
+		rxd->rx_m = NULL;
+		rxd->rx_le = &rd->msk_rx_ring[prod];
+		rxd->rx_le->msk_addr = htole32(ETHER_HDR_LEN << 16 |
+		    ETHER_HDR_LEN);
+		rxd->rx_le->msk_control = htole32(OP_TCPSTART | HW_OWNER);
+		MSK_INC(prod, MSK_RX_RING_CNT);
+		MSK_INC(sc_if->msk_cdata.msk_rx_cons, MSK_RX_RING_CNT);
+		i++;
+	}
+	for (; i < MSK_RX_RING_CNT; i++) {
 		rxd = &sc_if->msk_cdata.msk_rxdesc[prod];
 		rxd->rx_m = NULL;
 		rxd->rx_le = &rd->msk_rx_ring[prod];
@@ -676,7 +740,8 @@ msk_init_rx_ring(struct msk_if_softc *sc
 	CSR_WRITE_2(sc_if->msk_softc,
 	    Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_PUT_IDX_REG),
 	    sc_if->msk_cdata.msk_rx_prod);
-
+	if (msk_rx_fill(sc_if, 0) != 0)
+		return (ENOBUFS);
 	return (0);
 }
 
@@ -697,7 +762,21 @@ msk_init_jumbo_rx_ring(struct msk_if_sof
 	bzero(rd->msk_jumbo_rx_ring,
 	    sizeof(struct msk_rx_desc) * MSK_JUMBO_RX_RING_CNT);
 	prod = sc_if->msk_cdata.msk_rx_prod;
-	for (i = 0; i < MSK_JUMBO_RX_RING_CNT; i++) {
+	i = 0;
+	/* Have controller know how to compute Rx checksum. */
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
+	    (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) {
+		rxd = &sc_if->msk_cdata.msk_jumbo_rxdesc[prod];
+		rxd->rx_m = NULL;
+		rxd->rx_le = &rd->msk_jumbo_rx_ring[prod];
+		rxd->rx_le->msk_addr = htole32(ETHER_HDR_LEN << 16 |
+		    ETHER_HDR_LEN);
+		rxd->rx_le->msk_control = htole32(OP_TCPSTART | HW_OWNER);
+		MSK_INC(prod, MSK_JUMBO_RX_RING_CNT);
+		MSK_INC(sc_if->msk_cdata.msk_rx_cons, MSK_JUMBO_RX_RING_CNT);
+		i++;
+	}
+	for (; i < MSK_JUMBO_RX_RING_CNT; i++) {
 		rxd = &sc_if->msk_cdata.msk_jumbo_rxdesc[prod];
 		rxd->rx_m = NULL;
 		rxd->rx_le = &rd->msk_jumbo_rx_ring[prod];
@@ -714,7 +793,8 @@ msk_init_jumbo_rx_ring(struct msk_if_sof
 	CSR_WRITE_2(sc_if->msk_softc,
 	    Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_PUT_IDX_REG),
 	    sc_if->msk_cdata.msk_rx_prod);
-
+	if (msk_rx_fill(sc_if, 1) != 0)
+		return (ENOBUFS);
 	return (0);
 }
 
@@ -923,7 +1003,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm
 	struct msk_if_softc *sc_if;
 	struct ifreq *ifr;
 	struct mii_data	*mii;
-	int error, mask;
+	int error, mask, reinit;
 
 	sc_if = ifp->if_softc;
 	ifr = (struct ifreq *)data;
@@ -982,6 +1062,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	case SIOCSIFCAP:
+		reinit = 0;
 		MSK_IF_LOCK(sc_if);
 		mask = ifr->ifr_reqcap ^ ifp->if_capenable;
 		if ((mask & IFCAP_TXCSUM) != 0 &&
@@ -993,8 +1074,11 @@ msk_ioctl(struct ifnet *ifp, u_long comm
 				ifp->if_hwassist &= ~MSK_CSUM_FEATURES;
 		}
 		if ((mask & IFCAP_RXCSUM) != 0 &&
-		    (IFCAP_RXCSUM & ifp->if_capabilities) != 0)
+		    (IFCAP_RXCSUM & ifp->if_capabilities) != 0) {
 			ifp->if_capenable ^= IFCAP_RXCSUM;
+			if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0)
+				reinit = 1;
+		}
 		if ((mask & IFCAP_VLAN_HWCSUM) != 0 &&
 		    (IFCAP_VLAN_HWCSUM & ifp->if_capabilities) != 0)
 			ifp->if_capenable ^= IFCAP_VLAN_HWCSUM;
@@ -1021,8 +1105,11 @@ msk_ioctl(struct ifnet *ifp, u_long comm
 			ifp->if_hwassist &= ~(MSK_CSUM_FEATURES | CSUM_TSO);
 			ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TXCSUM);
 		}
-
 		VLAN_CAPABILITIES(ifp);
+		if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+			msk_init_locked(sc_if);
+		}
 		MSK_IF_UNLOCK(sc_if);
 		break;
 	default:
@@ -1480,23 +1567,14 @@ msk_attach(device_t dev)
 	if_initname(ifp, device_get_name(dev), device_get_unit(dev));
 	ifp->if_mtu = ETHERMTU;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
-	/*
-	 * IFCAP_RXCSUM capability is intentionally disabled as the hardware
-	 * has serious bug in Rx checksum offload for all Yukon II family
-	 * hardware. It seems there is a workaround to make it work somtimes.
-	 * However, the workaround also have to check OP code sequences to
-	 * verify whether the OP code is correct. Sometimes it should compute
-	 * IP/TCP/UDP checksum in driver in order to verify correctness of
-	 * checksum computed by hardware. If you have to compute checksum
-	 * with software to verify the hardware's checksum why have hardware
-	 * compute the checksum? I think there is no reason to spend time to
-	 * make Rx checksum offload work on Yukon II hardware.
-	 */
 	ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_TSO4;
 	/*
-	 * Enable Rx checksum offloading if controller support new
-	 * descriptor format.
+	 * Enable Rx checksum offloading if controller supports
+	 * new descriptor formant and controller is not Yukon XL.
 	 */
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
+	    sc->msk_hw_id != CHIP_ID_YUKON_XL)
+		ifp->if_capabilities |= IFCAP_RXCSUM;
 	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0 &&
 	    (sc_if->msk_flags & MSK_FLAG_NORX_CSUM) == 0)
 		ifp->if_capabilities |= IFCAP_RXCSUM;
@@ -2906,6 +2984,96 @@ msk_fixup_rx(struct mbuf *m)
 }
 #endif
 
+static __inline void
+msk_rxcsum(struct msk_if_softc *sc_if, uint32_t control, struct mbuf *m)
+{
+	struct ether_header *eh;
+	struct ip *ip;
+	struct udphdr *uh;
+	int32_t hlen, len, pktlen, temp32;
+	uint16_t csum, *opts;
+
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0) {
+		if ((control & (CSS_IPV4 | CSS_IPFRAG)) == CSS_IPV4) {
+			m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
+			if ((control & CSS_IPV4_CSUM_OK) != 0)
+				m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
+			if ((control & (CSS_TCP | CSS_UDP)) != 0 &&
+			    (control & (CSS_TCPUDP_CSUM_OK)) != 0) {
+				m->m_pkthdr.csum_flags |= CSUM_DATA_VALID |
+				    CSUM_PSEUDO_HDR;
+				m->m_pkthdr.csum_data = 0xffff;
+			}
+		}
+		return;
+	}
+	/*
+	 * Marvell Yukon controllers that support OP_RXCHKS has known
+	 * to have various Rx checksum offloading bugs. These
+	 * controllers can be configured to compute simple checksum
+	 * at two different positions. So we can compute IP and TCP/UDP
+	 * checksum at the same time. We intentionally have controller
+	 * compute TCP/UDP checksum twice by specifying the same
+	 * checksum start position and compare the result. If the value
+	 * is different it would indicate the hardware logic was wrong.
+	 */
+	if ((sc_if->msk_csum & 0xFFFF) != (sc_if->msk_csum >> 16)) {
+		if (bootverbose)
+			device_printf(sc_if->msk_if_dev,
+			    "Rx checksum value mismatch!\n");
+		return;
+	}
+	pktlen = m->m_pkthdr.len;
+	if (pktlen < sizeof(struct ether_header) + sizeof(struct ip))
+		return;
+	eh = mtod(m, struct ether_header *);
+	if (eh->ether_type != htons(ETHERTYPE_IP))
+		return;
+	ip = (struct ip *)(eh + 1);
+	if (ip->ip_v != IPVERSION)
+		return;
+
+	hlen = ip->ip_hl << 2;
+	pktlen -= sizeof(struct ether_header);
+	if (hlen < sizeof(struct ip))
+		return;
+	if (ntohs(ip->ip_len) < hlen)
+		return;
+	if (ntohs(ip->ip_len) != pktlen)
+		return;
+	if (ip->ip_off & htons(IP_MF | IP_OFFMASK))
+		return;	/* can't handle fragmented packet. */
+
+	switch (ip->ip_p) {
+	case IPPROTO_TCP:
+		if (pktlen < (hlen + sizeof(struct tcphdr)))
+			return;
+		break;
+	case IPPROTO_UDP:
+		if (pktlen < (hlen + sizeof(struct udphdr)))
+			return;
+		uh = (struct udphdr *)((caddr_t)ip + hlen);
+		if (uh->uh_sum == 0)
+			return; /* no checksum */
+		break;
+	default:
+		return;
+	}
+	csum = ntohs(sc_if->msk_csum & 0xFFFF);
+	/* Checksum fixup for IP options. */
+	len = hlen - sizeof(struct ip);
+	if (len > 0) {
+		opts = (uint16_t *)(ip + 1);
+		for (; len > 0; len -= sizeof(uint16_t), opts++) {
+			temp32 = csum - *opts;
+			temp32 = (temp32 >> 16) + (temp32 & 65535);
+			csum = temp32 & 65535;
+		}
+	}
+	m->m_pkthdr.csum_flags |= CSUM_DATA_VALID;
+	m->m_pkthdr.csum_data = csum;
+}
+
 static void
 msk_rxeof(struct msk_if_softc *sc_if, uint32_t status, uint32_t control,
     int len)
@@ -2960,18 +3128,8 @@ msk_rxeof(struct msk_if_softc *sc_if, ui
 			msk_fixup_rx(m);
 #endif
 		ifp->if_ipackets++;
-		if ((ifp->if_capenable & IFCAP_RXCSUM) != 0 &&
-		    (control & (CSS_IPV4 | CSS_IPFRAG)) == CSS_IPV4) {
-			m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
-			if ((control & CSS_IPV4_CSUM_OK) != 0)
-				m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
-			if ((control & (CSS_TCP | CSS_UDP)) != 0 &&
-			    (control & (CSS_TCPUDP_CSUM_OK)) != 0) {
-				m->m_pkthdr.csum_flags |= CSUM_DATA_VALID |
-				    CSUM_PSEUDO_HDR;
-				m->m_pkthdr.csum_data = 0xffff;
-			}
-		}
+		if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
+			msk_rxcsum(sc_if, control, m);
 		/* Check for VLAN tagged packets. */
 		if ((status & GMR_FS_VLAN) != 0 &&
 		    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) {
@@ -3030,18 +3188,8 @@ msk_jumbo_rxeof(struct msk_if_softc *sc_
 			msk_fixup_rx(m);
 #endif
 		ifp->if_ipackets++;
-		if ((ifp->if_capenable & IFCAP_RXCSUM) != 0 &&
-		    (control & (CSS_IPV4 | CSS_IPFRAG)) == CSS_IPV4) {
-			m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
-			if ((control & CSS_IPV4_CSUM_OK) != 0)
-				m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
-			if ((control & (CSS_TCP | CSS_UDP)) != 0 &&
-			    (control & (CSS_TCPUDP_CSUM_OK)) != 0) {
-				m->m_pkthdr.csum_flags |= CSUM_DATA_VALID |
-				    CSUM_PSEUDO_HDR;
-				m->m_pkthdr.csum_data = 0xffff;
-			}
-		}
+		if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
+			msk_rxcsum(sc_if, control, m);
 		/* Check for VLAN tagged packets. */
 		if ((status & GMR_FS_VLAN) != 0 &&
 		    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) {
@@ -3355,6 +3503,9 @@ msk_handle_events(struct msk_softc *sc)
 			break;
 		case OP_RXCHKSVLAN:
 			sc_if->msk_vtag = ntohs(len);
+			/* FALLTHROUGH */
+		case OP_RXCHKS:
+			sc_if->msk_csum = status;
 			break;
 		case OP_RXSTAT:
 			if (sc_if->msk_framesize >
@@ -3739,8 +3890,13 @@ msk_init_locked(struct msk_if_softc *sc_
 	msk_init_tx_ring(sc_if);
 
 	/* Disable Rx checksum offload and RSS hash. */
-	CSR_WRITE_4(sc, Q_ADDR(sc_if->msk_rxq, Q_CSR),
-	    BMU_DIS_RX_CHKSUM | BMU_DIS_RX_RSS_HASH);
+	reg = BMU_DIS_RX_RSS_HASH;
+	if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
+	    (ifp->if_capenable & IFCAP_RXCSUM) != 0)
+		reg |= BMU_ENA_RX_CHKSUM;
+	else
+		reg |= BMU_DIS_RX_CHKSUM;
+	CSR_WRITE_4(sc, Q_ADDR(sc_if->msk_rxq, Q_CSR), reg);
 	if (sc_if->msk_framesize > (MCLBYTES - MSK_RX_BUF_ALIGN)) {
 		msk_set_prefetch(sc, sc_if->msk_rxq,
 		    sc_if->msk_rdata.msk_jumbo_rx_ring_paddr,

Modified: head/sys/dev/msk/if_mskreg.h
==============================================================================
--- head/sys/dev/msk/if_mskreg.h	Fri Mar 12 18:18:04 2010	(r205090)
+++ head/sys/dev/msk/if_mskreg.h	Fri Mar 12 18:41:41 2010	(r205091)
@@ -2547,6 +2547,7 @@ struct msk_if_softc {
 	struct msk_hw_stats	msk_stats;
 	int			msk_if_flags;
 	uint16_t		msk_vtag;	/* VLAN tag id. */
+	uint32_t		msk_csum;
 };
 
 #define MSK_TIMEOUT	1000

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 18:56:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C105106566B;
	Fri, 12 Mar 2010 18:56:44 +0000 (UTC)
	(envelope-from tomelite82@gmail.com)
Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com
	[209.85.221.194])
	by mx1.freebsd.org (Postfix) with ESMTP id AC6478FC1C;
	Fri, 12 Mar 2010 18:56:43 +0000 (UTC)
Received: by qyk32 with SMTP id 32so1503512qyk.28
	for ; Fri, 12 Mar 2010 10:56:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=5i8U6J5JfFHA2Be0iBwSNTfQ7cuMdo1PMUSfMNQkgWo=;
	b=ClpRlBuy/Pt8/TDw3ByXzD77pOOL+4rOYTzu+gF7XIEU9S8Y+C3M2BdyfrSmfEHkd+
	T1hECyIjzS4zWr/rOpP2o68QZk00haSK7lPK6tx+OvUgaYhWTZ4SvJmaPaklDBhBd/qo
	mX7k1uwxHT33Wub7XuTHJbhsq8vh5sYG46T7A=
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=agi8dq8QwRTUVNhe/ANJKzAvRP/7Sm5Tbgy3JldlTfJscTvvLNxJjYR133oDQHkFSW
	WLeBJEibyw5c7oadD3+Ahzdz+UhE1lzMZL3mUXFoVOIkYKv3nQP+R+m8pJT5VPJQcffI
	Ess7eZspPHru1Wl0Ba+w1YcMKoWDqtiqG26nM=
MIME-Version: 1.0
Sender: tomelite82@gmail.com
Received: by 10.220.127.96 with SMTP id f32mr1496302vcs.32.1268420199145; Fri, 
	12 Mar 2010 10:56:39 -0800 (PST)
In-Reply-To: <20100312151931.GS37184@FreeBSD.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
	<4B99EA09.80108@elischer.org> <20100312151931.GS37184@FreeBSD.org>
Date: Fri, 12 Mar 2010 10:56:39 -0800
X-Google-Sender-Auth: f52491a3395c146f
Message-ID: <9ace436c1003121056q1ebc90f6gf9f87c54dd187a20@mail.gmail.com>
From: Qing Li 
To: Gleb Smirnoff 
Content-Type: text/plain; charset=ISO-8859-1
Cc: src-committers@freebsd.org, Juli Mallett ,
	svn-src-all@freebsd.org, Robert Watson ,
	Julian Elischer , svn-src-head@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 18:56:44 -0000

>
> We've got LINK_STATE_UNKNOWN, we can just initialize if_link_state to
> this value in ether_ifattach(). And Qing should treat this value as
> LINK_STATE_UP in routing decision until better times.
>

Thanks everyone for your input.

I generally try to avoid overloading a variable to have more than 1 meaning.
For example, the if_tun interface is in LINK_STATE_UNKNOWN until
it's opened, then the link can be one of the other two states.
Also, some of the pseudo drivers such as if_tun do not call ether_ifattach().

Right now I like to implement Robert's suggestion of using if_capabilities
field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag.
The routing decision will check against the if_link_state if this bit
is set.

Only a handful of drivers have this capability. So updating those drivers
is a small task.

Do we agree on this approach?

-- Qing

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:14:58 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B0F62106566B;
	Fri, 12 Mar 2010 19:14: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 A19D38FC1C;
	Fri, 12 Mar 2010 19:14:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2CJEwDb088610;
	Fri, 12 Mar 2010 19:14:58 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CJEwt9088608;
	Fri, 12 Mar 2010 19:14:58 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003121914.o2CJEwt9088608@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 12 Mar 2010 19:14: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: r205092 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:14:58 -0000

Author: jkim
Date: Fri Mar 12 19:14:58 2010
New Revision: 205092
URL: http://svn.freebsd.org/changeset/base/205092

Log:
  Tidy up callout for select(2) and read timeout.
  
  - Add a missing callout_drain(9) before the descriptor deallocation.[1]
  - Prefer callout_init_mtx(9) over callout_init(9) and let the callout
  subsystem handle the mutex for callout function.
  
  PR:		kern/144453
  Submitted by:	Alexander Sack (asack at niksun dot com)[1]
  MFC after:	1 week

Modified:
  head/sys/net/bpf.c

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c	Fri Mar 12 18:41:41 2010	(r205091)
+++ head/sys/net/bpf.c	Fri Mar 12 19:14:58 2010	(r205092)
@@ -614,6 +614,7 @@ bpf_dtor(void *data)
 	mac_bpfdesc_destroy(d);
 #endif /* MAC */
 	knlist_destroy(&d->bd_sel.si_note);
+	callout_drain(&d->bd_callout);
 	bpf_freed(d);
 	free(d, M_BPF);
 }
@@ -651,7 +652,7 @@ bpfopen(struct cdev *dev, int flags, int
 	mac_bpfdesc_create(td->td_ucred, d);
 #endif
 	mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
-	callout_init(&d->bd_callout, CALLOUT_MPSAFE);
+	callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0);
 	knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx);
 
 	return (0);
@@ -807,13 +808,15 @@ bpf_timed_out(void *arg)
 {
 	struct bpf_d *d = (struct bpf_d *)arg;
 
-	BPFD_LOCK(d);
+	BPFD_LOCK_ASSERT(d);
+
+	if (callout_pending(&d->bd_callout) || !callout_active(&d->bd_callout))
+		return;
 	if (d->bd_state == BPF_WAITING) {
 		d->bd_state = BPF_TIMED_OUT;
 		if (d->bd_slen != 0)
 			bpf_wakeup(d);
 	}
-	BPFD_UNLOCK(d);
 }
 
 static int

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:26:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7737F106564A;
	Fri, 12 Mar 2010 19:26:45 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 684D48FC20;
	Fri, 12 Mar 2010 19:26: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 o2CJQjFS091279;
	Fri, 12 Mar 2010 19:26:45 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CJQjYD091277;
	Fri, 12 Mar 2010 19:26:45 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003121926.o2CJQjYD091277@svn.freebsd.org>
From: Kip Macy 
Date: Fri, 12 Mar 2010 19:26: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: r205093 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:26:45 -0000

Author: kmacy
Date: Fri Mar 12 19:26:45 2010
New Revision: 205093
URL: http://svn.freebsd.org/changeset/base/205093

Log:
  re-update copyright to 2010
  pointed out by danfe@

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Fri Mar 12 19:14:58 2010	(r205092)
+++ head/sys/net/flowtable.c	Fri Mar 12 19:26:45 2010	(r205093)
@@ -1,6 +1,6 @@
 /**************************************************************************
 
-Copyright (c) 2008-2009, BitGravity Inc.
+Copyright (c) 2008-2010, BitGravity Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:35:50 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1624E106566B;
	Fri, 12 Mar 2010 19:35:50 +0000 (UTC)
	(envelope-from rwatson@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id DBFE28FC0C;
	Fri, 12 Mar 2010 19:35:49 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id 6BECB46B0D;
	Fri, 12 Mar 2010 14:35:48 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <9ace436c1003121056q1ebc90f6gf9f87c54dd187a20@mail.gmail.com>
Date: Fri, 12 Mar 2010 19:35:46 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <821C1A82-27B6-4E09-9B56-93A687BE6445@freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
	
	<9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com>
	
	<9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com>
	
	<4B99EA09.80108@elischer.org> <20100312151931.GS37184@FreeBSD.org>
	<9ace436c1003121056q1ebc90f6gf9f87c54dd187a20@mail.gmail.com>
To: Qing Li 
X-Mailer: Apple Mail (2.1077)
Cc: src-committers@freebsd.org, Juli Mallett ,
	svn-src-all@freebsd.org, Gleb Smirnoff ,
	Julian Elischer , svn-src-head@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:35:50 -0000


On Mar 12, 2010, at 6:56 PM, Qing Li wrote:

> Right now I like to implement Robert's suggestion of using =
if_capabilities
> field. I'd like to create a new flag, IFCAP_LINKSTATE_NOTIFY flag.
> The routing decision will check against the if_link_state if this bit
> is set.
>=20
> Only a handful of drivers have this capability. So updating those =
drivers
> is a small task.
>=20
> Do we agree on this approach?

I'm good with this approach -- do you mind going with IFCAP_LINKSTATE or =
something similarly a bit shorter? Most of the other capability names =
are pretty short, and it will prevent the display in ifconfig from =
growing too much as the capability will be common.

Thanks!

Robert=

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:42:43 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41291106566B;
	Fri, 12 Mar 2010 19:42:43 +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 321288FC12;
	Fri, 12 Mar 2010 19:42: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 o2CJghAx094845;
	Fri, 12 Mar 2010 19:42:43 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CJghnX094843;
	Fri, 12 Mar 2010 19:42:43 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201003121942.o2CJghnX094843@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 12 Mar 2010 19:42: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: r205095 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:42:43 -0000

Author: jkim
Date: Fri Mar 12 19:42:42 2010
New Revision: 205095
URL: http://svn.freebsd.org/changeset/base/205095

Log:
  Fix a style(9) nit.

Modified:
  head/sys/net/bpf.c

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c	Fri Mar 12 19:29:27 2010	(r205094)
+++ head/sys/net/bpf.c	Fri Mar 12 19:42:42 2010	(r205095)
@@ -1580,8 +1580,7 @@ filt_bpfread(struct knote *kn, long hint
 		kn->kn_data = d->bd_slen;
 		if (d->bd_hbuf)
 			kn->kn_data += d->bd_hlen;
-	}
-	else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) {
+	} else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) {
 		callout_reset(&d->bd_callout, d->bd_rtout,
 		    bpf_timed_out, d);
 		d->bd_state = BPF_WAITING;

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:43:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 157301065676;
	Fri, 12 Mar 2010 19:43:40 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 067368FC16;
	Fri, 12 Mar 2010 19:43: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 o2CJhd45095097;
	Fri, 12 Mar 2010 19:43:39 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CJhdXV095095;
	Fri, 12 Mar 2010 19:43:39 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <201003121943.o2CJhdXV095095@svn.freebsd.org>
From: Robert Noland 
Date: Fri, 12 Mar 2010 19:43: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: r205096 - head/sys/dev/agp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:43:40 -0000

Author: rnoland
Date: Fri Mar 12 19:43:39 2010
New Revision: 205096
URL: http://svn.freebsd.org/changeset/base/205096

Log:
  Add pci ids for Intel Ironlake chipsets.
  
  These behave just like g45 for agp.
  
  Tested by:	Torfinn Ingolfsen
  
  MFC after:	3 days

Modified:
  head/sys/dev/agp/agp_i810.c

Modified: head/sys/dev/agp/agp_i810.c
==============================================================================
--- head/sys/dev/agp/agp_i810.c	Fri Mar 12 19:42:42 2010	(r205095)
+++ head/sys/dev/agp/agp_i810.c	Fri Mar 12 19:43:39 2010	(r205096)
@@ -177,6 +177,10 @@ static const struct agp_i810_match {
 	    "Intel G45 SVGA controller"},
 	{0x2E328086, CHIP_G4X, 0x00020000,
 	    "Intel G41 SVGA controller"},
+	{0x00428086, CHIP_G4X, 0x00020000,
+	    "Intel Ironlake (D) SVGA controller"},
+	{0x00468086, CHIP_G4X, 0x00020000,
+	    "Intel Ironlake (M) SVGA controller"},
 	{0, 0, 0, NULL}
 };
 

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 19:58:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CBD371065678;
	Fri, 12 Mar 2010 19:58:51 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BCF478FC26;
	Fri, 12 Mar 2010 19:58: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 o2CJwpDs098636;
	Fri, 12 Mar 2010 19:58:51 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CJwpTO098634;
	Fri, 12 Mar 2010 19:58:51 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003121958.o2CJwpTO098634@svn.freebsd.org>
From: Kip Macy 
Date: Fri, 12 Mar 2010 19:58: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: r205097 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 19:58:51 -0000

Author: kmacy
Date: Fri Mar 12 19:58:51 2010
New Revision: 205097
URL: http://svn.freebsd.org/changeset/base/205097

Log:
  flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB
  
  pointed out by jkim@

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Fri Mar 12 19:43:39 2010	(r205096)
+++ head/sys/net/flowtable.c	Fri Mar 12 19:58:51 2010	(r205097)
@@ -905,20 +905,6 @@ flowtable_set_hashkey(struct flentry *fl
 		hashkey[i] = key[i];
 }
 
-
-static uint32_t *
-flowtable_get_hashkey(struct flentry *fle)
-{
-	uint32_t *hashkey;
-
-	if (fle->f_flags & FL_IPV6)
-		hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
-	else
-		hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
-
-	return (hashkey);
-}
-
 static int
 flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key,
     uint32_t fibnum, struct route *ro, uint16_t flags)
@@ -1601,6 +1587,19 @@ VNET_SYSUNINIT(flowtable_uninit, SI_SUB_
 #endif
 
 #ifdef DDB
+static uint32_t *
+flowtable_get_hashkey(struct flentry *fle)
+{
+	uint32_t *hashkey;
+
+	if (fle->f_flags & FL_IPV6)
+		hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
+	else
+		hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
+
+	return (hashkey);
+}
+
 static bitstr_t *
 flowtable_mask_pcpu(struct flowtable *ft, int cpuid)
 {

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 20:50:29 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 34B82106566C;
	Fri, 12 Mar 2010 20:50:29 +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 CEA7A8FC1F;
	Fri, 12 Mar 2010 20:50:28 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2CKkMRn071941;
	Fri, 12 Mar 2010 13:46:22 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Fri, 12 Mar 2010 13:46:29 -0700 (MST)
Message-Id: <20100312.134629.981381289162171405.imp@bsdimp.com>
To: qingli@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <9ace436c1003112327i3350a0e8n9f6d5e917e9d1411@mail.gmail.com>
References: 
	<4B99EA09.80108@elischer.org>
	<9ace436c1003112327i3350a0e8n9f6d5e917e9d1411@mail.gmail.com>
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: src-committers@FreeBSD.org, jmallett@FreeBSD.org, svn-src-all@FreeBSD.org,
	rwatson@FreeBSD.org, julian@elischer.org, svn-src-head@FreeBSD.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 20:50:29 -0000

julian> probably should add a flag that means "we have media state"
julian> and if it is not set, assume it is always on.

qing> That's a good idea. I will take your approach.

I do too.  While I have many of the older cards that don't support
media detect (because the chips don't report that info), it will take
some time to test them all out...

Warner

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 21:14:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 257D0106564A;
	Fri, 12 Mar 2010 21:14:57 +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 159C48FC15;
	Fri, 12 Mar 2010 21:14: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 o2CLEuHT015753;
	Fri, 12 Mar 2010 21:14:56 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CLEumP015751;
	Fri, 12 Mar 2010 21:14:56 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201003122114.o2CLEumP015751@svn.freebsd.org>
From: Xin LI 
Date: Fri, 12 Mar 2010 21:14: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: r205099 - head/lib/libc/string
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 21:14:57 -0000

Author: delphij
Date: Fri Mar 12 21:14:56 2010
New Revision: 205099
URL: http://svn.freebsd.org/changeset/base/205099

Log:
  Two optimizations to MI strlen(3) inspired by David S. Miller's
  blog posting [1].
  
   - Use word-sized test for unaligned pointer before working
     the hard way.
  
     Memory page boundary is always integral multiple of a word
     alignment boundary.  Therefore, if we can access memory
     referenced by pointer p, then (p & ~word mask) must be also
     accessible.
  
   - Better utilization of multi-issue processor's ability of
     concurrency.
  
     The previous implementation utilized a formular that must be
     executed sequentially.  However, the ~, & and - operations can
     actually be caculated at the same time when the operand were
     different and unrelated.
  
     The original Hacker's Delight formular also offered consistent
     performance regardless whether the input would contain
     characters with their highest-bit set, as it catches real
     nul characters only.
  
  These two optimizations has shown further improvements over the
  previous implementation on microbenchmarks on i386 and amd64 CPU
  including Pentium 4, Core Duo 2 and i7.
  
  [1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1
  
  MFC after:	1 month

Modified:
  head/lib/libc/string/strlen.c

Modified: head/lib/libc/string/strlen.c
==============================================================================
--- head/lib/libc/string/strlen.c	Fri Mar 12 21:06:35 2010	(r205098)
+++ head/lib/libc/string/strlen.c	Fri Mar 12 21:14:56 2010	(r205099)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2009 Xin LI 
+ * Copyright (c) 2009, 2010 Xin LI 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,15 +43,17 @@ __FBSDID("$FreeBSD$");
  *	((x - 0x01....01) & ~x & 0x80....80)
  *
  * would evaluate to a non-zero value iff any of the bytes in the
- * original word is zero.  However, we can further reduce ~1/3 of
- * time if we consider that strlen() usually operate on 7-bit ASCII
- * by employing the following expression, which allows false positive
- * when high bit of 1 and use the tail case to catch these case:
+ * original word is zero.
  *
- *	((x - 0x01....01) & 0x80....80)
+ * On multi-issue processors, we can divide the above expression into:
+ *	a)  (x - 0x01....01)
+ *	b) (~x & 0x80....80)
+ *	c) a & b
  *
- * This is more than 5.2 times as fast as the raw implementation on
- * Intel T7300 under long mode for strings longer than word length.
+ * Where, a) and b) can be partially computed in parallel.
+ *
+ * The algorithm above is found on "Hacker's Delight" by
+ * Henry S. Warren, Jr.
  */
 
 /* Magic numbers for the algorithm */
@@ -82,15 +84,32 @@ strlen(const char *str)
 {
 	const char *p;
 	const unsigned long *lp;
+	long va, vb;
 
-	/* Skip the first few bytes until we have an aligned p */
+	/*
+	 * Before trying the hard (unaligned byte-by-byte access) way
+	 * to figure out whether there is a nul character, try to see
+	 * if there is a nul character is within this accessible word
+	 * first.
+	 *
+	 * p and (p & ~LONGPTR_MASK) must be equally accessible since
+	 * they always fall in the same memory page, as long as page
+	 * boundaries is integral multiple of word size.
+	 */
+	lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+	va = (*lp - mask01);
+	vb = ((~*lp) & mask80);
+	if (va & vb)
+		/* Check if we have \0 in the first part */
 	for (p = str; (uintptr_t)p & LONGPTR_MASK; p++)
 	    if (*p == '\0')
 		return (p - str);
 
 	/* Scan the rest of the string using word sized operation */
-	for (lp = (const unsigned long *)p; ; lp++)
-	    if ((*lp - mask01) & mask80) {
+	for (lp = (const unsigned long *)p; ; lp++) {
+		va = (*lp - mask01);
+		vb = ((~*lp) & mask80);
+		if (va & vb) {
 		p = (const char *)(lp);
 		testbyte(0);
 		testbyte(1);
@@ -103,8 +122,8 @@ strlen(const char *str)
 		testbyte(7);
 #endif
 	    }
+	}
 
 	/* NOTREACHED */
 	return (0);
 }
-

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 21:15:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D29BA106566C;
	Fri, 12 Mar 2010 21:15:35 +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 C39FA8FC1F;
	Fri, 12 Mar 2010 21:15: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 o2CLFZbl015942;
	Fri, 12 Mar 2010 21:15:35 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CLFZDw015940;
	Fri, 12 Mar 2010 21:15:35 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201003122115.o2CLFZDw015940@svn.freebsd.org>
From: Xin LI 
Date: Fri, 12 Mar 2010 21:15: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: r205100 - head/lib/libc/string
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 21:15:35 -0000

Author: delphij
Date: Fri Mar 12 21:15:35 2010
New Revision: 205100
URL: http://svn.freebsd.org/changeset/base/205100

Log:
  Follow up commit to reindent the code.
  
  MFC after:	1 month

Modified:
  head/lib/libc/string/strlen.c

Modified: head/lib/libc/string/strlen.c
==============================================================================
--- head/lib/libc/string/strlen.c	Fri Mar 12 21:14:56 2010	(r205099)
+++ head/lib/libc/string/strlen.c	Fri Mar 12 21:15:35 2010	(r205100)
@@ -101,27 +101,27 @@ strlen(const char *str)
 	vb = ((~*lp) & mask80);
 	if (va & vb)
 		/* Check if we have \0 in the first part */
-	for (p = str; (uintptr_t)p & LONGPTR_MASK; p++)
-	    if (*p == '\0')
-		return (p - str);
+		for (p = str; (uintptr_t)p & LONGPTR_MASK; p++)
+			if (*p == '\0')
+				return (p - str);
 
 	/* Scan the rest of the string using word sized operation */
 	for (lp = (const unsigned long *)p; ; lp++) {
 		va = (*lp - mask01);
 		vb = ((~*lp) & mask80);
 		if (va & vb) {
-		p = (const char *)(lp);
-		testbyte(0);
-		testbyte(1);
-		testbyte(2);
-		testbyte(3);
+			p = (const char *)(lp);
+			testbyte(0);
+			testbyte(1);
+			testbyte(2);
+			testbyte(3);
 #if (LONG_BIT >= 64)
-		testbyte(4);
-		testbyte(5);
-		testbyte(6);
-		testbyte(7);
+			testbyte(4);
+			testbyte(5);
+			testbyte(6);
+			testbyte(7);
 #endif
-	    }
+		}
 	}
 
 	/* NOTREACHED */

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 21:34:23 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8FCED106566B;
	Fri, 12 Mar 2010 21:34:23 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7FE2F8FC25;
	Fri, 12 Mar 2010 21:34: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 o2CLYNKA020111;
	Fri, 12 Mar 2010 21:34:23 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CLYNNG020109;
	Fri, 12 Mar 2010 21:34:23 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <201003122134.o2CLYNNG020109@svn.freebsd.org>
From: Robert Noland 
Date: Fri, 12 Mar 2010 21:34:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205102 - head/sys/dev/agp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 21:34:23 -0000

Author: rnoland
Date: Fri Mar 12 21:34:23 2010
New Revision: 205102
URL: http://svn.freebsd.org/changeset/base/205102

Log:
  Add support of Intel Pineview chips, aka IGD.
  
  MFC after:	3 days

Modified:
  head/sys/dev/agp/agp_i810.c

Modified: head/sys/dev/agp/agp_i810.c
==============================================================================
--- head/sys/dev/agp/agp_i810.c	Fri Mar 12 21:20:36 2010	(r205101)
+++ head/sys/dev/agp/agp_i810.c	Fri Mar 12 21:34:23 2010	(r205102)
@@ -70,6 +70,7 @@ enum {
 	CHIP_I915,	/* 915G/915GM */
 	CHIP_I965,	/* G965 */
 	CHIP_G33,	/* G33/Q33/Q35 */
+	CHIP_IGD,	/* Pineview */
 	CHIP_G4X,	/* G45/Q45 */
 };
 
@@ -163,6 +164,10 @@ static const struct agp_i810_match {
 	    "Intel G33 SVGA controller"},
 	{0x29D28086, CHIP_G33, 0x00020000,
 	    "Intel Q33 SVGA controller"},
+	{0xA0018086, CHIP_IGD, 0x00010000,
+	    "Intel Pineview SVGA controller"},
+	{0xA0118086, CHIP_IGD, 0x00010000,
+	    "Intel Pineview (M) SVGA controller"},
 	{0x2A028086, CHIP_I965, 0x00020000,
 	    "Intel GM965 SVGA controller"},
 	{0x2A128086, CHIP_I965, 0x00020000,
@@ -170,7 +175,7 @@ static const struct agp_i810_match {
 	{0x2A428086, CHIP_G4X, 0x00020000,
 	    "Intel GM45 SVGA controller"},
 	{0x2E028086, CHIP_G4X, 0x00020000,
-	    "Intel 4 Series SVGA controller"},
+	    "Intel Eaglelake SVGA controller"},
 	{0x2E128086, CHIP_G4X, 0x00020000,
 	    "Intel Q45 SVGA controller"},
 	{0x2E228086, CHIP_G4X, 0x00020000,
@@ -290,6 +295,7 @@ agp_i810_probe(device_t dev)
 	case CHIP_I915:
 	case CHIP_I965:
 	case CHIP_G33:
+	case CHIP_IGD:
 	case CHIP_G4X:
 		deven = pci_read_config(bdev, AGP_I915_DEVEN, 4);
 		if ((deven & AGP_I915_DEVEN_D2F0) ==
@@ -355,6 +361,7 @@ agp_i810_dump_regs(device_t dev)
 	case CHIP_I915:
 	case CHIP_I965:
 	case CHIP_G33:
+	case CHIP_IGD:
 	case CHIP_G4X:
 		device_printf(dev, "AGP_I855_GCC1: 0x%02x\n",
 		    pci_read_config(sc->bdev, AGP_I855_GCC1, 1));
@@ -390,6 +397,7 @@ agp_i810_attach(device_t dev)
 		break;
 	case CHIP_I915:
 	case CHIP_G33:
+	case CHIP_IGD:
 		sc->sc_res_spec = agp_i915_res_spec;
 		agp_set_aperture_resource(dev, AGP_I915_GMADR);
 		break;
@@ -405,7 +413,8 @@ agp_i810_attach(device_t dev)
 		return error;
 
 	if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 &&
-	    sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful)
+	    sc->chiptype != CHIP_IGD && sc->chiptype != CHIP_G4X &&
+	    ptoa((vm_paddr_t)Maxmem) > 0xfffffffful)
 	{
 		device_printf(dev, "agp_i810.c does not support physical "
 		    "memory above 4GB.\n");
@@ -489,7 +498,7 @@ agp_i810_attach(device_t dev)
 		gatt->ag_physical = pgtblctl & ~1;
 	} else if (sc->chiptype == CHIP_I855 || sc->chiptype == CHIP_I915 ||
 	    sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 ||
-	    sc->chiptype == CHIP_G4X) {
+	    sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) {
 		unsigned int gcc1, pgtblctl, stolen, gtt_size;
 
 		/* Stolen memory is set up at the beginning of the aperture by
@@ -551,6 +560,7 @@ agp_i810_attach(device_t dev)
 				return EINVAL;
 			}
 			break;
+		case CHIP_IGD:
 		case CHIP_G4X:
 			gtt_size = 0;
 			break;
@@ -585,6 +595,7 @@ agp_i810_attach(device_t dev)
 			if (sc->chiptype == CHIP_I915 ||
 			    sc->chiptype == CHIP_I965 ||
 			    sc->chiptype == CHIP_G33 ||
+			    sc->chiptype == CHIP_IGD ||
 			    sc->chiptype == CHIP_G4X) {
 				stolen = 48 * 1024;
 			} else {
@@ -595,6 +606,7 @@ agp_i810_attach(device_t dev)
 			if (sc->chiptype == CHIP_I915 ||
 			    sc->chiptype == CHIP_I965 ||
 			    sc->chiptype == CHIP_G33 ||
+			    sc->chiptype == CHIP_IGD ||
 			    sc->chiptype == CHIP_G4X) {
 				stolen = 64 * 1024;
 			} else {
@@ -604,6 +616,7 @@ agp_i810_attach(device_t dev)
 		case AGP_G33_GCC1_GMS_STOLEN_128M:
 			if (sc->chiptype == CHIP_I965 ||
 			    sc->chiptype == CHIP_G33 ||
+			    sc->chiptype == CHIP_IGD ||
 			    sc->chiptype == CHIP_G4X) {
 				stolen = 128 * 1024;
 			} else {
@@ -613,6 +626,7 @@ agp_i810_attach(device_t dev)
 		case AGP_G33_GCC1_GMS_STOLEN_256M:
 			if (sc->chiptype == CHIP_I965 ||
 			    sc->chiptype == CHIP_G33 ||
+			    sc->chiptype == CHIP_IGD ||
 			    sc->chiptype == CHIP_G4X) {
 				stolen = 256 * 1024;
 			} else {
@@ -785,6 +799,7 @@ agp_i810_set_aperture(device_t dev, u_in
 	case CHIP_I915:
 	case CHIP_I965:
 	case CHIP_G33:
+	case CHIP_IGD:
 	case CHIP_G4X:
 		return agp_generic_set_aperture(dev, aperture);
 	}
@@ -805,7 +820,7 @@ agp_i810_write_gtt_entry(device_t dev, i
 
 	pte = (u_int32_t)physical | 1;
 	if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 ||
-	    sc->chiptype == CHIP_G4X) {
+	    sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) {
 		pte |= (physical & 0x0000000f00000000ull) >> 28;
 	} else {
 		/* If we do actually have memory above 4GB on an older system,
@@ -825,6 +840,7 @@ agp_i810_write_gtt_entry(device_t dev, i
 		break;
 	case CHIP_I915:
 	case CHIP_G33:
+	case CHIP_IGD:
 		bus_write_4(sc->sc_res[1],
 		    (offset >> AGP_PAGE_SHIFT) * 4, pte);
 		break;

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 22:39:35 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C0C9C106566C;
	Fri, 12 Mar 2010 22:39:35 +0000 (UTC)
	(envelope-from ticso@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B07338FC08;
	Fri, 12 Mar 2010 22:39: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 o2CMdZ5b034589;
	Fri, 12 Mar 2010 22:39:35 GMT (envelope-from ticso@svn.freebsd.org)
Received: (from ticso@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CMdZmP034587;
	Fri, 12 Mar 2010 22:39:35 GMT (envelope-from ticso@svn.freebsd.org)
Message-Id: <201003122239.o2CMdZmP034587@svn.freebsd.org>
From: Bernd Walter 
Date: Fri, 12 Mar 2010 22:39: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: r205103 - head/sys/arm/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 22:39:35 -0000

Author: ticso
Date: Fri Mar 12 22:39:35 2010
New Revision: 205103
URL: http://svn.freebsd.org/changeset/base/205103

Log:
  fix type in comment

Modified:
  head/sys/arm/conf/BWCT.hints

Modified: head/sys/arm/conf/BWCT.hints
==============================================================================
--- head/sys/arm/conf/BWCT.hints	Fri Mar 12 21:34:23 2010	(r205102)
+++ head/sys/arm/conf/BWCT.hints	Fri Mar 12 22:39:35 2010	(r205103)
@@ -4,6 +4,6 @@
 hint.ds1672_rtc.0.at="iicbus0"
 hint.ds1672_rtc.0.addr=0xd0
 
-# NAtional Semiconductor LM75 temperature sensor sitting on the I2C bus
+# National Semiconductor LM75 temperature sensor sitting on the I2C bus
 hint.lm75.0.at="iicbus0"
 hint.lm75.0.addr=0x9e

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 22:58:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCE371065670;
	Fri, 12 Mar 2010 22:58:52 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BBA138FC1F;
	Fri, 12 Mar 2010 22:58: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 o2CMwqMD039085;
	Fri, 12 Mar 2010 22:58:52 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CMwqDM039077;
	Fri, 12 Mar 2010 22:58:52 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <201003122258.o2CMwqDM039077@svn.freebsd.org>
From: Randall Stewart 
Date: Fri, 12 Mar 2010 22:58: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: r205104 - in head/sys: dev/xen/netback netinet netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 22:58:52 -0000

Author: rrs
Date: Fri Mar 12 22:58:52 2010
New Revision: 205104
URL: http://svn.freebsd.org/changeset/base/205104

Log:
  The proper fix for the delayed SCTP checksum is to
  have the delayed function take an argument as to the offset
  to the SCTP header. This allows it to work for V4 and V6.
  This of course means changing all callers of the function
  to either pass the header len, if they have it, or create
  it (ip_hl << 2 or sizeof(ip6_hdr)).
  PR:		144529
  MFC after:	2 weeks

Modified:
  head/sys/dev/xen/netback/netback.c
  head/sys/netinet/ip_divert.c
  head/sys/netinet/ip_ipsec.c
  head/sys/netinet/ip_output.c
  head/sys/netinet/sctp_crc32.c
  head/sys/netinet/sctp_crc32.h
  head/sys/netinet6/ip6_output.c

Modified: head/sys/dev/xen/netback/netback.c
==============================================================================
--- head/sys/dev/xen/netback/netback.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/dev/xen/netback/netback.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -302,7 +302,7 @@ fixup_checksum(struct mbuf *m)
 		m->m_pkthdr.csum_flags &= ~CSUM_TCP;
 #ifdef SCTP
 	} else if (sw_csum & CSUM_SCTP) {
-		sctp_delayed_cksum(m);
+		sctp_delayed_cksum(m, iphlen);
 		sw_csum &= ~CSUM_SCTP;
 #endif
 	} else {

Modified: head/sys/netinet/ip_divert.c
==============================================================================
--- head/sys/netinet/ip_divert.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet/ip_divert.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -227,7 +227,7 @@ divert_packet(struct mbuf *m, int incomi
 #ifdef SCTP
 	if (m->m_pkthdr.csum_flags & CSUM_SCTP) {
 		ip->ip_len = ntohs(ip->ip_len);
-		sctp_delayed_cksum(m);
+		sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2));
 		m->m_pkthdr.csum_flags &= ~CSUM_SCTP;
 		ip->ip_len = htons(ip->ip_len);
 	}

Modified: head/sys/netinet/ip_ipsec.c
==============================================================================
--- head/sys/netinet/ip_ipsec.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet/ip_ipsec.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -342,7 +342,7 @@ ip_ipsec_output(struct mbuf **m, struct 
 		}
 #ifdef SCTP
 		if ((*m)->m_pkthdr.csum_flags & CSUM_SCTP) {
-			sctp_delayed_cksum(*m);
+			sctp_delayed_cksum(*m, (uint32_t)(ip->ip_hl << 2));
 			(*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP;
 		}
 #endif

Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet/ip_output.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -583,7 +583,7 @@ passout:
 	}
 #ifdef SCTP
 	if (sw_csum & CSUM_SCTP) {
-		sctp_delayed_cksum(m);
+		sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2));
 		sw_csum &= ~CSUM_SCTP;
 	}
 #endif
@@ -725,7 +725,7 @@ ip_fragment(struct ip *ip, struct mbuf *
 #ifdef SCTP
 	if (m0->m_pkthdr.csum_flags & CSUM_SCTP &&
 	    (if_hwassist_flags & CSUM_IP_FRAGS) == 0) {
-		sctp_delayed_cksum(m0);
+		sctp_delayed_cksum(m0, hlen);
 		m0->m_pkthdr.csum_flags &= ~CSUM_SCTP;
 	}
 #endif

Modified: head/sys/netinet/sctp_crc32.c
==============================================================================
--- head/sys/netinet/sctp_crc32.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet/sctp_crc32.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -127,14 +127,12 @@ sctp_calculate_cksum(struct mbuf *m, uin
 
 
 void
-sctp_delayed_cksum(struct mbuf *m)
+sctp_delayed_cksum(struct mbuf *m, uint32_t offset)
 {
 	struct ip *ip;
 	uint32_t checksum;
-	uint32_t offset;
 
 	ip = mtod(m, struct ip *);
-	offset = ip->ip_hl << 2;
 	checksum = sctp_calculate_cksum(m, offset);
 	SCTP_STAT_DECR(sctps_sendhwcrc);
 	SCTP_STAT_INCR(sctps_sendswcrc);

Modified: head/sys/netinet/sctp_crc32.h
==============================================================================
--- head/sys/netinet/sctp_crc32.h	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet/sctp_crc32.h	Fri Mar 12 22:58:52 2010	(r205104)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #if defined(_KERNEL) || defined(__Userspace__)
 
 uint32_t sctp_calculate_cksum(struct mbuf *, uint32_t);
-void sctp_delayed_cksum(struct mbuf *);
+void sctp_delayed_cksum(struct mbuf *, uint32_t offset);
 
 #endif				/* _KERNEL */
 

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Fri Mar 12 22:39:35 2010	(r205103)
+++ head/sys/netinet6/ip6_output.c	Fri Mar 12 22:58:52 2010	(r205104)
@@ -872,7 +872,7 @@ passout:
 #ifdef SCTP
 	sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist;
 	if (sw_csum & CSUM_SCTP) {
-		sctp_delayed_cksum(m);
+		sctp_delayed_cksum(m, sizeof(struct ip6_hdr));
 		sw_csum &= ~CSUM_SCTP;
 	}
 #endif

From owner-svn-src-head@FreeBSD.ORG  Fri Mar 12 23:23:46 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D3E3106564A;
	Fri, 12 Mar 2010 23:23:46 +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 6BF068FC18;
	Fri, 12 Mar 2010 23:23:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2CNNkWM044599;
	Fri, 12 Mar 2010 23:23:46 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2CNNkTu044598;
	Fri, 12 Mar 2010 23:23:46 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201003122323.o2CNNkTu044598@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Fri, 12 Mar 2010 23:23:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205105 - head/tools/regression/bin/sh/expansion
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Mar 2010 23:23:46 -0000

Author: jilles
Date: Fri Mar 12 23:23:46 2010
New Revision: 205105
URL: http://svn.freebsd.org/changeset/base/205105

Log:
  sh: Add tests for " and $ inside `.

Added:
  head/tools/regression/bin/sh/expansion/cmdsubst2.0   (contents, props changed)

Added: head/tools/regression/bin/sh/expansion/cmdsubst2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/expansion/cmdsubst2.0	Fri Mar 12 23:23:46 2010	(r205105)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+	if ! eval "[ $* ]"; then
+		echo "Failed: $*"
+		: $((failures += 1))
+	fi
+}
+
+check '`echo /et[c]/` = "/etc/"'
+check '`printf /var/empty%s /et[c]/` = "/var/empty/etc/"'
+check '"`echo /et[c]/`" = "/etc/"'
+check '`echo "/et[c]/"` = "/etc/"'
+check '`printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"'
+check '`printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""'
+check '"`echo \"/et[c]/\"`" = "/et[c]/"'
+check '"`echo "/et[c]/"`" = "/et[c]/"'
+check '`echo $$` = $$'
+check '"`echo $$`" = $$'
+check '`echo \$\$` = $$'
+check '"`echo \$\$`" = $$'
+
+# Command substitutions consisting of a single builtin may be treated
+# differently.
+check '`:; echo /et[c]/` = "/etc/"'
+check '`:; printf /var/empty%s /et[c]/` = "/var/empty/etc/"'
+check '"`:; echo /et[c]/`" = "/etc/"'
+check '`:; echo "/et[c]/"` = "/etc/"'
+check '`:; printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"'
+check '`:; printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""'
+check '"`:; echo \"/et[c]/\"`" = "/et[c]/"'
+check '"`:; echo "/et[c]/"`" = "/et[c]/"'
+check '`:; echo $$` = $$'
+check '"`:; echo $$`" = $$'
+check '`:; echo \$\$` = $$'
+check '"`:; echo \$\$`" = $$'
+
+check '`set -f; echo /et[c]/` = "/etc/"'
+check '"`set -f; echo /et[c]/`" = "/et[c]/"'
+
+exit $((failures > 0))

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 00:15:06 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A728106566B;
	Sat, 13 Mar 2010 00:15:06 +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 598E28FC17;
	Sat, 13 Mar 2010 00:15: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 o2D0F6UK055999;
	Sat, 13 Mar 2010 00:15:06 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2D0F6a6055997;
	Sat, 13 Mar 2010 00:15:06 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201003130015.o2D0F6a6055997@svn.freebsd.org>
From: Xin LI 
Date: Sat, 13 Mar 2010 00: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: r205108 - head/lib/libc/string
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 00:15:06 -0000

Author: delphij
Date: Sat Mar 13 00:15:06 2010
New Revision: 205108
URL: http://svn.freebsd.org/changeset/base/205108

Log:
  Correct bugs fixed but not merged from my own tree.
  
  Pointy hat to:	delphij
  MFC after:	1 month

Modified:
  head/lib/libc/string/strlen.c

Modified: head/lib/libc/string/strlen.c
==============================================================================
--- head/lib/libc/string/strlen.c	Fri Mar 12 23:57:27 2010	(r205107)
+++ head/lib/libc/string/strlen.c	Sat Mar 13 00:15:06 2010	(r205108)
@@ -99,14 +99,15 @@ strlen(const char *str)
 	lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
 	va = (*lp - mask01);
 	vb = ((~*lp) & mask80);
+	lp++;
 	if (va & vb)
 		/* Check if we have \0 in the first part */
-		for (p = str; (uintptr_t)p & LONGPTR_MASK; p++)
+		for (p = str; p < (const char *)lp; p++)
 			if (*p == '\0')
 				return (p - str);
 
 	/* Scan the rest of the string using word sized operation */
-	for (lp = (const unsigned long *)p; ; lp++) {
+	for (; ; lp++) {
 		va = (*lp - mask01);
 		vb = ((~*lp) & mask80);
 		if (va & vb) {

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 02:10:20 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 97D50106566C;
	Sat, 13 Mar 2010 02:10:20 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 875A88FC16;
	Sat, 13 Mar 2010 02:10: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 o2D2AKvI081402;
	Sat, 13 Mar 2010 02:10:20 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2D2AKNJ081400;
	Sat, 13 Mar 2010 02:10:20 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003130210.o2D2AKNJ081400@svn.freebsd.org>
From: Juli Mallett 
Date: Sat, 13 Mar 2010 02:10: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: r205112 - head/lib/csu/mips
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 02:10:20 -0000

Author: jmallett
Date: Sat Mar 13 02:10:20 2010
New Revision: 205112
URL: http://svn.freebsd.org/changeset/base/205112

Log:
  Fix spelling of noreorder.

Modified:
  head/lib/csu/mips/crti.S

Modified: head/lib/csu/mips/crti.S
==============================================================================
--- head/lib/csu/mips/crti.S	Sat Mar 13 02:09:15 2010	(r205111)
+++ head/lib/csu/mips/crti.S	Sat Mar 13 02:10:20 2010	(r205112)
@@ -6,7 +6,7 @@ __FBSDID("$FreeBSD$");
 	.globl	_init
 	.type	_init,%function
 _init:
-	.set nreoorder
+	.set noreorder
 #if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64))
 	SETUP_GP
 #endif

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 02:53:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10439106566B;
	Sat, 13 Mar 2010 02:53:49 +0000 (UTC)
	(envelope-from unixmania@gmail.com)
Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com
	[209.85.220.223])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C4858FC13;
	Sat, 13 Mar 2010 02:53:47 +0000 (UTC)
Received: by fxm23 with SMTP id 23so1820131fxm.3
	for ; Fri, 12 Mar 2010 18:53:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=R13rcov9zNr0IKB6rsQm/IhMEGaTUeL2K2zhf5PI0T8=;
	b=q0SrwmUe8mJG7VQwdHMGVHzhCzsxhvdNtiFFvgNpYSkrV2JjOtP/aY0Btqs8B4Ekde
	W7YDyjMB68JzmrI2Fb0ZZff6e7lmBsV+c3wKRPWDxiIHUW/fdxIUetIcseTcdwGMKNrw
	QUL9ZUjpiIEnQysMAte0KOOCzfXoSLiQFxLZE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=oj4KM0iseFvWf9TPJevCoCjn1pNKBDzDDmvomDRZHstH450YhyyrqVI2eh7DqO71zb
	c44WNatq9ys1AOLEWOHe3Ic8YAjFBzf2c0OP/reJ9VqIFd5U9yx8VPdaHrdA7UsVCgTG
	6YDR1iyiNs8cCn4B9CJ0lNXb2wJHdiHEKXAno=
MIME-Version: 1.0
Received: by 10.239.187.133 with SMTP id l5mr165681hbh.113.1268448826733; Fri, 
	12 Mar 2010 18:53:46 -0800 (PST)
In-Reply-To: <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
Date: Fri, 12 Mar 2010 23:53:46 -0300
Message-ID: 
From: "Carlos A. M. dos Santos" 
To: Rui Paulo 
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, Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 
	sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 02:53:49 -0000

On Fri, Mar 12, 2010 at 10:52 AM, Rui Paulo  wrote:
>
> On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote:
>
>> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
>>  wrote:
>>>
>>> Author: nwhitehorn
>>> Date: Thu Mar 11 14:49:06 2010
>>> New Revision: 205014
>>> URL: http://svn.freebsd.org/changeset/base/205014
>>>
>>> Log:
>>> =A0Provide groundwork for 32-bit binary compatibility on non-x86 platfo=
rms,
>>> =A0for upcoming 64-bit PowerPC and MIPS support. This renames the
>>> COMPAT_IA32
>>> =A0option to COMPAT_FREEBSD32, removes some IA32-specific code from MI
>>> parts
>>> =A0of the kernel and enhances the freebsd32 compatibility code to suppo=
rt
>>> =A0big-endian platforms.
>>
>> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
>> interpreted as "compatible with FreeBSD 3.2". Something like
>> "COMPAT_32BIT" would be more meaningful.
>
> There's a lengthy discussion about this on another mailing list.
>
> This is unlikely to be changed and emailing the committer who provided
> valuable time on this code wastes his time and everyone else's.

So the user - the person to whom the software is made, theoretically -
don't have the right to disagree when he sees a change that looks
confusing "because the committers's time is too valuable". Sorry, I
was not aware of that policy. Please forgive my audacity. Keep in mind
that we, the users, are a bunch of idiots that don't like to become
astonished by sudden changes in the meaning of the symbols that we use
to see. Thanks God we have you, the holly committers to protect us
from our own ignorance.

--=20
Not so young, but still crying out
Full of anger full of doubt

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 03:06:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3800D106566C;
	Sat, 13 Mar 2010 03:06:49 +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 0E0F08FC0A;
	Sat, 13 Mar 2010 03:06: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 o2D36mFa093935;
	Sat, 13 Mar 2010 03:06:48 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2D36mJJ093933;
	Sat, 13 Mar 2010 03:06:48 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201003130306.o2D36mJJ093933@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 13 Mar 2010 03:06: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: r205113 - head/lib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 03:06:49 -0000

Author: imp
Date: Sat Mar 13 03:06:48 2010
New Revision: 205113
URL: http://svn.freebsd.org/changeset/base/205113

Log:
  Make this conform to the other top-level Makefile subdir listings with
  one file per line.
  
  Suggested by: bde

Modified:
  head/lib/Makefile

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Sat Mar 13 02:10:20 2010	(r205112)
+++ head/lib/Makefile	Sat Mar 13 03:06:48 2010	(r205113)
@@ -29,19 +29,83 @@
 #
 # Except it appears bind needs to be compiled last
 
-SUBDIR=	${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm \
-	msun libmd ncurses ${_libnetgraph} libradius librpcsvc libsbuf \
-	libtacplus libutil ${_libypclnt}
-SUBDIR+=libalias libarchive ${_libatm} libbegemot ${_libbluetooth} \
-	${_libbsnmp} libbz2 libcalendar libcam libcompat libdevinfo \
-	libdevstat libdisk libdwarf libedit ${_libefi} libexpat libfetch \
-	libftpio libgeom ${_libgpib} ${_libgssapi} ${_librpcsec_gss} libipsec \
-	${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \
-	${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \
-	${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \
-	${_libsmdb} ${_libsmutil} libstand \
-	${_libtelnet} ${_libthr} libthread_db libufs libugidfw libulog \
-	${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \
+SUBDIR_ORDERED=	${_csu} \
+	libc \
+	libbsm \
+	libauditd \
+	libcom_err \
+	libcrypt \
+	libelf \
+	libkvm \
+	msun \
+	libmd \
+	ncurses \
+	${_libnetgraph} \
+	libradius \
+	librpcsvc \
+	libsbuf \
+	libtacplus \
+	libutil \
+	${_libypclnt}
+
+SUBDIR=	${SUBDIR_ORDERED} \
+	libalias \
+	libarchive \
+	${_libatm} \
+	libbegemot \
+	${_libbluetooth} \
+	${_libbsnmp} \
+	libbz2 \
+	libcalendar \
+	libcam \
+	libcompat \
+	libdevinfo \
+	libdevstat \
+	libdisk \
+	libdwarf \
+	libedit \
+	${_libefi} \
+	libexpat \
+	libfetch \
+	libftpio \
+	libgeom \
+	${_libgpib} \
+	${_libgssapi} \
+	${_librpcsec_gss} \
+	libipsec \
+	${_libipx} \
+	libjail \
+	libkiconv \
+	libmagic \
+	libmemstat \
+	${_libmilter} \
+	${_libmp} \
+	${_libncp} \
+	${_libngatm} \
+	libopie \
+	libpam \
+	libpcap \
+	${_libpmc} \
+	libproc \
+	librt \
+	${_libsdp} \
+	${_libsm} \
+	${_libsmb} \
+	${_libsmdb} \
+	${_libsmutil} \
+	libstand \
+	${_libtelnet} \
+	${_libthr} \
+	libthread_db \
+	libufs \
+	libugidfw \
+	libulog \
+	${_libusbhid} \
+	${_libusb} \
+	${_libvgl} \
+	libwrap \
+	liby \
+	libz \
 	${_bind}
 
 .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 03:07:45 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1952E1065670;
	Sat, 13 Mar 2010 03:07:45 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 8403A8FC1D;
	Sat, 13 Mar 2010 03:07:44 +0000 (UTC)
Received: by gwj15 with SMTP id 15so790677gwj.13
	for ; Fri, 12 Mar 2010 19:07:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:cc:message-id:from:to
	:in-reply-to:content-type:content-transfer-encoding:mime-version
	:subject:date:references:x-mailer;
	bh=kC2GQNiaLAoiupybBUChCcfzeqKsIOVOpZNyFQqX6Qs=;
	b=nvZDanI4gGJ/AsmgK0JJ0m6WHbyEAIrDKHObpHQ/fw+lju+nXcp/SSk8+vGcaCQs7m
	D7PmMgurU+2OXLT8a1WdBEwwdRGg3PzjIlNO+48u5jj3hEr6wkIYzyfUlEr+zdf/eRD0
	Q1pM4cIEJSKOO+XaFdsTR+brqmAR5Q5qFmKis=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:cc:message-id:from:to:in-reply-to:content-type
	:content-transfer-encoding:mime-version:subject:date:references
	:x-mailer;
	b=Fbvo3+OXH/Khz53G3Wdix0tZTKqyR8D5ydKSxHxvh+rwisk9HYndecfWDMNI6NwPhC
	c6CB1niM6s2vd0UHIxP28E7C1Tv26JGLu0Hjh/3GDsv0cTLttexDM1Gdd1QqaOFy27Lk
	SDQiNELEC5njOM6eDXroPzVgwi3FL6hmbP+VE=
Received: by 10.100.233.4 with SMTP id f4mr315850anh.210.1268449663792;
	Fri, 12 Mar 2010 19:07:43 -0800 (PST)
Received: from [192.168.11.61] (197.214.32.202.bf.2iij.net [202.32.214.197])
	by mx.google.com with ESMTPS id 7sm635576yxd.44.2010.03.12.19.07.40
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 12 Mar 2010 19:07:42 -0800 (PST)
Sender: Rui Paulo 
Message-Id: <43586297-42AF-46F7-9B55-6A9BADD78752@freebsd.org>
From: Rui Paulo 
To: Carlos A. M. dos Santos 
In-Reply-To: 
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Sat, 13 Mar 2010 12:07:30 +0900
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf
	sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 03:07:45 -0000

On 13 Mar 2010, at 11:53, Carlos A. M. dos Santos wrote:

> On Fri, Mar 12, 2010 at 10:52 AM, Rui Paulo   
> wrote:
>>
>> On 12 Mar 2010, at 21:36, Carlos A. M. dos Santos wrote:
>>
>>> On Thu, Mar 11, 2010 at 11:49 AM, Nathan Whitehorn
>>>  wrote:
>>>>
>>>> Author: nwhitehorn
>>>> Date: Thu Mar 11 14:49:06 2010
>>>> New Revision: 205014
>>>> URL: http://svn.freebsd.org/changeset/base/205014
>>>>
>>>> Log:
>>>>  Provide groundwork for 32-bit binary compatibility on non-x86  
>>>> platforms,
>>>>  for upcoming 64-bit PowerPC and MIPS support. This renames the
>>>> COMPAT_IA32
>>>>  option to COMPAT_FREEBSD32, removes some IA32-specific code from  
>>>> MI
>>>> parts
>>>>  of the kernel and enhances the freebsd32 compatibility code to  
>>>> support
>>>>  big-endian platforms.
>>>
>>> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
>>> interpreted as "compatible with FreeBSD 3.2". Something like
>>> "COMPAT_32BIT" would be more meaningful.
>>
>> There's a lengthy discussion about this on another mailing list.
>>
>> This is unlikely to be changed and emailing the committer who  
>> provided
>> valuable time on this code wastes his time and everyone else's.
>
> So the user - the person to whom the software is made, theoretically -
> don't have the right to disagree when he sees a change that looks
> confusing "because the committers's time is too valuable". Sorry, I
> was not aware of that policy. Please forgive my audacity. Keep in mind
> that we, the users, are a bunch of idiots that don't like to become
> astonished by sudden changes in the meaning of the symbols that we use
> to see. Thanks God we have you, the holly committers to protect us
> from our own ignorance.

You said that, I didn't. Please refrain from distorting my own words.  
If you want something discussed, do it on the other list and, please,  
do it with a grown up attitude because, quite frankly, what you wrote  
doesn't make sense.

Thank you,
--
Rui Paulo


From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 04:55:48 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 63159106566C;
	Sat, 13 Mar 2010 04:55:48 +0000 (UTC)
	(envelope-from jmallett@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 526EA8FC1E;
	Sat, 13 Mar 2010 04:55: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 o2D4tm3I018102;
	Sat, 13 Mar 2010 04:55:48 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2D4tmmq018101;
	Sat, 13 Mar 2010 04:55:48 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201003130455.o2D4tmmq018101@svn.freebsd.org>
From: Juli Mallett 
Date: Sat, 13 Mar 2010 04:55: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: r205115 - head/sys/mips/cavium/dev/rgmii
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 04:55:48 -0000

Author: jmallett
Date: Sat Mar 13 04:55:47 2010
New Revision: 205115
URL: http://svn.freebsd.org/changeset/base/205115

Log:
  o) Use octeon_fpa_alloc_phys in a situation in which we don't need a usable
     pointer, rather than octeon_fpa_alloc.
  o) Report half duplex status properly.
  o) Do not unconditionally update the last known link status in the softc.  If
     report_link isn't set, when octeon_rgmx_config_speed is called the first
     time it will tell the driver (essentially) that we have already marked the
     interface up.  Likewise, don't change media speed and duplex if only the
     link status is at issue. [1]
  o) Remove manual changing of link state and let octeon_rgmx_config_speed do the
     heavy lifting. [1]
  
  Reviewed by:	[1] imp
  Sponsored by:	Packet Forensics

Modified:
  head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c

Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Sat Mar 13 04:00:36 2010	(r205114)
+++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Sat Mar 13 04:55:47 2010	(r205115)
@@ -1015,10 +1015,9 @@ static u_int octeon_rgmx_pko_xmit_packet
          * 3 words or less are left. We write our 2nd word now and then put in a chain link
          * to new PKO cmd buf.
          */
-        void *pko_cmd_buf = octeon_fpa_alloc(OCTEON_FPA_TX_CMDBUF_POOL);
-        uint64_t phys_cmd_buf;
+        uint64_t phys_cmd_buf = octeon_fpa_alloc_phys(OCTEON_FPA_TX_CMDBUF_POOL);
 
-        if (!pko_cmd_buf) {
+        if (!phys_cmd_buf) {
             /*
              * FPA pool for xmit-buffer-commands is empty.
              */
@@ -1026,7 +1025,6 @@ static u_int octeon_rgmx_pko_xmit_packet
             octeon_spinlock_unlock(&(sc->outq_ptr[queue].lock));
             return (0);
         }
-        phys_cmd_buf = OCTEON_PTR2PHYS(pko_cmd_buf);
 
         xmit_cmd_ptr[1] = pko_pkt_word.word64;
         xmit_cmd_ptr[2] = phys_cmd_buf;
@@ -1678,8 +1676,13 @@ static void octeon_rgmx_medstat (struct 
 		break;
 	}
 
-	/* Always full duplex.  */
-	ifm->ifm_active |= IFM_FDX;
+	/*
+	 * Check duplex.
+	 */
+	if (link_status.bits.duplex == 1)
+		ifm->ifm_active |= IFM_FDX;
+	else
+		ifm->ifm_active |= IFM_HDX;
 
 	RGMX_UNLOCK(sc);
 }
@@ -1815,7 +1818,6 @@ static int octeon_rgmx_ioctl (struct ifn
 static void  octeon_rgmx_init (void *xsc)
 {
 	struct rgmx_softc_dev *sc = xsc;
-	octeon_rgmx_rxx_rx_inbnd_t link_status;
 
         /* Enable interrupts.  */
     	/* For RGMX they are already enabled earlier */
@@ -1836,19 +1838,7 @@ static void  octeon_rgmx_init (void *xsc
         /* Hopefully PKO is running and will pick up packets via the timer  or receive loop */
 
 	/* Set link status.  */
-	octeon_rgmx_config_speed(sc->port, 0);
-
-	RGMX_LOCK(sc);
-	/*
-	 * Parse link status.
-	 */
-	link_status.word64 = sc->link_status;
-
-	if (link_status.bits.status)
-		if_link_state_change(sc->ifp, LINK_STATE_UP);
-	else
-		if_link_state_change(sc->ifp, LINK_STATE_DOWN);
-	RGMX_UNLOCK(sc);
+	octeon_rgmx_config_speed(sc->port, 1);
 }
 
 
@@ -1863,7 +1853,6 @@ static void octeon_rgmx_config_speed (u_
         uint64_t			val64_tx_clk, val64_tx_slot, val64_tx_burst;
         u_int				last_enabled;
 
-
         sc = get_rgmx_softc(port);
         if (!sc) {
             printf(" config_speed didn't find sc int:%u port:%u", iface, port);
@@ -1875,79 +1864,96 @@ static void octeon_rgmx_config_speed (u_
          */
         link_status.word64 = oct_read64(OCTEON_RGMX_RXX_RX_INBND(index, iface));
 
+        RGMX_LOCK(sc);
+
         /*
          * Compre to prev known state. If same then nothing to do.
          */
         if (link_status.word64 == sc->link_status) {
+		RGMX_UNLOCK(sc);
             	return;
         }
-
-        RGMX_LOCK(sc);
-
         old_link_status.word64 = sc->link_status;
 
-        sc->link_status = link_status.word64;
-
-        last_enabled = octeon_rgmx_stop_port(port);
-
-        gmx_cfg.word64 = oct_read64(OCTEON_RGMX_PRTX_CFG(index, iface));
-
-        /*
-         * Duplex
-         */
-        gmx_cfg.bits.duplex = 1;
-
-        switch (link_status.bits.speed) {
-        case 0:	/* 10Mbps */
-            gmx_cfg.bits.speed = 0;
-            gmx_cfg.bits.slottime = 0;
-            val64_tx_clk = 50; val64_tx_slot = 0x40; val64_tx_burst = 0;
-            break;
-        case 1:	/* 100Mbps */
-            gmx_cfg.bits.speed = 0;
-            gmx_cfg.bits.slottime = 0;
-            val64_tx_clk = 5; val64_tx_slot = 0x40; val64_tx_burst = 0;
-            break;
-
-        case 2:	/* 1Gbps */
-            gmx_cfg.bits.speed = 1;
-            gmx_cfg.bits.slottime = 1;
-            val64_tx_clk = 1; val64_tx_slot = 0x200; val64_tx_burst = 0x2000;
-            break;
-
-        case 3:	/* ?? */
-        default:
-            gmx_cfg.bits.speed = 1;
-            gmx_cfg.bits.slottime = 1;
-            val64_tx_clk = 1; val64_tx_slot = 0x200; val64_tx_burst = 0x2000;
-            break;
-        }
-
-        oct_write64(OCTEON_RGMX_TXX_CLK(index, iface), val64_tx_clk);
-        oct_write64(OCTEON_RGMX_TXX_SLOT(index, iface), val64_tx_slot);
-        oct_write64(OCTEON_RGMX_TXX_BURST(index, iface), val64_tx_burst);
-
-        oct_write64(OCTEON_RGMX_PRTX_CFG(index, iface), gmx_cfg.word64);
+	/*
+	 * Compare to previous state modulo link status.  If only link
+	 * status is different, we don't need to change media.
+	 */
+	if (old_link_status.bits.duplex != link_status.bits.duplex ||
+	    old_link_status.bits.speed != link_status.bits.speed) {
+		last_enabled = octeon_rgmx_stop_port(port);
+		
+		gmx_cfg.word64 = oct_read64(OCTEON_RGMX_PRTX_CFG(index, iface));
+
+		/*
+		 * Duplex
+		 * XXX Set based on link_status.bits.duplex?
+		 */
+		gmx_cfg.bits.duplex = 1;
+		
+		switch (link_status.bits.speed) {
+		case 0:	/* 10Mbps */
+			gmx_cfg.bits.speed = 0;
+			gmx_cfg.bits.slottime = 0;
+			val64_tx_clk = 50; val64_tx_slot = 0x40; val64_tx_burst = 0;
+			break;
+
+		case 1:	/* 100Mbps */
+			gmx_cfg.bits.speed = 0;
+			gmx_cfg.bits.slottime = 0;
+			val64_tx_clk = 5; val64_tx_slot = 0x40; val64_tx_burst = 0;
+			break;
+
+		case 2:	/* 1Gbps */
+			gmx_cfg.bits.speed = 1;
+			gmx_cfg.bits.slottime = 1;
+			val64_tx_clk = 1; val64_tx_slot = 0x200; val64_tx_burst = 0x2000;
+			break;
+
+		case 3:	/* ?? */
+		default:
+			gmx_cfg.bits.speed = 1;
+			gmx_cfg.bits.slottime = 1;
+			val64_tx_clk = 1; val64_tx_slot = 0x200; val64_tx_burst = 0x2000;
+			break;
+		}
+
+		oct_write64(OCTEON_RGMX_TXX_CLK(index, iface), val64_tx_clk);
+		oct_write64(OCTEON_RGMX_TXX_SLOT(index, iface), val64_tx_slot);
+		oct_write64(OCTEON_RGMX_TXX_BURST(index, iface), val64_tx_burst);
+		
+		oct_write64(OCTEON_RGMX_PRTX_CFG(index, iface), gmx_cfg.word64);
+		
+		if (last_enabled) octeon_rgmx_start_port(port);
+	}
 
-        if (last_enabled) octeon_rgmx_start_port(port);
+	/*
+	 * Now check and possibly change link status.
+	 */
+	if (link_status.bits.status != old_link_status.bits.status) {
+		if (report_link) {
+			if (link_status.bits.status) {
+				if_link_state_change(sc->ifp, LINK_STATE_UP);
+			} else {
+				if_link_state_change(sc->ifp, LINK_STATE_DOWN);
+			}
+		}
+	}
 
-        if (link_status.bits.status != old_link_status.bits.status) {
+	if (report_link) {
+		sc->link_status = link_status.word64;
+	} else {
+		/*
+		 * We can't update link status proper since we can't
+		 * change it in the interface, so keep the old link
+		 * status intact but note the current speed and duplex
+		 * settings.
+		 */
+		link_status.bits.status = old_link_status.bits.status;
+		sc->link_status = link_status.word64;
+	}
 
-//#define DEBUG_LINESTATUS
-            if (link_status.bits.status) {
-#ifdef DEBUG_LINESTATUS
-                printf(" %u/%u: Interface is now alive\n", iface, port);
-#endif
-                if (report_link)  if_link_state_change(sc->ifp, LINK_STATE_UP);
-            } else {
-#ifdef DEBUG_LINESTATUS
-                printf(" %u/%u: Interface went down\n", iface, port);
-#endif
-                if (report_link)  if_link_state_change(sc->ifp, LINK_STATE_DOWN);
-            }
-        }
         RGMX_UNLOCK(sc);
-
 }
 
 
@@ -2167,7 +2173,6 @@ static void octeon_config_rgmii_port (u_
         gmx_cfg.bits.en = 1;
         oct_write64(OCTEON_RGMX_PRTX_CFG(index, iface), gmx_cfg.word64);
 
-
         octeon_rgmx_config_speed(port, 0);
 
         oct_write64(OCTEON_RGMX_TXX_THRESH(index, iface), 32);

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 09:08:47 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E090106566B;
	Sat, 13 Mar 2010 09:08:47 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211])
	by mx1.freebsd.org (Postfix) with ESMTP id B9F618FC1B;
	Sat, 13 Mar 2010 09:08:46 +0000 (UTC)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id E37C11CFF0; Sat, 13 Mar 2010 10:08:44 +0100 (CET)
Date: Sat, 13 Mar 2010 10:08:44 +0100
From: Ed Schouten 
To: "Carlos A. M. dos Santos" 
Message-ID: <20100313090844.GV8200@hoeg.nl>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="3WayX1FuiCAsk+Ep"
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 09:08:47 -0000


--3WayX1FuiCAsk+Ep
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Carlos A. M. dos Santos  wrote:
> COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
> interpreted as "compatible with FreeBSD 3.2".

That's no problem, since COMPAT_FREEBSD%d was already a misnomer. It
would have been a lot better if it were replaced by a numerical
definition:

options	COMPAT_FREEBSD_MAJOR=3D7

--=20
 Ed Schouten 
 WWW: http://80386.nl/

--3WayX1FuiCAsk+Ep
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkubVhwACgkQ52SDGA2eCwVICwCfezd6NoXy4+zdtL9miZ8lPdWW
U0QAn3SzQ+c9dX/Ejgl4nAoWCELUfPto
=gk7K
-----END PGP SIGNATURE-----

--3WayX1FuiCAsk+Ep--

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 09:21:03 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19C90106566C;
	Sat, 13 Mar 2010 09:21:03 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8FF748FC08;
	Sat, 13 Mar 2010 09:21:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2D9L0CH076303;
	Sat, 13 Mar 2010 09:21:00 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2D9L0iZ076264;
	Sat, 13 Mar 2010 09:21:00 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003130921.o2D9L0iZ076264@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 13 Mar 2010 09:21: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: r205116 - in head/sys: amd64/conf i386/conf ia64/conf
	pc98/conf powerpc/conf sparc64/conf sun4v/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 09:21:03 -0000

Author: ed
Date: Sat Mar 13 09:21:00 2010
New Revision: 205116
URL: http://svn.freebsd.org/changeset/base/205116

Log:
  Remove COMPAT_43TTY from stock kernel configuration files.
  
  COMPAT_43TTY enables the sgtty interface. Even though its exposure has
  only been removed in FreeBSD 8.0, it wasn't used by anything in the base
  system in FreeBSD 5.x (possibly even 4.x?). On those releases, if your
  ports/packages are less than two years old, they will prefer termios
  over sgtty.

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/amd64/conf/XENHVM
  head/sys/i386/conf/GENERIC
  head/sys/i386/conf/XEN
  head/sys/ia64/conf/GENERIC
  head/sys/pc98/conf/GENERIC
  head/sys/powerpc/conf/GENERIC
  head/sys/sparc64/conf/GENERIC
  head/sys/sun4v/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/amd64/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -44,7 +44,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5

Modified: head/sys/amd64/conf/XENHVM
==============================================================================
--- head/sys/amd64/conf/XENHVM	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/amd64/conf/XENHVM	Sat Mar 13 09:21:00 2010	(r205116)
@@ -45,7 +45,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/i386/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -46,7 +46,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6

Modified: head/sys/i386/conf/XEN
==============================================================================
--- head/sys/i386/conf/XEN	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/i386/conf/XEN	Sat Mar 13 09:21:00 2010	(r205116)
@@ -31,7 +31,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/ia64/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -27,7 +27,6 @@ makeoptions	DEBUG=-g	# Build kernel with
 
 options 	AUDIT		# Security event auditing
 options 	CD9660		# ISO 9660 Filesystem
-options 	COMPAT_43TTY	# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD6	# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
 options 	DDB		# Support DDB

Modified: head/sys/pc98/conf/GENERIC
==============================================================================
--- head/sys/pc98/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/pc98/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -46,7 +46,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6

Modified: head/sys/powerpc/conf/GENERIC
==============================================================================
--- head/sys/powerpc/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/powerpc/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -47,7 +47,6 @@ options 	PROCFS			#Process filesystem (r
 options 	PSEUDOFS		#Pseudo-filesystem framework
 options 	GEOM_PART_GPT		#GUID Partition Tables.
 options 	GEOM_LABEL		#Provides labelization
-options 	COMPAT_43TTY		#BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD4		#Keep this for a while
 options 	COMPAT_FREEBSD5		#Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		#Compatible with FreeBSD6

Modified: head/sys/sparc64/conf/GENERIC
==============================================================================
--- head/sys/sparc64/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/sparc64/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -47,7 +47,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
 options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7

Modified: head/sys/sun4v/conf/GENERIC
==============================================================================
--- head/sys/sun4v/conf/GENERIC	Sat Mar 13 04:55:47 2010	(r205115)
+++ head/sys/sun4v/conf/GENERIC	Sat Mar 13 09:21:00 2010	(r205116)
@@ -51,7 +51,6 @@ options 	PROCFS			# Process filesystem (
 options 	PSEUDOFS		# Pseudo-filesystem framework
 options 	GEOM_PART_GPT		# GUID Partition Tables.
 options 	GEOM_LABEL		# Provides labelization
-options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
 options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
 options 	KTRACE			# ktrace(1) support
 options 	STACK			# stack(9) support

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 09:30:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19071106566C;
	Sat, 13 Mar 2010 09:30:15 +0000 (UTC)
	(envelope-from linimon@lonesome.com)
Received: from mail.soaustin.net (lefty.soaustin.net [66.135.55.46])
	by mx1.freebsd.org (Postfix) with ESMTP id E04F58FC08;
	Sat, 13 Mar 2010 09:30:14 +0000 (UTC)
Received: by mail.soaustin.net (Postfix, from userid 502)
	id E4A138C078; Sat, 13 Mar 2010 03:30:08 -0600 (CST)
Date: Sat, 13 Mar 2010 03:30:08 -0600
From: Mark Linimon 
To: "Carlos A. M. dos Santos" 
Message-ID: <20100313093008.GA14919@lonesome.com>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.18 (2008-05-17)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Rui Paulo ,
	Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
	sys/amd64/conf sys/amd64/include sys/amd64/linux32
	sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs
	sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 09:30:15 -0000

On Fri, Mar 12, 2010 at 11:53:46PM -0300, Carlos A. M. dos Santos wrote:
> Thanks God we have you, the holy committers to protect us from our
> own ignorance.

Please remember that in most cases, FreeBSD committers do so merely for
the feeling of a "job well done".  Rhetoric like this takes away part of
that motivation, and doesn't add anything constructive.

mcl

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 10:28:14 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id C878F1065670; Sat, 13 Mar 2010 10:28:14 +0000 (UTC)
Date: Sat, 13 Mar 2010 10:28:14 +0000
From: Alexey Dokuchaev 
To: Mark Linimon 
Message-ID: <20100313102814.GA80249@FreeBSD.org>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	
	<20100313093008.GA14919@lonesome.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <20100313093008.GA14919@lonesome.com>
User-Agent: Mutt/1.4.2.1i
Cc: "Carlos A. M. dos Santos" , src-committers@freebsd.org,
	Rui Paulo , svn-src-all@freebsd.org,
	Nathan Whitehorn , svn-src-head@freebsd.org
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
	sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
	sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf
	sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 10:28:14 -0000

On Sat, Mar 13, 2010 at 03:30:08AM -0600, Mark Linimon wrote:
> On Fri, Mar 12, 2010 at 11:53:46PM -0300, Carlos A. M. dos Santos wrote:
> > Thanks God we have you, the holy committers to protect us from our
> > own ignorance.
> 
> Please remember that in most cases, FreeBSD committers do so merely for
> the feeling of a "job well done".  Rhetoric like this takes away part of
> that motivation, and doesn't add anything constructive.

Plus it's way often simply not true.

./danfe

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 11:08:57 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DABEF106564A;
	Sat, 13 Mar 2010 11:08:57 +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 C98B38FC1B;
	Sat, 13 Mar 2010 11: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 o2DB8vou001456;
	Sat, 13 Mar 2010 11:08:57 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DB8vmu001454;
	Sat, 13 Mar 2010 11:08:57 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201003131108.o2DB8vmu001454@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 13 Mar 2010 11:08: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: r205118 - head/sbin/sysctl
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 11:08:58 -0000

Author: brucec
Date: Sat Mar 13 11:08:57 2010
New Revision: 205118
URL: http://svn.freebsd.org/changeset/base/205118

Log:
  Free the memory allocated via strdup.
  
  PR:		bin/113881
  Submitted by:	Alexander Drozdov  dzal_mail mtu-net.ru
  Approved by:	rrs (mentor)
  MFC after:	1 week

Modified:
  head/sbin/sysctl/sysctl.c

Modified: head/sbin/sysctl/sysctl.c
==============================================================================
--- head/sbin/sysctl/sysctl.c	Sat Mar 13 11:06:47 2010	(r205117)
+++ head/sbin/sysctl/sysctl.c	Sat Mar 13 11:08:57 2010	(r205118)
@@ -382,6 +382,7 @@ S_timeval(int l2, void *p)
 		if (*p2 == '\n')
 			*p2 = '\0';
 	fputs(p1, stdout);
+	free(p1);
 	return (0);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 11:17:40 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 372C6106566B;
	Sat, 13 Mar 2010 11:17: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 263E28FC13;
	Sat, 13 Mar 2010 11:17: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 o2DBHekM003412;
	Sat, 13 Mar 2010 11:17:40 GMT (envelope-from brucec@svn.freebsd.org)
Received: (from brucec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DBHek2003410;
	Sat, 13 Mar 2010 11:17:40 GMT (envelope-from brucec@svn.freebsd.org)
Message-Id: <201003131117.o2DBHek2003410@svn.freebsd.org>
From: Bruce Cran 
Date: Sat, 13 Mar 2010 11:17: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: r205119 - head/contrib/top
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 11:17:40 -0000

Author: brucec
Date: Sat Mar 13 11:17:39 2010
New Revision: 205119
URL: http://svn.freebsd.org/changeset/base/205119

Log:
  Change the 'amt' parameter in format_k2 from int to unsigned long long
  to match the values passed in and prevent the SIZE field being corrupted
  when more than 2TB is allocated.
  
  PR:		bin/129706
  Approved by:	rrs (mentor)
  MFC after:	1 week

Modified:
  head/contrib/top/utils.c

Modified: head/contrib/top/utils.c
==============================================================================
--- head/contrib/top/utils.c	Sat Mar 13 11:08:57 2010	(r205118)
+++ head/contrib/top/utils.c	Sat Mar 13 11:17:39 2010	(r205119)
@@ -476,7 +476,7 @@ int amt;
 
 char *format_k2(amt)
 
-int amt;
+unsigned long long amt;
 
 {
     static char retarray[NUM_STRINGS][16];

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 11:51:19 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD5E1106566B;
	Sat, 13 Mar 2010 11:51:18 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBD848FC15;
	Sat, 13 Mar 2010 11:51: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 o2DBpIL8010804;
	Sat, 13 Mar 2010 11:51:18 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DBpIUA010800;
	Sat, 13 Mar 2010 11:51:18 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <201003131151.o2DBpIUA010800@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 13 Mar 2010 11:51: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: r205120 - head/sys/dev/drm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 11:51:19 -0000

Author: rnoland
Date: Sat Mar 13 11:51:18 2010
New Revision: 205120
URL: http://svn.freebsd.org/changeset/base/205120

Log:
  Add support for Intel Pineview chips, aka IGD
  
  Slightly modified version of the submitted patch.
  
  PR:		143427
  Submitted by:	Mamoru Sumida 
  MFC after:	3 days

Modified:
  head/sys/dev/drm/drm_pciids.h
  head/sys/dev/drm/i915_drv.h
  head/sys/dev/drm/i915_reg.h

Modified: head/sys/dev/drm/drm_pciids.h
==============================================================================
--- head/sys/dev/drm/drm_pciids.h	Sat Mar 13 11:17:39 2010	(r205119)
+++ head/sys/dev/drm/drm_pciids.h	Sat Mar 13 11:51:18 2010	(r205120)
@@ -549,7 +549,9 @@
 	{0x8086, 0x29B2, CHIP_I9XX|CHIP_I915, "Intel Q35"}, \
 	{0x8086, 0x29D2, CHIP_I9XX|CHIP_I915, "Intel Q33"}, \
 	{0x8086, 0x2A42, CHIP_I9XX|CHIP_I965, "Mobile Intel® GM45 Express Chipset"}, \
-	{0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Integrated Graphics Device"}, \
+	{0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Eaglelake"}, \
+	{0x8086, 0xA001, CHIP_I9XX|CHIP_I965, "Intel Pineview"}, \
+	{0x8086, 0xA011, CHIP_I9XX|CHIP_I965, "Intel Pineview (M)"}, \
 	{0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, "Intel Q45/Q43"}, \
 	{0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, "Intel G45/G43"}, \
 	{0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \

Modified: head/sys/dev/drm/i915_drv.h
==============================================================================
--- head/sys/dev/drm/i915_drv.h	Sat Mar 13 11:17:39 2010	(r205119)
+++ head/sys/dev/drm/i915_drv.h	Sat Mar 13 11:51:18 2010	(r205120)
@@ -657,15 +657,21 @@ extern int i915_wait_ring(struct drm_dev
 		     (dev)->pci_device == 0x2E32 || \
 		     IS_GM45(dev))
 
+#define IS_IGDG(dev) ((dev)->pci_device == 0xa001)
+#define IS_IGDGM(dev) ((dev)->pci_device == 0xa011)
+#define IS_IGD(dev) (IS_IGDG(dev) || IS_IGDGM(dev))
+
 #define IS_G33(dev)    ((dev)->pci_device == 0x29C2 ||	\
 			(dev)->pci_device == 0x29B2 ||	\
-			(dev)->pci_device == 0x29D2)
+			(dev)->pci_device == 0x29D2 ||  \
+			IS_IGD(DEV))
 
 #define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(dev) || \
 		      IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))
 
 #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
-			IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
+			IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \
+			IS_IGD(dev))
 
 #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
 

Modified: head/sys/dev/drm/i915_reg.h
==============================================================================
--- head/sys/dev/drm/i915_reg.h	Sat Mar 13 11:17:39 2010	(r205119)
+++ head/sys/dev/drm/i915_reg.h	Sat Mar 13 11:51:18 2010	(r205120)
@@ -362,6 +362,7 @@ __FBSDID("$FreeBSD$");
 #define   DPLLB_LVDS_P2_CLOCK_DIV_7	(1 << 24) /* i915 */
 #define   DPLL_P2_CLOCK_DIV_MASK	0x03000000 /* i915 */
 #define   DPLL_FPA01_P1_POST_DIV_MASK	0x00ff0000 /* i915 */
+#define   DPLL_FPA01_P1_POST_DIV_MASK_IGD 0x00ff8000 /* IGD */
 
 #define I915_FIFO_UNDERRUN_STATUS		(1UL<<31)
 #define I915_CRC_ERROR_ENABLE			(1UL<<29)
@@ -438,6 +439,7 @@ __FBSDID("$FreeBSD$");
  */
 #define   DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS	0x003f0000
 #define   DPLL_FPA01_P1_POST_DIV_SHIFT	16
+#define   DPLL_FPA01_P1_POST_DIV_SHIFT_IGD	15
 /* i830, required in DVO non-gang */
 #define   PLL_P2_DIVIDE_BY_4		(1 << 23)
 #define   PLL_P1_DIVIDE_BY_TWO		(1 << 21) /* i830 */
@@ -504,10 +506,12 @@ __FBSDID("$FreeBSD$");
 #define FPB0	0x06048
 #define FPB1	0x0604c
 #define   FP_N_DIV_MASK		0x003f0000
+#define   FP_N_IGD_DIV_MASK	0x00ff0000
 #define   FP_N_DIV_SHIFT		16
 #define   FP_M1_DIV_MASK	0x00003f00
 #define   FP_M1_DIV_SHIFT		 8
 #define   FP_M2_DIV_MASK	0x0000003f
+#define   FP_M2_IGD_DIV_MASK	0x000000ff
 #define   FP_M2_DIV_SHIFT		 0
 #define DPLL_TEST	0x606c
 #define   DPLLB_TEST_SDVO_DIV_1		(0 << 22)

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 12:02:44 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9EB1F1065676;
	Sat, 13 Mar 2010 12:02:44 +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 8DD488FC25;
	Sat, 13 Mar 2010 12:02: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 o2DC2iCd013361;
	Sat, 13 Mar 2010 12:02:44 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DC2icf013359;
	Sat, 13 Mar 2010 12:02:44 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201003131202.o2DC2icf013359@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Sat, 13 Mar 2010 12:02: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: r205121 - head/etc/rc.d
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 12:02:44 -0000

Author: jh
Date: Sat Mar 13 12:02:44 2010
New Revision: 205121
URL: http://svn.freebsd.org/changeset/base/205121

Log:
  Use an unique directory name instead of hardcoded /tmp/.diskless.
  A malicious user could create a file named /tmp/.diskless and cause
  the script to misbehave.
  
  PR:		conf/141258
  Reported by:	Jon Passki
  MFC after:	1 week

Modified:
  head/etc/rc.d/tmp

Modified: head/etc/rc.d/tmp
==============================================================================
--- head/etc/rc.d/tmp	Sat Mar 13 11:51:18 2010	(r205120)
+++ head/etc/rc.d/tmp	Sat Mar 13 12:02:44 2010	(r205121)
@@ -51,8 +51,8 @@ case "${tmpmfs}" in
 [Nn][Oo])
 	;;
 *)
-	if /bin/mkdir -p /tmp/.diskless 2> /dev/null; then
-		rmdir /tmp/.diskless
+	if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
+		rmdir ${_tmpdir}
 	else
 		if [ -h /tmp ]; then
 			echo "*** /tmp is a symlink to a non-writable area!"

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 12:05:15 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 216321065673;
	Sat, 13 Mar 2010 12:05:15 +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 AAF528FC1D;
	Sat, 13 Mar 2010 12:05:14 +0000 (UTC)
Received: from c220-239-227-59.carlnfd1.nsw.optusnet.com.au
	(c220-239-227-59.carlnfd1.nsw.optusnet.com.au [220.239.227.59])
	by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o2DC5BYn010034
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 13 Mar 2010 23:05:12 +1100
Date: Sat, 13 Mar 2010 23:05:11 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@delplex.bde.org
To: Pyun YongHyeon 
In-Reply-To: <201003121818.o2CII4ri076014@svn.freebsd.org>
Message-ID: <20100313222131.K22847@delplex.bde.org>
References: <201003121818.o2CII4ri076014@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: r205090 - head/sys/dev/bge
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 12:05:15 -0000

On Fri, 12 Mar 2010, Pyun YongHyeon wrote:

> Log:
>  Reorder interrupt handler a bit such that producer/consumer
>  index of status block is read first before acknowledging the
>  interrupts. Otherwise bge(4) may get stale status block as
>  acknowledging an interrupt may yield another status block update.
>
>  Reviewed by:	marius

Er, doesn't this give a race instead?  It undoes a critical part of
rev.1.169 but not the comment part which still says that the ack is
done first, and why (to ensure getting another interrupt if the status
block changes after we have looked at it).

% 	/*
% 	 * Do the mandatory PCI flush as well as get the link status.
% 	 */
% 	statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
% 
% 	/* Make sure the descriptor ring indexes are coherent. */
% 	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
% 	    sc->bge_cdata.bge_status_map,
% 	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
% 	rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx;
% 	tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx;
% 	sc->bge_ldata.bge_status_block->bge_status = 0;
% 	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
% 	    sc->bge_cdata.bge_status_map,
% 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);

The above presumably gives sufficiently coherent accesses to the status
block, but what happens if a status update occurs now (before the ack).
Doesn't the ack prevent an interrupt for this status update?  I think
tx_prod and tx cons (read above) don't become stale since they are only
advanced by software, and we may processes tx and rx descriptors beyond
the ones reported by status updates before or after the ack, but
statusword (read above) does become stale.

% 
% 	/*
% 	 * Ack the interrupt by writing something to BGE_MBX_IRQ0_LO.  Don't
% 	 * disable interrupts by writing nonzero like we used to, since with
% 	 * our current organization this just gives complications and
% 	 * pessimizations for re-enabling interrupts.  We used to have races
% 	 * instead of the necessary complications.  Disabling interrupts

I don't remember seeing races with the current order, but I seem to
remember seeing them when the ack was the last hardware thing in the
function.  As described in detail below, the latter gives quite a
large race window so it is easy to miss an interrupt.

% 	 * would just reduce the chance of a status update while we are
% 	 * running (by switching to the interrupt-mode coalescence
% 	 * parameters), but this chance is already very low so it is more
% 	 * efficient to get another interrupt than prevent it.

This describes why it doesn't matter if we get an extra interrupt due to
the status block being updated after the ack, even in rev.1.168 when the
race window was much larger (it was the entire runtime of bge_intr(),
which can be several hundred uS; now it is several hundred nS).

% 	 *
% 	 * We do the ack first to ensure another interrupt if there is a
% 	 * status update after the ack.  We don't check for the status

But we don't do the ack first any more.

% 	 * changing later because it is more efficient to get another
% 	 * interrupt than prevent it, not quite as above (not checking is
% 	 * a smaller optimization than not toggling the interrupt enable,
% 	 * since checking doesn't involve PCI accesses and toggling require
% 	 * the status check).  So toggling would probably be a pessimization
% 	 * even with MSI.  It would only be needed for using a task queue.
% 	 */
% 	bge_writembx(sc, BGE_MBX_IRQ0_LO, 0);

Bruce

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 12:58:39 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 672FC106571D;
	Sat, 13 Mar 2010 12:58:39 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 3C8F28FC12;
	Sat, 13 Mar 2010 12:58:39 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id B060C46B65;
	Sat, 13 Mar 2010 07:58:38 -0500 (EST)
Date: Sat, 13 Mar 2010 12:58:38 +0000 (GMT)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: Randall Stewart 
In-Reply-To: <201003122258.o2CMwqDM039077@svn.freebsd.org>
Message-ID: 
References: <201003122258.o2CMwqDM039077@svn.freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet
 netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 12:58:39 -0000


On Fri, 12 Mar 2010, Randall Stewart wrote:

>  The proper fix for the delayed SCTP checksum is to
>  have the delayed function take an argument as to the offset
>  to the SCTP header. This allows it to work for V4 and V6.
>  This of course means changing all callers of the function
>  to either pass the header len, if they have it, or create
>  it (ip_hl << 2 or sizeof(ip6_hdr)).

It will become harder to MFC SCTP changes like this in the future, BTW.  It's 
only good (bad) luck that this change doesn't break the KBI depended on by the 
ipdivert module.  If SCTP had been enabled in the module (which it probably 
should be, with options SCTP in GENERIC), then the module would be broken, 
meaning that we couldn't MFC this change as-is.

After MFCing this change, I recommend fixing ipdivert, but also increased 
caution in changing kernel interfaces that may be depended on by modules...

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 13:04:28 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EB544106566B;
	Sat, 13 Mar 2010 13:04:28 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id BDCA18FC19;
	Sat, 13 Mar 2010 13:04:28 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id 6F9DF46B6C;
	Sat, 13 Mar 2010 08:04:28 -0500 (EST)
Date: Sat, 13 Mar 2010 13:04:28 +0000 (GMT)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: Rui Paulo 
In-Reply-To: <43586297-42AF-46F7-9B55-6A9BADD78752@freebsd.org>
Message-ID: 
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org>
	
	<43586297-42AF-46F7-9B55-6A9BADD78752@freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Nathan Whitehorn 
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf
 sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32
 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 13:04:29 -0000


On Sat, 13 Mar 2010, Rui Paulo wrote:

>>> There's a lengthy discussion about this on another mailing list.
>>> 
>>> This is unlikely to be changed and emailing the committer who provided 
>>> valuable time on this code wastes his time and everyone else's.
>> 
>> So the user - the person to whom the software is made, theoretically - 
>> don't have the right to disagree when he sees a change that looks confusing 
>> "because the committers's time is too valuable". Sorry, I was not aware of 
>> that policy. Please forgive my audacity. Keep in mind that we, the users, 
>> are a bunch of idiots that don't like to become astonished by sudden 
>> changes in the meaning of the symbols that we use to see. Thanks God we 
>> have you, the holly committers to protect us from our own ignorance.
>
> You said that, I didn't. Please refrain from distorting my own words. If you 
> want something discussed, do it on the other list and, please, do it with a 
> grown up attitude because, quite frankly, what you wrote doesn't make sense.

Guys, this is getting out of hand.  All three messages in this thread were 
over the top, and a step back would be healthy at this point.  Please assume 
that everyone involved here is a reasonable person, and that the origin of 
this disagreement lies in miscommunication: Rui assumed Carlos saw the 
(extensive) original thread and wasn't letting it die, and most likely Carlos 
never saw the thread and now feels unfairly accused.  I certainly missed the 
original thread myself, and was a bit taken aback by Rui's reply until I 
managed to dig it up and see more context.  Continuing the discussion any 
further would be unproductive, in this light.  So, please, give it a rest.

Robert

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 13:20:09 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20633106566C;
	Sat, 13 Mar 2010 13:20:09 +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 AA2168FC19;
	Sat, 13 Mar 2010 13:20:08 +0000 (UTC)
Received: from localhost (amavis.fra.cksoft.de [192.168.74.71])
	by mail.cksoft.de (Postfix) with ESMTP id 13BED41C712;
	Sat, 13 Mar 2010 14:20: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 fqaNJzjwFPdZ; Sat, 13 Mar 2010 14:20:06 +0100 (CET)
Received: by mail.cksoft.de (Postfix, from userid 66)
	id 4872441C707; Sat, 13 Mar 2010 14:20: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 D9CB04448EC;
	Sat, 13 Mar 2010 13:17:40 +0000 (UTC)
Date: Sat, 13 Mar 2010 13:17:40 +0000 (UTC)
From: "Bjoern A. Zeeb" 
X-X-Sender: bz@maildrop.int.zabbadoz.net
To: Kip Macy 
In-Reply-To: <201003121926.o2CJQjYD091277@svn.freebsd.org>
Message-ID: <20100313131617.X33454@maildrop.int.zabbadoz.net>
References: <201003121926.o2CJQjYD091277@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: r205093 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 13:20:09 -0000

On Fri, 12 Mar 2010, Kip Macy wrote:

> Author: kmacy
> Date: Fri Mar 12 19:26:45 2010
> New Revision: 205093
> URL: http://svn.freebsd.org/changeset/base/205093
>
> Log:
>  re-update copyright to 2010
>  pointed out by danfe@
>
> Modified:
>  head/sys/net/flowtable.c
>
> Modified: head/sys/net/flowtable.c
> ==============================================================================
> --- head/sys/net/flowtable.c	Fri Mar 12 19:14:58 2010	(r205092)
> +++ head/sys/net/flowtable.c	Fri Mar 12 19:26:45 2010	(r205093)
> @@ -1,6 +1,6 @@
> /**************************************************************************
>
> -Copyright (c) 2008-2009, BitGravity Inc.
> +Copyright (c) 2008-2010, BitGravity Inc.
> All rights reserved.
>
> Redistribution and use in source and binary forms, with or without
>

Can wwe get the license to be formated like basically every license in
our non-contrib tree is?  It would be great if BitGravity Inc. would
consider this.  Thanks.

-- 
Bjoern A. Zeeb         It will not break if you know what you are doing.

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 13:51:02 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51F881065673;
	Sat, 13 Mar 2010 13:51:02 +0000 (UTC)
	(envelope-from rrs@lakerest.net)
Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d])
	by mx1.freebsd.org (Postfix) with ESMTP id D57EB8FC19;
	Sat, 13 Mar 2010 13:51:01 +0000 (UTC)
Received: from [10.10.1.82] (s224.GtokyoFL6.vectant.ne.jp [222.228.90.224])
	(authenticated bits=0)
	by lakerest.net (8.14.3/8.14.3) with ESMTP id o2DDovsJ059939
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
	Sat, 13 Mar 2010 08:51:00 -0500 (EST)
	(envelope-from rrs@lakerest.net)
Message-Id: <2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net>
From: Randall Stewart 
To: Robert Watson 
In-Reply-To: 
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Sat, 13 Mar 2010 22:50:56 +0900
References: <201003122258.o2CMwqDM039077@svn.freebsd.org>
	
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet
	netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 13:51:02 -0000

Hmm.

did not think of that.. we COULD possible do it another way.. a bit  
harder
but possible.. i.e. have the delayed sack code actually look into
the mbufs and see if its ipv4 or ipv6.. I thought about doing it
that way but it takes more cycles ;-o

I could refactor that this way if you want... it would mean a few more  
de-ref's and
looking to see if its a v4 or v6 packet and then doing the proper  
offset...

not to bad but awkward ;-0

R

On Mar 13, 2010, at 9:58 PM, Robert Watson wrote:

>
> On Fri, 12 Mar 2010, Randall Stewart wrote:
>
>> The proper fix for the delayed SCTP checksum is to
>> have the delayed function take an argument as to the offset
>> to the SCTP header. This allows it to work for V4 and V6.
>> This of course means changing all callers of the function
>> to either pass the header len, if they have it, or create
>> it (ip_hl << 2 or sizeof(ip6_hdr)).
>
> It will become harder to MFC SCTP changes like this in the future,  
> BTW.  It's only good (bad) luck that this change doesn't break the  
> KBI depended on by the ipdivert module.  If SCTP had been enabled in  
> the module (which it probably should be, with options SCTP in  
> GENERIC), then the module would be broken, meaning that we couldn't  
> MFC this change as-is.
>
> After MFCing this change, I recommend fixing ipdivert, but also  
> increased caution in changing kernel interfaces that may be depended  
> on by modules...
>
> Robert N M Watson
> Computer Laboratory
> University of Cambridge
>

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)


From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 13:53:39 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2CE781065674;
	Sat, 13 Mar 2010 13:53:39 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 054428FC0C;
	Sat, 13 Mar 2010 13:53:39 +0000 (UTC)
Received: from [192.168.2.102] (host86-180-59-125.range86-180.btcentralplus.com
	[86.180.59.125])
	by cyrus.watson.org (Postfix) with ESMTPSA id C914946B6C;
	Sat, 13 Mar 2010 08:53:37 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" 
In-Reply-To: <2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net>
Date: Sat, 13 Mar 2010 13:53:36 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <92C0A9B0-9297-4F56-A6A1-603006423230@FreeBSD.org>
References: <201003122258.o2CMwqDM039077@svn.freebsd.org>
	
	<2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net>
To: Randall Stewart 
X-Mailer: Apple Mail (2.1077)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet
	netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 13:53:39 -0000


On Mar 13, 2010, at 1:50 PM, Randall Stewart wrote:

> did not think of that.. we COULD possible do it another way.. a bit =
harder
> but possible.. i.e. have the delayed sack code actually look into
> the mbufs and see if its ipv4 or ipv6.. I thought about doing it
> that way but it takes more cycles ;-o
>=20
> I could refactor that this way if you want... it would mean a few more =
de-ref's and
> looking to see if its a v4 or v6 packet and then doing the proper =
offset...
>=20
> not to bad but awkward ;-0

Well, I think what I was trying to get across more is that this change =
is OK to merge, but only because you were lucky (or, more arguably, =
there is a Makefile bug). So the best advice is to future-proof =
yourself: keep very close tabs on the use of SCTP symbols and =
definitions outside of the core code, especially in modules, and make =
sure you're entirely happy with KPI/KBI exposures from inception.

Robert=

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 13:57:01 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D32B81065673;
	Sat, 13 Mar 2010 13:57:01 +0000 (UTC)
	(envelope-from bms@incunabulum.net)
Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com
	[66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 999338FC1F;
	Sat, 13 Mar 2010 13:57:01 +0000 (UTC)
Received: from compute2.internal (compute2 [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id 995FDBEF23;
	Sat, 13 Mar 2010 08:57:00 -0500 (EST)
Received: from heartbeat2.messagingengine.com ([10.202.2.161])
	by compute2.internal (MEProxy); Sat, 13 Mar 2010 08:57:00 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
	h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding;
	s=smtpout; bh=iHQELKOc6OJVSpsVzkO80preu80=;
	b=CPvXxnW9PfymuKX9fSuZ13tfwTUmY/qv4+d7KmzHwO/0PDHdauzBF0Oai6SrLEPrFMjf/7CaSRPMgG0K9S3H0WlotUpWhY8e7RDyKRAmEZIYCHHzIaTFg679Bu9n4QKTU7EHGTAnsq6lGH5s99fnjUCuugM1bhKRv/APVs2V1TE=
X-Sasl-enc: GY8T1ikfoFr3FRkofp1LIuQT7OqpR6SIJTARODcfZbd7 1268488620
Received: from anglepoise.lon.incunabulum.net
	(cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id DC2CA79E8;
	Sat, 13 Mar 2010 08:56:59 -0500 (EST)
Message-ID: <4B9B99A9.7040904@incunabulum.net>
Date: Sat, 13 Mar 2010 13:56:57 +0000
From: Bruce Simpson 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.1.8) Gecko/20100302 Thunderbird/3.0.3
MIME-Version: 1.0
To: "Robert N. M. Watson" 
References: <201003122258.o2CMwqDM039077@svn.freebsd.org>
	
	<2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net>
	<92C0A9B0-9297-4F56-A6A1-603006423230@FreeBSD.org>
In-Reply-To: <92C0A9B0-9297-4F56-A6A1-603006423230@FreeBSD.org>
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, Randall Stewart 
Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet
	netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 13:57:01 -0000

On 03/13/10 13:53, Robert N. M. Watson wrote:
> On Mar 13, 2010, at 1:50 PM, Randall Stewart wrote:
>    
>> I could refactor that this way if you want... it would mean a few more de-ref's and
>> looking to see if its a v4 or v6 packet and then doing the proper offset...
>>      

This is the sort of thing which M_PROTO* flags are good for.

Derefs in the hot path should be amortized whenever that makes sense.


From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 15:10:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 627C0106564A;
	Sat, 13 Mar 2010 15:10:07 +0000 (UTC)
	(envelope-from jkoshy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 531438FC17;
	Sat, 13 Mar 2010 15:10: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 o2DFA7hD054542;
	Sat, 13 Mar 2010 15:10:07 GMT (envelope-from jkoshy@svn.freebsd.org)
Received: (from jkoshy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DFA7PN054540;
	Sat, 13 Mar 2010 15:10:07 GMT (envelope-from jkoshy@svn.freebsd.org)
Message-Id: <201003131510.o2DFA7PN054540@svn.freebsd.org>
From: Joseph Koshy 
Date: Sat, 13 Mar 2010 15:10: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: r205122 - head/sys/sys
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 15:10:07 -0000

Author: jkoshy
Date: Sat Mar 13 15:10:07 2010
New Revision: 205122
URL: http://svn.freebsd.org/changeset/base/205122

Log:
  Correct a typo.
  
  Submitted by:	Rahul Saxena 

Modified:
  head/sys/sys/pmc.h

Modified: head/sys/sys/pmc.h
==============================================================================
--- head/sys/sys/pmc.h	Sat Mar 13 12:02:44 2010	(r205121)
+++ head/sys/sys/pmc.h	Sat Mar 13 15:10:07 2010	(r205122)
@@ -298,7 +298,7 @@ enum pmc_event {
 	__PMC_OP(PMCRW, "Read/Set a PMC")				\
 	__PMC_OP(PMCSETCOUNT, "Set initial count/sampling rate")	\
 	__PMC_OP(PMCSTART, "Start a PMC")				\
-	__PMC_OP(PMCSTOP, "Start a PMC")				\
+	__PMC_OP(PMCSTOP, "Stop a PMC")					\
 	__PMC_OP(WRITELOG, "Write a cookie to the log file")
 
 

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 16:11:49 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 74C8B106564A;
	Sat, 13 Mar 2010 16:11:49 +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 32EF28FC18;
	Sat, 13 Mar 2010 16:11:49 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2DG71MR084375;
	Sat, 13 Mar 2010 09:07:01 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sat, 13 Mar 2010 09:07:09 -0700 (MST)
Message-Id: <20100313.090709.407454645627448944.imp@bsdimp.com>
To: ed@80386.nl
From: "M. Warner Losh" 
In-Reply-To: <20100313090844.GV8200@hoeg.nl>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<20100313090844.GV8200@hoeg.nl>
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: unixmania@gmail.com, svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG, nwhitehorn@FreeBSD.ORG
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 16:11:49 -0000

In message: <20100313090844.GV8200@hoeg.nl>
            Ed Schouten  writes:
: * Carlos A. M. dos Santos  wrote:
: > COMPAT_FREEBSD32 is an unfortunate choice. It can be easily
: > interpreted as "compatible with FreeBSD 3.2".
: 
: That's no problem, since COMPAT_FREEBSD%d was already a misnomer. It
: would have been a lot better if it were replaced by a numerical
: definition:
: 
: options	COMPAT_FREEBSD_MAJOR=7

that sounds like a good idea.  But it isn't as simple as changing all
the COMPAT_FREEBSDX in the .c code.  There's also hooks in the syscall
glue generation that would be affected.

Warner

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 17:07:27 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 036751065675;
	Sat, 13 Mar 2010 17:07:27 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211])
	by mx1.freebsd.org (Postfix) with ESMTP id 918178FC14;
	Sat, 13 Mar 2010 17:07:26 +0000 (UTC)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id A19B81CFF0; Sat, 13 Mar 2010 18:07:25 +0100 (CET)
Date: Sat, 13 Mar 2010 18:07:25 +0100
From: Ed Schouten 
To: "M. Warner Losh" 
Message-ID: <20100313170725.GW8200@hoeg.nl>
References: <201003111449.o2BEn6QY069179@svn.freebsd.org>
	
	<20100313090844.GV8200@hoeg.nl>
	<20100313.090709.407454645627448944.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="c6PwFT7lAb8+fY2S"
Content-Disposition: inline
In-Reply-To: <20100313.090709.407454645627448944.imp@bsdimp.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: unixmania@gmail.com, svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG, nwhitehorn@FreeBSD.ORG
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 17:07:27 -0000


--c6PwFT7lAb8+fY2S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* M. Warner Losh  wrote:
> that sounds like a good idea.  But it isn't as simple as changing all
> the COMPAT_FREEBSDX in the .c code.  There's also hooks in the syscall
> glue generation that would be affected.

Hmmm... Indeed.

I thought a bit more about this and I realized it would be better if we
wouldn't use a FreeBSD major number for this, but the actual
__FreeBSD_version.

--=20
 Ed Schouten 
 WWW: http://80386.nl/

--c6PwFT7lAb8+fY2S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkubxk0ACgkQ52SDGA2eCwW0DgCdGFgJuwd1UEfdGprpqSxHlSSd
JowAn1Tc+hFQWgT6lg1ZcCMSAjxWE9v9
=tT2C
-----END PGP SIGNATURE-----

--c6PwFT7lAb8+fY2S--

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 18:06:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 186811065670;
	Sat, 13 Mar 2010 18:06:18 +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 075628FC16;
	Sat, 13 Mar 2010 18:06: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 o2DI6H0O093279;
	Sat, 13 Mar 2010 18:06:17 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DI6Hik093273;
	Sat, 13 Mar 2010 18:06:17 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201003131806.o2DI6Hik093273@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 13 Mar 2010 18:06: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: r205125 - in head/lib/libcompat: 4.1 4.3
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 18:06:18 -0000

Author: ed
Date: Sat Mar 13 18:06:17 2010
New Revision: 205125
URL: http://svn.freebsd.org/changeset/base/205125

Log:
  Small style(9) cleanups.

Modified:
  head/lib/libcompat/4.1/ascftime.c
  head/lib/libcompat/4.1/cftime.c
  head/lib/libcompat/4.1/ftime.c
  head/lib/libcompat/4.1/getpw.c
  head/lib/libcompat/4.3/cfree.c

Modified: head/lib/libcompat/4.1/ascftime.c
==============================================================================
--- head/lib/libcompat/4.1/ascftime.c	Sat Mar 13 16:37:17 2010	(r205124)
+++ head/lib/libcompat/4.1/ascftime.c	Sat Mar 13 18:06:17 2010	(r205125)
@@ -41,5 +41,6 @@
 int
 ascftime(char *s, const char *format, const struct tm *tmptr)
 {
-	return strftime(s, MAXLEN, format? format: "%C", tmptr);
+
+	return (strftime(s, MAXLEN, format? format: "%C", tmptr));
 }

Modified: head/lib/libcompat/4.1/cftime.c
==============================================================================
--- head/lib/libcompat/4.1/cftime.c	Sat Mar 13 16:37:17 2010	(r205124)
+++ head/lib/libcompat/4.1/cftime.c	Sat Mar 13 18:06:17 2010	(r205125)
@@ -41,6 +41,7 @@
 int
 cftime(char *s, char *format, const time_t *clock)
 {
-	return strftime(s, MAXLEN, format? format: "%C", localtime(clock));
+
+	return (strftime(s, MAXLEN, format? format: "%C", localtime(clock)));
 }
 

Modified: head/lib/libcompat/4.1/ftime.c
==============================================================================
--- head/lib/libcompat/4.1/ftime.c	Sat Mar 13 16:37:17 2010	(r205124)
+++ head/lib/libcompat/4.1/ftime.c	Sat Mar 13 18:06:17 2010	(r205125)
@@ -37,8 +37,7 @@ static char rcsid[] = "$FreeBSD$";
 #include 
 
 int
-ftime(tbp)
-        struct timeb *tbp;
+ftime(struct timeb *tbp)
 {
         struct timezone tz;
         struct timeval t;

Modified: head/lib/libcompat/4.1/getpw.c
==============================================================================
--- head/lib/libcompat/4.1/getpw.c	Sat Mar 13 16:37:17 2010	(r205124)
+++ head/lib/libcompat/4.1/getpw.c	Sat Mar 13 18:06:17 2010	(r205125)
@@ -40,13 +40,14 @@
 int
 getpw(uid_t uid, char *buf)
 {
-  struct passwd *pw;
+	struct passwd *pw;
 
-  pw = getpwuid(uid);
-  endpwent();
+	pw = getpwuid(uid);
+	endpwent();
 
-  if(pw == 0) return -1;
+	if (pw == 0)
+		return (-1);
 
-  strncpy(buf, pw->pw_name, L_cuserid);
-  return 0;
+	strncpy(buf, pw->pw_name, L_cuserid);
+	return (0);
 }

Modified: head/lib/libcompat/4.3/cfree.c
==============================================================================
--- head/lib/libcompat/4.3/cfree.c	Sat Mar 13 16:37:17 2010	(r205124)
+++ head/lib/libcompat/4.3/cfree.c	Sat Mar 13 18:06:17 2010	(r205125)
@@ -39,5 +39,6 @@ static char sccsid[] = "@(#)cfree.c	8.1 
 void
 cfree(void *p)
 {
+
 	free(p);
 }

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 18:14:51 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D867106566B;
	Sat, 13 Mar 2010 18:14:51 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CF5A8FC17;
	Sat, 13 Mar 2010 18:14:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2DIEpSZ095187;
	Sat, 13 Mar 2010 18:14:51 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DIEpgX095185;
	Sat, 13 Mar 2010 18:14:51 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <201003131814.o2DIEpgX095185@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 13 Mar 2010 18:14:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205126 - head/sys/dev/drm
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 18:14:51 -0000

Author: rnoland
Date: Sat Mar 13 18:14:51 2010
New Revision: 205126
URL: http://svn.freebsd.org/changeset/base/205126

Log:
  Fix build after typo.
  
  Reported by:	Sergey V. Dyatko 
  MFC after:	3 days

Modified:
  head/sys/dev/drm/i915_drv.h

Modified: head/sys/dev/drm/i915_drv.h
==============================================================================
--- head/sys/dev/drm/i915_drv.h	Sat Mar 13 18:06:17 2010	(r205125)
+++ head/sys/dev/drm/i915_drv.h	Sat Mar 13 18:14:51 2010	(r205126)
@@ -664,7 +664,7 @@ extern int i915_wait_ring(struct drm_dev
 #define IS_G33(dev)    ((dev)->pci_device == 0x29C2 ||	\
 			(dev)->pci_device == 0x29B2 ||	\
 			(dev)->pci_device == 0x29D2 ||  \
-			IS_IGD(DEV))
+			IS_IGD(dev))
 
 #define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(dev) || \
 		      IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 19:22:41 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CD076106566B;
	Sat, 13 Mar 2010 19:22:41 +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 B72558FC0A;
	Sat, 13 Mar 2010 19:22: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 o2DJMfO8010399;
	Sat, 13 Mar 2010 19:22:41 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DJMfY4010389;
	Sat, 13 Mar 2010 19:22:41 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <201003131922.o2DJMfY4010389@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Sat, 13 Mar 2010 19:22: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: r205128 - in head: crypto/openssl crypto/openssl/apps
	crypto/openssl/crypto crypto/openssl/crypto/aes
	crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1
	crypto/openssl/crypto/bio ...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 19:22:41 -0000

Author: simon
Date: Sat Mar 13 19:22:41 2010
New Revision: 205128
URL: http://svn.freebsd.org/changeset/base/205128

Log:
  Merge OpenSSL 0.9.8m into head.
  
  This also "reverts" some FreeBSD local changes so we should now
  be back to using entirely stock OpenSSL.  The local changes were
  simple $FreeBSD$ lines additions, which were required in the CVS
  days, and the patch for FreeBSD-SA-09:15.ssl which has been
  superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation
  extension' support.
  
  MFC after:	3 weeks

Added:
  head/crypto/openssl/engines/alpha.opt
     - copied unchanged from r204836, vendor-crypto/openssl/dist/engines/alpha.opt
  head/crypto/openssl/engines/ia64.opt
     - copied unchanged from r204836, vendor-crypto/openssl/dist/engines/ia64.opt
  head/crypto/openssl/ssl/t1_reneg.c
     - copied unchanged from r204836, vendor-crypto/openssl/dist/ssl/t1_reneg.c
Deleted:
  head/crypto/openssl/apps/genpkey.c
  head/crypto/openssl/apps/pkey.c
  head/crypto/openssl/apps/pkeyparam.c
  head/crypto/openssl/apps/pkeyutl.c
  head/crypto/openssl/apps/ts.c
  head/crypto/openssl/apps/tsget
  head/crypto/openssl/crypto/aes/aes_x86core.c
  head/crypto/openssl/crypto/aes/asm/aes-armv4.pl
  head/crypto/openssl/crypto/aes/asm/aes-ppc.pl
  head/crypto/openssl/crypto/aes/asm/aes-s390x.pl
  head/crypto/openssl/crypto/aes/asm/aes-sparcv9.pl
  head/crypto/openssl/crypto/asn1/ameth_lib.c
  head/crypto/openssl/crypto/asn1/asn1_locl.h
  head/crypto/openssl/crypto/asn1/bio_asn1.c
  head/crypto/openssl/crypto/asn1/bio_ndef.c
  head/crypto/openssl/crypto/asn1/x_nx509.c
  head/crypto/openssl/crypto/bn/asm/alpha-mont.pl
  head/crypto/openssl/crypto/bn/asm/armv4-mont.pl
  head/crypto/openssl/crypto/bn/asm/mips3-mont.pl
  head/crypto/openssl/crypto/bn/asm/ppc-mont.pl
  head/crypto/openssl/crypto/bn/asm/ppc64-mont.pl
  head/crypto/openssl/crypto/bn/asm/s390x-mont.pl
  head/crypto/openssl/crypto/bn/asm/s390x.S
  head/crypto/openssl/crypto/bn/asm/sparcv9-mont.pl
  head/crypto/openssl/crypto/bn/asm/sparcv9a-mont.pl
  head/crypto/openssl/crypto/bn/asm/via-mont.pl
  head/crypto/openssl/crypto/bn/asm/x86-mont.pl
  head/crypto/openssl/crypto/camellia/asm/cmll-x86.pl
  head/crypto/openssl/crypto/camellia/asm/cmll-x86_64.pl
  head/crypto/openssl/crypto/ppccpuid.pl
  head/crypto/openssl/crypto/s390xcpuid.S
  head/crypto/openssl/crypto/sparcv9cap.c
  head/crypto/openssl/engines/axp.opt
Modified:
  head/crypto/openssl/CHANGES
  head/crypto/openssl/Configure
  head/crypto/openssl/FAQ
  head/crypto/openssl/Makefile
  head/crypto/openssl/Makefile.org
  head/crypto/openssl/NEWS
  head/crypto/openssl/README
  head/crypto/openssl/apps/CA.sh
  head/crypto/openssl/apps/Makefile
  head/crypto/openssl/apps/apps.c
  head/crypto/openssl/apps/ca.c
  head/crypto/openssl/apps/dsa.c
  head/crypto/openssl/apps/dsaparam.c
  head/crypto/openssl/apps/enc.c
  head/crypto/openssl/apps/gendsa.c
  head/crypto/openssl/apps/genrsa.c
  head/crypto/openssl/apps/openssl.c
  head/crypto/openssl/apps/openssl.cnf
  head/crypto/openssl/apps/pkcs12.c
  head/crypto/openssl/apps/req.c
  head/crypto/openssl/apps/s_apps.h
  head/crypto/openssl/apps/s_cb.c
  head/crypto/openssl/apps/s_client.c
  head/crypto/openssl/apps/s_server.c
  head/crypto/openssl/apps/s_socket.c
  head/crypto/openssl/apps/speed.c
  head/crypto/openssl/apps/x509.c
  head/crypto/openssl/config
  head/crypto/openssl/crypto/aes/aes_cfb.c
  head/crypto/openssl/crypto/aes/asm/aes-x86_64.pl
  head/crypto/openssl/crypto/asn1/a_mbstr.c
  head/crypto/openssl/crypto/asn1/a_object.c
  head/crypto/openssl/crypto/asn1/asn1.h
  head/crypto/openssl/crypto/asn1/asn1_err.c
  head/crypto/openssl/crypto/asn1/asn1_gen.c
  head/crypto/openssl/crypto/asn1/asn1_par.c
  head/crypto/openssl/crypto/asn1/t_x509.c
  head/crypto/openssl/crypto/bio/bio.h
  head/crypto/openssl/crypto/bio/bss_dgram.c
  head/crypto/openssl/crypto/bio/bss_file.c
  head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c
  head/crypto/openssl/crypto/bn/bn_div.c
  head/crypto/openssl/crypto/bn/bn_exp.c
  head/crypto/openssl/crypto/bn/bn_gf2m.c
  head/crypto/openssl/crypto/bn/bn_mul.c
  head/crypto/openssl/crypto/bn/bntest.c
  head/crypto/openssl/crypto/camellia/Makefile
  head/crypto/openssl/crypto/cast/c_cfb64.c
  head/crypto/openssl/crypto/cast/c_ecb.c
  head/crypto/openssl/crypto/cast/c_enc.c
  head/crypto/openssl/crypto/cast/c_ofb64.c
  head/crypto/openssl/crypto/cast/cast.h
  head/crypto/openssl/crypto/cms/cms_ess.c
  head/crypto/openssl/crypto/cms/cms_lib.c
  head/crypto/openssl/crypto/comp/c_zlib.c
  head/crypto/openssl/crypto/cryptlib.c
  head/crypto/openssl/crypto/dsa/Makefile
  head/crypto/openssl/crypto/dsa/dsa_asn1.c
  head/crypto/openssl/crypto/dsa/dsa_lib.c
  head/crypto/openssl/crypto/dso/dso_dlfcn.c
  head/crypto/openssl/crypto/ec/ec2_smpl.c
  head/crypto/openssl/crypto/ecdsa/Makefile
  head/crypto/openssl/crypto/ecdsa/ecs_ossl.c
  head/crypto/openssl/crypto/ecdsa/ecs_sign.c
  head/crypto/openssl/crypto/engine/Makefile
  head/crypto/openssl/crypto/engine/eng_cnf.c
  head/crypto/openssl/crypto/engine/eng_cryptodev.c
  head/crypto/openssl/crypto/engine/eng_ctrl.c
  head/crypto/openssl/crypto/engine/eng_err.c
  head/crypto/openssl/crypto/engine/eng_table.c
  head/crypto/openssl/crypto/engine/engine.h
  head/crypto/openssl/crypto/err/Makefile
  head/crypto/openssl/crypto/err/err_all.c
  head/crypto/openssl/crypto/evp/c_allc.c
  head/crypto/openssl/crypto/evp/c_alld.c
  head/crypto/openssl/crypto/evp/digest.c
  head/crypto/openssl/crypto/evp/evp_lib.c
  head/crypto/openssl/crypto/evp/evp_locl.h
  head/crypto/openssl/crypto/lhash/lhash.c
  head/crypto/openssl/crypto/md5/asm/md5-x86_64.pl
  head/crypto/openssl/crypto/o_init.c
  head/crypto/openssl/crypto/o_str.c
  head/crypto/openssl/crypto/objects/obj_dat.c
  head/crypto/openssl/crypto/objects/obj_dat.h
  head/crypto/openssl/crypto/objects/obj_mac.h
  head/crypto/openssl/crypto/objects/obj_mac.num
  head/crypto/openssl/crypto/objects/objects.txt
  head/crypto/openssl/crypto/ocsp/ocsp_prn.c
  head/crypto/openssl/crypto/opensslv.h
  head/crypto/openssl/crypto/pem/pem_seal.c
  head/crypto/openssl/crypto/perlasm/x86_64-xlate.pl
  head/crypto/openssl/crypto/pkcs12/p12_attr.c
  head/crypto/openssl/crypto/pkcs12/p12_key.c
  head/crypto/openssl/crypto/pkcs12/p12_utl.c
  head/crypto/openssl/crypto/pkcs12/pkcs12.h
  head/crypto/openssl/crypto/pkcs7/pk7_mime.c
  head/crypto/openssl/crypto/rand/rand_win.c
  head/crypto/openssl/crypto/rand/randfile.c
  head/crypto/openssl/crypto/rsa/rsa.h
  head/crypto/openssl/crypto/rsa/rsa_eay.c
  head/crypto/openssl/crypto/rsa/rsa_eng.c
  head/crypto/openssl/crypto/rsa/rsa_oaep.c
  head/crypto/openssl/crypto/rsa/rsa_pss.c
  head/crypto/openssl/crypto/rsa/rsa_sign.c
  head/crypto/openssl/crypto/sha/sha512.c
  head/crypto/openssl/crypto/stack/safestack.h
  head/crypto/openssl/crypto/symhacks.h
  head/crypto/openssl/crypto/ui/ui_openssl.c
  head/crypto/openssl/crypto/x509/by_dir.c
  head/crypto/openssl/crypto/x509/x509.h
  head/crypto/openssl/crypto/x509/x509_lu.c
  head/crypto/openssl/crypto/x509/x509_vfy.c
  head/crypto/openssl/crypto/x509/x509_vfy.h
  head/crypto/openssl/crypto/x509/x509_vpm.c
  head/crypto/openssl/crypto/x509v3/pcy_tree.c
  head/crypto/openssl/crypto/x509v3/v3_alt.c
  head/crypto/openssl/crypto/x509v3/v3_ocsp.c
  head/crypto/openssl/demos/x509/mkcert.c
  head/crypto/openssl/demos/x509/mkreq.c
  head/crypto/openssl/doc/apps/enc.pod
  head/crypto/openssl/doc/apps/verify.pod
  head/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod
  head/crypto/openssl/doc/crypto/EVP_DigestInit.pod
  head/crypto/openssl/doc/crypto/PKCS12_parse.pod
  head/crypto/openssl/doc/crypto/bn_internal.pod
  head/crypto/openssl/doc/crypto/d2i_X509.pod
  head/crypto/openssl/doc/crypto/d2i_X509_CRL.pod
  head/crypto/openssl/doc/crypto/d2i_X509_REQ.pod
  head/crypto/openssl/doc/crypto/hmac.pod
  head/crypto/openssl/doc/crypto/pem.pod
  head/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod
  head/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod
  head/crypto/openssl/engines/Makefile
  head/crypto/openssl/engines/e_capi.c
  head/crypto/openssl/engines/e_capi_err.c
  head/crypto/openssl/engines/e_capi_err.h
  head/crypto/openssl/engines/e_ubsec.c
  head/crypto/openssl/fips/Makefile
  head/crypto/openssl/fips/aes/fips_aesavs.c
  head/crypto/openssl/fips/des/fips_desmovs.c
  head/crypto/openssl/fips/dsa/fips_dsa_key.c
  head/crypto/openssl/fips/dsa/fips_dsa_sign.c
  head/crypto/openssl/fips/dsa/fips_dsatest.c
  head/crypto/openssl/fips/dsa/fips_dssvs.c
  head/crypto/openssl/fips/fips_locl.h
  head/crypto/openssl/fips/fips_test_suite.c
  head/crypto/openssl/fips/fips_utl.h
  head/crypto/openssl/fips/fipsalgtest.pl
  head/crypto/openssl/fips/fipsld
  head/crypto/openssl/fips/hmac/fips_hmac.c
  head/crypto/openssl/fips/hmac/fips_hmac_selftest.c
  head/crypto/openssl/fips/rand/fips_rand.c
  head/crypto/openssl/fips/rand/fips_rngvs.c
  head/crypto/openssl/fips/rsa/fips_rsagtest.c
  head/crypto/openssl/fips/rsa/fips_rsastest.c
  head/crypto/openssl/fips/rsa/fips_rsavtest.c
  head/crypto/openssl/fips/sha/Makefile
  head/crypto/openssl/fips/sha/fips_sha1_selftest.c
  head/crypto/openssl/openssl.spec
  head/crypto/openssl/ssl/Makefile
  head/crypto/openssl/ssl/d1_both.c
  head/crypto/openssl/ssl/d1_clnt.c
  head/crypto/openssl/ssl/d1_enc.c
  head/crypto/openssl/ssl/d1_lib.c
  head/crypto/openssl/ssl/d1_pkt.c
  head/crypto/openssl/ssl/d1_srvr.c
  head/crypto/openssl/ssl/dtls1.h
  head/crypto/openssl/ssl/kssl.c
  head/crypto/openssl/ssl/s23_clnt.c
  head/crypto/openssl/ssl/s23_srvr.c
  head/crypto/openssl/ssl/s2_srvr.c
  head/crypto/openssl/ssl/s3_both.c
  head/crypto/openssl/ssl/s3_clnt.c
  head/crypto/openssl/ssl/s3_lib.c
  head/crypto/openssl/ssl/s3_pkt.c
  head/crypto/openssl/ssl/s3_srvr.c
  head/crypto/openssl/ssl/ssl.h
  head/crypto/openssl/ssl/ssl3.h
  head/crypto/openssl/ssl/ssl_algs.c
  head/crypto/openssl/ssl/ssl_asn1.c
  head/crypto/openssl/ssl/ssl_cert.c
  head/crypto/openssl/ssl/ssl_ciph.c
  head/crypto/openssl/ssl/ssl_err.c
  head/crypto/openssl/ssl/ssl_lib.c
  head/crypto/openssl/ssl/ssl_locl.h
  head/crypto/openssl/ssl/ssl_rsa.c
  head/crypto/openssl/ssl/ssl_sess.c
  head/crypto/openssl/ssl/ssl_stat.c
  head/crypto/openssl/ssl/ssl_txt.c
  head/crypto/openssl/ssl/t1_enc.c
  head/crypto/openssl/ssl/t1_lib.c
  head/crypto/openssl/ssl/tls1.h
  head/crypto/openssl/test/Makefile
  head/crypto/openssl/test/cms-test.pl
  head/crypto/openssl/util/domd
  head/crypto/openssl/util/libeay.num
  head/crypto/openssl/util/mk1mf.pl
  head/crypto/openssl/util/mkdef.pl
  head/crypto/openssl/util/mkerr.pl
  head/crypto/openssl/util/pl/Mingw32.pl
  head/crypto/openssl/util/pl/VC-32.pl
  head/crypto/openssl/util/pod2man.pl
  head/crypto/openssl/util/shlib_wrap.sh
  head/secure/lib/libssl/Makefile
Directory Properties:
  head/crypto/openssl/   (props changed)

Modified: head/crypto/openssl/CHANGES
==============================================================================
--- head/crypto/openssl/CHANGES	Sat Mar 13 18:34:19 2010	(r205127)
+++ head/crypto/openssl/CHANGES	Sat Mar 13 19:22:41 2010	(r205128)
@@ -2,6 +2,176 @@
  OpenSSL CHANGES
  _______________
 
+ Changes between 0.9.8l and 0.9.8m [25 Feb 2010]
+
+  *) Always check bn_wexpend() return values for failure.  (CVE-2009-3245)
+     [Martin Olsson, Neel Mehta]
+
+  *) Fix X509_STORE locking: Every 'objs' access requires a lock (to
+     accommodate for stack sorting, always a write lock!).
+     [Bodo Moeller]
+
+  *) On some versions of WIN32 Heap32Next is very slow. This can cause
+     excessive delays in the RAND_poll(): over a minute. As a workaround
+     include a time check in the inner Heap32Next loop too.
+     [Steve Henson]
+
+  *) The code that handled flushing of data in SSL/TLS originally used the
+     BIO_CTRL_INFO ctrl to see if any data was pending first. This caused
+     the problem outlined in PR#1949. The fix suggested there however can
+     trigger problems with buggy BIO_CTRL_WPENDING (e.g. some versions
+     of Apache). So instead simplify the code to flush unconditionally.
+     This should be fine since flushing with no data to flush is a no op.
+     [Steve Henson]
+
+  *) Handle TLS versions 2.0 and later properly and correctly use the
+     highest version of TLS/SSL supported. Although TLS >= 2.0 is some way
+     off ancient servers have a habit of sticking around for a while...
+     [Steve Henson]
+
+  *) Modify compression code so it frees up structures without using the
+     ex_data callbacks. This works around a problem where some applications
+     call CRYPTO_cleanup_all_ex_data() before application exit (e.g. when
+     restarting) then use compression (e.g. SSL with compression) later.
+     This results in significant per-connection memory leaks and
+     has caused some security issues including CVE-2008-1678 and
+     CVE-2009-4355.
+     [Steve Henson]
+
+  *) Constify crypto/cast (i.e., ): a CAST_KEY doesn't
+     change when encrypting or decrypting.
+     [Bodo Moeller]
+
+  *) Add option SSL_OP_LEGACY_SERVER_CONNECT which will allow clients to
+     connect and renegotiate with servers which do not support RI.
+     Until RI is more widely deployed this option is enabled by default.
+     [Steve Henson]
+
+  *) Add "missing" ssl ctrls to clear options and mode.
+     [Steve Henson]
+
+  *) If client attempts to renegotiate and doesn't support RI respond with
+     a no_renegotiation alert as required by RFC5746.  Some renegotiating
+     TLS clients will continue a connection gracefully when they receive
+     the alert. Unfortunately OpenSSL mishandled this alert and would hang
+     waiting for a server hello which it will never receive. Now we treat a
+     received no_renegotiation alert as a fatal error. This is because
+     applications requesting a renegotiation might well expect it to succeed
+     and would have no code in place to handle the server denying it so the
+     only safe thing to do is to terminate the connection.
+     [Steve Henson]
+
+  *) Add ctrl macro SSL_get_secure_renegotiation_support() which returns 1 if
+     peer supports secure renegotiation and 0 otherwise. Print out peer
+     renegotiation support in s_client/s_server.
+     [Steve Henson]
+
+  *) Replace the highly broken and deprecated SPKAC certification method with
+     the updated NID creation version. This should correctly handle UTF8.
+     [Steve Henson]
+
+  *) Implement RFC5746. Re-enable renegotiation but require the extension
+     as needed. Unfortunately, SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
+     turns out to be a bad idea. It has been replaced by
+     SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set with
+     SSL_CTX_set_options(). This is really not recommended unless you
+     know what you are doing.
+     [Eric Rescorla , Ben Laurie, Steve Henson]
+
+  *) Fixes to stateless session resumption handling. Use initial_ctx when
+     issuing and attempting to decrypt tickets in case it has changed during
+     servername handling. Use a non-zero length session ID when attempting
+     stateless session resumption: this makes it possible to determine if
+     a resumption has occurred immediately after receiving server hello
+     (several places in OpenSSL subtly assume this) instead of later in
+     the handshake.
+     [Steve Henson]
+
+  *) The functions ENGINE_ctrl(), OPENSSL_isservice(),
+     CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error
+     fixes for a few places where the return code is not checked
+     correctly.
+     [Julia Lawall ]
+
+  *) Add --strict-warnings option to Configure script to include devteam
+     warnings in other configurations.
+     [Steve Henson]
+
+  *) Add support for --libdir option and LIBDIR variable in makefiles. This
+     makes it possible to install openssl libraries in locations which
+     have names other than "lib", for example "/usr/lib64" which some
+     systems need.
+     [Steve Henson, based on patch from Jeremy Utley]
+
+  *) Don't allow the use of leading 0x80 in OIDs. This is a violation of
+     X690 8.9.12 and can produce some misleading textual output of OIDs.
+     [Steve Henson, reported by Dan Kaminsky]
+
+  *) Delete MD2 from algorithm tables. This follows the recommendation in
+     several standards that it is not used in new applications due to
+     several cryptographic weaknesses. For binary compatibility reasons
+     the MD2 API is still compiled in by default.
+     [Steve Henson]
+
+  *) Add compression id to {d2i,i2d}_SSL_SESSION so it is correctly saved
+     and restored.
+     [Steve Henson]
+
+  *) Rename uni2asc and asc2uni functions to OPENSSL_uni2asc and
+     OPENSSL_asc2uni conditionally on Netware platforms to avoid a name
+     clash.
+     [Guenter ]
+
+  *) Fix the server certificate chain building code to use X509_verify_cert(),
+     it used to have an ad-hoc builder which was unable to cope with anything
+     other than a simple chain.
+     [David Woodhouse , Steve Henson]
+
+  *) Don't check self signed certificate signatures in X509_verify_cert()
+     by default (a flag can override this): it just wastes time without
+     adding any security. As a useful side effect self signed root CAs
+     with non-FIPS digests are now usable in FIPS mode.
+     [Steve Henson]
+
+  *) In dtls1_process_out_of_seq_message() the check if the current message
+     is already buffered was missing. For every new message was memory
+     allocated, allowing an attacker to perform an denial of service attack
+     with sending out of seq handshake messages until there is no memory
+     left. Additionally every future messege was buffered, even if the
+     sequence number made no sense and would be part of another handshake.
+     So only messages with sequence numbers less than 10 in advance will be
+     buffered.  (CVE-2009-1378)
+     [Robin Seggelmann, discovered by Daniel Mentz] 	
+
+  *) Records are buffered if they arrive with a future epoch to be
+     processed after finishing the corresponding handshake. There is
+     currently no limitation to this buffer allowing an attacker to perform
+     a DOS attack with sending records with future epochs until there is no
+     memory left. This patch adds the pqueue_size() function to detemine
+     the size of a buffer and limits the record buffer to 100 entries.
+     (CVE-2009-1377)
+     [Robin Seggelmann, discovered by Daniel Mentz] 	
+
+  *) Keep a copy of frag->msg_header.frag_len so it can be used after the
+     parent structure is freed.  (CVE-2009-1379)
+     [Daniel Mentz] 	
+
+  *) Handle non-blocking I/O properly in SSL_shutdown() call.
+     [Darryl Miles ]
+
+  *) Add 2.5.4.* OIDs
+     [Ilya O. ]
+
+ Changes between 0.9.8k and 0.9.8l  [5 Nov 2009]
+
+  *) Disable renegotiation completely - this fixes a severe security
+     problem (CVE-2009-3555) at the cost of breaking all
+     renegotiation. Renegotiation can be re-enabled by setting
+     SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION in s3->flags at
+     run-time. This is really not recommended unless you know what
+     you're doing.
+     [Ben Laurie]
+
  Changes between 0.9.8j and 0.9.8k  [25 Mar 2009]
 
   *) Don't set val to NULL when freeing up structures, it is freed up by
@@ -86,6 +256,10 @@
 
  Changes between 0.9.8h and 0.9.8i  [15 Sep 2008]
 
+  *) Fix NULL pointer dereference if a DTLS server received
+     ChangeCipherSpec as first record (CVE-2009-1386).
+     [PR #1679]
+
   *) Fix a state transitition in s3_srvr.c and d1_srvr.c
      (was using SSL3_ST_CW_CLNT_HELLO_B, should be ..._ST_SW_SRVR_...).
      [Nagendra Modadugu]
@@ -1489,19 +1663,6 @@
      differing sizes.
      [Richard Levitte]
 
- Changes between 0.9.7m and 0.9.7n  [xx XXX xxxx]
-
-  *) In the SSL/TLS server implementation, be strict about session ID
-     context matching (which matters if an application uses a single
-     external cache for different purposes).  Previously,
-     out-of-context reuse was forbidden only if SSL_VERIFY_PEER was
-     set.  This did ensure strict client verification, but meant that,
-     with applications using a single external cache for quite
-     different requirements, clients could circumvent ciphersuite
-     restrictions for a given session ID context by starting a session
-     in a different context.
-     [Bodo Moeller]
-
  Changes between 0.9.7l and 0.9.7m  [23 Feb 2007]
 
   *) Cleanse PEM buffers before freeing them since they may contain 

Modified: head/crypto/openssl/Configure
==============================================================================
--- head/crypto/openssl/Configure	Sat Mar 13 18:34:19 2010	(r205127)
+++ head/crypto/openssl/Configure	Sat Mar 13 19:22:41 2010	(r205128)
@@ -106,6 +106,8 @@ my $usage="Usage: Configure [no-
 
 my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED";
 
+my $strict_warnings = 0;
+
 my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
 
 # MD2_CHAR slags pentium pros
@@ -159,14 +161,15 @@ my %table=(
 "debug-ben",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::bn86-elf.o co86-elf.o",
 "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
-"debug-ben-debug",	"gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG  -DDEBUG_SAFESTACK -g3 -O2 -pipe::(unknown)::::::",
+"debug-ben-debug",	"gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG  -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe::(unknown)::::::",
+"debug-ben-debug-noopt",	"gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG  -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::",
 "debug-ben-strict",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
 "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 "debug-bodo",	"gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
 "debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
-"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "debug-steve",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
 "debug-steve-linux-pseudo64",	"gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared",
 "debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
@@ -178,6 +181,9 @@ my %table=(
 "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO  -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "dist",		"cc:-O::(unknown)::::::",
 
 # Basic configs that should work on any (32 and less bit) box
@@ -203,11 +209,11 @@ my %table=(
 # actually recommend to consider using gcc shared build even with vendor
 # compiler:-)
 #						
-"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  
 #### Solaris x86 with Sun C setups
 "solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 
 #### SPARC Solaris with GNU C setups
 "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
@@ -337,7 +343,7 @@ my %table=(
 "linux-ia64",	"gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"linux-x86_64",	"gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"linux-x86_64",	"gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 #### SPARC Linux setups
 # Ray Miller  has patiently
 # assisted with debugging of following two configs.
@@ -390,7 +396,8 @@ my %table=(
 
 # QNX
 "qnx4",	"cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
-"qnx6",	"cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
+"QNX6",       "gcc:-DTERMIOS::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"QNX6-i386",  "gcc:-DL_ENDIAN -DTERMIOS -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 
 #### SCO/Caldera targets.
 #
@@ -520,7 +527,7 @@ my %table=(
 "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc64.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
-"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 
 ##### A/UX
@@ -581,9 +588,11 @@ my $idx_ranlib = $idx++;
 my $idx_arflags = $idx++;
 
 my $prefix="";
+my $libdir="";
 my $openssldir="";
 my $exe_ext="";
-my $install_prefix="";
+my $install_prefix= "$ENV{'INSTALL_PREFIX'}";
+my $cross_compile_prefix="";
 my $fipslibdir="/usr/local/ssl/fips-1.0/lib/";
 my $nofipscanistercheck=0;
 my $fipsdso=0;
@@ -747,6 +756,10 @@ PROCESS_ARGS:
 			{
 			exit(&test_sanity());
 			}
+		elsif (/^--strict-warnings/)
+			{
+			$strict_warnings = 1;
+			}
 		elsif (/^reconfigure/ || /^reconf/)
 			{
 			if (open(IN,"<$Makefile"))
@@ -816,6 +829,10 @@ PROCESS_ARGS:
 				{
 				$prefix=$1;
 				}
+			elsif (/^--libdir=(.*)$/)
+				{
+				$libdir=$1;
+				}
 			elsif (/^--openssldir=(.*)$/)
 				{
 				$openssldir=$1;
@@ -979,7 +996,8 @@ my $shared_target = $fields[$idx_shared_
 my $shared_cflag = $fields[$idx_shared_cflag];
 my $shared_ldflag = $fields[$idx_shared_ldflag];
 my $shared_extension = $fields[$idx_shared_extension];
-my $ranlib = $fields[$idx_ranlib];
+my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
+my $ar = $ENV{'AR'} || "ar";
 my $arflags = $fields[$idx_arflags];
 
 if ($fips)
@@ -1079,9 +1097,14 @@ if ($openssldir eq "" and $prefix eq "")
 	}
 $prefix=$openssldir if $prefix eq "";
 
+$libdir="lib" if $libdir eq "";
+
 $default_ranlib= &which("ranlib") or $default_ranlib="true";
 $perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
   or $perl="perl";
+my $make = $ENV{'MAKE'} || "make";
+
+$cross_compile_prefix=$ENV{'CROSS_COMPILE'} if $cross_compile_prefix eq "";
 
 chop $openssldir if $openssldir =~ /\/$/;
 chop $prefix if $prefix =~ /.\/$/;
@@ -1434,6 +1457,16 @@ if ($shlib_version_number =~ /(^[0-9]*)\
 	$shlib_minor=$2;
 	}
 
+if ($strict_warnings)
+	{
+	my $wopt;
+	die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/);
+	foreach $wopt (split /\s+/, $gcc_devteam_warn)
+		{
+		$cflags .= " $wopt" unless ($cflags =~ /$wopt/)
+		}
+	}
+
 open(IN,'$Makefile.new") || die "unable to create $Makefile.new:$!\n";
@@ -1463,11 +1496,22 @@ while ()
 	s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/;
 	s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
 	s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
+	s/^LIBDIR=.*$/LIBDIR=$libdir/;
 	s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
 	s/^PLATFORM=.*$/PLATFORM=$target/;
 	s/^OPTIONS=.*$/OPTIONS=$options/;
 	s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/;
-	s/^CC=.*$/CC= $cc/;
+	if ($cross_compile_prefix)
+		{
+		s/^CC=.*$/CROSS_COMPILE= $cross_compile_prefix\nCC= \$\(CROSS_COMPILE\)$cc/;
+		s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
+		s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
+		}
+	else	{
+		s/^CC=.*$/CC= $cc/;
+		s/^AR=\s*ar/AR= $ar/;
+		s/^RANLIB=.*/RANLIB= $ranlib/;
+		}
 	s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
 	s/^CFLAG=.*$/CFLAG= $cflags/;
 	s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
@@ -1486,7 +1530,6 @@ while ()
 	s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
 	s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
 	s/^PROCESSOR=.*/PROCESSOR= $processor/;
-	s/^RANLIB=.*/RANLIB= $ranlib/;
 	s/^ARFLAGS=.*/ARFLAGS= $arflags/;
 	s/^PERL=.*/PERL= $perl/;
 	s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
@@ -1643,9 +1686,20 @@ print OUT "#define OPENSSL_CPUID_OBJ\n\n
 while ()
 	{
 	if	(/^#define\s+OPENSSLDIR/)
-		{ print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
+		{
+		my $foo = $openssldir;
+		$foo =~ s/\\/\\\\/g;
+		print OUT "#define OPENSSLDIR \"$foo\"\n";
+		}
 	elsif	(/^#define\s+ENGINESDIR/)
-		{ print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
+		{
+		# $foo is to become "$prefix/lib$multilib/engines";
+		# as Makefile.org and engines/Makefile are adapted for
+		# $multilib suffix.
+		my $foo = "$prefix/lib/engines";
+		$foo =~ s/\\/\\\\/g;
+		print OUT "#define ENGINESDIR \"$foo\"\n";
+		}
 	elsif	(/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
 		{ printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
 			if $export_var_as_fn;
@@ -1750,7 +1804,7 @@ if($IsMK1MF) {
 EOF
 	close(OUT);
 } else {
-	my $make_command = "make PERL=\'$perl\'";
+	my $make_command = "$make PERL=\'$perl\'";
 	my $make_targets = "";
 	$make_targets .= " links" if $symlink;
 	$make_targets .= " depend" if $depflags ne $default_depflags && $make_depend;

Modified: head/crypto/openssl/FAQ
==============================================================================
--- head/crypto/openssl/FAQ	Sat Mar 13 18:34:19 2010	(r205127)
+++ head/crypto/openssl/FAQ	Sat Mar 13 19:22:41 2010	(r205128)
@@ -78,7 +78,7 @@ OpenSSL  -  Frequently Asked Questions
 * Which is the current version of OpenSSL?
 
 The current version is available from .
-OpenSSL 0.9.8k was released on Mar 25th, 2009.
+OpenSSL 0.9.8m was released on Feb 25th, 2010.
 
 In addition to the current stable release, you can also access daily
 snapshots of the OpenSSL development version at /dev/null 1>/dev/null
+		if [ $? -eq 0 ] ; then
+			echo $line >>$outfile
+			break
+		else
+			echo $line >>$outfile
+		fi
+	fi
+
+	echo $line|grep "^-----BEGIN.*$bound"  2>/dev/null 1>/dev/null

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 19:25:00 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFE4C106564A;
	Sat, 13 Mar 2010 19:25:00 +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 6B1068FC18;
	Sat, 13 Mar 2010 19:25:00 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2DJJOW5085827;
	Sat, 13 Mar 2010 12:19:24 -0700 (MST) (envelope-from imp@bsdimp.com)
Date: Sat, 13 Mar 2010 12:19:32 -0700 (MST)
Message-Id: <20100313.121932.997044077387131740.imp@bsdimp.com>
To: ed@80386.nl
From: "M. Warner Losh" 
In-Reply-To: <20100313170725.GW8200@hoeg.nl>
References: <20100313090844.GV8200@hoeg.nl>
	<20100313.090709.407454645627448944.imp@bsdimp.com>
	<20100313170725.GW8200@hoeg.nl>
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: unixmania@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, nwhitehorn@FreeBSD.org
Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64
 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32
 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64
 sys/ia64/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 19:25:00 -0000

In message: <20100313170725.GW8200@hoeg.nl>
            Ed Schouten  writes:
: * M. Warner Losh  wrote:
: > that sounds like a good idea.  But it isn't as simple as changing all
: > the COMPAT_FREEBSDX in the .c code.  There's also hooks in the syscall
: > glue generation that would be affected.
: 
: Hmmm... Indeed.
: 
: I thought a bit more about this and I realized it would be better if we
: wouldn't use a FreeBSD major number for this, but the actual
: __FreeBSD_version.

Hmmm, that might be harder.  The problem is that when I want to run a
program from FreeBSD 3.0, I may need an interface that was in 3.0, but
was removed prior to 5.0 shipping.  This means the kernel needs the
COMPAT_FREEBSD4 option right now to work.  So things are kind of
confusing.

Under your plan, which __FreeBSD_version would we use here?

The COMPAT_FREEBSD_BACK_TO=3 would be the right setting here.  This
may pick up a little extra junk, but would be clear to the user what
they are configuring.

Comments?

Warner

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 19:30:31 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D02F106566B;
	Sat, 13 Mar 2010 19:30:31 +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 4892E8FC1B;
	Sat, 13 Mar 2010 19:30:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2DJUVYb012210;
	Sat, 13 Mar 2010 19:30:31 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DJUUW3012125;
	Sat, 13 Mar 2010 19:30:30 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <201003131930.o2DJUUW3012125@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Sat, 13 Mar 2010 19:30:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r205129 - in head/secure: lib/libcrypto
	lib/libcrypto/man lib/libssl lib/libssl/man usr.bin/openssl/man
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 19:30:31 -0000

Author: simon
Date: Sat Mar 13 19:30:29 2010
New Revision: 205129
URL: http://svn.freebsd.org/changeset/base/205129

Log:
  Regenerate manual pages for OpenSSL 0.9.8m.
  
  MFC after:	3 weeks

Modified:
  head/secure/lib/libcrypto/Makefile.inc
  head/secure/lib/libcrypto/Makefile.man
  head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
  head/secure/lib/libcrypto/man/ASN1_STRING_length.3
  head/secure/lib/libcrypto/man/ASN1_STRING_new.3
  head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
  head/secure/lib/libcrypto/man/ASN1_generate_nconf.3
  head/secure/lib/libcrypto/man/BIO_ctrl.3
  head/secure/lib/libcrypto/man/BIO_f_base64.3
  head/secure/lib/libcrypto/man/BIO_f_buffer.3
  head/secure/lib/libcrypto/man/BIO_f_cipher.3
  head/secure/lib/libcrypto/man/BIO_f_md.3
  head/secure/lib/libcrypto/man/BIO_f_null.3
  head/secure/lib/libcrypto/man/BIO_f_ssl.3
  head/secure/lib/libcrypto/man/BIO_find_type.3
  head/secure/lib/libcrypto/man/BIO_new.3
  head/secure/lib/libcrypto/man/BIO_push.3
  head/secure/lib/libcrypto/man/BIO_read.3
  head/secure/lib/libcrypto/man/BIO_s_accept.3
  head/secure/lib/libcrypto/man/BIO_s_bio.3
  head/secure/lib/libcrypto/man/BIO_s_connect.3
  head/secure/lib/libcrypto/man/BIO_s_fd.3
  head/secure/lib/libcrypto/man/BIO_s_file.3
  head/secure/lib/libcrypto/man/BIO_s_mem.3
  head/secure/lib/libcrypto/man/BIO_s_null.3
  head/secure/lib/libcrypto/man/BIO_s_socket.3
  head/secure/lib/libcrypto/man/BIO_set_callback.3
  head/secure/lib/libcrypto/man/BIO_should_retry.3
  head/secure/lib/libcrypto/man/BN_BLINDING_new.3
  head/secure/lib/libcrypto/man/BN_CTX_new.3
  head/secure/lib/libcrypto/man/BN_CTX_start.3
  head/secure/lib/libcrypto/man/BN_add.3
  head/secure/lib/libcrypto/man/BN_add_word.3
  head/secure/lib/libcrypto/man/BN_bn2bin.3
  head/secure/lib/libcrypto/man/BN_cmp.3
  head/secure/lib/libcrypto/man/BN_copy.3
  head/secure/lib/libcrypto/man/BN_generate_prime.3
  head/secure/lib/libcrypto/man/BN_mod_inverse.3
  head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
  head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3
  head/secure/lib/libcrypto/man/BN_new.3
  head/secure/lib/libcrypto/man/BN_num_bytes.3
  head/secure/lib/libcrypto/man/BN_rand.3
  head/secure/lib/libcrypto/man/BN_set_bit.3
  head/secure/lib/libcrypto/man/BN_swap.3
  head/secure/lib/libcrypto/man/BN_zero.3
  head/secure/lib/libcrypto/man/CONF_modules_free.3
  head/secure/lib/libcrypto/man/CONF_modules_load_file.3
  head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3
  head/secure/lib/libcrypto/man/DH_generate_key.3
  head/secure/lib/libcrypto/man/DH_generate_parameters.3
  head/secure/lib/libcrypto/man/DH_get_ex_new_index.3
  head/secure/lib/libcrypto/man/DH_new.3
  head/secure/lib/libcrypto/man/DH_set_method.3
  head/secure/lib/libcrypto/man/DH_size.3
  head/secure/lib/libcrypto/man/DSA_SIG_new.3
  head/secure/lib/libcrypto/man/DSA_do_sign.3
  head/secure/lib/libcrypto/man/DSA_dup_DH.3
  head/secure/lib/libcrypto/man/DSA_generate_key.3
  head/secure/lib/libcrypto/man/DSA_generate_parameters.3
  head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3
  head/secure/lib/libcrypto/man/DSA_new.3
  head/secure/lib/libcrypto/man/DSA_set_method.3
  head/secure/lib/libcrypto/man/DSA_sign.3
  head/secure/lib/libcrypto/man/DSA_size.3
  head/secure/lib/libcrypto/man/ERR_GET_LIB.3
  head/secure/lib/libcrypto/man/ERR_clear_error.3
  head/secure/lib/libcrypto/man/ERR_error_string.3
  head/secure/lib/libcrypto/man/ERR_get_error.3
  head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3
  head/secure/lib/libcrypto/man/ERR_load_strings.3
  head/secure/lib/libcrypto/man/ERR_print_errors.3
  head/secure/lib/libcrypto/man/ERR_put_error.3
  head/secure/lib/libcrypto/man/ERR_remove_state.3
  head/secure/lib/libcrypto/man/ERR_set_mark.3
  head/secure/lib/libcrypto/man/EVP_BytesToKey.3
  head/secure/lib/libcrypto/man/EVP_DigestInit.3
  head/secure/lib/libcrypto/man/EVP_EncryptInit.3
  head/secure/lib/libcrypto/man/EVP_OpenInit.3
  head/secure/lib/libcrypto/man/EVP_PKEY_new.3
  head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
  head/secure/lib/libcrypto/man/EVP_SealInit.3
  head/secure/lib/libcrypto/man/EVP_SignInit.3
  head/secure/lib/libcrypto/man/EVP_VerifyInit.3
  head/secure/lib/libcrypto/man/OBJ_nid2obj.3
  head/secure/lib/libcrypto/man/OPENSSL_Applink.3
  head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
  head/secure/lib/libcrypto/man/OPENSSL_config.3
  head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3
  head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3
  head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3
  head/secure/lib/libcrypto/man/PKCS12_create.3
  head/secure/lib/libcrypto/man/PKCS12_parse.3
  head/secure/lib/libcrypto/man/PKCS7_decrypt.3
  head/secure/lib/libcrypto/man/PKCS7_encrypt.3
  head/secure/lib/libcrypto/man/PKCS7_sign.3
  head/secure/lib/libcrypto/man/PKCS7_verify.3
  head/secure/lib/libcrypto/man/RAND_add.3
  head/secure/lib/libcrypto/man/RAND_bytes.3
  head/secure/lib/libcrypto/man/RAND_cleanup.3
  head/secure/lib/libcrypto/man/RAND_egd.3
  head/secure/lib/libcrypto/man/RAND_load_file.3
  head/secure/lib/libcrypto/man/RAND_set_rand_method.3
  head/secure/lib/libcrypto/man/RSA_blinding_on.3
  head/secure/lib/libcrypto/man/RSA_check_key.3
  head/secure/lib/libcrypto/man/RSA_generate_key.3
  head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3
  head/secure/lib/libcrypto/man/RSA_new.3
  head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3
  head/secure/lib/libcrypto/man/RSA_print.3
  head/secure/lib/libcrypto/man/RSA_private_encrypt.3
  head/secure/lib/libcrypto/man/RSA_public_encrypt.3
  head/secure/lib/libcrypto/man/RSA_set_method.3
  head/secure/lib/libcrypto/man/RSA_sign.3
  head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3
  head/secure/lib/libcrypto/man/RSA_size.3
  head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3
  head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3
  head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3
  head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3
  head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3
  head/secure/lib/libcrypto/man/X509_NAME_print_ex.3
  head/secure/lib/libcrypto/man/X509_new.3
  head/secure/lib/libcrypto/man/bio.3
  head/secure/lib/libcrypto/man/blowfish.3
  head/secure/lib/libcrypto/man/bn.3
  head/secure/lib/libcrypto/man/bn_internal.3
  head/secure/lib/libcrypto/man/buffer.3
  head/secure/lib/libcrypto/man/crypto.3
  head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3
  head/secure/lib/libcrypto/man/d2i_DHparams.3
  head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3
  head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3
  head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3
  head/secure/lib/libcrypto/man/d2i_X509.3
  head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3
  head/secure/lib/libcrypto/man/d2i_X509_CRL.3
  head/secure/lib/libcrypto/man/d2i_X509_NAME.3
  head/secure/lib/libcrypto/man/d2i_X509_REQ.3
  head/secure/lib/libcrypto/man/d2i_X509_SIG.3
  head/secure/lib/libcrypto/man/des.3
  head/secure/lib/libcrypto/man/dh.3
  head/secure/lib/libcrypto/man/dsa.3
  head/secure/lib/libcrypto/man/ecdsa.3
  head/secure/lib/libcrypto/man/engine.3
  head/secure/lib/libcrypto/man/err.3
  head/secure/lib/libcrypto/man/evp.3
  head/secure/lib/libcrypto/man/hmac.3
  head/secure/lib/libcrypto/man/lh_stats.3
  head/secure/lib/libcrypto/man/lhash.3
  head/secure/lib/libcrypto/man/md5.3
  head/secure/lib/libcrypto/man/mdc2.3
  head/secure/lib/libcrypto/man/pem.3
  head/secure/lib/libcrypto/man/rand.3
  head/secure/lib/libcrypto/man/rc4.3
  head/secure/lib/libcrypto/man/ripemd.3
  head/secure/lib/libcrypto/man/rsa.3
  head/secure/lib/libcrypto/man/sha.3
  head/secure/lib/libcrypto/man/threads.3
  head/secure/lib/libcrypto/man/ui.3
  head/secure/lib/libcrypto/man/ui_compat.3
  head/secure/lib/libcrypto/man/x509.3
  head/secure/lib/libssl/Makefile.man
  head/secure/lib/libssl/man/SSL_CIPHER_get_name.3
  head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3
  head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3
  head/secure/lib/libssl/man/SSL_CTX_add_session.3
  head/secure/lib/libssl/man/SSL_CTX_ctrl.3
  head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3
  head/secure/lib/libssl/man/SSL_CTX_free.3
  head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3
  head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3
  head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3
  head/secure/lib/libssl/man/SSL_CTX_new.3
  head/secure/lib/libssl/man/SSL_CTX_sess_number.3
  head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3
  head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3
  head/secure/lib/libssl/man/SSL_CTX_sessions.3
  head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3
  head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3
  head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3
  head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3
  head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3
  head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3
  head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3
  head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3
  head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3
  head/secure/lib/libssl/man/SSL_CTX_set_mode.3
  head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3
  head/secure/lib/libssl/man/SSL_CTX_set_options.3
  head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3
  head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3
  head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3
  head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3
  head/secure/lib/libssl/man/SSL_CTX_set_timeout.3
  head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3
  head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3
  head/secure/lib/libssl/man/SSL_CTX_set_verify.3
  head/secure/lib/libssl/man/SSL_CTX_use_certificate.3
  head/secure/lib/libssl/man/SSL_SESSION_free.3
  head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3
  head/secure/lib/libssl/man/SSL_SESSION_get_time.3
  head/secure/lib/libssl/man/SSL_accept.3
  head/secure/lib/libssl/man/SSL_alert_type_string.3
  head/secure/lib/libssl/man/SSL_clear.3
  head/secure/lib/libssl/man/SSL_connect.3
  head/secure/lib/libssl/man/SSL_do_handshake.3
  head/secure/lib/libssl/man/SSL_free.3
  head/secure/lib/libssl/man/SSL_get_SSL_CTX.3
  head/secure/lib/libssl/man/SSL_get_ciphers.3
  head/secure/lib/libssl/man/SSL_get_client_CA_list.3
  head/secure/lib/libssl/man/SSL_get_current_cipher.3
  head/secure/lib/libssl/man/SSL_get_default_timeout.3
  head/secure/lib/libssl/man/SSL_get_error.3
  head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3
  head/secure/lib/libssl/man/SSL_get_ex_new_index.3
  head/secure/lib/libssl/man/SSL_get_fd.3
  head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3
  head/secure/lib/libssl/man/SSL_get_peer_certificate.3
  head/secure/lib/libssl/man/SSL_get_rbio.3
  head/secure/lib/libssl/man/SSL_get_session.3
  head/secure/lib/libssl/man/SSL_get_verify_result.3
  head/secure/lib/libssl/man/SSL_get_version.3
  head/secure/lib/libssl/man/SSL_library_init.3
  head/secure/lib/libssl/man/SSL_load_client_CA_file.3
  head/secure/lib/libssl/man/SSL_new.3
  head/secure/lib/libssl/man/SSL_pending.3
  head/secure/lib/libssl/man/SSL_read.3
  head/secure/lib/libssl/man/SSL_rstate_string.3
  head/secure/lib/libssl/man/SSL_session_reused.3
  head/secure/lib/libssl/man/SSL_set_bio.3
  head/secure/lib/libssl/man/SSL_set_connect_state.3
  head/secure/lib/libssl/man/SSL_set_fd.3
  head/secure/lib/libssl/man/SSL_set_session.3
  head/secure/lib/libssl/man/SSL_set_shutdown.3
  head/secure/lib/libssl/man/SSL_set_verify_result.3
  head/secure/lib/libssl/man/SSL_shutdown.3
  head/secure/lib/libssl/man/SSL_state_string.3
  head/secure/lib/libssl/man/SSL_want.3
  head/secure/lib/libssl/man/SSL_write.3
  head/secure/lib/libssl/man/d2i_SSL_SESSION.3
  head/secure/lib/libssl/man/ssl.3
  head/secure/usr.bin/openssl/man/CA.pl.1
  head/secure/usr.bin/openssl/man/asn1parse.1
  head/secure/usr.bin/openssl/man/ca.1
  head/secure/usr.bin/openssl/man/ciphers.1
  head/secure/usr.bin/openssl/man/crl.1
  head/secure/usr.bin/openssl/man/crl2pkcs7.1
  head/secure/usr.bin/openssl/man/dgst.1
  head/secure/usr.bin/openssl/man/dhparam.1
  head/secure/usr.bin/openssl/man/dsa.1
  head/secure/usr.bin/openssl/man/dsaparam.1
  head/secure/usr.bin/openssl/man/ec.1
  head/secure/usr.bin/openssl/man/ecparam.1
  head/secure/usr.bin/openssl/man/enc.1
  head/secure/usr.bin/openssl/man/errstr.1
  head/secure/usr.bin/openssl/man/gendsa.1
  head/secure/usr.bin/openssl/man/genrsa.1
  head/secure/usr.bin/openssl/man/nseq.1
  head/secure/usr.bin/openssl/man/ocsp.1
  head/secure/usr.bin/openssl/man/openssl.1
  head/secure/usr.bin/openssl/man/passwd.1
  head/secure/usr.bin/openssl/man/pkcs12.1
  head/secure/usr.bin/openssl/man/pkcs7.1
  head/secure/usr.bin/openssl/man/pkcs8.1
  head/secure/usr.bin/openssl/man/rand.1
  head/secure/usr.bin/openssl/man/req.1
  head/secure/usr.bin/openssl/man/rsa.1
  head/secure/usr.bin/openssl/man/rsautl.1
  head/secure/usr.bin/openssl/man/s_client.1
  head/secure/usr.bin/openssl/man/s_server.1
  head/secure/usr.bin/openssl/man/s_time.1
  head/secure/usr.bin/openssl/man/sess_id.1
  head/secure/usr.bin/openssl/man/smime.1
  head/secure/usr.bin/openssl/man/speed.1
  head/secure/usr.bin/openssl/man/spkac.1
  head/secure/usr.bin/openssl/man/verify.1
  head/secure/usr.bin/openssl/man/version.1
  head/secure/usr.bin/openssl/man/x509.1
  head/secure/usr.bin/openssl/man/x509v3_config.1

Modified: head/secure/lib/libcrypto/Makefile.inc
==============================================================================
--- head/secure/lib/libcrypto/Makefile.inc	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/Makefile.inc	Sat Mar 13 19:30:29 2010	(r205129)
@@ -34,7 +34,7 @@ man-update:
 	@(sec=${manpage:E}; \
 	pod=${manpage:R}.pod; \
 	cp ${LCRYPTO_DOC}/${_docs}/$$pod .; \
-	pod2man --section=$$sec --release="0.9.8k" --center="OpenSSL" \
+	pod2man --section=$$sec --release="0.9.8m" --center="OpenSSL" \
 	  $$pod > ${.CURDIR}/man/${manpage}; \
 	rm -f $$pod; \
 	${ECHO} ${manpage})

Modified: head/secure/lib/libcrypto/Makefile.man
==============================================================================
--- head/secure/lib/libcrypto/Makefile.man	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/Makefile.man	Sat Mar 13 19:30:29 2010	(r205129)
@@ -708,6 +708,72 @@ MLINKS+= mdc2.3 MDC2_Init.3
 MLINKS+= mdc2.3 MDC2_Update.3
 MLINKS+= mdc2.3 MDC2_Final.3
 MLINKS+= pem.3 PEM.3
+MLINKS+= pem.3 PEM_read_bio_PrivateKey.3
+MLINKS+= pem.3 PEM_read_PrivateKey.3
+MLINKS+= pem.3 PEM_write_bio_PrivateKey.3
+MLINKS+= pem.3 PEM_write_PrivateKey.3
+MLINKS+= pem.3 PEM_write_bio_PKCS8PrivateKey.3
+MLINKS+= pem.3 PEM_write_PKCS8PrivateKey.3
+MLINKS+= pem.3 PEM_write_bio_PKCS8PrivateKey_nid.3
+MLINKS+= pem.3 PEM_write_PKCS8PrivateKey_nid.3
+MLINKS+= pem.3 PEM_read_bio_PUBKEY.3
+MLINKS+= pem.3 PEM_read_PUBKEY.3
+MLINKS+= pem.3 PEM_write_bio_PUBKEY.3
+MLINKS+= pem.3 PEM_write_PUBKEY.3
+MLINKS+= pem.3 PEM_read_bio_RSAPrivateKey.3
+MLINKS+= pem.3 PEM_read_RSAPrivateKey.3
+MLINKS+= pem.3 PEM_write_bio_RSAPrivateKey.3
+MLINKS+= pem.3 PEM_write_RSAPrivateKey.3
+MLINKS+= pem.3 PEM_read_bio_RSAPublicKey.3
+MLINKS+= pem.3 PEM_read_RSAPublicKey.3
+MLINKS+= pem.3 PEM_write_bio_RSAPublicKey.3
+MLINKS+= pem.3 PEM_write_RSAPublicKey.3
+MLINKS+= pem.3 PEM_read_bio_RSA_PUBKEY.3
+MLINKS+= pem.3 PEM_read_RSA_PUBKEY.3
+MLINKS+= pem.3 PEM_write_bio_RSA_PUBKEY.3
+MLINKS+= pem.3 PEM_write_RSA_PUBKEY.3
+MLINKS+= pem.3 PEM_read_bio_DSAPrivateKey.3
+MLINKS+= pem.3 PEM_read_DSAPrivateKey.3
+MLINKS+= pem.3 PEM_write_bio_DSAPrivateKey.3
+MLINKS+= pem.3 PEM_write_DSAPrivateKey.3
+MLINKS+= pem.3 PEM_read_bio_DSA_PUBKEY.3
+MLINKS+= pem.3 PEM_read_DSA_PUBKEY.3
+MLINKS+= pem.3 PEM_write_bio_DSA_PUBKEY.3
+MLINKS+= pem.3 PEM_write_DSA_PUBKEY.3
+MLINKS+= pem.3 PEM_read_bio_DSAparams.3
+MLINKS+= pem.3 PEM_read_DSAparams.3
+MLINKS+= pem.3 PEM_write_bio_DSAparams.3
+MLINKS+= pem.3 PEM_write_DSAparams.3
+MLINKS+= pem.3 PEM_read_bio_DHparams.3
+MLINKS+= pem.3 PEM_read_DHparams.3
+MLINKS+= pem.3 PEM_write_bio_DHparams.3
+MLINKS+= pem.3 PEM_write_DHparams.3
+MLINKS+= pem.3 PEM_read_bio_X509.3
+MLINKS+= pem.3 PEM_read_X509.3
+MLINKS+= pem.3 PEM_write_bio_X509.3
+MLINKS+= pem.3 PEM_write_X509.3
+MLINKS+= pem.3 PEM_read_bio_X509_AUX.3
+MLINKS+= pem.3 PEM_read_X509_AUX.3
+MLINKS+= pem.3 PEM_write_bio_X509_AUX.3
+MLINKS+= pem.3 PEM_write_X509_AUX.3
+MLINKS+= pem.3 PEM_read_bio_X509_REQ.3
+MLINKS+= pem.3 PEM_read_X509_REQ.3
+MLINKS+= pem.3 PEM_write_bio_X509_REQ.3
+MLINKS+= pem.3 PEM_write_X509_REQ.3
+MLINKS+= pem.3 PEM_write_bio_X509_REQ_NEW.3
+MLINKS+= pem.3 PEM_write_X509_REQ_NEW.3
+MLINKS+= pem.3 PEM_read_bio_X509_CRL.3
+MLINKS+= pem.3 PEM_read_X509_CRL.3
+MLINKS+= pem.3 PEM_write_bio_X509_CRL.3
+MLINKS+= pem.3 PEM_write_X509_CRL.3
+MLINKS+= pem.3 PEM_read_bio_PKCS7.3
+MLINKS+= pem.3 PEM_read_PKCS7.3
+MLINKS+= pem.3 PEM_write_bio_PKCS7.3
+MLINKS+= pem.3 PEM_write_PKCS7.3
+MLINKS+= pem.3 PEM_read_bio_NETSCAPE_CERT_SEQUENCE.3
+MLINKS+= pem.3 PEM_read_NETSCAPE_CERT_SEQUENCE.3
+MLINKS+= pem.3 PEM_write_bio_NETSCAPE_CERT_SEQUENCE.3
+MLINKS+= pem.3 PEM_write_NETSCAPE_CERT_SEQUENCE.3
 MLINKS+= rc4.3 RC4_set_key.3
 MLINKS+= rc4.3 RC4.3
 MLINKS+= ripemd.3 RIPEMD160.3

Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ASN1_OBJECT_new 3"
-.TH ASN1_OBJECT_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ASN1_OBJECT_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ASN1_OBJECT_new, ASN1_OBJECT_free, \- object allocation functions
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3
==============================================================================
--- head/secure/lib/libcrypto/man/ASN1_STRING_length.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_length 3"
-.TH ASN1_STRING_length 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ASN1_STRING_length 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length,
 ASN1_STRING_length_set, ASN1_STRING_type, ASN1_STRING_data \-

Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/ASN1_STRING_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_new 3"
-.TH ASN1_STRING_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ASN1_STRING_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ASN1_STRING_new, ASN1_STRING_type_new, ASN1_STRING_free \-
 ASN1_STRING allocation functions

Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
==============================================================================
--- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_print_ex 3"
-.TH ASN1_STRING_print_ex 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ASN1_STRING_print_ex 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp \- ASN1_STRING output routines.
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3
==============================================================================
--- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ASN1_generate_nconf 3"
-.TH ASN1_generate_nconf 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ASN1_generate_nconf 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ASN1_generate_nconf, ASN1_generate_v3 \- ASN1 generation functions
 .SH "SYNOPSIS"
@@ -277,7 +277,7 @@ An IA5String explicitly tagged using \s-
 A \s-1BITSTRING\s0 with bits 1 and 5 set and all others zero:
 .PP
 .Vb 1
-\& FORMAT=BITLIST,BITSTRING:1,5
+\& FORMAT:BITLIST,BITSTRING:1,5
 .Ve
 .PP
 A more complex example using a config file to produce a

Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_ctrl.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_ctrl.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_ctrl 3"
-.TH BIO_ctrl 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_ctrl 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset,
 BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close,

Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_base64.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_base64.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_base64 3"
-.TH BIO_f_base64 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_base64 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_base64 \- base64 BIO filter
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_buffer.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_buffer.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_buffer 3"
-.TH BIO_f_buffer 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_buffer 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_buffer \- buffering BIO
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_cipher.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_cipher.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_cipher 3"
-.TH BIO_f_cipher 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_cipher 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- cipher BIO filter
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_f_md.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_md.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_md.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_md 3"
-.TH BIO_f_md 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_md 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest BIO filter
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_f_null.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_null.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_null.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_null 3"
-.TH BIO_f_null 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_null 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_null \- null filter
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_f_ssl.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_f_ssl.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_f_ssl 3"
-.TH BIO_f_ssl 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_f_ssl 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes,
 BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl,

Modified: head/secure/lib/libcrypto/man/BIO_find_type.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_find_type.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_find_type.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_find_type 3"
-.TH BIO_find_type 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_find_type 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_find_type, BIO_next \- BIO chain traversal
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_new 3"
-.TH BIO_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all \- BIO allocation and freeing functions
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_push.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_push.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_push.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_push 3"
-.TH BIO_push 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_push 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_push, BIO_pop \- add and remove BIOs from a chain.
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_read.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_read.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_read.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_read 3"
-.TH BIO_read 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_read 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_read, BIO_write, BIO_gets, BIO_puts \- BIO I/O functions
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_accept.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_accept.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_accept 3"
-.TH BIO_s_accept 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_accept 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_accept, BIO_set_accept_port, BIO_get_accept_port,
 BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode,

Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_bio.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_bio.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_bio 3"
-.TH BIO_s_bio 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_bio 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr, 
 BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair,

Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_connect.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_connect.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_connect 3"
-.TH BIO_s_connect 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_connect 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port,
 BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname,

Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_fd.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_fd.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_fd 3"
-.TH BIO_s_fd 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_fd 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor BIO
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_s_file.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_file.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_file.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_file 3"
-.TH BIO_s_file 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_file 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp,
 BIO_read_filename, BIO_write_filename, BIO_append_filename,

Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_mem.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_mem.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_mem 3"
-.TH BIO_s_mem 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_mem 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf,
 BIO_get_mem_ptr, BIO_new_mem_buf \- memory BIO

Modified: head/secure/lib/libcrypto/man/BIO_s_null.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_null.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_null.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_null 3"
-.TH BIO_s_null 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_null 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_null \- null data sink
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_s_socket.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_s_socket.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_s_socket 3"
-.TH BIO_s_socket 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_s_socket 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_s_socket, BIO_new_socket \- socket BIO
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_set_callback.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_set_callback.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_set_callback 3"
-.TH BIO_set_callback 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_set_callback 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg,
 BIO_debug_callback \- BIO callback functions

Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3
==============================================================================
--- head/secure/lib/libcrypto/man/BIO_should_retry.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BIO_should_retry.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BIO_should_retry 3"
-.TH BIO_should_retry 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BIO_should_retry 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BIO_should_retry, BIO_should_read, BIO_should_write,
 BIO_should_io_special, BIO_retry_type, BIO_should_retry,

Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_BLINDING_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_BLINDING_new 3"
-.TH BN_BLINDING_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_BLINDING_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_BLINDING_new, BN_BLINDING_free, BN_BLINDING_update, BN_BLINDING_convert, 
 BN_BLINDING_invert, BN_BLINDING_convert_ex, BN_BLINDING_invert_ex, 

Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_CTX_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_CTX_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_CTX_new 3"
-.TH BN_CTX_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_CTX_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_CTX_new, BN_CTX_init, BN_CTX_free \- allocate and free BN_CTX structures
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_CTX_start.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_CTX_start.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_CTX_start 3"
-.TH BN_CTX_start 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_CTX_start 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary BIGNUM variables
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_add.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_add.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_add.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_add 3"
-.TH BN_add 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_add 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_add, BN_sub, BN_mul, BN_sqr, BN_div, BN_mod, BN_nnmod, BN_mod_add,
 BN_mod_sub, BN_mod_mul, BN_mod_sqr, BN_exp, BN_mod_exp, BN_gcd \-

Modified: head/secure/lib/libcrypto/man/BN_add_word.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_add_word.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_add_word.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_add_word 3"
-.TH BN_add_word 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_add_word 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_add_word, BN_sub_word, BN_mul_word, BN_div_word, BN_mod_word \- arithmetic
 functions on BIGNUMs with integers

Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_bn2bin.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_bn2bin.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_bn2bin 3"
-.TH BN_bn2bin 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_bn2bin 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_bn2bin, BN_bin2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn,
 BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions

Modified: head/secure/lib/libcrypto/man/BN_cmp.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_cmp.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_cmp.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_cmp 3"
-.TH BN_cmp 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_cmp 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd \- BIGNUM comparison and test functions
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_copy.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_copy.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_copy.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_copy 3"
-.TH BN_copy 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_copy 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_copy, BN_dup \- copy BIGNUMs
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_generate_prime.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_generate_prime.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_generate_prime 3"
-.TH BN_generate_prime 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_generate_prime 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_generate_prime, BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_mod_inverse.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_mod_inverse.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_mod_inverse 3"
-.TH BN_mod_inverse 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_mod_inverse 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_mod_inverse \- compute inverse modulo n
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_mod_mul_montgomery 3"
-.TH BN_mod_mul_montgomery 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_mod_mul_montgomery 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init,
 BN_MONT_CTX_free, BN_MONT_CTX_set, BN_MONT_CTX_copy,

Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_mod_mul_reciprocal 3"
-.TH BN_mod_mul_reciprocal 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_mod_mul_reciprocal 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_mod_mul_reciprocal,  BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init,
 BN_RECP_CTX_free, BN_RECP_CTX_set \- modular multiplication using

Modified: head/secure/lib/libcrypto/man/BN_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_new 3"
-.TH BN_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_new, BN_init, BN_clear, BN_free, BN_clear_free \- allocate and free BIGNUMs
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_num_bytes.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_num_bytes.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_num_bytes 3"
-.TH BN_num_bytes 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_num_bytes 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_num_bits, BN_num_bytes, BN_num_bits_word \- get BIGNUM size
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_rand.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_rand.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_rand.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_rand 3"
-.TH BN_rand 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_rand 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_rand, BN_pseudo_rand \- generate pseudo\-random number
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_set_bit.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_set_bit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_set_bit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_set_bit 3"
-.TH BN_set_bit 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_set_bit 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift,
 BN_lshift1, BN_rshift, BN_rshift1 \- bit operations on BIGNUMs

Modified: head/secure/lib/libcrypto/man/BN_swap.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_swap.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_swap.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_swap 3"
-.TH BN_swap 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_swap 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_swap \- exchange BIGNUMs
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/BN_zero.3
==============================================================================
--- head/secure/lib/libcrypto/man/BN_zero.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/BN_zero.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BN_zero 3"
-.TH BN_zero 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH BN_zero 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word \- BIGNUM assignment
 operations

Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3
==============================================================================
--- head/secure/lib/libcrypto/man/CONF_modules_free.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/CONF_modules_free.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONF_modules_free 3"
-.TH CONF_modules_free 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH CONF_modules_free 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 .Vb 2
 \& CONF_modules_free, CONF_modules_finish, CONF_modules_unload -

Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3
==============================================================================
--- head/secure/lib/libcrypto/man/CONF_modules_load_file.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONF_modules_load_file 3"
-.TH CONF_modules_load_file 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH CONF_modules_load_file 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 .Vb 1
 \& CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions

Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3
==============================================================================
--- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CRYPTO_set_ex_data 3"
-.TH CRYPTO_set_ex_data 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH CRYPTO_set_ex_data 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 CRYPTO_set_ex_data, CRYPTO_get_ex_data \- internal application specific data functions
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DH_generate_key.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_generate_key.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_generate_key.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_generate_key 3"
-.TH DH_generate_key 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_generate_key, DH_compute_key \- perform Diffie\-Hellman key exchange
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_generate_parameters.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_generate_parameters.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_generate_parameters 3"
-.TH DH_generate_parameters 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_generate_parameters, DH_check \- generate and check Diffie\-Hellman parameters
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_get_ex_new_index 3"
-.TH DH_get_ex_new_index 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data \- add application specific data to DH structures
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DH_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_new 3"
-.TH DH_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_new, DH_free \- allocate and free DH objects
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DH_set_method.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_set_method.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_set_method.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_set_method 3"
-.TH DH_set_method 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_set_default_method, DH_get_default_method,
 DH_set_method, DH_new_method, DH_OpenSSL \- select DH method

Modified: head/secure/lib/libcrypto/man/DH_size.3
==============================================================================
--- head/secure/lib/libcrypto/man/DH_size.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DH_size.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DH_size 3"
-.TH DH_size 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DH_size 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DH_size \- get Diffie\-Hellman prime size
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_SIG_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_SIG_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_SIG_new 3"
-.TH DSA_SIG_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_SIG_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_SIG_new, DSA_SIG_free \- allocate and free DSA signature objects
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_do_sign.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_do_sign.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_do_sign 3"
-.TH DSA_do_sign 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_do_sign 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_do_sign, DSA_do_verify \- raw DSA signature operations
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_dup_DH.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_dup_DH.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_dup_DH 3"
-.TH DSA_dup_DH 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_dup_DH 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_dup_DH \- create a DH structure out of DSA structure
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_generate_key.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_generate_key.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_generate_key 3"
-.TH DSA_generate_key 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_generate_key 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_generate_key \- generate DSA key pair
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_generate_parameters.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_generate_parameters 3"
-.TH DSA_generate_parameters 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_generate_parameters 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_generate_parameters \- generate DSA parameters
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_get_ex_new_index 3"
-.TH DSA_get_ex_new_index 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_get_ex_new_index 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data \- add application specific data to DSA structures
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_new 3"
-.TH DSA_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_new, DSA_free \- allocate and free DSA objects
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_set_method.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_set_method.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_set_method.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_set_method 3"
-.TH DSA_set_method 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_set_method 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_set_default_method, DSA_get_default_method,
 DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method

Modified: head/secure/lib/libcrypto/man/DSA_sign.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_sign.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_sign.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_sign 3"
-.TH DSA_sign 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_sign 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_sign, DSA_sign_setup, DSA_verify \- DSA signatures
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/DSA_size.3
==============================================================================
--- head/secure/lib/libcrypto/man/DSA_size.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/DSA_size.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "DSA_size 3"
-.TH DSA_size 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH DSA_size 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 DSA_size \- get DSA signature size
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ERR_GET_LIB.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_GET_LIB.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_GET_LIB.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_GET_LIB 3"
-.TH ERR_GET_LIB 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_GET_LIB 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON \- get library, function and
 reason code

Modified: head/secure/lib/libcrypto/man/ERR_clear_error.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_clear_error.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_clear_error.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_clear_error 3"
-.TH ERR_clear_error 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_clear_error 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_clear_error \- clear the error queue
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ERR_error_string.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_error_string.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_error_string.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_error_string 3"
-.TH ERR_error_string 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_error_string 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_error_string, ERR_error_string_n, ERR_lib_error_string,
 ERR_func_error_string, ERR_reason_error_string \- obtain human\-readable

Modified: head/secure/lib/libcrypto/man/ERR_get_error.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_get_error.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_get_error.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_get_error 3"
-.TH ERR_get_error 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_get_error 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_get_error, ERR_peek_error, ERR_peek_last_error,
 ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line,

Modified: head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_load_crypto_strings 3"
-.TH ERR_load_crypto_strings 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_load_crypto_strings 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_load_crypto_strings, SSL_load_error_strings, ERR_free_strings \-
 load and free error strings

Modified: head/secure/lib/libcrypto/man/ERR_load_strings.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_load_strings.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_load_strings.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_load_strings 3"
-.TH ERR_load_strings 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_load_strings 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_load_strings, ERR_PACK, ERR_get_next_error_library \- load
 arbitrary error strings

Modified: head/secure/lib/libcrypto/man/ERR_print_errors.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_print_errors.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_print_errors.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_print_errors 3"
-.TH ERR_print_errors 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_print_errors 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_print_errors, ERR_print_errors_fp \- print error messages
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ERR_put_error.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_put_error.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_put_error.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_put_error 3"
-.TH ERR_put_error 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_put_error 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_put_error, ERR_add_error_data \- record an error
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ERR_remove_state.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_remove_state.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_remove_state.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_remove_state 3"
-.TH ERR_remove_state 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_remove_state 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_remove_state \- free a thread's error queue
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/ERR_set_mark.3
==============================================================================
--- head/secure/lib/libcrypto/man/ERR_set_mark.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/ERR_set_mark.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "ERR_set_mark 3"
-.TH ERR_set_mark 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH ERR_set_mark 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 ERR_set_mark, ERR_pop_to_mark \- set marks and pop errors until mark
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/EVP_BytesToKey.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_BytesToKey.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_BytesToKey.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_BytesToKey 3"
-.TH EVP_BytesToKey 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_BytesToKey 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_BytesToKey \- password based encryption routine
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/EVP_DigestInit.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_DigestInit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_DigestInit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_DigestInit 3"
-.TH EVP_DigestInit 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_DigestInit 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate,
 EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE,
@@ -214,9 +214,9 @@ EVP digest routines
 .IX Header "DESCRIPTION"
 The \s-1EVP\s0 digest routines are a high level interface to message digests.
 .PP
-\&\fIEVP_MD_CTX_init()\fR initializes digest contet \fBctx\fR.
+\&\fIEVP_MD_CTX_init()\fR initializes digest context \fBctx\fR.
 .PP
-\&\fIEVP_MD_CTX_create()\fR allocates, initializes and returns a digest contet.
+\&\fIEVP_MD_CTX_create()\fR allocates, initializes and returns a digest context.
 .PP
 \&\fIEVP_DigestInit_ex()\fR sets up digest context \fBctx\fR to use a digest
 \&\fBtype\fR from \s-1ENGINE\s0 \fBimpl\fR. \fBctx\fR must be initialized before calling this
@@ -252,7 +252,7 @@ the passed context \fBctx\fR does not ha
 uses the default digest implementation.
 .PP
 \&\fIEVP_DigestFinal()\fR is similar to \fIEVP_DigestFinal_ex()\fR except the digest
-contet \fBctx\fR is automatically cleaned up.
+context \fBctx\fR is automatically cleaned up.
 .PP
 \&\fIEVP_MD_CTX_copy()\fR is similar to \fIEVP_MD_CTX_copy_ex()\fR except the destination
 \&\fBout\fR does not have to be initialized.

Modified: head/secure/lib/libcrypto/man/EVP_EncryptInit.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_EncryptInit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_EncryptInit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_EncryptInit 3"
-.TH EVP_EncryptInit 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_EncryptInit 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_CIPHER_CTX_init, EVP_EncryptInit_ex, EVP_EncryptUpdate,
 EVP_EncryptFinal_ex, EVP_DecryptInit_ex, EVP_DecryptUpdate,

Modified: head/secure/lib/libcrypto/man/EVP_OpenInit.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_OpenInit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_OpenInit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_OpenInit 3"
-.TH EVP_OpenInit 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_OpenInit 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal \- EVP envelope decryption
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/EVP_PKEY_new.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_PKEY_new.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_PKEY_new.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_PKEY_new 3"
-.TH EVP_PKEY_new 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_PKEY_new 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_PKEY_new, EVP_PKEY_free \- private key allocation functions.
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_PKEY_set1_RSA 3"
-.TH EVP_PKEY_set1_RSA 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_PKEY_set1_RSA 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH, EVP_PKEY_set1_EC_KEY,
 EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA, EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY,

Modified: head/secure/lib/libcrypto/man/EVP_SealInit.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_SealInit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_SealInit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "EVP_SealInit 3"
-.TH EVP_SealInit 3 "2009-06-14" "0.9.8k" "OpenSSL"
+.TH EVP_SealInit 3 "2010-03-13" "0.9.8m" "OpenSSL"
 .SH "NAME"
 EVP_SealInit, EVP_SealUpdate, EVP_SealFinal \- EVP envelope encryption
 .SH "SYNOPSIS"

Modified: head/secure/lib/libcrypto/man/EVP_SignInit.3
==============================================================================
--- head/secure/lib/libcrypto/man/EVP_SignInit.3	Sat Mar 13 19:22:41 2010	(r205128)
+++ head/secure/lib/libcrypto/man/EVP_SignInit.3	Sat Mar 13 19:30:29 2010	(r205129)
@@ -129,7 +129,7 @@
 .\" ========================================================================

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 19:54:17 2010
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F2B81065670;
	Sat, 13 Mar 2010 19:54:17 +0000 (UTC)
	(envelope-from rrs@lakerest.net)
Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d])
	by mx1.freebsd.org (Postfix) with ESMTP id 0912F8FC2C;
	Sat, 13 Mar 2010 19:54:16 +0000 (UTC)
Received: from [10.10.1.82] (s224.GtokyoFL6.vectant.ne.jp [222.228.90.224])
	(authenticated bits=0)
	by lakerest.net (8.14.3/8.14.3) with ESMTP id o2DJsCpS073694
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
	Sat, 13 Mar 2010 14:54:14 -0500 (EST)
	(envelope-from rrs@lakerest.net)
Message-Id: <17A93DA8-4022-4AA6-B1B2-28CD3E7719C2@lakerest.net>
From: Randall Stewart 
To: Bruce Simpson 
In-Reply-To: <4B9B99A9.7040904@incunabulum.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Sun, 14 Mar 2010 04:54:11 +0900
References: <201003122258.o2CMwqDM039077@svn.freebsd.org>
	
	<2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net>
	<92C0A9B0-9297-4F56-A6A1-603006423230@FreeBSD.org>
	<4B9B99A9.7040904@incunabulum.net>
X-Mailer: Apple Mail (2.936)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, "Robert N. M. Watson" 
Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet
	netinet6
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 19:54:17 -0000

Hmm... M_PROTO* good idea ;-)


On Mar 13, 2010, at 10:56 PM, Bruce Simpson wrote:

> On 03/13/10 13:53, Robert N. M. Watson wrote:
>> On Mar 13, 2010, at 1:50 PM, Randall Stewart wrote:
>>
>>> I could refactor that this way if you want... it would mean a few  
>>> more de-ref's and
>>> looking to see if its a v4 or v6 packet and then doing the proper  
>>> offset...
>>>
>
> This is the sort of thing which M_PROTO* flags are good for.
>
> Derefs in the hot path should be amortized whenever that makes sense.
>

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)


From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 20:43:11 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 80367106564A;
	Sat, 13 Mar 2010 20:43: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 6E6318FC15;
	Sat, 13 Mar 2010 20:43: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 o2DKhBtn028184;
	Sat, 13 Mar 2010 20:43:11 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DKhBMu028182;
	Sat, 13 Mar 2010 20:43:11 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201003132043.o2DKhBMu028182@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 13 Mar 2010 20:43: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: r205130 - head/bin/sh
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 20:43:11 -0000

Author: jilles
Date: Sat Mar 13 20:43:11 2010
New Revision: 205130
URL: http://svn.freebsd.org/changeset/base/205130

Log:
  sh: Fix longjmp clobber warnings in parser.c.
  
  Make parsebackq a function instead of an emulated nested function.
  This puts the setjmp usage in a smaller function where it is easier to avoid
  bad optimizations.

Modified:
  head/bin/sh/parser.c

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Sat Mar 13 19:30:29 2010	(r205129)
+++ head/bin/sh/parser.c	Sat Mar 13 20:43:11 2010	(r205130)
@@ -863,6 +863,164 @@ breakloop:
 }
 
 
+/*
+ * Called to parse command substitutions.
+ */
+
+STATIC char *
+parsebackq(char *out, struct nodelist **pbqlist,
+		int oldstyle, int dblquote, int quoted)
+{
+	struct nodelist **nlpp;
+	union node *n;
+	char *volatile str;
+	struct jmploc jmploc;
+	struct jmploc *const savehandler = handler;
+	int savelen;
+	int saveprompt;
+	const int bq_startlinno = plinno;
+	char *volatile ostr = NULL;
+	struct parsefile *const savetopfile = getcurrentfile();
+
+	str = NULL;
+	if (setjmp(jmploc.loc)) {
+		popfilesupto(savetopfile);
+		if (str)
+			ckfree(str);
+		if (ostr)
+			ckfree(ostr);
+		handler = savehandler;
+		if (exception == EXERROR) {
+			startlinno = bq_startlinno;
+			synerror("Error in command substitution");
+		}
+		longjmp(handler->loc, 1);
+	}
+	INTOFF;
+	savelen = out - stackblock();
+	if (savelen > 0) {
+		str = ckmalloc(savelen);
+		memcpy(str, stackblock(), savelen);
+	}
+	handler = &jmploc;
+	INTON;
+        if (oldstyle) {
+                /* We must read until the closing backquote, giving special
+                   treatment to some slashes, and then push the string and
+                   reread it as input, interpreting it normally.  */
+                char *oout;
+                int c;
+                int olen;
+
+
+                STARTSTACKSTR(oout);
+		for (;;) {
+			if (needprompt) {
+				setprompt(2);
+				needprompt = 0;
+			}
+			switch (c = pgetc()) {
+			case '`':
+				goto done;
+
+			case '\\':
+                                if ((c = pgetc()) == '\n') {
+					plinno++;
+					if (doprompt)
+						setprompt(2);
+					else
+						setprompt(0);
+					/*
+					 * If eating a newline, avoid putting
+					 * the newline into the new character
+					 * stream (via the STPUTC after the
+					 * switch).
+					 */
+					continue;
+				}
+                                if (c != '\\' && c != '`' && c != '$'
+                                    && (!dblquote || c != '"'))
+                                        STPUTC('\\', oout);
+				break;
+
+			case '\n':
+				plinno++;
+				needprompt = doprompt;
+				break;
+
+			case PEOF:
+			        startlinno = plinno;
+				synerror("EOF in backquote substitution");
+ 				break;
+
+			default:
+				break;
+			}
+			STPUTC(c, oout);
+                }
+done:
+                STPUTC('\0', oout);
+                olen = oout - stackblock();
+		INTOFF;
+		ostr = ckmalloc(olen);
+		memcpy(ostr, stackblock(), olen);
+		setinputstring(ostr, 1);
+		INTON;
+        }
+	nlpp = pbqlist;
+	while (*nlpp)
+		nlpp = &(*nlpp)->next;
+	*nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
+	(*nlpp)->next = NULL;
+
+	if (oldstyle) {
+		saveprompt = doprompt;
+		doprompt = 0;
+	}
+
+	n = list(0);
+
+	if (oldstyle)
+		doprompt = saveprompt;
+	else {
+		if (readtoken() != TRP)
+			synexpect(TRP);
+	}
+
+	(*nlpp)->n = n;
+        if (oldstyle) {
+		/*
+		 * Start reading from old file again, ignoring any pushed back
+		 * tokens left from the backquote parsing
+		 */
+                popfile();
+		tokpushback = 0;
+	}
+	while (stackblocksize() <= savelen)
+		growstackblock();
+	STARTSTACKSTR(out);
+	if (str) {
+		memcpy(out, str, savelen);
+		STADJUST(savelen, out);
+		INTOFF;
+		ckfree(str);
+		str = NULL;
+		INTON;
+	}
+	if (ostr) {
+		INTOFF;
+		ckfree(ostr);
+		ostr = NULL;
+		INTON;
+	}
+	handler = savehandler;
+	if (quoted)
+		USTPUTC(CTLBACKQ | CTLQUOTE, out);
+	else
+		USTPUTC(CTLBACKQ, out);
+	return out;
+}
+
 
 /*
  * If eofmark is NULL, read a word or a redirection symbol.  If eofmark
@@ -879,8 +1037,6 @@ breakloop:
 #define CHECKEND()	{goto checkend; checkend_return:;}
 #define PARSEREDIR()	{goto parseredir; parseredir_return:;}
 #define PARSESUB()	{goto parsesub; parsesub_return:;}
-#define PARSEBACKQOLD()	{oldstyle = 1; goto parsebackq; parsebackq_oldreturn:;}
-#define PARSEBACKQNEW()	{oldstyle = 0; goto parsebackq; parsebackq_newreturn:;}
 #define	PARSEARITH()	{goto parsearith; parsearith_return:;}
 
 STATIC int
@@ -896,7 +1052,6 @@ readtoken1(int firstc, char const *synta
 	int varnest;	/* levels of variables expansion */
 	int arinest;	/* levels of arithmetic expansion */
 	int parenlevel;	/* levels of parens in arithmetic */
-	int oldstyle;
 	char const *prevsyntax;	/* syntax before arithmetic */
 	int synentry;
 
@@ -1029,7 +1184,8 @@ readtoken1(int firstc, char const *synta
 				}
 				break;
 			case CBQUOTE:	/* '`' */
-				PARSEBACKQOLD();
+				out = parsebackq(out, &bqlist, 1, dblquote,
+						arinest || dblquote);
 				break;
 			case CEOF:
 				goto endword;		/* exit outer loop */
@@ -1189,7 +1345,8 @@ parsesub: {
 			PARSEARITH();
 		} else {
 			pungetc();
-			PARSEBACKQNEW();
+			out = parsebackq(out, &bqlist, 0, dblquote,
+					arinest || dblquote);
 		}
 	} else {
 		USTPUTC(CTLVAR, out);
@@ -1296,167 +1453,6 @@ parsesub: {
 
 
 /*
- * Called to parse command substitutions.  Newstyle is set if the command
- * is enclosed inside $(...); nlpp is a pointer to the head of the linked
- * list of commands (passed by reference), and savelen is the number of
- * characters on the top of the stack which must be preserved.
- */
-
-parsebackq: {
-	struct nodelist **nlpp;
-	union node *n;
-	char *volatile str;
-	struct jmploc jmploc;
-	struct jmploc *const savehandler = handler;
-	int savelen;
-	int saveprompt;
-	const int bq_startlinno = plinno;
-	char *volatile ostr = NULL;
-	struct parsefile *const savetopfile = getcurrentfile();
-
-	str = NULL;
-	if (setjmp(jmploc.loc)) {
-		popfilesupto(savetopfile);
-		if (str)
-			ckfree(str);
-		if (ostr)
-			ckfree(ostr);
-		handler = savehandler;
-		if (exception == EXERROR) {
-			startlinno = bq_startlinno;
-			synerror("Error in command substitution");
-		}
-		longjmp(handler->loc, 1);
-	}
-	INTOFF;
-	savelen = out - stackblock();
-	if (savelen > 0) {
-		str = ckmalloc(savelen);
-		memcpy(str, stackblock(), savelen);
-	}
-	handler = &jmploc;
-	INTON;
-        if (oldstyle) {
-                /* We must read until the closing backquote, giving special
-                   treatment to some slashes, and then push the string and
-                   reread it as input, interpreting it normally.  */
-                char *oout;
-                int c;
-                int olen;
-
-
-                STARTSTACKSTR(oout);
-		for (;;) {
-			if (needprompt) {
-				setprompt(2);
-				needprompt = 0;
-			}
-			switch (c = pgetc()) {
-			case '`':
-				goto done;
-
-			case '\\':
-                                if ((c = pgetc()) == '\n') {
-					plinno++;
-					if (doprompt)
-						setprompt(2);
-					else
-						setprompt(0);
-					/*
-					 * If eating a newline, avoid putting
-					 * the newline into the new character
-					 * stream (via the STPUTC after the
-					 * switch).
-					 */
-					continue;
-				}
-                                if (c != '\\' && c != '`' && c != '$'
-                                    && (!dblquote || c != '"'))
-                                        STPUTC('\\', oout);
-				break;
-
-			case '\n':
-				plinno++;
-				needprompt = doprompt;
-				break;
-
-			case PEOF:
-			        startlinno = plinno;
-				synerror("EOF in backquote substitution");
- 				break;
-
-			default:
-				break;
-			}
-			STPUTC(c, oout);
-                }
-done:
-                STPUTC('\0', oout);
-                olen = oout - stackblock();
-		INTOFF;
-		ostr = ckmalloc(olen);
-		memcpy(ostr, stackblock(), olen);
-		setinputstring(ostr, 1);
-		INTON;
-        }
-	nlpp = &bqlist;
-	while (*nlpp)
-		nlpp = &(*nlpp)->next;
-	*nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
-	(*nlpp)->next = NULL;
-
-	if (oldstyle) {
-		saveprompt = doprompt;
-		doprompt = 0;
-	}
-
-	n = list(0);
-
-	if (oldstyle)
-		doprompt = saveprompt;
-	else {
-		if (readtoken() != TRP)
-			synexpect(TRP);
-	}
-
-	(*nlpp)->n = n;
-        if (oldstyle) {
-		/*
-		 * Start reading from old file again, ignoring any pushed back
-		 * tokens left from the backquote parsing
-		 */
-                popfile();
-		tokpushback = 0;
-	}
-	while (stackblocksize() <= savelen)
-		growstackblock();
-	STARTSTACKSTR(out);
-	if (str) {
-		memcpy(out, str, savelen);
-		STADJUST(savelen, out);
-		INTOFF;
-		ckfree(str);
-		str = NULL;
-		INTON;
-	}
-	if (ostr) {
-		INTOFF;
-		ckfree(ostr);
-		ostr = NULL;
-		INTON;
-	}
-	handler = savehandler;
-	if (arinest || dblquote)
-		USTPUTC(CTLBACKQ | CTLQUOTE, out);
-	else
-		USTPUTC(CTLBACKQ, out);
-	if (oldstyle)
-		goto parsebackq_oldreturn;
-	else
-		goto parsebackq_newreturn;
-}
-
-/*
  * Parse an arithmetic expansion (indicate start of one and set state)
  */
 parsearith: {

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 21:13:52 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB3611065700;
	Sat, 13 Mar 2010 21:13:52 +0000 (UTC)
	(envelope-from yanefbsd@gmail.com)
Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com
	[209.85.160.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A0D18FC25;
	Sat, 13 Mar 2010 21:13:52 +0000 (UTC)
Received: by pwj4 with SMTP id 4so1473870pwj.13
	for ; Sat, 13 Mar 2010 13:13:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=jSnK9l9+yaNO6wr9evNGfyQW7lLtXzUh8XdQSfNN8O8=;
	b=dHLjKWVfYQS34wdqCn+/onJjfpJXyGyMlsu8lKhz8l0Fz/CwvfnfVjybFJYnToqwLE
	q7NNwEruOvpxHwSbdbLC0rAXIG+V+LexPib8rzxzomlKRdFeEbCXA2PGC+C9L+kgMs7q
	ykHaTwD2Fe94qtPxaQwAYGlxq40SLomYeYE8k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=nY0DV9Yhx3DTxhWYnQkO4/avfs7D32GaO6MtljzoghgwL6LI67uTRKPMkpfMiAzGjP
	bhx8QTzrawPUFO3QGpuIXj3+oSTp5cQuL9uyJ6nsWRq6PF8ObbN3Dx8F0jNqlLn9LS2b
	sQG0fX5hZsJ3FJk/z6n/7S9v/eqVNqsTkUNuk=
MIME-Version: 1.0
Received: by 10.143.24.17 with SMTP id b17mr2270532wfj.266.1268514831858; Sat, 
	13 Mar 2010 13:13:51 -0800 (PST)
In-Reply-To: <201003131108.o2DB8vmu001454@svn.freebsd.org>
References: <201003131108.o2DB8vmu001454@svn.freebsd.org>
Date: Sat, 13 Mar 2010 13:13:51 -0800
Message-ID: <7d6fde3d1003131313l3559b6dbt1566fb23be150408@mail.gmail.com>
From: Garrett Cooper 
To: Bruce Cran 
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: r205118 - head/sbin/sysctl
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 21:13:52 -0000

On Sat, Mar 13, 2010 at 3:08 AM, Bruce Cran  wrote:
> Author: brucec
> Date: Sat Mar 13 11:08:57 2010
> New Revision: 205118
> URL: http://svn.freebsd.org/changeset/base/205118
>
> Log:
> =A0Free the memory allocated via strdup.
>
> =A0PR: =A0 =A0 =A0 =A0 =A0 bin/113881
> =A0Submitted by: Alexander Drozdov =A0dzal_mail mtu-net.ru
> =A0Approved by: =A0rrs (mentor)
> =A0MFC after: =A0 =A01 week
>
> Modified:
> =A0head/sbin/sysctl/sysctl.c
>
> Modified: head/sbin/sysctl/sysctl.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/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:06:47 2010 =A0 =A0 =A0 =
=A0(r205117)
> +++ head/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:08:57 2010 =A0 =A0 =A0 =
=A0(r205118)
> @@ -382,6 +382,7 @@ S_timeval(int l2, void *p)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (*p2 =3D=3D '\n')
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*p2 =3D '\0';
> =A0 =A0 =A0 =A0fputs(p1, stdout);
> + =A0 =A0 =A0 free(p1);
> =A0 =A0 =A0 =A0return (0);
> =A0}

    strdup(3) can fail in that section of code, thus the fputs(3)
could segfault:

[gcooper@bayonetta ~]$ cat foo.c
#include 
#include 

int main(void) {
	char *foo =3D NULL;
	fputs(foo, stdout);
	free(foo);
	return 0;
}
[gcooper@bayonetta ~]$ gcc -o foo foo.c
[gcooper@bayonetta ~]$ ./foo
Segmentation fault: 11 (core dumped)

    Could a...

    if (p1 =3D=3D NULL)

    ... be added before the fputs(3) please?

Thanks,
-Garrett

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 21:15:54 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1811B1065673;
	Sat, 13 Mar 2010 21:15:53 +0000 (UTC)
	(envelope-from yanefbsd@gmail.com)
Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com
	[74.125.83.182])
	by mx1.freebsd.org (Postfix) with ESMTP id CBB0A8FC12;
	Sat, 13 Mar 2010 21:15:52 +0000 (UTC)
Received: by pvg3 with SMTP id 3so1057156pvg.13
	for ; Sat, 13 Mar 2010 13:15:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=e/SI24IQKwQKSsJjlhaVN5NiPnAulR84UG5S86zCQg0=;
	b=BAU49C/prO8sCa4y/GDzhH6OvP1Ibfzf+Lu9cGP0QY5V+l5NqIeH9UEo+OQ4EGZ0po
	3dH35oYf2xjKWTv2WMe0C74FV7C6BjWjibEoh2asoBndjCo0p2U73bHxEgkT1K4LQJi+
	IGV2GZmQqdBgfv9jTckOS6VTdP7jHXgR7Idsk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=TPt56LRZqbNUlgkxCzy0hao3Tn0M5qUgUQF/bxIqbi8y28Au1miyrApRhWxpw0MwIk
	IfIrMnrhDKhYr1EtiCSI1bH7maWip6aGW8RqCXwmfUcEjmlucrkftiUY629ZTkF5Oia0
	mrZC3oaSuqHEMRiGj9BLKzqNvA6V7pV1l0ElE=
MIME-Version: 1.0
Received: by 10.142.2.25 with SMTP id 25mr2487885wfb.141.1268514952362; Sat, 
	13 Mar 2010 13:15:52 -0800 (PST)
In-Reply-To: <7d6fde3d1003131313l3559b6dbt1566fb23be150408@mail.gmail.com>
References: <201003131108.o2DB8vmu001454@svn.freebsd.org>
	<7d6fde3d1003131313l3559b6dbt1566fb23be150408@mail.gmail.com>
Date: Sat, 13 Mar 2010 13:15:52 -0800
Message-ID: <7d6fde3d1003131315m361188abj1b7371b37f064b26@mail.gmail.com>
From: Garrett Cooper 
To: Bruce Cran 
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: r205118 - head/sbin/sysctl
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 21:15:54 -0000

On Sat, Mar 13, 2010 at 1:13 PM, Garrett Cooper  wrote:
> On Sat, Mar 13, 2010 at 3:08 AM, Bruce Cran  wrote:
>> Author: brucec
>> Date: Sat Mar 13 11:08:57 2010
>> New Revision: 205118
>> URL: http://svn.freebsd.org/changeset/base/205118
>>
>> Log:
>> =A0Free the memory allocated via strdup.
>>
>> =A0PR: =A0 =A0 =A0 =A0 =A0 bin/113881
>> =A0Submitted by: Alexander Drozdov =A0dzal_mail mtu-net.ru
>> =A0Approved by: =A0rrs (mentor)
>> =A0MFC after: =A0 =A01 week
>>
>> Modified:
>> =A0head/sbin/sysctl/sysctl.c
>>
>> Modified: head/sbin/sysctl/sysctl.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/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:06:47 2010 =A0 =A0 =A0 =
=A0(r205117)
>> +++ head/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:08:57 2010 =A0 =A0 =A0 =
=A0(r205118)
>> @@ -382,6 +382,7 @@ S_timeval(int l2, void *p)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (*p2 =3D=3D '\n')
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*p2 =3D '\0';
>> =A0 =A0 =A0 =A0fputs(p1, stdout);
>> + =A0 =A0 =A0 free(p1);
>> =A0 =A0 =A0 =A0return (0);
>> =A0}
>
> =A0 =A0strdup(3) can fail in that section of code, thus the fputs(3)
> could segfault:
>
> [gcooper@bayonetta ~]$ cat foo.c
> #include 
> #include 
>
> int main(void) {
> =A0 =A0 =A0 =A0char *foo =3D NULL;
> =A0 =A0 =A0 =A0fputs(foo, stdout);
> =A0 =A0 =A0 =A0free(foo);
> =A0 =A0 =A0 =A0return 0;
> }
> [gcooper@bayonetta ~]$ gcc -o foo foo.c
> [gcooper@bayonetta ~]$ ./foo
> Segmentation fault: 11 (core dumped)
>
> =A0 =A0Could a...
>
> =A0 =A0if (p1 =3D=3D NULL)
>
> =A0 =A0... be added before the fputs(3) please?

Sorry... inverted logic. if (p1 !=3D NULL) :P...

Thanks,
-Garrett

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 21:41:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A6DAC106564A;
	Sat, 13 Mar 2010 21:41:53 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7AC458FC17;
	Sat, 13 Mar 2010 21:41: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 o2DLfr6x041205;
	Sat, 13 Mar 2010 21:41:53 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DLfroC041203;
	Sat, 13 Mar 2010 21:41:53 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003132141.o2DLfroC041203@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 13 Mar 2010 21:41: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: r205132 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 21:41:53 -0000

Author: kmacy
Date: Sat Mar 13 21:41:52 2010
New Revision: 205132
URL: http://svn.freebsd.org/changeset/base/205132

Log:
  Don't bottleneck on acquiring the stream locks - this avoids a massive
  drop off in throughput with large numbers of simultaneous reads
  
  MFC after:	7 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c	Sat Mar 13 21:28:14 2010	(r205131)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c	Sat Mar 13 21:41:52 2010	(r205132)
@@ -49,11 +49,11 @@ uint32_t	zfetch_block_cap = 256;
 uint64_t	zfetch_array_rd_sz = 1024 * 1024;
 
 SYSCTL_DECL(_vfs_zfs);
-SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_disable, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_disable, CTLFLAG_RW,
     &zfs_prefetch_disable, 0, "Disable prefetch");
 SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH");
 TUNABLE_INT("vfs.zfs.zfetch.max_streams", &zfetch_max_streams);
-SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_streams, CTLFLAG_RDTUN,
+SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_streams, CTLFLAG_RW,
     &zfetch_max_streams, 0, "Max # of streams per zfetch");
 TUNABLE_INT("vfs.zfs.zfetch.min_sec_reap", &zfetch_min_sec_reap);
 SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, min_sec_reap, CTLFLAG_RDTUN,
@@ -338,8 +338,10 @@ top:
 
 			reset = !prefetched && zs->zst_len > 1;
 
-			mutex_enter(&zs->zst_lock);
-
+			if (mutex_tryenter(&zs->zst_lock) == 0) {
+				rc = 1;
+				goto out;
+			}
 			if (zh->zst_offset != zs->zst_offset + zs->zst_len) {
 				mutex_exit(&zs->zst_lock);
 				goto top;
@@ -363,8 +365,10 @@ top:
 
 			reset = !prefetched && zs->zst_len > 1;
 
-			mutex_enter(&zs->zst_lock);
-
+			if (mutex_tryenter(&zs->zst_lock) == 0) {
+				rc = 1;
+				goto out;
+			}
 			if (zh->zst_offset != zs->zst_offset - zh->zst_len) {
 				mutex_exit(&zs->zst_lock);
 				goto top;
@@ -391,8 +395,10 @@ top:
 		    zs->zst_len) && (zs->zst_len != zs->zst_stride)) {
 			/* strided forward access */
 
-			mutex_enter(&zs->zst_lock);
-
+			if (mutex_tryenter(&zs->zst_lock) == 0) {
+				rc = 1;
+				goto out;
+			}
 			if ((zh->zst_offset - zs->zst_offset - zs->zst_stride >=
 			    zs->zst_len) || (zs->zst_len == zs->zst_stride)) {
 				mutex_exit(&zs->zst_lock);
@@ -408,8 +414,10 @@ top:
 		    zs->zst_len) && (zs->zst_len != zs->zst_stride)) {
 			/* strided reverse access */
 
-			mutex_enter(&zs->zst_lock);
-
+			if (mutex_tryenter(&zs->zst_lock) == 0) {
+				rc = 1;
+				goto out;
+			}
 			if ((zh->zst_offset - zs->zst_offset + zs->zst_stride >=
 			    zs->zst_len) || (zs->zst_len == zs->zst_stride)) {
 				mutex_exit(&zs->zst_lock);

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 21:52:22 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56A551065670;
	Sat, 13 Mar 2010 21:52:22 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 458BC8FC15;
	Sat, 13 Mar 2010 21:52: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 o2DLqM7A043513;
	Sat, 13 Mar 2010 21:52:22 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DLqMMp043510;
	Sat, 13 Mar 2010 21:52:22 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003132152.o2DLqMMp043510@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 13 Mar 2010 21:52: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: r205133 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 21:52:22 -0000

Author: kmacy
Date: Sat Mar 13 21:52:21 2010
New Revision: 205133
URL: http://svn.freebsd.org/changeset/base/205133

Log:
  fix compilation under ZIO_USE_UMA

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Sat Mar 13 21:41:52 2010	(r205132)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Sat Mar 13 21:52:21 2010	(r205133)
@@ -541,6 +541,11 @@ static buf_hash_table_t buf_hash_table;
 
 uint64_t zfs_crc64_table[256];
 
+#ifdef ZIO_USE_UMA
+extern kmem_cache_t	*zio_buf_cache[];
+extern kmem_cache_t	*zio_data_buf_cache[];
+#endif
+
 /*
  * Level 2 ARC
  */
@@ -1896,8 +1901,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t
 	size_t			i;
 	kmem_cache_t		*prev_cache = NULL;
 	kmem_cache_t		*prev_data_cache = NULL;
-	extern kmem_cache_t	*zio_buf_cache[];
-	extern kmem_cache_t	*zio_data_buf_cache[];
 #endif
 
 #ifdef _KERNEL

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Sat Mar 13 21:41:52 2010	(r205132)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Sat Mar 13 21:52:21 2010	(r205133)
@@ -91,13 +91,6 @@ zio_init(void)
 #ifdef ZIO_USE_UMA
 	size_t c;
 #endif
-#if 0
-	vmem_t *data_alloc_arena = NULL;
-
-#ifdef _KERNEL
-	data_alloc_arena = zio_alloc_arena;
-#endif
-#endif
 	zio_cache = kmem_cache_create("zio_cache", sizeof (zio_t), 0,
 	    NULL, NULL, NULL, NULL, NULL, 0);
 
@@ -132,8 +125,7 @@ zio_init(void)
 
 			(void) sprintf(name, "zio_data_buf_%lu", (ulong_t)size);
 			zio_data_buf_cache[c] = kmem_cache_create(name, size,
-			    align, NULL, NULL, NULL, NULL, data_alloc_arena,
-			    KMC_NODEBUG);
+			    align, NULL, NULL, NULL, NULL, NULL, KMC_NODEBUG);
 		}
 	}
 

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 21:53:49 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 472C91065673;
	Sat, 13 Mar 2010 21:53:49 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 36AFB8FC13;
	Sat, 13 Mar 2010 21:53:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2DLrnfV043875;
	Sat, 13 Mar 2010 21:53:49 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DLrn8E043873;
	Sat, 13 Mar 2010 21:53:49 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <201003132153.o2DLrn8E043873@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 13 Mar 2010 21:53: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: r205134 - head/sys/modules/zfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 21:53:49 -0000

Author: kmacy
Date: Sat Mar 13 21:53:48 2010
New Revision: 205134
URL: http://svn.freebsd.org/changeset/base/205134

Log:
  make UMA the default allocator for ZFS buffers - this avoids
  a great deal of contention in kmem_alloc
  
  MFC after:	7 days

Modified:
  head/sys/modules/zfs/Makefile

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Sat Mar 13 21:52:21 2010	(r205133)
+++ head/sys/modules/zfs/Makefile	Sat Mar 13 21:53:48 2010	(r205134)
@@ -63,8 +63,8 @@ ZFS_SRCS=	${ZFS_OBJS:C/.o$/.c/}
 SRCS+=	${ZFS_SRCS}
 SRCS+=	vdev_geom.c
 
-# Use UMA for ZIO allocation. This is not stable.
-#CFLAGS+=-DZIO_USE_UMA
+# Use UMA for ZIO allocation.
+CFLAGS+=-DZIO_USE_UMA
 
 # Use FreeBSD's namecache.
 CFLAGS+=-DFREEBSD_NAMECACHE

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:06:42 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F451106566B;
	Sat, 13 Mar 2010 22:06:42 +0000 (UTC)
	(envelope-from onemda@gmail.com)
Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27])
	by mx1.freebsd.org (Postfix) with ESMTP id CB5708FC13;
	Sat, 13 Mar 2010 22:06:41 +0000 (UTC)
Received: by ey-out-2122.google.com with SMTP id 25so140001eya.9
	for ; Sat, 13 Mar 2010 14:06:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type;
	bh=1ysocnjk9/wCNrdsVsHW0L4D2X42p+8nKj0i3vysomQ=;
	b=sk4DiOx9jkpX1n/MWFP/DcVWqNjNEVoIj+4CMW/IyyFVLiGNUrrOWe0Pe8QfR8hn4L
	gBfs7amy8K4xxIYIA+sZhs8uKRIGxSfc8h50NDp5dghEtDmE5SgejMu4HMVQcr0brsdz
	uUVBHc+mg2Ck/JoGszoGSJH7BgYDbuA4EzGOg=
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=sfdUsvnhYy+ZvONV5TsVvIw5mljgeJ78jbQSQdEv6GomiyZSOBlmNVBz+VYKzOzZKr
	cWXZyD5hg+8iqmV0LM8CQ2l91CcbcE5d5UslCpDCphdhV6lFb4NceJvHW2LFbh65WeQg
	Y/pq3wWA/BLiY0MCF3SchR+d5pXT2aontej0M=
MIME-Version: 1.0
Received: by 10.213.55.73 with SMTP id t9mr3834675ebg.31.1268518000550; Sat, 
	13 Mar 2010 14:06:40 -0800 (PST)
In-Reply-To: <201003111756.o2BHukJu042449@svn.freebsd.org>
References: <201003111756.o2BHukJu042449@svn.freebsd.org>
Date: Sat, 13 Mar 2010 22:06:40 +0000
Message-ID: <3a142e751003131406y5ba76e3ckcd0e9b4626089faa@mail.gmail.com>
From: Paul B Mahol 
To: Qing Li 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205024 - head/sys/net
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:06:42 -0000

On 3/11/10, Qing Li  wrote:
> Author: qingli
> Date: Thu Mar 11 17:56:46 2010
> New Revision: 205024
> URL: http://svn.freebsd.org/changeset/base/205024
>
> Log:
>   The if_tap interface is of IFT_ETHERNET type, but it
>   does not set or update the if_link_state variable.
>   As such RT_LINK_IS_UP() fails for the if_tap interface.
>
>   Also, the RT_LINK_IS_UP() needs to bypass all loopback
>   interfaces because loopback interfaces are considered
>   up logically as long as the system is running.
>
>   This patch fixes the above issues by setting and updating
>   the if_link_state variable when the tap interface is
>   opened or closed respectively. Similary approach is
>   already done in the if_tun device.
>
>   MFC after:	3 days
>
> Modified:
>   head/sys/net/if_tap.c
>   head/sys/net/route.h

Look at /sys/dev/if_ndis.c it is still broken.

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:27:26 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83D8F1065673
	for ; Sat, 13 Mar 2010 22:27:26 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id C78468FC20
	for ; Sat, 13 Mar 2010 22:27:25 +0000 (UTC)
Received: (qmail 32136 invoked by uid 399); 13 Mar 2010 22:27:23 -0000
Received: from localhost (HELO foreign.dougb.net)
	(dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 13 Mar 2010 22:27:23 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4B9C114A.4020802@FreeBSD.org>
Date: Sat, 13 Mar 2010 14:27:22 -0800
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US;
	rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1
MIME-Version: 1.0
To: "Simon L. Nielsen" 
References: <201003131922.o2DJMfY4010389@svn.freebsd.org>
In-Reply-To: <201003131922.o2DJMfY4010389@svn.freebsd.org>
X-Enigmail-Version: 1.0.1
OpenPGP: id=D5B2F0FB
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: r205128 - in head: crypto/openssl
 crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes
 crypto/openssl/crypto/aes/asm
 crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio ...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:27:26 -0000

On 03/13/10 11:22, Simon L. Nielsen wrote:
> Author: simon
> Date: Sat Mar 13 19:22:41 2010
> New Revision: 205128
> URL: http://svn.freebsd.org/changeset/base/205128
> 
> Log:
>   Merge OpenSSL 0.9.8m into head.
>   
>   This also "reverts" some FreeBSD local changes so we should now
>   be back to using entirely stock OpenSSL.  The local changes were
>   simple $FreeBSD$ lines additions, which were required in the CVS
>   days, and the patch for FreeBSD-SA-09:15.ssl which has been
>   superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation
>   extension' support.

The $FreeBSD$ on src/crypto/openssl/apps/openssl.cnf was useful for
mergemaster purposes. Can we add it back?


Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/


From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:30:53 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54B0B1065670;
	Sat, 13 Mar 2010 22:30:53 +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 439F38FC18;
	Sat, 13 Mar 2010 22:30: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 o2DMUrae052475;
	Sat, 13 Mar 2010 22:30:53 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DMUrol052474;
	Sat, 13 Mar 2010 22:30:53 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201003132230.o2DMUrol052474@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 13 Mar 2010 22:30: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: r205136 - head/tools/regression/bin/sh/errors
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:30:53 -0000

Author: jilles
Date: Sat Mar 13 22:30:52 2010
New Revision: 205136
URL: http://svn.freebsd.org/changeset/base/205136

Log:
  sh: Add test for assignment errors (e.g. trying to change a readonly var).
  We currently ignore readonly status for assignments before regular builtins
  and external programs (these assignments are not persistent anyway), so just
  check that the readonly variable really is not changed.
  The test depends on the command builtin changes for 'command :'.

Added:
  head/tools/regression/bin/sh/errors/assignment-error1.0   (contents, props changed)

Added: head/tools/regression/bin/sh/errors/assignment-error1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/errors/assignment-error1.0	Sat Mar 13 22:30:52 2010	(r205136)
@@ -0,0 +1,30 @@
+# $FreeBSD$
+IFS=,
+
+SPECIAL="break,\
+	:,\
+	continue,\
+	. /dev/null,\
+	eval,\
+	exec,\
+	export -p,\
+	readonly -p,\
+	set,\
+	shift,\
+	times,\
+	trap,\
+	unset foo"
+
+# If there is no command word, the shell must abort on an assignment error.
+sh -c "readonly a=0; a=2; exit 0" 2>/dev/null && exit 1
+
+# Special built-in utilities must abort on an assignment error.
+set -- ${SPECIAL}
+for cmd in "$@"
+do
+	sh -c "readonly a=0; a=2 ${cmd}; exit 0" 2>/dev/null && exit 1
+done
+
+# Other utilities must not abort; we currently still execute them.
+sh -c "readonly a=0; a=1 true; exit $a" 2>/dev/null || exit 1
+sh -c "readonly a=0; a=1 command :; exit $a" 2>/dev/null || exit 1

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:37:07 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 66070106564A;
	Sat, 13 Mar 2010 22:37:07 +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 553F08FC1B;
	Sat, 13 Mar 2010 22: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 o2DMb7IQ054488;
	Sat, 13 Mar 2010 22:37:07 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DMb73k054486;
	Sat, 13 Mar 2010 22:37:07 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <201003132237.o2DMb73k054486@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Sat, 13 Mar 2010 22: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: r205137 - head/crypto/openssl/apps
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:37:07 -0000

Author: simon
Date: Sat Mar 13 22:37:07 2010
New Revision: 205137
URL: http://svn.freebsd.org/changeset/base/205137

Log:
  Readd $FreeBSD$ to the OpenSSL config file as that's useful for
  mergemaster.
  
  Suggested by:	dougb

Modified:
  head/crypto/openssl/apps/openssl.cnf

Modified: head/crypto/openssl/apps/openssl.cnf
==============================================================================
--- head/crypto/openssl/apps/openssl.cnf	Sat Mar 13 22:30:52 2010	(r205136)
+++ head/crypto/openssl/apps/openssl.cnf	Sat Mar 13 22:37:07 2010	(r205137)
@@ -1,3 +1,4 @@
+# $FreeBSD$
 #
 # OpenSSL example configuration file.
 # This is mostly being used for generation of certificate requests.

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:39:05 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D3AF106564A;
	Sat, 13 Mar 2010 22:39:05 +0000 (UTC) (envelope-from simon@nitro.dk)
Received: from mx.nitro.dk (unknown [77.75.165.90])
	by mx1.freebsd.org (Postfix) with ESMTP id E18A68FC12;
	Sat, 13 Mar 2010 22:39:04 +0000 (UTC)
Received: from frankie.nitro.dk (unknown [192.168.3.39])
	by mx.nitro.dk (Postfix) with ESMTP id 187D02D4895;
	Sat, 13 Mar 2010 22:39:04 +0000 (UTC)
Received: by frankie.nitro.dk (Postfix, from userid 2000)
	id 0DCB7E04C0; Sat, 13 Mar 2010 23:39:04 +0100 (CET)
Date: Sat, 13 Mar 2010 23:39:04 +0100
From: "Simon L. Nielsen" 
To: Doug Barton 
Message-ID: <20100313223903.GE1316@frankie.nitro.dk>
References: <201003131922.o2DJMfY4010389@svn.freebsd.org>
	<4B9C114A.4020802@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B9C114A.4020802@FreeBSD.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r205128 - in head: crypto/openssl
 crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes
 crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1
 crypto/openssl/crypto/bio ...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:39:05 -0000

B0;251;0cOn 2010.03.13 14:27:22 -0800, Doug Barton wrote:
> On 03/13/10 11:22, Simon L. Nielsen wrote:
> > Author: simon
> > Date: Sat Mar 13 19:22:41 2010
> > New Revision: 205128
> > URL: http://svn.freebsd.org/changeset/base/205128
> > 
> > Log:
> >   Merge OpenSSL 0.9.8m into head.
> >   
> >   This also "reverts" some FreeBSD local changes so we should now
> >   be back to using entirely stock OpenSSL.  The local changes were
> >   simple $FreeBSD$ lines additions, which were required in the CVS
> >   days, and the patch for FreeBSD-SA-09:15.ssl which has been
> >   superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation
> >   extension' support.
> 
> The $FreeBSD$ on src/crypto/openssl/apps/openssl.cnf was useful for
> mergemaster purposes. Can we add it back?

Sure, I missed that so I re-added it now.

-- 
Simon L. Nielsen

From owner-svn-src-head@FreeBSD.ORG  Sat Mar 13 22:53:18 2010
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40BEB106566C;
	Sat, 13 Mar 2010 22:53:18 +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 155128FC08;
	Sat, 13 Mar 2010 22:53:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2DMrHK0058367;
	Sat, 13 Mar 2010 22:53:17 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2DMrHEe058364;
	Sat, 13 Mar 2010 22:53:17 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201003132253.o2DMrHEe058364@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Sat, 13 Mar 2010 22:53: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: r205138 - in head: bin/sh tools/regression/bin/sh/errors
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 13 Mar 2010 22:53:18 -0000

Author: jilles
Date: Sat Mar 13 22:53:17 2010
New Revision: 205138
URL: http://svn.freebsd.org/changeset/base/205138

Log:
  sh: Do not abort on a redirection error if there is no command word.
  
  Although simple commands without a command word (only assignments and/or
  redirections) are much like special builtins, POSIX and most shells seem to
  agree that redirection errors should not abort the shell in this case. Of
  course, the assignments persist and assignment errors are fatal.
  
  To get the old behaviour portably, use the ':' special builtin.
  To get the new behaviour portably, given that there are no assignments, use
  the 'true' regular builtin.

Added:
  head/tools/regression/bin/sh/errors/redirection-error4.0   (contents, props changed)
Modified:
  head/bin/sh/eval.c

Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c	Sat Mar 13 22:37:07 2010	(r205137)
+++ head/bin/sh/eval.c	Sat Mar 13 22:53:17 2010	(r205138)
@@ -680,7 +680,7 @@ evalcommand(union node *cmd, int flags, 
 		/* Variable assignment(s) without command */
 		cmdentry.cmdtype = CMDBUILTIN;
 		cmdentry.u.index = BLTINCMD;
-		cmdentry.special = 1;
+		cmdentry.special = 0;
 	} else {
 		static const char PATH[] = "PATH=";
 		int cmd_flags = 0, bltinonly = 0;
@@ -891,6 +891,12 @@ evalcommand(union node *cmd, int flags, 
 		}
 		handler = &jmploc;
 		redirect(cmd->ncmd.redirect, mode);
+		/*
+		 * If there is no command word, redirection errors should
+		 * not be fatal but assignment errors should.
+		 */
+		if (argc == 0 && !(flags & EV_BACKCMD))
+			cmdentry.special = 1;
 		if (cmdentry.special)
 			listsetvar(cmdenviron);
 		commandname = argv[0];

Added: head/tools/regression/bin/sh/errors/redirection-error4.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/errors/redirection-error4.0	Sat Mar 13 22:53:17 2010	(r205138)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+# A redirection error should not abort the shell if there is no command word.
+exec 2>/dev/null
+